@d3plus/core 3.0.0-alpha.1 → 3.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*
2
- @d3plus/core v3.0.0-alpha.1
2
+ @d3plus/core v3.0.0-alpha.3
3
3
  Data visualization made easy. A javascript library that extends the popular D3.js to enable fast and beautiful visualizations.
4
4
  Copyright (c) 2025 D3plus - https://d3plus.org
5
5
  @license MIT
@@ -335,14 +335,6 @@ function Qe(e,i,a=0,r=1/0,o){if(i=Math.floor(i),a=Math.floor(Math.max(0,a)),r=Ma
335
335
  /**
336
336
  @namespace {Object} formatLocale
337
337
  @desc A set of default locale formatters used when assigning suffixes and currency in numbers.
338
- *
339
- * | Name | Default | Description |
340
- * |---|---|---|
341
- * | separator | "" | Separation between the number with the suffix. |
342
- * | suffixes | [] | List of suffixes used to format numbers. |
343
- * | grouping | [3] | The array of group sizes, |
344
- * | delimiters | {thousands: ",", decimal: "."} | Decimal and group separators. |
345
- * | currency | ["$", ""] | The currency prefix and suffix. |
346
338
  */function Ti(t,n,e){n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e}var Bi=[],Di=Object.keys(zi),Ni=(Object.keys(Ei).map(function(t){var n,e=Ei[t],t=Di.find(function(t){return t.toLowerCase()===e.language.toLowerCase()});e.location&&t&&Bi.push((Ti(n={},"name",e.language),Ti(n,"location",e.location),Ti(n,"tag",e.tag),Ti(n,"lcid",e.id),Ti(n,"iso639-2",zi[t]["iso639-2"]),Ti(n,"iso639-1",zi[t]["iso639-1"]),n))}),{ar:"ar-SA",ca:"ca-ES",da:"da-DK",en:"en-US",ko:"ko-KR",pa:"pa-IN",pt:"pt-BR",sv:"sv-SE",zh:"zh-CN"});
347
339
  /**
348
340
  @constant RESET
@@ -617,7 +609,7 @@ default:var e;this._t<=0?(this._context.lineTo(this._x,n),this._context.lineTo(t
617
609
  * 𝗖 𝗢 𝗟 𝗢 𝗥
618
610
  * v 1.9.1
619
611
  *
620
- * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */L2||(L2=1,fu={theme:{colors:{white:"#ffffff",black:"#000000",gray:{50:"#f8f9fa",100:"#f1f3f5",200:"#e9ecef",300:"#dee2e6",400:"#ced4da",500:"#adb5bd",600:"#868e96",700:"#495057",800:"#343a40",900:"#212529"},red:{50:"#fff5f5",100:"#ffe3e3",200:"#ffc9c9",300:"#ffa8a8",400:"#ff8787",500:"#ff6b6b",600:"#fa5252",700:"#f03e3e",800:"#e03131",900:"#c92a2a"},pink:{50:"#fff0f6",100:"#ffdeeb",200:"#fcc2d7",300:"#faa2c1",400:"#f783ac",500:"#f06595",600:"#e64980",700:"#d6336c",800:"#c2255c",900:"#a61e4d"},grape:{50:"#f8f0fc",100:"#f3d9fa",200:"#eebefa",300:"#e599f7",400:"#da77f2",500:"#cc5de8",600:"#be4bdb",700:"#ae3ec9",800:"#9c36b5",900:"#862e9c"},violet:{50:"#f3f0ff",100:"#e5dbff",200:"#d0bfff",300:"#b197fc",400:"#9775fa",500:"#845ef7",600:"#7950f2",700:"#7048e8",800:"#6741d9",900:"#5f3dc4"},indigo:{50:"#edf2ff",100:"#dbe4ff",200:"#bac8ff",300:"#91a7ff",400:"#748ffc",500:"#5c7cfa",600:"#4c6ef5",700:"#4263eb",800:"#3b5bdb",900:"#364fc7"},blue:{50:"#e7f5ff",100:"#d0ebff",200:"#a5d8ff",300:"#74c0fc",400:"#4dabf7",500:"#339af0",600:"#228be6",700:"#1c7ed6",800:"#1971c2",900:"#1864ab"},cyan:{50:"#e3fafc",100:"#c5f6fa",200:"#99e9f2",300:"#66d9e8",400:"#3bc9db",500:"#22b8cf",600:"#15aabf",700:"#1098ad",800:"#0c8599",900:"#0b7285"},teal:{50:"#e6fcf5",100:"#c3fae8",200:"#96f2d7",300:"#63e6be",400:"#38d9a9",500:"#20c997",600:"#12b886",700:"#0ca678",800:"#099268",900:"#087f5b"},green:{50:"#ebfbee",100:"#d3f9d8",200:"#b2f2bb",300:"#8ce99a",400:"#69db7c",500:"#51cf66",600:"#40c057",700:"#37b24d",800:"#2f9e44",900:"#2b8a3e"},lime:{50:"#f4fce3",100:"#e9fac8",200:"#d8f5a2",300:"#c0eb75",400:"#a9e34b",500:"#94d82d",600:"#82c91e",700:"#74b816",800:"#66a80f",900:"#5c940d"},yellow:{50:"#fff9db",100:"#fff3bf",200:"#ffec99",300:"#ffe066",400:"#ffd43b",500:"#fcc419",600:"#fab005",700:"#f59f00",800:"#f08c00",900:"#e67700"},orange:{50:"#fff4e6",100:"#ffe8cc",200:"#ffd8a8",300:"#ffc078",400:"#ffa94d",500:"#ff922b",600:"#fd7e14",700:"#f76707",800:"#e8590c",900:"#d9480f"}}},plugins:[]});var pn=_u(fu),n=pn.theme,mu={dark:n.colors.gray[700],light:n.colors.gray[50],missing:n.colors.gray[400],off:n.colors.red[900],on:n.colors.green[900],scale:Ji().range([n.colors.indigo[900],n.colors.yellow[600],n.colors.red[900],n.colors.green[900],n.colors.orange[600],n.colors.grape[900],n.colors.cyan[600],n.colors.pink[600],n.colors.lime[600],n.colors.blue[300],n.colors.pink[300],n.colors.lime[300],n.colors.violet[300],n.colors.cyan[100],n.colors.orange[100],n.colors.green[100],n.colors.grape[100],n.colors.red[100]])};
612
+ * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */F2||(F2=1,fu={theme:{colors:{white:"#ffffff",black:"#000000",gray:{50:"#f8f9fa",100:"#f1f3f5",200:"#e9ecef",300:"#dee2e6",400:"#ced4da",500:"#adb5bd",600:"#868e96",700:"#495057",800:"#343a40",900:"#212529"},red:{50:"#fff5f5",100:"#ffe3e3",200:"#ffc9c9",300:"#ffa8a8",400:"#ff8787",500:"#ff6b6b",600:"#fa5252",700:"#f03e3e",800:"#e03131",900:"#c92a2a"},pink:{50:"#fff0f6",100:"#ffdeeb",200:"#fcc2d7",300:"#faa2c1",400:"#f783ac",500:"#f06595",600:"#e64980",700:"#d6336c",800:"#c2255c",900:"#a61e4d"},grape:{50:"#f8f0fc",100:"#f3d9fa",200:"#eebefa",300:"#e599f7",400:"#da77f2",500:"#cc5de8",600:"#be4bdb",700:"#ae3ec9",800:"#9c36b5",900:"#862e9c"},violet:{50:"#f3f0ff",100:"#e5dbff",200:"#d0bfff",300:"#b197fc",400:"#9775fa",500:"#845ef7",600:"#7950f2",700:"#7048e8",800:"#6741d9",900:"#5f3dc4"},indigo:{50:"#edf2ff",100:"#dbe4ff",200:"#bac8ff",300:"#91a7ff",400:"#748ffc",500:"#5c7cfa",600:"#4c6ef5",700:"#4263eb",800:"#3b5bdb",900:"#364fc7"},blue:{50:"#e7f5ff",100:"#d0ebff",200:"#a5d8ff",300:"#74c0fc",400:"#4dabf7",500:"#339af0",600:"#228be6",700:"#1c7ed6",800:"#1971c2",900:"#1864ab"},cyan:{50:"#e3fafc",100:"#c5f6fa",200:"#99e9f2",300:"#66d9e8",400:"#3bc9db",500:"#22b8cf",600:"#15aabf",700:"#1098ad",800:"#0c8599",900:"#0b7285"},teal:{50:"#e6fcf5",100:"#c3fae8",200:"#96f2d7",300:"#63e6be",400:"#38d9a9",500:"#20c997",600:"#12b886",700:"#0ca678",800:"#099268",900:"#087f5b"},green:{50:"#ebfbee",100:"#d3f9d8",200:"#b2f2bb",300:"#8ce99a",400:"#69db7c",500:"#51cf66",600:"#40c057",700:"#37b24d",800:"#2f9e44",900:"#2b8a3e"},lime:{50:"#f4fce3",100:"#e9fac8",200:"#d8f5a2",300:"#c0eb75",400:"#a9e34b",500:"#94d82d",600:"#82c91e",700:"#74b816",800:"#66a80f",900:"#5c940d"},yellow:{50:"#fff9db",100:"#fff3bf",200:"#ffec99",300:"#ffe066",400:"#ffd43b",500:"#fcc419",600:"#fab005",700:"#f59f00",800:"#f08c00",900:"#e67700"},orange:{50:"#fff4e6",100:"#ffe8cc",200:"#ffd8a8",300:"#ffc078",400:"#ffa94d",500:"#ff922b",600:"#fd7e14",700:"#f76707",800:"#e8590c",900:"#d9480f"}}},plugins:[]});var pn=_u(fu),n=pn.theme,mu={dark:n.colors.gray[700],light:n.colors.gray[50],missing:n.colors.gray[400],off:n.colors.red[900],on:n.colors.green[900],scale:Ji().range([n.colors.indigo[900],n.colors.yellow[600],n.colors.red[900],n.colors.green[900],n.colors.orange[600],n.colors.grape[900],n.colors.cyan[600],n.colors.pink[600],n.colors.lime[600],n.colors.blue[300],n.colors.pink[300],n.colors.lime[300],n.colors.violet[300],n.colors.cyan[100],n.colors.orange[100],n.colors.green[100],n.colors.grape[100],n.colors.red[100]])};
621
613
  /**
622
614
  Returns a color based on a key, whether it is present in a user supplied object or in the default object.
623
615
  @returns {String}
@@ -991,7 +983,7 @@ return function t(n,e,i,a,r){for(var o,s,l,u,h,c,g,d=a,f=e+1;f<i;f++){s=n[f],p=n
991
983
  // Algorithm constants
992
984
  )(t,n)||(()=>{throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}var bh={};// step size for the aspect ratio
993
985
  /**
994
- @typedef {Object} LargestRect
986
+ @typedef {Object} largestRect
995
987
  @desc The returned Object of the largestRect function.
996
988
  @property {Number} width The width of the rectangle
997
989
  @property {Number} height The height of the rectangle
@@ -1017,7 +1009,7 @@ return function t(n,e,i,a,r){for(var o,s,l,u,h,c,g,d=a,f=e+1;f<i;f++){s=n[f],p=n
1017
1009
  @param {Number} [options.tolerance = 0.02] The simplification tolerance factor, between 0 and 1. A larger tolerance corresponds to more extensive simplification.
1018
1010
  @param {Array} [options.origin] The center point of the rectangle. If specified, the rectangle will be fixed at that point, otherwise the algorithm optimizes across all possible points. The given value can be either a two dimensional array specifying the x and y coordinate of the origin or an array of two dimensional points specifying multiple possible center points of the rectangle.
1019
1011
  @param {Boolean} [options.cache] Whether or not to cache the result, which would be used in subsequent calculations to preserve consistency and speed up calculation time.
1020
- @return {LargestRect}
1012
+ @return {largestRect}
1021
1013
  */function xh(t,n
1022
1014
  /**
1023
1015
  @function path2polygon
@@ -1198,7 +1190,14 @@ h=B*D,L.push(L[0]),c={area:h,cx:P,cy:N,width:B,height:D,angle:-d,points:L},z=B):
1198
1190
  @memberof Image
1199
1191
  @desc Invoked when creating a new class instance, and sets any default parameters.
1200
1192
  @private
1201
- */constructor(){this._duration=600,this._height=p("height"),this._id=p("id"),this._opacity=Ot(1),this._pointerEvents=Ot("auto"),this._select,this._url=p("url"),this._width=p("width"),this._x=p("x",0),this._y=p("y",0)}}class Ph extends Ri{
1193
+ */constructor(){this._duration=600,this._height=p("height"),this._id=p("id"),this._opacity=Ot(1),this._pointerEvents=Ot("auto"),this._select,this._url=p("url"),this._width=p("width"),this._x=p("x",0),this._y=p("y",0)}}
1194
+ /**
1195
+ * @param {*} nodeList
1196
+ * @param {*} classNames
1197
+ * @private
1198
+ */function Ph(n,e){for(let t=0;t<e.length;t++){var i=e[t];for(let t=n.length-1;0<=t;t--)if(n[t].classList.contains(i))return t;// Return the index if found
1199
+ }return 0;// Return -1 if no element is found with the class
1200
+ }class Lh extends Ri{
1202
1201
  /**
1203
1202
  @memberof Shape
1204
1203
  @desc Given a specific data point and index, returns the aesthetic properties of the shape.
@@ -1275,7 +1274,7 @@ this._group.selectAll(`g.d3plus-${this._name}-shape, g.d3plus-${this._name}-imag
1275
1274
  @memberof Shape
1276
1275
  @desc Modifies existing shapes to show hover status.
1277
1276
  @private
1278
- */_renderHover(){let a=this;this._group.selectAll(`g.d3plus-${this._name}-shape, g.d3plus-${this._name}-image, g.d3plus-${this._name}-text, g.d3plus-${this._name}-hover`).selectAll(".d3plus-Shape, .d3plus-Image, .d3plus-textBox").each(function(t,n){(t=t||{}).parentNode||(t.parentNode=this.parentNode);var e=t.parentNode;if((t=H(this).classed("d3plus-textBox")?t.data:t).__d3plusShape__||t.__d3plus__)for(;t&&(t.__d3plusShape__||t.__d3plus__);)n=t.i,t=t.data;else n=a._data.indexOf(t);var i=a._hover&&"function"==typeof a._hover&&a._hover(t,n)?a._hoverGroup.node():e;i!==this.parentNode&&i.appendChild(this),this.className.baseVal.includes("d3plus-Shape")&&(e===i?H(this).call(a._applyStyle.bind(a)):H(this).call(a._updateStyle.bind(a,H(this),a._hoverStyle)))}),
1277
+ */_renderHover(){let o=this;this._group.selectAll(`g.d3plus-${this._name}-shape, g.d3plus-${this._name}-image, g.d3plus-${this._name}-text, g.d3plus-${this._name}-hover`).selectAll(".d3plus-Shape, .d3plus-Image, .d3plus-textBox").each(function(t,n){(t=t||{}).parentNode||(t.parentNode=this.parentNode),t.dataIndex||(t.dataIndex=n);var e=t.dataIndex,i=t.parentNode,a=H(this).classed("d3plus-textBox")?"textBox":H(this).classed("d3plus-Image")?"Image":"Shape";if((t="textBox"==a?t.data:t).__d3plusShape__||t.__d3plus__)for(;t&&(t.__d3plusShape__||t.__d3plus__);)n=t.i,t=t.data;else n=o._data.indexOf(t);var r=!o._hover||"function"!=typeof o._hover||!o._hover(t,n)?i:o._hoverGroup.node();r!==this.parentNode&&(a="textBox"==a?Ph(r.childNodes,["d3plus-Image","d3plus-Shape"]):"Image"==a?Ph(r.childNodes,["d3plus-Shape"]):0,r.insertBefore(this,r.childNodes[a+e])),this.className.baseVal.includes("d3plus-Shape")&&(i===r?H(this).call(o._applyStyle.bind(o)):H(this).call(o._updateStyle.bind(o,H(this),o._hoverStyle)))}),
1279
1278
  // this._renderImage();
1280
1279
  // this._renderLabels();
1281
1280
  this._group.selectAll(`g.d3plus-${this._name}-shape, g.d3plus-${this._name}-image, g.d3plus-${this._name}-text`).attr("opacity",this._hover?this._hoverOpacity:this._active?this._activeOpacity:1)}
@@ -1581,7 +1580,7 @@ this._renderHover(),this):this._hover}
1581
1580
  @memberof Shape
1582
1581
  @desc Invoked when creating a new class instance, and sets any default parameters.
1583
1582
  @private
1584
- */constructor(t="g"){super(),this._activeOpacity=.25,this._activeStyle={stroke:(t,n)=>{let e=this._fill(t,n);return Mn(e=["transparent","none"].includes(e)?this._stroke(t,n):e).darker(1)},"stroke-width":(t,n)=>3*(this._strokeWidth(t,n)||1)},this._ariaLabel=Ot(""),this._backgroundImage=Ot(!1),this._backgroundImageClass=new Nh,this._data=[],this._duration=600,this._fill=Ot("black"),this._fillOpacity=Ot(1),this._hoverOpacity=.5,this._hoverStyle={stroke:(t,n)=>{let e=this._fill(t,n);return Mn(e=["transparent","none"].includes(e)?this._stroke(t,n):e).darker(.5)},"stroke-width":(t,n)=>2*(this._strokeWidth(t,n)||1)},this._id=(t,n)=>void 0!==t.id?t.id:n,this._label=Ot(!1),this._labelClass=new Sc,this._labelConfig={fontColor:(t,n)=>bu(this._fill(t,n)),fontSize:12,padding:5},this._name="Shape",this._opacity=Ot(1),this._pointerEvents=Ot("visiblePainted"),this._role=Ot("presentation"),this._rotate=Ot(0),this._rx=Ot(0),this._ry=Ot(0),this._scale=Ot(1),this._shapeRendering=Ot("geometricPrecision"),this._stroke=(t,n)=>Mn(this._fill(t,n)).darker(1).formatHex(),this._strokeDasharray=Ot("0"),this._strokeLinecap=Ot("butt"),this._strokeOpacity=Ot(1),this._strokeWidth=Ot(0),this._tagName=t,this._textAnchor=Ot("start"),this._texture=Ot(!1),this._textureDefault={},this._textureDefs={},this._vectorEffect=Ot("non-scaling-stroke"),this._verticalAlign=Ot("top"),this._x=p("x",0),this._y=p("y",0)}}function Lh(n,t){var e,i=Object.keys(n);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(n),t&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),i.push.apply(i,e)),i}function Fh(i){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?Lh(Object(a),!0).forEach(function(t){var n,e;n=i,e=a[t=t],t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):Lh(Object(a)).forEach(function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(a,t))})}return i}function Oh(t){return(Oh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Rh(){return(Rh=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e,i=arguments[n];for(e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t}).apply(this,arguments)}function jh(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);e<n;e++)i[e]=t[e];return i}function Ih(t,n){var e,i,a,r,o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(o)return i=!(e=!0),{s:function(){o=o.call(t)},n:function(){var t=o.next();return e=t.done,t},e:function(t){i=!0,a=t},f:function(){try{e||null==o.return||o.return()}finally{if(i)throw a}}};if(Array.isArray(t)||(o=((t,n)=>{var e;if(t)return"string"==typeof t?jh(t,n):"Map"===(e="Object"===(e=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:e)||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?jh(t,n):void 0})(t))||n)return o&&(t=o),r=0,{s:n=function(){},n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}
1583
+ */constructor(t="g"){super(),this._activeOpacity=.25,this._activeStyle={stroke:(t,n)=>{let e=this._fill(t,n);return Mn(e=["transparent","none"].includes(e)?this._stroke(t,n):e).darker(1)},"stroke-width":(t,n)=>3*(this._strokeWidth(t,n)||1)},this._ariaLabel=Ot(""),this._backgroundImage=Ot(!1),this._backgroundImageClass=new Nh,this._data=[],this._duration=600,this._fill=Ot("black"),this._fillOpacity=Ot(1),this._hoverOpacity=.5,this._hoverStyle={stroke:(t,n)=>{let e=this._fill(t,n);return Mn(e=["transparent","none"].includes(e)?this._stroke(t,n):e).darker(.5)},"stroke-width":(t,n)=>2*(this._strokeWidth(t,n)||1)},this._id=(t,n)=>void 0!==t.id?t.id:n,this._label=Ot(!1),this._labelClass=new Cc,this._labelConfig={fontColor:(t,n)=>bu(this._fill(t,n)),fontSize:12,padding:5},this._name="Shape",this._opacity=Ot(1),this._pointerEvents=Ot("visiblePainted"),this._role=Ot("presentation"),this._rotate=Ot(0),this._rx=Ot(0),this._ry=Ot(0),this._scale=Ot(1),this._shapeRendering=Ot("geometricPrecision"),this._stroke=(t,n)=>Mn(this._fill(t,n)).darker(1).formatHex(),this._strokeDasharray=Ot("0"),this._strokeLinecap=Ot("butt"),this._strokeOpacity=Ot(1),this._strokeWidth=Ot(0),this._tagName=t,this._textAnchor=Ot("start"),this._texture=Ot(!1),this._textureDefault={},this._textureDefs={},this._vectorEffect=Ot("non-scaling-stroke"),this._verticalAlign=Ot("top"),this._x=p("x",0),this._y=p("y",0)}}function Fh(n,t){var e,i=Object.keys(n);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(n),t&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),i.push.apply(i,e)),i}function Oh(i){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?Fh(Object(a),!0).forEach(function(t){var n,e;n=i,e=a[t=t],t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):Fh(Object(a)).forEach(function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(a,t))})}return i}function Rh(t){return(Rh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function jh(){return(jh=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e,i=arguments[n];for(e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])}return t}).apply(this,arguments)}function Ih(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,i=new Array(n);e<n;e++)i[e]=t[e];return i}function Hh(t,n){var e,i,a,r,o="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(o)return i=!(e=!0),{s:function(){o=o.call(t)},n:function(){var t=o.next();return e=t.done,t},e:function(t){i=!0,a=t},f:function(){try{e||null==o.return||o.return()}finally{if(i)throw a}}};if(Array.isArray(t)||(o=((t,n)=>{var e;if(t)return"string"==typeof t?Ih(t,n):"Map"===(e="Object"===(e=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:e)||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ih(t,n):void 0})(t))||n)return o&&(t=o),r=0,{s:n=function(){},n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:n};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}
1585
1584
  /**
1586
1585
  * de Casteljau's algorithm for drawing and splitting bezier curves.
1587
1586
  * Inspired by https://pomax.github.io/bezierinfo/
@@ -1591,14 +1590,14 @@ this._renderHover(),this):this._hover}
1591
1590
  * @param {Number} t Where to split the curve (value between [0, 1])
1592
1591
  * @return {Object} An object { left, right } where left is the segment from 0..t and
1593
1592
  * right is the segment from t..1.
1594
- */function Hh(t,n){var r=[],o=[];return t.length&&function t(n,e){if(1===n.length)r.push(n[0]),o.push(n[0]);else{for(var i=Array(n.length-1),a=0;a<i.length;a++)0===a&&r.push(n[0]),a===i.length-1&&o.push(n[a+1]),i[a]=[(1-e)*n[a][0]+e*n[a+1][0],(1-e)*n[a][1]+e*n[a+1][1]];t(i,e)}}(t,n),{left:r,right:o.reverse()}}
1593
+ */function Gh(t,n){var r=[],o=[];return t.length&&function t(n,e){if(1===n.length)r.push(n[0]),o.push(n[0]);else{for(var i=Array(n.length-1),a=0;a<i.length;a++)0===a&&r.push(n[0]),a===i.length-1&&o.push(n[a+1]),i[a]=[(1-e)*n[a][0]+e*n[a+1][0],(1-e)*n[a][1]+e*n[a+1][1]];t(i,e)}}(t,n),{left:r,right:o.reverse()}}
1595
1594
  /**
1596
1595
  * Convert segments represented as points back into a command object
1597
1596
  *
1598
1597
  * @param {Number[][]} points Array of [x,y] points: [start, control1, control2, ..., end]
1599
1598
  * Represents a segment
1600
1599
  * @return {Object} A command object representing the segment.
1601
- */function Gh(t){var n={};return 4===t.length&&(n.x2=t[2][0],n.y2=t[2][1]),3<=t.length&&(n.x1=t[1][0],n.y1=t[1][1]),n.x=t[t.length-1][0],n.y=t[t.length-1][1],4===t.length?
1600
+ */function Kh(t){var n={};return 4===t.length&&(n.x2=t[2][0],n.y2=t[2][1]),3<=t.length&&(n.x1=t[1][0],n.y1=t[1][1]),n.x=t[t.length-1][0],n.y=t[t.length-1][1],4===t.length?
1602
1601
  // start, control1, control2, end
1603
1602
  n.type="C":3===t.length?
1604
1603
  // start, control, end
@@ -1620,7 +1619,7 @@ n.type="L",n}
1620
1619
  * @param {Object} commandEnd The end command object
1621
1620
  * @param {Number} segmentCount The number of segments to create
1622
1621
  * @return {Object[]} An array of commands representing the segments in sequence
1623
- */function Kh(t,n,e){t=[[t.x,t.y]];return null!=n.x1&&t.push([n.x1,n.y1]),null!=n.x2&&t.push([n.x2,n.y2]),t.push([n.x,n.y]),((t,n)=>{// x-----x-----x-----x
1622
+ */function $h(t,n,e){t=[[t.x,t.y]];return null!=n.x1&&t.push([n.x1,n.y1]),null!=n.x2&&t.push([n.x2,n.y2]),t.push([n.x,n.y]),((t,n)=>{// x-----x-----x-----x
1624
1623
  // t= 0.33 0.66 1
1625
1624
  // x-----o-----------x
1626
1625
  // r= 0.33
@@ -1634,11 +1633,11 @@ n.type="L",n}
1634
1633
  // r= 0.33 (0.25 / (1 - 0.25))
1635
1634
  // x-----o----x
1636
1635
  // r= 0.5 (0.25 / (1 - 0.5))
1637
- for(var e=[],i=t,a=1/(n=n||2),r=0;r<n-1;r++){var o=Hh(i,a/(1-a*r));e.push(o.left),i=o.right}// last segment is just to the end from the last point
1638
- return e.push(i),e})(t,e).map(Gh)}var $h=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,qh={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};
1636
+ for(var e=[],i=t,a=1/(n=n||2),r=0;r<n-1;r++){var o=Gh(i,a/(1-a*r));e.push(o.left),i=o.right}// last segment is just to the end from the last point
1637
+ return e.push(i),e})(t,e).map(Kh)}var qh=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,Uh={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};
1639
1638
  /**
1640
1639
  * List of params for each command type in a path `d` attribute
1641
- */function Uh(t,n){for(var e=Array(t),i=0;i<t;i++)e[i]=n;return e}
1640
+ */function Wh(t,n){for(var e=Array(t),i=0;i<t;i++)e[i]=n;return e}
1642
1641
  /**
1643
1642
  * Converts a command object to a string to be used in a `d` attribute
1644
1643
  * @param {Object} command A command object
@@ -1654,10 +1653,10 @@ return e.push(i),e})(t,e).map(Gh)}var $h=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,qh
1654
1653
  * @param {Function} excludeSegment a function that takes a start command object and
1655
1654
  * end command object and returns true if the segment should be excluded from splitting.
1656
1655
  * @return {Object[]} The extended commandsToExtend array
1657
- */function Wh(r,t,a){
1656
+ */function Yh(r,t,a){
1658
1657
  // compute insertion points:
1659
1658
  // number of segments in the path to extend
1660
- var n=r.length-1,t=t.length-1,o=n/t,n=Uh(t).reduce(function(t,n,e){var i=Math.floor(o*e);// handle excluding segments
1659
+ var n=r.length-1,t=t.length-1,o=n/t,n=Wh(t).reduce(function(t,n,e){var i=Math.floor(o*e);// handle excluding segments
1661
1660
  return a&&i<r.length-1&&a(r[i],r[i+1])&&t[i]&&(
1662
1661
  // TODO - Note this is a naive algorithm that should work for most d3-area use cases
1663
1662
  // but if two adjacent segments are supposed to be skipped, this will not perform as
@@ -1668,9 +1667,9 @@ o*e%1<.5?0<i?--i:i<r.length-1&&(i+=1):i<r.length-1?i+=1:0<i&&--i),t[i]=(t[i]||0)
1668
1667
  // if last command, just add `segmentCount` number of times
1669
1668
  var i,a;// otherwise, split the segment segmentCount times.
1670
1669
  return e===r.length-1?(// convert M to L
1671
- "M"===(i=Uh(n,Rh({},r[r.length-1])))[0].type&&i.forEach(function(t){t.type="L"}),t.concat(i)):t.concat((i=r[e],t=n,n=[],// line, quadratic bezier, or cubic bezier
1672
- "L"===(e=r[e+1]).type||"Q"===e.type||"C"===e.type?n=n.concat(Kh(i,e,t)):(// convert M to L
1673
- "M"===(a=Rh({},i)).type&&(a.type="L"),(n=n.concat(Uh(t-1).map(function(){return a}))).push(e)),n))},[]);// number of segments in the reference path.
1670
+ "M"===(i=Wh(n,jh({},r[r.length-1])))[0].type&&i.forEach(function(t){t.type="L"}),t.concat(i)):t.concat((i=r[e],t=n,n=[],// line, quadratic bezier, or cubic bezier
1671
+ "L"===(e=r[e+1]).type||"Q"===e.type||"C"===e.type?n=n.concat($h(i,e,t)):(// convert M to L
1672
+ "M"===(a=jh({},i)).type&&(a.type="L"),(n=n.concat(Wh(t-1).map(function(){return a}))).push(e)),n))},[]);// number of segments in the reference path.
1674
1673
  // add in the very first point since splitSegment only adds in the ones after it
1675
1674
  return n.unshift(r[0]),n}
1676
1675
  /**
@@ -1678,12 +1677,12 @@ return n.unshift(r[0]),n}
1678
1677
  * objects. Drops the `Z` character.
1679
1678
  *
1680
1679
  * @param {String|null} d A path `d` string
1681
- */function Yh(t){// iterate over each token, checking if we are at a new command
1680
+ */function Vh(t){// iterate over each token, checking if we are at a new command
1682
1681
  // by presence in the typeMap
1683
1682
  for(
1684
1683
  // split into valid tokens
1685
- var n,e=(t||"").match($h)||[],i=[],a=0;a<e.length;++a)// new command found:
1686
- if(n=qh[e[a]]){// add each of the expected args for this command:
1684
+ var n,e=(t||"").match(qh)||[],i=[],a=0;a<e.length;++a)// new command found:
1685
+ if(n=Uh[e[a]]){// add each of the expected args for this command:
1687
1686
  for(var r={type:e[a]},o=0;o<n.length;++o)r[n[o]]=+e[a+o+1];// need to increment our token index appropriately since
1688
1687
  // we consumed token args
1689
1688
  a+=n.length,i.push(r)}return i}
@@ -1705,16 +1704,16 @@ a+=n.length,i.push(r)}return i}
1705
1704
  * @param {Boolean} interpolateOptions.snapEndsToInput a boolean indicating whether end of input should
1706
1705
  * be sourced from input argument or computed.
1707
1706
  * @returns {Function} Interpolation function that maps t ([0, 1]) to an array of path commands.
1708
- */function Vh(t,l,n){
1707
+ */function Zh(t,l,n){
1709
1708
  // make a copy so we don't mess with the input arrays
1710
- var u=null==t?[]:t.slice(),h=null==l?[]:l.slice(),t="object"===Oh(n)?n:{excludeSegment:n,snapEndsToInput:!0},n=t.excludeSegment,c=t.snapEndsToInput;// both input sets are empty, so we don't interpolate
1709
+ var u=null==t?[]:t.slice(),h=null==l?[]:l.slice(),t="object"===Rh(n)?n:{excludeSegment:n,snapEndsToInput:!0},n=t.excludeSegment,c=t.snapEndsToInput;// both input sets are empty, so we don't interpolate
1711
1710
  if(!u.length&&!h.length)return function(){return[]};// do we add Z during interpolation? yes if both have it. (we'd expect both to have it or not)
1712
1711
  t=!(0!==u.length&&"Z"!==u[u.length-1].type||0!==h.length&&"Z"!==h[h.length-1].type);// we temporarily remove Z
1713
1712
  0<u.length&&"Z"===u[u.length-1].type&&u.pop(),0<h.length&&"Z"===h[h.length-1].type&&h.pop(),// if A is empty, treat it as if it used to contain just the first point
1714
1713
  // of B. This makes it so the line extends out of from that first point.
1715
1714
  u.length?h.length||h.push(u[0]):u.push(h[0]);0!==Math.abs(h.length-u.length)&&(
1716
1715
  // B has more points than A, so add points to A before interpolating
1717
- h.length>u.length?u=Wh(u,h,n):h.length<u.length&&(h=Wh(h,u,n)));var g=(// commands have same length now.
1716
+ h.length>u.length?u=Yh(u,h,n):h.length<u.length&&(h=Yh(h,u,n)));var g=(// commands have same length now.
1718
1717
  // convert commands in A to the same type as those in B
1719
1718
  u=u.map(function(t,n){return i=t,a=h[n],o={x1:"x",y1:"y",x2:"x",y2:"y"},s=["xAxisRotation","largeArcFlag","sweepFlag"],// convert (but ignore M types)
1720
1719
  i.type!==a.type&&"M"!==a.type.toUpperCase()&&(r={},Object.keys(a).forEach(function(t){var n=a[t],e=i[t];// first read from the A command
@@ -1755,13 +1754,13 @@ r.type=a.type,i=r),i;
1755
1754
  * Then [commandEnd] is returned.
1756
1755
  * @return {Object[]} Array of ~segmentCount command objects between commandStart and
1757
1756
  * commandEnd. (Can be segmentCount+1 objects if commandStart is type M).
1758
- */})).map(function(t){return Fh({},t)});return t&&(g.push({type:"Z"}),u.push({type:"Z"})),function(t){
1757
+ */})).map(function(t){return Oh({},t)});return t&&(g.push({type:"Z"}),u.push({type:"Z"})),function(t){
1759
1758
  // at 1 return the final value without the extensions used during interpolation
1760
1759
  if(1===t&&c)return null==l?[]:l;// work with aCommands directly since interpolatedCommands are mutated
1761
1760
  if(0===t)return u;// interpolate the commands using the mutable interpolated command objs
1762
1761
  for(var n=0;n<g.length;++n){
1763
1762
  // if (interpolatedCommands[i].type === 'Z') continue;
1764
- var e,i=u[n],a=h[n],r=g[n],o=Ih(qh[r.type]);try{for(o.s();!(e=o.n()).done;){var s=e.value;r[s]=(1-t)*i[s]+t*a[s],// do not use floats for flags (#27), round to integer
1763
+ var e,i=u[n],a=h[n],r=g[n],o=Hh(Uh[r.type]);try{for(o.s();!(e=o.n()).done;){var s=e.value;r[s]=(1-t)*i[s]+t*a[s],// do not use floats for flags (#27), round to integer
1765
1764
  "largeArcFlag"!==s&&"sweepFlag"!==s||(r[s]=Math.round(r[s]))}}catch(t){o.e(t)}finally{o.f()}}return g}}
1766
1765
  /** @typedef InterpolateOptions */
1767
1766
  /**
@@ -1782,11 +1781,11 @@ var e,i=u[n],a=h[n],r=g[n],o=Ih(qh[r.type]);try{for(o.s();!(e=o.n()).done;){var
1782
1781
  * - interpolateOptions.snapEndsToInput a boolean indicating whether end of input should
1783
1782
  * be sourced from input argument or computed.
1784
1783
  * @returns {Function} Interpolation function that maps t ([0, 1]) to a path `d` string.
1785
- */function Zh(t,a,n){var r,t=Yh(t),e=Yh(a),n="object"===Oh(n)?n:{excludeSegment:n,snapEndsToInput:!0},i=n.excludeSegment,o=n.snapEndsToInput;return t.length||e.length?(r=Vh(t,e,{excludeSegment:i,snapEndsToInput:o}),function(t){
1784
+ */function Xh(t,a,n){var r,t=Vh(t),e=Vh(a),n="object"===Rh(n)?n:{excludeSegment:n,snapEndsToInput:!0},i=n.excludeSegment,o=n.snapEndsToInput;return t.length||e.length?(r=Zh(t,e,{excludeSegment:i,snapEndsToInput:o}),function(t){
1786
1785
  // at 1 return the final value without the extensions used during interpolation
1787
- if(1===t&&o)return null==a?"":a;var n,e="",i=Ih(r(t));// convert to a string (fastest concat: https://jsperf.com/join-concat/150)
1788
- try{for(i.s();!(n=i.n()).done;)e+=(n=>"".concat(n.type).concat(qh[n.type].map(function(t){return n[t]}).join(",")))(n.value)}catch(t){i.e(t)}finally{i.f()}return e}):function(){return""}}// Add lower case entries too matching uppercase (e.g. 'm' == 'M')
1789
- Object.keys(qh).forEach(function(t){qh[t.toLowerCase()]=qh[t]});class Xh extends Ph{
1786
+ if(1===t&&o)return null==a?"":a;var n,e="",i=Hh(r(t));// convert to a string (fastest concat: https://jsperf.com/join-concat/150)
1787
+ try{for(i.s();!(n=i.n()).done;)e+=(n=>"".concat(n.type).concat(Uh[n.type].map(function(t){return n[t]}).join(",")))(n.value)}catch(t){i.e(t)}finally{i.f()}return e}):function(){return""}}// Add lower case entries too matching uppercase (e.g. 'm' == 'M')
1788
+ Object.keys(Uh).forEach(function(t){Uh[t.toLowerCase()]=Uh[t]});class Jh extends Lh{
1790
1789
  /**
1791
1790
  @memberof Area
1792
1791
  @desc Given a specific data point and index, returns the aesthetic properties of the shape.
@@ -1805,7 +1804,7 @@ Object.keys(qh).forEach(function(t){qh[t.toLowerCase()]=qh[t]});class Xh extends
1805
1804
  @desc Draws the area polygons.
1806
1805
  @param {Function} [*callback*]
1807
1806
  @chainable
1808
- */render(t){super.render(t);t=this._curve.bind(this)(this.config()),t=pu["curve"+t.charAt(0).toUpperCase()+t.slice(1)];let n=this._path=Hs().defined(this._defined).curve(t).x(this._x).x0(this._x0).x1(this._x1).y(this._y).y0(this._y0).y1(this._y1),e=Hs().defined(t=>t).curve(t).x(this._x).y(this._y).x0((t,n)=>this._x1?this._x0(t,n)+(this._x1(t,n)-this._x0(t,n))/2:this._x0(t,n)).x1((t,n)=>this._x1?this._x0(t,n)+(this._x1(t,n)-this._x0(t,n))/2:this._x0(t,n)).y0((t,n)=>this._y1?this._y0(t,n)+(this._y1(t,n)-this._y0(t,n))/2:this._y0(t,n)).y1((t,n)=>this._y1?this._y0(t,n)+(this._y1(t,n)-this._y0(t,n))/2:this._y0(t,n));return this._enter.append("path").attr("transform",t=>`translate(${-t.xR[0]-t.width/2}, ${-t.yR[0]-t.height/2})`).attr("d",t=>e(t.values)).call(this._applyStyle.bind(this)).transition(this._transition).attrTween("d",function(t){return Zh(H(this).attr("d"),n(t.values))}),this._update.select("path").transition(this._transition).attr("transform",t=>`translate(${-t.xR[0]-t.width/2}, ${-t.yR[0]-t.height/2})`).attrTween("d",function(t){return Zh(H(this).attr("d"),n(t.values))}).call(this._applyStyle.bind(this)),this._exit.select("path").transition(this._transition).attrTween("d",function(t){return Zh(H(this).attr("d"),e(t.values))}),this}
1807
+ */render(t){super.render(t);t=this._curve.bind(this)(this.config()),t=pu["curve"+t.charAt(0).toUpperCase()+t.slice(1)];let n=this._path=Hs().defined(this._defined).curve(t).x(this._x).x0(this._x0).x1(this._x1).y(this._y).y0(this._y0).y1(this._y1),e=Hs().defined(t=>t).curve(t).x(this._x).y(this._y).x0((t,n)=>this._x1?this._x0(t,n)+(this._x1(t,n)-this._x0(t,n))/2:this._x0(t,n)).x1((t,n)=>this._x1?this._x0(t,n)+(this._x1(t,n)-this._x0(t,n))/2:this._x0(t,n)).y0((t,n)=>this._y1?this._y0(t,n)+(this._y1(t,n)-this._y0(t,n))/2:this._y0(t,n)).y1((t,n)=>this._y1?this._y0(t,n)+(this._y1(t,n)-this._y0(t,n))/2:this._y0(t,n));return this._enter.append("path").attr("transform",t=>`translate(${-t.xR[0]-t.width/2}, ${-t.yR[0]-t.height/2})`).attr("d",t=>e(t.values)).call(this._applyStyle.bind(this)).transition(this._transition).attrTween("d",function(t){return Xh(H(this).attr("d"),n(t.values))}),this._update.select("path").transition(this._transition).attr("transform",t=>`translate(${-t.xR[0]-t.width/2}, ${-t.yR[0]-t.height/2})`).attrTween("d",function(t){return Xh(H(this).attr("d"),n(t.values))}).call(this._applyStyle.bind(this)),this._exit.select("path").transition(this._transition).attrTween("d",function(t){return Xh(H(this).attr("d"),e(t.values))}),this}
1809
1808
  /**
1810
1809
  @memberof Area
1811
1810
  @desc If *value* is specified, sets the area curve to the specified string and returns the current class instance. If *value* is not specified, returns the current area curve.
@@ -1858,7 +1857,7 @@ Object.keys(qh).forEach(function(t){qh[t.toLowerCase()]=qh[t]});class Xh extends
1858
1857
  @memberof Area
1859
1858
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Shape.
1860
1859
  @private
1861
- */constructor(){super(),this._curve=Ot("linear"),this._defined=()=>!0,this._labelBounds=(t,n,e)=>{e=xh(e.points);return e?{angle:e.angle,width:e.width,height:e.height,x:e.cx-e.width/2-this._x(t,n),y:e.cy-e.height/2-this._y(t,n)}:null},this._labelConfig=Object.assign(this._labelConfig,{textAnchor:"middle",verticalAlign:"middle"}),this._name="Area",this._x=p("x"),this._x0=p("x"),this._x1=null,this._y=Ot(0),this._y0=Ot(0),this._y1=p("y")}}class Jh extends Ph{
1860
+ */constructor(){super(),this._curve=Ot("linear"),this._defined=()=>!0,this._labelBounds=(t,n,e)=>{e=xh(e.points);return e?{angle:e.angle,width:e.width,height:e.height,x:e.cx-e.width/2-this._x(t,n),y:e.cy-e.height/2-this._y(t,n)}:null},this._labelConfig=Object.assign(this._labelConfig,{textAnchor:"middle",verticalAlign:"middle"}),this._name="Area",this._x=p("x"),this._x0=p("x"),this._x1=null,this._y=Ot(0),this._y0=Ot(0),this._y1=p("y")}}class Qh extends Lh{
1862
1861
  /**
1863
1862
  @memberof Bar
1864
1863
  @desc Draws the bars.
@@ -1954,7 +1953,7 @@ Object.keys(qh).forEach(function(t){qh[t.toLowerCase()]=qh[t]});class Xh extends
1954
1953
  @memberof Bar
1955
1954
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Shape.
1956
1955
  @private
1957
- */constructor(){super("rect"),this._name="Bar",this._height=Ot(10),this._labelBounds=(t,n,e)=>({width:e.width,height:e.height,x:null!==this._x1?this._getX(t,n):-e.width/2,y:null===this._x1?this._getY(t,n):-e.height/2}),this._width=Ot(10),this._x=p("x"),this._x0=p("x"),this._x1=null,this._y=Ot(0),this._y0=Ot(0),this._y1=p("y")}}class Qh extends Ph{
1956
+ */constructor(){super("rect"),this._name="Bar",this._height=Ot(10),this._labelBounds=(t,n,e)=>({width:e.width,height:e.height,x:null!==this._x1?this._getX(t,n):-e.width/2,y:null===this._x1?this._getY(t,n):-e.height/2}),this._width=Ot(10),this._x=p("x"),this._x0=p("x"),this._x1=null,this._y=Ot(0),this._y0=Ot(0),this._y1=p("y")}}class tc extends Lh{
1958
1957
  /**
1959
1958
  @memberof Circle
1960
1959
  @desc Provides the default positioning to the <rect> elements.
@@ -1987,7 +1986,7 @@ Object.keys(qh).forEach(function(t){qh[t.toLowerCase()]=qh[t]});class Xh extends
1987
1986
  @memberof Circle
1988
1987
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Shape.
1989
1988
  @private
1990
- */constructor(){super("circle"),this._labelBounds=(t,n,e)=>({width:1.5*e.r,height:1.5*e.r,x:.75*-e.r,y:.75*-e.r}),this._labelConfig=Tt(this._labelConfig,{textAnchor:"middle",verticalAlign:"middle"}),this._name="Circle",this._r=p("r")}}class tc extends Ph{
1989
+ */constructor(){super("circle"),this._labelBounds=(t,n,e)=>({width:1.5*e.r,height:1.5*e.r,x:.75*-e.r,y:.75*-e.r}),this._labelConfig=Tt(this._labelConfig,{textAnchor:"middle",verticalAlign:"middle"}),this._name="Circle",this._r=p("r")}}class nc extends Lh{
1991
1990
  /**
1992
1991
  @memberof Rect
1993
1992
  @desc Draws the rectangles.
@@ -2031,7 +2030,7 @@ Object.keys(qh).forEach(function(t){qh[t.toLowerCase()]=qh[t]});class Xh extends
2031
2030
  @memberof Rect
2032
2031
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Shape.
2033
2032
  @private
2034
- */constructor(){super("rect"),this._height=p("height"),this._labelBounds=(t,n,e)=>({width:e.width,height:e.height,x:-e.width/2,y:-e.height/2}),this._name="Rect",this._width=p("width")}}class nc extends Ph{
2033
+ */constructor(){super("rect"),this._height=p("height"),this._labelBounds=(t,n,e)=>({width:e.width,height:e.height,x:-e.width/2,y:-e.height/2}),this._name="Rect",this._width=p("width")}}class ec extends Lh{
2035
2034
  /**
2036
2035
  @memberof Line
2037
2036
  @desc Filters/manipulates the data array before binding each point to an SVG group.
@@ -2048,7 +2047,7 @@ Object.keys(qh).forEach(function(t){qh[t.toLowerCase()]=qh[t]});class Xh extends
2048
2047
  @desc Calculates the stroke-dasharray used for animations
2049
2048
  @param {Object} *d* data point
2050
2049
  @private
2051
- */function n(n){n.initialLength=this.getTotalLength();let e=o._strokeDasharray(n.values[0],o._data.indexOf(n.values[0])).split(" ").map(Number);1===e.length&&0===e[0]?e=[n.initialLength]:1===e.length?e.push(e[0]):e.length%2&&(e=e.concat(e));var i=[];let a=0;for(;a<n.initialLength;)for(let t=0;t<e.length;t++){var r=e[t];if(a+=r,i.push(r),a>=n.initialLength)break}1<i.length&&i.length%2&&i.pop(),i[i.length-1]+=n.initialLength-ai(i),i.length%2==0&&i.push(0),n.initialStrokeArray=i.join(" ")}t=this._curve.bind(this)(this.config()),t=pu["curve"+t.charAt(0).toUpperCase()+t.slice(1)],this._path.curve(t).defined(this._defined).x(this._x).y(this._y),t=this._enter.append("path").attr("transform",t=>`translate(${-t.xR[0]-t.width/2}, ${-t.yR[0]-t.height/2})`).attr("d",t=>this._path(t.values)).call(this._applyStyle.bind(this));let e=this._update.select("path").attr("stroke-dasharray",t=>o._strokeDasharray(t.values[0],o._data.indexOf(t.values[0])));return this._duration?(t.each(n).attr("stroke-dasharray",t=>t.initialStrokeArray+" "+t.initialLength).attr("stroke-dashoffset",t=>t.initialLength).transition(this._transition).attr("stroke-dashoffset",0),e=e.transition(this._transition).attrTween("d",function(t){return Zh(H(this).attr("d"),o._path(t.values))}),this._exit.selectAll("path").each(n).attr("stroke-dasharray",t=>t.initialStrokeArray+" "+t.initialLength).transition(this._transition).attr("stroke-dashoffset",t=>-t.initialLength)):e=e.attr("d",t=>o._path(t.values)),e.attr("transform",t=>`translate(${-t.xR[0]-t.width/2}, ${-t.yR[0]-t.height/2})`).call(this._applyStyle.bind(this)),this}
2050
+ */function n(n){n.initialLength=this.getTotalLength();let e=o._strokeDasharray(n.values[0],o._data.indexOf(n.values[0])).split(" ").map(Number);1===e.length&&0===e[0]?e=[n.initialLength]:1===e.length?e.push(e[0]):e.length%2&&(e=e.concat(e));var i=[];let a=0;for(;a<n.initialLength;)for(let t=0;t<e.length;t++){var r=e[t];if(a+=r,i.push(r),a>=n.initialLength)break}1<i.length&&i.length%2&&i.pop(),i[i.length-1]+=n.initialLength-ai(i),i.length%2==0&&i.push(0),n.initialStrokeArray=i.join(" ")}t=this._curve.bind(this)(this.config()),t=pu["curve"+t.charAt(0).toUpperCase()+t.slice(1)],this._path.curve(t).defined(this._defined).x(this._x).y(this._y),t=this._enter.append("path").attr("transform",t=>`translate(${-t.xR[0]-t.width/2}, ${-t.yR[0]-t.height/2})`).attr("d",t=>this._path(t.values)).call(this._applyStyle.bind(this));let e=this._update.select("path").attr("stroke-dasharray",t=>o._strokeDasharray(t.values[0],o._data.indexOf(t.values[0])));return this._duration?(t.each(n).attr("stroke-dasharray",t=>t.initialStrokeArray+" "+t.initialLength).attr("stroke-dashoffset",t=>t.initialLength).transition(this._transition).attr("stroke-dashoffset",0),e=e.transition(this._transition).attrTween("d",function(t){return Xh(H(this).attr("d"),o._path(t.values))}),this._exit.selectAll("path").each(n).attr("stroke-dasharray",t=>t.initialStrokeArray+" "+t.initialLength).transition(this._transition).attr("stroke-dashoffset",t=>-t.initialLength)):e=e.attr("d",t=>o._path(t.values)),e.attr("transform",t=>`translate(${-t.xR[0]-t.width/2}, ${-t.yR[0]-t.height/2})`).call(this._applyStyle.bind(this)),this}
2052
2051
  /**
2053
2052
  @memberof Line
2054
2053
  @desc Given a specific data point and index, returns the aesthetic properties of the shape.
@@ -2072,7 +2071,7 @@ Object.keys(qh).forEach(function(t){qh[t.toLowerCase()]=qh[t]});class Xh extends
2072
2071
  @memberof Line
2073
2072
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Shape.
2074
2073
  @private
2075
- */constructor(){super(),this._curve=Ot("linear"),this._defined=t=>t,this._fill=Ot("none"),this._hitArea=Ot({d:t=>this._path(t.values),fill:"none","stroke-width":10,transform:null}),this._name="Line",this._path=Is(),this._stroke=Ot("black"),this._strokeWidth=Ot(1)}}let ec={Circle:Qh,Rect:tc};class ic extends Ri{
2074
+ */constructor(){super(),this._curve=Ot("linear"),this._defined=t=>t,this._fill=Ot("none"),this._hitArea=Ot({d:t=>this._path(t.values),fill:"none","stroke-width":10,transform:null}),this._name="Line",this._path=Is(),this._stroke=Ot("black"),this._strokeWidth=Ot(1)}}let ic={Circle:tc,Rect:nc};class ac extends Ri{
2076
2075
  /**
2077
2076
  @memberof Whisker
2078
2077
  @desc Draws the whisker.
@@ -2080,9 +2079,9 @@ Object.keys(qh).forEach(function(t){qh[t.toLowerCase()]=qh[t]});class Xh extends
2080
2079
  @chainable
2081
2080
  */render(t){void 0===this._select&&this.select(H("body").append("svg").style("width",window.innerWidth+"px").style("height",window.innerHeight+"px").style("display","block").node());let s=[];this._data.forEach((t,n)=>{var e=this._orient(t,n),i=this._x(t,n),a=this._y(t,n);let r=i,o=("left"===e?r-=this._length(t,n):"right"===e&&(r+=this._length(t,n)),a);"top"===e?o-=this._length(t,n):"bottom"===e&&(o+=this._length(t,n)),s.push({__d3plus__:!0,data:t,i:n,id:n,x:i,y:a}),s.push({__d3plus__:!0,data:t,i:n,id:n,x:r,y:o})}),
2082
2081
  // Draw whisker line.
2083
- this._line=(new nc).data(s).select(Dt("g.d3plus-Whisker",{parent:this._select}).node()).config(Ft.bind(this)(this._lineConfig,"shape")).render(t);t=this._data.map((t,n)=>{var e={__d3plus__:!0};e.data=t,e.i=n,e.endpoint=this._endpoint(t,n),e.length=this._length(t,n),e.orient=this._orient(t,n);let i=this._x(t,n),a=("left"===e.orient?i-=e.length:"right"===e.orient&&(i+=e.length),this._y(t,n));return"top"===e.orient?a-=e.length:"bottom"===e.orient&&(a+=e.length),e.x=i,e.y=a,e});
2082
+ this._line=(new ec).data(s).select(Dt("g.d3plus-Whisker",{parent:this._select}).node()).config(Ft.bind(this)(this._lineConfig,"shape")).render(t);t=this._data.map((t,n)=>{var e={__d3plus__:!0};e.data=t,e.i=n,e.endpoint=this._endpoint(t,n),e.length=this._length(t,n),e.orient=this._orient(t,n);let i=this._x(t,n),a=("left"===e.orient?i-=e.length:"right"===e.orient&&(i+=e.length),this._y(t,n));return"top"===e.orient?a-=e.length:"bottom"===e.orient&&(a+=e.length),e.x=i,e.y=a,e});
2084
2083
  // Draw whisker endpoint.
2085
- return this._whiskerEndpoint=[],Ki().key(t=>t.endpoint).entries(t).forEach(t=>{var n=t.key;this._whiskerEndpoint.push((new ec[n]).data(t.values).select(Dt("g.d3plus-Whisker-Endpoint-"+n,{parent:this._select}).node()).config({height:t=>"top"===t.orient||"bottom"===t.orient?5:20,width:t=>"top"===t.orient||"bottom"===t.orient?20:5}).config(Ft.bind(this)(this._endpointConfig,"shape",n)).render())}),this}
2084
+ return this._whiskerEndpoint=[],Ki().key(t=>t.endpoint).entries(t).forEach(t=>{var n=t.key;this._whiskerEndpoint.push((new ic[n]).data(t.values).select(Dt("g.d3plus-Whisker-Endpoint-"+n,{parent:this._select}).node()).config({height:t=>"top"===t.orient||"bottom"===t.orient?5:20,width:t=>"top"===t.orient||"bottom"===t.orient?20:5}).config(Ft.bind(this)(this._endpointConfig,"shape",n)).render())}),this}
2086
2085
  /**
2087
2086
  @memberof Whisker
2088
2087
  @desc Sets the highlight accessor to the Shape class's active function.
@@ -2161,7 +2160,7 @@ return this._whiskerEndpoint=[],Ki().key(t=>t.endpoint).entries(t).forEach(t=>{v
2161
2160
  @memberof Whisker
2162
2161
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from BaseClass.
2163
2162
  @private
2164
- */constructor(){super(),this._endpoint=p("endpoint","Rect"),this._endpointConfig={Circle:{r:p("r",5)}},this._length=p("length",25),this._lineConfig={},this._orient=p("orient","top"),this._x=p("x",0),this._y=p("y",0)}}let ac={Circle:Qh,Rect:tc};class rc extends Ri{
2163
+ */constructor(){super(),this._endpoint=p("endpoint","Rect"),this._endpointConfig={Circle:{r:p("r",5)}},this._length=p("length",25),this._lineConfig={},this._orient=p("orient","top"),this._x=p("x",0),this._y=p("y",0)}}let rc={Circle:tc,Rect:nc};class oc extends Ri{
2165
2164
  /**
2166
2165
  @memberof Box
2167
2166
  @desc Draws the Box.
@@ -2175,16 +2174,16 @@ a.height=this._rectWidth(a.data,a.i),a.width=t,a.x=a.first+t/2,a.y=this._y(a.dat
2175
2174
  // Compute data for outliers.
2176
2175
  a.values.forEach((t,n)=>{var e,i="vertical"===a.orient?this._y(t,n):this._x(t,n);(i<a.lowerLimit||i>a.upperLimit)&&((e={__d3plus__:!0}).data=t,e.i=n,e.outlier=this._outlier(t,n),"vertical"===a.orient?(e.x=a.x,e.y=i,r.push(e)):"horizontal"===a.orient&&(e.y=a.y,e.x=i,r.push(e)))}),a.__d3plus__=!0,a});
2177
2176
  // Draw box.
2178
- this._box=(new tc).data(t).x(t=>t.x).y(t=>t.y).select(Dt("g.d3plus-Box",{parent:this._select}).node()).config(Ft.bind(this)(this._rectConfig,"shape")).render(),
2177
+ this._box=(new nc).data(t).x(t=>t.x).y(t=>t.y).select(Dt("g.d3plus-Box",{parent:this._select}).node()).config(Ft.bind(this)(this._rectConfig,"shape")).render(),
2179
2178
  // Draw median.
2180
- this._median=(new tc).data(t).x(t=>"vertical"===t.orient?t.x:t.median).y(t=>"vertical"===t.orient?t.median:t.y).height(t=>"vertical"===t.orient?1:t.height).width(t=>"vertical"===t.orient?t.width:1).select(Dt("g.d3plus-Box-Median",{parent:this._select}).node()).config(Ft.bind(this)(this._medianConfig,"shape")).render();
2179
+ this._median=(new nc).data(t).x(t=>"vertical"===t.orient?t.x:t.median).y(t=>"vertical"===t.orient?t.median:t.y).height(t=>"vertical"===t.orient?1:t.height).width(t=>"vertical"===t.orient?t.width:1).select(Dt("g.d3plus-Box-Median",{parent:this._select}).node()).config(Ft.bind(this)(this._medianConfig,"shape")).render();
2181
2180
  // Draw 2 lines using Whisker class.
2182
2181
  // Construct coordinates for whisker startpoints and push it to the whiskerData.
2183
2182
  let l=[];return t.forEach((t,n)=>{var e,i,a=t.x,r=t.y,o=t.first-t.lowerLimit,s=t.upperLimit-t.third;"vertical"===t.orient?(e=r-t.height/2,i=r+t.height/2,l.push({__d3plus__:!0,data:t,i:n,x:a,y:e,length:o,orient:"top"},{__d3plus__:!0,data:t,i:n,x:a,y:i,length:s,orient:"bottom"})):"horizontal"===t.orient&&(e=a+t.width/2,i=a-t.width/2,l.push({__d3plus__:!0,data:t,i:n,x:e,y:r,length:s,orient:"right"},{__d3plus__:!0,data:t,i:n,x:i,y:r,length:o,orient:"left"}))}),
2184
2183
  // Draw whiskers.
2185
- this._whisker=(new ic).data(l).select(Dt("g.d3plus-Box-Whisker",{parent:this._select}).node()).config(Ft.bind(this)(this._whiskerConfig,"shape")).render(),
2184
+ this._whisker=(new ac).data(l).select(Dt("g.d3plus-Box-Whisker",{parent:this._select}).node()).config(Ft.bind(this)(this._whiskerConfig,"shape")).render(),
2186
2185
  // Draw outliers.
2187
- this._whiskerEndpoint=[],Ki().key(t=>t.outlier).entries(r).forEach(t=>{var n=t.key;this._whiskerEndpoint.push((new ac[n]).data(t.values).select(Dt("g.d3plus-Box-Outlier-"+n,{parent:this._select}).node()).config(Ft.bind(this)(this._outlierConfig,"shape",n)).render())}),this}
2186
+ this._whiskerEndpoint=[],Ki().key(t=>t.outlier).entries(r).forEach(t=>{var n=t.key;this._whiskerEndpoint.push((new rc[n]).data(t.values).select(Dt("g.d3plus-Box-Outlier-"+n,{parent:this._select}).node()).config(Ft.bind(this)(this._outlierConfig,"shape",n)).render())}),this}
2188
2187
  /**
2189
2188
  @memberof Box
2190
2189
  @desc Sets the highlight accessor to the Shape class's active function.
@@ -2285,7 +2284,7 @@ this._whiskerEndpoint=[],Ki().key(t=>t.outlier).entries(r).forEach(t=>{var n=t.k
2285
2284
  @memberof Box
2286
2285
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from BaseClass.
2287
2286
  @private
2288
- */constructor(){super(),this._medianConfig={fill:Ot("black")},this._orient=p("orient","vertical"),this._outlier=p("outlier","Circle"),this._outlierConfig={Circle:{r:p("r",5)},Rect:{height:(t,n)=>"vertical"===this._orient(t,n)?5:20,width:(t,n)=>"vertical"===this._orient(t,n)?20:5}},this._rectConfig={fill:Ot("white"),stroke:Ot("black"),strokeWidth:Ot(1)},this._rectWidth=Ot(50),this._whiskerConfig={},this._whiskerMode=["tukey","tukey"],this._x=p("x",250),this._y=p("y",250)}}let oc=class extends Ph{
2287
+ */constructor(){super(),this._medianConfig={fill:Ot("black")},this._orient=p("orient","vertical"),this._outlier=p("outlier","Circle"),this._outlierConfig={Circle:{r:p("r",5)},Rect:{height:(t,n)=>"vertical"===this._orient(t,n)?5:20,width:(t,n)=>"vertical"===this._orient(t,n)?20:5}},this._rectConfig={fill:Ot("white"),stroke:Ot("black"),strokeWidth:Ot(1)},this._rectWidth=Ot(50),this._whiskerConfig={},this._whiskerMode=["tukey","tukey"],this._x=p("x",250),this._y=p("y",250)}}let sc=class extends Lh{
2289
2288
  /**
2290
2289
  @memberof Path
2291
2290
  @desc Given a specific data point and index, returns the aesthetic properties of the shape.
@@ -2313,21 +2312,21 @@ this._whiskerEndpoint=[],Ki().key(t=>t.outlier).entries(r).forEach(t=>{var n=t.k
2313
2312
  @memberof Path
2314
2313
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Shape.
2315
2314
  @private
2316
- */constructor(){super("path"),this._d=p("path"),this._labelBounds=(t,n,e)=>{e=xh(e.points,{angle:this._labelConfig.rotate?this._labelConfig.rotate(t,n):0});return!!e&&{angle:e.angle,width:e.width,height:e.height,x:e.cx-e.width/2,y:e.cy-e.height/2}},this._name="Path",this._labelConfig=Object.assign(this._labelConfig,{textAnchor:"middle",verticalAlign:"middle"})}};var sc=Object.freeze({__proto__:null,Area:Xh,Bar:Jh,Box:rc,Circle:Qh,Image:Nh,Line:nc,Path:oc,Rect:tc,Shape:Ph,Whisker:ic});let lc=pn.theme,uc=t=>t<0||Object.is(t,-0),hc=t=>Math.pow(10,Math.floor(Math.log10(Math.abs(t))))*Math.pow(-1,uc(t)),cc=t=>Math.pow(10,Math.ceil(Math.log10(Math.abs(t))))*Math.pow(-1,uc(t)),gc=t=>{var n,e=""+t;return e.includes("e-")||"0"===e?0:(n=e.match(/(-*[0-9]+\.[0]*)([0-8]+)9{3,}[0-9]+$/))?+(""+n[1]+(+n[2]+1)):(n=e.match(/(-*[0-9]+\.[0]*)([1-9]+)0*[0-9]*0{3,}[0-9]+$/))?+(""+n[1]+ +n[2]):t};
2315
+ */constructor(){super("path"),this._d=p("path"),this._labelBounds=(t,n,e)=>{e=xh(e.points,{angle:this._labelConfig.rotate?this._labelConfig.rotate(t,n):0});return!!e&&{angle:e.angle,width:e.width,height:e.height,x:e.cx-e.width/2,y:e.cy-e.height/2}},this._name="Path",this._labelConfig=Object.assign(this._labelConfig,{textAnchor:"middle",verticalAlign:"middle"})}};var lc=Object.freeze({__proto__:null,Area:Jh,Bar:Qh,Box:oc,Circle:tc,Image:Nh,Line:ec,Path:sc,Rect:nc,Shape:Lh,Whisker:ac});let uc=pn.theme,hc=t=>t<0||Object.is(t,-0),cc=t=>Math.pow(10,Math.floor(Math.log10(Math.abs(t))))*Math.pow(-1,hc(t)),gc=t=>Math.pow(10,Math.ceil(Math.log10(Math.abs(t))))*Math.pow(-1,hc(t)),dc=t=>{var n,e=""+t;return e.includes("e-")||"0"===e?0:(n=e.match(/(-*[0-9]+\.[0]*)([0-8]+)9{3,}[0-9]+$/))?+(""+n[1]+(+n[2]+1)):(n=e.match(/(-*[0-9]+\.[0]*)([1-9]+)0*[0-9]*0{3,}[0-9]+$/))?+(""+n[1]+ +n[2]):t};
2317
2316
  /* catches for -0 and less */
2318
2317
  /**
2319
2318
  * Calculates ticks from a given scale (negative and/or positive)
2320
2319
  * @param {scale} scale A d3-scale object
2321
2320
  * @private
2322
- */function dc(t,e=!1){let i=[];var a=
2321
+ */function fc(t,e=!1){let i=[];var a=
2323
2322
  /**
2324
2323
  * Calculates ticks from a given scale (negative and/or positive)
2325
2324
  * @param {scale} scale A d3-scale object
2326
2325
  * @private
2327
- */function(t,n=!1){var e=ka().domain([200,1200]).range([8,28]),t=t.range(),t=Math.abs(t[1]-t[0]);let i=Math.floor(e(t));return"time"===this._scale&&(i=this._data&&this._data.length?(e=Re(this._data),t=this._data.reduce((t,n,e,i)=>t=e&&(n=Math.abs(n-i[e-1]))<t?n:t,1/0),e=Math.round((e[1]-e[0])/t),Pt([i*(n?2:.5),e])):n?2*i:i/2),Math.floor(i)}.bind(this)(t,e),r=t.domain();let o=r[1]<r[0];if(e||"log"!==this._scale){if(i=t.ticks(a),!e&&!["log","time"].includes(this._scale)&&1<i.length){let e=Math.abs(2*gc(i[1]-i[0]));i=i.filter(t=>{var t=Math.abs(t)%e,n=gc(t);return n!==t?!n||n===e:0==t})}}else{var e=r.map(t=>Math.log10(t)%1==0?t:(o?cc:hc)(t)),s=e[1]<e[0],e=e.map(t=>(uc(t)?-1:1)*([-1,1].includes(t)||Math.abs(t)<1?1:Math.log10(Math.abs(t))));let n=Math.ceil((Math.abs(e[1]-e[0])+1)/(.65*a));i=n<=1&&e[0]===e[1]||s!=o?t.ticks(a).filter(t=>+(""+t).replace("0.","")%2==0):Lt(e[0],e[1],e[1]<e[0]?-1:1).concat([e[1]]).filter(t=>Math.abs(t)%n==0).map(t=>+(""+(uc(t)?-1:1)*(t?Math.pow(10,Math.abs(t)):0<Math.sign(1/t)?1:-1)).replace(/9+/g,"1"))}
2326
+ */function(t,n=!1){var e=ka().domain([200,1200]).range([8,28]),t=t.range(),t=Math.abs(t[1]-t[0]);let i=Math.floor(e(t));return"time"===this._scale&&(i=this._data&&this._data.length?(e=Re(this._data),t=this._data.reduce((t,n,e,i)=>t=e&&(n=Math.abs(n-i[e-1]))<t?n:t,1/0),e=Math.round((e[1]-e[0])/t),Pt([i*(n?2:.5),e])):n?2*i:i/2),Math.floor(i)}.bind(this)(t,e),r=t.domain();let o=r[1]<r[0];if(e||"log"!==this._scale){if(i=t.ticks(a),!e&&!["log","time"].includes(this._scale)&&1<i.length){let e=Math.abs(2*dc(i[1]-i[0]));i=i.filter(t=>{var t=Math.abs(t)%e,n=dc(t);return n!==t?!n||n===e:0==t})}}else{var e=r.map(t=>Math.log10(t)%1==0?t:(o?gc:cc)(t)),s=e[1]<e[0],e=e.map(t=>(hc(t)?-1:1)*([-1,1].includes(t)||Math.abs(t)<1?1:Math.log10(Math.abs(t))));let n=Math.ceil((Math.abs(e[1]-e[0])+1)/(.65*a));i=n<=1&&e[0]===e[1]||s!=o?t.ticks(a).filter(t=>+(""+t).replace("0.","")%2==0):Lt(e[0],e[1],e[1]<e[0]?-1:1).concat([e[1]]).filter(t=>Math.abs(t)%n==0).map(t=>+(""+(hc(t)?-1:1)*(t?Math.pow(10,Math.abs(t)):0<Math.sign(1/t)?1:-1)).replace(/9+/g,"1"))}
2328
2327
  // forces min/max into ticks, if not present
2329
2328
  // for time scale, if data array has been provided, filter out ticks that are not in the array
2330
- if(this._d3ScaleNegative&&uc(r[o?1:0])!==i.some(t=>uc(t))||i.map(Number).includes(+r[0])||i.unshift(r[0]),this._d3ScaleNegative&&uc(r[o?0:1])!==i.some(t=>uc(t))||i.map(Number).includes(+r[1])||i.push(r[1]),"time"===this._scale&&this._data.length){let n=this._data.map(Number);i=i.filter(t=>n.includes(+t))}return i}class fc extends Ri{
2329
+ if(this._d3ScaleNegative&&hc(r[o?1:0])!==i.some(t=>hc(t))||i.map(Number).includes(+r[0])||i.unshift(r[0]),this._d3ScaleNegative&&hc(r[o?0:1])!==i.some(t=>hc(t))||i.map(Number).includes(+r[1])||i.push(r[1]),"time"===this._scale&&this._data.length){let n=this._data.map(Number);i=i.filter(t=>n.includes(+t))}return i}class pc extends Ri{
2331
2330
  /**
2332
2331
  @memberof Axis
2333
2332
  @desc Sets positioning for the axis bar.
@@ -2344,7 +2343,7 @@ if(this._d3ScaleNegative&&uc(r[o?1:0])!==i.some(t=>uc(t))||i.map(Number).include
2344
2343
  @desc Returns a value's scale position, taking into account negative and positive log scales.
2345
2344
  @param {Number|String} *d*
2346
2345
  @private
2347
- */_getPosition(t){return"log"===this._scale?0===t?(this._d3Scale||this._d3ScaleNegative).range()[this._d3Scale?0:1]:(uc(t)?this._d3ScaleNegative||(()=>0):this._d3Scale)(t):this._d3Scale(t)}
2346
+ */_getPosition(t){return"log"===this._scale?0===t?(this._d3Scale||this._d3ScaleNegative).range()[this._d3Scale?0:1]:(hc(t)?this._d3ScaleNegative||(()=>0):this._d3Scale)(t):this._d3Scale(t)}
2348
2347
  /**
2349
2348
  @memberof Axis
2350
2349
  @desc Returns the scale's range, taking into account negative and positive log scales.
@@ -2354,7 +2353,7 @@ if(this._d3ScaleNegative&&uc(r[o?1:0])!==i.some(t=>uc(t))||i.map(Number).include
2354
2353
  @memberof Axis
2355
2354
  @desc Returns the scale's labels, taking into account negative and positive log scales.
2356
2355
  @private
2357
- */_getLabels(){let t=[];if((this._d3ScaleNegative&&(t=t.concat(dc.bind(this)(this._d3ScaleNegative,!1))),this._d3Scale&&(t=t.concat(dc.bind(this)(this._d3Scale,!1))),"log"===this._scale)&&(t.some(t=>uc(t))&&t.some(t=>0<t))){let n=Pt([...this._d3ScaleNegative.domain().map(Math.abs),...this._d3Scale.domain()]);
2356
+ */_getLabels(){let t=[];if((this._d3ScaleNegative&&(t=t.concat(fc.bind(this)(this._d3ScaleNegative,!1))),this._d3Scale&&(t=t.concat(fc.bind(this)(this._d3Scale,!1))),"log"===this._scale)&&(t.some(t=>hc(t))&&t.some(t=>0<t))){let n=Pt([...this._d3ScaleNegative.domain().map(Math.abs),...this._d3Scale.domain()]);
2358
2357
  // add minValue if it does not exist, and should
2359
2358
  t.includes(n)||t.splice(t.findIndex(t=>t>n),0,n),
2360
2359
  // remove -minValue if minValue also exists
@@ -2363,7 +2362,7 @@ t.includes(-n)&&t.includes(n)&&t.splice(t.indexOf(-n),1)}return t}
2363
2362
  @memberof Axis
2364
2363
  @desc Returns the scale's ticks, taking into account negative and positive log scales.
2365
2364
  @private
2366
- */_getTicks(){if(["band","ordinal","point","time"].includes(this._scale)&&this._data.length&&this._data.length<this._width/4)return"time"===this._scale?this._data.map(Bt):this._data;let t=[];return this._d3ScaleNegative&&(t=t.concat(dc.bind(this)(this._d3ScaleNegative,!0))),this._d3Scale&&(t=t.concat(dc.bind(this)(this._d3Scale,!0))),"log"===this._scale&&t.includes(-1)&&t.includes(1)&&t.splice(t.indexOf(-1),1),t}
2365
+ */_getTicks(){if(["band","ordinal","point","time"].includes(this._scale)&&this._data.length&&this._data.length<this._width/4)return"time"===this._scale?this._data.map(Bt):this._data;let t=[];return this._d3ScaleNegative&&(t=t.concat(fc.bind(this)(this._d3ScaleNegative,!0))),this._d3Scale&&(t=t.concat(fc.bind(this)(this._d3Scale,!0))),"log"===this._scale&&t.includes(-1)&&t.includes(1)&&t.splice(t.indexOf(-1),1),t}
2367
2366
  /**
2368
2367
  @memberof Axis
2369
2368
  @desc Sets positioning for the grid lines.
@@ -2404,13 +2403,13 @@ t.includes(-n)&&t.includes(n)&&t.splice(t.indexOf(-n),1)}return t}
2404
2403
  /**
2405
2404
  * Sets up the initial d3 scale, using this._domain and the
2406
2405
  * previously defined range variable.
2407
- */var i="scale"+this._scale.charAt(0).toUpperCase()+this._scale.slice(1);let a=this._domain.slice();if(this._d3Scale=ss[i]().domain("time"===this._scale?a.map(Bt):a).range(x),"none"!==this._rounding&&(i=()=>{var t=t=>{if(e){if(!t)return 0;var n=(""+t).match(/0\.(0*)/);if(n)return+`0.${Array(n[1].length+1).fill(0).join("")}1`}return(""+Math.round(Math.abs(t))).length};let e=a.every(t=>Math.abs(t)<1);var t=[t(a[0]),t(a[1])].filter(Boolean).sort(),n=a.some(t=>uc(t))&&a.some(t=>0<t),n=1===t.length?t[0]:1<t[0]&&t[0]===t[1]?t[0]-1:"outside"!==this._rounding&&n?Nt(t):t[0]+(t[1]-t[0])/2;let i=n<1?gc(n):+("1"+Array(Math.floor(gc(n))-1).fill(0).join(""));i>=Math.abs(a[1]-a[0])&&(i/=2);t=a[1]<a[0],n=[Math["outside"===this._rounding?t?"ceil":"floor":t?"floor":"ceil"](a[0]/i)*i,Math["outside"===this._rounding?t?"floor":"ceil":t?"ceil":"floor"](a[1]/i)*i];"log"===this._scale&&(0===n[0]&&(n[0]=a[0]),0===n[1])&&(n[1]=a[1]),this._d3Scale.domain(n.map(gc))},"linear"===this._scale?i.bind(this)():"log"===this._scale&&(s=[],o=a[1]<a[0],s[0]=("outside"===this._rounding?uc(a[0])?o?hc:cc:o?cc:hc:uc(a[0])?o?cc:hc:o?hc:cc)(a[0]),s[1]=("inside"===this._rounding?uc(a[1])?o?hc:cc:o?cc:hc:uc(a[1])?o?cc:hc:o?hc:cc)(a[1]),r=s[1]<s[0],s[0]!==s[1]&&s.some(t=>10<Math.abs(t))&&r==o?this._d3Scale.domain(s):i.bind(this)())),this._d3Scale.padding&&this._d3Scale.padding(this._scalePadding),this._d3Scale.paddingInner&&this._d3Scale.paddingInner(this._paddingInner),this._d3Scale.paddingOuter&&this._d3Scale.paddingOuter(this._paddingOuter)
2406
+ */var i="scale"+this._scale.charAt(0).toUpperCase()+this._scale.slice(1);let a=this._domain.slice();if(this._d3Scale=ss[i]().domain("time"===this._scale?a.map(Bt):a).range(x),"none"!==this._rounding&&(i=()=>{var t=t=>{if(e){if(!t)return 0;var n=(""+t).match(/0\.(0*)/);if(n)return+`0.${Array(n[1].length+1).fill(0).join("")}1`}return(""+Math.round(Math.abs(t))).length};let e=a.every(t=>Math.abs(t)<1);var t=[t(a[0]),t(a[1])].filter(Boolean).sort(),n=a.some(t=>hc(t))&&a.some(t=>0<t),n=1===t.length?t[0]:1<t[0]&&t[0]===t[1]?t[0]-1:"outside"!==this._rounding&&n?Nt(t):t[0]+(t[1]-t[0])/2;let i=n<1?dc(n):+("1"+Array(Math.floor(dc(n))-1).fill(0).join(""));i>=Math.abs(a[1]-a[0])&&(i/=2);t=a[1]<a[0],n=[Math["outside"===this._rounding?t?"ceil":"floor":t?"floor":"ceil"](a[0]/i)*i,Math["outside"===this._rounding?t?"floor":"ceil":t?"ceil":"floor"](a[1]/i)*i];"log"===this._scale&&(0===n[0]&&(n[0]=a[0]),0===n[1])&&(n[1]=a[1]),this._d3Scale.domain(n.map(dc))},"linear"===this._scale?i.bind(this)():"log"===this._scale&&(s=[],o=a[1]<a[0],s[0]=("outside"===this._rounding?hc(a[0])?o?cc:gc:o?gc:cc:hc(a[0])?o?gc:cc:o?cc:gc)(a[0]),s[1]=("inside"===this._rounding?hc(a[1])?o?cc:gc:o?gc:cc:hc(a[1])?o?gc:cc:o?cc:gc)(a[1]),r=s[1]<s[0],s[0]!==s[1]&&s.some(t=>10<Math.abs(t))&&r==o?this._d3Scale.domain(s):i.bind(this)())),this._d3Scale.padding&&this._d3Scale.padding(this._scalePadding),this._d3Scale.paddingInner&&this._d3Scale.paddingInner(this._paddingInner),this._d3Scale.paddingOuter&&this._d3Scale.paddingOuter(this._paddingOuter)
2408
2407
  /**
2409
2408
  * Constructs a separate "negative only" scale for logarithmic
2410
2409
  * domains, as they cannot pass zero.
2411
- */,this._d3ScaleNegative=null,"log"===this._scale){var r=this._d3Scale.domain();0===r[0]?(o=Pt([Pt(this._data),Math.abs(r[1])]),r[0]=0===o||1===o?1e-6:o<=1?hc(o):1,uc(r[1])&&(r[0]*=-1)):0===r[r.length-1]&&(s=Pt([Pt(this._data),Math.abs(r[0])]),r[r.length-1]=0===s||1===s?1e-6:s<=1?hc(s):1,uc(r[0]))&&(r[r.length-1]*=-1);let e=this._d3Scale.range();
2410
+ */,this._d3ScaleNegative=null,"log"===this._scale){var r=this._d3Scale.domain();0===r[0]?(o=Pt([Pt(this._data),Math.abs(r[1])]),r[0]=0===o||1===o?1e-6:o<=1?cc(o):1,hc(r[1])&&(r[0]*=-1)):0===r[r.length-1]&&(s=Pt([Pt(this._data),Math.abs(r[0])]),r[r.length-1]=0===s||1===s?1e-6:s<=1?cc(s):1,hc(r[0]))&&(r[r.length-1]*=-1);let e=this._d3Scale.range();
2412
2411
  // all negatives
2413
- if(uc(r[0])&&uc(r[r.length-1]))this._d3ScaleNegative=this._d3Scale.copy().domain(r).range(e),this._d3Scale=null;else if(0<r[0]&&0<r[r.length-1])this._d3Scale.domain(r).range(e);else{var i=r.map(t=>Math.log10(Math.abs(t))).map(t=>t||-1e-6),o=i[0]/ai(i)*(e[1]-e[0]);let t=Pt([Pt(this._data.filter(t=>0<=t)),Math.abs(r[1])]),n=(1===t&&(t=1e-6),Pt([Pt(this._data.filter(uc)),Math.abs(r[0])]));1===n&&(n=1e-6);var s=0===t?1e-6:t<=1?hc(t):1,i=0===n?-1e-6:n<=1?hc(n):1,s=Pt([Math.abs(s),Math.abs(i)]);this._d3ScaleNegative=this._d3Scale.copy(),(uc(r[0])?this._d3Scale:this._d3ScaleNegative).domain([uc(r[0])?s:-s,r[1]]).range([e[0]+o,e[1]]),(uc(r[0])?this._d3ScaleNegative:this._d3Scale).domain([r[0],uc(r[0])?-s:s]).range([e[0],e[0]+o])}}
2412
+ if(hc(r[0])&&hc(r[r.length-1]))this._d3ScaleNegative=this._d3Scale.copy().domain(r).range(e),this._d3Scale=null;else if(0<r[0]&&0<r[r.length-1])this._d3Scale.domain(r).range(e);else{var i=r.map(t=>Math.log10(Math.abs(t))).map(t=>t||-1e-6),o=i[0]/ai(i)*(e[1]-e[0]);let t=Pt([Pt(this._data.filter(t=>0<=t)),Math.abs(r[1])]),n=(1===t&&(t=1e-6),Pt([Pt(this._data.filter(hc)),Math.abs(r[0])]));1===n&&(n=1e-6);var s=0===t?1e-6:t<=1?cc(t):1,i=0===n?-1e-6:n<=1?cc(n):1,s=Pt([Math.abs(s),Math.abs(i)]);this._d3ScaleNegative=this._d3Scale.copy(),(hc(r[0])?this._d3Scale:this._d3ScaleNegative).domain([hc(r[0])?s:-s,r[1]]).range([e[0]+o,e[1]]),(hc(r[0])?this._d3ScaleNegative:this._d3Scale).domain([r[0],hc(r[0])?-s:s]).range([e[0],e[0]+o])}}
2414
2413
  /**
2415
2414
  * Determines the of values array to use
2416
2415
  * for the "ticks" and the "labels"
@@ -2437,7 +2436,7 @@ if(uc(r[0])&&uc(r[r.length-1]))this._d3ScaleNegative=this._d3Scale.copy().domain
2437
2436
  /**
2438
2437
  * "spillover" will contain the pixel spillover of the first and last label,
2439
2438
  * and then adjust the scale range accordingly.
2440
- */,[0,1].map(t=>{var n,e,i,a=k[t?k.length-1:0];return!a||({height:a,position:n,rotate:i,width:e}=a,t=t?m[1]:m[0],i=(i||!d?a:e)/2,Math.abs(n-t)>=i)?0:Math.abs(i-(n-t))})),[E,z]=x,M=[E+M[0],z-M[1]];this._range&&(void 0!==this._range[0]&&(M[0]=this._range[0]),void 0!==this._range[this._range.length-1])&&(M[1]=this._range[this._range.length-1]),M[0]===E&&M[1]===z||(s.bind(this)(M),u.bind(this)(A?2:1));let T=Nt(k,t=>t.height)||0,B=(this._labelRotation=d&&void 0===this._labelRotation?k.some(t=>{var{i:t,height:n,position:e,truncated:i}=t,a=k[t-1];return i||t&&a.position+a.height/2>e-n/2}):this._labelRotation,this._labelOffset?Nt(k,t=>t.offset||0):0);k.forEach(t=>t.offset=t.offset?B:0);E="Line"===this._shape?0:C;let D=this._outerBounds={[h]:(Nt(k,t=>Math.ceil(t[t.rotate||!d?"width":"height"]+t.offset))||0)+(k.length?_:0),[n]:m[m.length-1]-m[0],[c]:m[0]};D[h]=Nt([this._minSize,D[h]]),v[this._orient]+=C,v[f]=void 0!==this._gridSize?Nt([this._gridSize,E]):this["_"+h]-v[this._orient]-D[h]-_,D[h]+=v[f]+v[this._orient],D[g]="start"===this._align?this._padding:"end"===this._align?this["_"+h]-D[h]-this._padding:this["_"+h]/2-D[h]/2;z=Dt("g#d3plus-Axis-"+this._uuid,{parent:i}),M=Dt("g.grid",{parent:this._group=z}).selectAll("line").data((0!==this._gridSize?this._grid||"log"===this._scale&&!this._gridLog?b:w:[]).map(t=>({id:t})),t=>t.id),M.exit().transition(a).attr("opacity",0).call(this._gridPosition.bind(this)).remove(),M.enter().append("line").attr("opacity",0).attr("clip-path",`url(#${e})`).call(this._gridPosition.bind(this),!0).merge(M).transition(a).attr("opacity",1).call(this._gridPosition.bind(this)),A=b.filter((t,n)=>k[n].lines.length&&!w.includes(t));let N=k.some(t=>t.rotate),P=w.concat(A).map(n=>{var t=k.find(t=>t.d===n),e=this._getPosition(n),i=t?t.space:0,a=t?t.lines.length:1,r=t?t.lineHeight:1,o=t?t.fP:0,s=t&&this._labelOffset?t.offset:0,l=d?i:D.width-v[this._position.opposite]-C-v[this._orient]+_,u=v[f],s=(C+s)*(p?-1:1),u=p?D[g]+D[h]-u:D[g]+u;return{id:n,labelBounds:N&&t?{x:-t.width/2+t.fS/4,y:"bottom"===this._orient?s+(t.width-r*a)/2+o:2*s-(t.width+r*a)/2+o,width:t.width,height:t.height}:{x:d?-i/2:"left"===this._orient?-l-_+s:s+_,y:d?"bottom"===this._orient?s+o:s-T-o:-i/2,width:d?i:l,height:d?T:i},rotate:!!t&&t.rotate,size:b.includes(n)||"log"===this._scale&&Math.log10(Math.abs(n))%1==0?s:w.includes(n)?Math.ceil(s/2):this._data.find(t=>+t===n)?Math.ceil(s/4):0,text:!((t||{}).truncated||!b.includes(n))&&S(n),tick:w.includes(n),[c]:e+("band"===this._scale?this._d3Scale.bandwidth()/2:0),[g]:u}});"Line"===this._shape&&(P=P.concat(P.map(t=>{var n=Object.assign({},t);return n[g]+=t.size,n}))),(new sc[this._shape]).data(P).duration(this._duration).labelConfig({ellipsis:t=>t&&t.length?t+"...":"",rotate:t=>t.rotate?-90:0}).select(Dt("g.ticks",{parent:z}).node()).config(Ft.bind(this)(this._shapeConfig)).labelConfig({padding:0}).render();E=z.selectAll("line.bar").data([null]);return E.enter().append("line").attr("class","bar").attr("opacity",0).call(this._barPosition.bind(this)).merge(E).transition(a).attr("opacity",1).call(this._barPosition.bind(this)),this._titleClass.data(this._title?[{text:this._title}]:[]).duration(this._duration).height(v[this._orient]).rotate("left"===this._orient?-90:"right"===this._orient?90:0).select(Dt("g.d3plus-Axis-title",{parent:z}).node()).text(t=>t.text).verticalAlign("middle").width(x[x.length-1]-x[0]).x(d?x[0]:"left"===this._orient?D.x+v.left/2-(x[x.length-1]-x[0])/2:D.x+D.width-v.right/2-(x[x.length-1]-x[0])/2).y(d?"bottom"===this._orient?D.y+D.height-v.bottom:D.y:x[0]+(x[x.length-1]-x[0])/2-v[this._orient]/2).config(Ft.bind(this)(this._titleConfig)).render(),this._lastScale=this._getPosition.bind(this),t&&setTimeout(t,this._duration+100),this}
2439
+ */,[0,1].map(t=>{var n,e,i,a=k[t?k.length-1:0];return!a||({height:a,position:n,rotate:i,width:e}=a,t=t?m[1]:m[0],i=(i||!d?a:e)/2,Math.abs(n-t)>=i)?0:Math.abs(i-(n-t))})),[E,z]=x,M=[E+M[0],z-M[1]];this._range&&(void 0!==this._range[0]&&(M[0]=this._range[0]),void 0!==this._range[this._range.length-1])&&(M[1]=this._range[this._range.length-1]),M[0]===E&&M[1]===z||(s.bind(this)(M),u.bind(this)(A?2:1));let T=Nt(k,t=>t.height)||0,B=(this._labelRotation=d&&void 0===this._labelRotation?k.some(t=>{var{i:t,height:n,position:e,truncated:i}=t,a=k[t-1];return i||t&&a.position+a.height/2>e-n/2}):this._labelRotation,this._labelOffset?Nt(k,t=>t.offset||0):0);k.forEach(t=>t.offset=t.offset?B:0);E="Line"===this._shape?0:C;let D=this._outerBounds={[h]:(Nt(k,t=>Math.ceil(t[t.rotate||!d?"width":"height"]+t.offset))||0)+(k.length?_:0),[n]:m[m.length-1]-m[0],[c]:m[0]};D[h]=Nt([this._minSize,D[h]]),v[this._orient]+=C,v[f]=void 0!==this._gridSize?Nt([this._gridSize,E]):this["_"+h]-v[this._orient]-D[h]-_,D[h]+=v[f]+v[this._orient],D[g]="start"===this._align?this._padding:"end"===this._align?this["_"+h]-D[h]-this._padding:this["_"+h]/2-D[h]/2;z=Dt("g#d3plus-Axis-"+this._uuid,{parent:i}),M=Dt("g.grid",{parent:this._group=z}).selectAll("line").data((0!==this._gridSize?this._grid||"log"===this._scale&&!this._gridLog?b:w:[]).map(t=>({id:t})),t=>t.id),M.exit().transition(a).attr("opacity",0).call(this._gridPosition.bind(this)).remove(),M.enter().append("line").attr("opacity",0).attr("clip-path",`url(#${e})`).call(this._gridPosition.bind(this),!0).merge(M).transition(a).attr("opacity",1).call(this._gridPosition.bind(this)),A=b.filter((t,n)=>k[n].lines.length&&!w.includes(t));let N=k.some(t=>t.rotate),P=w.concat(A).map(n=>{var t=k.find(t=>t.d===n),e=this._getPosition(n),i=t?t.space:0,a=t?t.lines.length:1,r=t?t.lineHeight:1,o=t?t.fP:0,s=t&&this._labelOffset?t.offset:0,l=d?i:D.width-v[this._position.opposite]-C-v[this._orient]+_,u=v[f],s=(C+s)*(p?-1:1),u=p?D[g]+D[h]-u:D[g]+u;return{id:n,labelBounds:N&&t?{x:-t.width/2+t.fS/4,y:"bottom"===this._orient?s+(t.width-r*a)/2+o:2*s-(t.width+r*a)/2+o,width:t.width,height:t.height}:{x:d?-i/2:"left"===this._orient?-l-_+s:s+_,y:d?"bottom"===this._orient?s+o:s-T-o:-i/2,width:d?i:l,height:d?T:i},rotate:!!t&&t.rotate,size:b.includes(n)||"log"===this._scale&&Math.log10(Math.abs(n))%1==0?s:w.includes(n)?Math.ceil(s/2):this._data.find(t=>+t===n)?Math.ceil(s/4):0,text:!((t||{}).truncated||!b.includes(n))&&S(n),tick:w.includes(n),[c]:e+("band"===this._scale?this._d3Scale.bandwidth()/2:0),[g]:u}});"Line"===this._shape&&(P=P.concat(P.map(t=>{var n=Object.assign({},t);return n[g]+=t.size,n}))),(new lc[this._shape]).data(P).duration(this._duration).labelConfig({ellipsis:t=>t&&t.length?t+"...":"",rotate:t=>t.rotate?-90:0}).select(Dt("g.ticks",{parent:z}).node()).config(Ft.bind(this)(this._shapeConfig)).labelConfig({padding:0}).render();E=z.selectAll("line.bar").data([null]);return E.enter().append("line").attr("class","bar").attr("opacity",0).call(this._barPosition.bind(this)).merge(E).transition(a).attr("opacity",1).call(this._barPosition.bind(this)),this._titleClass.data(this._title?[{text:this._title}]:[]).duration(this._duration).height(v[this._orient]).rotate("left"===this._orient?-90:"right"===this._orient?90:0).select(Dt("g.d3plus-Axis-title",{parent:z}).node()).text(t=>t.text).verticalAlign("middle").width(x[x.length-1]-x[0]).x(d?x[0]:"left"===this._orient?D.x+v.left/2-(x[x.length-1]-x[0])/2:D.x+D.width-v.right/2-(x[x.length-1]-x[0])/2).y(d?"bottom"===this._orient?D.y+D.height-v.bottom:D.y:x[0]+(x[x.length-1]-x[0])/2-v[this._orient]/2).config(Ft.bind(this)(this._titleConfig)).render(),this._lastScale=this._getPosition.bind(this),t&&setTimeout(t,this._duration+100),this}
2441
2440
  /**
2442
2441
  @memberof Axis
2443
2442
  @desc If *value* is specified, sets the horizontal alignment to the specified value and returns the current class instance.
@@ -2676,27 +2675,27 @@ if(uc(r[0])&&uc(r[r.length-1]))this._d3ScaleNegative=this._d3Scale.copy().domain
2676
2675
  @memberof Axis
2677
2676
  @desc Invoked when creating a new class instance, and sets any default parameters.
2678
2677
  @private
2679
- */constructor(){super(),this._align="middle",this._barConfig={stroke:lc.colors.gray[600],"stroke-width":1},this._data=[],this._domain=[0,10],this._duration=600,this._gridConfig={stroke:mu.light,"stroke-width":1},this._gridLog=!1,this._height=400,this._labelOffset=!1,this._labelRotation=!1,this.orient("bottom"),this._outerBounds={width:0,height:0,x:0,y:0},this._padding=5,this._paddingInner=.1,this._paddingOuter=.1,this._rounding="none",this._roundingInsideMinPrefix="< ",this._roundingInsideMinSuffix="",this._roundingInsideMaxPrefix="",this._roundingInsideMaxSuffix="+",this._scale="linear",this._scalePadding=.5,this._shape="Line",this._shapeConfig={fill:lc.colors.gray[600],height:t=>t.tick?8:0,label:t=>t.text,labelBounds:t=>t.labelBounds,labelConfig:{fontColor:lc.colors.gray[600],fontResize:!1,fontSize:Ot(12),padding:5,textAnchor:()=>{var t=Si(this._select.node());return"left"===this._orient?t?"start":"end":"right"===this._orient?t?"end":"start":this._labelRotation?"bottom"===this._orient?"end":"start":"middle"},verticalAlign:()=>"bottom"===this._orient?"top":"top"===this._orient?"bottom":"middle"},r:t=>t.tick?4:0,stroke:lc.colors.gray[600],strokeWidth:1,width:t=>t.tick?8:0},this._tickSize=8,this._tickSuffix="normal",this._tickUnit=0,this._timeLocale=void 0,this._titleClass=new Sc,this._titleConfig={fontColor:mu.dark,fontSize:12,textAnchor:"middle"},this._width=400}}class pc extends fc{
2678
+ */constructor(){super(),this._align="middle",this._barConfig={stroke:uc.colors.gray[600],"stroke-width":1},this._data=[],this._domain=[0,10],this._duration=600,this._gridConfig={stroke:mu.light,"stroke-width":1},this._gridLog=!1,this._height=400,this._labelOffset=!1,this._labelRotation=!1,this.orient("bottom"),this._outerBounds={width:0,height:0,x:0,y:0},this._padding=5,this._paddingInner=.1,this._paddingOuter=.1,this._rounding="none",this._roundingInsideMinPrefix="< ",this._roundingInsideMinSuffix="",this._roundingInsideMaxPrefix="",this._roundingInsideMaxSuffix="+",this._scale="linear",this._scalePadding=.5,this._shape="Line",this._shapeConfig={fill:uc.colors.gray[600],height:t=>t.tick?8:0,label:t=>t.text,labelBounds:t=>t.labelBounds,labelConfig:{fontColor:uc.colors.gray[600],fontResize:!1,fontSize:Ot(12),padding:5,textAnchor:()=>{var t=Si(this._select.node());return"left"===this._orient?t?"start":"end":"right"===this._orient?t?"end":"start":this._labelRotation?"bottom"===this._orient?"end":"start":"middle"},verticalAlign:()=>"bottom"===this._orient?"top":"top"===this._orient?"bottom":"middle"},r:t=>t.tick?4:0,stroke:uc.colors.gray[600],strokeWidth:1,width:t=>t.tick?8:0},this._tickSize=8,this._tickSuffix="normal",this._tickUnit=0,this._timeLocale=void 0,this._titleClass=new Cc,this._titleConfig={fontColor:mu.dark,fontSize:12,textAnchor:"middle"},this._width=400}}class _c extends pc{
2680
2679
  /**
2681
2680
  @memberof AxisBottom
2682
2681
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Axis.
2683
2682
  @private
2684
- */constructor(){super(),this.orient("bottom")}}class _c extends fc{
2683
+ */constructor(){super(),this.orient("bottom")}}class mc extends pc{
2685
2684
  /**
2686
2685
  @memberof AxisLeft
2687
2686
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Axis.
2688
2687
  @private
2689
- */constructor(){super(),this.orient("left")}}class mc extends fc{
2688
+ */constructor(){super(),this.orient("left")}}class yc extends pc{
2690
2689
  /**
2691
2690
  @memberof AxisRight
2692
2691
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Axis.
2693
2692
  @private
2694
- */constructor(){super(),this.orient("right")}}class yc extends fc{
2693
+ */constructor(){super(),this.orient("right")}}class vc extends pc{
2695
2694
  /**
2696
2695
  @memberof AxisTop
2697
2696
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Axis.
2698
2697
  @private
2699
- */constructor(){super(),this.orient("top")}}class vc extends Ri{_fetchConfig(t,n,e){var i=(void 0!==this._shapeConfig[t]?this._shapeConfig:this._shapeConfig.labelConfig)[t];return i||"lineHeight"!==t?"function"==typeof i?i(n,e):i:1.4*this._fetchConfig("fontSize",n,e)}_rowHeight(t){return Nt(t.map(t=>t.height).concat(t.map(t=>t.shapeHeight)))+this._padding}_rowWidth(e){return ai(e.map((t,n)=>{n=this._padding*(n===e.length-1?0:t.width?2:1);return t.shapeWidth+t.width+n}))}
2698
+ */constructor(){super(),this.orient("top")}}class bc extends Ri{_fetchConfig(t,n,e){var i=(void 0!==this._shapeConfig[t]?this._shapeConfig:this._shapeConfig.labelConfig)[t];return i||"lineHeight"!==t?"function"==typeof i?i(n,e):i:1.4*this._fetchConfig("fontSize",n,e)}_rowHeight(t){return Nt(t.map(t=>t.height).concat(t.map(t=>t.shapeHeight)))+this._padding}_rowWidth(e){return ai(e.map((t,n)=>{n=this._padding*(n===e.length-1?0:t.width?2:1);return t.shapeWidth+t.width+n}))}
2700
2699
  /**
2701
2700
  @memberof Legend
2702
2701
  @desc Renders the current Legend to the page. If a *callback* is specified, it will be called once the legend is done drawing.
@@ -2708,7 +2707,7 @@ this._group=Dt("g.d3plus-Legend",{parent:this._select}),this._titleGroup=Dt("g.d
2708
2707
  // Calculate Text Sizes
2709
2708
  this._lineData=this._data.map((i,a)=>{var r=this._label(i,a),o=this._shape(i,a),s=this._fetchConfig("r",i,a);let l={data:i,i:a,id:this._id(i,a),shape:o,shapeR:s,shapeWidth:"Circle"===o?2*s:this._fetchConfig("width",i,a),shapeHeight:"Circle"===o?2*s:this._fetchConfig("height",i,a),y:0};if(r){let n=this._fetchConfig("fontFamily",i,a),t=this._fetchConfig("lineHeight",i,a),e=this._fetchConfig("fontSize",i,a);o=u-(this._data.length+1)*this._padding,s=this._width,i=gi().fontFamily(n).fontSize(e).lineHeight(t).width(s).height(o)(r);(l=Object.assign(l,i)).width=Math.ceil(Nt(l.lines.map(t=>Ae(t,{"font-family":n,"font-size":e}))))+10,l.height=Math.ceil(l.lines.length*(t+1)),l.og={height:l.height,width:l.width},l.f=n,l.s=e,l.lh=t}else l.sentence=!1,l.words=[],l.height=0,l.width=0;return l});let i,l=this._width-2*this._padding;if(i=this._rowWidth(this._lineData),"column"===this._direction||i>l){let o=1,s=[],t=Nt(this._lineData.map(t=>t.words.length));if(this._wrapLines=function(){if(!(++o>t)){var i=1===o?this._lineData.slice():this._lineData.filter(t=>t.width+t.shapeWidth+this._padding*(t.width?2:1)>l&&t.words.length>=o).sort((t,n)=>n.sentence.length-t.sentence.length);if(i.length&&u>i[0].height*o){let e=!1;for(let t=0;t<i.length;t++){let n=i[t];var a=n.og.height*o,r=n.og.width*(1/o*1.5),r=gi().fontFamily(n.f).fontSize(n.s).lineHeight(n.lh).width(r).height(a)(n.sentence);if(r.truncated){e=!0;break}n.width=Math.ceil(Nt(r.lines.map(t=>Ae(t,{"font-family":n.f,"font-size":n.s}))))+n.s,n.height=r.lines.length*(n.lh+1)}e||this._wrapRows()}else s=[]}},this._wrapRows=function(){s=[];let n=1,e=0;for(let t=0;t<this._lineData.length;t++){var i=this._lineData[t],a=i.width+this._padding*(i.width?2:1)+i.shapeWidth;if(ai(s.map(t=>Nt(t,t=>Nt([t.height,t.shapeHeight]))))>u){s=[];break}if(a>l){s=[],this._wrapLines();break}e+a<l?e+=a:"column"!==this._direction&&(e=a,n++),s[n-1]||(s[n-1]=[]),s[n-1].push(i),"column"===this._direction&&(e=0,n++)}},this._wrapRows(),!s.length||ai(s,this._rowHeight.bind(this))+this._padding>u){i=ai(this._lineData.map(t=>t.shapeWidth+this._padding))-this._padding;for(let t=0;t<this._lineData.length;t++)this._lineData[t].width=0,this._lineData[t].height=0;this._wrapRows()}s.length&&ai(s,this._rowHeight.bind(this))+this._padding<u&&(s.forEach((t,n)=>{t.forEach(t=>{n&&(t.y=ai(s.slice(0,n),this._rowHeight.bind(this)))})}),i=Nt(s,this._rowWidth.bind(this)))}e=Nt(this._lineData,(t,n)=>Nt([t.height,this._fetchConfig("height",t.data,n)])+t.y)+this._titleHeight,n=Nt([i,this._titleWidth]);this._outerBounds.width=n,this._outerBounds.height=e;let a=this._padding,r=this._padding,o=("center"===this._align?a=(this._width-n)/2:"right"===this._align&&(a=this._width-this._padding-n),"middle"===this._verticalAlign?r=(this._height-e)/2:"bottom"===this._verticalAlign&&(r=this._height-this._padding-e),this._outerBounds.x=a,this._outerBounds.y=r,this._titleClass.data(this._title?[{text:this._title}]:[]).duration(this._duration).select(this._titleGroup.node()).textAnchor({left:"start",center:"middle",right:"end"}[this._align]).width(this._width-2*this._padding).x(this._padding).y(this._outerBounds.y).config(this._titleConfig).render(),this._shapes=[],Ft.bind(this)(this._shapeConfig,"legend")),s={id:t=>t.id,label:t=>t.label,lineHeight:t=>t.lH},h=this._data.map((t,n)=>({__d3plus__:!0,data:t,i:n,id:this._id(t,n),label:!!this._lineData[n].width&&this._label(t,n),lH:this._fetchConfig("lineHeight",t,n),shape:this._shape(t,n)}));
2710
2709
  // Legend Shapes
2711
- return this._shapes=[],["Circle","Rect"].forEach(n=>{this._shapes.push((new sc[n]).parent(this).data(h.filter(t=>t.shape===n)).duration(this._duration).labelConfig({padding:0}).select(this._shapeGroup.node()).verticalAlign("top").config(Tt({},o,s)).render())}),t&&setTimeout(t,this._duration+100),this}
2710
+ return this._shapes=[],["Circle","Rect"].forEach(n=>{this._shapes.push((new lc[n]).parent(this).data(h.filter(t=>t.shape===n)).duration(this._duration).labelConfig({padding:0}).select(this._shapeGroup.node()).verticalAlign("top").config(Tt({},o,s)).render())}),t&&setTimeout(t,this._duration+100),this}
2712
2711
  /**
2713
2712
  @memberof Legend
2714
2713
  @desc If *value* is specified, sets the active method for all shapes to the specified function and returns the current class instance. If *value* is not specified, returns the current active method.
@@ -2825,7 +2824,7 @@ return this._shapes=[],["Circle","Rect"].forEach(n=>{this._shapes.push((new sc[n
2825
2824
  @memberof Legend
2826
2825
  @desc Invoked when creating a new class instance, and sets any default parameters.
2827
2826
  @private
2828
- */constructor(){super(),this._titleClass=new Sc,this._align="center",this._data=[],this._direction="row",this._duration=600,this._height=200,this._id=p("id"),this._label=p("id"),this._lineData=[],this._outerBounds={width:0,height:0,x:0,y:0},this._padding=5,this._shape=Ot("Rect"),this._shapes=[],this._shapeConfig={fill:p("color"),height:Ot(12),hitArea:(t,n)=>{var n=this._lineData[n],e=Nt([n.height,n.shapeHeight]);return{width:n.width+n.shapeWidth,height:e,x:-n.shapeWidth/2,y:-e/2}},labelBounds:(t,n)=>{n=this._lineData[n];let e=n.shapeWidth/2;"Circle"===n.shape&&(e-=n.shapeR/2);var i=Nt([n.shapeHeight,n.height]),a=this._rtl?n.shapeWidth+n.width+2*this._padding:0;return{width:n.width,height:i,x:e+5-a,y:-i/2}},labelConfig:{fontColor:Ot(mu.dark),fontFamily:this._titleClass.fontFamily(),fontResize:!1,fontSize:Ot(10),verticalAlign:"middle"},opacity:1,r:Ot(6),width:Ot(12),x:(t,n)=>{var e=this._lineData[n];let i=e.y;var a="left"===this._align||"right"===this._align&&"column"===this._direction?0:"center"===this._align?(this._outerBounds.width-this._rowWidth(this._lineData.filter(t=>i===t.y)))/2:this._outerBounds.width-this._rowWidth(this._lineData.filter(t=>i===t.y)),n=this._lineData.slice(0,n).filter(t=>i===t.y),r=this._rtl?e.width+this._padding:0;return this._rowWidth(n)+this._padding*(n.length?e.sentence?2:1:0)+this._outerBounds.x+e.shapeWidth/2+a+r},y:(t,n)=>{let e=this._lineData[n];return e.y+this._titleHeight+this._outerBounds.y+Nt(this._lineData.filter(t=>e.y===t.y).map(t=>t.height).concat(this._data.map((t,n)=>this._fetchConfig("height",t,n))))/2}},this._titleConfig={fontSize:12},this._verticalAlign="middle",this._width=400}}class bc extends Ri{
2827
+ */constructor(){super(),this._titleClass=new Cc,this._align="center",this._data=[],this._direction="row",this._duration=600,this._height=200,this._id=p("id"),this._label=p("id"),this._lineData=[],this._outerBounds={width:0,height:0,x:0,y:0},this._padding=5,this._shape=Ot("Rect"),this._shapes=[],this._shapeConfig={fill:p("color"),height:Ot(12),hitArea:(t,n)=>{var n=this._lineData[n],e=Nt([n.height,n.shapeHeight]);return{width:n.width+n.shapeWidth,height:e,x:-n.shapeWidth/2,y:-e/2}},labelBounds:(t,n)=>{n=this._lineData[n];let e=n.shapeWidth/2;"Circle"===n.shape&&(e-=n.shapeR/2);var i=Nt([n.shapeHeight,n.height]),a=this._rtl?n.shapeWidth+n.width+2*this._padding:0;return{width:n.width,height:i,x:e+5-a,y:-i/2}},labelConfig:{fontColor:Ot(mu.dark),fontFamily:this._titleClass.fontFamily(),fontResize:!1,fontSize:Ot(10),verticalAlign:"middle"},opacity:1,r:Ot(6),width:Ot(12),x:(t,n)=>{var e=this._lineData[n];let i=e.y;var a="left"===this._align||"right"===this._align&&"column"===this._direction?0:"center"===this._align?(this._outerBounds.width-this._rowWidth(this._lineData.filter(t=>i===t.y)))/2:this._outerBounds.width-this._rowWidth(this._lineData.filter(t=>i===t.y)),n=this._lineData.slice(0,n).filter(t=>i===t.y),r=this._rtl?e.width+this._padding:0;return this._rowWidth(n)+this._padding*(n.length?e.sentence?2:1:0)+this._outerBounds.x+e.shapeWidth/2+a+r},y:(t,n)=>{let e=this._lineData[n];return e.y+this._titleHeight+this._outerBounds.y+Nt(this._lineData.filter(t=>e.y===t.y).map(t=>t.height).concat(this._data.map((t,n)=>this._fetchConfig("height",t,n))))/2}},this._titleConfig={fontSize:12},this._verticalAlign="middle",this._width=400}}class xc extends Ri{
2829
2828
  /**
2830
2829
  @memberof ColorScale
2831
2830
  @desc Renders the current ColorScale to the page. If a *callback* is specified, it will be called once the ColorScale is done drawing.
@@ -3016,7 +3015,7 @@ this._group=Dt("g.d3plus-ColorScale",{parent:this._select});let i=this._data.map
3016
3015
  @memberof ColorScale
3017
3016
  @desc Invoked when creating a new class instance, and sets any default parameters.
3018
3017
  @private
3019
- */constructor(){super(),this._axisClass=new fc,this._axisConfig={gridSize:0},this._axisTest=new fc,this._align="middle",this._buckets=5,this._bucketAxis=!1,this._bucketFormat=(n,t,e,i)=>{var a=this._axisConfig.tickFormat||kh;let r=e[t+1];var o=!!t&&e[t-1],e=t===e.length-1;return n===r||e?(e=e&&n<Nt(i)?"+":"",a(n)+e):(e=1<=(e=r?r/100:n/100)||e<=-1?Math.round(e).toString().length-1:-1*e.toString().split(".")[1].replace(/([1-9])[1-9].*$/,"$1").length,e=Math.pow(10,e),o=a(o===n&&1===t?Pt([n+e,i.find(t=>n<t&&t<r)]):n),a=a(n&&1===t?r:Nt([r-e,i.reverse().find(t=>n<t&&t<r)])),this._bucketJoiner(o,a))},this._bucketJoiner=(t,n)=>t!==n?t+" - "+n:""+t,this._centered=!0,this._color=["#54478C","#2C699A","#0DB39E","#83E377","#EFEA5A"],this._colorMax=mu.on,this._colorMid=mu.light,this._colorMin=mu.off,this._data=[],this._duration=600,this._height=200,this._labelClass=new Sc,this._labelConfig={fontColor:mu.dark,fontSize:12},this._legendClass=new vc,this._legendConfig={shapeConfig:{stroke:mu.dark,strokeWidth:1}},this._midpoint=0,this._orient="bottom",this._outerBounds={width:0,height:0,x:0,y:0},this._padding=5,this._rectClass=(new tc).parent(this),this._rectConfig={stroke:"#999",strokeWidth:1},this._scale="linear",this._size=10,this._value=p("value"),this._width=400}}class xc{
3018
+ */constructor(){super(),this._axisClass=new pc,this._axisConfig={gridSize:0},this._axisTest=new pc,this._align="middle",this._buckets=5,this._bucketAxis=!1,this._bucketFormat=(n,t,e,i)=>{var a=this._axisConfig.tickFormat||kh;let r=e[t+1];var o=!!t&&e[t-1],e=t===e.length-1;return n===r||e?(e=e&&n<Nt(i)?"+":"",a(n)+e):(e=1<=(e=r?r/100:n/100)||e<=-1?Math.round(e).toString().length-1:-1*e.toString().split(".")[1].replace(/([1-9])[1-9].*$/,"$1").length,e=Math.pow(10,e),o=a(o===n&&1===t?Pt([n+e,i.find(t=>n<t&&t<r)]):n),a=a(n&&1===t?r:Nt([r-e,i.reverse().find(t=>n<t&&t<r)])),this._bucketJoiner(o,a))},this._bucketJoiner=(t,n)=>t!==n?t+" - "+n:""+t,this._centered=!0,this._color=["#54478C","#2C699A","#0DB39E","#83E377","#EFEA5A"],this._colorMax=mu.on,this._colorMid=mu.light,this._colorMin=mu.off,this._data=[],this._duration=600,this._height=200,this._labelClass=new Cc,this._labelConfig={fontColor:mu.dark,fontSize:12},this._legendClass=new bc,this._legendConfig={shapeConfig:{stroke:mu.dark,strokeWidth:1}},this._midpoint=0,this._orient="bottom",this._outerBounds={width:0,height:0,x:0,y:0},this._padding=5,this._rectClass=(new nc).parent(this),this._rectConfig={stroke:"#999",strokeWidth:1},this._scale="linear",this._size=10,this._value=p("value"),this._width=400}}class wc{
3020
3019
  /**
3021
3020
  @memberof Message
3022
3021
  @desc Removes the message from the page.
@@ -3037,7 +3036,7 @@ this._group=Dt("g.d3plus-ColorScale",{parent:this._select});let i=this._data.map
3037
3036
  @memberof Message
3038
3037
  @desc Invoked when creating a new class instance, and sets any default parameters.
3039
3038
  @private
3040
- */constructor(){this._isVisible=!1}}let wc={i:"font-style: italic;",em:"font-style: italic;",b:"font-weight: bold;",strong:"font-weight: bold;"};class Sc extends Ri{
3039
+ */constructor(){this._isVisible=!1}}let Sc={i:"font-style: italic;",em:"font-style: italic;",b:"font-weight: bold;",strong:"font-weight: bold;"};class Cc extends Ri{
3041
3040
  /**
3042
3041
  @memberof TextBox
3043
3042
  @desc Renders the text boxes. If a *callback* is specified, it will be called once the shapes are done drawing.
@@ -3177,7 +3176,7 @@ var n=new RegExp(/<([A-z]+)[^>]*>([^<^>]+)<\/[^>]+>/g);return t.match(n)?t=t.rep
3177
3176
  strong: 'font-weight: bold;'
3178
3177
  }]
3179
3178
  @chainable
3180
- */html(t){return arguments.length?(this._html="boolean"==typeof t?!!t&&wc:t,this):this._html}
3179
+ */html(t){return arguments.length?(this._html="boolean"==typeof t?!!t&&Sc:t,this):this._html}
3181
3180
  /**
3182
3181
  @memberof TextBox
3183
3182
  @desc Defines the unique id for each box to the specified accessor function or static number.
@@ -3298,16 +3297,16 @@ var n=new RegExp(/<([A-z]+)[^>]*>([^<^>]+)<\/[^>]+>/g);return t.match(n)?t=t.rep
3298
3297
  @memberof TextBox
3299
3298
  @desc Invoked when creating a new class instance, and sets any default parameters.
3300
3299
  @private
3301
- */constructor(){super(),this._ariaHidden=Ot("false"),this._delay=0,this._duration=0,this._ellipsis=(t,n)=>n?t.replace(/\.|,$/g,"")+"...":"",this._fontColor=Ot("black"),this._fontFamily=Ot(Ee),this._fontMax=Ot(50),this._fontMin=Ot(8),this._fontOpacity=Ot(1),this._fontResize=Ot(!1),this._fontSize=Ot(10),this._fontStroke=Ot("transparent"),this._fontStrokeWidth=Ot(0),this._fontWeight=Ot(400),this._height=p("height",200),this._html=wc,this._id=(t,n)=>t.id||""+n,this._lineHeight=(t,n)=>1.2*this._fontSize(t,n),this._maxLines=Ot(null),this._on={},this._overflow=Ot(!1),this._padding=Ot(0),this._pointerEvents=Ot("auto"),this._rotate=Ot(0),this._rotateAnchor=t=>[t.w/2,t.h/2],this._split=ui,this._text=p("text"),this._textAnchor=Ot("start"),this._verticalAlign=Ot("top"),this._width=p("width",200),this._x=p("x",0),this._y=p("y",0)}}
3300
+ */constructor(){super(),this._ariaHidden=Ot("false"),this._delay=0,this._duration=0,this._ellipsis=(t,n)=>n?t.replace(/\.|,$/g,"")+"...":"",this._fontColor=Ot("black"),this._fontFamily=Ot(Ee),this._fontMax=Ot(50),this._fontMin=Ot(8),this._fontOpacity=Ot(1),this._fontResize=Ot(!1),this._fontSize=Ot(10),this._fontStroke=Ot("transparent"),this._fontStrokeWidth=Ot(0),this._fontWeight=Ot(400),this._height=p("height",200),this._html=Sc,this._id=(t,n)=>t.id||""+n,this._lineHeight=(t,n)=>1.2*this._fontSize(t,n),this._maxLines=Ot(null),this._on={},this._overflow=Ot(!1),this._padding=Ot(0),this._pointerEvents=Ot("auto"),this._rotate=Ot(0),this._rotateAnchor=t=>[t.w/2,t.h/2],this._split=ui,this._text=p("text"),this._textAnchor=Ot("start"),this._verticalAlign=Ot("top"),this._width=p("width",200),this._x=p("x",0),this._y=p("y",0)}}
3302
3301
  // These are typically used in conjunction with noevent to ensure that we can
3303
3302
  // preventDefault on the event.
3304
- let Cc={capture:!0,passive:!1};function kc(t){t.preventDefault(),t.stopImmediatePropagation()}function Ac(t){var n=t.document.documentElement,t=H(t).on("dragstart.drag",kc,Cc);"onselectstart"in n?t.on("selectstart.drag",kc,Cc):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Mc(t,n){var e=t.document.documentElement,i=H(t).on("dragstart.drag",null);n&&(i.on("click.drag",kc,Cc),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in e?i.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}var Ec=t=>()=>t;function zc(t,{sourceEvent:n,target:e,selection:i,mode:a,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},selection:{value:i,enumerable:!0,configurable:!0},mode:{value:a,enumerable:!0,configurable:!0},_:{value:r}})}function Tc(t){t.preventDefault(),t.stopImmediatePropagation()}var Bc={name:"drag"},Dc={name:"space"},Nc={name:"handle"},Pc={name:"center"};let{abs:Lc,max:Fc,min:Oc}=Math;function Rc(t){return[+t[0],+t[1]]}function jc(t){return[Rc(t[0]),Rc(t[1])]}var Ic={name:"x",handles:["w","e"].map(Yc),input:function(t,n){return null==t?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Hc={},Gc={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Yc),input:function(t){return null==t?null:jc(t)},output:function(t){return t}},Kc={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"},$c={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},qc={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Uc={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Wc={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Yc(t){return{type:t}}
3303
+ let kc={capture:!0,passive:!1};function Ac(t){t.preventDefault(),t.stopImmediatePropagation()}function Mc(t){var n=t.document.documentElement,t=H(t).on("dragstart.drag",Ac,kc);"onselectstart"in n?t.on("selectstart.drag",Ac,kc):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Ec(t,n){var e=t.document.documentElement,i=H(t).on("dragstart.drag",null);n&&(i.on("click.drag",Ac,kc),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in e?i.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}var zc=t=>()=>t;function Tc(t,{sourceEvent:n,target:e,selection:i,mode:a,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},selection:{value:i,enumerable:!0,configurable:!0},mode:{value:a,enumerable:!0,configurable:!0},_:{value:r}})}function Bc(t){t.preventDefault(),t.stopImmediatePropagation()}var Dc={name:"drag"},Nc={name:"space"},Pc={name:"handle"},Lc={name:"center"};let{abs:Fc,max:Oc,min:Rc}=Math;function jc(t){return[+t[0],+t[1]]}function Ic(t){return[jc(t[0]),jc(t[1])]}var Hc={name:"x",handles:["w","e"].map(Vc),input:function(t,n){return null==t?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Gc={},Kc={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Vc),input:function(t){return null==t?null:Ic(t)},output:function(t){return t}},$c={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"},qc={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Uc={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Wc={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Yc={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Vc(t){return{type:t}}
3305
3304
  // Ignore right-click, since that should open the context menu.
3306
- function Vc(t){return!t.ctrlKey&&!t.button}function Zc(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Xc(){return navigator.maxTouchPoints||"ontouchstart"in this}
3305
+ function Zc(t){return!t.ctrlKey&&!t.button}function Xc(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Jc(){return navigator.maxTouchPoints||"ontouchstart"in this}
3307
3306
  // Like d3.local, but with the name “__brush” rather than auto-generated.
3308
- function Jc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Qc(L){var F,n=Zc,O=Vc,e=Xc,R=!0,a=xt("start","brush","end"),i=6;function r(t){var n=t.property("__brush",h).selectAll(".overlay").data([Yc("overlay")]),n=(n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Kc.overlay).merge(n).each(function(){var t=Jc(this).extent;H(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])}),t.selectAll(".selection").data([Yc("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Kc.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges"),t.selectAll(".handle").data(L.handles,function(t){return t.type}));n.exit().remove(),n.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return Kc[t.type]}),t.each(j).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",s).filter(e).on("touchstart.brush",s).on("touchmove.brush",l).on("touchend.brush touchcancel.brush",u).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function j(){var t=H(this),n=Jc(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?n[1][0]-i/2:n[0][0]-i/2}).attr("y",function(t){return"s"===t.type[0]?n[1][1]-i/2:n[0][1]-i/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+i:i}).attr("height",function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+i:i})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function I(t,n,e){var i=t.__brush.emitter;return!i||e&&i.clean?new o(t,n,e):i}function o(t,n,e){this.that=t,this.args=n,this.state=t.__brush,this.active=0,this.clean=e}function s(t){var r,a,o,s,l,u,h,c,g,d,f,p,_,m,y,v,b,x,w,S,C,k,A,M,E,z,T,n,e,B,i;function D(t){for(var n of t.changedTouches||[t])for(var e of z)e.identifier===n.identifier&&(e.cur=vt(n,r));var i,a;!A||M||E||1!==z.length||(i=z[0],Lc(i.cur[0]-i[0])>Lc(i.cur[1]-i[1])?E=!0:M=!0);for(a of z)a.cur&&(a[0]=a.cur[0],a[1]=a.cur[1]);k=!0,Tc(t),N(t)}function N(t){var n,e=z[0],i=e.point0;switch(S=e[0]-i[0],C=e[1]-i[1],o){case Dc:case Bc:s&&(S=Fc(c-g,Oc(m-y,S)),d=g+S,v=y+S),l&&(C=Fc(f-p,Oc(b-x,C)),_=p+C,w=x+C);break;case Nc:z[1]?(s&&(d=Fc(c,Oc(m,z[0][0])),v=Fc(c,Oc(m,z[1][0])),s=1),l&&(_=Fc(f,Oc(b,z[0][1])),w=Fc(f,Oc(b,z[1][1])),l=1)):(s<0?(S=Fc(c-g,Oc(m-g,S)),d=g+S,v=y):0<s&&(S=Fc(c-y,Oc(m-y,S)),d=g,v=y+S),l<0?(C=Fc(f-p,Oc(b-p,C)),_=p+C,w=x):0<l&&(C=Fc(f-x,Oc(b-x,C)),_=p,w=x+C));break;case Pc:s&&(d=Fc(c,Oc(m,g-S*s)),v=Fc(c,Oc(m,y+S*s))),l&&(_=Fc(f,Oc(b,p-C*l)),w=Fc(f,Oc(b,x+C*l)))}v<d&&(s*=-1,n=g,g=y,y=n,n=d,d=v,v=n,a in $c)&&B.attr("cursor",Kc[a=$c[a]]),w<_&&(l*=-1,n=p,p=x,x=n,n=_,_=w,w=n,a in qc)&&B.attr("cursor",Kc[a=qc[a]]),u.selection&&(h=u.selection),// May be set by brush.move!
3309
- M&&(d=h[0][0],v=h[1][0]),E&&(_=h[0][1],w=h[1][1]),h[0][0]===d&&h[0][1]===_&&h[1][0]===v&&h[1][1]===w||(u.selection=[[d,_],[v,w]],j.call(r),T.brush(t,o.name))}function P(t){if(t.stopImmediatePropagation(),t.touches){if(t.touches.length)return;F&&clearTimeout(F),F=setTimeout(function(){F=null},500)}else Mc(t.view,k),i.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);var n;e.attr("pointer-events","all"),B.attr("cursor",Kc.overlay),u.selection&&(h=u.selection),// May be set by brush.move (on start)!
3310
- (n=h)[0][0]!==n[1][0]&&n[0][1]!==n[1][1]||(u.selection=null,j.call(r)),T.end(t,o.name)}F&&!t.touches||O.apply(this,arguments)&&(r=this,a=t.target.__data__.type,o="selection"===(R&&t.metaKey?a="overlay":a)?Bc:R&&t.altKey?Pc:Nc,s=L===Hc?null:Uc[a],l=L===Ic?null:Wc[a],n=(u=Jc(r)).extent,h=u.selection,c=n[0][0],f=n[0][1],m=n[1][0],b=n[1][1],C=S=0,A=s&&l&&R&&t.shiftKey,z=Array.from(t.touches||[t],t=>{var n=t.identifier;return(t=vt(t,r)).point0=t.slice(),t.identifier=n,t}),cn(r),T=I(r,arguments,!0).beforestart(),"overlay"===a?(h&&(k=!0),n=[z[0],z[1]||z[0]],u.selection=h=[[g=L===Hc?c:Oc(n[0][0],n[1][0]),p=L===Ic?f:Oc(n[0][1],n[1][1])],[y=L===Hc?m:Fc(n[0][0],n[1][0]),x=L===Ic?b:Fc(n[0][1],n[1][1])]],1<z.length&&N(t)):(g=h[0][0],p=h[0][1],y=h[1][0],x=h[1][1]),d=g,_=p,v=y,w=x,e=H(r).attr("pointer-events","none"),B=e.selectAll(".overlay").attr("cursor",Kc[a]),t.touches?(T.moved=D,T.ended=P):(i=H(t.view).on("mousemove.brush",D,!0).on("mouseup.brush",P,!0),R&&i.on("keydown.brush",function(t){switch(t.keyCode){case 16:A=s&&l;break;case 18:o===Nc&&(s&&(y=v-S*s,g=d+S*s),l&&(x=w-C*l,p=_+C*l),o=Pc,N(t));break;case 32:o!==Nc&&o!==Pc||(s<0?y=v-S:0<s&&(g=d-S),l<0?x=w-C:0<l&&(p=_-C),o=Dc,B.attr("cursor",Kc.selection),N(t));break;default:return}Tc(t)},!0).on("keyup.brush",function(t){switch(t.keyCode){case 16:A&&(M=E=A=!1,N(t));break;case 18:o===Pc&&(s<0?y=v:0<s&&(g=d),l<0?x=w:0<l&&(p=_),o=Nc,N(t));break;case 32:o===Dc&&(o=t.altKey?(s&&(y=v-S*s,g=d+S*s),l&&(x=w-C*l,p=_+C*l),Pc):(s<0?y=v:0<s&&(g=d),l<0?x=w:0<l&&(p=_),Nc),B.attr("cursor",Kc[a]),N(t));break;default:return}Tc(t)},!0),Ac(t.view)),j.call(r),T.start(t,o.name))}function l(t){I(this,arguments).moved(t)}function u(t){I(this,arguments).ended(t)}function h(){var t=this.__brush||{selection:null};return t.extent=jc(n.apply(this,arguments)),t.dim=L,t}return r.move=function(t,s,i){t.tween?t.on("start.brush",function(t){I(this,arguments).beforestart().start(t)}).on("interrupt.brush end.brush",function(t){I(this,arguments).end(t)}).tween("brush",function(){var n=this,e=n.__brush,i=I(n,arguments),t=e.selection,a=L.input("function"==typeof s?s.apply(this,arguments):s,e.extent),r=ee(t,a);function o(t){e.selection=1===t&&null===a?null:r(t),j.call(n),i.brush()}return null!==t&&null!==a?o:o(1)}):t.each(function(){var t=arguments,n=this.__brush,e=L.input("function"==typeof s?s.apply(this,t):s,n.extent),t=I(this,t).beforestart();cn(this),n.selection=null===e?null:e,j.call(this),t.start(i).brush(i).end(i)})},r.clear=function(t,n){r.move(t,null,n)},o.prototype={beforestart:function(){return 1==++this.active&&((this.state.emitter=this).starting=!0),this},start:function(t,n){return this.starting?(this.starting=!1,this.emit("start",t,n)):this.emit("brush",t),this},brush:function(t,n){return this.emit("brush",t,n),this},end:function(t,n){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,n)),this},emit:function(t,n,e){var i=H(this.that).datum();a.call(t,this.that,new zc(t,{sourceEvent:n,target:r,selection:L.output(this.state.selection),mode:e,dispatch:a}),i)}},r.extent=function(t){return arguments.length?(n="function"==typeof t?t:Ec(jc(t)),r):n},r.filter=function(t){return arguments.length?(O="function"==typeof t?t:Ec(!!t),r):O},r.touchable=function(t){return arguments.length?(e="function"==typeof t?t:Ec(!!t),r):e},r.handleSize=function(t){return arguments.length?(i=+t,r):i},r.keyModifiers=function(t){return arguments.length?(R=!!t,r):R},r.on=function(){var t=a.on.apply(a,arguments);return t===a?r:t},r}let tg="#bbb";class ng extends fc{
3307
+ function Qc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function tg(L){var F,n=Xc,O=Zc,e=Jc,R=!0,a=xt("start","brush","end"),i=6;function r(t){var n=t.property("__brush",h).selectAll(".overlay").data([Vc("overlay")]),n=(n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",$c.overlay).merge(n).each(function(){var t=Qc(this).extent;H(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])}),t.selectAll(".selection").data([Vc("selection")]).enter().append("rect").attr("class","selection").attr("cursor",$c.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges"),t.selectAll(".handle").data(L.handles,function(t){return t.type}));n.exit().remove(),n.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return $c[t.type]}),t.each(j).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",s).filter(e).on("touchstart.brush",s).on("touchmove.brush",l).on("touchend.brush touchcancel.brush",u).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function j(){var t=H(this),n=Qc(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?n[1][0]-i/2:n[0][0]-i/2}).attr("y",function(t){return"s"===t.type[0]?n[1][1]-i/2:n[0][1]-i/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+i:i}).attr("height",function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+i:i})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function I(t,n,e){var i=t.__brush.emitter;return!i||e&&i.clean?new o(t,n,e):i}function o(t,n,e){this.that=t,this.args=n,this.state=t.__brush,this.active=0,this.clean=e}function s(t){var r,a,o,s,l,u,h,c,g,d,f,p,_,m,y,v,b,x,w,S,C,k,A,M,E,z,T,n,e,B,i;function D(t){for(var n of t.changedTouches||[t])for(var e of z)e.identifier===n.identifier&&(e.cur=vt(n,r));var i,a;!A||M||E||1!==z.length||(i=z[0],Fc(i.cur[0]-i[0])>Fc(i.cur[1]-i[1])?E=!0:M=!0);for(a of z)a.cur&&(a[0]=a.cur[0],a[1]=a.cur[1]);k=!0,Bc(t),N(t)}function N(t){var n,e=z[0],i=e.point0;switch(S=e[0]-i[0],C=e[1]-i[1],o){case Nc:case Dc:s&&(S=Oc(c-g,Rc(m-y,S)),d=g+S,v=y+S),l&&(C=Oc(f-p,Rc(b-x,C)),_=p+C,w=x+C);break;case Pc:z[1]?(s&&(d=Oc(c,Rc(m,z[0][0])),v=Oc(c,Rc(m,z[1][0])),s=1),l&&(_=Oc(f,Rc(b,z[0][1])),w=Oc(f,Rc(b,z[1][1])),l=1)):(s<0?(S=Oc(c-g,Rc(m-g,S)),d=g+S,v=y):0<s&&(S=Oc(c-y,Rc(m-y,S)),d=g,v=y+S),l<0?(C=Oc(f-p,Rc(b-p,C)),_=p+C,w=x):0<l&&(C=Oc(f-x,Rc(b-x,C)),_=p,w=x+C));break;case Lc:s&&(d=Oc(c,Rc(m,g-S*s)),v=Oc(c,Rc(m,y+S*s))),l&&(_=Oc(f,Rc(b,p-C*l)),w=Oc(f,Rc(b,x+C*l)))}v<d&&(s*=-1,n=g,g=y,y=n,n=d,d=v,v=n,a in qc)&&B.attr("cursor",$c[a=qc[a]]),w<_&&(l*=-1,n=p,p=x,x=n,n=_,_=w,w=n,a in Uc)&&B.attr("cursor",$c[a=Uc[a]]),u.selection&&(h=u.selection),// May be set by brush.move!
3308
+ M&&(d=h[0][0],v=h[1][0]),E&&(_=h[0][1],w=h[1][1]),h[0][0]===d&&h[0][1]===_&&h[1][0]===v&&h[1][1]===w||(u.selection=[[d,_],[v,w]],j.call(r),T.brush(t,o.name))}function P(t){if(t.stopImmediatePropagation(),t.touches){if(t.touches.length)return;F&&clearTimeout(F),F=setTimeout(function(){F=null},500)}else Ec(t.view,k),i.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);var n;e.attr("pointer-events","all"),B.attr("cursor",$c.overlay),u.selection&&(h=u.selection),// May be set by brush.move (on start)!
3309
+ (n=h)[0][0]!==n[1][0]&&n[0][1]!==n[1][1]||(u.selection=null,j.call(r)),T.end(t,o.name)}F&&!t.touches||O.apply(this,arguments)&&(r=this,a=t.target.__data__.type,o="selection"===(R&&t.metaKey?a="overlay":a)?Dc:R&&t.altKey?Lc:Pc,s=L===Gc?null:Wc[a],l=L===Hc?null:Yc[a],n=(u=Qc(r)).extent,h=u.selection,c=n[0][0],f=n[0][1],m=n[1][0],b=n[1][1],C=S=0,A=s&&l&&R&&t.shiftKey,z=Array.from(t.touches||[t],t=>{var n=t.identifier;return(t=vt(t,r)).point0=t.slice(),t.identifier=n,t}),cn(r),T=I(r,arguments,!0).beforestart(),"overlay"===a?(h&&(k=!0),n=[z[0],z[1]||z[0]],u.selection=h=[[g=L===Gc?c:Rc(n[0][0],n[1][0]),p=L===Hc?f:Rc(n[0][1],n[1][1])],[y=L===Gc?m:Oc(n[0][0],n[1][0]),x=L===Hc?b:Oc(n[0][1],n[1][1])]],1<z.length&&N(t)):(g=h[0][0],p=h[0][1],y=h[1][0],x=h[1][1]),d=g,_=p,v=y,w=x,e=H(r).attr("pointer-events","none"),B=e.selectAll(".overlay").attr("cursor",$c[a]),t.touches?(T.moved=D,T.ended=P):(i=H(t.view).on("mousemove.brush",D,!0).on("mouseup.brush",P,!0),R&&i.on("keydown.brush",function(t){switch(t.keyCode){case 16:A=s&&l;break;case 18:o===Pc&&(s&&(y=v-S*s,g=d+S*s),l&&(x=w-C*l,p=_+C*l),o=Lc,N(t));break;case 32:o!==Pc&&o!==Lc||(s<0?y=v-S:0<s&&(g=d-S),l<0?x=w-C:0<l&&(p=_-C),o=Nc,B.attr("cursor",$c.selection),N(t));break;default:return}Bc(t)},!0).on("keyup.brush",function(t){switch(t.keyCode){case 16:A&&(M=E=A=!1,N(t));break;case 18:o===Lc&&(s<0?y=v:0<s&&(g=d),l<0?x=w:0<l&&(p=_),o=Pc,N(t));break;case 32:o===Nc&&(o=t.altKey?(s&&(y=v-S*s,g=d+S*s),l&&(x=w-C*l,p=_+C*l),Lc):(s<0?y=v:0<s&&(g=d),l<0?x=w:0<l&&(p=_),Pc),B.attr("cursor",$c[a]),N(t));break;default:return}Bc(t)},!0),Mc(t.view)),j.call(r),T.start(t,o.name))}function l(t){I(this,arguments).moved(t)}function u(t){I(this,arguments).ended(t)}function h(){var t=this.__brush||{selection:null};return t.extent=Ic(n.apply(this,arguments)),t.dim=L,t}return r.move=function(t,s,i){t.tween?t.on("start.brush",function(t){I(this,arguments).beforestart().start(t)}).on("interrupt.brush end.brush",function(t){I(this,arguments).end(t)}).tween("brush",function(){var n=this,e=n.__brush,i=I(n,arguments),t=e.selection,a=L.input("function"==typeof s?s.apply(this,arguments):s,e.extent),r=ee(t,a);function o(t){e.selection=1===t&&null===a?null:r(t),j.call(n),i.brush()}return null!==t&&null!==a?o:o(1)}):t.each(function(){var t=arguments,n=this.__brush,e=L.input("function"==typeof s?s.apply(this,t):s,n.extent),t=I(this,t).beforestart();cn(this),n.selection=null===e?null:e,j.call(this),t.start(i).brush(i).end(i)})},r.clear=function(t,n){r.move(t,null,n)},o.prototype={beforestart:function(){return 1==++this.active&&((this.state.emitter=this).starting=!0),this},start:function(t,n){return this.starting?(this.starting=!1,this.emit("start",t,n)):this.emit("brush",t),this},brush:function(t,n){return this.emit("brush",t,n),this},end:function(t,n){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,n)),this},emit:function(t,n,e){var i=H(this.that).datum();a.call(t,this.that,new Tc(t,{sourceEvent:n,target:r,selection:L.output(this.state.selection),mode:e,dispatch:a}),i)}},r.extent=function(t){return arguments.length?(n="function"==typeof t?t:zc(Ic(t)),r):n},r.filter=function(t){return arguments.length?(O="function"==typeof t?t:zc(!!t),r):O},r.touchable=function(t){return arguments.length?(e="function"==typeof t?t:zc(!!t),r):e},r.handleSize=function(t){return arguments.length?(i=+t,r):i},r.keyModifiers=function(t){return arguments.length?(R=!!t,r):R},r.on=function(){var t=a.on.apply(a,arguments);return t===a?r:t},r}let ng="#bbb";class eg extends pc{
3311
3310
  /**
3312
3311
  @memberof Timeline
3313
3312
  @desc Triggered on brush "brush".
@@ -3361,7 +3360,7 @@ o=+a[0]==+a[1];return"brush"!==n.type&&"end"!==n.type||(this._selection="ticks"=
3361
3360
  @chainable
3362
3361
  */render(t){var{height:n,y:e}=this._position;this._ticks&&(this._ticks=this._ticks.map(Bt)),this._data&&(this._data=this._data.map(Bt));let i=this._ticks||this._domain.map(Bt),a=(this._ticks||(r=ns().domain(i).range([0,this._width]),i=r.ticks()),this._timeLocale||Mi[this._locale]||Mi["en-US"]),l=(void 0===this._userFormat&&(this._userFormat=this._tickFormat||!1),this._tickFormat=this._userFormat||(t=>Eh(t,i).replace(/^Q/g,a.quarter)));if(
3363
3362
  // Measures size of ticks
3364
- this._ticksWidth=this._width,["auto","buttons"].includes(this._buttonBehavior)){let s=0;i.forEach((t,n)=>{var{fontFamily:e,fontSize:i}=this._shapeConfig.labelConfig;let a="function"==typeof e?e(t,n):e,r="function"==typeof i?i(t,n):i;e=gi().fontFamily(a).fontSize(r).lineHeight(this._shapeConfig.lineHeight?this._shapeConfig.lineHeight(t,n):void 0)(l(t));let o=e.lines.length?Math.ceil(Nt(e.lines.map(t=>Ae(t,{"font-family":a,"font-size":r}))))+r/4:0;o%2&&o++,s<o&&(s=o+2*this._buttonPadding)}),this._ticksWidth=s*i.length}var r=this._playButton?this._buttonHeight:0,o=this._width-r,o=(this._buttonBehaviorCurrent="auto"===this._buttonBehavior?this._ticksWidth<o?"buttons":"ticks":this._buttonBehavior,this._hiddenHandles="buttons"===this._buttonBehaviorCurrent&&!this._brushing);if("buttons"===this._buttonBehaviorCurrent){this._scale="ordinal";let e=ns().domain(this._domain.map(Bt)).ticks().map(Number);this._domain=this._ticks||Array.from(Array(e[e.length-1]-e[0]+1),(t,n)=>e[0]+n).map(Bt),this._ticks=this._domain;var s=.5*this._ticksWidth/this._ticks.length,u=this._width-this._ticksWidth-r;this._paddingLeft="middle"===this._buttonAlign?u/2+r:"end"===this._buttonAlign?u+r:r,this._range=[this._paddingLeft+s,this._paddingLeft+this._ticksWidth-s]}else this._scale="time",this._domain=Re(i),this._range=[r?1.5*r:void 0,void 0],this._paddingLeft=r;super.render(t);let h=this._outerBounds[e],c=this._d3Scale.range();u=this._brush=Qc(Ic).extent([[c[0],h],[c[c.length-1],h+this._outerBounds[n]]]).filter(this._brushFilter).handleSize(o?0:this._handleSize).on("start",this._brushStart.bind(this)).on("brush",this._brushBrush.bind(this)).on("end",this._brushEnd.bind(this)),s="ticks"===this._buttonBehaviorCurrent?this._availableTicks:c,t=[this._brushMin()>s.length?s[0]:s[s.length-this._brushMin()],s[s.length-1]],e=void 0===this._selection?t:this._selection instanceof Array?"buttons"===this._buttonBehaviorCurrent?this._selection.map(Bt).map(t=>c[this._ticks.map(Number).indexOf(+t)]):this._selection.map(Bt):"buttons"===this._buttonBehaviorCurrent?[c[this._ticks.map(Number).indexOf(+this._selection)]]:[this._selection],1===e.length&&e.push(e[0]),this._updateBrushLimit(e),this._brushGroup=Dt("g.brushGroup",{parent:this._group}),this._brushGroup.call(u).transition(this._transition).call(u.move,"ticks"===this._buttonBehaviorCurrent?this._updateBrushLimit(e):e),this._outerBounds.y-=this._handleSize/2,this._outerBounds.height+=this._handleSize/2,n=Dt("g.d3plus-Timeline-play",{parent:this._group});
3363
+ this._ticksWidth=this._width,["auto","buttons"].includes(this._buttonBehavior)){let s=0;i.forEach((t,n)=>{var{fontFamily:e,fontSize:i}=this._shapeConfig.labelConfig;let a="function"==typeof e?e(t,n):e,r="function"==typeof i?i(t,n):i;e=gi().fontFamily(a).fontSize(r).lineHeight(this._shapeConfig.lineHeight?this._shapeConfig.lineHeight(t,n):void 0)(l(t));let o=e.lines.length?Math.ceil(Nt(e.lines.map(t=>Ae(t,{"font-family":a,"font-size":r}))))+r/4:0;o%2&&o++,s<o&&(s=o+2*this._buttonPadding)}),this._ticksWidth=s*i.length}var r=this._playButton?this._buttonHeight:0,o=this._width-r,o=(this._buttonBehaviorCurrent="auto"===this._buttonBehavior?this._ticksWidth<o?"buttons":"ticks":this._buttonBehavior,this._hiddenHandles="buttons"===this._buttonBehaviorCurrent&&!this._brushing);if("buttons"===this._buttonBehaviorCurrent){this._scale="ordinal";let e=ns().domain(this._domain.map(Bt)).ticks().map(Number);this._domain=this._ticks||Array.from(Array(e[e.length-1]-e[0]+1),(t,n)=>e[0]+n).map(Bt),this._ticks=this._domain;var s=.5*this._ticksWidth/this._ticks.length,u=this._width-this._ticksWidth-r;this._paddingLeft="middle"===this._buttonAlign?u/2+r:"end"===this._buttonAlign?u+r:r,this._range=[this._paddingLeft+s,this._paddingLeft+this._ticksWidth-s]}else this._scale="time",this._domain=Re(i),this._range=[r?1.5*r:void 0,void 0],this._paddingLeft=r;super.render(t);let h=this._outerBounds[e],c=this._d3Scale.range();u=this._brush=tg(Hc).extent([[c[0],h],[c[c.length-1],h+this._outerBounds[n]]]).filter(this._brushFilter).handleSize(o?0:this._handleSize).on("start",this._brushStart.bind(this)).on("brush",this._brushBrush.bind(this)).on("end",this._brushEnd.bind(this)),s="ticks"===this._buttonBehaviorCurrent?this._availableTicks:c,t=[this._brushMin()>s.length?s[0]:s[s.length-this._brushMin()],s[s.length-1]],e=void 0===this._selection?t:this._selection instanceof Array?"buttons"===this._buttonBehaviorCurrent?this._selection.map(Bt).map(t=>c[this._ticks.map(Number).indexOf(+t)]):this._selection.map(Bt):"buttons"===this._buttonBehaviorCurrent?[c[this._ticks.map(Number).indexOf(+this._selection)]]:[this._selection],1===e.length&&e.push(e[0]),this._updateBrushLimit(e),this._brushGroup=Dt("g.brushGroup",{parent:this._group}),this._brushGroup.call(u).transition(this._transition).call(u.move,"ticks"===this._buttonBehaviorCurrent?this._updateBrushLimit(e):e),this._outerBounds.y-=this._handleSize/2,this._outerBounds.height+=this._handleSize/2,n=Dt("g.d3plus-Timeline-play",{parent:this._group});
3365
3364
  // data Array to be used when detecting the default value
3366
3365
  return this._playButtonClass.data(this._playButton?[{x:this._paddingLeft-r,y:"buttons"===this._buttonBehaviorCurrent?"middle"===this._align?this._height/2-this._buttonHeight/2:"start"===this._align?this._margin.top:this._height-this._buttonHeight-this._margin.bottom:this._outerBounds.y,width:r,height:r}]:[]).select(n.node()).config(this._playButtonConfig).render(),this}
3367
3366
  /**
@@ -3469,40 +3468,40 @@ return this._playButtonClass.data(this._playButton?[{x:this._paddingLeft-r,y:"bu
3469
3468
  @memberof Timeline
3470
3469
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Axis.
3471
3470
  @private
3472
- */constructor(){super(),this._barConfig=Tt({},this._barConfig,{stroke:()=>"buttons"===this._buttonBehaviorCurrent?"transparent":tg,"stroke-width":()=>"buttons"===this._buttonBehaviorCurrent?0:1}),this._brushing=!0,this._brushFilter=t=>!t.button&&t.detail<2,this._brushMin=Ot(1),this._buttonAlign="middle",this._buttonBehavior="auto",this._buttonPadding=10,this._buttonHeight=24,this._domain=[2001,2010],this._gridSize=0,this._handleConfig={fill:mu.light,stroke:"#228be6","stroke-width":2,rx:2,ry:2},this._handleSize=6,this._height=100,this._labelOffset=!1,this._on={},this.orient("bottom"),this._playButton=!0,this._playButtonClass=(new Sc).on("click",()=>{
3471
+ */constructor(){super(),this._barConfig=Tt({},this._barConfig,{stroke:()=>"buttons"===this._buttonBehaviorCurrent?"transparent":ng,"stroke-width":()=>"buttons"===this._buttonBehaviorCurrent?0:1}),this._brushing=!0,this._brushFilter=t=>!t.button&&t.detail<2,this._brushMin=Ot(1),this._buttonAlign="middle",this._buttonBehavior="auto",this._buttonPadding=10,this._buttonHeight=24,this._domain=[2001,2010],this._gridSize=0,this._handleConfig={fill:mu.light,stroke:"#228be6","stroke-width":2,rx:2,ry:2},this._handleSize=6,this._height=100,this._labelOffset=!1,this._on={},this.orient("bottom"),this._playButton=!0,this._playButtonClass=(new Cc).on("click",()=>{
3473
3472
  // if playing, pause
3474
- if(this._playTimer)clearInterval(this._playTimer),this._playTimer=!1,this._playButtonClass.render();else{let a=!0;var t=()=>{let t=this._selection||[this._domain[this._domain.length-1]];1===(t=(t=t instanceof Array?t:[t]).map(Bt).map(Number)).length&&t.push(t[0]);var n=this._ticks.map(Number),e=n.indexOf(t[0]),i=n.indexOf(t[t.length-1]);(i===n.length-1?a?this.selection([this._ticks[0],this._ticks[i-e]]):(clearInterval(this._playTimer),this._playTimer=!1,this._playButtonClass):(i+1===n.length-1&&(clearInterval(this._playTimer),this._playTimer=!1),this.selection([this._ticks[e+1],this._ticks[i+1]]))).render(),a=!1};this._playTimer=setInterval(t,this._playButtonInterval),t()}}).on("mousemove",()=>this._playButtonClass.select().style("cursor","pointer")),this._playButtonConfig={fontColor:mu.dark,fontSize:15,text:()=>this._playTimer?"&#x23f8;&#xFE0E;":"⏵",textAnchor:"middle",verticalAlign:"middle"},this._playButtonInterval=1e3,this._selectionConfig={fill:"#228be6","fill-opacity":()=>"buttons"===this._buttonBehaviorCurrent?.3:1,"stroke-width":0},this._shape="Rect",this._shapeConfig=Tt({},this._shapeConfig,{labelBounds:t=>"buttons"===this._buttonBehaviorCurrent?{x:t.labelBounds.x,y:-this._buttonHeight/2+1,width:t.labelBounds.width,height:this._buttonHeight}:t.labelBounds,labelConfig:{fontColor:mu.dark,fontSize:()=>12,verticalAlign:()=>"buttons"===this._buttonBehaviorCurrent?"middle":"top"},fill:()=>"buttons"===this._buttonBehaviorCurrent?"#fff":tg,stroke:()=>"buttons"===this._buttonBehaviorCurrent?tg:"transparent",height:t=>"buttons"===this._buttonBehaviorCurrent?this._buttonHeight:t.tick?this._handleSize:0,width:t=>"buttons"===this._buttonBehaviorCurrent?this._ticksWidth/this._availableTicks.length:t.tick?this._domain.map(Number).includes(t.id)?2:1:0,y:t=>"buttons"===this._buttonBehaviorCurrent?"middle"===this._align?this._height/2:"start"===this._align?this._margin.top+this._buttonHeight/2:this._height-this._buttonHeight/2-this._margin.bottom:t.y,rx:t=>"buttons"!==this._buttonBehaviorCurrent&&this._domain.map(Number).includes(t.id)?1:0,ry:t=>"buttons"!==this._buttonBehaviorCurrent&&this._domain.map(Number).includes(t.id)?1:0}),this._snapping=!0}}var eg="top",ig="bottom",ag="right",rg="left",og="auto",sg=[eg,ig,ag,rg],lg="start",ug="end",hg="clippingParents",cg="viewport",gg="popper",dg="reference",fg=sg.reduce(function(t,n){return t.concat([n+"-"+lg,n+"-"+ug])},[]),pg=[].concat(sg,[og]).reduce(function(t,n){return t.concat([n,n+"-"+lg,n+"-"+ug])},[]),_g=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function mg(t){return t?(t.nodeName||"").toLowerCase():null}function yg(t){var n;return null==t?window:"[object Window]"!==t.toString()?(n=t.ownerDocument)&&n.defaultView||window:t}function vg(t){return t instanceof yg(t).Element||t instanceof Element}function bg(t){return t instanceof yg(t).HTMLElement||t instanceof HTMLElement}function xg(t){
3473
+ if(this._playTimer)clearInterval(this._playTimer),this._playTimer=!1,this._playButtonClass.render();else{let a=!0;var t=()=>{let t=this._selection||[this._domain[this._domain.length-1]];1===(t=(t=t instanceof Array?t:[t]).map(Bt).map(Number)).length&&t.push(t[0]);var n=this._ticks.map(Number),e=n.indexOf(t[0]),i=n.indexOf(t[t.length-1]);(i===n.length-1?a?this.selection([this._ticks[0],this._ticks[i-e]]):(clearInterval(this._playTimer),this._playTimer=!1,this._playButtonClass):(i+1===n.length-1&&(clearInterval(this._playTimer),this._playTimer=!1),this.selection([this._ticks[e+1],this._ticks[i+1]]))).render(),a=!1};this._playTimer=setInterval(t,this._playButtonInterval),t()}}).on("mousemove",()=>this._playButtonClass.select().style("cursor","pointer")),this._playButtonConfig={fontColor:mu.dark,fontSize:15,text:()=>this._playTimer?"&#x23f8;&#xFE0E;":"⏵",textAnchor:"middle",verticalAlign:"middle"},this._playButtonInterval=1e3,this._selectionConfig={fill:"#228be6","fill-opacity":()=>"buttons"===this._buttonBehaviorCurrent?.3:1,"stroke-width":0},this._shape="Rect",this._shapeConfig=Tt({},this._shapeConfig,{labelBounds:t=>"buttons"===this._buttonBehaviorCurrent?{x:t.labelBounds.x,y:-this._buttonHeight/2+1,width:t.labelBounds.width,height:this._buttonHeight}:t.labelBounds,labelConfig:{fontColor:mu.dark,fontSize:()=>12,verticalAlign:()=>"buttons"===this._buttonBehaviorCurrent?"middle":"top"},fill:()=>"buttons"===this._buttonBehaviorCurrent?"#fff":ng,stroke:()=>"buttons"===this._buttonBehaviorCurrent?ng:"transparent",height:t=>"buttons"===this._buttonBehaviorCurrent?this._buttonHeight:t.tick?this._handleSize:0,width:t=>"buttons"===this._buttonBehaviorCurrent?this._ticksWidth/this._availableTicks.length:t.tick?this._domain.map(Number).includes(t.id)?2:1:0,y:t=>"buttons"===this._buttonBehaviorCurrent?"middle"===this._align?this._height/2:"start"===this._align?this._margin.top+this._buttonHeight/2:this._height-this._buttonHeight/2-this._margin.bottom:t.y,rx:t=>"buttons"!==this._buttonBehaviorCurrent&&this._domain.map(Number).includes(t.id)?1:0,ry:t=>"buttons"!==this._buttonBehaviorCurrent&&this._domain.map(Number).includes(t.id)?1:0}),this._snapping=!0}}var ig="top",ag="bottom",rg="right",og="left",sg="auto",lg=[ig,ag,rg,og],ug="start",hg="end",cg="clippingParents",gg="viewport",dg="popper",fg="reference",pg=lg.reduce(function(t,n){return t.concat([n+"-"+ug,n+"-"+hg])},[]),_g=[].concat(lg,[sg]).reduce(function(t,n){return t.concat([n,n+"-"+ug,n+"-"+hg])},[]),mg=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function yg(t){return t?(t.nodeName||"").toLowerCase():null}function vg(t){var n;return null==t?window:"[object Window]"!==t.toString()?(n=t.ownerDocument)&&n.defaultView||window:t}function bg(t){return t instanceof vg(t).Element||t instanceof Element}function xg(t){return t instanceof vg(t).HTMLElement||t instanceof HTMLElement}function wg(t){
3475
3474
  // IE 11 has no ShadowRoot
3476
- return"undefined"!=typeof ShadowRoot&&(t instanceof yg(t).ShadowRoot||t instanceof ShadowRoot)}
3475
+ return"undefined"!=typeof ShadowRoot&&(t instanceof vg(t).ShadowRoot||t instanceof ShadowRoot)}
3477
3476
  // and applies them to the HTMLElements such as popper and arrow
3478
- function wg(t){return t.split("-")[0]}var Sg=Math.max,Cg=Math.min,kg=Math.round;function Ag(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Mg(){return!/^((?!chrome|android).)*safari/i.test(Ag())}function Eg(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var i=t.getBoundingClientRect(),a=1,r=1;n&&bg(t)&&(a=0<t.offsetWidth&&kg(i.width)/t.offsetWidth||1,r=0<t.offsetHeight&&kg(i.height)/t.offsetHeight||1);n=(vg(t)?yg(t):window).visualViewport,t=!Mg()&&e,e=(i.left+(t&&n?n.offsetLeft:0))/a,t=(i.top+(t&&n?n.offsetTop:0))/r,n=i.width/a,a=i.height/r;return{width:n,height:a,top:t,right:e+n,bottom:t+a,left:e,x:e,y:t}}
3477
+ function Sg(t){return t.split("-")[0]}var Cg=Math.max,kg=Math.min,Ag=Math.round;function Mg(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Eg(){return!/^((?!chrome|android).)*safari/i.test(Mg())}function zg(t,n,e){void 0===n&&(n=!1),void 0===e&&(e=!1);var i=t.getBoundingClientRect(),a=1,r=1;n&&xg(t)&&(a=0<t.offsetWidth&&Ag(i.width)/t.offsetWidth||1,r=0<t.offsetHeight&&Ag(i.height)/t.offsetHeight||1);n=(bg(t)?vg(t):window).visualViewport,t=!Eg()&&e,e=(i.left+(t&&n?n.offsetLeft:0))/a,t=(i.top+(t&&n?n.offsetTop:0))/r,n=i.width/a,a=i.height/r;return{width:n,height:a,top:t,right:e+n,bottom:t+a,left:e,x:e,y:t}}
3479
3478
  // means it doesn't take into account transforms.
3480
- function zg(t){var n=Eg(t),e=t.offsetWidth,i=t.offsetHeight;// Use the clientRect sizes if it's not been transformed.
3479
+ function Tg(t){var n=zg(t),e=t.offsetWidth,i=t.offsetHeight;// Use the clientRect sizes if it's not been transformed.
3481
3480
  // Fixes https://github.com/popperjs/popper-core/issues/1223
3482
- return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function Tg(t,n){var e=n.getRootNode&&n.getRootNode();// First, attempt with faster native method
3481
+ return Math.abs(n.width-e)<=1&&(e=n.width),Math.abs(n.height-i)<=1&&(i=n.height),{x:t.offsetLeft,y:t.offsetTop,width:e,height:i}}function Bg(t,n){var e=n.getRootNode&&n.getRootNode();// First, attempt with faster native method
3483
3482
  if(t.contains(n))return!0;// Give up, the result is false
3484
- if(e&&xg(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;// $FlowFixMe[prop-missing]: need a better way to handle this...
3485
- }while(i=i.parentNode||i.host)}return!1}function Bg(t){return yg(t).getComputedStyle(t)}function Dg(t){
3483
+ if(e&&wg(e)){var i=n;do{if(i&&t.isSameNode(i))return!0;// $FlowFixMe[prop-missing]: need a better way to handle this...
3484
+ }while(i=i.parentNode||i.host)}return!1}function Dg(t){return vg(t).getComputedStyle(t)}function Ng(t){
3486
3485
  // $FlowFixMe[incompatible-return]: assume body is always available
3487
- return((vg(t)?t.ownerDocument:t.document)||window.document).documentElement}function Ng(t){return"html"===mg(t)?t:// $FlowFixMe[incompatible-return]
3486
+ return((bg(t)?t.ownerDocument:t.document)||window.document).documentElement}function Pg(t){return"html"===yg(t)?t:// $FlowFixMe[incompatible-return]
3488
3487
  // $FlowFixMe[prop-missing]
3489
3488
  t.assignedSlot||// step into the shadow DOM of the parent of a slotted node
3490
- t.parentNode||(xg(t)?t.host:null)||// ShadowRoot detected
3489
+ t.parentNode||(wg(t)?t.host:null)||// ShadowRoot detected
3491
3490
  // $FlowFixMe[incompatible-call]: HTMLElement is a Node
3492
- Dg(t)}function Pg(t){return bg(t)&&// https://github.com/popperjs/popper-core/issues/837
3493
- "fixed"!==Bg(t).position?t.offsetParent:null}// `.offsetParent` reports `null` for fixed elements, while absolute elements
3491
+ Ng(t)}function Lg(t){return xg(t)&&// https://github.com/popperjs/popper-core/issues/837
3492
+ "fixed"!==Dg(t).position?t.offsetParent:null}// `.offsetParent` reports `null` for fixed elements, while absolute elements
3494
3493
  // return the containing block
3495
3494
  // Gets the closest ancestor positioned element. Handles some edge cases,
3496
3495
  // such as table ancestors and cross browser bugs.
3497
- function Lg(t){for(var n,e=yg(t),i=Pg(t);i&&(n=i,0<=["table","td","th"].indexOf(mg(n)))&&"static"===Bg(i).position;)i=Pg(i);return(!i||"html"!==mg(i)&&("body"!==mg(i)||"static"!==Bg(i).position))&&(i||(t=>{var n=/firefox/i.test(Ag()),e=/Trident/i.test(Ag());if(!e||!bg(t)||"fixed"!==Bg(t).position){var i=Ng(t);for(xg(i)&&(i=i.host);bg(i)&&["html","body"].indexOf(mg(i))<0;){var a=Bg(i);// This is non-exhaustive but covers the most common CSS properties that
3496
+ function Fg(t){for(var n,e=vg(t),i=Lg(t);i&&(n=i,0<=["table","td","th"].indexOf(yg(n)))&&"static"===Dg(i).position;)i=Lg(i);return(!i||"html"!==yg(i)&&("body"!==yg(i)||"static"!==Dg(i).position))&&(i||(t=>{var n=/firefox/i.test(Mg()),e=/Trident/i.test(Mg());if(!e||!xg(t)||"fixed"!==Dg(t).position){var i=Pg(t);for(wg(i)&&(i=i.host);xg(i)&&["html","body"].indexOf(yg(i))<0;){var a=Dg(i);// This is non-exhaustive but covers the most common CSS properties that
3498
3497
  // create a containing block.
3499
3498
  // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
3500
- if("none"!==a.transform||"none"!==a.perspective||"paint"===a.contain||-1!==["transform","perspective"].indexOf(a.willChange)||n&&"filter"===a.willChange||n&&a.filter&&"none"!==a.filter)return i;i=i.parentNode}}return null})(t))||e}function Fg(t){return 0<=["top","bottom"].indexOf(t)?"x":"y"}function Og(t,n,e){return Sg(t,Cg(n,e))}function Rg(){return{top:0,right:0,bottom:0,left:0}}function jg(t){return Object.assign({},Rg(),t)}function Ig(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function Hg(t){return t.split("-")[1]}var Gg={top:"auto",right:"auto",bottom:"auto",left:"auto"};// Round the offsets to the nearest suitable subpixel based on the DPR.
3499
+ if("none"!==a.transform||"none"!==a.perspective||"paint"===a.contain||-1!==["transform","perspective"].indexOf(a.willChange)||n&&"filter"===a.willChange||n&&a.filter&&"none"!==a.filter)return i;i=i.parentNode}}return null})(t))||e}function Og(t){return 0<=["top","bottom"].indexOf(t)?"x":"y"}function Rg(t,n,e){return Cg(t,kg(n,e))}function jg(){return{top:0,right:0,bottom:0,left:0}}function Ig(t){return Object.assign({},jg(),t)}function Hg(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}function Gg(t){return t.split("-")[1]}var Kg={top:"auto",right:"auto",bottom:"auto",left:"auto"};// Round the offsets to the nearest suitable subpixel based on the DPR.
3501
3500
  // Zooming can change the DPR, but it seems to report a value that will
3502
3501
  // cleanly divide the values into the appropriate subpixels.
3503
- function Kg(t){var n,e=t.popper,i=t.popperRect,a=t.placement,r=t.variation,o=t.offsets,s=t.position,l=t.gpuAcceleration,u=t.adaptive,h=t.roundOffsets,t=t.isFixed,c=o.x,c=void 0===c?0:c,g=o.y,g=void 0===g?0:g,d="function"==typeof h?h({x:c,y:g}):{x:c,y:g},d=(c=d.x,g=d.y,o.hasOwnProperty("x")),o=o.hasOwnProperty("y"),f=rg,p=eg,_=window,m=(u&&(m="clientHeight",n="clientWidth",(y=Lg(e))===yg(e)&&"static"!==Bg(y=Dg(e)).position&&"absolute"===s&&(m="scrollHeight",n="scrollWidth"),a!==eg&&(a!==rg&&a!==ag||r!==ug)||(p=ig,g=(g-((t&&y===_&&_.visualViewport?_.visualViewport.height:y[m])-i.height))*(l?1:-1)),a!==rg&&(a!==eg&&a!==ig||r!==ug)||(f=ag,c=(c-((t&&y===_&&_.visualViewport?_.visualViewport.width:y[n])-i.width))*(l?1:-1))),Object.assign({position:s},u&&Gg)),y=!0===h?(a={x:c,y:g},r=yg(e),t=a.x,a=a.y,r=r.devicePixelRatio||1,{x:kg(t*r)/r||0,y:kg(a*r)/r||0}):{x:c,y:g};return c=y.x,g=y.y,l?Object.assign({},m,((n={})[p]=o?"0":"",n[f]=d?"0":"",n.transform=(_.devicePixelRatio||1)<=1?"translate("+c+"px, "+g+"px)":"translate3d("+c+"px, "+g+"px, 0)",n)):Object.assign({},m,((i={})[p]=o?g+"px":"",i[f]=d?c+"px":"",i.transform="",i))}// eslint-disable-next-line import/no-unused-modules
3504
- var $g={passive:!0};// eslint-disable-next-line import/no-unused-modules
3505
- var qg={left:"right",right:"left",bottom:"top",top:"bottom"};function Ug(t){return t.replace(/left|right|bottom|top/g,function(t){return qg[t]})}var Wg={start:"end",end:"start"};function Yg(t){return t.replace(/start|end/g,function(t){return Wg[t]})}function Vg(t){t=yg(t);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Zg(t){
3502
+ function $g(t){var n,e=t.popper,i=t.popperRect,a=t.placement,r=t.variation,o=t.offsets,s=t.position,l=t.gpuAcceleration,u=t.adaptive,h=t.roundOffsets,t=t.isFixed,c=o.x,c=void 0===c?0:c,g=o.y,g=void 0===g?0:g,d="function"==typeof h?h({x:c,y:g}):{x:c,y:g},d=(c=d.x,g=d.y,o.hasOwnProperty("x")),o=o.hasOwnProperty("y"),f=og,p=ig,_=window,m=(u&&(m="clientHeight",n="clientWidth",(y=Fg(e))===vg(e)&&"static"!==Dg(y=Ng(e)).position&&"absolute"===s&&(m="scrollHeight",n="scrollWidth"),a!==ig&&(a!==og&&a!==rg||r!==hg)||(p=ag,g=(g-((t&&y===_&&_.visualViewport?_.visualViewport.height:y[m])-i.height))*(l?1:-1)),a!==og&&(a!==ig&&a!==ag||r!==hg)||(f=rg,c=(c-((t&&y===_&&_.visualViewport?_.visualViewport.width:y[n])-i.width))*(l?1:-1))),Object.assign({position:s},u&&Kg)),y=!0===h?(a={x:c,y:g},r=vg(e),t=a.x,a=a.y,r=r.devicePixelRatio||1,{x:Ag(t*r)/r||0,y:Ag(a*r)/r||0}):{x:c,y:g};return c=y.x,g=y.y,l?Object.assign({},m,((n={})[p]=o?"0":"",n[f]=d?"0":"",n.transform=(_.devicePixelRatio||1)<=1?"translate("+c+"px, "+g+"px)":"translate3d("+c+"px, "+g+"px, 0)",n)):Object.assign({},m,((i={})[p]=o?g+"px":"",i[f]=d?c+"px":"",i.transform="",i))}// eslint-disable-next-line import/no-unused-modules
3503
+ var qg={passive:!0};// eslint-disable-next-line import/no-unused-modules
3504
+ var Ug={left:"right",right:"left",bottom:"top",top:"bottom"};function Wg(t){return t.replace(/left|right|bottom|top/g,function(t){return Ug[t]})}var Yg={start:"end",end:"start"};function Vg(t){return t.replace(/start|end/g,function(t){return Yg[t]})}function Zg(t){t=vg(t);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Xg(t){
3506
3505
  // If <html> has a CSS width greater than the viewport, then this will be
3507
3506
  // incorrect for RTL.
3508
3507
  // Popper 1 is broken in this case and never had a bug report so let's assume
@@ -3510,29 +3509,29 @@ var qg={left:"right",right:"left",bottom:"top",top:"bottom"};function Ug(t){retu
3510
3509
  // anyway.
3511
3510
  // Browsers where the left scrollbar doesn't cause an issue report `0` for
3512
3511
  // this (e.g. Edge 2019, IE11, Safari)
3513
- return Eg(Dg(t)).left+Vg(t).scrollLeft}function Xg(t){
3512
+ return zg(Ng(t)).left+Zg(t).scrollLeft}function Jg(t){
3514
3513
  // Firefox wants us to check `-x` and `-y` variations as well
3515
- var t=Bg(t),n=t.overflow;return/auto|scroll|overlay|hidden/.test(n+t.overflowY+t.overflowX)}
3514
+ var t=Dg(t),n=t.overflow;return/auto|scroll|overlay|hidden/.test(n+t.overflowY+t.overflowX)}
3516
3515
  /*
3517
3516
  given a DOM element, return the list of all scroll parents, up the list of ancesors
3518
3517
  until we get to the top window object. This list is what we attach scroll listeners
3519
3518
  to, because if any of these parent elements scroll, we'll need to re-calculate the
3520
3519
  reference element's position.
3521
- */function Jg(t,n){void 0===n&&(n=[]);var e=function t(n){return 0<=["html","body","#document"].indexOf(mg(n))?n.ownerDocument.body:bg(n)&&Xg(n)?n:t(Ng(n))}(t),t=e===(null==(t=t.ownerDocument)?void 0:t.body),i=yg(e),i=t?[i].concat(i.visualViewport||[],Xg(e)?e:[]):e,e=n.concat(i);return t?e:e.concat(Jg(Ng(i)))}function Qg(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function td(t,n,e){return n===cg?Qg((a=e,o=yg(i=t),s=Dg(i),o=o.visualViewport,l=s.clientWidth,s=s.clientHeight,h=u=0,o&&(l=o.width,s=o.height,(r=Mg())||!r&&"fixed"===a)&&(u=o.offsetLeft,h=o.offsetTop),{width:l,height:s,x:u+Zg(i),y:h})):vg(n)?((a=Eg(r=n,!1,"fixed"===(a=e))).top=a.top+r.clientTop,a.left=a.left+r.clientLeft,a.bottom=a.top+r.clientHeight,a.right=a.left+r.clientWidth,a.width=r.clientWidth,a.height=r.clientHeight,a.x=a.left,a.y=a.top,a):Qg((o=Dg(t),l=Dg(o),s=Vg(o),u=null==(u=o.ownerDocument)?void 0:u.body,i=Sg(l.scrollWidth,l.clientWidth,u?u.scrollWidth:0,u?u.clientWidth:0),h=Sg(l.scrollHeight,l.clientHeight,u?u.scrollHeight:0,u?u.clientHeight:0),o=-s.scrollLeft+Zg(o),s=-s.scrollTop,"rtl"===Bg(u||l).direction&&(o+=Sg(l.clientWidth,u?u.clientWidth:0)-i),{width:i,height:h,x:o,y:s}));
3520
+ */function Qg(t,n){void 0===n&&(n=[]);var e=function t(n){return 0<=["html","body","#document"].indexOf(yg(n))?n.ownerDocument.body:xg(n)&&Jg(n)?n:t(Pg(n))}(t),t=e===(null==(t=t.ownerDocument)?void 0:t.body),i=vg(e),i=t?[i].concat(i.visualViewport||[],Jg(e)?e:[]):e,e=n.concat(i);return t?e:e.concat(Qg(Pg(i)))}function td(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function nd(t,n,e){return n===gg?td((a=e,o=vg(i=t),s=Ng(i),o=o.visualViewport,l=s.clientWidth,s=s.clientHeight,h=u=0,o&&(l=o.width,s=o.height,(r=Eg())||!r&&"fixed"===a)&&(u=o.offsetLeft,h=o.offsetTop),{width:l,height:s,x:u+Xg(i),y:h})):bg(n)?((a=zg(r=n,!1,"fixed"===(a=e))).top=a.top+r.clientTop,a.left=a.left+r.clientLeft,a.bottom=a.top+r.clientHeight,a.right=a.left+r.clientWidth,a.width=r.clientWidth,a.height=r.clientHeight,a.x=a.left,a.y=a.top,a):td((o=Ng(t),l=Ng(o),s=Zg(o),u=null==(u=o.ownerDocument)?void 0:u.body,i=Cg(l.scrollWidth,l.clientWidth,u?u.scrollWidth:0,u?u.clientWidth:0),h=Cg(l.scrollHeight,l.clientHeight,u?u.scrollHeight:0,u?u.clientHeight:0),o=-s.scrollLeft+Xg(o),s=-s.scrollTop,"rtl"===Dg(u||l).direction&&(o+=Cg(l.clientWidth,u?u.clientWidth:0)-i),{width:i,height:h,x:o,y:s}));
3522
3521
  // of the `<html>` and `<body>` rect bounds if horizontally scrollable
3523
3522
  var i,a,r,o,s,l,u,h}// A "clipping parent" is an overflowable container with the characteristic of
3524
3523
  // clipping (or hiding) overflowing elements with a position different from
3525
3524
  // `initial`
3526
3525
  // Gets the maximum area that the element is visible in due to any number of
3527
3526
  // clipping parents
3528
- function nd(e,t,n,i){var a,r="clippingParents"===t?(o=Jg(Ng(r=e)),vg(a=0<=["absolute","fixed"].indexOf(Bg(r).position)&&bg(r)?Lg(r):r)?o.filter(function(t){return vg(t)&&Tg(t,a)&&"body"!==mg(t)}):[]):[].concat(t),o=[].concat(r,[n]),t=o[0],n=o.reduce(function(t,n){n=td(e,n,i);return t.top=Sg(n.top,t.top),t.right=Cg(n.right,t.right),t.bottom=Cg(n.bottom,t.bottom),t.left=Sg(n.left,t.left),t},td(e,t,i));return n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function ed(t){var n,e=t.reference,i=t.element,t=t.placement,a=t?wg(t):null,t=t?Hg(t):null,r=e.x+e.width/2-i.width/2,o=e.y+e.height/2-i.height/2;switch(a){case eg:n={x:r,y:e.y-i.height};break;case ig:n={x:r,y:e.y+e.height};break;case ag:n={x:e.x+e.width,y:o};break;case rg:n={x:e.x-i.width,y:o};break;default:n={x:e.x,y:e.y}}var s=a?Fg(a):null;if(null!=s){var l="y"===s?"height":"width";switch(t){case lg:n[s]=n[s]-(e[l]/2-i[l]/2);break;case ug:n[s]=n[s]+(e[l]/2-i[l]/2)}}return n}function id(t,n){var i,n=n=void 0===n?{}:n,e=n.placement,e=void 0===e?t.placement:e,a=n.strategy,a=void 0===a?t.strategy:a,r=n.boundary,r=void 0===r?hg:r,o=n.rootBoundary,o=void 0===o?cg:o,s=n.elementContext,s=void 0===s?gg:s,l=n.altBoundary,l=void 0!==l&&l,n=n.padding,n=void 0===n?0:n,n=jg("number"!=typeof n?n:Ig(n,sg)),u=t.rects.popper,l=t.elements[l?s===gg?dg:gg:s],l=nd(vg(l)?l:l.contextElement||Dg(t.elements.popper),r,o,a),r=Eg(t.elements.reference),o=ed({reference:r,element:u,placement:e}),a=Qg(Object.assign({},u,o)),u=s===gg?a:r,h={top:l.top-u.top+n.top,bottom:u.bottom-l.bottom+n.bottom,left:l.left-u.left+n.left,right:u.right-l.right+n.right},o=t.modifiersData.offset;// Offsets can be applied only to the popper element
3529
- return s===gg&&o&&(i=o[e],Object.keys(h).forEach(function(t){var n=0<=[ag,ig].indexOf(t)?1:-1,e=0<=[eg,ig].indexOf(t)?"y":"x";h[t]+=i[e]*n})),h}function ad(t,n,e){return{top:t.top-n.height-(e=void 0===e?{x:0,y:0}:e).y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function rd(n){return[eg,ag,ig,rg].some(function(t){return 0<=n[t]})}// Returns the composite rect of an element relative to its offsetParent.
3527
+ function ed(e,t,n,i){var a,r="clippingParents"===t?(o=Qg(Pg(r=e)),bg(a=0<=["absolute","fixed"].indexOf(Dg(r).position)&&xg(r)?Fg(r):r)?o.filter(function(t){return bg(t)&&Bg(t,a)&&"body"!==yg(t)}):[]):[].concat(t),o=[].concat(r,[n]),t=o[0],n=o.reduce(function(t,n){n=nd(e,n,i);return t.top=Cg(n.top,t.top),t.right=kg(n.right,t.right),t.bottom=kg(n.bottom,t.bottom),t.left=Cg(n.left,t.left),t},nd(e,t,i));return n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function id(t){var n,e=t.reference,i=t.element,t=t.placement,a=t?Sg(t):null,t=t?Gg(t):null,r=e.x+e.width/2-i.width/2,o=e.y+e.height/2-i.height/2;switch(a){case ig:n={x:r,y:e.y-i.height};break;case ag:n={x:r,y:e.y+e.height};break;case rg:n={x:e.x+e.width,y:o};break;case og:n={x:e.x-i.width,y:o};break;default:n={x:e.x,y:e.y}}var s=a?Og(a):null;if(null!=s){var l="y"===s?"height":"width";switch(t){case ug:n[s]=n[s]-(e[l]/2-i[l]/2);break;case hg:n[s]=n[s]+(e[l]/2-i[l]/2)}}return n}function ad(t,n){var i,n=n=void 0===n?{}:n,e=n.placement,e=void 0===e?t.placement:e,a=n.strategy,a=void 0===a?t.strategy:a,r=n.boundary,r=void 0===r?cg:r,o=n.rootBoundary,o=void 0===o?gg:o,s=n.elementContext,s=void 0===s?dg:s,l=n.altBoundary,l=void 0!==l&&l,n=n.padding,n=void 0===n?0:n,n=Ig("number"!=typeof n?n:Hg(n,lg)),u=t.rects.popper,l=t.elements[l?s===dg?fg:dg:s],l=ed(bg(l)?l:l.contextElement||Ng(t.elements.popper),r,o,a),r=zg(t.elements.reference),o=id({reference:r,element:u,placement:e}),a=td(Object.assign({},u,o)),u=s===dg?a:r,h={top:l.top-u.top+n.top,bottom:u.bottom-l.bottom+n.bottom,left:l.left-u.left+n.left,right:u.right-l.right+n.right},o=t.modifiersData.offset;// Offsets can be applied only to the popper element
3528
+ return s===dg&&o&&(i=o[e],Object.keys(h).forEach(function(t){var n=0<=[rg,ag].indexOf(t)?1:-1,e=0<=[ig,ag].indexOf(t)?"y":"x";h[t]+=i[e]*n})),h}function rd(t,n,e){return{top:t.top-n.height-(e=void 0===e?{x:0,y:0}:e).y,right:t.right-n.width+e.x,bottom:t.bottom-n.height+e.y,left:t.left-n.width-e.x}}function od(n){return[ig,rg,ag,og].some(function(t){return 0<=n[t]})}// Returns the composite rect of an element relative to its offsetParent.
3530
3529
  // Composite means it takes into account transforms as well as layout.
3531
- function od(t,n,e){void 0===e&&(e=!1);var i=bg(n),a=bg(n)&&(o=(a=n).getBoundingClientRect(),r=kg(o.width)/a.offsetWidth||1,o=kg(o.height)/a.offsetHeight||1,1!==r||1!==o),r=Dg(n),o=Eg(t,a,e),t={scrollLeft:0,scrollTop:0},s={x:0,y:0};return!i&&e||("body"===mg(n)&&// https://github.com/popperjs/popper-core/issues/1078
3532
- !Xg(r)||(t=(i=n)!==yg(i)&&bg(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:Vg(i)),bg(n)?((s=Eg(n,!0)).x+=n.clientLeft,s.y+=n.clientTop):r&&(s.x=Zg(r))),{x:o.left+t.scrollLeft-s.x,y:o.top+t.scrollTop-s.y,width:o.width,height:o.height}}function sd(t){var e=new Map,i=new Set,a=[];return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){i.has(t.name)||
3530
+ function sd(t,n,e){void 0===e&&(e=!1);var i=xg(n),a=xg(n)&&(o=(a=n).getBoundingClientRect(),r=Ag(o.width)/a.offsetWidth||1,o=Ag(o.height)/a.offsetHeight||1,1!==r||1!==o),r=Ng(n),o=zg(t,a,e),t={scrollLeft:0,scrollTop:0},s={x:0,y:0};return!i&&e||("body"===yg(n)&&// https://github.com/popperjs/popper-core/issues/1078
3531
+ !Jg(r)||(t=(i=n)!==vg(i)&&xg(i)?{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}:Zg(i)),xg(n)?((s=zg(n,!0)).x+=n.clientLeft,s.y+=n.clientTop):r&&(s.x=Xg(r))),{x:o.left+t.scrollLeft-s.x,y:o.top+t.scrollTop-s.y,width:o.width,height:o.height}}function ld(t){var e=new Map,i=new Set,a=[];return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){i.has(t.name)||
3533
3532
  // check for visited object
3534
3533
  !// On visiting object, check for its dependencies and visit them recursively
3535
- function n(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){i.has(t)||(t=e.get(t))&&n(t)}),a.push(t)}(t)}),a}var ld={placement:"bottom",modifiers:[],strategy:"absolute"};function ud(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function hd(t){var t=t=void 0===t?{}:t,n=t.defaultModifiers,c=void 0===n?[]:n,n=t.defaultOptions,g=void 0===n?ld:n;return function(i,a,n){void 0===n&&(n=g);var e,r,o={placement:"bottom",orderedModifiers:[],options:Object.assign({},ld,g),modifiersData:{},elements:{reference:i,popper:a},attributes:{},styles:{}},s=[],l=!1,u={state:o,setOptions:function(t){var e,n,t="function"==typeof t?t(o.options):t,t=(h(),o.options=Object.assign({},g,o.options,t),o.scrollParents={reference:vg(i)?Jg(i):i.contextElement?Jg(i.contextElement):[],popper:Jg(a)},t=[].concat(c,o.options.modifiers),n=t.reduce(function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t},{}),t=Object.keys(n).map(function(t){return n[t]}),e=sd(t),_g.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[]));// Strip out disabled modifiers
3534
+ function n(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){i.has(t)||(t=e.get(t))&&n(t)}),a.push(t)}(t)}),a}var ud={placement:"bottom",modifiers:[],strategy:"absolute"};function hd(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return!n.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function cd(t){var t=t=void 0===t?{}:t,n=t.defaultModifiers,c=void 0===n?[]:n,n=t.defaultOptions,g=void 0===n?ud:n;return function(i,a,n){void 0===n&&(n=g);var e,r,o={placement:"bottom",orderedModifiers:[],options:Object.assign({},ud,g),modifiersData:{},elements:{reference:i,popper:a},attributes:{},styles:{}},s=[],l=!1,u={state:o,setOptions:function(t){var e,n,t="function"==typeof t?t(o.options):t,t=(h(),o.options=Object.assign({},g,o.options,t),o.scrollParents={reference:bg(i)?Qg(i):i.contextElement?Qg(i.contextElement):[],popper:Qg(a)},t=[].concat(c,o.options.modifiers),n=t.reduce(function(t,n){var e=t[n.name];return t[n.name]=e?Object.assign({},e,n,{options:Object.assign({},e.options,n.options),data:Object.assign({},e.data,n.data)}):n,t},{}),t=Object.keys(n).map(function(t){return n[t]}),e=ld(t),mg.reduce(function(t,n){return t.concat(e.filter(function(t){return t.phase===n}))},[]));// Strip out disabled modifiers
3536
3535
  return o.orderedModifiers=t.filter(function(t){return t.enabled}),o.orderedModifiers.forEach(function(t){var n=t.name,e=t.options,t=t.effect;"function"==typeof t&&(t=t({state:o,name:n,instance:u,options:void 0===e?{}:e}),s.push(t||function(){}))}),u.update()},
3537
3536
  // Sync update – it will always be executed, even if not necessary. This
3538
3537
  // is useful for low frequency updates where sync behavior simplifies the
@@ -3541,8 +3540,8 @@ return o.orderedModifiers=t.filter(function(t){return t.enabled}),o.orderedModif
3541
3540
  // prefer the async Popper#update method
3542
3541
  forceUpdate:function(){if(!l){var t=o.elements,n=t.reference,t=t.popper;// Don't proceed if `reference` or `popper` are not valid elements
3543
3542
  // anymore
3544
- if(ud(n,t)){// Store the reference and popper rects to be read by modifiers
3545
- o.rects={reference:od(n,Lg(t),"fixed"===o.options.strategy),popper:zg(t)},// Modifiers have the ability to reset the current update cycle. The
3543
+ if(hd(n,t)){// Store the reference and popper rects to be read by modifiers
3544
+ o.rects={reference:sd(n,Fg(t),"fixed"===o.options.strategy),popper:Tg(t)},// Modifiers have the ability to reset the current update cycle. The
3546
3545
  // most common use case for this is the `flip` modifier changing the
3547
3546
  // placement, which then needs to re-run all the modifiers, because the
3548
3547
  // logic was previously ran for the previous placement and is therefore
@@ -3554,32 +3553,32 @@ o.reset=!1,o.placement=o.options.placement,// On each update cycle, the `modifie
3554
3553
  o.orderedModifiers.forEach(function(t){return o.modifiersData[t.name]=Object.assign({},t.data)});for(var e,i,a,r=0;r<o.orderedModifiers.length;r++)!0===o.reset?(o.reset=!1,r=-1):(i=(e=o.orderedModifiers[r]).fn,a=e.options,"function"==typeof i&&(o=i({state:o,options:void 0===a?{}:a,name:e.name,instance:u})||o))}}},
3555
3554
  // Async and optimistically optimized update – it will not be executed if
3556
3555
  // not necessary (debounced to run at most once-per-tick)
3557
- update:(e=function(){return new Promise(function(t){u.forceUpdate(),t(o)})},function(){return r=r||new Promise(function(t){Promise.resolve().then(function(){r=void 0,t(e())})})}),destroy:function(){h(),l=!0}};return ud(i,a)&&u.setOptions(n).then(function(t){!l&&n.onFirstUpdate&&n.onFirstUpdate(t)}),u;function h(){s.forEach(function(t){return t()}),s=[]}}}var cd=hd({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,i=(t=t.options).scroll,a=void 0===i||i,r=void 0===(i=t.resize)||i,o=yg(n.elements.popper),s=[].concat(n.scrollParents.reference,n.scrollParents.popper);return a&&s.forEach(function(t){t.addEventListener("scroll",e.update,$g)}),r&&o.addEventListener("resize",e.update,$g),function(){a&&s.forEach(function(t){t.removeEventListener("scroll",e.update,$g)}),r&&o.removeEventListener("resize",e.update,$g)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;
3556
+ update:(e=function(){return new Promise(function(t){u.forceUpdate(),t(o)})},function(){return r=r||new Promise(function(t){Promise.resolve().then(function(){r=void 0,t(e())})})}),destroy:function(){h(),l=!0}};return hd(i,a)&&u.setOptions(n).then(function(t){!l&&n.onFirstUpdate&&n.onFirstUpdate(t)}),u;function h(){s.forEach(function(t){return t()}),s=[]}}}var gd=cd({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var n=t.state,e=t.instance,i=(t=t.options).scroll,a=void 0===i||i,r=void 0===(i=t.resize)||i,o=vg(n.elements.popper),s=[].concat(n.scrollParents.reference,n.scrollParents.popper);return a&&s.forEach(function(t){t.addEventListener("scroll",e.update,qg)}),r&&o.addEventListener("resize",e.update,qg),function(){a&&s.forEach(function(t){t.removeEventListener("scroll",e.update,qg)}),r&&o.removeEventListener("resize",e.update,qg)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var n=t.state;
3558
3557
  // Offsets are the actual position the popper needs to have to be
3559
3558
  // properly positioned near its reference element
3560
3559
  // This is the most basic placement, and will be adjusted by
3561
3560
  // the modifiers in the next step
3562
- n.modifiersData[t.name]=ed({reference:n.rects.reference,element:n.rects.popper,placement:n.placement})}// eslint-disable-next-line import/no-unused-modules
3563
- ,data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=void 0===(e=(t=t.options).gpuAcceleration)||e,i=void 0===(i=t.adaptive)||i,t=void 0===(t=t.roundOffsets)||t,e={placement:wg(n.placement),variation:Hg(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:e,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,Kg(Object.assign({},e,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:i,roundOffsets:t})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,Kg(Object.assign({},e,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:t})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var a=t.state;Object.keys(a.elements).forEach(function(t){var n=a.styles[t]||{},e=a.attributes[t]||{},i=a.elements[t];// arrow is optional + virtual elements
3564
- bg(i)&&mg(i)&&(// Flow doesn't support to extend this property, but it's the most
3561
+ n.modifiersData[t.name]=id({reference:n.rects.reference,element:n.rects.popper,placement:n.placement})}// eslint-disable-next-line import/no-unused-modules
3562
+ ,data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var n=t.state,e=void 0===(e=(t=t.options).gpuAcceleration)||e,i=void 0===(i=t.adaptive)||i,t=void 0===(t=t.roundOffsets)||t,e={placement:Sg(n.placement),variation:Gg(n.placement),popper:n.elements.popper,popperRect:n.rects.popper,gpuAcceleration:e,isFixed:"fixed"===n.options.strategy};null!=n.modifiersData.popperOffsets&&(n.styles.popper=Object.assign({},n.styles.popper,$g(Object.assign({},e,{offsets:n.modifiersData.popperOffsets,position:n.options.strategy,adaptive:i,roundOffsets:t})))),null!=n.modifiersData.arrow&&(n.styles.arrow=Object.assign({},n.styles.arrow,$g(Object.assign({},e,{offsets:n.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:t})))),n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-placement":n.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var a=t.state;Object.keys(a.elements).forEach(function(t){var n=a.styles[t]||{},e=a.attributes[t]||{},i=a.elements[t];// arrow is optional + virtual elements
3563
+ xg(i)&&yg(i)&&(// Flow doesn't support to extend this property, but it's the most
3565
3564
  // effective way to apply styles to an HTMLElement
3566
3565
  // $FlowFixMe[cannot-write]
3567
3566
  Object.assign(i.style,n),Object.keys(e).forEach(function(t){var n=e[t];!1===n?i.removeAttribute(t):i.setAttribute(t,!0===n?"":n)}))})},effect:function(t){var i=t.state,a={popper:{position:i.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(i.elements.popper.style,a.popper),i.styles=a,i.elements.arrow&&Object.assign(i.elements.arrow.style,a.arrow),function(){Object.keys(i.elements).forEach(function(t){var n=i.elements[t],e=i.attributes[t]||{},t=Object.keys((i.styles.hasOwnProperty(t)?i.styles:a)[t]).reduce(function(t,n){return t[n]="",t},{});// arrow is optional + virtual elements
3568
- bg(n)&&mg(n)&&(Object.assign(n.style,t),Object.keys(e).forEach(function(t){n.removeAttribute(t)}))})}}// eslint-disable-next-line import/no-unused-modules
3569
- ,requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var o=t.state,n=t.name,s=void 0===(t=t.options.offset)?[0,0]:t,t=pg.reduce(function(t,n){var e,i,a,r;return t[n]=(n=n,e=o.rects,i=s,a=wg(n),r=0<=[rg,eg].indexOf(a)?-1:1,n=(e="function"==typeof i?i(Object.assign({},e,{placement:n})):i)[0]||0,i=(e[1]||0)*r,0<=[rg,ag].indexOf(a)?{x:i,y:n}:{x:n,y:i}),t},{}),e=(i=t[o.placement]).x,i=i.y;null!=o.modifiersData.popperOffsets&&(o.modifiersData.popperOffsets.x+=e,o.modifiersData.popperOffsets.y+=i),o.modifiersData[n]=t}// eslint-disable-next-line import/no-unused-modules
3570
- },{name:"flip",enabled:!0,phase:"main",fn:function(t){var c=t.state,n=t.options,t=t.name;if(!c.modifiersData[t]._skip){for(var e=n.mainAxis,i=void 0===e||e,e=n.altAxis,a=void 0===e||e,e=n.fallbackPlacements,g=n.padding,d=n.boundary,f=n.rootBoundary,r=n.altBoundary,o=n.flipVariations,p=void 0===o||o,_=n.allowedAutoPlacements,o=c.options.placement,n=wg(o),e=e||(n===o||!p?[Ug(o)]:wg(e=o)===og?[]:(n=Ug(e),[Yg(e),n,Yg(n)])),s=[o].concat(e).reduce(function(t,n){return t.concat(wg(n)===og?(e=c,i=(t=t=void 0===(t={placement:n,boundary:d,rootBoundary:f,padding:g,flipVariations:p,allowedAutoPlacements:_})?{}:t).placement,a=t.boundary,r=t.rootBoundary,o=t.padding,s=t.flipVariations,l=void 0===(t=t.allowedAutoPlacements)?pg:t,u=Hg(i),t=u?s?fg:fg.filter(function(t){return Hg(t)===u}):sg,h=(i=0===(i=t.filter(function(t){return 0<=l.indexOf(t)})).length?t:i).reduce(function(t,n){return t[n]=id(e,{placement:n,boundary:a,rootBoundary:r,padding:o})[wg(n)],t},{}),Object.keys(h).sort(function(t,n){return h[t]-h[n]})):n);var e,i,a,r,o,s,l,u,h},[]),l=c.rects.reference,u=c.rects.popper,h=new Map,m=!0,y=s[0],v=0;v<s.length;v++){var b=s[v],x=wg(b),w=Hg(b)===lg,S=0<=[eg,ig].indexOf(x),C=S?"width":"height",k=id(c,{placement:b,boundary:d,rootBoundary:f,altBoundary:r,padding:g}),S=S?w?ag:rg:w?ig:eg,w=(l[C]>u[C]&&(S=Ug(S)),Ug(S)),C=[];if(i&&C.push(k[x]<=0),a&&C.push(k[S]<=0,k[w]<=0),C.every(function(t){return t})){y=b,m=!1;break}h.set(b,C)}if(m)for(
3567
+ xg(n)&&yg(n)&&(Object.assign(n.style,t),Object.keys(e).forEach(function(t){n.removeAttribute(t)}))})}}// eslint-disable-next-line import/no-unused-modules
3568
+ ,requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var o=t.state,n=t.name,s=void 0===(t=t.options.offset)?[0,0]:t,t=_g.reduce(function(t,n){var e,i,a,r;return t[n]=(n=n,e=o.rects,i=s,a=Sg(n),r=0<=[og,ig].indexOf(a)?-1:1,n=(e="function"==typeof i?i(Object.assign({},e,{placement:n})):i)[0]||0,i=(e[1]||0)*r,0<=[og,rg].indexOf(a)?{x:i,y:n}:{x:n,y:i}),t},{}),e=(i=t[o.placement]).x,i=i.y;null!=o.modifiersData.popperOffsets&&(o.modifiersData.popperOffsets.x+=e,o.modifiersData.popperOffsets.y+=i),o.modifiersData[n]=t}// eslint-disable-next-line import/no-unused-modules
3569
+ },{name:"flip",enabled:!0,phase:"main",fn:function(t){var c=t.state,n=t.options,t=t.name;if(!c.modifiersData[t]._skip){for(var e=n.mainAxis,i=void 0===e||e,e=n.altAxis,a=void 0===e||e,e=n.fallbackPlacements,g=n.padding,d=n.boundary,f=n.rootBoundary,r=n.altBoundary,o=n.flipVariations,p=void 0===o||o,_=n.allowedAutoPlacements,o=c.options.placement,n=Sg(o),e=e||(n===o||!p?[Wg(o)]:Sg(e=o)===sg?[]:(n=Wg(e),[Vg(e),n,Vg(n)])),s=[o].concat(e).reduce(function(t,n){return t.concat(Sg(n)===sg?(e=c,i=(t=t=void 0===(t={placement:n,boundary:d,rootBoundary:f,padding:g,flipVariations:p,allowedAutoPlacements:_})?{}:t).placement,a=t.boundary,r=t.rootBoundary,o=t.padding,s=t.flipVariations,l=void 0===(t=t.allowedAutoPlacements)?_g:t,u=Gg(i),t=u?s?pg:pg.filter(function(t){return Gg(t)===u}):lg,h=(i=0===(i=t.filter(function(t){return 0<=l.indexOf(t)})).length?t:i).reduce(function(t,n){return t[n]=ad(e,{placement:n,boundary:a,rootBoundary:r,padding:o})[Sg(n)],t},{}),Object.keys(h).sort(function(t,n){return h[t]-h[n]})):n);var e,i,a,r,o,s,l,u,h},[]),l=c.rects.reference,u=c.rects.popper,h=new Map,m=!0,y=s[0],v=0;v<s.length;v++){var b=s[v],x=Sg(b),w=Gg(b)===ug,S=0<=[ig,ag].indexOf(x),C=S?"width":"height",k=ad(c,{placement:b,boundary:d,rootBoundary:f,altBoundary:r,padding:g}),S=S?w?rg:og:w?ag:ig,w=(l[C]>u[C]&&(S=Wg(S)),Wg(S)),C=[];if(i&&C.push(k[x]<=0),a&&C.push(k[S]<=0,k[w]<=0),C.every(function(t){return t})){y=b,m=!1;break}h.set(b,C)}if(m)for(
3571
3570
  // `2` may be desired in some cases – research later
3572
3571
  var A=p?3:1;0<A;A--)if("break"===(n=>{var t=s.find(function(t){t=h.get(t);if(t)return t.slice(0,n).every(function(t){return t})});if(t)return y=t,"break"})(A))break;c.placement!==y&&(c.modifiersData[t]._skip=!0,c.placement=y,c.reset=!0)}}// eslint-disable-next-line import/no-unused-modules
3573
- ,requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n,e,i,a,r,o,s,l,u,h=t.state,c=t.options,t=t.name,g=void 0===(g=c.mainAxis)||g,d=void 0!==(d=c.altAxis)&&d,f=void 0===(f=c.tether)||f,p=void 0===(p=c.tetherOffset)?0:p,c=id(h,{boundary:c.boundary,rootBoundary:c.rootBoundary,padding:c.padding,altBoundary:c.altBoundary}),_=wg(h.placement),m=Hg(h.placement),y=!m,v=Fg(_),b="x"===v?"y":"x",x=h.modifiersData.popperOffsets,w=h.rects.reference,S=h.rects.popper,p="number"==typeof(p="function"==typeof p?p(Object.assign({},h.rects,{placement:h.placement})):p)?{mainAxis:p,altAxis:p}:Object.assign({mainAxis:0,altAxis:0},p),C=h.modifiersData.offset?h.modifiersData.offset[h.placement]:null,k={x:0,y:0};x&&(g&&(g="y"===v?"height":"width",o=(s=x[v])+c[e="y"===v?eg:rg],l=s-c[u="y"===v?ig:ag],n=f?-S[g]/2:0,a=(m===lg?w:S)[g],m=m===lg?-S[g]:-w[g],r=h.elements.arrow,r=f&&r?zg(r):{width:0,height:0},e=(i=h.modifiersData["arrow#persistent"]?h.modifiersData["arrow#persistent"].padding:Rg())[e],i=i[u],u=Og(0,w[g],r[g]),r=y?w[g]/2-n-u-e-p.mainAxis:a-u-e-p.mainAxis,a=y?-w[g]/2+n+u+i+p.mainAxis:m+u+i+p.mainAxis,y=(e=h.elements.arrow&&Lg(h.elements.arrow))?"y"===v?e.clientTop||0:e.clientLeft||0:0,m=s+a-(n=null!=(g=null==C?void 0:C[v])?g:0),u=Og(f?Cg(o,s+r-n-y):o,s,f?Sg(l,m):l),x[v]=u,k[v]=u-s),d&&(i="y"==b?"height":"width",a=(e=x[b])+c["x"===v?eg:rg],g=e-c["x"===v?ig:ag],r=-1!==[eg,rg].indexOf(_),y=null!=(n=null==C?void 0:C[b])?n:0,o=r?a:e-w[i]-S[i]-y+p.altAxis,m=r?e+w[i]+S[i]-y-p.altAxis:g,s=f&&r?(l=Og(l=o,e,u=m),u<l?u:l):Og(f?o:a,e,f?m:g),x[b]=s,k[b]=s-e),h.modifiersData[t]=k)}// eslint-disable-next-line import/no-unused-modules
3574
- ,requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e,i,a,r=t.state,o=t.name,t=t.options,s=r.elements.arrow,l=r.modifiersData.popperOffsets,u=Fg(h=wg(r.placement)),h=0<=[rg,ag].indexOf(h)?"height":"width";s&&l&&(t=t.padding,e=r,e=jg("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Ig(t,sg)),t=zg(s),a="y"===u?eg:rg,i="y"===u?ig:ag,n=r.rects.reference[h]+r.rects.reference[u]-l[u]-r.rects.popper[h],l=l[u]-r.rects.reference[u],s=(s=Lg(s))?"y"===u?s.clientHeight||0:s.clientWidth||0:0,a=e[a],e=s-t[h]-e[i],a=Og(a,i=s/2-t[h]/2+(n/2-l/2),e),r.modifiersData[o]=((s={})[u]=a,s.centerOffset=a-i,s))},effect:function(t){var n=t.state;null!=(t=void 0===(t=t.options.element)?"[data-popper-arrow]":t)&&("string"!=typeof t||(t=n.elements.popper.querySelector(t)))&&Tg(n.elements.popper,t)&&(n.elements.arrow=t);// CSS selector
3572
+ ,requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var n,e,i,a,r,o,s,l,u,h=t.state,c=t.options,t=t.name,g=void 0===(g=c.mainAxis)||g,d=void 0!==(d=c.altAxis)&&d,f=void 0===(f=c.tether)||f,p=void 0===(p=c.tetherOffset)?0:p,c=ad(h,{boundary:c.boundary,rootBoundary:c.rootBoundary,padding:c.padding,altBoundary:c.altBoundary}),_=Sg(h.placement),m=Gg(h.placement),y=!m,v=Og(_),b="x"===v?"y":"x",x=h.modifiersData.popperOffsets,w=h.rects.reference,S=h.rects.popper,p="number"==typeof(p="function"==typeof p?p(Object.assign({},h.rects,{placement:h.placement})):p)?{mainAxis:p,altAxis:p}:Object.assign({mainAxis:0,altAxis:0},p),C=h.modifiersData.offset?h.modifiersData.offset[h.placement]:null,k={x:0,y:0};x&&(g&&(g="y"===v?"height":"width",o=(s=x[v])+c[e="y"===v?ig:og],l=s-c[u="y"===v?ag:rg],n=f?-S[g]/2:0,a=(m===ug?w:S)[g],m=m===ug?-S[g]:-w[g],r=h.elements.arrow,r=f&&r?Tg(r):{width:0,height:0},e=(i=h.modifiersData["arrow#persistent"]?h.modifiersData["arrow#persistent"].padding:jg())[e],i=i[u],u=Rg(0,w[g],r[g]),r=y?w[g]/2-n-u-e-p.mainAxis:a-u-e-p.mainAxis,a=y?-w[g]/2+n+u+i+p.mainAxis:m+u+i+p.mainAxis,y=(e=h.elements.arrow&&Fg(h.elements.arrow))?"y"===v?e.clientTop||0:e.clientLeft||0:0,m=s+a-(n=null!=(g=null==C?void 0:C[v])?g:0),u=Rg(f?kg(o,s+r-n-y):o,s,f?Cg(l,m):l),x[v]=u,k[v]=u-s),d&&(i="y"==b?"height":"width",a=(e=x[b])+c["x"===v?ig:og],g=e-c["x"===v?ag:rg],r=-1!==[ig,og].indexOf(_),y=null!=(n=null==C?void 0:C[b])?n:0,o=r?a:e-w[i]-S[i]-y+p.altAxis,m=r?e+w[i]+S[i]-y-p.altAxis:g,s=f&&r?(l=Rg(l=o,e,u=m),u<l?u:l):Rg(f?o:a,e,f?m:g),x[b]=s,k[b]=s-e),h.modifiersData[t]=k)}// eslint-disable-next-line import/no-unused-modules
3573
+ ,requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var n,e,i,a,r=t.state,o=t.name,t=t.options,s=r.elements.arrow,l=r.modifiersData.popperOffsets,u=Og(h=Sg(r.placement)),h=0<=[og,rg].indexOf(h)?"height":"width";s&&l&&(t=t.padding,e=r,e=Ig("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Hg(t,lg)),t=Tg(s),a="y"===u?ig:og,i="y"===u?ag:rg,n=r.rects.reference[h]+r.rects.reference[u]-l[u]-r.rects.popper[h],l=l[u]-r.rects.reference[u],s=(s=Fg(s))?"y"===u?s.clientHeight||0:s.clientWidth||0:0,a=e[a],e=s-t[h]-e[i],a=Rg(a,i=s/2-t[h]/2+(n/2-l/2),e),r.modifiersData[o]=((s={})[u]=a,s.centerOffset=a-i,s))},effect:function(t){var n=t.state;null!=(t=void 0===(t=t.options.element)?"[data-popper-arrow]":t)&&("string"!=typeof t||(t=n.elements.popper.querySelector(t)))&&Bg(n.elements.popper,t)&&(n.elements.arrow=t);// CSS selector
3575
3574
  }// eslint-disable-next-line import/no-unused-modules
3576
- ,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,t=t.name,e=n.rects.reference,i=n.rects.popper,a=n.modifiersData.preventOverflow,r=id(n,{elementContext:"reference"}),o=id(n,{altBoundary:!0}),r=ad(r,e),e=ad(o,i,a),o=rd(r),i=rd(e);n.modifiersData[t]={referenceClippingOffsets:r,popperEscapeOffsets:e,isReferenceHidden:o,hasPopperEscaped:i},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":o,"data-popper-escaped":i})}// eslint-disable-next-line import/no-unused-modules
3575
+ ,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var n=t.state,t=t.name,e=n.rects.reference,i=n.rects.popper,a=n.modifiersData.preventOverflow,r=ad(n,{elementContext:"reference"}),o=ad(n,{altBoundary:!0}),r=rd(r,e),e=rd(o,i,a),o=od(r),i=od(e);n.modifiersData[t]={referenceClippingOffsets:r,popperEscapeOffsets:e,isReferenceHidden:o,hasPopperEscaped:i},n.attributes.popper=Object.assign({},n.attributes.popper,{"data-popper-reference-hidden":o,"data-popper-escaped":i})}// eslint-disable-next-line import/no-unused-modules
3577
3576
  }]});// eslint-disable-next-line import/no-unused-modules
3578
3577
  /**
3579
3578
  * Creates a reference element for popper.
3580
3579
  * @param {Number[]} position
3581
- * @prrivate
3582
- */function gd(t=[0,0]){return()=>({width:0,height:0,top:t[1],right:t[0],bottom:t[1],left:t[0]})}class dd extends Ri{
3580
+ * @private
3581
+ */function dd(t=[0,0]){return()=>({width:0,height:0,top:t[1],right:t[0],bottom:t[1],left:t[0]})}class fd extends Ri{
3583
3582
  /**
3584
3583
  The inner return object and draw function that gets assigned the public methods.
3585
3584
  @private
@@ -3595,7 +3594,7 @@ var A=p?3:1;0<A;A--)if("break"===(n=>{var t=s.find(function(t){t=h.get(t);if(t)r
3595
3594
  /**
3596
3595
  Sets styles for both enter and update.
3597
3596
  @private
3598
- */function o(t){t.style("background",l._background).style(l._prefix+"border-radius",l._borderRadius).style("pointer-events",l._pointerEvents).style("padding",l._padding).style("width",l._width).style("height",l._height).style("border",l._border)}Ci(a,this._tooltipStyle),e("title"),e("body");var s=i.append("table").attr("class","d3plus-tooltip-table"),u=(Ci(a.select(".d3plus-tooltip-table"),this._tableStyle),s.append("thead").attr("class","d3plus-tooltip-thead"),a.select(".d3plus-tooltip-thead")),u=(Ci(u,this._theadStyle),u.selectAll("tr").data([0])),h=u.enter().append("tr"),u=(u.exit().remove(),u.merge(h)),h=(Ci(u,this._trStyle),u.selectAll("th").data(this._thead)),u=(h.enter().append("th").merge(h).html(r),h.exit().remove(),s.append("tbody").attr("class","d3plus-tooltip-tbody"),a.select(".d3plus-tooltip-tbody")),h=(Ci(u,this._tbodyStyle),u.selectAll("tr").data(this._tbody)),s=h.enter().append("tr"),u=(h.exit().remove(),h.merge(s)),h=(Ci(u,this._trStyle),u.selectAll("td").data(t=>t));return h.enter().append("td").merge(h).html(r),Ci(h,this._tdStyle),e("footer"),e("arrow"),i.attr("id",(t,n)=>"d3plus-tooltip-"+(t?this._id(t,n):"")).call(o).each((t,n)=>{var e=l._id(t,n),i=document.getElementById("d3plus-tooltip-"+e),a=document.getElementById("d3plus-tooltip-arrow-"+e);let r=a.offsetHeight;var o=a.getBoundingClientRect().height/2,s=(a.style.bottom=`-${r/2}px`,l._position(t,n)),s=Array.isArray(s)?{getBoundingClientRect:gd(s)}:s;this._popperClasses[e]=cd(s,i,{placement:"top",modifiers:[{name:"arrow",options:{element:a}},{name:"offset",options:{offset:[0,l._offset(t,n)+o]}},{name:"preventOverflow",options:{boundary:"scrollParent",padding:5}},{name:"flip",options:{behavior:"flip",boundary:"viewport",fallbackPlacements:["bottom"],padding:5}},{name:"update",enabled:!0,phase:"afterWrite",fn(t){var t=t.state,n=t.elements.arrow,e=t.styles.arrow,t=t.modifiersData.flip._skip,i=parseFloat(n.style.borderRightWidth,10);t?(n.style.transform=e.transform+"rotate(225deg)",n.style.top=`-${r/2+i}px`):(n.style.transform=e.transform+"rotate(45deg)",n.style.bottom=`-${r/2+i}px`)}}],removeOnDestroy:!0})}),a.each((t,n)=>{var e=l._id(t,n),t=l._position(t,n),n=this._popperClasses[e];n&&(n.state.elements.reference.getBoundingClientRect=Array.isArray(t)?gd(t):t,n.update())}).call(o),n.exit().each((t,n)=>{t=l._id(t,n),n=this._popperClasses[t];n&&(n.destroy(),delete this._popperClasses[t])}).remove(),t&&setTimeout(t,100),this}
3597
+ */function o(t){t.style("background",l._background).style(l._prefix+"border-radius",l._borderRadius).style("pointer-events",l._pointerEvents).style("padding",l._padding).style("width",l._width).style("height",l._height).style("border",l._border)}Ci(a,this._tooltipStyle),e("title"),e("body");var s=i.append("table").attr("class","d3plus-tooltip-table"),u=(Ci(a.select(".d3plus-tooltip-table"),this._tableStyle),s.append("thead").attr("class","d3plus-tooltip-thead"),a.select(".d3plus-tooltip-thead")),u=(Ci(u,this._theadStyle),u.selectAll("tr").data([0])),h=u.enter().append("tr"),u=(u.exit().remove(),u.merge(h)),h=(Ci(u,this._trStyle),u.selectAll("th").data(this._thead)),u=(h.enter().append("th").merge(h).html(r),h.exit().remove(),s.append("tbody").attr("class","d3plus-tooltip-tbody"),a.select(".d3plus-tooltip-tbody")),h=(Ci(u,this._tbodyStyle),u.selectAll("tr").data(this._tbody)),s=h.enter().append("tr"),u=(h.exit().remove(),h.merge(s)),h=(Ci(u,this._trStyle),u.selectAll("td").data(t=>t));return h.enter().append("td").merge(h).html(r),Ci(h,this._tdStyle),e("footer"),e("arrow"),i.attr("id",(t,n)=>"d3plus-tooltip-"+(t?this._id(t,n):"")).call(o).each((t,n)=>{var e=l._id(t,n),i=document.getElementById("d3plus-tooltip-"+e),a=document.getElementById("d3plus-tooltip-arrow-"+e);let r=a.offsetHeight;var o=a.getBoundingClientRect().height/2,s=(a.style.bottom=`-${r/2}px`,l._position(t,n)),s=Array.isArray(s)?{getBoundingClientRect:dd(s)}:s;this._popperClasses[e]=gd(s,i,{placement:"top",modifiers:[{name:"arrow",options:{element:a}},{name:"offset",options:{offset:[0,l._offset(t,n)+o]}},{name:"preventOverflow",options:{boundary:"scrollParent",padding:5}},{name:"flip",options:{behavior:"flip",boundary:"viewport",fallbackPlacements:["bottom"],padding:5}},{name:"update",enabled:!0,phase:"afterWrite",fn(t){var t=t.state,n=t.elements.arrow,e=t.styles.arrow,t=t.modifiersData.flip._skip,i=parseFloat(n.style.borderRightWidth,10);t?(n.style.transform=e.transform+"rotate(225deg)",n.style.top=`-${r/2+i}px`):(n.style.transform=e.transform+"rotate(45deg)",n.style.bottom=`-${r/2+i}px`)}}],removeOnDestroy:!0})}),a.each((t,n)=>{var e=l._id(t,n),t=l._position(t,n),n=this._popperClasses[e];n&&(n.state.elements.reference.getBoundingClientRect=Array.isArray(t)?dd(t):t,n.update())}).call(o),n.exit().each((t,n)=>{t=l._id(t,n),n=this._popperClasses[t];n&&(n.destroy(),delete this._popperClasses[t])}).remove(),t&&setTimeout(t,100),this}
3599
3598
  /**
3600
3599
  @memberof Tooltip
3601
3600
  @desc Sets the inner HTML content of the arrow element, which by default is empty.
@@ -3817,29 +3816,29 @@ var A=p?3:1;0<A;A--)if("break"===(n=>{var t=s.find(function(t){t=h.get(t);if(t)r
3817
3816
  @memberof Tooltip
3818
3817
  @desc Invoked when creating a new class instance, and sets any default parameters.
3819
3818
  @private
3820
- */constructor(){super(),this._arrow=p("arrow",""),this._arrowStyle={content:"",background:"inherit",border:"inherit","border-width":"0 1px 1px 0",height:"10px",position:"absolute",transform:"rotate(45deg)",width:"10px","z-index":"-1"},this._background=Ot(mu.light),this._body=p("body",""),this._bodyStyle={"font-size":"12px","font-weight":"400","z-index":"1"},this._border=Ot("1px solid rgba(0, 0, 0, 0.25)"),this._borderRadius=Ot("4px"),this._className="d3plus-tooltip",this._data=[],this._footer=p("footer",""),this._footerStyle={"font-size":"9px","font-weight":"400","margin-top":"5px","z-index":"1"},this._height=Ot("auto"),this._id=(t,n)=>""+n,this._offset=Ot(5),this._padding=Ot("10px"),this._pointerEvents=Ot("auto"),this._popperClasses={},this._position=t=>[t.x,t.y],this._prefix="-webkit-transform"in document.body.style?"-webkit-":"-moz-transform"in document.body.style?"-moz-":"-ms-transform"in document.body.style?"-ms-":"-o-transform"in document.body.style?"-o-":"",this._tableStyle={"border-collapse":"collapse","border-spacing":"0",width:"100%"},this._tbody=[],this._tbodyStyle={"font-size":"12px","text-align":"center"},this._thead=[],this._theadStyle={"font-size":"12px","font-weight":"600","text-align":"center"},this._title=p("title",""),this._titleStyle={"font-size":"14px","font-weight":"600","margin-bottom":"5px"},this._tooltipStyle={"box-shadow":"0 1px 5px rgba(0, 0, 0, 0.25)",color:mu.dark,"font-family":Me(Ee)},this._trStyle={"border-top":(t,n)=>n?"1px solid rgba(0, 0, 0, 0.1)":"none"},this._tdStyle={},this._width=Ot("150px")}}var fd=[].slice,pd={};function _d(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function md(n){if(!n._start)try{for(var t=n;t._start=t._waiting&&t._active<t._size;){var e=t._ended+t._active,i=t._tasks[e],a=i.length-1,r=i[a];i[a]=((e,i)=>function(t,n){e._tasks[i]&&(// ignore multiple callbacks
3819
+ */constructor(){super(),this._arrow=p("arrow",""),this._arrowStyle={content:"",background:"inherit",border:"inherit","border-width":"0 1px 1px 0",height:"10px",position:"absolute",transform:"rotate(45deg)",width:"10px","z-index":"-1"},this._background=Ot(mu.light),this._body=p("body",""),this._bodyStyle={"font-size":"12px","font-weight":"400","z-index":"1"},this._border=Ot("1px solid rgba(0, 0, 0, 0.25)"),this._borderRadius=Ot("4px"),this._className="d3plus-tooltip",this._data=[],this._footer=p("footer",""),this._footerStyle={"font-size":"9px","font-weight":"400","margin-top":"5px","z-index":"1"},this._height=Ot("auto"),this._id=(t,n)=>""+n,this._offset=Ot(5),this._padding=Ot("10px"),this._pointerEvents=Ot("auto"),this._popperClasses={},this._position=t=>[t.x,t.y],this._prefix="-webkit-transform"in document.body.style?"-webkit-":"-moz-transform"in document.body.style?"-moz-":"-ms-transform"in document.body.style?"-ms-":"-o-transform"in document.body.style?"-o-":"",this._tableStyle={"border-collapse":"collapse","border-spacing":"0",width:"100%"},this._tbody=[],this._tbodyStyle={"font-size":"12px","text-align":"center"},this._thead=[],this._theadStyle={"font-size":"12px","font-weight":"600","text-align":"center"},this._title=p("title",""),this._titleStyle={"font-size":"14px","font-weight":"600","margin-bottom":"5px"},this._tooltipStyle={"box-shadow":"0 1px 5px rgba(0, 0, 0, 0.25)",color:mu.dark,"font-family":Me(Ee)},this._trStyle={"border-top":(t,n)=>n?"1px solid rgba(0, 0, 0, 0.1)":"none"},this._tdStyle={},this._width=Ot("150px")}}var pd=[].slice,_d={};function md(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function yd(n){if(!n._start)try{for(var t=n;t._start=t._waiting&&t._active<t._size;){var e=t._ended+t._active,i=t._tasks[e],a=i.length-1,r=i[a];i[a]=((e,i)=>function(t,n){e._tasks[i]&&(// ignore multiple callbacks
3821
3820
  --e._active,++e._ended,(e._tasks[i]=null)==e._error)&&(// ignore secondary errors
3822
- null!=t?yd(e,t):(e._data[i]=n,(e._waiting?md:vd)(e)))})(t,e),--t._waiting,++t._active,i=r.apply(null,i),t._tasks[e]&&(// task finished synchronously
3823
- t._tasks[e]=i||pd)}}catch(t){if(n._tasks[n._ended+n._active-1])yd(n,t);// task errored synchronously
3821
+ null!=t?vd(e,t):(e._data[i]=n,(e._waiting?yd:bd)(e)))})(t,e),--t._waiting,++t._active,i=r.apply(null,i),t._tasks[e]&&(// task finished synchronously
3822
+ t._tasks[e]=i||_d)}}catch(t){if(n._tasks[n._ended+n._active-1])vd(n,t);// task errored synchronously
3824
3823
  else if(!n._data)throw t;// await callback errored synchronously
3825
- }}function yd(t,n){var e,i=t._tasks.length;// prevent starting
3824
+ }}function vd(t,n){var e,i=t._tasks.length;// prevent starting
3826
3825
  for(t._error=n,// ignore active callbacks
3827
3826
  t._data=void 0,// allow gc
3828
3827
  t._waiting=NaN;0<=--i;)if((e=t._tasks[i])&&(t._tasks[i]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,// allow notification
3829
- vd(t)}function vd(t){var n;!t._active&&t._call&&(n=t._data,t._data=void 0,// allow gc
3830
- t._call(t._error,n))}function bd(t){if(null==t)t=1/0;else if(!(1<=(t=+t)))throw new Error("invalid concurrency");return new _d(t)}_d.prototype=bd.prototype={constructor:_d,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");var n;return null==this._error&&((n=fd.call(arguments,1)).push(t),++this._waiting,this._tasks.push(n),md(this)),this},abort:function(){return null==this._error&&yd(this,new Error("abort")),this},await:function(e){if("function"!=typeof e)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(t,n){e.apply(null,[t].concat(n))},vd(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,vd(this),this}};var xd=t=>()=>t;function wd(t,{sourceEvent:n,target:e,transform:i,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function Sd(t,n,e){this.k=t,this.x=n,this.y=e}Sd.prototype={constructor:Sd,scale:function(t){return 1===t?this:new Sd(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new Sd(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Cd=new Sd(1,0,0);function kd(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Cd;return t.__zoom}function Ad(t){t.stopImmediatePropagation()}function Md(t){t.preventDefault(),t.stopImmediatePropagation()}
3828
+ bd(t)}function bd(t){var n;!t._active&&t._call&&(n=t._data,t._data=void 0,// allow gc
3829
+ t._call(t._error,n))}function xd(t){if(null==t)t=1/0;else if(!(1<=(t=+t)))throw new Error("invalid concurrency");return new md(t)}md.prototype=xd.prototype={constructor:md,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");var n;return null==this._error&&((n=pd.call(arguments,1)).push(t),++this._waiting,this._tasks.push(n),yd(this)),this},abort:function(){return null==this._error&&vd(this,new Error("abort")),this},await:function(e){if("function"!=typeof e)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(t,n){e.apply(null,[t].concat(n))},bd(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,bd(this),this}};var wd=t=>()=>t;function Sd(t,{sourceEvent:n,target:e,transform:i,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function Cd(t,n,e){this.k=t,this.x=n,this.y=e}Cd.prototype={constructor:Cd,scale:function(t){return 1===t?this:new Cd(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new Cd(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var kd=new Cd(1,0,0);function Ad(t){for(;!t.__zoom;)if(!(t=t.parentNode))return kd;return t.__zoom}function Md(t){t.stopImmediatePropagation()}function Ed(t){t.preventDefault(),t.stopImmediatePropagation()}
3831
3830
  // Ignore right-click, since that should open the context menu.
3832
3831
  // except for pinch-to-zoom, which is sent as a wheel+ctrlKey event
3833
- function Ed(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function zd(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Td(){return this.__zoom||Cd}function Bd(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Dd(){return navigator.maxTouchPoints||"ontouchstart"in this}function Nd(t,n,e){var i=t.invertX(n[0][0])-e[0][0],a=t.invertX(n[1][0])-e[1][0],r=t.invertY(n[0][1])-e[0][1],n=t.invertY(n[1][1])-e[1][1];return t.translate(i<a?(i+a)/2:Math.min(0,i)||Math.max(0,a),r<n?(r+n)/2:Math.min(0,r)||Math.max(0,n))}function Pd(){var u,h,s,c=Ed,g=zd,d=Nd,r=Bd,n=Dd,o=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],l=250,p=ge,e=xt("start","zoom","end"),_=500,m=150,y=0,v=10;function b(t){t.property("__zoom",Td).on("wheel.zoom",a,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",M).filter(n).on("touchstart.zoom",E).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",T).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(t,n){return(n=Math.max(o[0],Math.min(o[1],n)))===t.k?t:new Sd(n,t.x,t.y)}function w(t,n,e){var i=n[0]-e[0]*t.k,n=n[1]-e[1]*t.k;return i===t.x&&n===t.y?t:new Sd(t.k,i,n)}function S(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function C(t,e,l,u){t.on("start.zoom",function(){k(this,arguments).event(u).start()}).on("interrupt.zoom end.zoom",function(){k(this,arguments).event(u).end()}).tween("zoom",function(){var t=arguments,i=k(this,t).event(u),n=g.apply(this,t),a=null==l?S(n):"function"==typeof l?l.apply(this,t):l,r=Math.max(n[1][0]-n[0][0],n[1][1]-n[0][1]),n=this.__zoom,o="function"==typeof e?e.apply(this,t):e,s=p(n.invert(a).concat(r/n.k),o.invert(a).concat(r/o.k));return function(t){var n,e;t=1===t?o:(n=s(t),new Sd(e=r/n[2],a[0]-n[0]*e,a[1]-n[1]*e)),i.zoom(null,t)}})}function k(t,n,e){return!e&&t.__zooming||new i(t,n)}function i(t,n){this.that=t,this.args=n,this.active=0,this.sourceEvent=null,this.extent=g.apply(t,n),this.taps=0}function a(t,...n){if(c.apply(this,arguments)){var e=k(this,n).event(t),n=this.__zoom,i=Math.max(o[0],Math.min(o[1],n.k*Math.pow(2,r.apply(this,arguments)))),a=vt(t);
3832
+ function zd(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Td(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Bd(){return this.__zoom||kd}function Dd(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Nd(){return navigator.maxTouchPoints||"ontouchstart"in this}function Pd(t,n,e){var i=t.invertX(n[0][0])-e[0][0],a=t.invertX(n[1][0])-e[1][0],r=t.invertY(n[0][1])-e[0][1],n=t.invertY(n[1][1])-e[1][1];return t.translate(i<a?(i+a)/2:Math.min(0,i)||Math.max(0,a),r<n?(r+n)/2:Math.min(0,r)||Math.max(0,n))}function Ld(){var u,h,s,c=zd,g=Td,d=Pd,r=Dd,n=Nd,o=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],l=250,p=ge,e=xt("start","zoom","end"),_=500,m=150,y=0,v=10;function b(t){t.property("__zoom",Bd).on("wheel.zoom",a,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",M).filter(n).on("touchstart.zoom",E).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",T).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(t,n){return(n=Math.max(o[0],Math.min(o[1],n)))===t.k?t:new Cd(n,t.x,t.y)}function w(t,n,e){var i=n[0]-e[0]*t.k,n=n[1]-e[1]*t.k;return i===t.x&&n===t.y?t:new Cd(t.k,i,n)}function S(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function C(t,e,l,u){t.on("start.zoom",function(){k(this,arguments).event(u).start()}).on("interrupt.zoom end.zoom",function(){k(this,arguments).event(u).end()}).tween("zoom",function(){var t=arguments,i=k(this,t).event(u),n=g.apply(this,t),a=null==l?S(n):"function"==typeof l?l.apply(this,t):l,r=Math.max(n[1][0]-n[0][0],n[1][1]-n[0][1]),n=this.__zoom,o="function"==typeof e?e.apply(this,t):e,s=p(n.invert(a).concat(r/n.k),o.invert(a).concat(r/o.k));return function(t){var n,e;t=1===t?o:(n=s(t),new Cd(e=r/n[2],a[0]-n[0]*e,a[1]-n[1]*e)),i.zoom(null,t)}})}function k(t,n,e){return!e&&t.__zooming||new i(t,n)}function i(t,n){this.that=t,this.args=n,this.active=0,this.sourceEvent=null,this.extent=g.apply(t,n),this.taps=0}function a(t,...n){if(c.apply(this,arguments)){var e=k(this,n).event(t),n=this.__zoom,i=Math.max(o[0],Math.min(o[1],n.k*Math.pow(2,r.apply(this,arguments)))),a=vt(t);
3834
3833
  // If the mouse is in the same location as before, reuse it.
3835
3834
  // If there were recent wheel events, reset the wheel idle timeout.
3836
- if(e.wheel)e.mouse[0][0]===a[0]&&e.mouse[0][1]===a[1]||(e.mouse[1]=n.invert(e.mouse[0]=a)),clearTimeout(e.wheel);else{if(n.k===i)return;e.mouse=[a,n.invert(a)],cn(this),e.start()}Md(t),e.wheel=setTimeout(function(){e.wheel=null,e.end()},m),e.zoom("mouse",d(w(x(n,i),e.mouse[0],e.mouse[1]),e.extent,f))}}function A(t,...n){var i,a,e,r,o;!s&&c.apply(this,arguments)&&(i=t.currentTarget,a=k(this,n,!0).event(t),e=H(t.view).on("mousemove.zoom",function(t){{var n,e;Md(t),a.moved||(n=t.clientX-r,e=t.clientY-o,a.moved=y<n*n+e*e)}a.event(t).zoom("mouse",d(w(a.that.__zoom,a.mouse[0]=vt(t,i),a.mouse[1]),a.extent,f))},!0).on("mouseup.zoom",function(t){e.on("mousemove.zoom mouseup.zoom",null),Mc(t.view,a.moved),Md(t),a.event(t).end()},!0),n=vt(t,i),r=t.clientX,o=t.clientY,Ac(t.view),Ad(t),a.mouse=[n,this.__zoom.invert(n)],cn(this),a.start())}function M(t,...n){var e,i,a,r;c.apply(this,arguments)&&(r=this.__zoom,e=vt(t.changedTouches?t.changedTouches[0]:t,this),i=r.invert(e),a=r.k*(t.shiftKey?.5:2),r=d(w(x(r,a),e,i),g.apply(this,n),f),Md(t),0<l?H(this).transition().duration(l).call(C,r,e,t):H(this).call(b.transform,r,e,t))}function E(t,...n){if(c.apply(this,arguments)){var e,i,a,r,o=t.touches,s=o.length,l=k(this,n,t.changedTouches.length===s).event(t);for(Ad(t),i=0;i<s;++i)r=[r=vt(a=o[i],this),this.__zoom.invert(r),a.identifier],l.touch0?l.touch1||l.touch0[2]===r[2]||(l.touch1=r,l.taps=0):(l.touch0=r,e=!0,l.taps=1+!!u);u=u&&clearTimeout(u),e&&(l.taps<2&&(h=r[0],u=setTimeout(function(){u=null},_)),cn(this),l.start())}}function z(t,...n){if(this.__zooming){var e,i=k(this,n).event(t),a=t.changedTouches,r=a.length;for(Md(t),e=0;e<r;++e)c=vt(h=a[e],this),i.touch0&&i.touch0[2]===h.identifier?i.touch0[0]=c:i.touch1&&i.touch1[2]===h.identifier&&(i.touch1[0]=c);if(h=i.that.__zoom,i.touch1)var n=i.touch0[0],t=i.touch0[1],o=i.touch1[0],s=i.touch1[1],l=(l=o[0]-n[0])*l+(l=o[1]-n[1])*l,u=(u=s[0]-t[0])*u+(u=s[1]-t[1])*u,h=x(h,Math.sqrt(l/u)),c=[(n[0]+o[0])/2,(n[1]+o[1])/2],l=[(t[0]+s[0])/2,(t[1]+s[1])/2];else{if(!i.touch0)return;c=i.touch0[0],l=i.touch0[1]}i.zoom("touch",d(w(h,c,l),i.extent,f))}}function T(t,...n){if(this.__zooming){var e,i,a=k(this,n).event(t),r=t.changedTouches,o=r.length;for(Ad(t),s&&clearTimeout(s),s=setTimeout(function(){s=null},_),e=0;e<o;++e)i=r[e],a.touch0&&a.touch0[2]===i.identifier?delete a.touch0:a.touch1&&a.touch1[2]===i.identifier&&delete a.touch1;a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0?a.touch0[1]=this.__zoom.invert(a.touch0[0]):(a.end(),
3835
+ if(e.wheel)e.mouse[0][0]===a[0]&&e.mouse[0][1]===a[1]||(e.mouse[1]=n.invert(e.mouse[0]=a)),clearTimeout(e.wheel);else{if(n.k===i)return;e.mouse=[a,n.invert(a)],cn(this),e.start()}Ed(t),e.wheel=setTimeout(function(){e.wheel=null,e.end()},m),e.zoom("mouse",d(w(x(n,i),e.mouse[0],e.mouse[1]),e.extent,f))}}function A(t,...n){var i,a,e,r,o;!s&&c.apply(this,arguments)&&(i=t.currentTarget,a=k(this,n,!0).event(t),e=H(t.view).on("mousemove.zoom",function(t){{var n,e;Ed(t),a.moved||(n=t.clientX-r,e=t.clientY-o,a.moved=y<n*n+e*e)}a.event(t).zoom("mouse",d(w(a.that.__zoom,a.mouse[0]=vt(t,i),a.mouse[1]),a.extent,f))},!0).on("mouseup.zoom",function(t){e.on("mousemove.zoom mouseup.zoom",null),Ec(t.view,a.moved),Ed(t),a.event(t).end()},!0),n=vt(t,i),r=t.clientX,o=t.clientY,Mc(t.view),Md(t),a.mouse=[n,this.__zoom.invert(n)],cn(this),a.start())}function M(t,...n){var e,i,a,r;c.apply(this,arguments)&&(r=this.__zoom,e=vt(t.changedTouches?t.changedTouches[0]:t,this),i=r.invert(e),a=r.k*(t.shiftKey?.5:2),r=d(w(x(r,a),e,i),g.apply(this,n),f),Ed(t),0<l?H(this).transition().duration(l).call(C,r,e,t):H(this).call(b.transform,r,e,t))}function E(t,...n){if(c.apply(this,arguments)){var e,i,a,r,o=t.touches,s=o.length,l=k(this,n,t.changedTouches.length===s).event(t);for(Md(t),i=0;i<s;++i)r=[r=vt(a=o[i],this),this.__zoom.invert(r),a.identifier],l.touch0?l.touch1||l.touch0[2]===r[2]||(l.touch1=r,l.taps=0):(l.touch0=r,e=!0,l.taps=1+!!u);u=u&&clearTimeout(u),e&&(l.taps<2&&(h=r[0],u=setTimeout(function(){u=null},_)),cn(this),l.start())}}function z(t,...n){if(this.__zooming){var e,i=k(this,n).event(t),a=t.changedTouches,r=a.length;for(Ed(t),e=0;e<r;++e)c=vt(h=a[e],this),i.touch0&&i.touch0[2]===h.identifier?i.touch0[0]=c:i.touch1&&i.touch1[2]===h.identifier&&(i.touch1[0]=c);if(h=i.that.__zoom,i.touch1)var n=i.touch0[0],t=i.touch0[1],o=i.touch1[0],s=i.touch1[1],l=(l=o[0]-n[0])*l+(l=o[1]-n[1])*l,u=(u=s[0]-t[0])*u+(u=s[1]-t[1])*u,h=x(h,Math.sqrt(l/u)),c=[(n[0]+o[0])/2,(n[1]+o[1])/2],l=[(t[0]+s[0])/2,(t[1]+s[1])/2];else{if(!i.touch0)return;c=i.touch0[0],l=i.touch0[1]}i.zoom("touch",d(w(h,c,l),i.extent,f))}}function T(t,...n){if(this.__zooming){var e,i,a=k(this,n).event(t),r=t.changedTouches,o=r.length;for(Md(t),s&&clearTimeout(s),s=setTimeout(function(){s=null},_),e=0;e<o;++e)i=r[e],a.touch0&&a.touch0[2]===i.identifier?delete a.touch0:a.touch1&&a.touch1[2]===i.identifier&&delete a.touch1;a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0?a.touch0[1]=this.__zoom.invert(a.touch0[0]):(a.end(),
3837
3836
  // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.
3838
- 2===a.taps&&(i=vt(i,this),Math.hypot(h[0]-i[0],h[1]-i[1])<v)&&(n=H(this).on("dblclick.zoom"))&&n.apply(this,arguments))}}return b.transform=function(t,n,e,i){var a=t.selection?t.selection():t;a.property("__zoom",Td),t!==a?C(t,n,e,i):a.interrupt().each(function(){k(this,arguments).event(i).start().zoom(null,"function"==typeof n?n.apply(this,arguments):n).end()})},b.scaleBy=function(t,n,e,i){b.scaleTo(t,function(){return this.__zoom.k*("function"==typeof n?n.apply(this,arguments):n)},e,i)},b.scaleTo=function(t,r,o,n){b.transform(t,function(){var t=g.apply(this,arguments),n=this.__zoom,e=null==o?S(t):"function"==typeof o?o.apply(this,arguments):o,i=n.invert(e),a="function"==typeof r?r.apply(this,arguments):r;return d(w(x(n,a),e,i),t,f)},o,n)},b.translateBy=function(t,n,e,i){b.transform(t,function(){return d(this.__zoom.translate("function"==typeof n?n.apply(this,arguments):n,"function"==typeof e?e.apply(this,arguments):e),g.apply(this,arguments),f)},null,i)},b.translateTo=function(t,i,a,r,n){b.transform(t,function(){var t=g.apply(this,arguments),n=this.__zoom,e=null==r?S(t):"function"==typeof r?r.apply(this,arguments):r;return d(Cd.translate(e[0],e[1]).scale(n.k).translate("function"==typeof i?-i.apply(this,arguments):-i,"function"==typeof a?-a.apply(this,arguments):-a),t,f)},r,n)},i.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this).emit("start"),this},zoom:function(t,n){return this.mouse&&"mouse"!==t&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var n=H(this.that).datum();e.call(t,this.that,new wd(t,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:e}),n)}},b.wheelDelta=function(t){return arguments.length?(r="function"==typeof t?t:xd(+t),b):r},b.filter=function(t){return arguments.length?(c="function"==typeof t?t:xd(!!t),b):c},b.touchable=function(t){return arguments.length?(n="function"==typeof t?t:xd(!!t),b):n},b.extent=function(t){return arguments.length?(g="function"==typeof t?t:xd([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),b):g},b.scaleExtent=function(t){return arguments.length?(o[0]=+t[0],o[1]=+t[1],b):[o[0],o[1]]},b.translateExtent=function(t){return arguments.length?(f[0][0]=+t[0][0],f[1][0]=+t[1][0],f[0][1]=+t[0][1],f[1][1]=+t[1][1],b):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},b.constrain=function(t){return arguments.length?(d=t,b):d},b.duration=function(t){return arguments.length?(l=+t,b):l},b.interpolate=function(t){return arguments.length?(p=t,b):p},b.on=function(){var t=e.on.apply(e,arguments);return t===e?b:t},b.clickDistance=function(t){return arguments.length?(y=(t=+t)*t,b):Math.sqrt(y)},b.tapDistance=function(t){return arguments.length?(v=+t,b):v},b}kd.prototype=Sd.prototype;var Ld,Kl={exports:{}};function Fd(t){if(!(this instanceof Fd))return new Fd(t);this._LRUCacheState=new Od(t)}function Od(t){this.capacity=0<t?+t:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE,this.data=Object.create?Object.create(null):{},this.hash=Object.create?Object.create(null):{},this.linkedList=new Rd}function Rd(){this.length=0,this.head=null,this.end=null}function jd(t){this.key=t,this.p=null,this.n=null}
3837
+ 2===a.taps&&(i=vt(i,this),Math.hypot(h[0]-i[0],h[1]-i[1])<v)&&(n=H(this).on("dblclick.zoom"))&&n.apply(this,arguments))}}return b.transform=function(t,n,e,i){var a=t.selection?t.selection():t;a.property("__zoom",Bd),t!==a?C(t,n,e,i):a.interrupt().each(function(){k(this,arguments).event(i).start().zoom(null,"function"==typeof n?n.apply(this,arguments):n).end()})},b.scaleBy=function(t,n,e,i){b.scaleTo(t,function(){return this.__zoom.k*("function"==typeof n?n.apply(this,arguments):n)},e,i)},b.scaleTo=function(t,r,o,n){b.transform(t,function(){var t=g.apply(this,arguments),n=this.__zoom,e=null==o?S(t):"function"==typeof o?o.apply(this,arguments):o,i=n.invert(e),a="function"==typeof r?r.apply(this,arguments):r;return d(w(x(n,a),e,i),t,f)},o,n)},b.translateBy=function(t,n,e,i){b.transform(t,function(){return d(this.__zoom.translate("function"==typeof n?n.apply(this,arguments):n,"function"==typeof e?e.apply(this,arguments):e),g.apply(this,arguments),f)},null,i)},b.translateTo=function(t,i,a,r,n){b.transform(t,function(){var t=g.apply(this,arguments),n=this.__zoom,e=null==r?S(t):"function"==typeof r?r.apply(this,arguments):r;return d(kd.translate(e[0],e[1]).scale(n.k).translate("function"==typeof i?-i.apply(this,arguments):-i,"function"==typeof a?-a.apply(this,arguments):-a),t,f)},r,n)},i.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this).emit("start"),this},zoom:function(t,n){return this.mouse&&"mouse"!==t&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var n=H(this.that).datum();e.call(t,this.that,new Sd(t,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:e}),n)}},b.wheelDelta=function(t){return arguments.length?(r="function"==typeof t?t:wd(+t),b):r},b.filter=function(t){return arguments.length?(c="function"==typeof t?t:wd(!!t),b):c},b.touchable=function(t){return arguments.length?(n="function"==typeof t?t:wd(!!t),b):n},b.extent=function(t){return arguments.length?(g="function"==typeof t?t:wd([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),b):g},b.scaleExtent=function(t){return arguments.length?(o[0]=+t[0],o[1]=+t[1],b):[o[0],o[1]]},b.translateExtent=function(t){return arguments.length?(f[0][0]=+t[0][0],f[1][0]=+t[1][0],f[0][1]=+t[0][1],f[1][1]=+t[1][1],b):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},b.constrain=function(t){return arguments.length?(d=t,b):d},b.duration=function(t){return arguments.length?(l=+t,b):l},b.interpolate=function(t){return arguments.length?(p=t,b):p},b.on=function(){var t=e.on.apply(e,arguments);return t===e?b:t},b.clickDistance=function(t){return arguments.length?(y=(t=+t)*t,b):Math.sqrt(y)},b.tapDistance=function(t){return arguments.length?(v=+t,b):v},b}Ad.prototype=Cd.prototype;var Fd,Kl={exports:{}};function Od(t){if(!(this instanceof Od))return new Od(t);this._LRUCacheState=new Rd(t)}function Rd(t){this.capacity=0<t?+t:Number.MAX_SAFE_INTEGER||Number.MAX_VALUE,this.data=Object.create?Object.create(null):{},this.hash=Object.create?Object.create(null):{},this.linkedList=new jd}function jd(){this.length=0,this.head=null,this.end=null}function Id(t){this.key=t,this.p=null,this.n=null}
3839
3838
  // 更新链表,把get或put方法操作的key提到链表head,即表示最新
3840
- function Id(t,n){n!==t.head&&(t.end?t.end===n&&(t.end=n.n):t.end=n,Hd(n.n,n.p),Hd(n,t.head),t.head=n,t.head.n=null)}
3839
+ function Hd(t,n){n!==t.head&&(t.end?t.end===n&&(t.end=n.n):t.end=n,Gd(n.n,n.p),Gd(n,t.head),t.head=n,t.head.n=null)}
3841
3840
  // 对两个链表对象建立链接,形成一条链
3842
- function Hd(t,n){t!==n&&(t&&(t.p=n),n)&&(n.n=t)}Ld||(Ld=1,Kl.exports=((ql=Fd.prototype).get=function(t){var n=this._LRUCacheState,e=n.hash[t];if(e)return Id(n.linkedList,e),n.data[t]},ql.set=function(t,n){var e=this._LRUCacheState,i=e.hash[t];return void 0!==n&&(i||(e.hash[t]=new jd(t),e.linkedList.length+=1,i=e.hash[t]),Id(e.linkedList,i),e.data[t]=n,e.linkedList.length>e.capacity)&&this.remove(e.linkedList.end.key),this},ql.update=function(t,n){return this.has(t)&&this.set(t,n(this.get(t))),this},ql.remove=function(t){var n=this._LRUCacheState,e=n.hash[t];return e&&(e===n.linkedList.head&&(n.linkedList.head=e.p),e===n.linkedList.end&&(n.linkedList.end=e.n),Hd(e.n,e.p),delete n.hash[t],delete n.data[t],--n.linkedList.length),this},ql.removeAll=function(){return this._LRUCacheState=new Od(this._LRUCacheState.capacity),this},ql.info=function(){var t=this._LRUCacheState;return{capacity:t.capacity,length:t.linkedList.length}},ql.keys=function(){for(var t=[],n=this._LRUCacheState.linkedList.head;n;)t.push(n.key),n=n.p;return t},ql.has=function(t){return!!this._LRUCacheState.hash[t]},ql.staleKey=function(){return this._LRUCacheState.linkedList.end&&this._LRUCacheState.linkedList.end.key},ql.popStale=function(){var t,n=this.staleKey();return n?(t=[n,this._LRUCacheState.data[n]],this.remove(n),t):null},Fd));var Gd=_u(Kl.exports);
3841
+ function Gd(t,n){t!==n&&(t&&(t.p=n),n)&&(n.n=t)}Fd||(Fd=1,Kl.exports=((ql=Od.prototype).get=function(t){var n=this._LRUCacheState,e=n.hash[t];if(e)return Hd(n.linkedList,e),n.data[t]},ql.set=function(t,n){var e=this._LRUCacheState,i=e.hash[t];return void 0!==n&&(i||(e.hash[t]=new Id(t),e.linkedList.length+=1,i=e.hash[t]),Hd(e.linkedList,i),e.data[t]=n,e.linkedList.length>e.capacity)&&this.remove(e.linkedList.end.key),this},ql.update=function(t,n){return this.has(t)&&this.set(t,n(this.get(t))),this},ql.remove=function(t){var n=this._LRUCacheState,e=n.hash[t];return e&&(e===n.linkedList.head&&(n.linkedList.head=e.p),e===n.linkedList.end&&(n.linkedList.end=e.n),Gd(e.n,e.p),delete n.hash[t],delete n.data[t],--n.linkedList.length),this},ql.removeAll=function(){return this._LRUCacheState=new Rd(this._LRUCacheState.capacity),this},ql.info=function(){var t=this._LRUCacheState;return{capacity:t.capacity,length:t.linkedList.length}},ql.keys=function(){for(var t=[],n=this._LRUCacheState.linkedList.head;n;)t.push(n.key),n=n.p;return t},ql.has=function(t){return!!this._LRUCacheState.hash[t]},ql.staleKey=function(){return this._LRUCacheState.linkedList.end&&this._LRUCacheState.linkedList.end.key},ql.popStale=function(){var t,n=this.staleKey();return n?(t=[n,this._LRUCacheState.data[n]],this.remove(n),t):null},Od));var Kd=_u(Kl.exports);
3843
3842
  /**
3844
3843
  @function _drawBack
3845
3844
  @desc Draws a back button if there are states in this._history.
@@ -3849,18 +3848,18 @@ function Hd(t,n){t!==n&&(t&&(t.p=n),n)&&(n.n=t)}Ld||(Ld=1,Kl.exports=((ql=Fd.pro
3849
3848
  @function _drawColorScale
3850
3849
  @desc Renders the color scale if this._colorScale is not falsey.
3851
3850
  @private
3852
- */function Kd(){var t=this._data;let n=this._colorScalePosition.bind(this)(this.config());[!1,"top","bottom","left","right"].includes(n)||(n="bottom");var e=["top","bottom"].includes(n),i=this._colorScale&&n,a=this._colorScalePadding()?this._padding:{top:0,right:0,bottom:0,left:0},r=this._width-(this._margin.left+this._margin.right+a.left+a.right),o=e?Pt([this._colorScaleMaxSize,r]):this._width-(this._margin.left+this._margin.right),s=this._height-(this._margin.bottom+this._margin.top+a.bottom+a.top),l=e?this._height-(this._margin.bottom+this._margin.top):Pt([this._colorScaleMaxSize,s]),r={opacity:n?1:0,transform:`translate(${e?this._margin.left+a.left+(r-o)/2:this._margin.left}, ${e?this._margin.top:this._margin.top+a.top+(s-l)/2})`},a=Dt("g.d3plus-viz-colorScale",{condition:i&&!this._colorScaleConfig.select,enter:r,parent:this._select,duration:this._duration,update:r}).node();this._colorScale&&(s=t.filter((t,n)=>{t=this._colorScale(t,n);return null!=t}),this._colorScaleClass.align({bottom:"end",left:"start",right:"end",top:"start"}[n]||"bottom").duration(this._duration).data(s).height(l).locale(this._locale).orient(n).select(a).value(this._colorScale).width(o).config(this._colorScaleConfig).render(),i)&&(r=this._colorScaleClass.outerBounds(),!this._colorScaleConfig.select)&&r.height&&(this._margin[n]+=e?r.height+2*this._legendClass.padding():r.width+2*this._legendClass.padding())}let $d=["fill","opacity","texture"];
3851
+ */function $d(){var t=this._data;let n=this._colorScalePosition.bind(this)(this.config());[!1,"top","bottom","left","right"].includes(n)||(n="bottom");var e=["top","bottom"].includes(n),i=this._colorScale&&n,a=this._colorScalePadding()?this._padding:{top:0,right:0,bottom:0,left:0},r=this._width-(this._margin.left+this._margin.right+a.left+a.right),o=e?Pt([this._colorScaleMaxSize,r]):this._width-(this._margin.left+this._margin.right),s=this._height-(this._margin.bottom+this._margin.top+a.bottom+a.top),l=e?this._height-(this._margin.bottom+this._margin.top):Pt([this._colorScaleMaxSize,s]),r={opacity:n?1:0,transform:`translate(${e?this._margin.left+a.left+(r-o)/2:this._margin.left}, ${e?this._margin.top:this._margin.top+a.top+(s-l)/2})`},a=Dt("g.d3plus-viz-colorScale",{condition:i&&!this._colorScaleConfig.select,enter:r,parent:this._select,duration:this._duration,update:r}).node();this._colorScale&&(s=t.filter((t,n)=>{t=this._colorScale(t,n);return null!=t}),this._colorScaleClass.align({bottom:"end",left:"start",right:"end",top:"start"}[n]||"bottom").duration(this._duration).data(s).height(l).locale(this._locale).orient(n).select(a).value(this._colorScale).width(o).config(this._colorScaleConfig).render(),i)&&(r=this._colorScaleClass.outerBounds(),!this._colorScaleConfig.select)&&r.height&&(this._margin[n]+=e?r.height+2*this._legendClass.padding():r.width+2*this._legendClass.padding())}let qd=["fill","opacity","texture"];
3853
3852
  /**
3854
3853
  @function legendLabel
3855
3854
  @desc Default label function for the legend.
3856
3855
  @private
3857
- */function qd(t,n){return this._drawLabel(t,n,this._legendDepth)}
3856
+ */function Ud(t,n){return this._drawLabel(t,n,this._legendDepth)}
3858
3857
  /**
3859
3858
  @function _drawLegend
3860
3859
  @desc Renders the legend if this._legend is not falsy.
3861
3860
  @param {Array} data The filtered data array to be displayed.
3862
3861
  @private
3863
- */function Ud(t=[]){let e=[],i=(t,n,e)=>{var i=this._shape(t,n),i=("fill"===e&&"Line"===i&&(e="stroke"),(this._shapeConfig[i]&&this._shapeConfig[i][e]?this._shapeConfig[i]:this._shapeConfig)[e]);return"function"==typeof i?i.bind(this)(t,n):i};var n=(n,e)=>$d.map(t=>i(n,e,t)).join("_"),a=(Ke(this._colorScale?t.filter((t,n)=>void 0===this._colorScale(t,n)):t,t=>e.push(Vu(t,this._aggs)),n),e.sort(this._legendSort),e.map((t,n)=>this._ids(t,n).slice(0,this._drawDepth+1)));for(let n=this._legendDepth=0;n<=this._drawDepth;n++){var r=a.map(t=>t[n]);if(!r.some(t=>t instanceof Array)&&Array.from(new Set(r)).length===e.length){this._legendDepth=n;break}}let o=(t,n)=>{let e=this._id(t,n);return e instanceof Array&&(e=e[0]),this._hidden.includes(e)||this._solo.length&&!this._solo.includes(e)};var t=this._legendClass.outerBounds(),s=this.config();let l=this._legendPosition.bind(this)(s);[!1,"top","bottom","left","right"].includes(l)||(l="bottom");var u=["top","bottom"].includes(l),h=this._legendPadding()?this._padding:{top:0,right:0,bottom:0,left:0},c={transform:`translate(${u?this._margin.left+h.left:this._margin.left}, ${u?this._margin.top:this._margin.top+h.top})`},s=this._legend.bind(this)(s,e),c=Dt("g.d3plus-viz-legend",{condition:s&&!this._legendConfig.select,enter:c,parent:this._select,duration:this._duration,update:c}).node();this._legendClass.id(n).align(u?"center":l).direction(u?"row":"column").duration(this._duration).data(s?e:[]).height(u?this._height-(this._margin.bottom+this._margin.top):this._height-(this._margin.bottom+this._margin.top+h.bottom+h.top)).locale(this._locale).parent(this).select(c).verticalAlign(u?l:"middle").width(u?this._width-(this._margin.left+this._margin.right+h.left+h.right):this._width-(this._margin.left+this._margin.right)).shapeConfig(Ft.bind(this)(this._shapeConfig,"legend")).shapeConfig({fill:(t,n)=>o(t,n)?this._hiddenColor(t,n):i(t,n,"fill"),labelConfig:{fontOpacity:(t,n)=>o(t,n)?this._hiddenOpacity(t,n):1}}).config(this._legendConfig).render(),!this._legendConfig.select&&t.height&&(this._margin[l]+=u?t.height+2*this._legendClass.padding():t.width+2*this._legendClass.padding())}
3862
+ */function Wd(t=[]){let e=[],i=(t,n,e)=>{var i=this._shape(t,n),i=("fill"===e&&"Line"===i&&(e="stroke"),(this._shapeConfig[i]&&this._shapeConfig[i][e]?this._shapeConfig[i]:this._shapeConfig)[e]);return"function"==typeof i?i.bind(this)(t,n):i};var n=(n,e)=>qd.map(t=>i(n,e,t)).join("_"),a=(Ke(this._colorScale?t.filter((t,n)=>void 0===this._colorScale(t,n)):t,t=>e.push(Vu(t,this._aggs)),n),e.sort(this._legendSort),e.map((t,n)=>this._ids(t,n).slice(0,this._drawDepth+1)));for(let n=this._legendDepth=0;n<=this._drawDepth;n++){var r=a.map(t=>t[n]);if(!r.some(t=>t instanceof Array)&&Array.from(new Set(r)).length===e.length){this._legendDepth=n;break}}let o=(t,n)=>{let e=this._id(t,n);return e instanceof Array&&(e=e[0]),this._hidden.includes(e)||this._solo.length&&!this._solo.includes(e)};var t=this._legendClass.outerBounds(),s=this.config();let l=this._legendPosition.bind(this)(s);[!1,"top","bottom","left","right"].includes(l)||(l="bottom");var u=["top","bottom"].includes(l),h=this._legendPadding()?this._padding:{top:0,right:0,bottom:0,left:0},c={transform:`translate(${u?this._margin.left+h.left:this._margin.left}, ${u?this._margin.top:this._margin.top+h.top})`},s=this._legend.bind(this)(s,e),c=Dt("g.d3plus-viz-legend",{condition:s&&!this._legendConfig.select,enter:c,parent:this._select,duration:this._duration,update:c}).node();this._legendClass.id(n).align(u?"center":l).direction(u?"row":"column").duration(this._duration).data(s?e:[]).height(u?this._height-(this._margin.bottom+this._margin.top):this._height-(this._margin.bottom+this._margin.top+h.bottom+h.top)).locale(this._locale).parent(this).select(c).verticalAlign(u?l:"middle").width(u?this._width-(this._margin.left+this._margin.right+h.left+h.right):this._width-(this._margin.left+this._margin.right)).shapeConfig(Ft.bind(this)(this._shapeConfig,"legend")).shapeConfig({fill:(t,n)=>o(t,n)?this._hiddenColor(t,n):i(t,n,"fill"),labelConfig:{fontOpacity:(t,n)=>o(t,n)?this._hiddenOpacity(t,n):1}}).config(this._legendConfig).render(),!this._legendConfig.select&&t.height&&(this._margin[l]+=u?t.height+2*this._legendClass.padding():t.width+2*this._legendClass.padding())}
3864
3863
  /**
3865
3864
  @function _drawSubtitle
3866
3865
  @desc Draws a subtitle if this._subtitle is defined.
@@ -3872,22 +3871,22 @@ function Hd(t,n){t!==n&&(t&&(t.p=n),n)&&(n.n=t)}Ld||(Ld=1,Kl.exports=((ql=Fd.pro
3872
3871
  @desc Determines whether or not to update the timeFilter method of the Viz.
3873
3872
  @param {Array|Date} The timeline selection given from the d3 brush.
3874
3873
  @private
3875
- */function Wd(n){n instanceof Array||(n=[n,n]),JSON.stringify(n)!==JSON.stringify(this._timelineSelection)&&(n=(this._timelineSelection=n).map(Number),this.timeFilter(t=>{t=Bt(this._time(t)).getTime();return t>=n[0]&&t<=n[1]}).render())}
3874
+ */function Yd(n){n instanceof Array||(n=[n,n]),JSON.stringify(n)!==JSON.stringify(this._timelineSelection)&&(n=(this._timelineSelection=n).map(Number),this.timeFilter(t=>{t=Bt(this._time(t)).getTime();return t>=n[0]&&t<=n[1]}).render())}
3876
3875
  /**
3877
3876
  @function _drawTimeline
3878
3877
  @desc Renders the timeline if this._time and this._timeline are not falsy and there are more than 1 tick available.
3879
3878
  @param {Array} data The filtered data array to be displayed.
3880
3879
  @private
3881
- */let Yd=!1;
3880
+ */let Vd=!1;
3882
3881
  /**
3883
3882
  @name zoomControls
3884
3883
  @desc Sets up initial zoom events and controls.
3885
3884
  @private
3886
- */function Vd(){if(this._container&&this._zoomGroup){let t=this._zoomHeight||this._height-this._margin.top-this._margin.bottom,n=this,e=this._zoomWidth||this._width-this._margin.left-this._margin.right,i=(this._zoomBehavior.extent([[0,0],[e,t]]).scaleExtent([1,this._zoomMax]).translateExtent([[0,0],[e,t]]).on("zoom",t=>Xd.bind(this)(t.transform)),this._zoomToBounds=Qd.bind(this),H(this._select.node().parentNode).selectAll("div.d3plus-zoom-control").data(this._zoom?[0]:[]));var a=i.enter().append("div").attr("class","d3plus-zoom-control"),a=(i.exit().remove(),i=i.merge(a).style("position","absolute").style("top",this._margin.top+"px").style("left",this._margin.left+"px"),a.append("div").attr("class","zoom-control zoom-in"),i.select(".zoom-in").on("click",Jd.bind(this,this._zoomFactor)).html("&#65291;"),a.append("div").attr("class","zoom-control zoom-out"),i.select(".zoom-out").on("click",Jd.bind(this,1/this._zoomFactor)).html("&#65293;"),a.append("div").attr("class","zoom-control zoom-reset"),i.select(".zoom-reset").on("click",Jd.bind(this,0)).html("&#8634"),a.append("div").attr("class","zoom-control zoom-brush"),i.select(".zoom-brush").on("click",function(){H(this).classed("active",!Yd).call(Ci,Yd?n._zoomControlStyle||{}:n._zoomControlStyleActive||{}),Zd.bind(n)(!Yd)}).html("&#164"),i.selectAll(".zoom-control").call(Ci,n._zoomControlStyle).on("mouseenter",function(){H(this).call(Ci,n._zoomControlStyleHover||{})}).on("mouseleave",function(){H(this).call(Ci,H(this).classed("active")?n._zoomControlStyleActive||{}:n._zoomControlStyle||{})}),this._zoomBrush.extent([[0,0],[e,t]]).filter(t=>!t.button&&t.detail<2).handleSize(this._zoomBrushHandleSize).on("start",
3885
+ */function Zd(){if(this._container&&this._zoomGroup){let t=this._zoomHeight||this._height-this._margin.top-this._margin.bottom,n=this,e=this._zoomWidth||this._width-this._margin.left-this._margin.right,i=(this._zoomBehavior.extent([[0,0],[e,t]]).scaleExtent([1,this._zoomMax]).translateExtent([[0,0],[e,t]]).on("zoom",t=>Jd.bind(this)(t.transform)),this._zoomToBounds=t0.bind(this),H(this._select.node().parentNode).selectAll("div.d3plus-zoom-control").data(this._zoom?[0]:[]));var a=i.enter().append("div").attr("class","d3plus-zoom-control"),a=(i.exit().remove(),i=i.merge(a).style("position","absolute").style("top",this._margin.top+"px").style("left",this._margin.left+"px"),a.append("div").attr("class","zoom-control zoom-in"),i.select(".zoom-in").on("click",Qd.bind(this,this._zoomFactor)).html("&#65291;"),a.append("div").attr("class","zoom-control zoom-out"),i.select(".zoom-out").on("click",Qd.bind(this,1/this._zoomFactor)).html("&#65293;"),a.append("div").attr("class","zoom-control zoom-reset"),i.select(".zoom-reset").on("click",Qd.bind(this,0)).html("&#8634"),a.append("div").attr("class","zoom-control zoom-brush"),i.select(".zoom-brush").on("click",function(){H(this).classed("active",!Vd).call(Ci,Vd?n._zoomControlStyle||{}:n._zoomControlStyleActive||{}),Xd.bind(n)(!Vd)}).html("&#164"),i.selectAll(".zoom-control").call(Ci,n._zoomControlStyle).on("mouseenter",function(){H(this).call(Ci,n._zoomControlStyleHover||{})}).on("mouseleave",function(){H(this).call(Ci,H(this).classed("active")?n._zoomControlStyleActive||{}:n._zoomControlStyle||{})}),this._zoomBrush.extent([[0,0],[e,t]]).filter(t=>!t.button&&t.detail<2).handleSize(this._zoomBrushHandleSize).on("start",
3887
3886
  /**
3888
3887
  @desc Triggered on brush "start".
3889
3888
  @private
3890
- */function(){t0.bind(this)()}
3889
+ */function(){n0.bind(this)()}
3891
3890
  /**
3892
3891
  @desc Overrides the default brush styles.
3893
3892
  @private
@@ -3895,37 +3894,37 @@ function Hd(t,n){t!==n&&(t&&(t.p=n),n)&&(n.n=t)}Ld||(Ld=1,Kl.exports=((ql=Fd.pro
3895
3894
  /**
3896
3895
  @desc Triggered on brush "brush".
3897
3896
  @private
3898
- */function(){t0.bind(this)()}
3897
+ */function(){n0.bind(this)()}
3899
3898
  /**
3900
3899
  @desc Triggered on brush "end".
3901
3900
  @private
3902
3901
  */.bind(this)).on("end",function(t){t.selection&&(// Only transition after input.
3903
- this._brushGroup.call(this._zoomBrush.move,null),Qd.bind(this)(t.selection))}.bind(this)),this._container.selectAll("g.brush").data([0]));this._brushGroup=a.enter().append("g").attr("class","brush").merge(a).call(this._zoomBrush),Zd.bind(this)(),this._renderTiles&&this._renderTiles(kd(this._container.node()),0)}}
3902
+ this._brushGroup.call(this._zoomBrush.move,null),t0.bind(this)(t.selection))}.bind(this)),this._container.selectAll("g.brush").data([0]));this._brushGroup=a.enter().append("g").attr("class","brush").merge(a).call(this._zoomBrush),Xd.bind(this)(),this._renderTiles&&this._renderTiles(Ad(this._container.node()),0)}}
3904
3903
  /**
3905
3904
  @name zoomEvents
3906
3905
  @desc Handles adding/removing zoom event listeners.
3907
3906
  @private
3908
- */function Zd(t=!1){(Yd=t)?this._brushGroup.style("display","inline"):this._brushGroup.style("display","none"),!Yd&&this._zoom?(this._container.call(this._zoomBehavior),this._zoomScroll||this._container.on("wheel.zoom",null),this._zoomPan||this._container.on("mousedown.zoom mousemove.zoom",null).on("touchstart.zoom touchmove.zoom touchend.zoom touchcancel.zoom",null)):this._container.on(".zoom",null)}
3907
+ */function Xd(t=!1){(Vd=t)?this._brushGroup.style("display","inline"):this._brushGroup.style("display","none"),!Vd&&this._zoom?(this._container.call(this._zoomBehavior),this._zoomScroll||this._container.on("wheel.zoom",null),this._zoomPan||this._container.on("mousedown.zoom mousemove.zoom",null).on("touchstart.zoom touchmove.zoom touchend.zoom touchcancel.zoom",null)):this._container.on(".zoom",null)}
3909
3908
  /**
3910
3909
  @name zoomed
3911
3910
  @desc Handles events dispatched from this._zoomBehavior
3912
3911
  @param {Object} [*transform* = event.transform]
3913
3912
  @param {Number} [*duration* = 0]
3914
3913
  @private
3915
- */function Xd(t=!1,n=0){this._zoomGroup&&(n?this._zoomGroup.transition().duration(n):this._zoomGroup).attr("transform",t),this._renderTiles&&this._renderTiles(kd(this._container.node()),n)}
3914
+ */function Jd(t=!1,n=0){this._zoomGroup&&(n?this._zoomGroup.transition().duration(n):this._zoomGroup).attr("transform",t),this._renderTiles&&this._renderTiles(Ad(this._container.node()),n)}
3916
3915
  /**
3917
3916
  @name zoomMath
3918
3917
  @desc Zooms in or out based on the provided multiplier.
3919
3918
  @param {Number} [*factor* = 0]
3920
3919
  @private
3921
- */function Jd(t=0){var n,e,i,a;this._container&&(n=this._zoomBehavior.extent().bind(document)()[1].map(t=>t/2),e=this._zoomBehavior.scaleExtent(),i=kd(this._container.node()),!t||(a=[(n[0]-i.x)/i.k,(n[1]-i.y)/i.k],i.k=Math.min(e[1],i.k*t),i.k<=e[0])?(i.k=e[0],i.x=0,i.y=0):(i.x+=n[0]-(a[0]*i.k+i.x),i.y+=n[1]-(a[1]*i.k+i.y)),Xd.bind(this)(i,this._duration))}
3920
+ */function Qd(t=0){var n,e,i,a;this._container&&(n=this._zoomBehavior.extent().bind(document)()[1].map(t=>t/2),e=this._zoomBehavior.scaleExtent(),i=Ad(this._container.node()),!t||(a=[(n[0]-i.x)/i.k,(n[1]-i.y)/i.k],i.k=Math.min(e[1],i.k*t),i.k<=e[0])?(i.k=e[0],i.x=0,i.y=0):(i.x+=n[0]-(a[0]*i.k+i.x),i.y+=n[1]-(a[1]*i.k+i.y)),Jd.bind(this)(i,this._duration))}
3922
3921
  /**
3923
3922
  @name zoomToBounds
3924
3923
  @desc Zooms to given bounds.
3925
3924
  @param {Array} *bounds*
3926
3925
  @param {Number} [*duration* = 0]
3927
3926
  @private
3928
- */function Qd(i,t=this._duration){var a=this._zoomBehavior.scaleExtent(),r=kd(this._container.node());if(i){var[o,s]=this._zoomBehavior.translateExtent()[1],l=i[1][0]-i[0][0],u=i[1][1]-i[0][1];let t=Math.min(a[1],1/Math.max(l/o,u/s)),n,e;l/u<o/s?(t*=(s-2*this._zoomPadding)/s,n=(o-l*t)/2/t,e=this._zoomPadding/t):(t*=(o-2*this._zoomPadding)/o,e=(s-u*t)/2/t,n=this._zoomPadding/t),r.x=(r.x-i[0][0]+n)*(r.k*t/r.k),r.y=(r.y-i[0][1]+e)*(r.k*t/r.k),r.k*=t,0<r.x?r.x=0:r.x<o*-r.k+o&&(r.x=o*-r.k+o),0<r.y?r.y=0:r.y<s*-r.k+s&&(r.y=s*-r.k+s)}else r.k=a[0],r.x=0,r.y=0;Xd.bind(this)(r,t)}function t0(){this._brushGroup.selectAll(".selection").call(f,this._zoomBrushSelectionStyle||{}),this._brushGroup.selectAll(".handle").call(f,this._zoomBrushHandleStyle||{})}
3927
+ */function t0(i,t=this._duration){var a=this._zoomBehavior.scaleExtent(),r=Ad(this._container.node());if(i){var[o,s]=this._zoomBehavior.translateExtent()[1],l=i[1][0]-i[0][0],u=i[1][1]-i[0][1];let t=Math.min(a[1],1/Math.max(l/o,u/s)),n,e;l/u<o/s?(t*=(s-2*this._zoomPadding)/s,n=(o-l*t)/2/t,e=this._zoomPadding/t):(t*=(o-2*this._zoomPadding)/o,e=(s-u*t)/2/t,n=this._zoomPadding/t),r.x=(r.x-i[0][0]+n)*(r.k*t/r.k),r.y=(r.y-i[0][1]+e)*(r.k*t/r.k),r.k*=t,0<r.x?r.x=0:r.x<o*-r.k+o&&(r.x=o*-r.k+o),0<r.y?r.y=0:r.y<s*-r.k+s&&(r.y=s*-r.k+s)}else r.k=a[0],r.x=0,r.y=0;Jd.bind(this)(r,t)}function n0(){this._brushGroup.selectAll(".selection").call(f,this._zoomBrushSelectionStyle||{}),this._brushGroup.selectAll(".handle").call(f,this._zoomBrushHandleStyle||{})}
3929
3928
  /**
3930
3929
  @name _drawAttribution
3931
3930
  @desc Draws absolute positioned attribution text.
@@ -3937,14 +3936,14 @@ this._brushGroup.call(this._zoomBrush.move,null),Qd.bind(this)(t.selection))}.bi
3937
3936
  @param {Object} *d* The data object being interacted with.
3938
3937
  @param {Number} *i* The index of the data object being interacted with.
3939
3938
  @private
3940
- */function n0(t,n,e,i){if(i.stopPropagation(),this._drawDepth<this._groupBy.length-1){this._select.style("cursor","auto");let e=this._groupBy[this._drawDepth],i=e(t,n),a=(this.hover(!1),this._tooltip(t,n)&&this._tooltipClass.data([]).render(),this._filter);this._history.push({depth:this._depth,filter:a}),this.config({depth:this._drawDepth+1,filter:(t,n)=>(!a||a(t,n))&&e(t,n)===i}).render()}}
3939
+ */function e0(t,n,e,i){if(i.stopPropagation(),this._drawDepth<this._groupBy.length-1){this._select.style("cursor","auto");let e=this._groupBy[this._drawDepth],i=e(t,n),a=(this.hover(!1),this._tooltip(t,n)&&this._tooltipClass.data([]).render(),this._filter);this._history.push({depth:this._depth,filter:a}),this.config({depth:this._drawDepth+1,filter:(t,n)=>(!a||a(t,n))&&e(t,n)===i}).render()}}
3941
3940
  /**
3942
3941
  @module clickLegend
3943
3942
  @desc On click event for all legend shapes in a Viz.
3944
3943
  @param {Object} *d* The data object being interacted with.
3945
3944
  @param {Number} *i* The index of the data object being interacted with.
3946
3945
  @private
3947
- */function e0(t,n,e,i){this._select.style("cursor","auto"),this._tooltip(t,n)&&this._tooltipClass.data([]).render();let a=this._id(t,n);a instanceof Array||(a=[a]);var t=this._hidden.indexOf(a[0]),n=this._solo.indexOf(a[0]),r=ii(this._legendClass.data().map((t,n)=>{let e=this._id(t,n);return e=e instanceof Array?e:[e]})).length;this._legendFilterInvert.bind(this)()?i.shiftKey?t<0&&!this._solo.length?(this._hidden=this._hidden.concat(a),0<=n&&(this._solo=[]),this._hidden.length===r&&(this._hidden=[]),this.render()):0<=n&&(this._solo=[],this._hidden=[],this.render()):(n<0&&this._hidden.length<r-1?this._solo=a:this._solo=[],this._hidden=[],this.render()):i.shiftKey&&n<0?(this._solo=a,this._hidden=[],this.render()):i.shiftKey||(0<=t?this._hidden.splice(t,a.length):0<=n?(this._solo=[],this._hidden=[]):this._solo.length&&n<0?(this._solo=this._solo.concat(a),this._solo.length===r&&(this._solo=[])):(this._hidden=this._hidden.concat(a),this._hidden.length===r&&(this._hidden=[])),this.render())}
3946
+ */function i0(t,n,e,i){this._select.style("cursor","auto"),this._tooltip(t,n)&&this._tooltipClass.data([]).render();let a=this._id(t,n);a instanceof Array||(a=[a]);var t=this._hidden.indexOf(a[0]),n=this._solo.indexOf(a[0]),r=ii(this._legendClass.data().map((t,n)=>{let e=this._id(t,n);return e=e instanceof Array?e:[e]})).length;this._legendFilterInvert.bind(this)()?i.shiftKey?t<0&&!this._solo.length?(this._hidden=this._hidden.concat(a),0<=n&&(this._solo=[]),this._hidden.length===r&&(this._hidden=[]),this.render()):0<=n&&(this._solo=[],this._hidden=[],this.render()):(n<0&&this._hidden.length<r-1?this._solo=a:this._solo=[],this._hidden=[],this.render()):i.shiftKey&&n<0?(this._solo=a,this._hidden=[],this.render()):i.shiftKey||(0<=t?this._hidden.splice(t,a.length):0<=n?(this._solo=[],this._hidden=[]):this._solo.length&&n<0?(this._solo=this._solo.concat(a),this._solo.length===r&&(this._solo=[])):(this._hidden=this._hidden.concat(a),this._hidden.length===r&&(this._hidden=[])),this.render())}
3948
3947
  /**
3949
3948
  @module mouseEnter
3950
3949
  @desc On mouseenter event for all shapes in a Viz.
@@ -3954,9 +3953,11 @@ this._brushGroup.call(this._zoomBrush.move,null),Qd.bind(this)(t.selection))}.bi
3954
3953
  */
3955
3954
  /**
3956
3955
  * Default padding logic that will return false if the screen is less than 600 pixels wide.
3957
- */function i0(){return"undefined"==typeof window||600<window.innerWidth}
3956
+ * @private
3957
+ */function a0(){return"undefined"==typeof window||600<window.innerWidth}
3958
3958
  /**
3959
3959
  * Turns an array of values into a list string.
3960
+ * @private
3960
3961
  */
3961
3962
  /**
3962
3963
  * A function that introspects the `d` Data Object for internally nested
@@ -3965,7 +3966,7 @@ this._brushGroup.call(this._zoomBrush.move,null),Qd.bind(this)(t.selection))}.bi
3965
3966
  * @param {Object} d Data Object
3966
3967
  * @param {Number} i Index of Data Object in Array
3967
3968
  * @private
3968
- */function a0(t,n,e){for(;n.__d3plus__&&n.data;)e=(n=n.data).i;return t(n,e)}class r0 extends Ri{
3969
+ */function r0(t,n,e){for(;n.__d3plus__&&n.data;)e=(n=n.data).i;return t(n,e)}class o0 extends Ri{
3969
3970
  /**
3970
3971
  @memberof Viz
3971
3972
  @desc Called by draw before anything is drawn. Formats the data and performs preparations for draw.
@@ -3975,9 +3976,9 @@ this._brushGroup.call(this._zoomBrush.move,null),Qd.bind(this)(t.selection))}.bi
3975
3976
  // set the default timeFilter if it has not been specified
3976
3977
  if(this._drawDepth=void 0!==this._depth?Pt([0<=this._depth?this._depth:0,this._groupBy.length-1]):this._groupBy.length-1,
3977
3978
  // Returns the current unique ID for a data point, coerced to a String.
3978
- this._id=(t,n)=>{t=a0(this._groupBy[this._drawDepth],t,n);return"number"==typeof t?""+t:t},
3979
+ this._id=(t,n)=>{t=r0(this._groupBy[this._drawDepth],t,n);return"number"==typeof t?""+t:t},
3979
3980
  // Returns an array of the current unique groupBy ID for a data point, coerced to Strings.
3980
- this._ids=(n,e)=>this._groupBy.map(t=>""+a0(t,n,e)).filter(Boolean),this._drawLabel=(t,n,e=this._drawDepth)=>{if(!t)return"";for(;t.__d3plus__&&t.data;)n=(t=t.data).i;var i;return t._isAggregation?`${this._thresholdName(t,n)} < ${kh(100*t._threshold,this._locale)}%`:this._label&&e===this._drawDepth?""+this._label(t,n):(e=a._ids(t,n).slice(0,e+1),(e=e.reverse().find(t=>!(t instanceof Array))||e[e.length-1])instanceof Array?(i=e).reduce((t,n,e)=>(e?e===i.length-1&&1===e?t+=" and "+n:e===i.length-1?t+=", and "+n:t+=", "+n:t+=n,t),""):""+e)},this._time&&!this._timeFilter&&this._data.length){var t=this._data.map(this._time).map(Bt),n=this._data[0];if(this._discrete&&"_"+this._discrete in this&&this["_"+this._discrete](n,0)===this._time(n,0))this._timeFilter=()=>!0;else{let e=+Nt(t);this._timeFilter=(t,n)=>+Bt(this._time(t,n))==e}}this._filteredData=[],this._legendData=[];let e=[];if(this._data.length){e=this._timeFilter?this._data.filter(this._timeFilter):this._data,this._filter&&(e=e.filter(this._filter));var i=[];for(let t=0;t<=this._drawDepth;t++)i.push(this._groupBy[t]);this._discrete&&"_"+this._discrete in this&&i.push(this["_"+this._discrete]),this._discrete&&`_${this._discrete}2`in this&&i.push(this[`_${this._discrete}2`]);n=Ke(e,t=>{var n=this._data.indexOf(t[0]),e=this._shape(t[0],n),n=this._id(t[0],n),i=Vu(t,this._aggs);this._hidden.includes(n)||this._solo.length&&!this._solo.includes(n)||(this._discrete||"Line"!==e?this._filteredData.push(i):this._filteredData=this._filteredData.concat(t)),this._legendData.push(i)},...i);this._filteredData=this._thresholdFunction(this._filteredData,n)}
3981
+ this._ids=(n,e)=>this._groupBy.map(t=>""+r0(t,n,e)).filter(Boolean),this._drawLabel=(t,n,e=this._drawDepth)=>{if(!t)return"";for(;t.__d3plus__&&t.data;)n=(t=t.data).i;var i;return t._isAggregation?`${this._thresholdName(t,n)} < ${kh(100*t._threshold,this._locale)}%`:this._label&&e===this._drawDepth?""+this._label(t,n):(e=a._ids(t,n).slice(0,e+1),(e=e.reverse().find(t=>!(t instanceof Array))||e[e.length-1])instanceof Array?(i=e).reduce((t,n,e)=>(e?e===i.length-1&&1===e?t+=" and "+n:e===i.length-1?t+=", and "+n:t+=", "+n:t+=n,t),""):""+e)},this._time&&!this._timeFilter&&this._data.length){var t=this._data.map(this._time).map(Bt),n=this._data[0];if(this._discrete&&"_"+this._discrete in this&&this["_"+this._discrete](n,0)===this._time(n,0))this._timeFilter=()=>!0;else{let e=+Nt(t);this._timeFilter=(t,n)=>+Bt(this._time(t,n))==e}}this._filteredData=[],this._legendData=[];let e=[];if(this._data.length){e=this._timeFilter?this._data.filter(this._timeFilter):this._data,this._filter&&(e=e.filter(this._filter));var i=[];for(let t=0;t<=this._drawDepth;t++)i.push(this._groupBy[t]);this._discrete&&"_"+this._discrete in this&&i.push(this["_"+this._discrete]),this._discrete&&`_${this._discrete}2`in this&&i.push(this[`_${this._discrete}2`]);n=Ke(e,t=>{var n=this._data.indexOf(t[0]),e=this._shape(t[0],n),n=this._id(t[0],n),i=Vu(t,this._aggs);this._hidden.includes(n)||this._solo.length&&!this._solo.includes(n)||(this._discrete||"Line"!==e?this._filteredData.push(i):this._filteredData=this._filteredData.concat(t)),this._legendData.push(i)},...i);this._filteredData=this._thresholdFunction(this._filteredData,n)}
3981
3982
  // overrides the hoverOpacity of shapes if data is larger than cutoff
3982
3983
  t=this._filteredData,n=[this._id],$e(t,Ge,Ge,n).size>this._dataCutoff?(void 0===this._userHover&&(this._userHover=this._shapeConfig.hoverOpacity||.5),void 0===this._userDuration&&(this._userDuration=this._shapeConfig.duration||600),this._shapeConfig.hoverOpacity=1,this._shapeConfig.duration=0):void 0!==this._userHover&&(this._shapeConfig.hoverOpacity=this._userHover,this._shapeConfig.duration=this._userDuration),this._noDataMessage&&!this._filteredData.length&&(this._messageClass.render({container:this._select.node().parentNode,html:this._noDataHTML(this),mask:!1,style:this._messageStyle}),this._select.transition().duration(this._duration).attr("opacity",0))}
3983
3984
  /**
@@ -3988,7 +3989,7 @@ t=this._filteredData,n=[this._id],$e(t,Ge,Ge,n).size>this._dataCutoff?(void 0===
3988
3989
  // Sanitizes user input for legendPosition and colorScalePosition
3989
3990
  let t=this._legendPosition.bind(this)(this.config()),n=([!1,"top","bottom","left","right"].includes(t)||(t="bottom"),this._colorScalePosition.bind(this)(this.config()));[!1,"top","bottom","left","right"].includes(n)||(n="bottom"),
3990
3991
  // Draws legend and colorScale if they are positioned "left" or "right"
3991
- "left"!==t&&"right"!==t||Ud.bind(this)(this._legendData),"left"!==n&&"right"!==n&&!1!==n||Kd.bind(this)(this._filteredData),
3992
+ "left"!==t&&"right"!==t||Wd.bind(this)(this._legendData),"left"!==n&&"right"!==n&&!1!==n||$d.bind(this)(this._filteredData),
3992
3993
  // Draws all of the top/bottom UI elements
3993
3994
  function(){var t=this._history.length,n=Dt("g.d3plus-viz-back",{parent:this._select,duration:this._duration,update:{transform:`translate(${this._margin.left}, ${this._margin.top})`}}).node();this._backClass.data(t?[{text:"← "+this._translate("Back"),x:0,y:0}]:[]).select(n).config(this._backConfig).render(),this._margin.top+=t?this._backClass.fontSize()()+2*this._backClass.padding()():0}.bind(this)(),
3994
3995
  /**
@@ -4002,12 +4003,13 @@ function(){var t=this._history.length,n=Dt("g.d3plus-viz-back",{parent:this._sel
4002
4003
  @desc Draws a total title if this._total is defined.
4003
4004
  @param {Array} [*data*] The currently filtered dataset.
4004
4005
  @private
4005
- */.bind(this)(this._filteredData),function(t=[]){var t=!!this._subtitle&&this._subtitle(t),n=this._subtitlePadding()?this._padding:{right:0,left:0},e=Dt("g.d3plus-viz-subtitle",{enter:e={transform:`translate(${this._margin.left+n.left}, ${this._margin.top})`},parent:this._select,duration:0,update:e}).node();this._subtitleClass.data(t?[{text:t}]:[]).locale(this._locale).select(e).width(this._width-(this._margin.left+this._margin.right+n.left+n.right)).config(this._subtitleConfig).render(),this._margin.top+=t?e.getBBox().height+2*this._subtitleConfig.padding:0}.bind(this)(this._filteredData),function(t=[]){var t="function"==typeof this._total?ai(t.map(this._total)):!(!0!==this._total||!this._size)&&ai(t.map(this._size)),n=this._totalPadding()?this._padding:{right:0,left:0},e=Dt("g.d3plus-viz-total",{enter:e={transform:`translate(${this._margin.left+n.left}, ${this._margin.top})`},parent:this._select,duration:0,update:e}).node();this._totalClass.data(t?[{text:this._totalFormat(t)}]:[]).locale(this._locale).select(e).width(this._width-(this._margin.left+this._margin.right+n.left+n.right)).config(this._totalConfig).render(),this._margin.top+=t?e.getBBox().height+2*this._totalConfig.padding:0}.bind(this)(this._filteredData),function(t=[]){var e=(i=this._time&&this._timeline)?Yu(this._data.map(this._time)).map(Bt):[],i=i&&1<e.length,a=this._timelinePadding()?this._padding:{right:0,left:0},r={transform:`translate(${this._margin.left+a.left}, 0)`},r=Dt("g.d3plus-viz-timeline",{condition:i,enter:r,parent:this._select,duration:this._duration,update:r}).node();if(i){i=this._timelineClass.domain(Re(e)).duration(this._duration).height(this._height-this._margin.bottom).locale(this._locale).select(r).ticks(e.sort((t,n)=>+t-+n)).width(this._width-(this._margin.left+this._margin.right+a.left+a.right)),r=Re(t.map(this._time).map(Bt));this._timelineSelection?(this._timelineSelection[0]<r[0]&&(this._timelineSelection[0]=r[0]),this._timelineSelection[1]>r[1]&&(this._timelineSelection[1]=r[1])):this._timelineSelection=this._timelineDefault||r,i.selection(this._timelineSelection);let n=this._timelineConfig;i.config(n).on("brush",t=>{Wd.bind(this)(t),n.on&&n.on.brush&&n.on.brush(t)}).on("end",t=>{Wd.bind(this)(t),n.on&&n.on.end&&n.on.end(t)}).render(),this._margin.bottom+=i.outerBounds().height+2*i.padding()}}.bind(this)(this._filteredData),
4006
+ */.bind(this)(this._filteredData),function(t=[]){var t=!!this._subtitle&&this._subtitle(t),n=this._subtitlePadding()?this._padding:{right:0,left:0},e=Dt("g.d3plus-viz-subtitle",{enter:e={transform:`translate(${this._margin.left+n.left}, ${this._margin.top})`},parent:this._select,duration:0,update:e}).node();this._subtitleClass.data(t?[{text:t}]:[]).locale(this._locale).select(e).width(this._width-(this._margin.left+this._margin.right+n.left+n.right)).config(this._subtitleConfig).render(),this._margin.top+=t?e.getBBox().height+2*this._subtitleConfig.padding:0}.bind(this)(this._filteredData),function(t=[]){var t="function"==typeof this._total?ai(t.map(this._total)):!(!0!==this._total||!this._size)&&ai(t.map(this._size)),n=this._totalPadding()?this._padding:{right:0,left:0},e=Dt("g.d3plus-viz-total",{enter:e={transform:`translate(${this._margin.left+n.left}, ${this._margin.top})`},parent:this._select,duration:0,update:e}).node();this._totalClass.data(t?[{text:this._totalFormat(t)}]:[]).locale(this._locale).select(e).width(this._width-(this._margin.left+this._margin.right+n.left+n.right)).config(this._totalConfig).render(),this._margin.top+=t?e.getBBox().height+2*this._totalConfig.padding:0}.bind(this)(this._filteredData),function(t=[]){var e=(i=this._time&&this._timeline)?Yu(this._data.map(this._time)).map(Bt):[],i=i&&1<e.length,a=this._timelinePadding()?this._padding:{right:0,left:0},r={transform:`translate(${this._margin.left+a.left}, 0)`},r=Dt("g.d3plus-viz-timeline",{condition:i,enter:r,parent:this._select,duration:this._duration,update:r}).node();if(i){i=this._timelineClass.domain(Re(e)).duration(this._duration).height(this._height-this._margin.bottom).locale(this._locale).select(r).ticks(e.sort((t,n)=>+t-+n)).width(this._width-(this._margin.left+this._margin.right+a.left+a.right)),r=Re(t.map(this._time).map(Bt));this._timelineSelection?(this._timelineSelection[0]<r[0]&&(this._timelineSelection[0]=r[0]),this._timelineSelection[1]>r[1]&&(this._timelineSelection[1]=r[1])):this._timelineSelection=this._timelineDefault||r,i.selection(this._timelineSelection);let n=this._timelineConfig;i.config(n).on("brush",t=>{Yd.bind(this)(t),n.on&&n.on.brush&&n.on.brush(t)}).on("end",t=>{Yd.bind(this)(t),n.on&&n.on.end&&n.on.end(t)}).render(),this._margin.bottom+=i.outerBounds().height+2*i.padding()}}.bind(this)(this._filteredData),
4006
4007
  // Draws legend and colorScale if they are positioned "top" or "bottom"
4007
- "top"!==t&&"bottom"!==t||Ud.bind(this)(this._legendData),"top"!==n&&"bottom"!==n||Kd.bind(this)(this._filteredData),this._shapes=[]}
4008
+ "top"!==t&&"bottom"!==t||Wd.bind(this)(this._legendData),"top"!==n&&"bottom"!==n||$d.bind(this)(this._filteredData),this._shapes=[]}
4008
4009
  /**
4009
4010
  * Applies the threshold algorithm according to the type of chart used.
4010
4011
  * @param {Array} data The data to process.
4012
+ * @private
4011
4013
  */_thresholdFunction(t){return t}
4012
4014
  /**
4013
4015
  @memberof Viz
@@ -4025,12 +4027,12 @@ this._width&&this._height||this._detectVisible&&!xi(this._select.node())||(this.
4025
4027
  // sets "position: relative" on the SVG parent if currently undefined
4026
4028
  let t=H(this._select.node().parentNode);"static"===t.style("position")&&t.style("position","relative"),t.style("font-family",Me(this._fontFamily)),
4027
4029
  // sets initial opacity to 1, if it has not already been set
4028
- null===this._select.attr("opacity")&&this._select.attr("opacity",1);var n=this._select.selectAll("title").data([0]),e=n.enter().append("title").attr("id",this._uuid+"-title"),n=(n.merge(e).text(this._svgTitle),this._select.selectAll("desc").data([0])),e=n.enter().append("desc").attr("id",this._uuid+"-desc");if(n.merge(e).text(this._svgDesc),this._visiblePoll=clearInterval(this._visiblePoll),this._resizePoll=clearTimeout(this._resizePoll),this._scrollPoll=clearTimeout(this._scrollPoll),H(this._scrollContainer).on("scroll."+this._uuid,null),H(this._resizeContainer).on("resize."+this._uuid,null),this._detectVisible&&"hidden"===this._select.style("visibility"))this._visiblePoll=setInterval(()=>{"hidden"!==this._select.style("visibility")&&(this._visiblePoll=clearInterval(this._visiblePoll),this.render(i))},this._detectVisibleInterval);else if(this._detectVisible&&"none"===this._select.style("display"))this._visiblePoll=setInterval(()=>{"none"!==this._select.style("display")&&(this._visiblePoll=clearInterval(this._visiblePoll),this.render(i))},this._detectVisibleInterval);else if(this._detectVisible&&!xi(this._select.node()))H(this._scrollContainer).on("scroll."+this._uuid,()=>{this._scrollPoll||(this._scrollPoll=setTimeout(()=>{xi(this._select.node())&&(H(this._scrollContainer).on("scroll."+this._uuid,null),this.render(i)),this._scrollPoll=clearTimeout(this._scrollPoll)},this._detectVisibleInterval))});else{let e=bd();this._queue.forEach(t=>{var n=this._cache?this._lrucache.get(t[3]+"_"+t[1]):void 0;n?this["_"+t[3]]=t[2]?t[2](n):n:e.defer(...t)}),this._queue=[],this._loadingMessage&&e._tasks.length&&this._messageClass.render({container:this._select.node().parentNode,html:this._loadingHTML(this),mask:!!this._filteredData&&this._messageMask,style:this._messageStyle}),e.awaitAll(()=>{
4030
+ null===this._select.attr("opacity")&&this._select.attr("opacity",1);var n=this._select.selectAll("title").data([0]),e=n.enter().append("title").attr("id",this._uuid+"-title"),n=(n.merge(e).text(this._svgTitle),this._select.selectAll("desc").data([0])),e=n.enter().append("desc").attr("id",this._uuid+"-desc");if(n.merge(e).text(this._svgDesc),this._visiblePoll=clearInterval(this._visiblePoll),this._resizePoll=clearTimeout(this._resizePoll),this._scrollPoll=clearTimeout(this._scrollPoll),H(this._scrollContainer).on("scroll."+this._uuid,null),H(this._resizeContainer).on("resize."+this._uuid,null),this._detectVisible&&"hidden"===this._select.style("visibility"))this._visiblePoll=setInterval(()=>{"hidden"!==this._select.style("visibility")&&(this._visiblePoll=clearInterval(this._visiblePoll),this.render(i))},this._detectVisibleInterval);else if(this._detectVisible&&"none"===this._select.style("display"))this._visiblePoll=setInterval(()=>{"none"!==this._select.style("display")&&(this._visiblePoll=clearInterval(this._visiblePoll),this.render(i))},this._detectVisibleInterval);else if(this._detectVisible&&!xi(this._select.node()))H(this._scrollContainer).on("scroll."+this._uuid,()=>{this._scrollPoll||(this._scrollPoll=setTimeout(()=>{xi(this._select.node())&&(H(this._scrollContainer).on("scroll."+this._uuid,null),this.render(i)),this._scrollPoll=clearTimeout(this._scrollPoll)},this._detectVisibleInterval))});else{let e=xd();this._queue.forEach(t=>{var n=this._cache?this._lrucache.get(t[3]+"_"+t[1]):void 0;n?this["_"+t[3]]=t[2]?t[2](n):n:e.defer(...t)}),this._queue=[],this._loadingMessage&&e._tasks.length&&this._messageClass.render({container:this._select.node().parentNode,html:this._loadingHTML(this),mask:!!this._filteredData&&this._messageMask,style:this._messageStyle}),e.awaitAll(()=>{
4029
4031
  // creates a data table as DOM elements inside of the SVG for accessibility
4030
4032
  // only if this._ariaHidden is set to true
4031
4033
  let e=this._data instanceof Array&&0<this._data.length?Object.keys(this._data[0]):[];var t=this._select.selectAll("g.data-table").data(!this._ariaHidden&&this._data instanceof Array&&this._data.length?[0]:[]),n=t.enter().append("g").attr("class","data-table").attr("role","table"),t=(t.exit().remove(),t.merge(n).selectAll("text").data(this._data instanceof Array?Lt(0,this._data.length+1):[])),n=(t.exit().remove(),t.merge(t.enter().append("text").attr("role","row")).selectAll("tspan").data((t,n)=>e.map(t=>({role:n?"cell":"columnheader",text:n?this._data[n-1][t]:t}))));n.exit().remove(),n.merge(n.enter().append("tspan")).attr("role",t=>t.role).attr("dy","-1000px").html(t=>t.text),
4032
4034
  // finishes the draw cycle
4033
- this._preDraw(),this._draw(i),Vd.bind(this)(),function(){let t=H(this._select.node().parentNode).selectAll("div.d3plus-attribution").data(this._attribution?[0]:[]);var n=t.enter().append("div").attr("class","d3plus-attribution");t.exit().remove(),t=t.merge(n).style("position","absolute").html(this._attribution).style("right",this._margin.right+"px").style("bottom",this._margin.bottom+"px").call(Ci,this._attributionStyle)}.bind(this)(),!this._messageClass._isVisible||this._noDataMessage&&!this._filteredData.length||(this._messageClass.hide(),"0"===this._select.attr("opacity")&&this._select.transition().duration(this._duration).attr("opacity",1)),this._detectResize&&(this._autoWidth||this._autoHeight)&&H(this._resizeContainer).on("resize."+this._uuid,()=>{this._resizePoll=clearTimeout(this._resizePoll),this._resizePoll=setTimeout(()=>{this._resizePoll=clearTimeout(this._resizePoll),a.bind(this)(),this.render(i)},this._detectResizeDelay)}),i&&setTimeout(i,this._duration+100)})}
4035
+ this._preDraw(),this._draw(i),Zd.bind(this)(),function(){let t=H(this._select.node().parentNode).selectAll("div.d3plus-attribution").data(this._attribution?[0]:[]);var n=t.enter().append("div").attr("class","d3plus-attribution");t.exit().remove(),t=t.merge(n).style("position","absolute").html(this._attribution).style("right",this._margin.right+"px").style("bottom",this._margin.bottom+"px").call(Ci,this._attributionStyle)}.bind(this)(),!this._messageClass._isVisible||this._noDataMessage&&!this._filteredData.length||(this._messageClass.hide(),"0"===this._select.attr("opacity")&&this._select.transition().duration(this._duration).attr("opacity",1)),this._detectResize&&(this._autoWidth||this._autoHeight)&&H(this._resizeContainer).on("resize."+this._uuid,()=>{this._resizePoll=clearTimeout(this._resizePoll),this._resizePoll=setTimeout(()=>{this._resizePoll=clearTimeout(this._resizePoll),a.bind(this)(),this.render(i)},this._detectResizeDelay)}),i&&setTimeout(i,this._duration+100)})}
4034
4036
  // Attaches touchstart event listener to the BODY to hide the tooltip when the user touches any element without data
4035
4037
  return H("body").on("touchstart."+this._uuid,
4036
4038
  /**
@@ -4577,14 +4579,14 @@ return H("body").on("touchstart."+this._uuid,
4577
4579
  @memberof Viz
4578
4580
  @desc Invoked when creating a new class instance, and sets any default parameters.
4579
4581
  @private
4580
- */constructor(){super(),this._aggs={},this._ariaHidden=!0,this._attribution=!1,this._attributionStyle={background:"rgba(255, 255, 255, 0.75)",border:"1px solid rgba(0, 0, 0, 0.25)",color:"rgba(0, 0, 0, 0.75)",display:"block",font:"400 11px/11px "+Me(Ee),margin:"5px",opacity:.75,padding:"4px 6px 3px"},this._backClass=(new Sc).on("click",()=>{(this._history.length?this.config(this._history.pop()):this.depth(this._drawDepth-1).filter(!1)).render()}).on("mousemove",()=>this._backClass.select().style("cursor","pointer")),this._backConfig={fontSize:10,padding:5,resize:!1},this._cache=!0,this._color=(t,n)=>this._groupBy[0](t,n),this._colorDefaults={...mu,scale:Ji().range(mu.scale.range())},this._colorScaleClass=new bc,this._colorScaleConfig={axisConfig:{rounding:"inside"},scale:"jenks"},this._colorScalePadding=i0,this._colorScalePosition=()=>this._width>1.5*this._height?"right":"bottom",this._colorScaleMaxSize=600,this._data=[],this._dataCutoff=100,this._detectResize=!0,this._detectResizeDelay=400,this._detectVisible=!0,this._detectVisibleInterval=1e3,this._downloadButton=!1,this._downloadConfig={type:"png"},this._downloadPosition="top",this._duration=600,this._fontFamily=Ee,this._hidden=[],this._hiddenColor=Ot("#aaa"),this._hiddenOpacity=Ot(.5),this._history=[],this._groupBy=[p("id")],this._legend=(t,n)=>{var e=Nt(n,(t,n)=>{t=this._groupBy[this._legendDepth].bind(this)(t,n);return t instanceof Array?t.length:1});return 1<n.length&&e<=2},this._legendClass=new vc,this._legendConfig={label:qd.bind(this),shapeConfig:{ariaLabel:qd.bind(this),labelConfig:{fontColor:void 0,fontResize:!1,padding:0}}},this._legendFilterInvert=Ot(!1),this._legendPadding=i0,this._legendPosition=()=>this._width>1.5*this._height?"right":"bottom",this._legendSort=(t,n)=>this._drawLabel(t).localeCompare(this._drawLabel(n)),this._legendTooltip={},this._loadingHTML=()=>`
4582
+ */constructor(){super(),this._aggs={},this._ariaHidden=!0,this._attribution=!1,this._attributionStyle={background:"rgba(255, 255, 255, 0.75)",border:"1px solid rgba(0, 0, 0, 0.25)",color:"rgba(0, 0, 0, 0.75)",display:"block",font:"400 11px/11px "+Me(Ee),margin:"5px",opacity:.75,padding:"4px 6px 3px"},this._backClass=(new Cc).on("click",()=>{(this._history.length?this.config(this._history.pop()):this.depth(this._drawDepth-1).filter(!1)).render()}).on("mousemove",()=>this._backClass.select().style("cursor","pointer")),this._backConfig={fontSize:10,padding:5,resize:!1},this._cache=!0,this._color=(t,n)=>this._groupBy[0](t,n),this._colorDefaults={...mu,scale:Ji().range(mu.scale.range())},this._colorScaleClass=new xc,this._colorScaleConfig={axisConfig:{rounding:"inside"},scale:"jenks"},this._colorScalePadding=a0,this._colorScalePosition=()=>this._width>1.5*this._height?"right":"bottom",this._colorScaleMaxSize=600,this._data=[],this._dataCutoff=100,this._detectResize=!0,this._detectResizeDelay=400,this._detectVisible=!0,this._detectVisibleInterval=1e3,this._downloadButton=!1,this._downloadConfig={type:"png"},this._downloadPosition="top",this._duration=600,this._fontFamily=Ee,this._hidden=[],this._hiddenColor=Ot("#aaa"),this._hiddenOpacity=Ot(.5),this._history=[],this._groupBy=[p("id")],this._legend=(t,n)=>{var e=Nt(n,(t,n)=>{t=this._groupBy[this._legendDepth].bind(this)(t,n);return t instanceof Array?t.length:1});return 1<n.length&&e<=2},this._legendClass=new bc,this._legendConfig={label:Ud.bind(this),shapeConfig:{ariaLabel:Ud.bind(this),labelConfig:{fontColor:void 0,fontResize:!1,padding:0}}},this._legendFilterInvert=Ot(!1),this._legendPadding=a0,this._legendPosition=()=>this._width>1.5*this._height?"right":"bottom",this._legendSort=(t,n)=>this._drawLabel(t).localeCompare(this._drawLabel(n)),this._legendTooltip={},this._loadingHTML=()=>`
4581
4583
  <div style="left: 50%; top: 50%; position: absolute; transform: translate(-50%, -50%);">
4582
4584
  <strong>${this._translate("Loading Visualization")}</strong>
4583
4585
  <sub style="bottom: 0; display: block; line-height: 1; margin-top: 5px;"><a href="https://d3plus.org" target="_blank">${this._translate("Powered by D3plus")}</a></sub>
4584
- </div>`,this._loadingMessage=!0,this._lrucache=Gd(10),this._messageClass=new xc,this._messageMask="rgba(0, 0, 0, 0.05)",this._messageStyle={bottom:"0",left:"0",position:"absolute",right:"0","text-align":"center",top:"0"},this._noDataHTML=()=>`
4586
+ </div>`,this._loadingMessage=!0,this._lrucache=Kd(10),this._messageClass=new wc,this._messageMask="rgba(0, 0, 0, 0.05)",this._messageStyle={bottom:"0",left:"0",position:"absolute",right:"0","text-align":"center",top:"0"},this._noDataHTML=()=>`
4585
4587
  <div style="left: 50%; top: 50%; position: absolute; transform: translate(-50%, -50%);">
4586
4588
  <strong>${this._translate("No Data Available")}</strong>
4587
- </div>`,this._noDataMessage=!0,this._on={"click.shape":n0.bind(this),"click.legend":e0.bind(this),mouseenter:function(t,n){if(1!==this._shapeConfig.hoverOpacity){let i=this._id(t,n);i instanceof Array||(i=[i]),this.hover((t,n)=>{let e=this._id(t,n);return e instanceof Array||(e=[e]),i.some(t=>e.includes(t))})}}
4589
+ </div>`,this._noDataMessage=!0,this._on={"click.shape":e0.bind(this),"click.legend":i0.bind(this),mouseenter:function(t,n){if(1!==this._shapeConfig.hoverOpacity){let i=this._id(t,n);i instanceof Array||(i=[i]),this.hover((t,n)=>{let e=this._id(t,n);return e instanceof Array||(e=[e]),i.some(t=>e.includes(t))})}}
4588
4590
  /**
4589
4591
  @module mouseLeave
4590
4592
  @desc On mouseleave event for all shapes in a Viz.
@@ -4607,7 +4609,7 @@ return H("body").on("touchstart."+this._uuid,
4607
4609
  @param {Number} *i* The index of the data object being interacted with.
4608
4610
  @param {Object} [*config*] Optional configuration methods for the Tooltip class.
4609
4611
  @private
4610
- */function(t,e,i,a){if(t&&this._tooltip(t,e)){let n=n0.bind(this).toString();
4612
+ */function(t,e,i,a){if(t&&this._tooltip(t,e)){let n=e0.bind(this).toString();
4611
4613
  // does the shape have any user-defined click events?
4612
4614
  var e=Object.keys(this._on).some(t=>// all valid click event keys,
4613
4615
  ["click","click.shape"].includes(t)&&// truthy values (no nulls),
@@ -4617,7 +4619,7 @@ this._on[t].toString()!==n),r=this._on["click.shape"]&&this._on["click.shape"].t
4617
4619
  this._select.style("cursor",e||r&&o?"pointer":"auto"),a.touches?[a.touches[0].clientX,a.touches[0].clientY]:[a.clientX,a.clientY]);
4618
4620
  // does the shape still have our default "click.shape" event?
4619
4621
  // (if the user only sets "click", both functions will fire)
4620
- this._tooltipClass.data([i||t]).footer(!(!r||!o)&&this._translate("Click to Expand")).title(this._drawLabel).position(e).config(Ft.bind(this)(this._tooltipConfig)).render()}}.bind(this),"mousemove.legend":function(e,i,a,r){var r=r.touches?[r.touches[0].clientX,r.touches[0].clientY]:[r.clientX,r.clientY],o=ii(this._legendClass.data().map((t,n)=>{let e=this._id(t,n);return e=e instanceof Array?e:[e]})).length;if(e&&this._tooltip(e,i)){let t=this._id(e,i);t instanceof Array&&(t=t[0]);i=this._translate;let n=e0.bind(this).toString();
4622
+ this._tooltipClass.data([i||t]).footer(!(!r||!o)&&this._translate("Click to Expand")).title(this._drawLabel).position(e).config(Ft.bind(this)(this._tooltipConfig)).render()}}.bind(this),"mousemove.legend":function(e,i,a,r){var r=r.touches?[r.touches[0].clientX,r.touches[0].clientY]:[r.clientX,r.clientY],o=ii(this._legendClass.data().map((t,n)=>{let e=this._id(t,n);return e=e instanceof Array?e:[e]})).length;if(e&&this._tooltip(e,i)){let t=this._id(e,i);t instanceof Array&&(t=t[0]);i=this._translate;let n=i0.bind(this).toString();
4621
4623
  // does the legend have any user-defined click events?
4622
4624
  var s=Object.keys(this._on).some(t=>// all valid click event keys,
4623
4625
  ["click","click.legend"].includes(t)&&// truthy values (no nulls),
@@ -4627,12 +4629,12 @@ this._on[t].toString()!==n),l=this._on["click.legend"]&&this._on["click.legend"]
4627
4629
  this._select.style("cursor",s||l&&u?"pointer":"auto"),this._legendFilterInvert.bind(this)()),u=this._solo.includes(t),h=this._hidden.includes(t);
4628
4630
  // does the legend still have our default "click.legend" event?
4629
4631
  // (if the user only sets "click", both functions will fire)
4630
- this._tooltipClass.data([a||e]).footer(!!l&&(s?this._solo.length&&!u||h?i("Click to Highlight"):1===this._solo.length&&u||this._hidden.length===o-1?i("Click to Show All"):i("Click to Highlight")+"<br />"+i("Shift+Click to Hide"):this._solo.length&&!u||h?i("Click to Show")+"<br />"+i("Shift+Click to Highlight"):1===this._solo.length&&u||this._hidden.length===o-1?i("Click to Show All"):i("Click to Hide")+"<br />"+i("Shift+Click to Highlight"))).title(this._legendConfig.label?this._legendClass.label():qd.bind(this)).position(r).config(Ft.bind(this)(this._tooltipConfig)).config(Ft.bind(this)(this._legendTooltip)).render()}}.bind(this)},this._queue=[],this._resizeContainer="undefined"==typeof window?"":window,this._scrollContainer="undefined"==typeof window?"":window,this._shape=Ot("Rect"),this._shapes=[],this._shapeConfig={ariaLabel:(t,n)=>this._drawLabel(t,n),fill:(n,e)=>{for(;n.__d3plus__&&n.data;)e=(n=n.data).i;if(this._colorScale){let t=this._colorScale(n,e);var i,a;if(null!=t)return i=this._colorScaleClass._colorScale,a=this._colorScaleClass.color(),i?i.domain().length?i(t):i.range()[i.range().length-1]:a instanceof Array?a[a.length-1]:a}let t=this._color(n,e);return Mn(t)?t:vu("string"==typeof t?t:JSON.stringify(t),this._colorDefaults)},labelConfig:{fontColor:(t,n)=>bu("function"==typeof this._shapeConfig.fill?this._shapeConfig.fill(t,n):this._shapeConfig.fill)},opacity:Ot(1),stroke:(t,n)=>Mn("function"==typeof this._shapeConfig.fill?this._shapeConfig.fill(t,n):this._shapeConfig.fill).darker(.25),role:"presentation",strokeWidth:Ot(0)},this._solo=[],this._subtitleClass=new Sc,this._subtitleConfig={ariaHidden:!0,fontSize:12,padding:5,resize:!1,textAnchor:"middle"},this._subtitlePadding=i0,this._svgDesc="",this._svgTitle="",this._timeline=!0,this._timelineClass=(new ng).align("end"),this._timelineConfig={brushing:!1,padding:5},this._timelinePadding=i0,this._threshold=Ot(1e-4),this._thresholdKey=void 0,this._thresholdName=()=>this._translate("Values"),this._titleClass=new Sc,this._titleConfig={ariaHidden:!0,fontSize:16,padding:5,resize:!1,textAnchor:"middle"},this._titlePadding=i0,this._tooltip=Ot(!0),this._tooltipClass=new dd,this._tooltipConfig={pointerEvents:"none",titleStyle:{"max-width":"200px"}},this._totalClass=new Sc,this._totalConfig={fontSize:10,padding:5,resize:!1,textAnchor:"middle"},this._totalFormat=t=>this._translate("Total")+": "+kh(t,this._locale),this._totalPadding=i0,this._zoom=!1,this._zoomBehavior=Pd(),this._zoomBrush=Qc(Gc),this._zoomBrushHandleSize=1,this._zoomBrushHandleStyle={fill:"#444"},this._zoomBrushSelectionStyle={fill:"#777","stroke-width":0},this._zoomControlStyle={background:"rgba(255, 255, 255, 0.75)",border:"1px solid rgba(0, 0, 0, 0.75)",color:"rgba(0, 0, 0, 0.75)",display:"block",font:"900 15px/21px "+Me(Ee),height:"20px",margin:"5px",opacity:.75,padding:0,"text-align":"center",width:"20px"},this._zoomControlStyleActive={background:"rgba(0, 0, 0, 0.75)",color:"rgba(255, 255, 255, 0.75)",opacity:1},this._zoomControlStyleHover={cursor:"pointer",opacity:1},this._zoomFactor=2,this._zoomMax=16,this._zoomPadding=20,this._zoomPan=!0,this._zoomScroll=!0}}
4632
+ this._tooltipClass.data([a||e]).footer(!!l&&(s?this._solo.length&&!u||h?i("Click to Highlight"):1===this._solo.length&&u||this._hidden.length===o-1?i("Click to Show All"):i("Click to Highlight")+"<br />"+i("Shift+Click to Hide"):this._solo.length&&!u||h?i("Click to Show")+"<br />"+i("Shift+Click to Highlight"):1===this._solo.length&&u||this._hidden.length===o-1?i("Click to Show All"):i("Click to Hide")+"<br />"+i("Shift+Click to Highlight"))).title(this._legendConfig.label?this._legendClass.label():Ud.bind(this)).position(r).config(Ft.bind(this)(this._tooltipConfig)).config(Ft.bind(this)(this._legendTooltip)).render()}}.bind(this)},this._queue=[],this._resizeContainer="undefined"==typeof window?"":window,this._scrollContainer="undefined"==typeof window?"":window,this._shape=Ot("Rect"),this._shapes=[],this._shapeConfig={ariaLabel:(t,n)=>this._drawLabel(t,n),fill:(n,e)=>{for(;n.__d3plus__&&n.data;)e=(n=n.data).i;if(this._colorScale){let t=this._colorScale(n,e);var i,a;if(null!=t)return i=this._colorScaleClass._colorScale,a=this._colorScaleClass.color(),i?i.domain().length?i(t):i.range()[i.range().length-1]:a instanceof Array?a[a.length-1]:a}let t=this._color(n,e);return Mn(t)?t:vu("string"==typeof t?t:JSON.stringify(t),this._colorDefaults)},labelConfig:{fontColor:(t,n)=>bu("function"==typeof this._shapeConfig.fill?this._shapeConfig.fill(t,n):this._shapeConfig.fill)},opacity:Ot(1),stroke:(t,n)=>Mn("function"==typeof this._shapeConfig.fill?this._shapeConfig.fill(t,n):this._shapeConfig.fill).darker(.25),role:"presentation",strokeWidth:Ot(0)},this._solo=[],this._subtitleClass=new Cc,this._subtitleConfig={ariaHidden:!0,fontSize:12,padding:5,resize:!1,textAnchor:"middle"},this._subtitlePadding=a0,this._svgDesc="",this._svgTitle="",this._timeline=!0,this._timelineClass=(new eg).align("end"),this._timelineConfig={brushing:!1,padding:5},this._timelinePadding=a0,this._threshold=Ot(1e-4),this._thresholdKey=void 0,this._thresholdName=()=>this._translate("Values"),this._titleClass=new Cc,this._titleConfig={ariaHidden:!0,fontSize:16,padding:5,resize:!1,textAnchor:"middle"},this._titlePadding=a0,this._tooltip=Ot(!0),this._tooltipClass=new fd,this._tooltipConfig={pointerEvents:"none",titleStyle:{"max-width":"200px"}},this._totalClass=new Cc,this._totalConfig={fontSize:10,padding:5,resize:!1,textAnchor:"middle"},this._totalFormat=t=>this._translate("Total")+": "+kh(t,this._locale),this._totalPadding=a0,this._zoom=!1,this._zoomBehavior=Ld(),this._zoomBrush=tg(Kc),this._zoomBrushHandleSize=1,this._zoomBrushHandleStyle={fill:"#444"},this._zoomBrushSelectionStyle={fill:"#777","stroke-width":0},this._zoomControlStyle={background:"rgba(255, 255, 255, 0.75)",border:"1px solid rgba(0, 0, 0, 0.75)",color:"rgba(0, 0, 0, 0.75)",display:"block",font:"900 15px/21px "+Me(Ee),height:"20px",margin:"5px",opacity:.75,padding:0,"text-align":"center",width:"20px"},this._zoomControlStyleActive={background:"rgba(0, 0, 0, 0.75)",color:"rgba(255, 255, 255, 0.75)",opacity:1},this._zoomControlStyleHover={cursor:"pointer",opacity:1},this._zoomFactor=2,this._zoomMax=16,this._zoomPadding=20,this._zoomPan=!0,this._zoomScroll=!0}}
4631
4633
  /**
4632
4634
  @module discreteBuffer
4633
4635
  @desc Adds left/right padding to a point or time scale.
4634
4636
  @private
4635
- */var o0=(t,n,e)=>{var i;t.padding?t.padding(.5):(n=Array.from(new Set(n.map(t=>+t[e]))).reduce((t,n,e,i)=>e&&(i=i[e-1],!t||n-i<t)?n-i:t,0),i=t.domain().slice(),"y"===e&&i.reverse(),i[0]=new Date(+i[0]-n/2),i[1]=new Date(+i[1]+n/2),"y"===e&&i.reverse(),t.domain(i))};
4637
+ */var s0=(t,n,e)=>{var i;t.padding?t.padding(.5):(n=Array.from(new Set(n.map(t=>+t[e]))).reduce((t,n,e,i)=>e&&(i=i[e-1],!t||n-i<t)?n-i:t,0),i=t.domain().slice(),"y"===e&&i.reverse(),i[0]=new Date(+i[0]-n/2),i[1]=new Date(+i[1]+n/2),"y"===e&&i.reverse(),t.domain(i))};
4636
4638
  /**
4637
4639
  @module barBuffer
4638
4640
  @desc Adds a buffer to either side of the non-discrete axis.
@@ -4642,11 +4644,11 @@ this._tooltipClass.data([a||e]).footer(!!l&&(s?this._solo.length&&!u||h?i("Click
4642
4644
  @param {Object} [config]
4643
4645
  @param {Number} [buffer = 10]
4644
4646
  @private
4645
- */let s0=t=>Math.pow(10,Math.floor(Math.log10(Math.abs(t))))*Math.pow(-1,t<0),l0=t=>Math.pow(10,Math.ceil(Math.log10(Math.abs(t))))*Math.pow(-1,t<0);
4647
+ */let l0=t=>Math.pow(10,Math.floor(Math.log10(Math.abs(t))))*Math.pow(-1,t<0),u0=t=>Math.pow(10,Math.ceil(Math.log10(Math.abs(t))))*Math.pow(-1,t<0);
4646
4648
  /**
4647
4649
  @module numericBuffer
4648
4650
  @private
4649
- */function u0(r,o,s,l,t,n,u,h){if(void 0===s||isNaN(n[0])||isNaN(n[1]))return n;if(h&&(n=n.slice().reverse(),t=t.slice().reverse()),n[0]===n[1])n=n.slice(),"log"===o?(n=[s0(n[0]),l0(n[0])])[1]<n[0]&&n.reverse():(t=Math.abs(parseFloat(n[0].toPrecision(1).replace(/[0-9]{1}$/,"1"))),n[0]-=t,n[1]+=t),r.domain(h?n.slice().reverse():n);else{var e=n[0]===n[1]?10:Math.abs(Math.log(n[1]-n[0])/100),i=()=>{let e=r.copy(),i=!1;if("log"===o){let t=r.domain().slice(),n=r.range().slice();h&&(t=t.reverse(),n=n.reverse()),(i=t[0]*t[1]<0)&&(a=(a=Pa().domain([1e-6,Math.abs(t[u])]).range([0,1])(Math.abs(t[u?0:1])))/(a+1)*(n[1]-n[0]),t=(0===u?[t[0],1e-6]:[1e-6,t[1]]).map(Math.abs),n=0===u?[n[0],n[0]+a]:[n[0]+a,n[1]]),e=Pa().domain(t).range(n)}let t=!1;var a=e.range();let n;return n="log"===o&&i?e(Math.abs(s)):e(s),h?0===u?t=n+l>a[u]:1===u&&(t=n-l<a[u]):0===u?t=n-l<a[u]:1===u&&(t=n+l>a[u]),t};if(r.invert&&i())if("log"===o){let t=0;for(;t<10&&i();){var a=(0===u?-1:1)*(n[u]<0?-1:1);n[u]+=n[u]*e*a,r.domain(h?n.slice().reverse():n),t++}}else 0===u?(t=r.invert(r(s)+(l+10)*(h?1:-1)))<n[u]&&(n[u]=t,r.domain(h?n.slice().reverse():n)):1===u&&(t=r.invert(r(s)+(l+10)*(h?-1:1)))>n[u]&&(n[u]=t,r.domain(h?n.slice().reverse():n))}return h?n.reverse():n}
4651
+ */function h0(r,o,s,l,t,n,u,h){if(void 0===s||isNaN(n[0])||isNaN(n[1]))return n;if(h&&(n=n.slice().reverse(),t=t.slice().reverse()),n[0]===n[1])n=n.slice(),"log"===o?(n=[l0(n[0]),u0(n[0])])[1]<n[0]&&n.reverse():(t=Math.abs(parseFloat(n[0].toPrecision(1).replace(/[0-9]{1}$/,"1"))),n[0]-=t,n[1]+=t),r.domain(h?n.slice().reverse():n);else{var e=n[0]===n[1]?10:Math.abs(Math.log(n[1]-n[0])/100),i=()=>{let e=r.copy(),i=!1;if("log"===o){let t=r.domain().slice(),n=r.range().slice();h&&(t=t.reverse(),n=n.reverse()),(i=t[0]*t[1]<0)&&(a=(a=Pa().domain([1e-6,Math.abs(t[u])]).range([0,1])(Math.abs(t[u?0:1])))/(a+1)*(n[1]-n[0]),t=(0===u?[t[0],1e-6]:[1e-6,t[1]]).map(Math.abs),n=0===u?[n[0],n[0]+a]:[n[0]+a,n[1]]),e=Pa().domain(t).range(n)}let t=!1;var a=e.range();let n;return n="log"===o&&i?e(Math.abs(s)):e(s),h?0===u?t=n+l>a[u]:1===u&&(t=n-l<a[u]):0===u?t=n-l<a[u]:1===u&&(t=n+l>a[u]),t};if(r.invert&&i())if("log"===o){let t=0;for(;t<10&&i();){var a=(0===u?-1:1)*(n[u]<0?-1:1);n[u]+=n[u]*e*a,r.domain(h?n.slice().reverse():n),t++}}else 0===u?(t=r.invert(r(s)+(l+10)*(h?1:-1)))<n[u]&&(n[u]=t,r.domain(h?n.slice().reverse():n)):1===u&&(t=r.invert(r(s)+(l+10)*(h?-1:1)))>n[u]&&(n[u]=t,r.domain(h?n.slice().reverse():n))}return h?n.reverse():n}
4650
4652
  /**
4651
4653
  @module circleBuffer
4652
4654
  @desc Adds a buffer to either side of the non-discrete axis.
@@ -4656,7 +4658,7 @@ this._tooltipClass.data([a||e]).footer(!!l&&(s?this._solo.length&&!u||h?i("Click
4656
4658
  @param {Object} [config]
4657
4659
  @param {Number} [buffer] Defaults to the radius of the largest Circle.
4658
4660
  @private
4659
- */let h0=pn.theme,c0=new nc,g0=new Sc,d0={Bar:function({data:t,x:n,y:e,x2:i,y2:a,buffer:r=10}){let o=i?"x2":"x",s=a?"y2":"y";var l,a=(i="x"===this._discrete?e:n).domain().slice();let u="x"===this._discrete;u&&a.reverse();let h,c,g=(h=this._stacked?(l=Ki().key(t=>t[this._discrete]+"_"+t.group).entries(t).map(t=>t.values.map(t=>t[u?s:o])),c=l.map(t=>ai(t.filter(t=>0<t))),l.map(t=>ai(t.filter(t=>t<0)))):(l=t.map(t=>t[u?s:o]),c=l.filter(t=>0<t),l.filter(t=>t<0)),i(Nt(c))),d=((u?g<i(0):g>i(0))&&(g+=u?-r:r),g=i.invert(g),i(Pt(h)));return(u?d>i(0):d<i(0))&&(d+=u?r:-r),d=i.invert(d),g>a[1]&&(a[1]=g),d<a[0]&&(a[0]=d),u&&a.reverse(),i.domain(a),[n,e]}
4661
+ */let c0=pn.theme,g0=new ec,d0=new Cc,f0={Bar:function({data:t,x:n,y:e,x2:i,y2:a,buffer:r=10}){let o=i?"x2":"x",s=a?"y2":"y";var l,a=(i="x"===this._discrete?e:n).domain().slice();let u="x"===this._discrete;u&&a.reverse();let h,c,g=(h=this._stacked?(l=Ki().key(t=>t[this._discrete]+"_"+t.group).entries(t).map(t=>t.values.map(t=>t[u?s:o])),c=l.map(t=>ai(t.filter(t=>0<t))),l.map(t=>ai(t.filter(t=>t<0)))):(l=t.map(t=>t[u?s:o]),c=l.filter(t=>0<t),l.filter(t=>t<0)),i(Nt(c))),d=((u?g<i(0):g>i(0))&&(g+=u?-r:r),g=i.invert(g),i(Pt(h)));return(u?d>i(0):d<i(0))&&(d+=u?r:-r),d=i.invert(d),g>a[1]&&(a[1]=g),d<a[0]&&(a[0]=d),u&&a.reverse(),i.domain(a),[n,e]}
4660
4662
  /**
4661
4663
  @module boxBuffer
4662
4664
  @desc Adds a buffer to either side of the non-discrete axis.
@@ -4666,7 +4668,7 @@ this._tooltipClass.data([a||e]).footer(!!l&&(s?this._solo.length&&!u||h?i("Click
4666
4668
  @param {Object} [config]
4667
4669
  @param {Number} [buffer = 10]
4668
4670
  @private
4669
- */,Box:function({data:t,x:n,y:e,x2:i,y2:a,buffer:r=10}){let o=i?"x2":"x",s=a?"y2":"y",l=(i="x"===this._discrete?e:n,a=i.domain().slice(),"x"===this._discrete);l&&a.reverse();let u,h;u=this._stacked?(c=Ki().key(t=>t[this._discrete]).entries(t).map(t=>t.values.map(t=>t[l?s:o])),h=c.map(t=>ai(t.filter(t=>0<t))),c.map(t=>ai(t.filter(t=>t<0)))):h=t.map(t=>t[l?s:o]);var c=i(Nt(h)),t=(c+=l?-r:r,c=i.invert(c),i(Pt(u)));return t+=l?r:-r,t=i.invert(t),c>a[1]&&(a[1]=c),t<a[0]&&(a[0]=t),l&&a.reverse(),i.domain(a),[n,e]},Circle:function({data:t,x:e,y:i,x2:n,y2:a,yScale:r,xScale:o,config:s,buffer:l}){e=e.copy(),i=i.copy();let u=n?"x2":"x",h=a?"y2":"y",c=e.domain().slice(),g=i.domain().slice(),d=e.range(),f=i.range();return!e.invert&&e.padding&&o0(e,t,this._discrete),!i.invert&&i.padding&&o0(i,t,this._discrete),(e.invert||i.invert)&&t.forEach(t=>{var n=l||2*s.r(t.data,t.i);e.invert&&(c=u0(e,o,t[u],n,d,c,0,!1),c=u0(e,o,t[u],n,d,c,1,!1)),i.invert&&(g=u0(i,r,t[h],n,f,g,0,!0),g=u0(i,r,t[h],n,f,g,1,!0))}),[e,i]}
4671
+ */,Box:function({data:t,x:n,y:e,x2:i,y2:a,buffer:r=10}){let o=i?"x2":"x",s=a?"y2":"y",l=(i="x"===this._discrete?e:n,a=i.domain().slice(),"x"===this._discrete);l&&a.reverse();let u,h;u=this._stacked?(c=Ki().key(t=>t[this._discrete]).entries(t).map(t=>t.values.map(t=>t[l?s:o])),h=c.map(t=>ai(t.filter(t=>0<t))),c.map(t=>ai(t.filter(t=>t<0)))):h=t.map(t=>t[l?s:o]);var c=i(Nt(h)),t=(c+=l?-r:r,c=i.invert(c),i(Pt(u)));return t+=l?r:-r,t=i.invert(t),c>a[1]&&(a[1]=c),t<a[0]&&(a[0]=t),l&&a.reverse(),i.domain(a),[n,e]},Circle:function({data:t,x:e,y:i,x2:n,y2:a,yScale:r,xScale:o,config:s,buffer:l}){e=e.copy(),i=i.copy();let u=n?"x2":"x",h=a?"y2":"y",c=e.domain().slice(),g=i.domain().slice(),d=e.range(),f=i.range();return!e.invert&&e.padding&&s0(e,t,this._discrete),!i.invert&&i.padding&&s0(i,t,this._discrete),(e.invert||i.invert)&&t.forEach(t=>{var n=l||2*s.r(t.data,t.i);e.invert&&(c=h0(e,o,t[u],n,d,c,0,!1),c=h0(e,o,t[u],n,d,c,1,!1)),i.invert&&(g=h0(i,r,t[h],n,f,g,0,!0),g=h0(i,r,t[h],n,f,g,1,!0))}),[e,i]}
4670
4672
  /**
4671
4673
  @module lineBuffer
4672
4674
  @desc Adds a buffer to either side of the non-discrete axis.
@@ -4686,37 +4688,37 @@ this._tooltipClass.data([a||e]).footer(!!l&&(s?this._solo.length&&!u||h?i("Click
4686
4688
  @param {Object} [config]
4687
4689
  @param {Number} [buffer] Defaults to the width/height of the largest Rect.
4688
4690
  @private
4689
- */,Rect:function({data:t,x:e,y:i,x2:n,y2:a,yScale:r,xScale:o,config:s}){e=e.copy(),i=i.copy();let l=n?"x2":"x",u=a?"y2":"y",h=e.domain().slice(),c=i.domain().slice(),g=e.range(),d=i.range();return!e.invert&&e.padding&&o0(e,t,this._discrete),!i.invert&&i.padding&&o0(i,t,this._discrete),(e.invert||i.invert)&&t.forEach(t=>{var n;e.invert&&(n=s.width(t.data,t.i),h=u0(e,o,t[l],n,g,h,0,!1),h=u0(e,o,t[l],n,g,h,1,!1)),i.invert&&(n=s.height(t.data,t.i),c=u0(i,r,t[u],n,d,c,0,!0),c=u0(i,r,t[u],n,d,c,1,!0))}),[e,i]}};
4691
+ */,Rect:function({data:t,x:e,y:i,x2:n,y2:a,yScale:r,xScale:o,config:s}){e=e.copy(),i=i.copy();let l=n?"x2":"x",u=a?"y2":"y",h=e.domain().slice(),c=i.domain().slice(),g=e.range(),d=i.range();return!e.invert&&e.padding&&s0(e,t,this._discrete),!i.invert&&i.padding&&s0(i,t,this._discrete),(e.invert||i.invert)&&t.forEach(t=>{var n;e.invert&&(n=s.width(t.data,t.i),h=h0(e,o,t[l],n,g,h,0,!1),h=h0(e,o,t[l],n,g,h,1,!1)),i.invert&&(n=s.height(t.data,t.i),c=h0(i,r,t[u],n,d,c,0,!0),c=h0(i,r,t[u],n,d,c,1,!0))}),[e,i]}};
4690
4692
  /**
4691
4693
  @desc Logic for determining default sizes of shapes using the sizeScaleD3 internal function.
4692
4694
  @private
4693
- */function f0(t){return this._sizeScaleD3(this._size?this._size(t):null)}
4695
+ */function p0(t){return this._sizeScaleD3(this._size?this._size(t):null)}
4694
4696
  /**
4695
4697
  @desc Logic for determining stackOrder ascending using groups.
4696
4698
  @private
4697
- */function p0(t){let e=t.map(m0),i=t.map(t=>t.key.split("_")[0]);return ou(t).sort((t,n)=>i[n].localeCompare(i[t])||e[t]-e[n])}
4699
+ */function _0(t){let e=t.map(y0),i=t.map(t=>t.key.split("_")[0]);return ou(t).sort((t,n)=>i[n].localeCompare(i[t])||e[t]-e[n])}
4698
4700
  /**
4699
4701
  @desc Logic for determining stackOrder descending using groups.
4700
4702
  @private
4701
- */function _0(t){return p0(t).reverse()}
4703
+ */function m0(t){return _0(t).reverse()}
4702
4704
  /**
4703
4705
  @desc Logic for determining default sum of shapes using the stackSum function used in d3Shape.
4704
4706
  @private
4705
- */function m0(t){let n=-1,e=0,i;for(var a=t.length;++n<a;)(i=+t[n][1])&&(e+=i);return e}
4707
+ */function y0(t){let n=-1,e=0,i;for(var a=t.length;++n<a;)(i=+t[n][1])&&(e+=i);return e}
4706
4708
  /**
4707
4709
  @desc Logic for determining default sum of shapes using the stackSum function used in d3Shape.
4708
4710
  @private
4709
- */function y0(o,s){var l;if(0<(l=o.length)){let n,e,i,a,r;var u=o[s[0]].length;for(let t=0;t<u;++t)for(r=a=0,i=0;i<l;++i)0<=(e=(n=o[s[i]][t])[1]-n[0])?(n[0]=r,n[1]=r+=e):e<0?(n[1]=a,n[0]=a+=e):n[0]=r}}
4711
+ */function v0(o,s){var l;if(0<(l=o.length)){let n,e,i,a,r;var u=o[s[0]].length;for(let t=0;t<u;++t)for(r=a=0,i=0;i<l;++i)0<=(e=(n=o[s[i]][t])[1]-n[0])?(n[0]=r,n[1]=r+=e):e<0?(n[1]=a,n[0]=a+=e):n[0]=r}}
4710
4712
  /**
4711
4713
  * Determines if a Bar label should be placed outside of the Bar.
4712
4714
  * @param {@} d
4713
4715
  * @param {*} i
4714
4716
  * @private
4715
- */function v0(t,n){
4717
+ */function b0(t,n){
4716
4718
  // Force all Stacked Bars to use "inside" labels.
4717
4719
  var e,i,a;
4718
4720
  // Detect user "outside" or "inside" override.
4719
- return!this._stacked&&("outside"===(a=this._labelPosition(t,n))||"inside"!==a&&(a="x"===this._discrete.charAt(0)?"y":"x",a=this._discrete.replace(this._discrete.charAt(0),a),i=this[`_${a}Axis`]._d3Scale.range(),n=(t=this["_"+a](t,n))<0,e=this[`_${a}Axis`]._getPosition(0),i="y"===a?n?i[1]-e:e-i[0]:n?e-i[0]:i[1]-e,a=this[`_${a}Axis`]._getPosition(t),Math.abs(n?e-a:a-e)<i/2))}class b0 extends r0{
4721
+ return!this._stacked&&("outside"===(a=this._labelPosition(t,n))||"inside"!==a&&(a="x"===this._discrete.charAt(0)?"y":"x",a=this._discrete.replace(this._discrete.charAt(0),a),i=this[`_${a}Axis`]._d3Scale.range(),n=(t=this["_"+a](t,n))<0,e=this[`_${a}Axis`]._getPosition(0),i="y"===a?n?i[1]-e:e-i[0]:n?e-i[0]:i[1]-e,a=this[`_${a}Axis`]._getPosition(t),Math.abs(n?e-a:a-e)<i/2))}class x0 extends o0{
4720
4722
  /**
4721
4723
  Extends the preDraw behavior of the abstract Viz class.
4722
4724
  @private
@@ -4730,20 +4732,20 @@ this._aggs[n]||this._discrete!==t||(this._aggs[n]=(t,n)=>{t=Array.from(new Set(t
4730
4732
  /**
4731
4733
  Extends the draw behavior of the abstract Viz class.
4732
4734
  @private
4733
- */_draw(n){if(!this._filteredData.length&&!this._annotations.length)return this;
4734
- /* Determines whether or not any of the x or y axes are a "time" axis. */var t=!!this._time&&this._time(this._filteredData[0],0);let F=this._x2Time=t&&this._x2(this._filteredData[0],0)===t,O=this._xTime=t&&this._x(this._filteredData[0],0)===t,R=this._y2Time=t&&this._y2(this._filteredData[0],0)===t,j=this._yTime=t&&this._y(this._filteredData[0],0)===t,I=O||F||j||R,H=(t,n)=>`${!I&&this._time?this._time(t,n):"time"}_`+(this._stacked?""+(1<this._groupBy.length?this._ids(t,n).slice(0,-1).join("_"):"group"):""+this._ids(t,n).join("_"));var t=(t,n)=>{t={__d3plus__:!0,data:t,group:H(t,n),i:n,hci:this._confidence&&this._confidence[1]&&this._confidence[1](t,n),id:this._ids(t,n).slice(0,this._drawDepth+1).join("_"),lci:this._confidence&&this._confidence[0]&&this._confidence[0](t,n),shape:this._shape(t,n),x:O?Bt(this._x(t,n)):this._x(t,n),x2:F?Bt(this._x2(t,n)):this._x2(t,n),y:j?Bt(this._y(t,n)):this._y(t,n),y2:R?Bt(this._y2(t,n)):this._y2(t,n)};return t.discrete="Bar"===t.shape?t[this._discrete]+"_"+t.group:""+t[this._discrete],t.id="Bar"===t.shape?t.id+"_"+t[this._discrete]:t.id,t};let o=this._formattedData=this._filteredData.map(t),s=this._axisPersist?this._data.map(t):o;this._size?(t=Re(s,t=>this._size(t.data)),this._sizeScaleD3=ss["scale"+this._sizeScale.charAt(0).toUpperCase()+this._sizeScale.slice(1)]().domain(t).range([t[0]===t[1]?this._sizeMax:Pt([this._sizeMax/2,this._sizeMin]),this._sizeMax])):this._sizeScaleD3=()=>this._sizeMin;var t=s.some(t=>void 0!==t.x2),e=s.some(t=>void 0!==t.y2);let i=this._height-this._margin.top-this._margin.bottom,d=this._discrete?"x"===this._discrete?"y":"x":void 0,G=this._discrete?"x"===this._discrete?"y2":"x2":void 0,K=[d,G].filter(t=>t),a=this._select,r=this._transition,v=this._width-this._margin.left-this._margin.right;
4735
+ */_draw(ot){if(this._filteredData.length||this._annotations.length){
4736
+ /* Determines whether or not any of the x or y axes are a "time" axis. */var st=!!this._time&&this._time(this._filteredData[0],0);let i=this._x2Time=st&&this._x2(this._filteredData[0],0)===st,a=this._xTime=st&&this._x(this._filteredData[0],0)===st,F=this._y2Time=st&&this._y2(this._filteredData[0],0)===st,O=this._yTime=st&&this._y(this._filteredData[0],0)===st,R=a||i||O||F,j=(t,n)=>`${!R&&this._time?this._time(t,n):"time"}_`+(this._stacked?""+(1<this._groupBy.length?this._ids(t,n).slice(0,-1).join("_"):"group"):""+this._ids(t,n).join("_"));var st=(t,n)=>{t={__d3plus__:!0,data:t,group:j(t,n),i:n,hci:this._confidence&&this._confidence[1]&&this._confidence[1](t,n),id:this._ids(t,n).slice(0,this._drawDepth+1).join("_"),lci:this._confidence&&this._confidence[0]&&this._confidence[0](t,n),shape:this._shape(t,n),x:a?Bt(this._x(t,n)):this._x(t,n),x2:i?Bt(this._x2(t,n)):this._x2(t,n),y:O?Bt(this._y(t,n)):this._y(t,n),y2:F?Bt(this._y2(t,n)):this._y2(t,n)};return t.discrete="Bar"===t.shape?t[this._discrete]+"_"+t.group:""+t[this._discrete],t.id="Bar"===t.shape?t.id+"_"+t[this._discrete]:t.id,t};let o=this._formattedData=this._filteredData.map(st),s=this._axisPersist?this._data.map(st):o;this._size?(st=Re(s,t=>this._size(t.data)),this._sizeScaleD3=ss["scale"+this._sizeScale.charAt(0).toUpperCase()+this._sizeScale.slice(1)]().domain(st).range([st[0]===st[1]?this._sizeMax:Pt([this._sizeMax/2,this._sizeMin]),this._sizeMax])):this._sizeScaleD3=()=>this._sizeMin;var st=s.some(t=>void 0!==t.x2),lt=s.some(t=>void 0!==t.y2);let t=this._height-this._margin.top-this._margin.bottom,d=this._discrete?"x"===this._discrete?"y":"x":void 0,I=this._discrete?"x"===this._discrete?"y2":"x2":void 0,H=[d,I].filter(t=>t),n=this._select,e=this._transition,v=this._width-this._margin.left-this._margin.right;
4735
4737
  /**
4736
4738
  * @desc Returns all unique values for a given axis.
4737
4739
  * @param {String} axis
4738
4740
  * @returns {Array}
4739
4741
  * @private
4740
- */function $(e){let i=this[`_${e}Time`];var t=i?o:s,n=t.filter(t=>![NaN,void 0,!1].includes(t[e]));if(!n.length)return[];let a="number"==typeof n[0][e],r=this._discrete===e?Ki().key(t=>t[e]).rollup(t=>1===t.length?t[0].data:Vu(t.map(t=>t.data),this._aggs)).entries(n).sort((t,n)=>this[`_${e}Sort`]?this[`_${e}Sort`](t.value,n.value):(i||a?parseFloat(t.key,10):t.key)-(i||a?parseFloat(n.key,10):n.key)).map(t=>i?Bt(t.key):a?parseFloat(t.key,10):t.key):Yu(n.sort((t,n)=>this[`_${e}Sort`]?this[`_${e}Sort`](t.data,n.data):t[e]-n[e]).map(t=>t[e]),t=>""+t);return r=this._discrete!==e.charAt(0)&&this._confidence&&(this._confidence[0]&&(r=r.concat(t.map(t=>t.lci))),this._confidence[1])?r.concat(t.map(t=>t.hci)):r}var l=$.bind(this)("x"),q=$.bind(this)("x2"),u=$.bind(this)("y"),h=$.bind(this)("y2");let U,f,p,_;if(this._stacked){var c=s.filter(t=>["Area","Bar"].includes(t.shape));let a=Ki().key(t=>t.group).entries(c).reduce((t,n)=>(t[n.key]||(t[n.key]=0),t[n.key]+=ai(n.values,t=>t[d]),t),{}),e=(s.sort((t,n)=>{var e,i;return this[`_${this._discrete}Sort`]?this[`_${this._discrete}Sort`](t.data,n.data):(e=t[this._discrete])-(i=n[this._discrete])!=0?e-i:t.group!==n.group?a[n.group]-a[t.group]:n[d]-t[d]}),U=Array.from(new Set(s.map(t=>t.discrete))),_=Array.from(new Set(s.map(t=>t.id))),(p=Ki().key(t=>t.discrete).entries(s).map(t=>t.values)).forEach(i=>{let a=Array.from(new Set(i.map(t=>t.id)));a.length<_.length&&_.forEach(n=>{var t,e;a.includes(n)||"Area"===(t=s.filter(t=>t.id===n)[0]).shape&&(e=H(t.data,t.i),e={__d3plus__:!0,data:t.data,discrete:"Bar"===t.shape?i[0][this._discrete]+"_"+e:""+i[0][this._discrete],group:e,id:t.id,ids:n,shape:t.shape,[this._discrete]:i[0][this._discrete],[d]:0},o.push(e))})}),this[`_${this._discrete}Sort`]?o.sort((t,n)=>this[`_${this._discrete}Sort`](t.data,n.data)):o.sort((t,n)=>t[this._discrete]-n[this._discrete]),this._stackOrder);e instanceof Array?_.sort((t,n)=>e.indexOf(t)-e.indexOf(n)):e===ou&&_.sort((t,n)=>t.localeCompare(n)),p=uu().keys(_).offset(this._stackOffset).order(e instanceof Array?ou:e).value((t,n)=>{t=t.filter(t=>t.id===n);return t.length?t[0][d]:0})(p);c="x"===this._discrete?l:u;f={[this._discrete]:this[`_${this._discrete}Time`]?Re(c):c,[d]:[Pt(p.map(t=>Pt(t.map(t=>t[0])))),Nt(p.map(t=>Nt(t.map(t=>t[1]))))]}}else{let e=this._discrete||"x";this[`_${this._discrete}Sort`]?s.sort((t,n)=>this[`_${this._discrete}Sort`](t.data,n.data)):s.sort((t,n)=>t[e]-n[e]),f={x:!O&&"x"===this._discrete||this._xSort?l:Re(l),x2:!F&&"x"===this._discrete||this._x2Sort?q:Re(q),y:!j&&"y"===this._discrete||this._ySort?u:Re(u),y2:!R&&"y"===this._discrete||this._y2Sort?h:Re(h)}}
4742
+ */var ut=Et.bind(this)("x"),ht=Et.bind(this)("x2"),ct=Et.bind(this)("y"),gt=Et.bind(this)("y2");let G,f,p,_;if(this._stacked){var dt=s.filter(t=>["Area","Bar"].includes(t.shape));let a=Ki().key(t=>t.group).entries(dt).reduce((t,n)=>(t[n.key]||(t[n.key]=0),t[n.key]+=ai(n.values,t=>t[d]),t),{}),e=(s.sort((t,n)=>{var e,i;return this[`_${this._discrete}Sort`]?this[`_${this._discrete}Sort`](t.data,n.data):(e=t[this._discrete])-(i=n[this._discrete])!=0?e-i:t.group!==n.group?a[n.group]-a[t.group]:n[d]-t[d]}),G=Array.from(new Set(s.map(t=>t.discrete))),_=Array.from(new Set(s.map(t=>t.id))),(p=Ki().key(t=>t.discrete).entries(s).map(t=>t.values)).forEach(i=>{let a=Array.from(new Set(i.map(t=>t.id)));a.length<_.length&&_.forEach(n=>{var t,e;a.includes(n)||"Area"===(t=s.filter(t=>t.id===n)[0]).shape&&(e=j(t.data,t.i),e={__d3plus__:!0,data:t.data,discrete:"Bar"===t.shape?i[0][this._discrete]+"_"+e:""+i[0][this._discrete],group:e,id:t.id,ids:n,shape:t.shape,[this._discrete]:i[0][this._discrete],[d]:0},o.push(e))})}),this[`_${this._discrete}Sort`]?o.sort((t,n)=>this[`_${this._discrete}Sort`](t.data,n.data)):o.sort((t,n)=>t[this._discrete]-n[this._discrete]),this._stackOrder);e instanceof Array?_.sort((t,n)=>e.indexOf(t)-e.indexOf(n)):e===ou&&_.sort((t,n)=>t.localeCompare(n)),p=uu().keys(_).offset(this._stackOffset).order(e instanceof Array?ou:e).value((t,n)=>{t=t.filter(t=>t.id===n);return t.length?t[0][d]:0})(p);dt="x"===this._discrete?ut:ct;f={[this._discrete]:this[`_${this._discrete}Time`]?Re(dt):dt,[d]:[Pt(p.map(t=>Pt(t.map(t=>t[0])))),Nt(p.map(t=>Nt(t.map(t=>t[1]))))]}}else{let e=this._discrete||"x";this[`_${this._discrete}Sort`]?s.sort((t,n)=>this[`_${this._discrete}Sort`](t.data,n.data)):s.sort((t,n)=>t[e]-n[e]),f={x:!a&&"x"===this._discrete||this._xSort?ut:Re(ut),x2:!i&&"x"===this._discrete||this._x2Sort?ht:Re(ht),y:!O&&"y"===this._discrete||this._ySort?ct:Re(ct),y2:!F&&"y"===this._discrete||this._y2Sort?gt:Re(gt)}}
4741
4743
  /**
4742
4744
  * Determins default scale type and domain for a given axis.
4743
4745
  * @param {String} axis
4744
4746
  * @private
4745
- */function W(t){var n=this[`_${t}Time`]?"Time":this._discrete===t||this[`_${t}Sort`]?"Point":"Linear",e=this[`_${t}Domain`]?this[`_${t}Domain`].slice():f[t],i=this[`_${t}2Domain`]?this[`_${t}2Domain`].slice():f[t+"2"];return"Point"!=n&&(e&&void 0===e[0]&&(e[0]=f[t][0]),e&&void 0===e[1]&&(e[1]=f[t][1]),i&&void 0===i[0]&&(i[0]=f[t+"2"][0]),i)&&void 0===i[1]&&(i[1]=f[t+"2"][1]),[e,n,i,n]}let[Y,V,Z,X]=W.bind(this)("x"),[J,Q,tt,nt]=W.bind(this)("y");c=(n,t)=>{var e,i=this[`_${n}Config`].scale;return"auto"===i?this._discrete===n?t:3<Oe(e=s.map(t=>t[n]))/ei(e)?"log":"linear":i||t};let b=this._yConfigScale=c("y",Q).toLowerCase(),et=this._y2ConfigScale=c("y2",nt).toLowerCase(),x=this._xConfigScale=c("x",V).toLowerCase(),it=this._x2ConfigScale=c("x2",X).toLowerCase(),m=(f={x:Y,x2:Z||Y,y:J,y2:tt||J},Object.keys(f).forEach(n=>{"log"===this[`_${n}ConfigScale`]&&f[n].includes(0)&&(Pt(f[n])<0?f[n][1]=Nt(o.map(t=>t[n]).filter(t=>![NaN,void 0,!1].includes(t))):f[n][0]=Pt(s.map(t=>t[n]).filter(t=>![NaN,void 0,!1].includes(t))))}),K.forEach(t=>{var n;this[`_${t}Config`].domain?(n=this[`_${t}Config`].domain,"x"===this._discrete&&n.reverse(),f[t]=n):t&&void 0!==this._baseline&&(n=this._baseline,f[t]&&f[t][0]>n?f[t][0]=n:f[t]&&f[t][1]<n&&(f[t][1]=n))}),ss["scale"+V]().domain(f.x).range(Lt(0,1+v,v/(f.x.length-1)))),at=ss["scale"+X]().domain(f.x2).range(Lt(0,1+v,v/(f.x2.length-1))),y=ss["scale"+Q]().domain(f.y.reverse()).range(Lt(0,1+i,i/(f.y.length-1))),rt=ss["scale"+nt]().domain(f.y2.reverse()).range(Lt(0,1+i,i/(f.y2.length-1)));c=Ki().key(t=>t.shape).entries(o).sort((t,n)=>this._shapeSort(t.key,n.key));"Point"!==("x"===this._discrete?Q:V)&&Ki().key(t=>t.shape).entries(s).forEach(t=>{var n;["Bar","Box"].includes(t.key)&&o0("x"===this._discrete?m:y,o,this._discrete),this._buffer[t.key]&&(n=this._buffer[t.key].bind(this)({data:t.values,x:m,y:y,yScale:b,xScale:x,config:this._shapeConfig[t.key]}),m=n[0],y=n[1],n=this._buffer[t.key].bind(this)({data:t.values,x:at,y:rt,yScale:et,xScale:it,x2:!0,y2:!0,config:this._shapeConfig[t.key]}),at=n[0],rt=n[1])});let ot=m.domain(),st=at.domain(),w=y.domain(),lt=rt.domain();var g={barConfig:{"stroke-width":0},gridSize:0,labels:[],title:!1,tickSize:0},q=t?{data:q}:g,h=e?{data:h}:g,g="x"===this._discrete&&this._width>this._discreteCutoff||this._width>this._xCutoff,S="y"===this._discrete&&this._height>this._discreteCutoff||this._height>this._yCutoff,u={data:u,locale:this._locale,rounding:this._yDomain?"none":"outside",scalePadding:y.padding?y.padding():0},C=(g||(u.barConfig={stroke:"transparent"},u.tickSize=0,u.shapeConfig={labelBounds:(t,n)=>{var{width:t,y:e}=t.labelBounds,i=this._height/2;return{x:n?-i:0,y:e,width:t,height:i}},labelConfig:{padding:0,rotate:0},labelRotation:!1}),Dt("g.d3plus-plot-test",{enter:{opacity:0},parent:this._select})),k=Ft.bind(this)(this._shapeConfig,"shape","Bar");let ut=void 0!==k.label?"function"==typeof k.label?k.label:Ot(k.label):this._drawLabel,ht=s.map(t=>ut(t.data,t.i)).filter(t=>"number"==typeof t||t).map(String),ct=Yu(s.map(t=>t.x2)),gt=(ct="Point"===X&&ct.every(t=>ht.includes(""+t))?[]:null,Yu(s.map(t=>t.x))),dt=(gt="Point"===V&&gt.every(t=>ht.includes(""+t))?[]:null,Yu(s.map(t=>t.y2))),ft=(dt="Point"===nt&&dt.every(t=>ht.includes(""+t))?[]:null,Yu(s.map(t=>t.y)));ft="Point"===Q&&ft.every(t=>ht.includes(""+t))?[]:null,S&&this._yTest.domain(w).height(i).maxSize(v/2).range([void 0,void 0]).select(C.node()).ticks(ft).width(v).config(u).config(this._yConfig).scale(b).render();var k=this._yTest.outerBounds(),pt=k.width?k.width+this._yTest.padding():void 0,A=(e&&this._y2Test.domain(lt).height(i).range([void 0,void 0]).select(C.node()).ticks(dt).width(v).config(u).config(h).config(this._y2Config).scale(et).render(),this._y2Test.outerBounds()),_t=A.width?A.width+this._y2Test.padding():void 0,l={data:l,locale:this._locale,rounding:this._xDomain?"none":"outside",scalePadding:m.padding?m.padding():0};S||(l.barConfig={stroke:"transparent"},l.tickSize=0,l.shapeConfig={labelBounds:(t,n)=>{var{height:t,y:e}=t.labelBounds,i=this._width/2;return{x:n?-i:0,y:e,width:i,height:t}},labelConfig:{padding:0,rotate:0,textAnchor:t=>t.id===gt[0]?"start":"end"},labelRotation:!1});let mt=void 0;g&&this._xTest.domain(ot).height(i).maxSize(i/2).range([void 0,mt]).select(C.node()).ticks(gt).width(v).config(l).config(this._xConfig).scale(x).render();let yt,M=[],vt=this._lineLabels&&!e;if(vt){var E=o.filter(t=>"Line"===t.shape&&("function"!=typeof this._lineLabels||this._lineLabels(t.data,t.i))),E=Ki().key(t=>t.id).entries(E);if(E.length){var z=Ft.bind(this)(this._shapeConfig,"shape","Line"),T=(c0.config(z),c0.labelConfig());let c=void 0!==T.fontColor?T.fontColor:g0.fontColor(),g=void 0!==T.fontSize?T.fontSize:g0.fontSize(),d=void 0!==T.fontWeight?T.fontWeight:g0.fontWeight(),f=void 0!==T.fontFamily?T.fontFamily:g0.fontFamily(),p=void 0!==T.padding?T.padding:g0.padding(),_=z.label||this._drawLabel,m=t=>("log"===x&&0===t&&(t=ot[0]<0?this._xTest._d3Scale.domain()[1]:this._xTest._d3Scale.domain()[0]),this._xTest._getPosition.bind(this._xTest)(t)),y=t=>("log"===b&&0===t&&(t=w[0]<0?this._yTest._d3Scale.domain()[1]:this._yTest._d3Scale.domain()[0]),this._yTest._getPosition.bind(this._yTest)(t)),n=(M=E.map(t=>{let n=t.values[t.values.length-1],e;for(;n.__d3plus__&&n.data;)n=n.data,e=n.i;var i="function"==typeof _?_(n,e):_,a="function"==typeof c?c(n,e):c,r="function"==typeof g?g(n,e):g,o="function"==typeof d?d(n,e):d;let s="function"==typeof f?f(n,e):f;s instanceof Array&&(s=s.map(t=>`'${t}'`).join(", "));var l="function"==typeof p?p(n,e):p,i=Ae(i,{"font-size":r,"font-family":s,"font-weight":o}),o=t.values.map(t=>[m(t.x),y(t.y)]);let u=Nt(t.values.map(t=>m(t.x)));var h=t.values.find(t=>m(t.x)===u).y;return{id:t.key,labelWidth:i+2*l,spaceNeeded:i+4*l,value:h,yEstimate:y(h),padding:l,fontSize:r,fontColor:a,maxX:u,xValue:Nt(t.values,t=>t.x),coords:o}}).sort((t,n)=>w[1]>w[0]?t.value-n.value:n.value-t.value).filter((t,n,e)=>{let{fontSize:i,id:a,labelWidth:r,maxX:o,yEstimate:s}=t;return 0===e.filter(n=>n.id!==a&&n.coords.some(t=>(t[0]>o||t[0]===o&&n.maxX!==o)&&t[0]<=o+r&&t[1]<=s+.75*i&&t[1]>=s-.75*i)).length}),Nt(M,t=>t.maxX));yt=Nt(M.map(t=>t.labelWidth));T=n===this._xTest._getRange.bind(this._xTest)()[1]?Nt(M.filter(t=>t.maxX===n),t=>t.spaceNeeded):0;T&&(z=Pt([T,v/4]),mt=v-z-this._margin.right)}}g&&mt&&this._xTest.domain(ot).height(i).maxSize(i/2).range([void 0,mt]).select(C.node()).ticks(gt).width(v).config(l).config(this._xConfig).scale(x).render(),t&&this._x2Test.domain(st).height(i).range([void 0,mt]).select(C.node()).ticks(ct).width(v).config(l).tickSize(0).config(q).config(this._x2Config).scale(it).render();E=this._xTest._getRange(),T=this._x2Test._getRange(),z=this._x2Test.outerBounds();let B=t?z.height+this._x2Test.padding():0;var z=Nt([pt,E[0],T[0]]),D=(g&&this._xTest.range([z,void 0]).render(),S?this._yTest.shapeConfig().labelConfig.fontSize()/2:0),bt=Nt([_t,v-E[1],v-T[1]]),xt=this._xTest.outerBounds().height+(S?this._xTest.padding():0),n=(this._padding.left+=z,this._padding.right+=bt,this._padding.bottom+=xt,this._padding.top+=B+D,super._draw(n),this._margin.left+this._margin.right),wt=this._margin.top+this._margin.bottom;let N=[B,i-(xt+D+wt)],P=(S&&this._yTest.domain(w).height(i).maxSize(v/2).range(N).select(C.node()).ticks(ft).width(v).config(u).config(this._yConfig).scale(b).render(),z=Nt([pt=(k=this._yTest.outerBounds()).width?k.width+this._yTest.padding():void 0,E[0],T[0]]),e&&this._y2Test.config(u).domain(lt).gridSize(0).height(i).range(N).select(C.node()).width(v-Nt([0,bt-_t])).title(!1).config(this._y2Config).config(h).scale(et).render(),bt=Nt([0,_t=(A=this._y2Test.outerBounds()).width?A.width+this._y2Test.padding():void 0,v-E[1],v-T[1]]),[z,v-(bt+n)]);k=Dt("g.d3plus-plot-background",{parent:a,transition:r}),C=`translate(${this._margin.left}, ${this._margin.top+B+D})`,A=`translate(${this._margin.left}, ${this._margin.top+D})`,E=g&&Dt("g.d3plus-plot-x-axis",{parent:a,transition:r,enter:{transform:C},update:{transform:C}}),T=t&&Dt("g.d3plus-plot-x2-axis",{parent:a,transition:r,enter:{transform:A},update:{transform:A}}),n=`translate(${this._margin.left+(pt<z?z-pt:0)}, ${this._margin.top+D})`,A=S&&Dt("g.d3plus-plot-y-axis",{parent:a,transition:r,enter:{transform:n},update:{transform:n}}),z=`translate(-${this._margin.right}, ${this._margin.top+D})`,pt=e&&Dt("g.d3plus-plot-y2-axis",{parent:a,transition:r,enter:{transform:z},update:{transform:z}});this._xAxis.domain(ot).height(i-(B+D+wt)).maxSize(i/2).range(P).select(g?E.node():void 0).ticks(gt).width(v).config(l).config(this._xConfig).scale(x).render(),t&&this._x2Axis.domain(st).height(i-(xt+D+wt)).range(P).select(T.node()).ticks(ct).width(v).config(l).config(q).config(this._x2Config).scale(it).render(),this._xFunc=m=(t,n)=>("x2"===n?("log"===it&&0===t&&(t=st[0]<0?this._x2Axis._d3Scale.domain()[1]:this._x2Axis._d3Scale.domain()[0]),this._x2Axis._getPosition.bind(this._x2Axis)):("log"===x&&0===t&&(t=ot[0]<0?this._xAxis._d3Scale.domain()[1]:this._xAxis._d3Scale.domain()[0]),this._xAxis._getPosition.bind(this._xAxis)))(t),N=[this._xAxis.outerBounds().y+B,i-(xt+D+wt)],this._yAxis.domain(w).height(i).maxSize(v/2).range(N).select(S?A.node():void 0).ticks(ft).width(P[P.length-1]).config(u).config(this._yConfig).scale(b).render(),e&&this._y2Axis.config(u).domain(e?lt:w).gridSize(0).height(i).range(N).select(pt.node()).width(v-Nt([0,bt-_t])).title(!1).config(this._y2Config).config(h).scale(et).render();let St={};M&&(Ki().key(t=>t.xValue).entries(M).forEach(({values:t})=>{var n=Nt(t.map(t=>t.fontSize));let u=Lt(N[0],N[1],n).reverse(),h=(N[1]-N[0])/8;t.forEach(
4746
- /** */function t(e,i,a){if(e.defaultY||(e.defaultY=this._yAxis._getPosition(e.value)),i){var r=a[i-1],{fontSize:o,padding:s}=e,l=e.newY||e.defaultY;let n=r.newY||r.defaultY;l-o/2-s<n&&(l=u.find(t=>t<n),e.defaultY-l<h)&&(r.newY=l,i)&&t(r,i-1,a)}}.bind(this))}),St=M.reduce((t,n)=>(n.newY&&(t[n.id]=n.newY),t),{})),this._yFunc=y=(t,n)=>"y2"===n?("log"===et&&0===t&&(t=lt[1]<0?this._y2Axis._d3ScaleNegative.domain()[0]:this._y2Axis._d3Scale.domain()[1]),this._y2Axis._getPosition.bind(this._y2Axis)(t)-B):("log"===b&&0===t&&(t=w[1]<0?this._yAxis._d3ScaleNegative.domain()[0]:this._yAxis._d3Scale.domain()[1]),this._yAxis._getPosition.bind(this._yAxis)(t)-B),(new tc).data([{}]).select(k.node()).x(P[0]+(P[1]-P[0])/2).width(P[1]-P[0]).y(this._margin.top+D+N[0]+(N[1]-N[0])/2).height(N[1]-N[0]).config(this._backgroundConfig).render();n=M.filter(t=>void 0!==t.newY);if(n.length){z=Dt("g.d3plus-plot-connectors",{parent:a,transition:r,enter:{transform:C},update:{transform:C}}).node();let t=n.map(t=>Tt({x:this._xAxis._getPosition.bind(this._xAxis)(t.xValue),y:t.defaultY},t)).concat(n.map(t=>Tt({x:this._xAxis._getPosition.bind(this._xAxis)(t.xValue)+t.padding-1,y:t.newY||t.defaultY},t)));(new nc).config({data:t,stroke:t=>t.fontColor,x:t=>t.x,y:t=>t.y}).config(this._labelConnectorConfig).select(z).render()}let Ct=Dt("g.d3plus-plot-annotations",{parent:a,transition:r,enter:{transform:C},update:{transform:C}}).node();g=Dt("g.d3plus-plot-shapes",{parent:a,transition:r,enter:{transform:C},update:{transform:C}}).node();let kt=Dt("g.d3plus-plot-annotations-front",{parent:a,transition:r,enter:{transform:C},update:{transform:C}}).node(),At=(Object.keys(this._previousAnnotations).forEach(n=>{let e="front"===n?kt:Ct;var t=this._annotations.filter(t=>"back"===n&&!t.layer||t.layer===n);let i=t.map(t=>t.shape);t.forEach(t=>{(new sc[t.shape]).duration(this._duration).config(t).config({x:t=>t.x2?m(t.x2,"x2"):m(t.x),x0:"x"===this._discrete?t=>t.x2?m(t.x2,"x2"):m(t.x):m(f.x[0]),x1:"x"===this._discrete?null:t=>t.x2?m(t.x2,"x2"):m(t.x),y:t=>t.y2?y(t.y2,"y2"):y(t.y),y0:"y"===this._discrete?t=>t.y2?y(t.y2,"y2"):y(t.y):y(f.y[1])-At,y1:"y"===this._discrete?null:t=>t.y2?y(t.y2,"y2"):y(t.y)-At}).select(e).render()}),this._previousAnnotations[n].filter(t=>!i.includes(t)).forEach(t=>{(new sc[t]).data([]).select(e).render()}),this._previousAnnotations[n]=i}),this._xAxis.barConfig()["stroke-width"]),Mt=(At&&(At/=2),this._discrete||"x"),L={discrete:this._discrete,duration:this._duration,label:t=>this._drawLabel(t.data,t.i),select:g,x:t=>void 0!==t.x2?m(t.x2,"x2"):m(t.x),x0:"x"===Mt?t=>t.x2?m(t.x2,"x2"):m(t.x):m("number"==typeof this._baseline?this._baseline:f.x[0]),x1:"x"===Mt?null:t=>t.x2?m(t.x2,"x2"):m(t.x),y:t=>void 0!==t.y2?y(t.y2,"y2"):y(t.y),y0:"y"===Mt?t=>t.y2?y(t.y2,"y2"):y(t.y):y("number"==typeof this._baseline?this._baseline:f.y[1])-At,y1:"y"===Mt?null:t=>t.y2?y(t.y2,"y2"):y(t.y)-At},Et=Object.keys(this._on),zt=(c.forEach(r=>{var o=Object.assign({},L);if(this._stacked&&["Area","Bar"].includes(r.key)){let i="x"===d?m:y;o[""+d]=o[d+"0"]=t=>{var n=_.indexOf(t.id),e=U.indexOf(t.discrete),t=t[d]<0?1:0;return 0<=n?i(p[n][e][t]):i(f[d]["x"===d?0:1])},o[d+"1"]=t=>{var n=_.indexOf(t.id),e=U.indexOf(t.discrete),t=t[d]<0?0:1;return 0<=n?i(p[n][e][t]):i(f[d]["x"===d?0:1])}}var s=(new sc[r.key]).config(o).data(r.values);if("Bar"===r.key){let t,n="x"===this._discrete?m:y;var o="x"===this._discrete?V:Q,l="x"===this._discrete?ot:w,u="x"===this._discrete?P:N;t="Point"!==o&&2===l.length?((o=Array.from(new Set(r.values.map(t=>n(t[this._discrete]))))).unshift(u[0]-o[0]-u[0]),o.push(u[1]+u[1]-o[o.length-1]),o.reduce((t,n,e,i)=>t=e&&(n=Math.abs(n-i[e-1]))<t?n:t,1/0)):1<l.length?n(l[1])-n(l[0]):u[u.length-1]-u[0],this._groupPadding<t&&(t-=this._groupPadding);let i=t||1;o=Ki().key(t=>t[this._discrete]).key(t=>t.group).entries(r.values),l=ii(o.map(t=>t.values.map(t=>t.key)));let a=Array.from(new Set(l));if(1===Nt(o.map(t=>t.values.length)))s[this._discrete]((t,n)=>L[this._discrete](t,n));else{i=(i-this._barPadding*a.length-1)/a.length;u=t/2-i/2;let e=ka().domain([0,a.length-1]).range([-u,u]);s[this._discrete]((t,n)=>L[this._discrete](t,n)+e(a.indexOf(t.group)))}s.width(i),s.height(i)}else if("Line"===r.key){if(s.duration(1.5*v),this._confidence){l=Object.assign({},L),o=this._discrete||"x";let n="x"===o?"y":"x",e="x"===o?y:m;l[n+"0"]=t=>e(this._confidence[0]?t.lci:t[n]),l[n+"1"]=t=>e(this._confidence[1]?t.hci:t[n]);u=(new Xh).config(l).data(r.values),o=Object.assign(this._shapeConfig,this._confidenceConfig);u.config(Tt(Ft.bind(this)(o,"shape","Line"),Ft.bind(this)(o,"shape","Area"))).render(),this._shapes.push(u)}s.config({discrete:L.discrete||"x",label:!!vt&&((e,t)=>{if("function"!=typeof this._lineLabels||this._lineLabels(e.data,e.i)){var i=M.find(t=>t.id===e.id);if(i){let n=i.newY||i.defaultY;i=M.filter(t=>t.newY===n);return 1<i.length?i[0].id===e.id&&`+${kh(i.length,this._locale)} `+this._translate("more"):this._drawLabel(e,t)}}return!1}),labelBounds:!!vt&&((t,n,e)=>{var[i,a]=e.points[0],[e,r]=e.points[e.points.length-1],o=this._height/4;return{x:e-i,y:r-a-o/2-(St[t.id]?r-St[t.id]:0),width:yt,height:o}})})}let h=Et.filter(t=>t.includes("."+r.key)),c=Et.filter(t=>!t.includes(".")),g=Et.filter(t=>t.includes(".shape"));for(let a=0;a<c.length;a++)s.on(c[a],(t,n,e,i)=>this._on[c[a]](t.data,t.i,e,i));for(let a=0;a<g.length;a++)s.on(g[a],(t,n,e,i)=>this._on[g[a]](t.data,t.i,e,i));for(let a=0;a<h.length;a++)s.on(h[a],(t,n,e,i)=>this._on[h[a]](t.data,t.i,e,i));l=Ft.bind(this)(this._shapeConfig,"shape",r.key);if(void 0===this._shapeConfig.duration&&delete l.duration,s.config(l).render(),this._shapes.push(s),"Line"===r.key){var t=(new Qh).data(this._lineMarkers?r.values:[]).config(L).config(this._lineMarkerConfig).id(t=>t.id+"_"+t.discrete);for(let a=0;a<c.length;a++)t.on(c[a],(t,n,e,i)=>this._on[c[a]](t.data,t.i,e,i));for(let a=0;a<g.length;a++)t.on(g[a],(t,n,e,i)=>this._on[g[a]](t.data,t.i,e,i));for(let a=0;a<h.length;a++)t.on(h[a],(t,n,e,i)=>this._on[h[a]](t.data,t.i,e,i));t.render(),this._shapes.push(t)}}),c.map(t=>t.key));return zt.includes("Line")&&(this._confidence&&zt.push("Area"),this._lineMarkers)&&zt.push("Circle"),this._previousShapes.filter(t=>!zt.includes(t)).forEach(t=>{(new sc[t]).config(L).data([]).render()}),this._previousShapes=zt,this}
4747
+ */let[K,m,$,q]=zt.bind(this)("x"),[U,y,W,Y]=zt.bind(this)("y");dt=(n,t)=>{var e,i=this[`_${n}Config`].scale;return"auto"===i?this._discrete===n?t:3<Oe(e=s.map(t=>t[n]))/ei(e)?"log":"linear":i||t};let r=this._yConfigScale=dt("y",y).toLowerCase(),l=this._y2ConfigScale=dt("y2",Y).toLowerCase(),u=this._xConfigScale=dt("x",m).toLowerCase(),h=this._x2ConfigScale=dt("x2",q).toLowerCase(),b=(f={x:K,x2:$||K,y:U,y2:W||U},Object.keys(f).forEach(n=>{"log"===this[`_${n}ConfigScale`]&&f[n].includes(0)&&(Pt(f[n])<0?f[n][1]=Nt(o.map(t=>t[n]).filter(t=>![NaN,void 0,!1].includes(t))):f[n][0]=Pt(s.map(t=>t[n]).filter(t=>![NaN,void 0,!1].includes(t))))}),H.forEach(t=>{var n;this[`_${t}Config`].domain?(n=this[`_${t}Config`].domain,"x"===this._discrete&&n.reverse(),f[t]=n):t&&void 0!==this._baseline&&(n=this._baseline,f[t]&&f[t][0]>n?f[t][0]=n:f[t]&&f[t][1]<n&&(f[t][1]=n))}),ss["scale"+m]().domain(f.x).range(Lt(0,1+v,v/(f.x.length-1)))),V=ss["scale"+q]().domain(f.x2).range(Lt(0,1+v,v/(f.x2.length-1))),x=ss["scale"+y]().domain(f.y.reverse()).range(Lt(0,1+t,t/(f.y.length-1))),Z=ss["scale"+Y]().domain(f.y2.reverse()).range(Lt(0,1+t,t/(f.y2.length-1)));dt=Ki().key(t=>t.shape).entries(o).sort((t,n)=>this._shapeSort(t.key,n.key));"Point"!==("x"===this._discrete?y:m)&&Ki().key(t=>t.shape).entries(s).forEach(t=>{var n;["Bar","Box"].includes(t.key)&&s0("x"===this._discrete?b:x,o,this._discrete),this._buffer[t.key]&&(n=this._buffer[t.key].bind(this)({data:t.values,x:b,y:x,yScale:r,xScale:u,config:this._shapeConfig[t.key]}),b=n[0],x=n[1],n=this._buffer[t.key].bind(this)({data:t.values,x:V,y:Z,yScale:l,xScale:h,x2:!0,y2:!0,config:this._shapeConfig[t.key]}),V=n[0],Z=n[1])});let w=b.domain(),X=V.domain(),S=x.domain(),c=Z.domain();var ft={barConfig:{"stroke-width":0},gridSize:0,labels:[],title:!1,tickSize:0},ht=st?{data:ht}:ft,gt=lt?{data:gt}:ft,ft=("x"!==this._discrete||this._width>this._discreteCutoff)&&this._width>this._xCutoff,pt=("y"!==this._discrete||this._height>this._discreteCutoff)&&this._height>this._yCutoff,ct={data:ct,locale:this._locale,rounding:this._yDomain?"none":"outside",scalePadding:x.padding?x.padding():0},_t=(!ft&&pt&&(ct.barConfig={stroke:"transparent"},ct.tickSize=0,ct.shapeConfig={labelBounds:(t,n)=>{var{width:t,y:e}=t.labelBounds,i=this._height/2;return{x:n?-i:0,y:e,width:t,height:i}},labelConfig:{padding:0,rotate:0},labelRotation:!1}),Dt("g.d3plus-plot-test",{enter:{opacity:0},parent:this._select})),mt=Ft.bind(this)(this._shapeConfig,"shape","Bar");let J=void 0!==mt.label?"function"==typeof mt.label?mt.label:Ot(mt.label):this._drawLabel,g=s.map(t=>J(t.data,t.i)).filter(t=>"number"==typeof t||t).map(String),C=Yu(s.map(t=>t.x2)),k=(C="Point"===q&&C.every(t=>g.includes(""+t))?[]:null,Yu(s.map(t=>t.x))),Q=(k="Point"===m&&k.every(t=>g.includes(""+t))?[]:null,Yu(s.map(t=>t.y2))),A=(Q="Point"===Y&&Q.every(t=>g.includes(""+t))?[]:null,Yu(s.map(t=>t.y)));A="Point"===y&&A.every(t=>g.includes(""+t))?[]:null,pt&&this._yTest.domain(S).height(t).maxSize(v/2).range([void 0,void 0]).select(_t.node()).ticks(A).width(v).config(ct).config(this._yConfig).scale(r).render();var mt=this._yTest.outerBounds(),yt=mt.width?mt.width+this._yTest.padding():void 0,vt=(lt&&this._y2Test.domain(c).height(t).range([void 0,void 0]).select(_t.node()).ticks(Q).width(v).config(ct).config(gt).config(this._y2Config).scale(l).render(),this._y2Test.outerBounds()),bt=vt.width?vt.width+this._y2Test.padding():void 0,ut={data:ut,locale:this._locale,rounding:this._xDomain?"none":"outside",scalePadding:b.padding?b.padding():0};!pt&&ft&&(ut.barConfig={stroke:"transparent"},ut.tickSize=0,ut.shapeConfig={labelBounds:(t,n)=>{var{height:t,y:e}=t.labelBounds,i=this._width/2;return{x:n?-i:0,y:e,width:i,height:t}},labelConfig:{padding:0,rotate:0,textAnchor:t=>k&&t.id===k[0]?"start":"end"},labelRotation:!1});let M=void 0;ft&&this._xTest.domain(w).height(t).maxSize(t/2).range([void 0,M]).select(_t.node()).ticks(k).width(v).config(ut).config(this._xConfig).scale(u).render();let tt,E=[],nt=this._lineLabels&&!lt;if(nt){var xt=o.filter(t=>"Line"===t.shape&&("function"!=typeof this._lineLabels||this._lineLabels(t.data,t.i))),xt=Ki().key(t=>t.id).entries(xt);if(xt.length){var wt=Ft.bind(this)(this._shapeConfig,"shape","Line"),St=(g0.config(wt),g0.labelConfig());let c=void 0!==St.fontColor?St.fontColor:d0.fontColor(),g=void 0!==St.fontSize?St.fontSize:d0.fontSize(),d=void 0!==St.fontWeight?St.fontWeight:d0.fontWeight(),f=void 0!==St.fontFamily?St.fontFamily:d0.fontFamily(),p=void 0!==St.padding?St.padding:d0.padding(),_=wt.label||this._drawLabel,m=t=>("log"===u&&0===t&&(t=w[0]<0?this._xTest._d3Scale.domain()[1]:this._xTest._d3Scale.domain()[0]),this._xTest._getPosition.bind(this._xTest)(t)),y=t=>("log"===r&&0===t&&(t=S[0]<0?this._yTest._d3Scale.domain()[1]:this._yTest._d3Scale.domain()[0]),this._yTest._getPosition.bind(this._yTest)(t)),n=(E=xt.map(t=>{let n=t.values[t.values.length-1],e;for(;n.__d3plus__&&n.data;)n=n.data,e=n.i;var i="function"==typeof _?_(n,e):_,a="function"==typeof c?c(n,e):c,r="function"==typeof g?g(n,e):g,o="function"==typeof d?d(n,e):d;let s="function"==typeof f?f(n,e):f;s instanceof Array&&(s=s.map(t=>`'${t}'`).join(", "));var l="function"==typeof p?p(n,e):p,i=Ae(i,{"font-size":r,"font-family":s,"font-weight":o}),o=t.values.map(t=>[m(t.x),y(t.y)]);let u=Nt(t.values.map(t=>m(t.x)));var h=t.values.find(t=>m(t.x)===u).y;return{id:t.key,labelWidth:i+2*l,spaceNeeded:i+4*l,value:h,yEstimate:y(h),padding:l,fontSize:r,fontColor:a,maxX:u,xValue:Nt(t.values,t=>t.x),coords:o}}).sort((t,n)=>S[1]>S[0]?t.value-n.value:n.value-t.value).filter((t,n,e)=>{let{fontSize:i,id:a,labelWidth:r,maxX:o,yEstimate:s}=t;return 0===e.filter(n=>n.id!==a&&n.coords.some(t=>(t[0]>o||t[0]===o&&n.maxX!==o)&&t[0]<=o+r&&t[1]<=s+.75*i&&t[1]>=s-.75*i)).length}),Nt(E,t=>t.maxX));tt=Nt(E.map(t=>t.labelWidth));St=n===this._xTest._getRange.bind(this._xTest)()[1]?Nt(E.filter(t=>t.maxX===n),t=>t.spaceNeeded):0;St&&(wt=Pt([St,v/4]),M=v-wt-this._margin.right)}}ft&&M&&this._xTest.domain(w).height(t).maxSize(t/2).range([void 0,M]).select(_t.node()).ticks(k).width(v).config(ut).config(this._xConfig).scale(u).render(),st&&this._x2Test.domain(X).height(t).range([void 0,M]).select(_t.node()).ticks(C).width(v).config(ut).tickSize(0).config(ht).config(this._x2Config).scale(h).render();xt=this._xTest._getRange(),St=this._x2Test._getRange(),wt=this._x2Test.outerBounds();let z=st?wt.height+this._x2Test.padding():0;var wt=Nt([yt,xt[0],St[0]]),Ct=(ft&&this._xTest.range([wt,void 0]).render(),pt?this._yTest.shapeConfig().labelConfig.fontSize()/2:0),kt=Nt([bt,v-xt[1],v-St[1]]),At=this._xTest.outerBounds().height+(pt?this._xTest.padding():0),ot=(this._padding.left+=wt,this._padding.right+=kt,this._padding.bottom+=At,this._padding.top+=z+Ct,super._draw(ot),this._margin.left+this._margin.right),Mt=this._margin.top+this._margin.bottom;let T=[z,t-(At+Ct+Mt)],B=(pt&&this._yTest.domain(S).height(t).maxSize(v/2).range(T).select(_t.node()).ticks(A).width(v).config(ct).config(this._yConfig).scale(r).render(),wt=Nt([yt=(mt=this._yTest.outerBounds()).width?mt.width+this._yTest.padding():void 0,xt[0],St[0]]),lt&&this._y2Test.config(ct).domain(c).gridSize(0).height(t).range(T).select(_t.node()).width(v-Nt([0,kt-bt])).title(!1).config(this._y2Config).config(gt).scale(l).render(),kt=Nt([0,bt=(vt=this._y2Test.outerBounds()).width?vt.width+this._y2Test.padding():void 0,v-xt[1],v-St[1]]),[wt,v-(kt+ot)]);mt=Dt("g.d3plus-plot-background",{parent:n,transition:e}),_t=`translate(${this._margin.left}, ${this._margin.top+z+Ct})`,vt=`translate(${this._margin.left}, ${this._margin.top+Ct})`,xt=Dt("g.d3plus-plot-x-axis",{parent:n,transition:e,enter:{transform:_t},update:{transform:_t,opacity:ft?1:0}}),St=st&&Dt("g.d3plus-plot-x2-axis",{parent:n,transition:e,enter:{transform:vt},update:{transform:vt}}),ot=`translate(${this._margin.left+(yt<wt?wt-yt:0)}, ${this._margin.top+Ct})`,ft=Dt("g.d3plus-plot-y-axis",{parent:n,transition:e,enter:{transform:ot},update:{transform:ot,opacity:pt?1:0}}),vt=`translate(-${this._margin.right}, ${this._margin.top+Ct})`,wt=lt&&Dt("g.d3plus-plot-y2-axis",{parent:n,transition:e,enter:{transform:vt},update:{transform:vt}});this._xAxis.domain(w).height(t-(z+Ct+Mt)).maxSize(t/2).range(B).select(xt.node()).ticks(k).width(v).config(ut).config(this._xConfig).scale(u).render(),st&&this._x2Axis.domain(X).height(t-(At+Ct+Mt)).range(B).select(St.node()).ticks(C).width(v).config(ut).config(ht).config(this._x2Config).scale(h).render(),this._xFunc=b=(t,n)=>("x2"===n?("log"===h&&0===t&&(t=X[0]<0?this._x2Axis._d3Scale.domain()[1]:this._x2Axis._d3Scale.domain()[0]),this._x2Axis._getPosition.bind(this._x2Axis)):("log"===u&&0===t&&(t=w[0]<0?this._xAxis._d3Scale.domain()[1]:this._xAxis._d3Scale.domain()[0]),this._xAxis._getPosition.bind(this._xAxis)))(t),T=[this._xAxis.outerBounds().y+z,t-(At+Ct+Mt)],this._yAxis.domain(S).height(t).maxSize(v/2).range(T).select(ft.node()).ticks(A).width(B[B.length-1]).config(ct).config(this._yConfig).scale(r).render(),lt&&this._y2Axis.config(ct).domain(lt?c:S).gridSize(0).height(t).range(T).select(wt.node()).width(v-Nt([0,kt-bt])).title(!1).config(this._y2Config).config(gt).scale(l).render();let et={},D=(E&&(Ki().key(t=>t.xValue).entries(E).forEach(({values:t})=>{var n=Nt(t.map(t=>t.fontSize));let u=Lt(T[0],T[1],n).reverse(),h=(T[1]-T[0])/8;t.forEach(
4748
+ /** */function t(e,i,a){if(e.defaultY||(e.defaultY=this._yAxis._getPosition(e.value)),i){var r=a[i-1],{fontSize:o,padding:s}=e,l=e.newY||e.defaultY;let n=r.newY||r.defaultY;l-o/2-s<n&&(l=u.find(t=>t<n),e.defaultY-l<h)&&(r.newY=l,i)&&t(r,i-1,a)}}.bind(this))}),et=E.reduce((t,n)=>(n.newY&&(t[n.id]=n.newY),t),{})),this._yFunc=x=(t,n)=>"y2"===n?("log"===l&&0===t&&(t=c[1]<0?this._y2Axis._d3ScaleNegative.domain()[0]:this._y2Axis._d3Scale.domain()[1]),this._y2Axis._getPosition.bind(this._y2Axis)(t)-z):("log"===r&&0===t&&(t=S[1]<0?this._yAxis._d3ScaleNegative.domain()[0]:this._yAxis._d3Scale.domain()[1]),this._yAxis._getPosition.bind(this._yAxis)(t)-z),this._xAxis.barConfig()["stroke-width"]);D&&(D/=2),(new nc).data([{}]).select(mt.node()).x(B[0]+(B[1]-B[0])/2).width(B[1]-B[0]).y(this._margin.top+Ct+T[0]+(T[1]-T[0])/2).height(T[1]-T[0]).config(this._backgroundConfig).render();yt=E.filter(t=>void 0!==t.newY);if(yt.length){ot=Dt("g.d3plus-plot-connectors",{parent:n,transition:e,enter:{transform:_t},update:{transform:_t}}).node();let t=yt.map(t=>Tt({x:this._xAxis._getPosition.bind(this._xAxis)(t.xValue),y:t.defaultY},t)).concat(yt.map(t=>Tt({x:this._xAxis._getPosition.bind(this._xAxis)(t.xValue)+t.padding-1,y:t.newY||t.defaultY},t)));(new ec).config({data:t,stroke:t=>t.fontColor,x:t=>t.x,y:t=>t.y}).config(this._labelConnectorConfig).select(ot).render()}let it=Dt("g.d3plus-plot-annotations",{parent:n,transition:e,enter:{transform:_t},update:{transform:_t}}).node();pt=Dt("g.d3plus-plot-shapes",{parent:n,transition:e,enter:{transform:_t},update:{transform:_t}}).node();let at=Dt("g.d3plus-plot-annotations-front",{parent:n,transition:e,enter:{transform:_t},update:{transform:_t}}).node(),N=(Object.keys(this._previousAnnotations).forEach(n=>{let e="front"===n?at:it;var t=this._annotations.filter(t=>"back"===n&&!t.layer||t.layer===n);let i=t.map(t=>t.shape);t.forEach(t=>{(new lc[t.shape]).duration(this._duration).config(t).config({x:t=>t.x2?b(t.x2,"x2"):b(t.x),x0:"x"===this._discrete?t=>t.x2?b(t.x2,"x2"):b(t.x):b(f.x[0]),x1:"x"===this._discrete?null:t=>t.x2?b(t.x2,"x2"):b(t.x),y:t=>t.y2?x(t.y2,"y2"):x(t.y),y0:"y"===this._discrete?t=>t.y2?x(t.y2,"y2"):x(t.y):x(f.y[1])-D,y1:"y"===this._discrete?null:t=>t.y2?x(t.y2,"y2"):x(t.y)-D}).select(e).render()}),this._previousAnnotations[n].filter(t=>!i.includes(t)).forEach(t=>{(new lc[t]).data([]).select(e).render()}),this._previousAnnotations[n]=i}),this._discrete||"x"),P={discrete:this._discrete,duration:this._duration,label:t=>this._drawLabel(t.data,t.i),select:pt,x:t=>void 0!==t.x2?b(t.x2,"x2"):b(t.x),x0:"x"===N?t=>t.x2?b(t.x2,"x2"):b(t.x):b("number"==typeof this._baseline?this._baseline:f.x[0]),x1:"x"===N?null:t=>t.x2?b(t.x2,"x2"):b(t.x),y:t=>void 0!==t.y2?x(t.y2,"y2"):x(t.y),y0:"y"===N?t=>t.y2?x(t.y2,"y2"):x(t.y):x("number"==typeof this._baseline?this._baseline:f.y[1])-D,y1:"y"===N?null:t=>t.y2?x(t.y2,"y2"):x(t.y)-D},rt=Object.keys(this._on),L=(dt.forEach(r=>{var o=Object.assign({},P);if(this._stacked&&["Area","Bar"].includes(r.key)){let i="x"===d?b:x;o[""+d]=o[d+"0"]=t=>{var n=_.indexOf(t.id),e=G.indexOf(t.discrete),t=t[d]<0?1:0;return 0<=n?i(p[n][e][t]):i(f[d]["x"===d?0:1])},o[d+"1"]=t=>{var n=_.indexOf(t.id),e=G.indexOf(t.discrete),t=t[d]<0?0:1;return 0<=n?i(p[n][e][t]):i(f[d]["x"===d?0:1])}}var s=(new lc[r.key]).config(o).data(r.values);if("Bar"===r.key){let t,n="x"===this._discrete?b:x;var o="x"===this._discrete?m:y,l="x"===this._discrete?w:S,u="x"===this._discrete?B:T;t="Point"!==o&&2===l.length?((o=Array.from(new Set(r.values.map(t=>n(t[this._discrete]))))).unshift(u[0]-o[0]-u[0]),o.push(u[1]+u[1]-o[o.length-1]),o.reduce((t,n,e,i)=>t=e&&(n=Math.abs(n-i[e-1]))<t?n:t,1/0)):1<l.length?n(l[1])-n(l[0]):u[u.length-1]-u[0],this._groupPadding<t&&(t-=this._groupPadding);let i=t||1;o=Ki().key(t=>t[this._discrete]).key(t=>t.group).entries(r.values),l=ii(o.map(t=>t.values.map(t=>t.key)));let a=Array.from(new Set(l));if(1===Nt(o.map(t=>t.values.length)))s[this._discrete]((t,n)=>P[this._discrete](t,n));else{i=(i-this._barPadding*a.length-1)/a.length;u=t/2-i/2;let e=ka().domain([0,a.length-1]).range([-u,u]);s[this._discrete]((t,n)=>P[this._discrete](t,n)+e(a.indexOf(t.group)))}s.width(i),s.height(i)}else if("Line"===r.key){if(s.duration(1.5*v),this._confidence){l=Object.assign({},P),o=this._discrete||"x";let n="x"===o?"y":"x",e="x"===o?x:b;l[n+"0"]=t=>e(this._confidence[0]?t.lci:t[n]),l[n+"1"]=t=>e(this._confidence[1]?t.hci:t[n]);u=(new Jh).config(l).data(r.values),o=Object.assign(this._shapeConfig,this._confidenceConfig);u.config(Tt(Ft.bind(this)(o,"shape","Line"),Ft.bind(this)(o,"shape","Area"))).render(),this._shapes.push(u)}s.config({discrete:P.discrete||"x",label:!!nt&&((e,t)=>{if("function"!=typeof this._lineLabels||this._lineLabels(e.data,e.i)){var i=E.find(t=>t.id===e.id);if(i){let n=i.newY||i.defaultY;i=E.filter(t=>t.newY===n);return 1<i.length?i[0].id===e.id&&`+${kh(i.length,this._locale)} `+this._translate("more"):this._drawLabel(e,t)}}return!1}),labelBounds:!!nt&&((t,n,e)=>{var[i,a]=e.points[0],[e,r]=e.points[e.points.length-1],o=this._height/4;return{x:e-i,y:r-a-o/2-(et[t.id]?r-et[t.id]:0),width:tt,height:o}})})}let h=rt.filter(t=>t.includes("."+r.key)),c=rt.filter(t=>!t.includes(".")),g=rt.filter(t=>t.includes(".shape"));for(let a=0;a<c.length;a++)s.on(c[a],(t,n,e,i)=>this._on[c[a]](t.data,t.i,e,i));for(let a=0;a<g.length;a++)s.on(g[a],(t,n,e,i)=>this._on[g[a]](t.data,t.i,e,i));for(let a=0;a<h.length;a++)s.on(h[a],(t,n,e,i)=>this._on[h[a]](t.data,t.i,e,i));l=Ft.bind(this)(this._shapeConfig,"shape",r.key);if(void 0===this._shapeConfig.duration&&delete l.duration,s.config(l).render(),this._shapes.push(s),"Line"===r.key){var t=(new tc).data(this._lineMarkers?r.values:[]).config(P).config(this._lineMarkerConfig).id(t=>t.id+"_"+t.discrete);for(let a=0;a<c.length;a++)t.on(c[a],(t,n,e,i)=>this._on[c[a]](t.data,t.i,e,i));for(let a=0;a<g.length;a++)t.on(g[a],(t,n,e,i)=>this._on[g[a]](t.data,t.i,e,i));for(let a=0;a<h.length;a++)t.on(h[a],(t,n,e,i)=>this._on[h[a]](t.data,t.i,e,i));t.render(),this._shapes.push(t)}}),dt.map(t=>t.key));function Et(e){let i=this[`_${e}Time`];var t=i?o:s,n=t.filter(t=>![NaN,void 0,!1].includes(t[e]));if(!n.length)return[];let a="number"==typeof n[0][e],r=this._discrete===e?Ki().key(t=>t[e]).rollup(t=>1===t.length?t[0].data:Vu(t.map(t=>t.data),this._aggs)).entries(n).sort((t,n)=>this[`_${e}Sort`]?this[`_${e}Sort`](t.value,n.value):(i||a?parseFloat(t.key,10):t.key)-(i||a?parseFloat(n.key,10):n.key)).map(t=>i?Bt(t.key):a?parseFloat(t.key,10):t.key):Yu(n.sort((t,n)=>this[`_${e}Sort`]?this[`_${e}Sort`](t.data,n.data):t[e]-n[e]).map(t=>t[e]),t=>""+t);return r=this._discrete!==e.charAt(0)&&this._confidence&&(this._confidence[0]&&(r=r.concat(t.map(t=>t.lci))),this._confidence[1])?r.concat(t.map(t=>t.hci)):r}function zt(t){var n=this[`_${t}Time`]?"Time":this._discrete===t||this[`_${t}Sort`]?"Point":"Linear",e=this[`_${t}Domain`]?this[`_${t}Domain`].slice():f[t],i=this[`_${t}2Domain`]?this[`_${t}2Domain`].slice():f[t+"2"];return"Point"!=n&&(e&&void 0===e[0]&&(e[0]=f[t][0]),e&&void 0===e[1]&&(e[1]=f[t][1]),i&&void 0===i[0]&&(i[0]=f[t+"2"][0]),i)&&void 0===i[1]&&(i[1]=f[t+"2"][1]),[e,n,i,n]}L.includes("Line")&&(this._confidence&&L.push("Area"),this._lineMarkers)&&L.push("Circle"),this._previousShapes.filter(t=>!L.includes(t)).forEach(t=>{(new lc[t]).config(P).data([]).render()}),this._previousShapes=L}return this}
4747
4749
  /**
4748
4750
  @memberof Plot
4749
4751
  @desc Allows drawing custom shapes to be used as annotations in the provided x/y plot. This method accepts custom config objects for the [Shape](http://d3plus.org/docs/#Shape) class, either a single config object or an array of config objects. Each config object requires an additional parameter, the "shape", which denotes which [Shape](http://d3plus.org/docs/#Shape) sub-class to use ([Rect](http://d3plus.org/docs/#Rect), [Line](http://d3plus.org/docs/#Line), etc).
@@ -4781,7 +4783,7 @@ this._aggs[n]||this._discrete!==t||(this._aggs[n]=(t,n)=>{t=Array.from(new Set(t
4781
4783
  @desc Determines whether or not to add additional padding at the ends of x or y scales. The most commone use for this is in Scatter Plots, so that the shapes do not appear directly on the axis itself. The value provided can either be `true` or `false` to toggle the behavior for all shape types, or a keyed Object for each shape type (ie. `{Bar: false, Circle: true, Line: false}`).
4782
4784
  @param {Object|Boolean} [*value*]
4783
4785
  @chainable
4784
- */buffer(t){if(arguments.length){if(t)if(!0===t)this._buffer=d0;else for(var n in this._buffer=Tt({},this._buffer,t),this._buffer)!0===this._buffer[n]&&(this._buffer[n]=d0[n]);else this._buffer={};return this}return this._buffer}
4786
+ */buffer(t){if(arguments.length){if(t)if(!0===t)this._buffer=f0;else for(var n in this._buffer=Tt({},this._buffer,t),this._buffer)!0===this._buffer[n]&&(this._buffer[n]=f0[n]);else this._buffer={};return this}return this._buffer}
4785
4787
  /**
4786
4788
  @memberof Plot
4787
4789
  @desc Sets the confidence to the specified array of lower and upper bounds.
@@ -4802,12 +4804,6 @@ this._aggs[n]||this._discrete!==t||(this._aggs[n]=(t,n)=>{t=Array.from(new Set(t
4802
4804
  @param {Object} [*value*]
4803
4805
  @chainable
4804
4806
  */confidenceConfig(t){return arguments.length?(this._confidenceConfig=Tt(this._confidenceConfig,t),this):this._confidenceConfig}
4805
- /**
4806
- @memberof Plot
4807
- @desc Sets the discrete axis to the specified string. If *value* is not specified, returns the current discrete axis.
4808
- @param {String} *value*
4809
- @chainable
4810
- */discrete(t){return arguments.length?(this._discrete=t,this):this._discrete}
4811
4807
  /**
4812
4808
  @memberof Plot
4813
4809
  @desc When the width or height of the chart is less than or equal to this pixel value, the discrete axis will not be shown. This helps produce slick sparklines. Set this value to `0` to disable the behavior entirely.
@@ -4897,17 +4893,17 @@ this._aggs[n]||this._discrete!==t||(this._aggs[n]=(t,n)=>{t=Array.from(new Set(t
4897
4893
  @desc Sets the stack order. If *value* is not specified, returns the current stack order function.
4898
4894
  @param {Function|String|Array} *value* = "none"
4899
4895
  @chainable
4900
- */stackOrder(t){return arguments.length?(this._stackOrder="string"==typeof t?"ascending"===t?p0:"descending"===t?_0:pu["stackOrder"+(t.charAt(0).toUpperCase()+t.slice(1))]:t,this):this._stackOrder}
4896
+ */stackOrder(t){return arguments.length?(this._stackOrder="string"==typeof t?"ascending"===t?_0:"descending"===t?m0:pu["stackOrder"+(t.charAt(0).toUpperCase()+t.slice(1))]:t,this):this._stackOrder}
4901
4897
  /**
4902
4898
  @memberof Plot
4903
- @desc Sets the x accessor to the specified function or number. If *value* is not specified, returns the current x accessor.
4904
- @param {Function|Number} *value*
4899
+ @desc Sets the x accessor to the specified accessor Function or String representing which key in the data to reference. If *value* is not specified, returns the current x accessor.
4900
+ @param {Function|String} *value*
4905
4901
  @chainable
4906
4902
  */x(t){return arguments.length?("function"==typeof t?this._x=t:(this._x=p(t),this._xKey=t),this):this._x}
4907
4903
  /**
4908
4904
  @memberof Plot
4909
- @desc Sets the x2 accessor to the specified function or number. If *value* is not specified, returns the current x2 accessor.
4910
- @param {Function|Number} *value*
4905
+ @desc Sets the x2 accessor to the specified accessor Function or String representing which key in the data to reference. If *value* is not specified, returns the current x2 accessor.
4906
+ @param {Function|String} *value*
4911
4907
  @chainable
4912
4908
  */x2(t){return arguments.length?("function"==typeof t?this._x2=t:(this._x2=p(t),this._x2Key=t),this):this._x2}
4913
4909
  /**
@@ -4954,14 +4950,14 @@ this._aggs[n]||this._discrete!==t||(this._aggs[n]=(t,n)=>{t=Array.from(new Set(t
4954
4950
  */x2Sort(t){return arguments.length?(this._x2Sort=t,this):this._x2Sort}
4955
4951
  /**
4956
4952
  @memberof Plot
4957
- @desc Sets the y accessor to the specified function or number. If *value* is not specified, returns the current y accessor.
4958
- @param {Function|Number} *value*
4953
+ @desc Sets the y accessor to the specified accessor Function or String representing which key in the data to reference. If *value* is not specified, returns the current y accessor.
4954
+ @param {Function|String} *value*
4959
4955
  @chainable
4960
4956
  */y(t){return arguments.length?("function"==typeof t?this._y=t:(this._y=p(t),this._yKey=t),this):this._y}
4961
4957
  /**
4962
4958
  @memberof Plot
4963
- @desc Sets the y2 accessor to the specified function or number. If *value* is not specified, returns the current y2 accessor.
4964
- @param {Function|Number} *value*
4959
+ @desc Sets the y2 accessor to the specified accessor Function or String representing which key in the data to reference. If *value* is not specified, returns the current y2 accessor.
4960
+ @param {Function|String} *value*
4965
4961
  @chainable
4966
4962
  */y2(t){return arguments.length?("function"==typeof t?this._y2=t:(this._y2=p(t),this._y2Key=t),this):this._y2}
4967
4963
  /**
@@ -5012,31 +5008,31 @@ this._aggs[n]||this._discrete!==t||(this._aggs[n]=(t,n)=>{t=Array.from(new Set(t
5012
5008
  @memberof Plot
5013
5009
  @desc Invoked when creating a new class instance, and sets any default parameters.
5014
5010
  @private
5015
- */constructor(){super(),this._axisPersist=!1,this._annotations=[],this._backgroundConfig={duration:0,fill:"transparent"},this._barPadding=0,this._buffer=Tt({},d0,{Bar:!1,Line:!1}),this._confidenceConfig={fill:(t,n)=>"function"==typeof this._shapeConfig.Line.stroke?this._shapeConfig.Line.stroke(t,n):this._shapeConfig.Line.stroke,fillOpacity:Ot(.5)},this._discreteCutoff=100,this._groupPadding=5,this._labelConnectorConfig={strokeDasharray:"1 1"},this._labelPosition=Ot("auto"),this._lineMarkerConfig={fill:(t,n)=>vu(this._id(t,n)),r:Ot(3)},this._lineMarkers=!1,this._previousAnnotations={back:[],front:[]},this._previousShapes=[],this._shape=Ot("Circle"),this._shapeConfig=Tt(this._shapeConfig,{Area:{label:(t,n)=>!!this._stacked&&this._drawLabel(t,n),labelBounds:(t,n,e)=>{let i=xh(e.points,{angle:Lt(-20,20,5)});if(!(i=!i||i.height<20||i.width<50?xh(e.points,{angle:Lt(-80,80,5)}):i))return null;let a=Pt(e.points,t=>t[0]);e=Nt(e.points.filter(t=>t[0]===a),t=>t[1]);return{angle:i.angle,width:i.width,height:i.height,x:i.cx-i.width/2-a,y:i.cy-i.height/2-e}},labelConfig:{fontMin:6,fontResize:!0,padding:10}},ariaLabel:(t,n)=>{let e="";return t.nested?e=""+this._drawLabel(t.data,t.i):(e=""+this._drawLabel(t,n),void 0!==this._x(t,n)&&(e+=", x: "+this._x(t,n)),void 0!==this._y(t,n)&&(e+=", y: "+this._y(t,n)),void 0!==this._x2(t,n)&&(e+=", x2: "+this._x2(t,n)),void 0!==this._y2(t,n)&&(e+=", y2: "+this._y2(t,n))),e+"."},Bar:{labelBounds(t,n,e){var i="y"===this._discrete?"width":"height",a="y"===this._discrete?"height":"width",r="x"===this._discrete.charAt(0)?"y":"x",o="y"==r,r=this._discrete.replace(this._discrete.charAt(0),r),s=this[`_${r}Axis`]._d3Scale.range(),s=Math.abs(s[1]-s[0]),r=this["_"+r](t,n)<0;return v0.bind(this)(t,n)?{[i]:s-e[i],[a]:e[a],x:o?-e.width/2:r?-s:e.width+1,y:o?r?e.height+1:-s:-e.height/2+1}:{[i]:e[i],[a]:e[a],x:o?-e.width/2:r?(this._stacked,1-e.width):-1,y:o?r?(this._stacked,1):1-e.height:-e.height/2+1}},labelConfig:{fontMax:16,fontMin:6,fontResize:!0,fontColor(t,n){return v0.bind(this)(t,n)?"transparent"===this._backgroundConfig.fill?mu.dark:bu(this._backgroundConfig.fill):bu("function"==typeof this._shapeConfig.fill?this._shapeConfig.fill(t,n):this._shapeConfig.fill)},fontStroke(t,n){return v0.bind(this)(t,n)?"transparent"===this._backgroundConfig.fill?mu.dark:bu(this._backgroundConfig.fill):"transparent"},fontStrokeWidth(t,n){return v0.bind(this)(t,n)?.1:0},padding:3,textAnchor(t,n){var e="x"===this._discrete.charAt(0)?"y":"x",i="y"==e,e=this._discrete.replace(this._discrete.charAt(0),e),e=this["_"+e](t,n)<0,i=i?"middle":v0.bind(this)(t,n)?e?"end":"start":e?"start":"end";return Si()?"start"==i?"end":"end"==i?"start":i:i},verticalAlign(t,n){var e="x"===this._discrete.charAt(0)?"y":"x",i="y"==e,e=this._discrete.replace(this._discrete.charAt(0),e),e=this["_"+e](t,n)<0;return i?v0.bind(this)(t,n)?e?"top":"bottom":e?"bottom":"top":"middle"}}},Circle:{r:f0.bind(this)},Line:{curve:()=>this._discrete?"monotone"+this._discrete.charAt(0).toUpperCase():"linear",fill:Ot("none"),labelConfig:{fontColor:(t,n)=>xu("function"==typeof this._shapeConfig.Line.stroke?this._shapeConfig.Line.stroke(t,n):this._shapeConfig.Line.stroke),fontResize:!1,padding:5,textAnchor:"start",verticalAlign:"middle"},strokeWidth:Ot(2)},Rect:{height:t=>2*f0.bind(this)(t),width:t=>2*f0.bind(this)(t)}}),this._shapeOrder=["Area","Path","Bar","Box","Line","Rect","Circle"],this._shapeSort=(t,n)=>this._shapeOrder.indexOf(t)-this._shapeOrder.indexOf(n),this._sizeMax=20,this._sizeMin=5,this._sizeScale="sqrt",this._stackOffset=y0,this._stackOrder=_0,this._timelineConfig=Tt(this._timelineConfig,{brushing:!0,brushMin:()=>this._xTime||this._yTime||this._x2Time||this._y2Time?2:1}),this._x=p("x"),this._xAxis=(new pc).align("end"),this._xTest=(new pc).align("end").gridSize(0),this._xConfig={gridConfig:{stroke:t=>this._discrete&&"x"===this._discrete.charAt(0)||this._xAxis.range()[0]===this._xAxis._getPosition.bind(this._xAxis)(t.id)?"transparent":h0.colors.gray[200]}},this._xCutoff=150,this._x2=p("x2"),this._x2Axis=(new yc).align("start"),this._x2Test=(new yc).align("start").gridSize(0),this._x2Config={padding:0},this._y=p("y"),this._yAxis=(new _c).align("start"),this._yTest=(new _c).align("start").gridSize(0),this._yConfig={gridConfig:{stroke:t=>{var n;return this._discrete&&"y"===this._discrete.charAt(0)||(n=this._yAxis.range())[n.length-1]===this._yAxis._getPosition.bind(this._yAxis)(t.id)?"transparent":h0.colors.gray[200]}}},this._yCutoff=150,this._y2=p("y2"),this._y2Axis=(new mc).align("end"),this._y2Test=(new _c).align("end").gridSize(0),this._y2Config={}}}class x0 extends b0{
5011
+ */constructor(){super(),this._axisPersist=!1,this._annotations=[],this._backgroundConfig={duration:0,fill:"transparent"},this._barPadding=0,this._buffer=Tt({},f0,{Bar:!1,Line:!1}),this._confidenceConfig={fill:(t,n)=>"function"==typeof this._shapeConfig.Line.stroke?this._shapeConfig.Line.stroke(t,n):this._shapeConfig.Line.stroke,fillOpacity:Ot(.5)},this._discreteCutoff=100,this._groupPadding=5,this._labelConnectorConfig={strokeDasharray:"1 1"},this._labelPosition=Ot("auto"),this._lineMarkerConfig={fill:(t,n)=>vu(this._id(t,n)),r:Ot(3)},this._lineMarkers=!1,this._previousAnnotations={back:[],front:[]},this._previousShapes=[],this._shape=Ot("Circle"),this._shapeConfig=Tt(this._shapeConfig,{Area:{label:(t,n)=>!!this._stacked&&this._drawLabel(t,n),labelBounds:(t,n,e)=>{let i=xh(e.points,{angle:Lt(-20,20,5)});if(!(i=!i||i.height<20||i.width<50?xh(e.points,{angle:Lt(-80,80,5)}):i))return null;let a=Pt(e.points,t=>t[0]);e=Nt(e.points.filter(t=>t[0]===a),t=>t[1]);return{angle:i.angle,width:i.width,height:i.height,x:i.cx-i.width/2-a,y:i.cy-i.height/2-e}},labelConfig:{fontMin:6,fontResize:!0,padding:10}},ariaLabel:(t,n)=>{let e="";return t.nested?e=""+this._drawLabel(t.data,t.i):(e=""+this._drawLabel(t,n),void 0!==this._x(t,n)&&(e+=", x: "+this._x(t,n)),void 0!==this._y(t,n)&&(e+=", y: "+this._y(t,n)),void 0!==this._x2(t,n)&&(e+=", x2: "+this._x2(t,n)),void 0!==this._y2(t,n)&&(e+=", y2: "+this._y2(t,n))),e+"."},Bar:{labelBounds(t,n,e){var i="y"===this._discrete?"width":"height",a="y"===this._discrete?"height":"width",r="x"===this._discrete.charAt(0)?"y":"x",o="y"==r,r=this._discrete.replace(this._discrete.charAt(0),r),s=this[`_${r}Axis`]._d3Scale.range(),s=Math.abs(s[1]-s[0]),r=this["_"+r](t,n)<0;return b0.bind(this)(t,n)?{[i]:s-e[i],[a]:e[a],x:o?-e.width/2:r?-s:e.width+1,y:o?r?e.height+1:-s:-e.height/2+1}:{[i]:e[i],[a]:e[a],x:o?-e.width/2:r?(this._stacked,1-e.width):-1,y:o?r?(this._stacked,1):1-e.height:-e.height/2+1}},labelConfig:{fontMax:16,fontMin:6,fontResize:!0,fontColor(t,n){return b0.bind(this)(t,n)?"transparent"===this._backgroundConfig.fill?mu.dark:bu(this._backgroundConfig.fill):bu("function"==typeof this._shapeConfig.fill?this._shapeConfig.fill(t,n):this._shapeConfig.fill)},fontStroke(t,n){return b0.bind(this)(t,n)?"transparent"===this._backgroundConfig.fill?mu.dark:bu(this._backgroundConfig.fill):"transparent"},fontStrokeWidth(t,n){return b0.bind(this)(t,n)?.1:0},padding:3,textAnchor(t,n){var e="x"===this._discrete.charAt(0)?"y":"x",i="y"==e,e=this._discrete.replace(this._discrete.charAt(0),e),e=this["_"+e](t,n)<0,i=i?"middle":b0.bind(this)(t,n)?e?"end":"start":e?"start":"end";return Si()?"start"==i?"end":"end"==i?"start":i:i},verticalAlign(t,n){var e="x"===this._discrete.charAt(0)?"y":"x",i="y"==e,e=this._discrete.replace(this._discrete.charAt(0),e),e=this["_"+e](t,n)<0;return i?b0.bind(this)(t,n)?e?"top":"bottom":e?"bottom":"top":"middle"}}},Circle:{r:p0.bind(this)},Line:{curve:()=>this._discrete?"monotone"+this._discrete.charAt(0).toUpperCase():"linear",fill:Ot("none"),labelConfig:{fontColor:(t,n)=>xu("function"==typeof this._shapeConfig.Line.stroke?this._shapeConfig.Line.stroke(t,n):this._shapeConfig.Line.stroke),fontResize:!1,padding:5,textAnchor:"start",verticalAlign:"middle"},strokeWidth:Ot(2)},Rect:{height:t=>2*p0.bind(this)(t),width:t=>2*p0.bind(this)(t)}}),this._shapeOrder=["Area","Path","Bar","Box","Line","Rect","Circle"],this._shapeSort=(t,n)=>this._shapeOrder.indexOf(t)-this._shapeOrder.indexOf(n),this._sizeMax=20,this._sizeMin=5,this._sizeScale="sqrt",this._stackOffset=v0,this._stackOrder=m0,this._timelineConfig=Tt(this._timelineConfig,{brushing:!0,brushMin:()=>this._xTime||this._yTime||this._x2Time||this._y2Time?2:1}),this._x=p("x"),this._xAxis=(new _c).align("end"),this._xKey="x",this._xTest=(new _c).align("end").gridSize(0),this._xConfig={gridConfig:{stroke:t=>this._discrete&&"x"===this._discrete.charAt(0)||this._xAxis.range()[0]===this._xAxis._getPosition.bind(this._xAxis)(t.id)?"transparent":c0.colors.gray[200]}},this._xCutoff=150,this._x2=p("x2"),this._x2Axis=(new vc).align("start"),this._x2Test=(new vc).align("start").gridSize(0),this._x2Config={padding:0},this._y=p("y"),this._yAxis=(new mc).align("start"),this._yKey="y",this._yTest=(new mc).align("start").gridSize(0),this._yConfig={gridConfig:{stroke:t=>{var n;return this._discrete&&"y"===this._discrete.charAt(0)||(n=this._yAxis.range())[n.length-1]===this._yAxis._getPosition.bind(this._yAxis)(t.id)?"transparent":c0.colors.gray[200]}}},this._yCutoff=150,this._y2=p("y2"),this._y2Axis=(new yc).align("end"),this._y2Test=(new mc).align("end").gridSize(0),this._y2Config={}}}class w0 extends x0{
5016
5012
  /**
5017
5013
  @memberof AreaPlot
5018
5014
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Plot.
5019
5015
  @private
5020
- */constructor(){super(),this._baseline=0,this._discrete="x",this._shape=Ot("Area"),this.x("x")}}class w0 extends b0{
5016
+ */constructor(){super(),this._baseline=0,this._discrete="x",this._shape=Ot("Area")}}class S0 extends x0{
5021
5017
  /**
5022
5018
  @memberof BarChart
5023
5019
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Plot.
5024
5020
  @private
5025
- */constructor(){super(),this._baseline=0,this._discrete="x";let e=this._legend;this._legend=(t,n)=>n.map(this._groupBy[this._legendDepth].bind(this)).sort().join()!==this._filteredData.map(this._groupBy[this._legendDepth].bind(this)).sort().join()&&e.bind(this)(t,n),this._shape=Ot("Bar"),this.x("x")}}class S0 extends b0{
5021
+ */constructor(){super(),this._baseline=0,this._discrete="x";let e=this._legend;this._legend=(t,n)=>n.map(this._groupBy[this._legendDepth].bind(this)).sort().join()!==this._filteredData.map(this._groupBy[this._legendDepth].bind(this)).sort().join()&&e.bind(this)(t,n),this._shape=Ot("Bar")}}class C0 extends x0{
5026
5022
  /**
5027
5023
  @memberof BoxWhisker
5028
5024
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Plot.
5029
5025
  @private
5030
- */constructor(){super(),this._discrete="x",this._shape=Ot("Box"),this.x("x"),this._tooltipConfig=Tt(this._tooltipConfig,{title:(t,n)=>{if(!t)return"";for(;t.__d3plus__&&t.data;)n=(t=t.data).i;var e;return this._label?this._label(t,n):(e=this._ids(t,n).slice(0,this._drawDepth))[e.length-1]}})}}class C0 extends b0{
5026
+ */constructor(){super(),this._discrete="x",this._shape=Ot("Box"),this._tooltipConfig=Tt(this._tooltipConfig,{title:(t,n)=>{if(!t)return"";for(;t.__d3plus__&&t.data;)n=(t=t.data).i;var e;return this._label?this._label(t,n):(e=this._ids(t,n).slice(0,this._drawDepth))[e.length-1]}})}}class k0 extends x0{
5031
5027
  /**
5032
5028
  @memberof BumpChart
5033
5029
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Plot.
5034
5030
  @private
5035
- */constructor(){super(),this._discrete="x",this._shape=Ot("Line"),this.x("x"),this.y2(t=>this._y(t)),this.yConfig({tickFormat:n=>{var t=this._formattedData;let e=t[0].x instanceof Date?t[0].x.getTime():t[0].x;t=t.filter(t=>(t.x instanceof Date?t.x.getTime():t.x)===e).find(t=>t.y===n);return t?this._drawLabel(t,t.i):""}}),this.y2Config({tickFormat:n=>{var t=this._formattedData;let e=t[t.length-1].x instanceof Date?t[t.length-1].x.getTime():t[t.length-1].x;t=t.filter(t=>(t.x instanceof Date?t.x.getTime():t.x)===e).find(t=>t.y===n);return t?this._drawLabel(t,t.i):""}}),this.ySort((t,n)=>this._y(n)-this._y(t)),this.y2Sort((t,n)=>this._y(n)-this._y(t))}}class k0 extends r0{
5031
+ */constructor(){super(),this._discrete="x",this._shape=Ot("Line"),this.y2(t=>this._y(t)),this.yConfig({tickFormat:n=>{var t=this._formattedData;let e=t[0].x instanceof Date?t[0].x.getTime():t[0].x;t=t.filter(t=>(t.x instanceof Date?t.x.getTime():t.x)===e).find(t=>t.y===n);return t?this._drawLabel(t,t.i):""}}),this.y2Config({tickFormat:n=>{var t=this._formattedData;let e=t[t.length-1].x instanceof Date?t[t.length-1].x.getTime():t[t.length-1].x;t=t.filter(t=>(t.x instanceof Date?t.x.getTime():t.x)===e).find(t=>t.y===n);return t?this._drawLabel(t,t.i):""}}),this.ySort((t,n)=>this._y(n)-this._y(t)),this.y2Sort((t,n)=>this._y(n)-this._y(t))}}class A0 extends o0{
5036
5032
  /**
5037
5033
  Extends the draw behavior of the abstract Viz class.
5038
5034
  @private
5039
- */_draw(t){super._draw(t);var t=this._height-this._margin.top-this._margin.bottom,n=this._width-this._margin.left-this._margin.right,e=Pt([n,t])/2,i=this._pieData=this._pie.padAngle(this._padAngle||this._padPixel/e).sort(this._sort).value(this._value)(this._filteredData),e=(i.forEach((t,n)=>{t.__d3plus__=!0,t.i=n}),Ns().innerRadius(this._innerRadius).outerRadius(e)),n=`translate(${n/2+this._margin.left}, ${t/2+this._margin.top})`;return this._shapes.push((new oc).data(i).d(e).select(Dt("g.d3plus-Pie",{parent:this._select,enter:{transform:n},update:{transform:n}}).node()).config({id:t=>this._ids(t).join("-"),x:0,y:0}).label(this._drawLabel).config(Ft.bind(this)(this._shapeConfig,"shape","Path")).render()),this}
5035
+ */_draw(t){super._draw(t);var t=this._height-this._margin.top-this._margin.bottom,n=this._width-this._margin.left-this._margin.right,e=Pt([n,t])/2,i=this._pieData=this._pie.padAngle(this._padAngle||this._padPixel/e).sort(this._sort).value(this._value)(this._filteredData),e=(i.forEach((t,n)=>{t.__d3plus__=!0,t.i=n}),Ns().innerRadius(this._innerRadius).outerRadius(e)),n=`translate(${n/2+this._margin.left}, ${t/2+this._margin.top})`;return this._shapes.push((new sc).data(i).d(e).select(Dt("g.d3plus-Pie",{parent:this._select,enter:{transform:n},update:{transform:n}}).node()).config({id:t=>this._ids(t).join("-"),x:0,y:0}).label(this._drawLabel).config(Ft.bind(this)(this._shapeConfig,"shape","Path")).render()),this}
5040
5036
  /**
5041
5037
  @memberof Pie
5042
5038
  @desc The pixel value, or function that returns a pixel value, that is used as the inner radius of the Pie (creating a Donut).
@@ -5072,64 +5068,64 @@ this._aggs[n]||this._discrete!==t||(this._aggs[n]=(t,n)=>{t=Array.from(new Set(t
5072
5068
  @memberof Pie
5073
5069
  @desc Invoked when creating a new class instance, and sets any default parameters.
5074
5070
  @private
5075
- */constructor(){super();let e=this._legend;this._legend=(t,n)=>n.length!==this._filteredData.length&&e.bind(this)(t,n),this._legendSort=(t,n)=>this._value(n)-this._value(t),this._shapeConfig=Tt(this._shapeConfig,{ariaLabel:(t,n)=>this._pieData?`${++this._pieData[n].index}. ${this._drawLabel(t,n)}, ${this._value(t,n)}.`:"",Path:{labelConfig:{fontResize:!0}}}),this._innerRadius=0,this._legendSort=(t,n)=>this._value(n)-this._value(t),this._padPixel=0,this._pie=$s(),this._sort=(t,n)=>this._value(n)-this._value(t),this._value=p("value")}}class A0 extends k0{
5071
+ */constructor(){super();let e=this._legend;this._legend=(t,n)=>n.length!==this._filteredData.length&&e.bind(this)(t,n),this._legendSort=(t,n)=>this._value(n)-this._value(t),this._shapeConfig=Tt(this._shapeConfig,{ariaLabel:(t,n)=>this._pieData?`${++this._pieData[n].index}. ${this._drawLabel(t,n)}, ${this._value(t,n)}.`:"",Path:{labelConfig:{fontResize:!0}}}),this._innerRadius=0,this._legendSort=(t,n)=>this._value(n)-this._value(t),this._padPixel=0,this._pie=$s(),this._sort=(t,n)=>this._value(n)-this._value(t),this._value=p("value")}}class M0 extends A0{
5076
5072
  /**
5077
5073
  @memberof Donut
5078
5074
  @desc Invoked when creating a new class instance, and sets any default parameters.
5079
5075
  @private
5080
- */constructor(){super(),this._innerRadius=()=>Pt([this._width-this._margin.left-this._margin.right,this._height-this._margin.top-this._margin.bottom])/4,this._padPixel=2}}var T=1e-6,M0=1e-12,M=Math.PI,E0=M/2,z0=M/4,T0=2*M,B0=180/M,B=M/180,D=Math.abs,D0=Math.atan,N0=Math.atan2,E=Math.cos,P0=Math.ceil,L0=Math.exp,F0=Math.hypot,O0=Math.log,R0=Math.pow,z=Math.sin,j0=Math.sign||function(t){return 0<t?1:t<0?-1:0},I0=Math.sqrt,H0=Math.tan;function G0(t){return 1<t?0:t<-1?M:Math.acos(t)}function K0(t){return 1<t?E0:t<-1?-E0:Math.asin(t)}function $0(t){return(t=z(t/2))*t}function q0(){}function U0(t,n){t&&Y0.hasOwnProperty(t.type)&&Y0[t.type](t,n)}var W0={Feature:function(t,n){U0(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,i=-1,a=e.length;++i<a;)U0(e[i].geometry,n)}},Y0={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)t=e[i],n.point(t[0],t[1],t[2])},LineString:function(t,n){V0(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)V0(e[i],n,0)},Polygon:function(t,n){Z0(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)Z0(e[i],n)},GeometryCollection:function(t,n){for(var e=t.geometries,i=-1,a=e.length;++i<a;)U0(e[i],n)}};function V0(t,n,e){var i,a=-1,r=t.length-e;for(n.lineStart();++a<r;)i=t[a],n.point(i[0],i[1],i[2]);n.lineEnd()}function Z0(t,n){var e=-1,i=t.length;for(n.polygonStart();++e<i;)V0(t[e],n,1);n.polygonEnd()}function X0(t,n){t&&W0.hasOwnProperty(t.type)?W0[t.type](t,n):U0(t,n)}var J0,Q0,tf,nf,ef,af,rf,of,sf,lf,uf,hf,cf,gf,df,ff,pf=new je,_f=new je,mf={point:q0,lineStart:q0,lineEnd:q0,polygonStart:function(){pf=new je,mf.lineStart=yf,mf.lineEnd=vf},polygonEnd:function(){var t=+pf;_f.add(t<0?T0+t:t),this.lineStart=this.lineEnd=this.point=q0},sphere:function(){_f.add(T0)}};
5076
+ */constructor(){super(),this._innerRadius=()=>Pt([this._width-this._margin.left-this._margin.right,this._height-this._margin.top-this._margin.bottom])/4,this._padPixel=2}}var T=1e-6,E0=1e-12,M=Math.PI,z0=M/2,T0=M/4,B0=2*M,D0=180/M,B=M/180,D=Math.abs,N0=Math.atan,P0=Math.atan2,E=Math.cos,L0=Math.ceil,F0=Math.exp,O0=Math.hypot,R0=Math.log,j0=Math.pow,z=Math.sin,I0=Math.sign||function(t){return 0<t?1:t<0?-1:0},H0=Math.sqrt,G0=Math.tan;function K0(t){return 1<t?0:t<-1?M:Math.acos(t)}function $0(t){return 1<t?z0:t<-1?-z0:Math.asin(t)}function q0(t){return(t=z(t/2))*t}function U0(){}function W0(t,n){t&&V0.hasOwnProperty(t.type)&&V0[t.type](t,n)}var Y0={Feature:function(t,n){W0(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,i=-1,a=e.length;++i<a;)W0(e[i].geometry,n)}},V0={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)t=e[i],n.point(t[0],t[1],t[2])},LineString:function(t,n){Z0(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)Z0(e[i],n,0)},Polygon:function(t,n){X0(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)X0(e[i],n)},GeometryCollection:function(t,n){for(var e=t.geometries,i=-1,a=e.length;++i<a;)W0(e[i],n)}};function Z0(t,n,e){var i,a=-1,r=t.length-e;for(n.lineStart();++a<r;)i=t[a],n.point(i[0],i[1],i[2]);n.lineEnd()}function X0(t,n){var e=-1,i=t.length;for(n.polygonStart();++e<i;)Z0(t[e],n,1);n.polygonEnd()}function J0(t,n){t&&Y0.hasOwnProperty(t.type)?Y0[t.type](t,n):W0(t,n)}var Q0,tf,nf,ef,af,rf,of,sf,lf,uf,hf,cf,gf,df,ff,pf,_f=new je,mf=new je,yf={point:U0,lineStart:U0,lineEnd:U0,polygonStart:function(){_f=new je,yf.lineStart=vf,yf.lineEnd=bf},polygonEnd:function(){var t=+_f;mf.add(t<0?B0+t:t),this.lineStart=this.lineEnd=this.point=U0},sphere:function(){mf.add(B0)}};
5081
5077
  // hello?
5082
- function yf(){mf.point=bf}function vf(){xf(J0,Q0)}function bf(t,n){mf.point=xf,J0=t,Q0=n,tf=t*=B,nf=E(n=(n*=B)/2+z0),ef=z(n)}function xf(t,n){// half the angular distance from south pole
5078
+ function vf(){yf.point=xf}function bf(){wf(Q0,tf)}function xf(t,n){yf.point=wf,Q0=t,tf=n,nf=t*=B,ef=E(n=(n*=B)/2+T0),af=z(n)}function wf(t,n){// half the angular distance from south pole
5083
5079
  // Spherical excess E for a spherical triangle with vertices: south pole,
5084
5080
  // previous point, current point. Uses a formula derived from Cagnoli’s
5085
5081
  // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2).
5086
- var e=(t*=B)-tf,i=0<=e?1:-1,e=i*e,a=E(n=(n*=B)/2+z0),n=z(n),r=ef*n,o=nf*a+r*E(e),r=r*i*z(e);pf.add(N0(r,o)),
5082
+ var e=(t*=B)-nf,i=0<=e?1:-1,e=i*e,a=E(n=(n*=B)/2+T0),n=z(n),r=af*n,o=ef*a+r*E(e),r=r*i*z(e);_f.add(P0(r,o)),
5087
5083
  // Advance the previous points.
5088
- tf=t,nf=a,ef=n}function wf(t){return[N0(t[1],t[0]),K0(t[2])]}function Sf(t){var n=t[0],t=t[1],e=E(t);return[e*E(n),e*z(n),z(t)]}function Cf(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function kf(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}
5084
+ nf=t,ef=a,af=n}function Sf(t){return[P0(t[1],t[0]),$0(t[2])]}function Cf(t){var n=t[0],t=t[1],e=E(t);return[e*E(n),e*z(n),z(t)]}function kf(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Af(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}
5089
5085
  // TODO return a
5090
- function Af(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Mf(t,n){return[t[0]*n,t[1]*n,t[2]*n]}
5086
+ function Mf(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Ef(t,n){return[t[0]*n,t[1]*n,t[2]*n]}
5091
5087
  // TODO return d
5092
- function Ef(t){var n=I0(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var zf,Tf,Bf,Df,Nf,Pf,Lf,Ff,Of,Rf,jf,If,Hf,Gf,Kf,$f,qf={point:Uf,lineStart:Yf,lineEnd:Vf,polygonStart:function(){qf.point=Zf,qf.lineStart=Xf,qf.lineEnd=Jf,gf=new je,mf.polygonStart()},polygonEnd:function(){mf.polygonEnd(),qf.point=Uf,qf.lineStart=Yf,qf.lineEnd=Vf,pf<0?(af=-(of=180),rf=-(sf=90)):T<gf?sf=90:gf<-1e-6&&(rf=-90),ff[0]=af,ff[1]=of},sphere:function(){af=-(of=180),rf=-(sf=90)}};function Uf(t,n){df.push(ff=[af=t,of=t]),n<rf&&(rf=n),sf<n&&(sf=n)}function Wf(t,n){var e,i,a,r,o,s=Sf([t*B,n*B]);cf?(e=kf(cf,s),Ef(e=kf([e[1],-e[0],0],e)),e=wf(e),o=t-lf,a=e[0]*B0*(i=0<o?1:-1),(o=180<D(o))^(i*lf<a&&a<i*t)?(r=e[1]*B0,sf<r&&(sf=r)):o^(i*lf<(a=(360+a)%360-180)&&a<i*t)?(r=-e[1]*B0)<rf&&(rf=r):(n<rf&&(rf=n),sf<n&&(sf=n)),o?t<lf?Qf(af,t)>Qf(af,of)&&(of=t):Qf(t,of)>Qf(af,of)&&(af=t):af<=of?(t<af&&(af=t),of<t&&(of=t)):lf<t?Qf(af,t)>Qf(af,of)&&(of=t):Qf(t,of)>Qf(af,of)&&(af=t)):df.push(ff=[af=t,of=t]),n<rf&&(rf=n),sf<n&&(sf=n),cf=s,lf=t}function Yf(){qf.point=Wf}function Vf(){ff[0]=af,ff[1]=of,qf.point=Uf,cf=null}function Zf(t,n){var e;cf?(e=t-lf,gf.add(180<D(e)?e+(0<e?360:-360):e)):(uf=t,hf=n),mf.point(t,n),Wf(t,n)}function Xf(){mf.lineStart()}function Jf(){Zf(uf,hf),mf.lineEnd(),D(gf)>T&&(af=-(of=180)),ff[0]=af,ff[1]=of,cf=null}
5088
+ function zf(t){var n=H0(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var Tf,Bf,Df,Nf,Pf,Lf,Ff,Of,Rf,jf,If,Hf,Gf,Kf,$f,qf,Uf={point:Wf,lineStart:Vf,lineEnd:Zf,polygonStart:function(){Uf.point=Xf,Uf.lineStart=Jf,Uf.lineEnd=Qf,df=new je,yf.polygonStart()},polygonEnd:function(){yf.polygonEnd(),Uf.point=Wf,Uf.lineStart=Vf,Uf.lineEnd=Zf,_f<0?(rf=-(sf=180),of=-(lf=90)):T<df?lf=90:df<-1e-6&&(of=-90),pf[0]=rf,pf[1]=sf},sphere:function(){rf=-(sf=180),of=-(lf=90)}};function Wf(t,n){ff.push(pf=[rf=t,sf=t]),n<of&&(of=n),lf<n&&(lf=n)}function Yf(t,n){var e,i,a,r,o,s=Cf([t*B,n*B]);gf?(e=Af(gf,s),zf(e=Af([e[1],-e[0],0],e)),e=Sf(e),o=t-uf,a=e[0]*D0*(i=0<o?1:-1),(o=180<D(o))^(i*uf<a&&a<i*t)?(r=e[1]*D0,lf<r&&(lf=r)):o^(i*uf<(a=(360+a)%360-180)&&a<i*t)?(r=-e[1]*D0)<of&&(of=r):(n<of&&(of=n),lf<n&&(lf=n)),o?t<uf?t1(rf,t)>t1(rf,sf)&&(sf=t):t1(t,sf)>t1(rf,sf)&&(rf=t):rf<=sf?(t<rf&&(rf=t),sf<t&&(sf=t)):uf<t?t1(rf,t)>t1(rf,sf)&&(sf=t):t1(t,sf)>t1(rf,sf)&&(rf=t)):ff.push(pf=[rf=t,sf=t]),n<of&&(of=n),lf<n&&(lf=n),gf=s,uf=t}function Vf(){Uf.point=Yf}function Zf(){pf[0]=rf,pf[1]=sf,Uf.point=Wf,gf=null}function Xf(t,n){var e;gf?(e=t-uf,df.add(180<D(e)?e+(0<e?360:-360):e)):(hf=t,cf=n),yf.point(t,n),Yf(t,n)}function Jf(){yf.lineStart()}function Qf(){Xf(hf,cf),yf.lineEnd(),D(df)>T&&(rf=-(sf=180)),pf[0]=rf,pf[1]=sf,gf=null}
5093
5089
  // Finds the left-right distance between two longitudes.
5094
5090
  // This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want
5095
5091
  // the distance between ±180° to be 360°.
5096
- function Qf(t,n){return(n-=t)<0?n+360:n}function t1(t,n){return t[0]-n[0]}function n1(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}function e1(t){var n,e,i,a,r,o,s;
5092
+ function t1(t,n){return(n-=t)<0?n+360:n}function n1(t,n){return t[0]-n[0]}function e1(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}function i1(t){var n,e,i,a,r,o,s;
5097
5093
  // First, sort ranges by their minimum longitudes.
5098
- if(sf=of=-(af=rf=1/0),df=[],X0(t,qf),e=df.length){
5094
+ if(lf=sf=-(rf=of=1/0),ff=[],J0(t,Uf),e=ff.length){
5099
5095
  // Then, merge any ranges that overlap.
5100
- for(df.sort(t1),n=1,r=[i=df[0]];n<e;++n)n1(i,(a=df[n])[0])||n1(i,a[1])?(Qf(i[0],a[1])>Qf(i[0],i[1])&&(i[1]=a[1]),Qf(a[0],i[1])>Qf(i[0],i[1])&&(i[0]=a[0])):r.push(i=a);
5096
+ for(ff.sort(n1),n=1,r=[i=ff[0]];n<e;++n)e1(i,(a=ff[n])[0])||e1(i,a[1])?(t1(i[0],a[1])>t1(i[0],i[1])&&(i[1]=a[1]),t1(a[0],i[1])>t1(i[0],i[1])&&(i[0]=a[0])):r.push(i=a);
5101
5097
  // Finally, find the largest gap between the merged ranges.
5102
5098
  // The final bounding box will be the inverse of this gap.
5103
- for(o=-1/0,n=0,i=r[e=r.length-1];n<=e;i=a,++n)(s=Qf(i[1],(a=r[n])[0]))>o&&(o=s,af=a[0],of=i[1])}return df=ff=null,af===1/0||rf===1/0?[[NaN,NaN],[NaN,NaN]]:[[af,rf],[of,sf]]}// previous point
5104
- var i1={sphere:q0,point:a1,lineStart:o1,lineEnd:u1,polygonStart:function(){i1.lineStart=h1,i1.lineEnd=c1},polygonEnd:function(){i1.lineStart=o1,i1.lineEnd=u1}};
5099
+ for(o=-1/0,n=0,i=r[e=r.length-1];n<=e;i=a,++n)(s=t1(i[1],(a=r[n])[0]))>o&&(o=s,rf=a[0],sf=i[1])}return ff=pf=null,rf===1/0||of===1/0?[[NaN,NaN],[NaN,NaN]]:[[rf,of],[sf,lf]]}// previous point
5100
+ var a1={sphere:U0,point:r1,lineStart:s1,lineEnd:h1,polygonStart:function(){a1.lineStart=c1,a1.lineEnd=g1},polygonEnd:function(){a1.lineStart=s1,a1.lineEnd=h1}};
5105
5101
  // Arithmetic mean of Cartesian vectors.
5106
- function a1(t,n){t*=B;var e=E(n*=B);r1(e*E(t),e*z(t),z(n))}function r1(t,n,e){Bf+=(t-Bf)/++zf,Df+=(n-Df)/zf,Nf+=(e-Nf)/zf}function o1(){i1.point=s1}function s1(t,n){t*=B;var e=E(n*=B);Gf=e*E(t),Kf=e*z(t),$f=z(n),i1.point=l1,r1(Gf,Kf,$f)}function l1(t,n){t*=B;var e=E(n*=B),i=e*E(t),e=e*z(t),t=z(n),n=N0(I0((n=Kf*t-$f*e)*n+(n=$f*i-Gf*t)*n+(n=Gf*e-Kf*i)*n),Gf*i+Kf*e+$f*t);Tf+=n,Pf+=n*(Gf+(Gf=i)),Lf+=n*(Kf+(Kf=e)),Ff+=n*($f+($f=t)),r1(Gf,Kf,$f)}function u1(){i1.point=a1}
5102
+ function r1(t,n){t*=B;var e=E(n*=B);o1(e*E(t),e*z(t),z(n))}function o1(t,n,e){Df+=(t-Df)/++Tf,Nf+=(n-Nf)/Tf,Pf+=(e-Pf)/Tf}function s1(){a1.point=l1}function l1(t,n){t*=B;var e=E(n*=B);Kf=e*E(t),$f=e*z(t),qf=z(n),a1.point=u1,o1(Kf,$f,qf)}function u1(t,n){t*=B;var e=E(n*=B),i=e*E(t),e=e*z(t),t=z(n),n=P0(H0((n=$f*t-qf*e)*n+(n=qf*i-Kf*t)*n+(n=Kf*e-$f*i)*n),Kf*i+$f*e+qf*t);Bf+=n,Lf+=n*(Kf+(Kf=i)),Ff+=n*($f+($f=e)),Of+=n*(qf+(qf=t)),o1(Kf,$f,qf)}function h1(){a1.point=r1}
5107
5103
  // See J. E. Brock, The Inertia Tensor for a Spherical Triangle,
5108
5104
  // J. Applied Mechanics 42, 239 (1975).
5109
- function h1(){i1.point=g1}function c1(){d1(If,Hf),i1.point=a1}function g1(t,n){If=t,Hf=n,t*=B,n*=B,i1.point=d1;var e=E(n);Gf=e*E(t),Kf=e*z(t),$f=z(n),r1(Gf,Kf,$f)}function d1(t,n){t*=B;var e=E(n*=B),i=e*E(t),e=e*z(t),t=z(n),n=Kf*t-$f*e,a=$f*i-Gf*t,r=Gf*e-Kf*i,o=F0(n,a,r),s=K0(o),o=o&&-s/o;// area weight multiplier
5110
- Of.add(o*n),Rf.add(o*a),jf.add(o*r),Tf+=s,Pf+=s*(Gf+(Gf=i)),Lf+=s*(Kf+(Kf=e)),Ff+=s*($f+($f=t)),r1(Gf,Kf,$f)}function f1(t){zf=Tf=Bf=Df=Nf=Pf=Lf=Ff=0,Of=new je,Rf=new je,jf=new je,X0(t,i1);var t=+Of,n=+Rf,e=+jf,i=F0(t,n,e);
5105
+ function c1(){a1.point=d1}function g1(){f1(Hf,Gf),a1.point=r1}function d1(t,n){Hf=t,Gf=n,t*=B,n*=B,a1.point=f1;var e=E(n);Kf=e*E(t),$f=e*z(t),qf=z(n),o1(Kf,$f,qf)}function f1(t,n){t*=B;var e=E(n*=B),i=e*E(t),e=e*z(t),t=z(n),n=$f*t-qf*e,a=qf*i-Kf*t,r=Kf*e-$f*i,o=O0(n,a,r),s=$0(o),o=o&&-s/o;// area weight multiplier
5106
+ Rf.add(o*n),jf.add(o*a),If.add(o*r),Bf+=s,Lf+=s*(Kf+(Kf=i)),Ff+=s*($f+($f=e)),Of+=s*(qf+(qf=t)),o1(Kf,$f,qf)}function p1(t){Tf=Bf=Df=Nf=Pf=Lf=Ff=Of=0,Rf=new je,jf=new je,If=new je,J0(t,a1);var t=+Rf,n=+jf,e=+If,i=O0(t,n,e);
5111
5107
  // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid.
5112
- return i<M0&&(t=Pf,n=Lf,e=Ff,
5108
+ return i<E0&&(t=Lf,n=Ff,e=Of,
5113
5109
  // If the feature has zero length, fall back to arithmetic mean of point vectors.
5114
- Tf<T&&(t=Bf,n=Df,e=Nf),(i=F0(t,n,e))<M0)?[NaN,NaN]:[N0(n,t)*B0,K0(e/i)*B0]}function p1(t){return function(){return t}}function _1(e,i){function t(t,n){return t=e(t,n),i(t[0],t[1])}return e.invert&&i.invert&&(t.invert=function(t,n){return(t=i.invert(t,n))&&e.invert(t[0],t[1])}),t}function m1(t,n){return D(t)>M&&(t-=Math.round(t/T0)*T0),[t,n]}function y1(t,n,e){return(t%=T0)?n||e?_1(b1(t),x1(n,e)):b1(t):n||e?x1(n,e):m1}function v1(e){return function(t,n){return D(t+=e)>M&&(t-=Math.round(t/T0)*T0),[t,n]}}function b1(t){var n=v1(t);return n.invert=v1(-t),n}function x1(t,n){var a=E(t),r=z(t),o=E(n),s=z(n);function e(t,n){var e=E(n),i=E(t)*e,t=z(t)*e,e=z(n),n=e*a+i*r;return[N0(t*o-n*s,i*a-e*r),K0(n*o+t*s)]}return e.invert=function(t,n){var e=E(n),i=E(t)*e,t=z(t)*e,e=z(n),n=e*o-t*s;return[N0(t*o+e*s,i*a+n*r),K0(n*a-i*r)]},e}function w1(n){function t(t){return(t=n(t[0]*B,t[1]*B))[0]*=B0,t[1]*=B0,t}return n=y1(n[0]*B,n[1]*B,2<n.length?n[2]*B:0),t.invert=function(t){return(t=n.invert(t[0]*B,t[1]*B))[0]*=B0,t[1]*=B0,t},t}
5110
+ Bf<T&&(t=Df,n=Nf,e=Pf),(i=O0(t,n,e))<E0)?[NaN,NaN]:[P0(n,t)*D0,$0(e/i)*D0]}function _1(t){return function(){return t}}function m1(e,i){function t(t,n){return t=e(t,n),i(t[0],t[1])}return e.invert&&i.invert&&(t.invert=function(t,n){return(t=i.invert(t,n))&&e.invert(t[0],t[1])}),t}function y1(t,n){return D(t)>M&&(t-=Math.round(t/B0)*B0),[t,n]}function v1(t,n,e){return(t%=B0)?n||e?m1(x1(t),w1(n,e)):x1(t):n||e?w1(n,e):y1}function b1(e){return function(t,n){return D(t+=e)>M&&(t-=Math.round(t/B0)*B0),[t,n]}}function x1(t){var n=b1(t);return n.invert=b1(-t),n}function w1(t,n){var a=E(t),r=z(t),o=E(n),s=z(n);function e(t,n){var e=E(n),i=E(t)*e,t=z(t)*e,e=z(n),n=e*a+i*r;return[P0(t*o-n*s,i*a-e*r),$0(n*o+t*s)]}return e.invert=function(t,n){var e=E(n),i=E(t)*e,t=z(t)*e,e=z(n),n=e*o-t*s;return[P0(t*o+e*s,i*a+n*r),$0(n*a-i*r)]},e}function S1(n){function t(t){return(t=n(t[0]*B,t[1]*B))[0]*=D0,t[1]*=D0,t}return n=v1(n[0]*B,n[1]*B,2<n.length?n[2]*B:0),t.invert=function(t){return(t=n.invert(t[0]*B,t[1]*B))[0]*=D0,t[1]*=D0,t},t}
5115
5111
  // Generates a circle centered at [0°, 0°], with a given radius and precision.
5116
- function S1(t,n,e,i,a,r){if(e){var o=E(n),s=z(n),l=i*e;null==a?(a=n+i*T0,r=n-l/2):(a=C1(o,a),r=C1(o,r),(0<i?a<r:r<a)&&(a+=i*T0));for(var u,h=a;0<i?r<h:h<r;h-=l)u=wf([o,-s*E(h),-s*z(h)]),t.point(u[0],u[1])}}
5112
+ function C1(t,n,e,i,a,r){if(e){var o=E(n),s=z(n),l=i*e;null==a?(a=n+i*B0,r=n-l/2):(a=k1(o,a),r=k1(o,r),(0<i?a<r:r<a)&&(a+=i*B0));for(var u,h=a;0<i?r<h:h<r;h-=l)u=Sf([o,-s*E(h),-s*z(h)]),t.point(u[0],u[1])}}
5117
5113
  // Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].
5118
- function C1(t,n){(n=Sf(n))[0]-=t,Ef(n);t=G0(-n[1]);return((-n[2]<0?-t:t)+T0-T)%T0}function k1(){var i,a,r=p1([0,0]),o=p1(90),s=p1(2),l={point:function(t,n){i.push(t=a(t,n)),t[0]*=B0,t[1]*=B0}};function n(){var t=r.apply(this,arguments),n=o.apply(this,arguments)*B,e=s.apply(this,arguments)*B;return i=[],a=y1(-t[0]*B,-t[1]*B,0).invert,S1(l,n,e,1),t={type:"Polygon",coordinates:[i]},i=a=null,t}return n.center=function(t){return arguments.length?(r="function"==typeof t?t:p1([+t[0],+t[1]]),n):r},n.radius=function(t){return arguments.length?(o="function"==typeof t?t:p1(+t),n):o},n.precision=function(t){return arguments.length?(s="function"==typeof t?t:p1(+t),n):s},n}function A1(){var i,n=[];return{point:function(t,n,e){i.push([t,n,e])},lineStart:function(){n.push(i=[])},lineEnd:q0,rejoin:function(){1<n.length&&n.push(n.pop().concat(n.shift()))},result:function(){var t=n;return n=[],i=null,t}}}function M1(t,n){return D(t[0]-n[0])<T&&D(t[1]-n[1])<T}function E1(t,n,e,i){this.x=t,this.z=n,this.o=e,// another intersection
5114
+ function k1(t,n){(n=Cf(n))[0]-=t,zf(n);t=K0(-n[1]);return((-n[2]<0?-t:t)+B0-T)%B0}function A1(){var i,a,r=_1([0,0]),o=_1(90),s=_1(2),l={point:function(t,n){i.push(t=a(t,n)),t[0]*=D0,t[1]*=D0}};function n(){var t=r.apply(this,arguments),n=o.apply(this,arguments)*B,e=s.apply(this,arguments)*B;return i=[],a=v1(-t[0]*B,-t[1]*B,0).invert,C1(l,n,e,1),t={type:"Polygon",coordinates:[i]},i=a=null,t}return n.center=function(t){return arguments.length?(r="function"==typeof t?t:_1([+t[0],+t[1]]),n):r},n.radius=function(t){return arguments.length?(o="function"==typeof t?t:_1(+t),n):o},n.precision=function(t){return arguments.length?(s="function"==typeof t?t:_1(+t),n):s},n}function M1(){var i,n=[];return{point:function(t,n,e){i.push([t,n,e])},lineStart:function(){n.push(i=[])},lineEnd:U0,rejoin:function(){1<n.length&&n.push(n.pop().concat(n.shift()))},result:function(){var t=n;return n=[],i=null,t}}}function E1(t,n){return D(t[0]-n[0])<T&&D(t[1]-n[1])<T}function z1(t,n,e,i){this.x=t,this.z=n,this.o=e,// another intersection
5119
5115
  this.e=i,// is an entry?
5120
5116
  this.v=!1,// visited
5121
5117
  this.n=this.p=null}
5122
5118
  // A generalized polygon clipping algorithm: given a polygon that has been cut
5123
5119
  // into its visible line segments, and rejoins the segments by interpolating
5124
5120
  // along the clip edge.
5125
- function z1(t,n,e,i,r){var o,a,s=[],l=[];if(t.forEach(function(t){if(!((n=t.length-1)<=0)){var n,e,i=t[0],a=t[n];if(M1(i,a)){if(!i[2]&&!a[2]){for(r.lineStart(),o=0;o<n;++o)r.point((i=t[o])[0],i[1]);return void r.lineEnd()}
5121
+ function T1(t,n,e,i,r){var o,a,s=[],l=[];if(t.forEach(function(t){if(!((n=t.length-1)<=0)){var n,e,i=t[0],a=t[n];if(E1(i,a)){if(!i[2]&&!a[2]){for(r.lineStart(),o=0;o<n;++o)r.point((i=t[o])[0],i[1]);return void r.lineEnd()}
5126
5122
  // handle degenerate cases by moving the point
5127
- a[0]+=2*T}s.push(e=new E1(i,t,null,!0)),l.push(e.o=new E1(i,null,e,!1)),s.push(e=new E1(a,t,null,!1)),l.push(e.o=new E1(a,null,e,!0))}}),s.length){for(l.sort(n),T1(s),T1(l),o=0,a=l.length;o<a;++o)l[o].e=e=!e;for(var u,h,c=s[0];;){for(
5123
+ a[0]+=2*T}s.push(e=new z1(i,t,null,!0)),l.push(e.o=new z1(i,null,e,!1)),s.push(e=new z1(a,t,null,!1)),l.push(e.o=new z1(a,null,e,!0))}}),s.length){for(l.sort(n),B1(s),B1(l),o=0,a=l.length;o<a;++o)l[o].e=e=!e;for(var u,h,c=s[0];;){for(
5128
5124
  // Find first unvisited intersection.
5129
- var g=c,d=!0;g.v;)if((g=g.n)===c)return;u=g.z,r.lineStart();do{if(g.v=g.o.v=!0,g.e){if(d)for(o=0,a=u.length;o<a;++o)r.point((h=u[o])[0],h[1]);else i(g.x,g.n.x,1,r);g=g.n}else{if(d)for(u=g.p.z,o=u.length-1;0<=o;--o)r.point((h=u[o])[0],h[1]);else i(g.x,g.p.x,-1,r);g=g.p}}while(u=(g=g.o).z,d=!d,!g.v);r.lineEnd()}}}function T1(t){if(n=t.length){for(var n,e,i=0,a=t[0];++i<n;)a.n=e=t[i],e.p=a,a=e;a.n=e=t[0],e.p=a}}function B1(t){return D(t[0])<=M?t[0]:j0(t[0])*((D(t[0])+M)%T0-M)}function D1(t,n){var e=B1(n),i=n[1],n=z(i),a=[z(e),-E(e),0],r=0,o=0,s=new je;1===n?i=E0+T:-1===n&&(i=-E0-T);for(var l=0,u=t.length;l<u;++l)if(c=(h=t[l]).length)for(var h,c,g=h[c-1],d=B1(g),f=g[1]/2+z0,p=z(f),_=E(f),m=0;m<c;++m,d=v,p=x,_=b,g=y){var y=h[m],v=B1(y),b=y[1]/2+z0,x=z(b),b=E(b),w=v-d,S=0<=w?1:-1,C=S*w,k=M<C,A=p*x;s.add(N0(A*S*z(C),_*b+A*E(C))),r+=k?w+S*T0:w,
5125
+ var g=c,d=!0;g.v;)if((g=g.n)===c)return;u=g.z,r.lineStart();do{if(g.v=g.o.v=!0,g.e){if(d)for(o=0,a=u.length;o<a;++o)r.point((h=u[o])[0],h[1]);else i(g.x,g.n.x,1,r);g=g.n}else{if(d)for(u=g.p.z,o=u.length-1;0<=o;--o)r.point((h=u[o])[0],h[1]);else i(g.x,g.p.x,-1,r);g=g.p}}while(u=(g=g.o).z,d=!d,!g.v);r.lineEnd()}}}function B1(t){if(n=t.length){for(var n,e,i=0,a=t[0];++i<n;)a.n=e=t[i],e.p=a,a=e;a.n=e=t[0],e.p=a}}function D1(t){return D(t[0])<=M?t[0]:I0(t[0])*((D(t[0])+M)%B0-M)}function N1(t,n){var e=D1(n),i=n[1],n=z(i),a=[z(e),-E(e),0],r=0,o=0,s=new je;1===n?i=z0+T:-1===n&&(i=-z0-T);for(var l=0,u=t.length;l<u;++l)if(c=(h=t[l]).length)for(var h,c,g=h[c-1],d=D1(g),f=g[1]/2+T0,p=z(f),_=E(f),m=0;m<c;++m,d=v,p=x,_=b,g=y){var y=h[m],v=D1(y),b=y[1]/2+T0,x=z(b),b=E(b),w=v-d,S=0<=w?1:-1,C=S*w,k=M<C,A=p*x;s.add(P0(A*S*z(C),_*b+A*E(C))),r+=k?w+S*B0:w,
5130
5126
  // Are the longitudes either side of the point’s meridian (lambda),
5131
5127
  // and are the latitudes smaller than the parallel (phi)?
5132
- k^e<=d^e<=v&&(Ef(A=kf(Sf(g),Sf(y))),Ef(C=kf(a,A)),(S=(k^0<=w?-1:1)*K0(C[2]))<i||i===S&&(A[0]||A[1]))&&(o+=k^0<=w?1:-1)}
5128
+ k^e<=d^e<=v&&(zf(A=Af(Cf(g),Cf(y))),zf(C=Af(a,A)),(S=(k^0<=w?-1:1)*$0(C[2]))<i||i===S&&(A[0]||A[1]))&&(o+=k^0<=w?1:-1)}
5133
5129
  // First, determine whether the South pole is inside or outside:
5134
5130
  //
5135
5131
  // It is inside if:
@@ -5140,90 +5136,90 @@ k^e<=d^e<=v&&(Ef(A=kf(Sf(g),Sf(y))),Ef(C=kf(a,A)),(S=(k^0<=w?-1:1)*K0(C[2]))<i||
5140
5136
  // Second, count the (signed) number of times a segment crosses a lambda
5141
5137
  // from the point to the South pole. If it is zero, then the point is the
5142
5138
  // same side as the South pole.
5143
- return(r<-1e-6||r<T&&s<-1e-12)^1&o}function N1(_,m,y,v){return function(s){var l,u,h,e=m(s),c=A1(),g=m(c),d=!1,n={point:i,lineStart:a,lineEnd:r,polygonStart:function(){n.point=f,n.lineStart=o,n.lineEnd=p,u=[],l=[]},polygonEnd:function(){n.point=i,n.lineStart=a,n.lineEnd=r,u=ii(u);var t=D1(l,v);u.length?(d||(s.polygonStart(),d=!0),z1(u,L1,t,y,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),y(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),u=l=null},sphere:function(){s.polygonStart(),s.lineStart(),y(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function i(t,n){_(t,n)&&s.point(t,n)}function t(t,n){e.point(t,n)}function a(){n.point=t,e.lineStart()}function r(){n.point=i,e.lineEnd()}function f(t,n){h.push([t,n]),g.point(t,n)}function o(){g.lineStart(),h=[]}function p(){f(h[0][0],h[0][1]),g.lineEnd();var t,n,e,i,a=g.clean(),r=c.result(),o=r.length;if(h.pop(),l.push(h),h=null,o)
5139
+ return(r<-1e-6||r<T&&s<-1e-12)^1&o}function P1(_,m,y,v){return function(s){var l,u,h,e=m(s),c=M1(),g=m(c),d=!1,n={point:i,lineStart:a,lineEnd:r,polygonStart:function(){n.point=f,n.lineStart=o,n.lineEnd=p,u=[],l=[]},polygonEnd:function(){n.point=i,n.lineStart=a,n.lineEnd=r,u=ii(u);var t=N1(l,v);u.length?(d||(s.polygonStart(),d=!0),T1(u,F1,t,y,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),y(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),u=l=null},sphere:function(){s.polygonStart(),s.lineStart(),y(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function i(t,n){_(t,n)&&s.point(t,n)}function t(t,n){e.point(t,n)}function a(){n.point=t,e.lineStart()}function r(){n.point=i,e.lineEnd()}function f(t,n){h.push([t,n]),g.point(t,n)}function o(){g.lineStart(),h=[]}function p(){f(h[0][0],h[0][1]),g.lineEnd();var t,n,e,i,a=g.clean(),r=c.result(),o=r.length;if(h.pop(),l.push(h),h=null,o)
5144
5140
  // No intersections.
5145
5141
  if(1&a){if(0<(n=(e=r[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<n;++t)s.point((i=e[t])[0],i[1]);s.lineEnd()}}else
5146
5142
  // Rejoin connected segments.
5147
5143
  // TODO reuse ringBuffer.rejoin()?
5148
- 1<o&&2&a&&r.push(r.pop().concat(r.shift())),u.push(r.filter(P1))}return n}}function P1(t){return 1<t.length}
5144
+ 1<o&&2&a&&r.push(r.pop().concat(r.shift())),u.push(r.filter(L1))}return n}}function L1(t){return 1<t.length}
5149
5145
  // Intersections are sorted along the clip edge. For both antimeridian cutting
5150
5146
  // and circle clipping, the same comparison is used.
5151
- function L1(t,n){return((t=t.x)[0]<0?t[1]-E0-T:E0-t[1])-((n=n.x)[0]<0?n[1]-E0-T:E0-n[1])}m1.invert=m1;var F1=N1(function(){return 1},
5147
+ function F1(t,n){return((t=t.x)[0]<0?t[1]-z0-T:z0-t[1])-((n=n.x)[0]<0?n[1]-z0-T:z0-n[1])}y1.invert=y1;var O1=P1(function(){return 1},
5152
5148
  // Takes a line and cuts into visible segments. Return values: 0 - there were
5153
5149
  // intersections or the line was empty; 1 - no intersections; 2 - there were
5154
5150
  // intersections, and the first and last segments should be rejoined.
5155
5151
  function(u){var h,c=NaN,g=NaN,d=NaN;// no intersections
5156
- return{lineStart:function(){u.lineStart(),h=1},point:function(t,n){var e,i,a,r,o,s=0<t?M:-M,l=D(t-c);D(l-M)<T?(u.point(c,g=0<(g+n)/2?E0:-E0),u.point(d,g),u.lineEnd(),u.lineStart(),u.point(s,g),u.point(t,g),h=0):d!==s&&M<=l&&(D(c-d)<T&&(c-=d*T),// handle degeneracies
5157
- D(t-s)<T&&(t-=s*T),l=g,a=n,o=z((e=c)-(i=t)),g=D(o)>T?D0((z(l)*(r=E(a))*z(i)-z(a)*(i=E(l))*z(e))/(i*r*o)):(l+a)/2,u.point(d,g),u.lineEnd(),u.lineStart(),u.point(s,g),h=0),u.point(c=t,g=n),d=s},lineEnd:function(){u.lineEnd(),c=g=NaN},clean:function(){return 2-h;// if intersections, rejoin first and last segments
5158
- }}},function(t,n,e,i){var a;null==t?(a=e*E0,i.point(-M,a),i.point(0,a),i.point(M,a),i.point(M,0),i.point(M,-a),i.point(0,-a),i.point(-M,-a),i.point(-M,0),i.point(-M,a)):D(t[0]-n[0])>T?(t=t[0]<n[0]?M:-M,a=e*t/2,i.point(-t,a),i.point(0,a),i.point(t,a)):i.point(n[0],n[1])},[-M,-E0]);function O1(a){var p=E(a),r=2*B,c=0<p,g=D(p)>T;// TODO optimise for this common case
5152
+ return{lineStart:function(){u.lineStart(),h=1},point:function(t,n){var e,i,a,r,o,s=0<t?M:-M,l=D(t-c);D(l-M)<T?(u.point(c,g=0<(g+n)/2?z0:-z0),u.point(d,g),u.lineEnd(),u.lineStart(),u.point(s,g),u.point(t,g),h=0):d!==s&&M<=l&&(D(c-d)<T&&(c-=d*T),// handle degeneracies
5153
+ D(t-s)<T&&(t-=s*T),l=g,a=n,o=z((e=c)-(i=t)),g=D(o)>T?N0((z(l)*(r=E(a))*z(i)-z(a)*(i=E(l))*z(e))/(i*r*o)):(l+a)/2,u.point(d,g),u.lineEnd(),u.lineStart(),u.point(s,g),h=0),u.point(c=t,g=n),d=s},lineEnd:function(){u.lineEnd(),c=g=NaN},clean:function(){return 2-h;// if intersections, rejoin first and last segments
5154
+ }}},function(t,n,e,i){var a;null==t?(a=e*z0,i.point(-M,a),i.point(0,a),i.point(M,a),i.point(M,0),i.point(M,-a),i.point(0,-a),i.point(-M,-a),i.point(-M,0),i.point(-M,a)):D(t[0]-n[0])>T?(t=t[0]<n[0]?M:-M,a=e*t/2,i.point(-t,a),i.point(0,a),i.point(t,a)):i.point(n[0],n[1])},[-M,-z0]);function R1(a){var p=E(a),r=2*B,c=0<p,g=D(p)>T;// TODO optimise for this common case
5159
5155
  function d(t,n){return E(t)*E(n)>p}
5160
5156
  // Takes a line and cuts into visible segments. Return values used for polygon
5161
5157
  // clipping: 0 - there were intersections or the line was empty; 1 - no
5162
5158
  // intersections 2 - there were intersections, and the first and last segments
5163
5159
  // should be rejoined.
5164
5160
  // Intersects the great circle between a and b with the clip circle.
5165
- function f(t,n,e){var i,a,r,o,s,l,u,h=[1,0,0],c=kf(Sf(t),Sf(n)),g=Cf(c,c),d=c[0],f=g-d*d;
5161
+ function f(t,n,e){var i,a,r,o,s,l,u,h=[1,0,0],c=Af(Cf(t),Cf(n)),g=kf(c,c),d=c[0],f=g-d*d;
5166
5162
  // We have two planes, n1.p = d1 and n2.p = d2.
5167
5163
  // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).
5168
5164
  // Two polar points.
5169
- return f?(i=kf(h,c),Af(h=Mf(h,p*g/f),Mf(c,-p*d/f)),(f=(c=Cf(h,g=i))*c-(d=Cf(g,g))*(Cf(h,h)-1))<0?void 0:(Af(f=Mf(g,(-c-(i=I0(f)))/d),h),f=wf(f),e?(
5165
+ return f?(i=Af(h,c),Mf(h=Ef(h,p*g/f),Ef(c,-p*d/f)),(f=(c=kf(h,g=i))*c-(d=kf(g,g))*(kf(h,h)-1))<0?void 0:(Mf(f=Ef(g,(-c-(i=H0(f)))/d),h),f=Sf(f),e?(
5170
5166
  // Check that the first point is between a and b.
5171
- a=t[0],r=n[0],o=t[1],n=n[1],r<a&&(u=a,a=r,r=u),!(l=D((s=r-a)-M)<T)&&n<o&&(u=o,o=n,n=u),(l||s<T?l?0<o+n^f[1]<(D(f[0]-a)<T?o:n):o<=f[1]&&f[1]<=n:M<s^(a<=f[0]&&f[0]<=r))?(Af(u=Mf(g,(-c+i)/d),h),[f,wf(u)]):void 0):f)):!e&&t}
5167
+ a=t[0],r=n[0],o=t[1],n=n[1],r<a&&(u=a,a=r,r=u),!(l=D((s=r-a)-M)<T)&&n<o&&(u=o,o=n,n=u),(l||s<T?l?0<o+n^f[1]<(D(f[0]-a)<T?o:n):o<=f[1]&&f[1]<=n:M<s^(a<=f[0]&&f[0]<=r))?(Mf(u=Ef(g,(-c+i)/d),h),[f,Sf(u)]):void 0):f)):!e&&t}
5172
5168
  // Generates a 4-bit vector representing the location of a point relative to
5173
5169
  // the small circle's bounding box.
5174
5170
  function _(t,n){var e=c?a:M-a,i=0;// above
5175
5171
  return t<-e?i|=1:e<t&&(i|=2),// right
5176
- n<-e?i|=4:e<n&&(i|=8),i}return N1(d,function(r){var o,s,l,u,h;// no intersections
5177
- return{lineStart:function(){u=l=!1,h=1},point:function(t,n){var e,i=[t,n],a=d(t,n),t=c?a?0:_(t,n):a?_(t+(t<0?M:-M),n):0;!o&&(u=l=a)&&r.lineStart(),a===l||(e=f(o,i))&&!M1(o,e)&&!M1(i,e)||(i[2]=1),a!==l?(h=0,a?(
5172
+ n<-e?i|=4:e<n&&(i|=8),i}return P1(d,function(r){var o,s,l,u,h;// no intersections
5173
+ return{lineStart:function(){u=l=!1,h=1},point:function(t,n){var e,i=[t,n],a=d(t,n),t=c?a?0:_(t,n):a?_(t+(t<0?M:-M),n):0;!o&&(u=l=a)&&r.lineStart(),a===l||(e=f(o,i))&&!E1(o,e)&&!E1(i,e)||(i[2]=1),a!==l?(h=0,a?(
5178
5174
  // outside going in
5179
5175
  r.lineStart(),e=f(i,o),r.point(e[0],e[1])):(
5180
5176
  // inside going out
5181
5177
  e=f(o,i),r.point(e[0],e[1],2),r.lineEnd()),o=e):g&&o&&c^a&&(
5182
5178
  // If the codes for two points are different, or are both zero,
5183
5179
  // and there this segment intersects with the small circle.
5184
- t&s||!(n=f(i,o,!0))||(h=0,c?(r.lineStart(),r.point(n[0][0],n[0][1]),r.point(n[1][0],n[1][1]),r.lineEnd()):(r.point(n[1][0],n[1][1]),r.lineEnd(),r.lineStart(),r.point(n[0][0],n[0][1],3)))),!a||o&&M1(o,i)||r.point(i[0],i[1]),o=i,l=a,s=t},lineEnd:function(){l&&r.lineEnd(),o=null},
5180
+ t&s||!(n=f(i,o,!0))||(h=0,c?(r.lineStart(),r.point(n[0][0],n[0][1]),r.point(n[1][0],n[1][1]),r.lineEnd()):(r.point(n[1][0],n[1][1]),r.lineEnd(),r.lineStart(),r.point(n[0][0],n[0][1],3)))),!a||o&&E1(o,i)||r.point(i[0],i[1]),o=i,l=a,s=t},lineEnd:function(){l&&r.lineEnd(),o=null},
5185
5181
  // Rejoin first and last segments if there were intersections and the first
5186
5182
  // and last points were visible.
5187
- clean:function(){return h|(u&&l)<<1}}},function(t,n,e,i){S1(i,a,r,e,t,n)},c?[0,-a]:[-M,a-M])}var R1,j1,I1,H1,G1=1e9,K1=-1e9;
5183
+ clean:function(){return h|(u&&l)<<1}}},function(t,n,e,i){C1(i,a,r,e,t,n)},c?[0,-a]:[-M,a-M])}var j1,I1,H1,G1,K1=1e9,$1=-1e9;
5188
5184
  // TODO Use d3-polygon’s polygonContains here for the ring check?
5189
5185
  // TODO Eliminate duplicate buffering in clipBuffer and polygon.push?
5190
- function $1(m,y,v,b){function x(t,n){return m<=t&&t<=v&&y<=n&&n<=b}function w(t,n,e,i){var a=0,r=0;if(null==t||(a=o(t,e))!==(r=o(n,e))||s(t,n)<0^0<e)for(;i.point(0===a||3===a?m:v,1<a?b:y),(a=(a+e+4)%4)!==r;);else i.point(n[0],n[1])}function o(t,n){return D(t[0]-m)<T?0<n?0:3:D(t[0]-v)<T?0<n?2:1:D(t[1]-y)<T?0<n?1:0:0<n?3:2;// abs(p[1] - y1) < epsilon
5191
- }function S(t,n){return s(t.x,n.x)}function s(t,n){var e=o(t,1),i=o(n,1);return e!==i?e-i:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(i){var a,c,r,o,s,l,u,h,g,d,f,p=i,t=A1(),n={point:e,lineStart:function(){n.point=_,c&&c.push(r=[]);d=!0,g=!1,u=h=NaN}
5186
+ function q1(m,y,v,b){function x(t,n){return m<=t&&t<=v&&y<=n&&n<=b}function w(t,n,e,i){var a=0,r=0;if(null==t||(a=o(t,e))!==(r=o(n,e))||s(t,n)<0^0<e)for(;i.point(0===a||3===a?m:v,1<a?b:y),(a=(a+e+4)%4)!==r;);else i.point(n[0],n[1])}function o(t,n){return D(t[0]-m)<T?0<n?0:3:D(t[0]-v)<T?0<n?2:1:D(t[1]-y)<T?0<n?1:0:0<n?3:2;// abs(p[1] - y1) < epsilon
5187
+ }function S(t,n){return s(t.x,n.x)}function s(t,n){var e=o(t,1),i=o(n,1);return e!==i?e-i:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(i){var a,c,r,o,s,l,u,h,g,d,f,p=i,t=M1(),n={point:e,lineStart:function(){n.point=_,c&&c.push(r=[]);d=!0,g=!1,u=h=NaN}
5192
5188
  // TODO rather than special-case polygons, simply handle them separately.
5193
5189
  // Ideally, coincident intersection points should be jittered to avoid
5194
5190
  // clipping issues.
5195
5191
  ,lineEnd:function(){a&&(_(o,s),l&&g&&t.rejoin(),a.push(t.result()));n.point=e,g&&p.lineEnd()},polygonStart:
5196
5192
  // Buffer geometry within a polygon and then clip it en masse.
5197
- function(){p=t,a=[],c=[],f=!0},polygonEnd:function(){var t=(()=>{for(var t=0,n=0,e=c.length;n<e;++n)for(var i,a,r=c[n],o=1,s=r.length,l=r[0],u=l[0],h=l[1];o<s;++o)i=u,a=h,l=r[o],u=l[0],h=l[1],a<=b?b<h&&(h-a)*(m-i)<(u-i)*(b-a)&&++t:h<=b&&(u-i)*(b-a)<(h-a)*(m-i)&&--t;return t})(),n=f&&t,e=(a=ii(a)).length;(n||e)&&(i.polygonStart(),n&&(i.lineStart(),w(null,null,1,i),i.lineEnd()),e&&z1(a,S,t,w,i),i.polygonEnd());p=i,a=c=r=null}};function e(t,n){x(t,n)&&p.point(t,n)}function _(t,n){var e,i,a=x(t,n);c&&r.push([t,n]),d?(o=t,s=n,d=!1,(l=a)&&(p.lineStart(),p.point(t,n))):a&&g?p.point(t,n):((t,n,e,i,a,r)=>{var o=t[0],s=t[1],l=0,u=1,h=n[0]-o,c=n[1]-s,e=e-o;if(h||!(0<e)){if(e/=h,h<0){if(e<l)return;e<u&&(u=e)}else if(0<h){if(u<e)return;l<e&&(l=e)}if(e=a-o,h||!(e<0)){if(e/=h,h<0){if(u<e)return;l<e&&(l=e)}else if(0<h){if(e<l)return;e<u&&(u=e)}if(e=i-s,c||!(0<e)){if(e/=c,c<0){if(e<l)return;e<u&&(u=e)}else if(0<c){if(u<e)return;l<e&&(l=e)}if(e=r-s,c||!(e<0)){if(e/=c,c<0){if(u<e)return;l<e&&(l=e)}else if(0<c){if(e<l)return;e<u&&(u=e)}return 0<l&&(t[0]=o+l*h,t[1]=s+l*c),u<1&&(n[0]=o+u*h,n[1]=s+u*c),1}}}}})(e=[u=Math.max(K1,Math.min(G1,u)),h=Math.max(K1,Math.min(G1,h))],i=[t=Math.max(K1,Math.min(G1,t)),n=Math.max(K1,Math.min(G1,n))],m,y,v,b)?(g||(p.lineStart(),p.point(e[0],e[1])),p.point(i[0],i[1]),a||p.lineEnd(),f=!1):a&&(p.lineStart(),p.point(t,n),f=!1),u=t,h=n,g=a}return n}}var q1={sphere:q0,point:q0,lineStart:function(){q1.point=W1,q1.lineEnd=U1},lineEnd:q0,polygonStart:q0,polygonEnd:q0};function U1(){q1.point=q1.lineEnd=q0}function W1(t,n){j1=t*=B,I1=z(n*=B),H1=E(n),q1.point=Y1}function Y1(t,n){t*=B;var e=z(n*=B),n=E(n),i=D(t-j1),a=E(i),i=n*z(i),r=H1*e-I1*n*a,a=I1*e+H1*n*a;R1.add(N0(I0(i*i+r*r),a)),j1=t,I1=e,H1=n}function V1(t){return R1=new je,X0(t,q1),+R1}var Z1=[null,null],X1={type:"LineString",coordinates:Z1};function J1(t,n){return Z1[0]=t,Z1[1]=n,V1(X1)}var Q1={Feature:function(t,n){return np(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,i=-1,a=e.length;++i<a;)if(np(e[i].geometry,n))return!0;return!1}},tp={Sphere:function(){return!0},Point:function(t,n){return ep(t.coordinates,n)},MultiPoint:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)if(ep(e[i],n))return!0;return!1},LineString:function(t,n){return ip(t.coordinates,n)},MultiLineString:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)if(ip(e[i],n))return!0;return!1},Polygon:function(t,n){return ap(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)if(ap(e[i],n))return!0;return!1},GeometryCollection:function(t,n){for(var e=t.geometries,i=-1,a=e.length;++i<a;)if(np(e[i],n))return!0;return!1}};function np(t,n){return!(!t||!tp.hasOwnProperty(t.type))&&tp[t.type](t,n)}function ep(t,n){return 0===J1(t,n)}function ip(t,n){for(var e,i,a,r=0,o=t.length;r<o;r++){if(0===(i=J1(t[r],n)))return!0;if(0<r&&0<(a=J1(t[r],t[r-1]))&&e<=a&&i<=a&&(e+i-a)*(1-Math.pow((e-i)/a,2))<M0*a)return!0;e=i}return!1}function ap(t,n){return!!D1(t.map(rp),op(n))}function rp(t){return(t=t.map(op)).pop(),t}function op(t){return[t[0]*B,t[1]*B]}function sp(t,n,e){var i=Lt(t,n-T,e).concat(n);return function(n){return i.map(function(t){return[n,t]})}}function lp(t,n,e){var i=Lt(t,n-T,e).concat(n);return function(n){return i.map(function(t){return[t,n]})}}function up(){var n,e,i,a,r,o,s,l,u,h,c,g,d=10,f=d,p=90,_=360,m=2.5;function y(){return{type:"MultiLineString",coordinates:t()}}function t(){return Lt(P0(a/p)*p,i,p).map(c).concat(Lt(P0(l/_)*_,s,_).map(g)).concat(Lt(P0(e/d)*d,n,d).filter(function(t){return D(t%p)>T}).map(u)).concat(Lt(P0(o/f)*f,r,f).filter(function(t){return D(t%_)>T}).map(h))}return y.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[c(a).concat(g(s).slice(1),c(i).reverse().slice(1),g(l).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],l=+t[0][1],s=+t[1][1],i<a&&(t=a,a=i,i=t),s<l&&(t=l,l=s,s=t),y.precision(m)):[[a,l],[i,s]]},y.extentMinor=function(t){return arguments.length?(e=+t[0][0],n=+t[1][0],o=+t[0][1],r=+t[1][1],n<e&&(t=e,e=n,n=t),r<o&&(t=o,o=r,r=t),y.precision(m)):[[e,o],[n,r]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(p=+t[0],_=+t[1],y):[p,_]},y.stepMinor=function(t){return arguments.length?(d=+t[0],f=+t[1],y):[d,f]},y.precision=function(t){return arguments.length?(m=+t,u=sp(o,r,90),h=lp(e,n,m),c=sp(l,s,90),g=lp(a,i,m),y):m},y.extentMajor([[-180,-90+T],[180,90-T]]).extentMinor([[-180,-80-T],[180,80+T]])}function hp(t,n){var e=t[0]*B,i=t[1]*B,t=n[0]*B,n=n[1]*B,a=E(i),r=z(i),o=E(n),s=z(n),l=a*E(e),u=a*z(e),h=o*E(t),c=o*z(t),g=2*K0(I0($0(n-i)+a*o*$0(t-e))),d=z(g),n=g?function(t){var n=z(t*=g)/d,t=z(g-t)/d,e=t*l+n*h,i=t*u+n*c,t=t*r+n*s;return[N0(i,e)*B0,N0(t,I0(e*e+i*i))*B0]}:function(){return[e*B0,i*B0]};return n.distance=g,n}var cp,gp,dp,fp,pp=t=>t,_p=new je,mp=new je,yp={point:q0,lineStart:q0,lineEnd:q0,polygonStart:function(){yp.lineStart=vp,yp.lineEnd=wp},polygonEnd:function(){yp.lineStart=yp.lineEnd=yp.point=q0,_p.add(D(mp)),mp=new je},result:function(){var t=_p/2;return _p=new je,t}};function vp(){yp.point=bp}function bp(t,n){yp.point=xp,cp=dp=t,gp=fp=n}function xp(t,n){mp.add(fp*t-dp*n),dp=t,fp=n}function wp(){xp(cp,gp)}var Sp=1/0,Cp=Sp,kp=-Sp,Ap=kp,Mp={point:function(t,n){t<Sp&&(Sp=t);kp<t&&(kp=t);n<Cp&&(Cp=n);Ap<n&&(Ap=n)}
5193
+ function(){p=t,a=[],c=[],f=!0},polygonEnd:function(){var t=(()=>{for(var t=0,n=0,e=c.length;n<e;++n)for(var i,a,r=c[n],o=1,s=r.length,l=r[0],u=l[0],h=l[1];o<s;++o)i=u,a=h,l=r[o],u=l[0],h=l[1],a<=b?b<h&&(h-a)*(m-i)<(u-i)*(b-a)&&++t:h<=b&&(u-i)*(b-a)<(h-a)*(m-i)&&--t;return t})(),n=f&&t,e=(a=ii(a)).length;(n||e)&&(i.polygonStart(),n&&(i.lineStart(),w(null,null,1,i),i.lineEnd()),e&&T1(a,S,t,w,i),i.polygonEnd());p=i,a=c=r=null}};function e(t,n){x(t,n)&&p.point(t,n)}function _(t,n){var e,i,a=x(t,n);c&&r.push([t,n]),d?(o=t,s=n,d=!1,(l=a)&&(p.lineStart(),p.point(t,n))):a&&g?p.point(t,n):((t,n,e,i,a,r)=>{var o=t[0],s=t[1],l=0,u=1,h=n[0]-o,c=n[1]-s,e=e-o;if(h||!(0<e)){if(e/=h,h<0){if(e<l)return;e<u&&(u=e)}else if(0<h){if(u<e)return;l<e&&(l=e)}if(e=a-o,h||!(e<0)){if(e/=h,h<0){if(u<e)return;l<e&&(l=e)}else if(0<h){if(e<l)return;e<u&&(u=e)}if(e=i-s,c||!(0<e)){if(e/=c,c<0){if(e<l)return;e<u&&(u=e)}else if(0<c){if(u<e)return;l<e&&(l=e)}if(e=r-s,c||!(e<0)){if(e/=c,c<0){if(u<e)return;l<e&&(l=e)}else if(0<c){if(e<l)return;e<u&&(u=e)}return 0<l&&(t[0]=o+l*h,t[1]=s+l*c),u<1&&(n[0]=o+u*h,n[1]=s+u*c),1}}}}})(e=[u=Math.max($1,Math.min(K1,u)),h=Math.max($1,Math.min(K1,h))],i=[t=Math.max($1,Math.min(K1,t)),n=Math.max($1,Math.min(K1,n))],m,y,v,b)?(g||(p.lineStart(),p.point(e[0],e[1])),p.point(i[0],i[1]),a||p.lineEnd(),f=!1):a&&(p.lineStart(),p.point(t,n),f=!1),u=t,h=n,g=a}return n}}var U1={sphere:U0,point:U0,lineStart:function(){U1.point=Y1,U1.lineEnd=W1},lineEnd:U0,polygonStart:U0,polygonEnd:U0};function W1(){U1.point=U1.lineEnd=U0}function Y1(t,n){I1=t*=B,H1=z(n*=B),G1=E(n),U1.point=V1}function V1(t,n){t*=B;var e=z(n*=B),n=E(n),i=D(t-I1),a=E(i),i=n*z(i),r=G1*e-H1*n*a,a=H1*e+G1*n*a;j1.add(P0(H0(i*i+r*r),a)),I1=t,H1=e,G1=n}function Z1(t){return j1=new je,J0(t,U1),+j1}var X1=[null,null],J1={type:"LineString",coordinates:X1};function Q1(t,n){return X1[0]=t,X1[1]=n,Z1(J1)}var tp={Feature:function(t,n){return ep(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,i=-1,a=e.length;++i<a;)if(ep(e[i].geometry,n))return!0;return!1}},np={Sphere:function(){return!0},Point:function(t,n){return ip(t.coordinates,n)},MultiPoint:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)if(ip(e[i],n))return!0;return!1},LineString:function(t,n){return ap(t.coordinates,n)},MultiLineString:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)if(ap(e[i],n))return!0;return!1},Polygon:function(t,n){return rp(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)if(rp(e[i],n))return!0;return!1},GeometryCollection:function(t,n){for(var e=t.geometries,i=-1,a=e.length;++i<a;)if(ep(e[i],n))return!0;return!1}};function ep(t,n){return!(!t||!np.hasOwnProperty(t.type))&&np[t.type](t,n)}function ip(t,n){return 0===Q1(t,n)}function ap(t,n){for(var e,i,a,r=0,o=t.length;r<o;r++){if(0===(i=Q1(t[r],n)))return!0;if(0<r&&0<(a=Q1(t[r],t[r-1]))&&e<=a&&i<=a&&(e+i-a)*(1-Math.pow((e-i)/a,2))<E0*a)return!0;e=i}return!1}function rp(t,n){return!!N1(t.map(op),sp(n))}function op(t){return(t=t.map(sp)).pop(),t}function sp(t){return[t[0]*B,t[1]*B]}function lp(t,n,e){var i=Lt(t,n-T,e).concat(n);return function(n){return i.map(function(t){return[n,t]})}}function up(t,n,e){var i=Lt(t,n-T,e).concat(n);return function(n){return i.map(function(t){return[t,n]})}}function hp(){var n,e,i,a,r,o,s,l,u,h,c,g,d=10,f=d,p=90,_=360,m=2.5;function y(){return{type:"MultiLineString",coordinates:t()}}function t(){return Lt(L0(a/p)*p,i,p).map(c).concat(Lt(L0(l/_)*_,s,_).map(g)).concat(Lt(L0(e/d)*d,n,d).filter(function(t){return D(t%p)>T}).map(u)).concat(Lt(L0(o/f)*f,r,f).filter(function(t){return D(t%_)>T}).map(h))}return y.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[c(a).concat(g(s).slice(1),c(i).reverse().slice(1),g(l).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],l=+t[0][1],s=+t[1][1],i<a&&(t=a,a=i,i=t),s<l&&(t=l,l=s,s=t),y.precision(m)):[[a,l],[i,s]]},y.extentMinor=function(t){return arguments.length?(e=+t[0][0],n=+t[1][0],o=+t[0][1],r=+t[1][1],n<e&&(t=e,e=n,n=t),r<o&&(t=o,o=r,r=t),y.precision(m)):[[e,o],[n,r]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(p=+t[0],_=+t[1],y):[p,_]},y.stepMinor=function(t){return arguments.length?(d=+t[0],f=+t[1],y):[d,f]},y.precision=function(t){return arguments.length?(m=+t,u=lp(o,r,90),h=up(e,n,m),c=lp(l,s,90),g=up(a,i,m),y):m},y.extentMajor([[-180,-90+T],[180,90-T]]).extentMinor([[-180,-80-T],[180,80+T]])}function cp(t,n){var e=t[0]*B,i=t[1]*B,t=n[0]*B,n=n[1]*B,a=E(i),r=z(i),o=E(n),s=z(n),l=a*E(e),u=a*z(e),h=o*E(t),c=o*z(t),g=2*$0(H0(q0(n-i)+a*o*q0(t-e))),d=z(g),n=g?function(t){var n=z(t*=g)/d,t=z(g-t)/d,e=t*l+n*h,i=t*u+n*c,t=t*r+n*s;return[P0(i,e)*D0,P0(t,H0(e*e+i*i))*D0]}:function(){return[e*D0,i*D0]};return n.distance=g,n}var gp,dp,fp,pp,_p=t=>t,mp=new je,yp=new je,vp={point:U0,lineStart:U0,lineEnd:U0,polygonStart:function(){vp.lineStart=bp,vp.lineEnd=Sp},polygonEnd:function(){vp.lineStart=vp.lineEnd=vp.point=U0,mp.add(D(yp)),yp=new je},result:function(){var t=mp/2;return mp=new je,t}};function bp(){vp.point=xp}function xp(t,n){vp.point=wp,gp=fp=t,dp=pp=n}function wp(t,n){yp.add(pp*t-fp*n),fp=t,pp=n}function Sp(){wp(gp,dp)}var Cp=1/0,kp=Cp,Ap=-Cp,Mp=Ap,Ep={point:function(t,n){t<Cp&&(Cp=t);Ap<t&&(Ap=t);n<kp&&(kp=n);Mp<n&&(Mp=n)}
5198
5194
  // TODO Enforce positive area for exterior, negative area for interior?
5199
- ,lineStart:q0,lineEnd:q0,polygonStart:q0,polygonEnd:q0,result:function(){var t=[[Sp,Cp],[kp,Ap]];return kp=Ap=-(Cp=Sp=1/0),t}};var Ep,zp,Tp,Bp,Dp=0,Np=0,Pp=0,Lp=0,Fp=0,Op=0,Rp=0,jp=0,Ip=0,Hp={point:Gp,lineStart:Kp,lineEnd:Up,polygonStart:function(){Hp.lineStart=Wp,Hp.lineEnd=Yp},polygonEnd:function(){Hp.point=Gp,Hp.lineStart=Kp,Hp.lineEnd=Up},result:function(){var t=Ip?[Rp/Ip,jp/Ip]:Op?[Lp/Op,Fp/Op]:Pp?[Dp/Pp,Np/Pp]:[NaN,NaN];return Dp=Np=Pp=Lp=Fp=Op=Rp=jp=Ip=0,t}};function Gp(t,n){Dp+=t,Np+=n,++Pp}function Kp(){Hp.point=$p}function $p(t,n){Hp.point=qp,Gp(Tp=t,Bp=n)}function qp(t,n){var e=t-Tp,i=n-Bp,e=I0(e*e+i*i);Lp+=e*(Tp+t)/2,Fp+=e*(Bp+n)/2,Op+=e,Gp(Tp=t,Bp=n)}function Up(){Hp.point=Gp}function Wp(){Hp.point=Vp}function Yp(){Zp(Ep,zp)}function Vp(t,n){Hp.point=Zp,Gp(Ep=Tp=t,zp=Bp=n)}function Zp(t,n){var e=t-Tp,i=n-Bp,e=I0(e*e+i*i);Lp+=e*(Tp+t)/2,Fp+=e*(Bp+n)/2,Op+=e,Rp+=(e=Bp*t-Tp*n)*(Tp+t),jp+=e*(Bp+n),Ip+=3*e,Gp(Tp=t,Bp=n)}function Xp(t){this._context=t}Xp.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,T0)}},result:q0};var Jp,Qp,t_,n_,e_,i_=new je,a_={point:q0,lineStart:function(){a_.point=r_},lineEnd:function(){Jp&&o_(Qp,t_),a_.point=q0},polygonStart:function(){Jp=!0},polygonEnd:function(){Jp=null},result:function(){var t=+i_;return i_=new je,t}};function r_(t,n){a_.point=o_,Qp=n_=t,t_=e_=n}function o_(t,n){n_-=t,e_-=n,i_.add(I0(n_*n_+e_*e_)),n_=t,e_=n}
5195
+ ,lineStart:U0,lineEnd:U0,polygonStart:U0,polygonEnd:U0,result:function(){var t=[[Cp,kp],[Ap,Mp]];return Ap=Mp=-(kp=Cp=1/0),t}};var zp,Tp,Bp,Dp,Np=0,Pp=0,Lp=0,Fp=0,Op=0,Rp=0,jp=0,Ip=0,Hp=0,Gp={point:Kp,lineStart:$p,lineEnd:Wp,polygonStart:function(){Gp.lineStart=Yp,Gp.lineEnd=Vp},polygonEnd:function(){Gp.point=Kp,Gp.lineStart=$p,Gp.lineEnd=Wp},result:function(){var t=Hp?[jp/Hp,Ip/Hp]:Rp?[Fp/Rp,Op/Rp]:Lp?[Np/Lp,Pp/Lp]:[NaN,NaN];return Np=Pp=Lp=Fp=Op=Rp=jp=Ip=Hp=0,t}};function Kp(t,n){Np+=t,Pp+=n,++Lp}function $p(){Gp.point=qp}function qp(t,n){Gp.point=Up,Kp(Bp=t,Dp=n)}function Up(t,n){var e=t-Bp,i=n-Dp,e=H0(e*e+i*i);Fp+=e*(Bp+t)/2,Op+=e*(Dp+n)/2,Rp+=e,Kp(Bp=t,Dp=n)}function Wp(){Gp.point=Kp}function Yp(){Gp.point=Zp}function Vp(){Xp(zp,Tp)}function Zp(t,n){Gp.point=Xp,Kp(zp=Bp=t,Tp=Dp=n)}function Xp(t,n){var e=t-Bp,i=n-Dp,e=H0(e*e+i*i);Fp+=e*(Bp+t)/2,Op+=e*(Dp+n)/2,Rp+=e,jp+=(e=Dp*t-Bp*n)*(Bp+t),Ip+=e*(Dp+n),Hp+=3*e,Kp(Bp=t,Dp=n)}function Jp(t){this._context=t}Jp.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,B0)}},result:U0};var Qp,t_,n_,e_,i_,a_=new je,r_={point:U0,lineStart:function(){r_.point=o_},lineEnd:function(){Qp&&s_(t_,n_),r_.point=U0},polygonStart:function(){Qp=!0},polygonEnd:function(){Qp=null},result:function(){var t=+a_;return a_=new je,t}};function o_(t,n){r_.point=s_,t_=e_=t,n_=i_=n}function s_(t,n){e_-=t,i_-=n,a_.add(H0(e_*e_+i_*i_)),e_=t,i_=n}
5200
5196
  // Simple caching for constant-radius points.
5201
- let s_,l_,u_,h_;class c_{pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:this._append`M${t},${n}`,this._point=1;break;case 1:this._append`L${t},${n}`;break;default:var e,i;this._append`M${t},${n}`,this._radius===u_&&this._append===l_||(e=this._radius,i=this._,this._="",// stash the old string so we can cache the circle path fragment
5202
- this._append`m0,${e}a${e},${e} 0 1,1 0,${-2*e}a${e},${e} 0 1,1 0,${2*e}z`,u_=e,l_=this._append,h_=this._,this._=i),this._+=h_}}result(){var t=this._;return this._="",t.length?t:null}constructor(t){this._append=null==t?g_:(t=>{var n=Math.floor(t);if(!(0<=n))throw new RangeError("invalid digits: "+t);if(15<n)return g_;if(n!==s_){let i=10**n;s_=n,l_=function(t){let n=1;this._+=t[0];for(var e=t.length;n<e;++n)this._+=Math.round(arguments[n]*i)/i+t[n]}}return l_})(t),this._radius=4.5,this._=""}}function g_(t){let n=1;this._+=t[0];for(var e=t.length;n<e;++n)this._+=arguments[n]+t[n]}function d_(i){return function(t){var n,e=new f_;for(n in i)e[n]=i[n];return e.stream=t,e}}function f_(){}function p_(t,n,e){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),X0(e,t.stream(Mp)),n(Mp.result()),null!=i&&t.clipExtent(i),t}function __(a,r,t){return p_(a,function(t){var n=r[1][0]-r[0][0],e=r[1][1]-r[0][1],i=Math.min(n/(t[1][0]-t[0][0]),e/(t[1][1]-t[0][1])),n=+r[0][0]+(n-i*(t[1][0]+t[0][0]))/2,e=+r[0][1]+(e-i*(t[1][1]+t[0][1]))/2;a.scale(150*i).translate([n,e])},t)}function m_(t,n,e){return __(t,[[0,0],n],e)}function y_(i,a,t){return p_(i,function(t){var n=+a,e=n/(t[1][0]-t[0][0]),n=(n-e*(t[1][0]+t[0][0]))/2,t=-e*t[0][1];i.scale(150*e).translate([n,t])},t)}function v_(a,r,t){return p_(a,function(t){var n=+r,e=n/(t[1][1]-t[0][1]),i=-e*t[0][0],n=(n-e*(t[1][1]+t[0][1]))/2;a.scale(150*e).translate([i,n])},t)}f_.prototype={constructor:f_,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var b_=16,x_=E(30*B);// cos(minimum angular distance)
5203
- function w_(t,n){return+n?(M=t,E=n,function(i){var e,a,r,o,s,l,u,h,c,g,d,f,p={point:t,lineStart:n,lineEnd:m,polygonStart:function(){i.polygonStart(),p.lineStart=y},polygonEnd:function(){i.polygonEnd(),p.lineStart=n}};// previous point
5204
- function t(t,n){t=M(t,n),i.point(t[0],t[1])}function n(){h=NaN,p.point=_,i.lineStart()}function _(t,n){var e=Sf([t,n]),n=M(t,n);z(h,c,u,g,d,f,h=n[0],c=n[1],u=t,g=e[0],d=e[1],f=e[2],b_,i),i.point(h,c)}function m(){p.point=t,i.lineEnd()}function y(){n(),p.point=v,p.lineEnd=b}function v(t,n){_(e=t,n),a=h,r=c,o=g,s=d,l=f,p.point=_}function b(){z(h,c,u,g,d,f,a,r,e,o,s,l,b_,i),p.lineEnd=m,m()}return p}):(e=t,d_({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}}));var e,M,E;function z(t,n,e,i,a,r,o,s,l,u,h,c,g,d){var f,p,_,m,y,v,b,x,w,S,C=o-t,k=s-n,A=C*C+k*k;4*E<A&&g--&&(_=r+c,b=K0(_/=m=I0((f=i+u)*f+(p=a+h)*p+_*_)),y=D(D(_)-1)<T||D(e-l)<T?(e+l)/2:N0(p,f),v=(b=M(y,b))[0],E<(S=k*(x=v-t)-C*(w=(b=b[1])-n))*S/A||.3<D((C*x+k*w)/A-.5)||i*u+a*h+r*c<x_)&&(z(t,n,e,i,a,r,v,b,y,f/=m,p/=m,_,g,d),d.point(v,b),z(v,b,y,f,p,_,o,s,l,u,h,c,g,d))}}var S_=d_({point:function(t,n){this.stream.point(t*B,n*B)}});function C_(t,e,i,a,r,n){var o,s,l,u,h,c,g,d,f,p,_,m;return n?(c=E(n),n=z(n),g=c*t,d=n*t,f=c/t,p=n/t,_=(n*i-c*e)/t,m=(n*e+c*i)/t,v.invert=function(t,n){return[a*(f*t-p*n+_),r*(m-p*t-f*n)]},v):(o=t,s=e,l=i,u=a,h=r,y.invert=function(t,n){return[(t-s)/o*u,(l-n)/o*h]},y);function y(t,n){return[s+o*(t*=u),l-o*(n*=h)]}function v(t,n){return[g*(t*=a)-d*(n*=r)+e,i-d*t-g*n]}}function d(t){return k_(function(){return t})()}function k_(t){var n,i,e,a,r,o,s,l,u,h,c=150,g=480,d=250,f=0,p=0,_=0,m=0,y=0,v=0,b=1,x=1,w=null,S=F1,C=null,k=pp,A=.5;function M(t){return l(t[0]*B,t[1]*B)}function E(t){return(t=l.invert(t[0],t[1]))&&[t[0]*B0,t[1]*B0]}function z(){var t=C_(c,0,0,b,x,v).apply(null,n(f,p)),t=C_(c,g-t[0],d-t[1],b,x,v);return i=y1(_,m,y),s=_1(n,t),l=_1(i,s),o=w_(s,A),T()}function T(){return u=h=null,M}return M.stream=function(t){return u&&h===t?u:u=S_((e=i,d_({point:function(t,n){t=e(t,n);return this.stream.point(t[0],t[1])}})(S(o(k(h=t))))));var e},M.preclip=function(t){return arguments.length?(S=t,w=void 0,T()):S},M.postclip=function(t){return arguments.length?(k=t,C=e=a=r=null,T()):k},M.clipAngle=function(t){return arguments.length?(S=+t?O1(w=t*B):(w=null,F1),T()):w*B0},M.clipExtent=function(t){return arguments.length?(k=null==t?(C=e=a=r=null,pp):$1(C=+t[0][0],e=+t[0][1],a=+t[1][0],r=+t[1][1]),T()):null==C?null:[[C,e],[a,r]]},M.scale=function(t){return arguments.length?(c=+t,z()):c},M.translate=function(t){return arguments.length?(g=+t[0],d=+t[1],z()):[g,d]},M.center=function(t){return arguments.length?(f=t[0]%360*B,p=t[1]%360*B,z()):[f*B0,p*B0]},M.rotate=function(t){return arguments.length?(_=t[0]%360*B,m=t[1]%360*B,y=2<t.length?t[2]%360*B:0,z()):[_*B0,m*B0,y*B0]},M.angle=function(t){return arguments.length?(v=t%360*B,z()):v*B0},M.reflectX=function(t){return arguments.length?(b=t?-1:1,z()):b<0},M.reflectY=function(t){return arguments.length?(x=t?-1:1,z()):x<0},M.precision=function(t){return arguments.length?(o=w_(s,A=t*t),T()):I0(A)},M.fitExtent=function(t,n){return __(M,t,n)},M.fitSize=function(t,n){return m_(M,t,n)},M.fitWidth=function(t,n){return y_(M,t,n)},M.fitHeight=function(t,n){return v_(M,t,n)},function(){return n=t.apply(this,arguments),M.invert=n.invert&&E,z()}}function A_(t){var n=0,e=M/3,i=k_(t),t=i(n,e);return t.parallels=function(t){return arguments.length?i(n=t[0]*B,e=t[1]*B):[n*B0,e*B0]},t}function M_(t,n){var e,i,a,r=z(t),o=(r+z(n))/2;
5197
+ let l_,u_,h_,c_;class g_{pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,n){switch(this._point){case 0:this._append`M${t},${n}`,this._point=1;break;case 1:this._append`L${t},${n}`;break;default:var e,i;this._append`M${t},${n}`,this._radius===h_&&this._append===u_||(e=this._radius,i=this._,this._="",// stash the old string so we can cache the circle path fragment
5198
+ this._append`m0,${e}a${e},${e} 0 1,1 0,${-2*e}a${e},${e} 0 1,1 0,${2*e}z`,h_=e,u_=this._append,c_=this._,this._=i),this._+=c_}}result(){var t=this._;return this._="",t.length?t:null}constructor(t){this._append=null==t?d_:(t=>{var n=Math.floor(t);if(!(0<=n))throw new RangeError("invalid digits: "+t);if(15<n)return d_;if(n!==l_){let i=10**n;l_=n,u_=function(t){let n=1;this._+=t[0];for(var e=t.length;n<e;++n)this._+=Math.round(arguments[n]*i)/i+t[n]}}return u_})(t),this._radius=4.5,this._=""}}function d_(t){let n=1;this._+=t[0];for(var e=t.length;n<e;++n)this._+=arguments[n]+t[n]}function f_(i){return function(t){var n,e=new p_;for(n in i)e[n]=i[n];return e.stream=t,e}}function p_(){}function __(t,n,e){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),J0(e,t.stream(Ep)),n(Ep.result()),null!=i&&t.clipExtent(i),t}function m_(a,r,t){return __(a,function(t){var n=r[1][0]-r[0][0],e=r[1][1]-r[0][1],i=Math.min(n/(t[1][0]-t[0][0]),e/(t[1][1]-t[0][1])),n=+r[0][0]+(n-i*(t[1][0]+t[0][0]))/2,e=+r[0][1]+(e-i*(t[1][1]+t[0][1]))/2;a.scale(150*i).translate([n,e])},t)}function y_(t,n,e){return m_(t,[[0,0],n],e)}function v_(i,a,t){return __(i,function(t){var n=+a,e=n/(t[1][0]-t[0][0]),n=(n-e*(t[1][0]+t[0][0]))/2,t=-e*t[0][1];i.scale(150*e).translate([n,t])},t)}function b_(a,r,t){return __(a,function(t){var n=+r,e=n/(t[1][1]-t[0][1]),i=-e*t[0][0],n=(n-e*(t[1][1]+t[0][1]))/2;a.scale(150*e).translate([i,n])},t)}p_.prototype={constructor:p_,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var x_=16,w_=E(30*B);// cos(minimum angular distance)
5199
+ function S_(t,n){return+n?(M=t,E=n,function(i){var e,a,r,o,s,l,u,h,c,g,d,f,p={point:t,lineStart:n,lineEnd:m,polygonStart:function(){i.polygonStart(),p.lineStart=y},polygonEnd:function(){i.polygonEnd(),p.lineStart=n}};// previous point
5200
+ function t(t,n){t=M(t,n),i.point(t[0],t[1])}function n(){h=NaN,p.point=_,i.lineStart()}function _(t,n){var e=Cf([t,n]),n=M(t,n);z(h,c,u,g,d,f,h=n[0],c=n[1],u=t,g=e[0],d=e[1],f=e[2],x_,i),i.point(h,c)}function m(){p.point=t,i.lineEnd()}function y(){n(),p.point=v,p.lineEnd=b}function v(t,n){_(e=t,n),a=h,r=c,o=g,s=d,l=f,p.point=_}function b(){z(h,c,u,g,d,f,a,r,e,o,s,l,x_,i),p.lineEnd=m,m()}return p}):(e=t,f_({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}}));var e,M,E;function z(t,n,e,i,a,r,o,s,l,u,h,c,g,d){var f,p,_,m,y,v,b,x,w,S,C=o-t,k=s-n,A=C*C+k*k;4*E<A&&g--&&(_=r+c,b=$0(_/=m=H0((f=i+u)*f+(p=a+h)*p+_*_)),y=D(D(_)-1)<T||D(e-l)<T?(e+l)/2:P0(p,f),v=(b=M(y,b))[0],E<(S=k*(x=v-t)-C*(w=(b=b[1])-n))*S/A||.3<D((C*x+k*w)/A-.5)||i*u+a*h+r*c<w_)&&(z(t,n,e,i,a,r,v,b,y,f/=m,p/=m,_,g,d),d.point(v,b),z(v,b,y,f,p,_,o,s,l,u,h,c,g,d))}}var C_=f_({point:function(t,n){this.stream.point(t*B,n*B)}});function k_(t,e,i,a,r,n){var o,s,l,u,h,c,g,d,f,p,_,m;return n?(c=E(n),n=z(n),g=c*t,d=n*t,f=c/t,p=n/t,_=(n*i-c*e)/t,m=(n*e+c*i)/t,v.invert=function(t,n){return[a*(f*t-p*n+_),r*(m-p*t-f*n)]},v):(o=t,s=e,l=i,u=a,h=r,y.invert=function(t,n){return[(t-s)/o*u,(l-n)/o*h]},y);function y(t,n){return[s+o*(t*=u),l-o*(n*=h)]}function v(t,n){return[g*(t*=a)-d*(n*=r)+e,i-d*t-g*n]}}function d(t){return A_(function(){return t})()}function A_(t){var n,i,e,a,r,o,s,l,u,h,c=150,g=480,d=250,f=0,p=0,_=0,m=0,y=0,v=0,b=1,x=1,w=null,S=O1,C=null,k=_p,A=.5;function M(t){return l(t[0]*B,t[1]*B)}function E(t){return(t=l.invert(t[0],t[1]))&&[t[0]*D0,t[1]*D0]}function z(){var t=k_(c,0,0,b,x,v).apply(null,n(f,p)),t=k_(c,g-t[0],d-t[1],b,x,v);return i=v1(_,m,y),s=m1(n,t),l=m1(i,s),o=S_(s,A),T()}function T(){return u=h=null,M}return M.stream=function(t){return u&&h===t?u:u=C_((e=i,f_({point:function(t,n){t=e(t,n);return this.stream.point(t[0],t[1])}})(S(o(k(h=t))))));var e},M.preclip=function(t){return arguments.length?(S=t,w=void 0,T()):S},M.postclip=function(t){return arguments.length?(k=t,C=e=a=r=null,T()):k},M.clipAngle=function(t){return arguments.length?(S=+t?R1(w=t*B):(w=null,O1),T()):w*D0},M.clipExtent=function(t){return arguments.length?(k=null==t?(C=e=a=r=null,_p):q1(C=+t[0][0],e=+t[0][1],a=+t[1][0],r=+t[1][1]),T()):null==C?null:[[C,e],[a,r]]},M.scale=function(t){return arguments.length?(c=+t,z()):c},M.translate=function(t){return arguments.length?(g=+t[0],d=+t[1],z()):[g,d]},M.center=function(t){return arguments.length?(f=t[0]%360*B,p=t[1]%360*B,z()):[f*D0,p*D0]},M.rotate=function(t){return arguments.length?(_=t[0]%360*B,m=t[1]%360*B,y=2<t.length?t[2]%360*B:0,z()):[_*D0,m*D0,y*D0]},M.angle=function(t){return arguments.length?(v=t%360*B,z()):v*D0},M.reflectX=function(t){return arguments.length?(b=t?-1:1,z()):b<0},M.reflectY=function(t){return arguments.length?(x=t?-1:1,z()):x<0},M.precision=function(t){return arguments.length?(o=S_(s,A=t*t),T()):H0(A)},M.fitExtent=function(t,n){return m_(M,t,n)},M.fitSize=function(t,n){return y_(M,t,n)},M.fitWidth=function(t,n){return v_(M,t,n)},M.fitHeight=function(t,n){return b_(M,t,n)},function(){return n=t.apply(this,arguments),M.invert=n.invert&&E,z()}}function M_(t){var n=0,e=M/3,i=A_(t),t=i(n,e);return t.parallels=function(t){return arguments.length?i(n=t[0]*B,e=t[1]*B):[n*D0,e*D0]},t}function E_(t,n){var e,i,a,r=z(t),o=(r+z(n))/2;
5205
5201
  // Are the parallels symmetrical around the Equator?
5206
- return D(o)<T?(e=E(t),s.invert=function(t,n){return[t/e,K0(n*e)]},s):(a=I0(i=1+r*(2*o-r))/o,l.invert=function(t,n){var n=a-n,e=N0(t,D(n))*j0(n);return n*o<0&&(e-=M*j0(t)*j0(n)),[e/o,K0((i-(t*t+n*n)*o*o)/(2*o))]},l);function s(t,n){return[t*e,z(n)/e]}function l(t,n){n=I0(i-2*o*z(n))/o;return[n*z(t*=o),a-n*E(t)]}}function E_(){return A_(M_).scale(155.424).center([0,33.6442])}function z_(){return E_().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}
5202
+ return D(o)<T?(e=E(t),s.invert=function(t,n){return[t/e,$0(n*e)]},s):(a=H0(i=1+r*(2*o-r))/o,l.invert=function(t,n){var n=a-n,e=P0(t,D(n))*I0(n);return n*o<0&&(e-=M*I0(t)*I0(n)),[e/o,$0((i-(t*t+n*n)*o*o)/(2*o))]},l);function s(t,n){return[t*e,z(n)/e]}function l(t,n){n=H0(i-2*o*z(n))/o;return[n*z(t*=o),a-n*E(t)]}}function z_(){return M_(E_).scale(155.424).center([0,33.6442])}function T_(){return z_().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}
5207
5203
  // The projections must have mutually exclusive clip regions on the sphere,
5208
5204
  // as this will avoid emitting interleaving lines and polygons.
5209
- function T_(a){return function(t,n){var e=E(t),i=E(n),e=a(e*i);return e===1/0?[2,0]:[e*i*z(t),e*z(n)]}}function B_(r){return function(t,n){var e=I0(t*t+n*n),i=r(e),a=z(i),i=E(i);return[N0(t*a,e*i),K0(e&&n*a/e)]}}var D_=T_(function(t){return I0(2/(1+t))});D_.invert=B_(function(t){return 2*K0(t/2)});var N_=T_(function(t){return(t=G0(t))&&t/z(t)});function P_(t,n){return[t,O0(H0((E0+n)/2))]}function L_(e){var i,a,r,o=d(e),n=o.center,s=o.scale,l=o.translate,u=o.clipExtent,h=null;// clip extent
5210
- function c(){var t=M*s(),n=o(w1(o.rotate()).invert([0,0]));return u(null==h?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:e===P_?[[Math.max(n[0]-t,h),i],[Math.min(n[0]+t,a),r]]:[[h,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,r)]])}return o.scale=function(t){return(arguments.length?(s(t),c):s)()},o.translate=function(t){return(arguments.length?(l(t),c):l)()},o.center=function(t){return(arguments.length?(n(t),c):n)()},o.clipExtent=function(t){return arguments.length?(null==t?h=i=a=r=null:(h=+t[0][0],i=+t[0][1],a=+t[1][0],r=+t[1][1]),c()):null==h?null:[[h,i],[a,r]]},c()}function F_(t){return H0((E0+t)/2)}function O_(t,n){var e=E(t),a=t===n?z(t):O0(e/E(n))/O0(F_(n)/F_(t)),r=e*R0(F_(t),a)/a;return a?(i.invert=function(t,n){var n=r-n,e=j0(a)*I0(t*t+n*n),i=N0(t,D(n))*j0(n);return n*a<0&&(i-=M*j0(t)*j0(n)),[i/a,2*D0(R0(r/e,1/a))-E0]},i):P_;function i(t,n){0<r?n<-E0+T&&(n=-E0+T):E0-T<n&&(n=E0-T);n=r/R0(F_(n),a);return[n*z(a*t),r-n*E(a*t)]}}function R_(t,n){return[t,n]}function j_(){return d(R_).scale(152.63)}function I_(t,n){var e=E(t),i=t===n?z(t):(e-E(n))/(n-t),a=e/i+t;return D(i)<T?R_:(r.invert=function(t,n){var n=a-n,e=N0(t,D(n))*j0(n);return n*i<0&&(e-=M*j0(t)*j0(n)),[e/i,a-j0(i)*I0(t*t+n*n)]},r);function r(t,n){n=a-n,t*=i;return[n*z(t),a-n*E(t)]}}N_.invert=B_(function(t){return t}),P_.invert=function(t,n){return[t,2*D0(L0(n))-E0]},R_.invert=R_;var H_=1.340264,G_=-.081106,K_=893e-6,$_=.003796,q_=I0(3)/2;function U_(t,n){var n=K0(q_*z(n)),e=n*n,i=e*e*e;return[t*E(n)/(q_*(H_+3*G_*e+i*(7*K_+9*$_*e))),n*(H_+G_*e+i*(K_+$_*e))]}function W_(t,n){var e=E(n),i=E(t)*e;return[e*z(t)/i,z(n)/i]}function Y_(){return d(W_).scale(144.049).clipAngle(60)}function V_(t,n){var e=n*n,i=e*e;return[t*(.8707-.131979*e+i*(i*(.003971*e-.001529*i)-.013791)),n*(1.007226+e*(.015085+i*(.028874*e-.044475-.005916*i)))]}function Z_(t,n){return[E(n)*z(t),z(n)]}function X_(){return d(Z_).scale(249.5).clipAngle(90+T)}function J_(t,n){var e=E(n),i=1+E(t)*e;return[e*z(t)/i,z(n)/i]}function Q_(t,n){return[O0(H0((E0+n)/2)),-t]}U_.invert=function(t,n){for(var e,i=n,a=i*i,r=a*a*a,o=0;o<12&&(r=(a=(i-=e=(i*(H_+G_*a+r*(K_+$_*a))-n)/(H_+3*G_*a+r*(7*K_+9*$_*a)))*i)*a*a,!(D(e)<M0));++o);return[q_*t*(H_+3*G_*a+r*(7*K_+9*$_*a))/E(i),K0(z(i)/q_)]},W_.invert=B_(D0),V_.invert=function(t,n){var e=n,i=25;do{var a=e*e,r=a*a}while(e-=r=(e*(1.007226+a*(.015085+r*(.028874*a-.044475-.005916*r)))-n)/(1.007226+a*(.045255+r*(.259866*a-.311325-.005916*11*r))),D(r)>T&&0<--i);return[t/(.8707+(a=e*e)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),e]},Z_.invert=B_(K0),J_.invert=B_(function(t){return 2*D0(t)}),Q_.invert=function(t,n){return[-n,2*D0(L0(t))-E0]};var Wl=Object.freeze({__proto__:null,geoAlbers:z_,geoAlbersUsa:
5205
+ function B_(a){return function(t,n){var e=E(t),i=E(n),e=a(e*i);return e===1/0?[2,0]:[e*i*z(t),e*z(n)]}}function D_(r){return function(t,n){var e=H0(t*t+n*n),i=r(e),a=z(i),i=E(i);return[P0(t*a,e*i),$0(e&&n*a/e)]}}var N_=B_(function(t){return H0(2/(1+t))});N_.invert=D_(function(t){return 2*$0(t/2)});var P_=B_(function(t){return(t=K0(t))&&t/z(t)});function L_(t,n){return[t,R0(G0((z0+n)/2))]}function F_(e){var i,a,r,o=d(e),n=o.center,s=o.scale,l=o.translate,u=o.clipExtent,h=null;// clip extent
5206
+ function c(){var t=M*s(),n=o(S1(o.rotate()).invert([0,0]));return u(null==h?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:e===L_?[[Math.max(n[0]-t,h),i],[Math.min(n[0]+t,a),r]]:[[h,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,r)]])}return o.scale=function(t){return(arguments.length?(s(t),c):s)()},o.translate=function(t){return(arguments.length?(l(t),c):l)()},o.center=function(t){return(arguments.length?(n(t),c):n)()},o.clipExtent=function(t){return arguments.length?(null==t?h=i=a=r=null:(h=+t[0][0],i=+t[0][1],a=+t[1][0],r=+t[1][1]),c()):null==h?null:[[h,i],[a,r]]},c()}function O_(t){return G0((z0+t)/2)}function R_(t,n){var e=E(t),a=t===n?z(t):R0(e/E(n))/R0(O_(n)/O_(t)),r=e*j0(O_(t),a)/a;return a?(i.invert=function(t,n){var n=r-n,e=I0(a)*H0(t*t+n*n),i=P0(t,D(n))*I0(n);return n*a<0&&(i-=M*I0(t)*I0(n)),[i/a,2*N0(j0(r/e,1/a))-z0]},i):L_;function i(t,n){0<r?n<-z0+T&&(n=-z0+T):z0-T<n&&(n=z0-T);n=r/j0(O_(n),a);return[n*z(a*t),r-n*E(a*t)]}}function j_(t,n){return[t,n]}function I_(){return d(j_).scale(152.63)}function H_(t,n){var e=E(t),i=t===n?z(t):(e-E(n))/(n-t),a=e/i+t;return D(i)<T?j_:(r.invert=function(t,n){var n=a-n,e=P0(t,D(n))*I0(n);return n*i<0&&(e-=M*I0(t)*I0(n)),[e/i,a-I0(i)*H0(t*t+n*n)]},r);function r(t,n){n=a-n,t*=i;return[n*z(t),a-n*E(t)]}}P_.invert=D_(function(t){return t}),L_.invert=function(t,n){return[t,2*N0(F0(n))-z0]},j_.invert=j_;var G_=1.340264,K_=-.081106,$_=893e-6,q_=.003796,U_=H0(3)/2;function W_(t,n){var n=$0(U_*z(n)),e=n*n,i=e*e*e;return[t*E(n)/(U_*(G_+3*K_*e+i*(7*$_+9*q_*e))),n*(G_+K_*e+i*($_+q_*e))]}function Y_(t,n){var e=E(n),i=E(t)*e;return[e*z(t)/i,z(n)/i]}function V_(){return d(Y_).scale(144.049).clipAngle(60)}function Z_(t,n){var e=n*n,i=e*e;return[t*(.8707-.131979*e+i*(i*(.003971*e-.001529*i)-.013791)),n*(1.007226+e*(.015085+i*(.028874*e-.044475-.005916*i)))]}function X_(t,n){return[E(n)*z(t),z(n)]}function J_(){return d(X_).scale(249.5).clipAngle(90+T)}function Q_(t,n){var e=E(n),i=1+E(t)*e;return[e*z(t)/i,z(n)/i]}function tm(t,n){return[R0(G0((z0+n)/2)),-t]}W_.invert=function(t,n){for(var e,i=n,a=i*i,r=a*a*a,o=0;o<12&&(r=(a=(i-=e=(i*(G_+K_*a+r*($_+q_*a))-n)/(G_+3*K_*a+r*(7*$_+9*q_*a)))*i)*a*a,!(D(e)<E0));++o);return[U_*t*(G_+3*K_*a+r*(7*$_+9*q_*a))/E(i),$0(z(i)/U_)]},Y_.invert=D_(N0),Z_.invert=function(t,n){var e=n,i=25;do{var a=e*e,r=a*a}while(e-=r=(e*(1.007226+a*(.015085+r*(.028874*a-.044475-.005916*r)))-n)/(1.007226+a*(.045255+r*(.259866*a-.311325-.005916*11*r))),D(r)>T&&0<--i);return[t/(.8707+(a=e*e)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),e]},X_.invert=D_($0),Q_.invert=D_(function(t){return 2*N0(t)}),tm.invert=function(t,n){return[-n,2*N0(F0(t))-z0]};var Wl=Object.freeze({__proto__:null,geoAlbers:T_,geoAlbersUsa:
5211
5207
  // A composite projection for the United States, configured by default for
5212
5208
  // 960×500. The projection also works quite well at 960×600 if you change the
5213
5209
  // scale to 1285 and adjust the translate accordingly. The set of standard
5214
5210
  // parallels for each region comes from USGS, which is published here:
5215
5211
  // http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers
5216
- function(){var n,e,a,r,o,i,s=z_(),l=E_().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=E_().rotate([157,0]).center([-3,19.9]).parallels([8,18]),h={point:function(t,n){i=[t,n]}};function c(t){var n=t[0],t=t[1];return i=null,a.point(n,t),i||(r.point(n,t),i)||(o.point(n,t),i)}function g(){return n=e=null,c}return c.invert=function(t){var n=s.scale(),e=s.translate(),i=(t[0]-e[0])/n,e=(t[1]-e[1])/n;return(.12<=e&&e<.234&&-.425<=i&&i<-.214?l:.166<=e&&e<.234&&-.214<=i&&i<-.115?u:s).invert(t)},c.stream=function(t){return n&&e===t?n:(i=[s.stream(e=t),l.stream(t),u.stream(t)],a=i.length,n={point:function(t,n){for(var e=-1;++e<a;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<a;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<a;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<a;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<a;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<a;)i[t].polygonEnd()}});var i,a},c.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),u.precision(t),g()):s.precision()},c.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),u.scale(t),c.translate(s.translate())):s.scale()},c.translate=function(t){var n,e,i;return arguments.length?(n=s.scale(),e=+t[0],i=+t[1],a=s.translate(t).clipExtent([[e-.455*n,i-.238*n],[e+.455*n,i+.238*n]]).stream(h),r=l.translate([e-.307*n,i+.201*n]).clipExtent([[e-.425*n+T,i+.12*n+T],[e-.214*n-T,i+.234*n-T]]).stream(h),o=u.translate([e-.205*n,i+.212*n]).clipExtent([[e-.214*n+T,i+.166*n+T],[e-.115*n-T,i+.234*n-T]]).stream(h),g()):s.translate()},c.fitExtent=function(t,n){return __(c,t,n)},c.fitSize=function(t,n){return m_(c,t,n)},c.fitWidth=function(t,n){return y_(c,t,n)},c.fitHeight=function(t,n){return v_(c,t,n)},c.scale(1070)},geoArea:function(t){return _f=new je,X0(t,mf),2*_f},geoAzimuthalEqualArea:function(){return d(D_).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:D_,geoAzimuthalEquidistant:function(){return d(N_).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:N_,geoBounds:e1,geoCentroid:f1,geoCircle:k1,geoClipAntimeridian:F1,geoClipCircle:O1,geoClipExtent:function(){var n,e,i,a=0,r=0,o=960,s=500;return i={stream:function(t){return n&&e===t?n:n=$1(a,r,o,s)(e=t)},extent:function(t){return arguments.length?(a=+t[0][0],r=+t[0][1],o=+t[1][0],s=+t[1][1],n=e=null,i):[[a,r],[o,s]]}}},geoClipRectangle:$1,geoConicConformal:function(){return A_(O_).scale(109.5).parallels([30,30])},geoConicConformalRaw:O_,geoConicEqualArea:E_,geoConicEqualAreaRaw:M_,geoConicEquidistant:function(){return A_(I_).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:I_,geoContains:function(t,n){return(t&&Q1.hasOwnProperty(t.type)?Q1[t.type]:np)(t,n)},geoDistance:J1,geoEqualEarth:function(){return d(U_).scale(177.158)},geoEqualEarthRaw:U_,geoEquirectangular:j_,geoEquirectangularRaw:R_,geoGnomonic:Y_,geoGnomonicRaw:W_,geoGraticule:up,geoGraticule10:function(){return up()()},geoIdentity:function(){var i,a,n,e,r,o,s,l=1,u=0,h=0,c=1,g=1,d=0,f=null,p=1,_=1,m=d_({point:function(t,n){t=b([t,n]);this.stream.point(t[0],t[1])}}),y=pp;function v(){return p=l*c,_=l*g,o=s=null,b}function b(t){var n,e=t[0]*p,t=t[1]*_;return d&&(n=t*i-e*a,e=e*i+t*a,t=n),[e+u,t+h]}return b.invert=function(t){var n,e=t[0]-u,t=t[1]-h;return d&&(n=t*i+e*a,e=e*i-t*a,t=n),[e/p,t/_]},b.stream=function(t){return o&&s===t?o:o=m(y(s=t))},b.postclip=function(t){return arguments.length?(y=t,f=n=e=r=null,v()):y},b.clipExtent=function(t){return arguments.length?(y=null==t?(f=n=e=r=null,pp):$1(f=+t[0][0],n=+t[0][1],e=+t[1][0],r=+t[1][1]),v()):null==f?null:[[f,n],[e,r]]},b.scale=function(t){return arguments.length?(l=+t,v()):l},b.translate=function(t){return arguments.length?(u=+t[0],h=+t[1],v()):[u,h]},b.angle=function(t){return arguments.length?(a=z(d=t%360*B),i=E(d),v()):d*B0},b.reflectX=function(t){return arguments.length?(c=t?-1:1,v()):c<0},b.reflectY=function(t){return arguments.length?(g=t?-1:1,v()):g<0},b.fitExtent=function(t,n){return __(b,t,n)},b.fitSize=function(t,n){return m_(b,t,n)},b.fitWidth=function(t,n){return y_(b,t,n)},b.fitHeight=function(t,n){return v_(b,t,n)},b},geoInterpolate:hp,geoLength:V1,geoMercator:function(){return L_(P_).scale(961/T0)},geoMercatorRaw:P_,geoNaturalEarth1:function(){return d(V_).scale(175.295)},geoNaturalEarth1Raw:V_,geoOrthographic:X_,geoOrthographicRaw:Z_,geoPath:function(n,e){let i=3,a=4.5,r,o;function s(t){return t&&("function"==typeof a&&o.pointRadius(+a.apply(this,arguments)),X0(t,r(o))),o.result()}return s.area=function(t){return X0(t,r(yp)),yp.result()},s.measure=function(t){return X0(t,r(a_)),a_.result()},s.bounds=function(t){return X0(t,r(Mp)),Mp.result()},s.centroid=function(t){return X0(t,r(Hp)),Hp.result()},s.projection=function(t){return arguments.length?(r=null==t?(n=null,pp):(n=t).stream,s):n},s.context=function(t){return arguments.length?(o=null==t?(e=null,new c_(i)):new Xp(e=t),"function"!=typeof a&&o.pointRadius(a),s):e},s.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(o.pointRadius(+t),+t),s):a},s.digits=function(t){if(!arguments.length)return i;if(null==t)i=null;else{var n=Math.floor(t);if(!(0<=n))throw new RangeError("invalid digits: "+t);i=n}return null===e&&(o=new c_(i)),s},s.projection(n).digits(i).context(e)},geoProjection:d,geoProjectionMutator:k_,geoRotation:w1,geoStereographic:function(){return d(J_).scale(250).clipAngle(142)},geoStereographicRaw:J_,geoStream:X0,geoTransform:function(t){return{stream:d_(t)}},geoTransverseMercator:function(){var t=L_(Q_),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],2<t.length?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:Q_}),N=Math.abs,tm=Math.atan,b=Math.atan2,P=Math.cos,nm=Math.exp,em=Math.floor,im=Math.log,am=Math.max,rm=Math.min,om=Math.pow,sm=Math.round,y=Math.sign||function(t){return 0<t?1:t<0?-1:0},L=Math.sin,g=Math.tan,F=1e-6,lm=1e-12,O=Math.PI,R=O/2,um=O/4,hm=Math.SQRT1_2,cm=I(2),gm=I(O),dm=2*O,m=180/O,x=O/180;function j(t){return 1<t?R:t<-1?-R:Math.asin(t)}function fm(t){return 1<t?0:t<-1?O:Math.acos(t)}function I(t){return 0<t?Math.sqrt(t):0}function pm(t){return(nm(t)-nm(-t))/2}function _m(t){return(nm(t)+nm(-t))/2}function mm(h){var t=g(h/2),c=2*im(P(h/2))/(t*t);function n(t,n){var e=P(t),i=P(n),n=L(n),e=i*e,e=-((1-e?im((1+e)/2)/(1-e):-.5)+c/(1+e));return[e*i*L(t),e*n]}return n.invert=function(t,n){var e=I(t*t+n*n),i=-h/2,a=50;if(!e)return[0,0];do{var r=i/2,o=P(r),r=L(r),s=r/o,l=-im(N(o))}while(i-=s=(2/s*l-c*s-e)/(-l/(r*r)+1-c/(2*o*o))*(o<0?.7:1),N(s)>F&&0<--a);var u=L(i);return[b(t*u,e*P(i)),j(n*u/e)]},n}function ym(t,n){var e=P(n),i=(i=fm(e*P(t/=2)))?i/Math.sin(i):1;return[2*e*L(t)*i,L(n)*i]}
5212
+ function(){var n,e,a,r,o,i,s=T_(),l=z_().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=z_().rotate([157,0]).center([-3,19.9]).parallels([8,18]),h={point:function(t,n){i=[t,n]}};function c(t){var n=t[0],t=t[1];return i=null,a.point(n,t),i||(r.point(n,t),i)||(o.point(n,t),i)}function g(){return n=e=null,c}return c.invert=function(t){var n=s.scale(),e=s.translate(),i=(t[0]-e[0])/n,e=(t[1]-e[1])/n;return(.12<=e&&e<.234&&-.425<=i&&i<-.214?l:.166<=e&&e<.234&&-.214<=i&&i<-.115?u:s).invert(t)},c.stream=function(t){return n&&e===t?n:(i=[s.stream(e=t),l.stream(t),u.stream(t)],a=i.length,n={point:function(t,n){for(var e=-1;++e<a;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<a;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<a;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<a;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<a;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<a;)i[t].polygonEnd()}});var i,a},c.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),u.precision(t),g()):s.precision()},c.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),u.scale(t),c.translate(s.translate())):s.scale()},c.translate=function(t){var n,e,i;return arguments.length?(n=s.scale(),e=+t[0],i=+t[1],a=s.translate(t).clipExtent([[e-.455*n,i-.238*n],[e+.455*n,i+.238*n]]).stream(h),r=l.translate([e-.307*n,i+.201*n]).clipExtent([[e-.425*n+T,i+.12*n+T],[e-.214*n-T,i+.234*n-T]]).stream(h),o=u.translate([e-.205*n,i+.212*n]).clipExtent([[e-.214*n+T,i+.166*n+T],[e-.115*n-T,i+.234*n-T]]).stream(h),g()):s.translate()},c.fitExtent=function(t,n){return m_(c,t,n)},c.fitSize=function(t,n){return y_(c,t,n)},c.fitWidth=function(t,n){return v_(c,t,n)},c.fitHeight=function(t,n){return b_(c,t,n)},c.scale(1070)},geoArea:function(t){return mf=new je,J0(t,yf),2*mf},geoAzimuthalEqualArea:function(){return d(N_).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:N_,geoAzimuthalEquidistant:function(){return d(P_).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:P_,geoBounds:i1,geoCentroid:p1,geoCircle:A1,geoClipAntimeridian:O1,geoClipCircle:R1,geoClipExtent:function(){var n,e,i,a=0,r=0,o=960,s=500;return i={stream:function(t){return n&&e===t?n:n=q1(a,r,o,s)(e=t)},extent:function(t){return arguments.length?(a=+t[0][0],r=+t[0][1],o=+t[1][0],s=+t[1][1],n=e=null,i):[[a,r],[o,s]]}}},geoClipRectangle:q1,geoConicConformal:function(){return M_(R_).scale(109.5).parallels([30,30])},geoConicConformalRaw:R_,geoConicEqualArea:z_,geoConicEqualAreaRaw:E_,geoConicEquidistant:function(){return M_(H_).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:H_,geoContains:function(t,n){return(t&&tp.hasOwnProperty(t.type)?tp[t.type]:ep)(t,n)},geoDistance:Q1,geoEqualEarth:function(){return d(W_).scale(177.158)},geoEqualEarthRaw:W_,geoEquirectangular:I_,geoEquirectangularRaw:j_,geoGnomonic:V_,geoGnomonicRaw:Y_,geoGraticule:hp,geoGraticule10:function(){return hp()()},geoIdentity:function(){var i,a,n,e,r,o,s,l=1,u=0,h=0,c=1,g=1,d=0,f=null,p=1,_=1,m=f_({point:function(t,n){t=b([t,n]);this.stream.point(t[0],t[1])}}),y=_p;function v(){return p=l*c,_=l*g,o=s=null,b}function b(t){var n,e=t[0]*p,t=t[1]*_;return d&&(n=t*i-e*a,e=e*i+t*a,t=n),[e+u,t+h]}return b.invert=function(t){var n,e=t[0]-u,t=t[1]-h;return d&&(n=t*i+e*a,e=e*i-t*a,t=n),[e/p,t/_]},b.stream=function(t){return o&&s===t?o:o=m(y(s=t))},b.postclip=function(t){return arguments.length?(y=t,f=n=e=r=null,v()):y},b.clipExtent=function(t){return arguments.length?(y=null==t?(f=n=e=r=null,_p):q1(f=+t[0][0],n=+t[0][1],e=+t[1][0],r=+t[1][1]),v()):null==f?null:[[f,n],[e,r]]},b.scale=function(t){return arguments.length?(l=+t,v()):l},b.translate=function(t){return arguments.length?(u=+t[0],h=+t[1],v()):[u,h]},b.angle=function(t){return arguments.length?(a=z(d=t%360*B),i=E(d),v()):d*D0},b.reflectX=function(t){return arguments.length?(c=t?-1:1,v()):c<0},b.reflectY=function(t){return arguments.length?(g=t?-1:1,v()):g<0},b.fitExtent=function(t,n){return m_(b,t,n)},b.fitSize=function(t,n){return y_(b,t,n)},b.fitWidth=function(t,n){return v_(b,t,n)},b.fitHeight=function(t,n){return b_(b,t,n)},b},geoInterpolate:cp,geoLength:Z1,geoMercator:function(){return F_(L_).scale(961/B0)},geoMercatorRaw:L_,geoNaturalEarth1:function(){return d(Z_).scale(175.295)},geoNaturalEarth1Raw:Z_,geoOrthographic:J_,geoOrthographicRaw:X_,geoPath:function(n,e){let i=3,a=4.5,r,o;function s(t){return t&&("function"==typeof a&&o.pointRadius(+a.apply(this,arguments)),J0(t,r(o))),o.result()}return s.area=function(t){return J0(t,r(vp)),vp.result()},s.measure=function(t){return J0(t,r(r_)),r_.result()},s.bounds=function(t){return J0(t,r(Ep)),Ep.result()},s.centroid=function(t){return J0(t,r(Gp)),Gp.result()},s.projection=function(t){return arguments.length?(r=null==t?(n=null,_p):(n=t).stream,s):n},s.context=function(t){return arguments.length?(o=null==t?(e=null,new g_(i)):new Jp(e=t),"function"!=typeof a&&o.pointRadius(a),s):e},s.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(o.pointRadius(+t),+t),s):a},s.digits=function(t){if(!arguments.length)return i;if(null==t)i=null;else{var n=Math.floor(t);if(!(0<=n))throw new RangeError("invalid digits: "+t);i=n}return null===e&&(o=new g_(i)),s},s.projection(n).digits(i).context(e)},geoProjection:d,geoProjectionMutator:A_,geoRotation:S1,geoStereographic:function(){return d(Q_).scale(250).clipAngle(142)},geoStereographicRaw:Q_,geoStream:J0,geoTransform:function(t){return{stream:f_(t)}},geoTransverseMercator:function(){var t=F_(tm),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],2<t.length?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:tm}),N=Math.abs,nm=Math.atan,b=Math.atan2,P=Math.cos,em=Math.exp,im=Math.floor,am=Math.log,rm=Math.max,om=Math.min,sm=Math.pow,lm=Math.round,y=Math.sign||function(t){return 0<t?1:t<0?-1:0},L=Math.sin,g=Math.tan,F=1e-6,um=1e-12,O=Math.PI,R=O/2,hm=O/4,cm=Math.SQRT1_2,gm=I(2),dm=I(O),fm=2*O,m=180/O,x=O/180;function j(t){return 1<t?R:t<-1?-R:Math.asin(t)}function pm(t){return 1<t?0:t<-1?O:Math.acos(t)}function I(t){return 0<t?Math.sqrt(t):0}function _m(t){return(em(t)-em(-t))/2}function mm(t){return(em(t)+em(-t))/2}function ym(h){var t=g(h/2),c=2*am(P(h/2))/(t*t);function n(t,n){var e=P(t),i=P(n),n=L(n),e=i*e,e=-((1-e?am((1+e)/2)/(1-e):-.5)+c/(1+e));return[e*i*L(t),e*n]}return n.invert=function(t,n){var e=I(t*t+n*n),i=-h/2,a=50;if(!e)return[0,0];do{var r=i/2,o=P(r),r=L(r),s=r/o,l=-am(N(o))}while(i-=s=(2/s*l-c*s-e)/(-l/(r*r)+1-c/(2*o*o))*(o<0?.7:1),N(s)>F&&0<--a);var u=L(i);return[b(t*u,e*P(i)),j(n*u/e)]},n}function vm(t,n){var e=P(n),i=(i=pm(e*P(t/=2)))?i/Math.sin(i):1;return[2*e*L(t)*i,L(n)*i]}
5217
5213
  // Abort if [x, y] is not within an ellipse centered at [0, 0] with
5218
5214
  // semi-major axis pi and semi-minor axis pi/2.
5219
- function vm(t){var f=L(t),p=P(t),_=0<=t?1:-1,m=g(_*t),y=(1+f-p)/2;function n(t,n){var e=P(n),i=P(t/=2);return[(1+e)*L(t),(_*n>-b(i,m)-.001?0:10*-_)+y+L(n)*p-(1+e)*f*i]}return n.invert=function(t,n){var e=0,i=0,a=50;do{var r=P(e),o=L(e),s=P(i),l=L(i),u=1+s,h=u*o-t,c=y+l*p-u*f*r-n,g=u*r/2,d=-o*l,u=f*u*o/2,o=p*s+f*r*l,s=d*u-o*g,r=(c*d-h*o)/s/2,l=(h*u-c*g)/s}while(2<N(l)&&(l/=2),e-=r,i-=l,(N(r)>F||N(l)>F)&&0<--a);return _*i>-b(P(e),m)-.001?[2*e,i]:null},n}function bm(t,n){var n=g(n/2),e=I(1-n*n),i=1+e*P(t/=2),t=L(t)*e/i,e=n/i,n=t*t,i=e*e;return[4/3*t*(3+n-3*i),4/3*e*(3+3*n-i)]}ym.invert=function(t,n){if(!(O*O+F<t*t+4*n*n)){var e=t,i=n,a=25;do{var r,o=L(e),s=L(e/2),l=P(e/2),u=L(i),h=P(i),c=L(2*i),g=u*u,d=h*h,f=s*s,p=1-d*l*l,p=p?fm(h*l)*I(r=1/p):r=0,_=2*p*h*s-t,m=p*u-n,y=r*(d*f+p*h*l*g),v=r*(.5*o*c-2*p*u*s),c=.25*r*(c*s-p*u*d*o),s=r*(g*l+p*f*h),u=v*c-s*y;if(!u)break;d=(m*v-_*s)/u,o=(_*c-m*y)/u}while(e-=d,i-=o,(N(d)>F||N(o)>F)&&0<--a);return[e,i]}},bm.invert=function(t,n){var e,i,a,r,o;return n*=3/8,!(t*=3/8)&&1<N(n)?null:(e=j(o=I(((o=1+t*t+n*n)-I(o*o-4*n*n))/2))/3,o=o?(o=N(n/o),im(o+I(o*o-1))/3):(o=N(t),im(o+I(o*o+1))/3),i=P(e),r=(a=_m(o))*a-i*i,[2*y(t)*b(pm(o)*i,.25-r),2*y(n)*b(a*L(e),.25+r)])};var xm=I(8),wm=im(1+cm);function Sm(t,n){var e=N(n);return e<um?[t,im(g(um+n/2))]:[t*P(e)*(2*cm-1/L(e)),y(n)*(2*cm*(e-um)-im(g(e/2)))]}function Cm(t){var s=2*O/t;function n(t,n){var e,i,a,n=N_(t,n);return N(t)>R&&(t=b(n[1],n[0]),e=I(n[0]*n[0]+n[1]*n[1]),i=s*sm((t-R)/s)+R,a=b(L(t-=i),2-P(t)),// angle relative to lobe end
5220
- t=i+j(O/e*L(a))-a,n[0]=e*P(t),n[1]=e*L(t)),n}return n.invert=function(t,n){var e,i,a,r,o=I(t*t+n*n);return R<o&&(r=b(n,t),i=(e=s*sm((r-R)/s)+R)<r?-1:1,a=o*P(e-r),a=1/g(i*fm((a-O)/I(O*(O-2*a)+o*o))),r=e+2*tm((a+i*I(a*a-3))/3),t=o*P(r),n=o*L(r)),N_.invert(t,n)},n}function km(e,i){return 1===(i=arguments.length<2?e:i)?D_:i===1/0?Am:(t.invert=function(t,n){t=D_.invert(t/e,n);return t[0]*=i,t},t);function t(t,n){t=D_(t/i,n);return t[0]*=e,t}}function Am(t,n){return[t*P(n)/P(n/=2),2*L(n)]}
5215
+ function bm(t){var f=L(t),p=P(t),_=0<=t?1:-1,m=g(_*t),y=(1+f-p)/2;function n(t,n){var e=P(n),i=P(t/=2);return[(1+e)*L(t),(_*n>-b(i,m)-.001?0:10*-_)+y+L(n)*p-(1+e)*f*i]}return n.invert=function(t,n){var e=0,i=0,a=50;do{var r=P(e),o=L(e),s=P(i),l=L(i),u=1+s,h=u*o-t,c=y+l*p-u*f*r-n,g=u*r/2,d=-o*l,u=f*u*o/2,o=p*s+f*r*l,s=d*u-o*g,r=(c*d-h*o)/s/2,l=(h*u-c*g)/s}while(2<N(l)&&(l/=2),e-=r,i-=l,(N(r)>F||N(l)>F)&&0<--a);return _*i>-b(P(e),m)-.001?[2*e,i]:null},n}function xm(t,n){var n=g(n/2),e=I(1-n*n),i=1+e*P(t/=2),t=L(t)*e/i,e=n/i,n=t*t,i=e*e;return[4/3*t*(3+n-3*i),4/3*e*(3+3*n-i)]}vm.invert=function(t,n){if(!(O*O+F<t*t+4*n*n)){var e=t,i=n,a=25;do{var r,o=L(e),s=L(e/2),l=P(e/2),u=L(i),h=P(i),c=L(2*i),g=u*u,d=h*h,f=s*s,p=1-d*l*l,p=p?pm(h*l)*I(r=1/p):r=0,_=2*p*h*s-t,m=p*u-n,y=r*(d*f+p*h*l*g),v=r*(.5*o*c-2*p*u*s),c=.25*r*(c*s-p*u*d*o),s=r*(g*l+p*f*h),u=v*c-s*y;if(!u)break;d=(m*v-_*s)/u,o=(_*c-m*y)/u}while(e-=d,i-=o,(N(d)>F||N(o)>F)&&0<--a);return[e,i]}},xm.invert=function(t,n){var e,i,a,r,o;return n*=3/8,!(t*=3/8)&&1<N(n)?null:(e=j(o=I(((o=1+t*t+n*n)-I(o*o-4*n*n))/2))/3,o=o?(o=N(n/o),am(o+I(o*o-1))/3):(o=N(t),am(o+I(o*o+1))/3),i=P(e),r=(a=mm(o))*a-i*i,[2*y(t)*b(_m(o)*i,.25-r),2*y(n)*b(a*L(e),.25+r)])};var wm=I(8),Sm=am(1+gm);function Cm(t,n){var e=N(n);return e<hm?[t,am(g(hm+n/2))]:[t*P(e)*(2*gm-1/L(e)),y(n)*(2*gm*(e-hm)-am(g(e/2)))]}function km(t){var s=2*O/t;function n(t,n){var e,i,a,n=P_(t,n);return N(t)>R&&(t=b(n[1],n[0]),e=I(n[0]*n[0]+n[1]*n[1]),i=s*lm((t-R)/s)+R,a=b(L(t-=i),2-P(t)),// angle relative to lobe end
5216
+ t=i+j(O/e*L(a))-a,n[0]=e*P(t),n[1]=e*L(t)),n}return n.invert=function(t,n){var e,i,a,r,o=I(t*t+n*n);return R<o&&(r=b(n,t),i=(e=s*lm((r-R)/s)+R)<r?-1:1,a=o*P(e-r),a=1/g(i*pm((a-O)/I(O*(O-2*a)+o*o))),r=e+2*nm((a+i*I(a*a-3))/3),t=o*P(r),n=o*L(r)),P_.invert(t,n)},n}function Am(e,i){return 1===(i=arguments.length<2?e:i)?N_:i===1/0?Mm:(t.invert=function(t,n){t=N_.invert(t/e,n);return t[0]*=i,t},t);function t(t,n){t=N_(t/i,n);return t[0]*=e,t}}function Mm(t,n){return[t*P(n)/P(n/=2),2*L(n)]}
5221
5217
  // Approximate Newton-Raphson
5222
5218
  // Solve f(x) = y, start from x
5223
- function Mm(t,n,e){var i,a,r=100;for(e=void 0===e?0:+e,n=+n;i=t(e),a=t(e+F),e-=i=-1*F*(i-n)/(i-(a=i===a?i+F:a)),0<r--&&N(i)>F;);return r<0?NaN:e}
5219
+ function Em(t,n,e){var i,a,r=100;for(e=void 0===e?0:+e,n=+n;i=t(e),a=t(e+F),e-=i=-1*F*(i-n)/(i-(a=i===a?i+F:a)),0<r--&&N(i)>F;);return r<0?NaN:e}
5224
5220
  // Approximate Newton-Raphson in 2D
5225
5221
  // Solve f(a,b) = [x,y]
5226
- function Em(_,m,y){return void 0===m&&(m=40),void 0===y&&(y=lm),function(t,n,e,i){e=void 0===e?0:+e,i=void 0===i?0:+i;for(var a=0;a<m;a++){var r=_(e,i),// diffs
5222
+ function zm(_,m,y){return void 0===m&&(m=40),void 0===y&&(y=um),function(t,n,e,i){e=void 0===e?0:+e,i=void 0===i?0:+i;for(var a=0;a<m;a++){var r=_(e,i),// diffs
5227
5223
  o=r[0]-t,s=r[1]-n;if(N(o)<y&&N(s)<y)break;// we're there!
5228
5224
  // backtrack if we overshot
5229
5225
  var l=o*o+s*s;if(c<l)e-=u/=2,i-=h/=2;else{
@@ -5234,31 +5230,31 @@ g=(N(r)<.5?.5:1)/r;if(e+=u=(s*l-o*f)*g,i+=h=(o*d-s*p)*g,N(u)<y&&N(h)<y)break;//
5234
5230
  }}return[e,i]}}
5235
5231
  // Bertin 1953 as a modified Briesemeister
5236
5232
  // https://bl.ocks.org/Fil/5b9ee9636dfb6ffa53443c9006beb642
5237
- function zm(){var i=km(1.68,2);function t(t,n){t+n<-1.4&&(t+=e=(t-n+1.6)*(t+n+1.4)/8,n-=.8*e*L(n+O/2));var e=i(t,n),t=(1-P(t*n))/12;return e[1]<0&&(e[0]*=1+t),0<e[1]&&(e[1]*=1+t/1.5*e[0]*e[0]),e}return t.invert=Em(t),t}function Tm(t,n){for(var e,i=t*L(n),a=30;n-=e=(n+L(n)-i)/(1+P(n)),N(e)>F&&0<--a;);return n/2}function Bm(e,i,a){function t(t,n){return[e*t*P(n=Tm(a,n)),i*L(n)]}return t.invert=function(t,n){return n=j(n/i),[t/(e*P(n)),j((2*n+L(2*n))/a)]},t}Sm.invert=function(t,n){if((e=N(n))<wm)return[t,2*tm(nm(n))-R];var e,i=um,a=25;do{var r=P(i/2),o=g(i/2)}while(i-=r=(xm*(i-um)-im(o)-e)/(xm-r*r/(2*o)),N(r)>lm&&0<--a);return[t/(P(i)*(xm-1/L(i))),y(n)*i]},Am.invert=function(t,n){n=2*j(n/2);return[t*P(n/2)/P(n),n]};var Dm=Bm(cm/R,cm,O);var Nm=2.00276;function Pm(t,n){var e=Tm(O,n);return[Nm*t/(1/P(n)+1.11072/P(e)),(n+cm*L(e))/Nm]}function Lm(t){var n=0,e=k_(t),t=e(n);return t.parallel=function(t){return arguments.length?e(n=t*x):n*m},t}function Fm(t,n){return[t*P(n),n]}function Om(a){var r;return a?(r=1/g(a),t.invert=function(t,n){var e=I(t*t+(n=r-n)*n),i=r+a-e;return[e/P(i)*b(t,n),i]},t):Fm;function t(t,n){var e=r+a-n,t=e&&t*P(n)/e;return[e*L(t),r-e*P(t)]}}function Rm(i){function t(t,n){n=R-n,t=n&&t*i*L(n)/n;return[n*L(t)/i,R-n*P(t)]}return t.invert=function(t,n){var t=t*i,n=R-n,e=I(t*t+n*n),t=b(t,n);return[(e?e/L(e):1)*t/i,R-e]},t}Pm.invert=function(t,n){for(var e,i,a=Nm*n,r=n<0?-um:um,o=25;i=a-cm*L(r),r-=e=(L(2*r)+2*r-O*L(i))/(2*P(2*r)+2+O*P(i)*cm*P(r)),N(e)>F&&0<--o;);return i=a-cm*L(r),[t*(1/P(i)+1.11072/P(r))/Nm,i]},Fm.invert=function(t,n){return[t/P(n),n]};var jm=Bm(1,4/O,O);
5233
+ function Tm(){var i=Am(1.68,2);function t(t,n){t+n<-1.4&&(t+=e=(t-n+1.6)*(t+n+1.4)/8,n-=.8*e*L(n+O/2));var e=i(t,n),t=(1-P(t*n))/12;return e[1]<0&&(e[0]*=1+t),0<e[1]&&(e[1]*=1+t/1.5*e[0]*e[0]),e}return t.invert=zm(t),t}function Bm(t,n){for(var e,i=t*L(n),a=30;n-=e=(n+L(n)-i)/(1+P(n)),N(e)>F&&0<--a;);return n/2}function Dm(e,i,a){function t(t,n){return[e*t*P(n=Bm(a,n)),i*L(n)]}return t.invert=function(t,n){return n=j(n/i),[t/(e*P(n)),j((2*n+L(2*n))/a)]},t}Cm.invert=function(t,n){if((e=N(n))<Sm)return[t,2*nm(em(n))-R];var e,i=hm,a=25;do{var r=P(i/2),o=g(i/2)}while(i-=r=(wm*(i-hm)-am(o)-e)/(wm-r*r/(2*o)),N(r)>um&&0<--a);return[t/(P(i)*(wm-1/L(i))),y(n)*i]},Mm.invert=function(t,n){n=2*j(n/2);return[t*P(n/2)/P(n),n]};var Nm=Dm(gm/R,gm,O);var Pm=2.00276;function Lm(t,n){var e=Bm(O,n);return[Pm*t/(1/P(n)+1.11072/P(e)),(n+gm*L(e))/Pm]}function Fm(t){var n=0,e=A_(t),t=e(n);return t.parallel=function(t){return arguments.length?e(n=t*x):n*m},t}function Om(t,n){return[t*P(n),n]}function Rm(a){var r;return a?(r=1/g(a),t.invert=function(t,n){var e=I(t*t+(n=r-n)*n),i=r+a-e;return[e/P(i)*b(t,n),i]},t):Om;function t(t,n){var e=r+a-n,t=e&&t*P(n)/e;return[e*L(t),r-e*P(t)]}}function jm(i){function t(t,n){n=R-n,t=n&&t*i*L(n)/n;return[n*L(t)/i,R-n*P(t)]}return t.invert=function(t,n){var t=t*i,n=R-n,e=I(t*t+n*n),t=b(t,n);return[(e?e/L(e):1)*t/i,R-e]},t}Lm.invert=function(t,n){for(var e,i,a=Pm*n,r=n<0?-hm:hm,o=25;i=a-gm*L(r),r-=e=(L(2*r)+2*r-O*L(i))/(2*P(2*r)+2+O*P(i)*gm*P(r)),N(e)>F&&0<--o;);return i=a-gm*L(r),[t*(1/P(i)+1.11072/P(r))/Pm,i]},Om.invert=function(t,n){return[t/P(n),n]};var Im=Dm(1,4/O,O);
5238
5234
  // Azimuthal distance.
5239
- function Im(t,n,e,i,a,r){var o=P(r);return t=1<N(t)||1<N(r)?fm(e*a+n*i*o):2*j(I((t=L(t/2))*t+n*i*(t=L(r/2))*t)),N(t)>F?[t,b(i*L(r),n*a-e*i*o)]:[0,0]}
5235
+ function Hm(t,n,e,i,a,r){var o=P(r);return t=1<N(t)||1<N(r)?pm(e*a+n*i*o):2*j(I((t=L(t/2))*t+n*i*(t=L(r/2))*t)),N(t)>F?[t,b(i*L(r),n*a-e*i*o)]:[0,0]}
5240
5236
  // Angle opposite a, and contained between sides of lengths b and c.
5241
- function Hm(t,n,e){return fm((t*t+n*n-e*e)/(2*t*n))}
5237
+ function Gm(t,n,e){return pm((t*t+n*n-e*e)/(2*t*n))}
5242
5238
  // Normalize longitude.
5243
- function Gm(t,n,e){for(var i,u=[[t[0],t[1],L(t[1]),P(t[1])],[n[0],n[1],L(n[1]),P(n[1])],[e[0],e[1],L(e[1]),P(e[1])]],a=u[2],r=0;r<3;++r,a=i)i=u[r],a.v=Im(i[1]-a[1],a[3],a[2],i[3],i[2],i[0]-a[0]),a.point=[0,0];var t=Hm(u[0].v[0],u[2].v[0],u[1].v[0]),h=Hm(u[0].v[0],u[1].v[0],u[2].v[0]),c=O-t,g=(u[2].point[1]=0,u[0].point[0]=-(u[1].point[0]=u[0].v[0]/2),[u[2].point[0]=u[0].point[0]+u[2].v[0]*P(t),2*(u[0].point[1]=u[1].point[1]=u[2].v[0]*L(t))]);return function(t,n){
5239
+ function Km(t,n,e){for(var i,u=[[t[0],t[1],L(t[1]),P(t[1])],[n[0],n[1],L(n[1]),P(n[1])],[e[0],e[1],L(e[1]),P(e[1])]],a=u[2],r=0;r<3;++r,a=i)i=u[r],a.v=Hm(i[1]-a[1],a[3],a[2],i[3],i[2],i[0]-a[0]),a.point=[0,0];var t=Gm(u[0].v[0],u[2].v[0],u[1].v[0]),h=Gm(u[0].v[0],u[1].v[0],u[2].v[0]),c=O-t,g=(u[2].point[1]=0,u[0].point[0]=-(u[1].point[0]=u[0].v[0]/2),[u[2].point[0]=u[0].point[0]+u[2].v[0]*P(t),2*(u[0].point[1]=u[1].point[1]=u[2].v[0]*L(t))]);return function(t,n){
5244
5240
  // Compute distance and azimuth from control points.
5245
- for(var e=L(n),i=P(n),a=new Array(3),r=0;r<3;++r){var o=u[r];if(a[r]=Im(n-o[1],o[3],o[2],i,e,t-o[0]),!a[r][0])return o.point;a[r][1]=(o=a[r][1]-o.v[1])-2*O*em((o+O)/(2*O))}
5241
+ for(var e=L(n),i=P(n),a=new Array(3),r=0;r<3;++r){var o=u[r];if(a[r]=Hm(n-o[1],o[3],o[2],i,e,t-o[0]),!a[r][0])return o.point;a[r][1]=(o=a[r][1]-o.v[1])-2*O*im((o+O)/(2*O))}
5246
5242
  // Arithmetic mean of interception points.
5247
- var s=g.slice();for(r=0;r<3;++r){var l=2==r?0:r+1,l=Hm(u[r].v[0],a[r][0],a[l][0]);a[r][1]<0&&(l=-l),r?1==r?(s[0]-=a[r][0]*P(l=h-l),s[1]-=a[r][0]*L(l)):(s[0]+=a[r][0]*P(l=c-l),s[1]+=a[r][0]*L(l)):(s[0]+=a[r][0]*P(l),s[1]-=a[r][0]*L(l))}return s[0]/=3,s[1]/=3,s}}function Km(t){return t[0]*=x,t[1]*=x,t}function $m(t,n,e){var i=f1({type:"MultiPoint",coordinates:[t,n,e]}),i=[-i[0],-i[1]],a=w1(i),t=Gm(Km(a(t)),Km(a(n)),Km(a(e))),n=(t.invert=Em(t),d(t).rotate(i)),r=n.center;return delete n.rotate,n.center=function(t){return arguments.length?r(a(t)):a.invert(r())},n.clipAngle(90)}function qm(t,n){n=I(1-L(n));return[2/gm*t*n,gm*(1-n)]}function Um(t){var i=g(t);function n(t,n){return[t,(t?t/L(t):1)*(L(n)*P(t)-i*P(n))]}return n.invert=i?function(t,n){t&&(n*=L(t)/t);var e=P(t);return[t,2*b(I(e*e+i*i-n*n)-e,i-n)]}:function(t,n){return[t,j(t?n*g(t)/t:n)]},n}qm.invert=function(t,n){n=(n=n/gm-1)*n;return[0<n?t*I(O/n)/2:0,j(1-n)]};var Wm=I(3);function Ym(t,n){return[Wm*t*(2*P(2*n/3)-1)/gm,Wm*gm*L(n/3)]}function Vm(t){var e=P(t);function n(t,n){return[t*e,L(n)/e]}return n.invert=function(t,n){return[t/e,j(n*e)]},n}function Zm(t){var e=P(t);function n(t,n){return[t*e,(1+e)*g(n/2)]}return n.invert=function(t,n){return[t/e,2*tm(n/(1+e))]},n}function Xm(t,n){var e=I(8/(3*O));return[e*t*(1-N(n)/O),e*n]}function Jm(t,n){var e=I(4-3*L(N(n)));return[2/I(6*O)*t*e,y(n)*I(2*O/3)*(2-e)]}function Qm(t,n){var e=I(O*(4+O));return[2/e*t*(1+I(1-4*n*n/(O*O))),4/e*n]}function ty(t,n){var e=(2+R)*L(n);n/=2;for(var i=0,a=1/0;i<10&&N(a)>F;i++){var r=P(n);n-=a=(n+L(n)*(r+2)-e)/(2*r*(1+r))}return[2/I(O*(4+O))*t*(1+P(n)),2*I(O/(4+O))*L(n)]}function ny(t,n){return[t*(1+P(n))/I(2+O),2*n/I(2+O)]}function ey(t,n){for(var e=(1+R)*L(n),i=0,a=1/0;i<10&&N(a)>F;i++)n-=a=(n+L(n)-e)/(1+P(n));return e=I(2+O),[t*(1+P(n))/e,2*n/e]}Ym.invert=function(t,n){n=3*j(n/(Wm*gm));return[gm*t/(Wm*(2*P(2*n/3)-1)),n]},Xm.invert=function(t,n){var e=I(8/(3*O)),n=n/e;return[t/(e*(1-N(n)/O)),n]},Jm.invert=function(t,n){var e=2-N(n)/I(2*O/3);return[t*I(6*O)/(2*e),y(n)*j((4-e*e)/3)]},Qm.invert=function(t,n){var e=I(O*(4+O))/2;return[t*e/(1+I(1-n*n*(4+O)/(4*O))),n*e/2]},ty.invert=function(t,n){var n=n*I((4+O)/O)/2,e=j(n),i=P(e);return[t/(2/I(O*(4+O))*(1+i)),j((e+n*(i+2))/(2+R))]},ny.invert=function(t,n){var e=I(2+O),n=n*e/2;return[e*t/(1+P(n)),n]},ey.invert=function(t,n){var e=1+R,i=I(e/2);return[2*t*i/(1+P(n*=i)),j((n+L(n))/e)]};var iy=3+2*cm;function ay(t,n){var e=L(t/=2),t=P(t),i=I(P(n)),a=P(n/=2),n=L(n)/(a+cm*t*i),r=I(2/(1+n*n)),a=I((cm*a+(t+e)*i)/(cm*a+(t-e)*i));return[iy*(r*(a-1/a)-2*im(a)),iy*(r*n*(a+1/a)-2*tm(n))]}ay.invert=function(t,n){if(!(e=bm.invert(t/1.2,1.065*n)))return null;var e,i=e[0],a=e[1],r=20;t/=iy,n/=iy;do{var o=i/2,s=a/2,l=L(o),o=P(o),u=L(s),s=P(s),h=P(a),c=I(h),g=u/(s+cm*o*c),d=g*g,f=I(2/(1+d)),p=(cm*s+(o+l)*c)/(cm*s+(o-l)*c),_=I(p),m=_-1/_,y=_+1/_,v=f*m-2*im(_)-t,b=f*g*y-2*tm(g)-n,x=u&&hm*c*l*d/u,w=(cm*o*s+c)/(2*(s+cm*o*c)*(s+cm*o*c)*c),S=-.5*g*f*f*f,C=S*x,S=S*w,k=(k=2*s+cm*c*(o-l))*k*_,o=(cm*o*s*c+h)/k,s=-cm*l*u/(c*k),h=m*C-2*o/_+f*(o+o/p),l=m*S-2*s/_+f*(s+s/p),u=g*y*C-2*x/(1+d)+f*y*x+f*g*(o-o/p),c=g*y*S-2*w/(1+d)+f*y*w+f*g*(s-s/p),k=l*u-c*h;if(!k)break;m=(b*l-v*c)/k,_=(v*u-b*h)/k}while(i-=m,a=am(-R,rm(R,a-_)),(N(m)>F||N(_)>F)&&0<--r);return N(N(a)-R)<F?[0,a]:r&&[i,a]};var ry=P(35*x);function oy(t,n){n=g(n/2);return[t*ry*I(1-n*n),(1+ry)*n]}function sy(t,n){var e=n/2,i=P(e);return[2*t/gm*P(n)*i*i,gm*g(e)]}function ly(a){var r=1-a,t=i(O,0)[0]-i(-O,0)[0],e=I(2*(i(0,R)[1]-i(0,-R)[1])/t);function i(t,n){var e=P(n),i=L(n);return[e/(r+a*e)*t,r*n+a*i]}function n(t,n){t=i(t,n);return[t[0]*e,t[1]/e]}function o(t){return n(0,t)[1]}return n.invert=function(t,n){n=Mm(o,n);return[t/e*(a+r/P(n)),n]},n}function uy(t){return[t[0]/2,j(g(t[1]/2*x))*m]}function hy(t){return[2*t[0],2*tm(L(t[1]*x))*m]}function cy(m,t){var y=2*O/t,v=m*m;function n(t,n){var t=N_(t,n),e=t[0],n=t[1],i=e*e+n*n;if(v<i){for(var a,r=I(i),i=b(n,e),o=y*sm(i/y),i=i-o,s=m*P(i),l=(m*L(i)-i*L(s))/(R-s),u=gy(i,l),h=(O-m)/dy(u,s,O),e=r,c=50;e-=a=(m+dy(u,s,e)*h-r)/(u(e)*h),N(a)>F&&0<--c;);n=i*L(e),e<R&&(n-=l*(e-R));i=L(o),l=P(o);t[0]=e*l-n*i,t[1]=e*i+n*l}return t}return n.invert=function(t,n){var e=t*t+n*n;if(v<e){for(var e=I(e),i=b(n,t),a=y*sm(i/y),r=i-a,o=(t=e*P(r),n=e*L(r),t-R),s=L(t),l=n/s,u=t<R?1/0:0,h=10;;){var c=m*L(l),g=m*P(l),d=L(g),f=R-g,p=(c-l*d)/f,_=gy(l,p);if(N(u)<lm||!--h)break;l-=u=(l*s-p*o-n)/(s-2*o*(f*(g+l*c*P(g)-d)-c*(c-l*d))/(f*f))}t=(e=m+dy(_,g,t)*(O-m)/dy(_,g,O))*P(i=a+l),n=e*L(i)}return N_.invert(t,n)},n}function gy(e,i){return function(t){var n=e*P(t);return t<R&&(n-=i),I(1+n*n)}}
5243
+ var s=g.slice();for(r=0;r<3;++r){var l=2==r?0:r+1,l=Gm(u[r].v[0],a[r][0],a[l][0]);a[r][1]<0&&(l=-l),r?1==r?(s[0]-=a[r][0]*P(l=h-l),s[1]-=a[r][0]*L(l)):(s[0]+=a[r][0]*P(l=c-l),s[1]+=a[r][0]*L(l)):(s[0]+=a[r][0]*P(l),s[1]-=a[r][0]*L(l))}return s[0]/=3,s[1]/=3,s}}function $m(t){return t[0]*=x,t[1]*=x,t}function qm(t,n,e){var i=p1({type:"MultiPoint",coordinates:[t,n,e]}),i=[-i[0],-i[1]],a=S1(i),t=Km($m(a(t)),$m(a(n)),$m(a(e))),n=(t.invert=zm(t),d(t).rotate(i)),r=n.center;return delete n.rotate,n.center=function(t){return arguments.length?r(a(t)):a.invert(r())},n.clipAngle(90)}function Um(t,n){n=I(1-L(n));return[2/dm*t*n,dm*(1-n)]}function Wm(t){var i=g(t);function n(t,n){return[t,(t?t/L(t):1)*(L(n)*P(t)-i*P(n))]}return n.invert=i?function(t,n){t&&(n*=L(t)/t);var e=P(t);return[t,2*b(I(e*e+i*i-n*n)-e,i-n)]}:function(t,n){return[t,j(t?n*g(t)/t:n)]},n}Um.invert=function(t,n){n=(n=n/dm-1)*n;return[0<n?t*I(O/n)/2:0,j(1-n)]};var Ym=I(3);function Vm(t,n){return[Ym*t*(2*P(2*n/3)-1)/dm,Ym*dm*L(n/3)]}function Zm(t){var e=P(t);function n(t,n){return[t*e,L(n)/e]}return n.invert=function(t,n){return[t/e,j(n*e)]},n}function Xm(t){var e=P(t);function n(t,n){return[t*e,(1+e)*g(n/2)]}return n.invert=function(t,n){return[t/e,2*nm(n/(1+e))]},n}function Jm(t,n){var e=I(8/(3*O));return[e*t*(1-N(n)/O),e*n]}function Qm(t,n){var e=I(4-3*L(N(n)));return[2/I(6*O)*t*e,y(n)*I(2*O/3)*(2-e)]}function ty(t,n){var e=I(O*(4+O));return[2/e*t*(1+I(1-4*n*n/(O*O))),4/e*n]}function ny(t,n){var e=(2+R)*L(n);n/=2;for(var i=0,a=1/0;i<10&&N(a)>F;i++){var r=P(n);n-=a=(n+L(n)*(r+2)-e)/(2*r*(1+r))}return[2/I(O*(4+O))*t*(1+P(n)),2*I(O/(4+O))*L(n)]}function ey(t,n){return[t*(1+P(n))/I(2+O),2*n/I(2+O)]}function iy(t,n){for(var e=(1+R)*L(n),i=0,a=1/0;i<10&&N(a)>F;i++)n-=a=(n+L(n)-e)/(1+P(n));return e=I(2+O),[t*(1+P(n))/e,2*n/e]}Vm.invert=function(t,n){n=3*j(n/(Ym*dm));return[dm*t/(Ym*(2*P(2*n/3)-1)),n]},Jm.invert=function(t,n){var e=I(8/(3*O)),n=n/e;return[t/(e*(1-N(n)/O)),n]},Qm.invert=function(t,n){var e=2-N(n)/I(2*O/3);return[t*I(6*O)/(2*e),y(n)*j((4-e*e)/3)]},ty.invert=function(t,n){var e=I(O*(4+O))/2;return[t*e/(1+I(1-n*n*(4+O)/(4*O))),n*e/2]},ny.invert=function(t,n){var n=n*I((4+O)/O)/2,e=j(n),i=P(e);return[t/(2/I(O*(4+O))*(1+i)),j((e+n*(i+2))/(2+R))]},ey.invert=function(t,n){var e=I(2+O),n=n*e/2;return[e*t/(1+P(n)),n]},iy.invert=function(t,n){var e=1+R,i=I(e/2);return[2*t*i/(1+P(n*=i)),j((n+L(n))/e)]};var ay=3+2*gm;function ry(t,n){var e=L(t/=2),t=P(t),i=I(P(n)),a=P(n/=2),n=L(n)/(a+gm*t*i),r=I(2/(1+n*n)),a=I((gm*a+(t+e)*i)/(gm*a+(t-e)*i));return[ay*(r*(a-1/a)-2*am(a)),ay*(r*n*(a+1/a)-2*nm(n))]}ry.invert=function(t,n){if(!(e=xm.invert(t/1.2,1.065*n)))return null;var e,i=e[0],a=e[1],r=20;t/=ay,n/=ay;do{var o=i/2,s=a/2,l=L(o),o=P(o),u=L(s),s=P(s),h=P(a),c=I(h),g=u/(s+gm*o*c),d=g*g,f=I(2/(1+d)),p=(gm*s+(o+l)*c)/(gm*s+(o-l)*c),_=I(p),m=_-1/_,y=_+1/_,v=f*m-2*am(_)-t,b=f*g*y-2*nm(g)-n,x=u&&cm*c*l*d/u,w=(gm*o*s+c)/(2*(s+gm*o*c)*(s+gm*o*c)*c),S=-.5*g*f*f*f,C=S*x,S=S*w,k=(k=2*s+gm*c*(o-l))*k*_,o=(gm*o*s*c+h)/k,s=-gm*l*u/(c*k),h=m*C-2*o/_+f*(o+o/p),l=m*S-2*s/_+f*(s+s/p),u=g*y*C-2*x/(1+d)+f*y*x+f*g*(o-o/p),c=g*y*S-2*w/(1+d)+f*y*w+f*g*(s-s/p),k=l*u-c*h;if(!k)break;m=(b*l-v*c)/k,_=(v*u-b*h)/k}while(i-=m,a=rm(-R,om(R,a-_)),(N(m)>F||N(_)>F)&&0<--r);return N(N(a)-R)<F?[0,a]:r&&[i,a]};var oy=P(35*x);function sy(t,n){n=g(n/2);return[t*oy*I(1-n*n),(1+oy)*n]}function ly(t,n){var e=n/2,i=P(e);return[2*t/dm*P(n)*i*i,dm*g(e)]}function uy(a){var r=1-a,t=i(O,0)[0]-i(-O,0)[0],e=I(2*(i(0,R)[1]-i(0,-R)[1])/t);function i(t,n){var e=P(n),i=L(n);return[e/(r+a*e)*t,r*n+a*i]}function n(t,n){t=i(t,n);return[t[0]*e,t[1]/e]}function o(t){return n(0,t)[1]}return n.invert=function(t,n){n=Em(o,n);return[t/e*(a+r/P(n)),n]},n}function hy(t){return[t[0]/2,j(g(t[1]/2*x))*m]}function cy(t){return[2*t[0],2*nm(L(t[1]*x))*m]}function gy(m,t){var y=2*O/t,v=m*m;function n(t,n){var t=P_(t,n),e=t[0],n=t[1],i=e*e+n*n;if(v<i){for(var a,r=I(i),i=b(n,e),o=y*lm(i/y),i=i-o,s=m*P(i),l=(m*L(i)-i*L(s))/(R-s),u=dy(i,l),h=(O-m)/fy(u,s,O),e=r,c=50;e-=a=(m+fy(u,s,e)*h-r)/(u(e)*h),N(a)>F&&0<--c;);n=i*L(e),e<R&&(n-=l*(e-R));i=L(o),l=P(o);t[0]=e*l-n*i,t[1]=e*i+n*l}return t}return n.invert=function(t,n){var e=t*t+n*n;if(v<e){for(var e=I(e),i=b(n,t),a=y*lm(i/y),r=i-a,o=(t=e*P(r),n=e*L(r),t-R),s=L(t),l=n/s,u=t<R?1/0:0,h=10;;){var c=m*L(l),g=m*P(l),d=L(g),f=R-g,p=(c-l*d)/f,_=dy(l,p);if(N(u)<um||!--h)break;l-=u=(l*s-p*o-n)/(s-2*o*(f*(g+l*c*P(g)-d)-c*(c-l*d))/(f*f))}t=(e=m+fy(_,g,t)*(O-m)/fy(_,g,O))*P(i=a+l),n=e*L(i)}return P_.invert(t,n)},n}function dy(e,i){return function(t){var n=e*P(t);return t<R&&(n-=i),I(1+n*n)}}
5248
5244
  // Numerical integration: trapezoidal rule.
5249
- function dy(t,n,e){for(var i=(e-n)/50,a=t(n)+t(e),r=1,o=n;r<50;++r)a+=2*t(o+=i);return.5*a*i}function fy(m,y,v,b,x,w,S,C){function t(t,n){var e,i,a;return n?(a=t*j((i=m+(e=n*n)*(y+e*(v+e*b)))/(i=(i*i+(i=n*(x-1+e*(w-C+e*S)))*i)/(2*i)))/O,[i*L(a),n*(1+e*C)+i*(1-P(a))]):[m*t/O,0]}return arguments.length<8&&(C=0),t.invert=function(t,n){var e=O*t/m,i=n,a=50;do{var r=i*i,o=m+r*(y+r*(v+r*b)),s=i*(x-1+r*(w-C+r*S)),l=o*o+s*s,u=2*s,h=l/u,c=h*h,g=j(o/h)/O,d=e*g,f=o*o,p=(2*y+r*(4*v+6*r*b))*i,_=x+r*(3*w+5*r*S),s=(2*(o*p+s*(_-1))*u-l*(2*(_-1)))/(u*u),l=P(d),_=L(d),u=h*l,d=h*_,f=e/O*(1/I(1-f/c))*(p*h-o*s)/c,p=d-t,o=i*(1+r*C)+h-u-n,c=s*_+u*f,r=u*g,h=1+s-(s*l-d*f),_=d*g,u=c*_-h*r}while(u&&(e-=s=(o*c-p*h)/u,i-=l=(p*_-o*r)/u,(N(s)>F||N(l)>F)&&0<--a));return[e,i]},t}oy.invert=function(t,n){n/=1+ry;return[t&&t/(ry*I(1-n*n)),2*tm(n)]},sy.invert=function(t,n){var n=tm(n/gm),e=P(n),n=2*n;return[t*gm/2/(P(n)*e*e),n]};var py=fy(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);var _y=fy(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);var my=fy(5/6*O,-.62636,-.0344,0,1.3493,-.05524,0,.045);function yy(t,n){var e=t*t,i=n*n;return[t*(1-.162388*i)*(.87-952426e-9*e*e),n*(1+i/12)]}yy.invert=function(t,n){var e,i=t,a=n,r=50;do{var o=a*a}while(a-=e=(a*(1+o/12)-n)/(1+o/4),N(e)>F&&0<--r);r=50,t/=1-.162388*o;do{var s=(s=i*i)*s}while(i-=e=(i*(.87-952426e-9*s)-t)/(.87-.00476213*s),N(e)>F&&0<--r);return[i,a]};var vy=fy(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function by(i){var a=i(R,0)[0]-i(-R,0)[0];function t(t,n){var e=0<t?-.5:.5,t=i(t+e*O,n);return t[0]-=e*a,t}return i.invert&&(t.invert=function(t,n){var e=0<t?-.5:.5,t=i.invert(t+e*a,n),n=t[0]-e*O;return n<-O?n+=2*O:O<n&&(n-=2*O),t[0]=n,t}),t}function xy(t,n){var e=y(t),i=y(n),a=P(n),r=P(t)*a,a=L(t)*a,o=L(i*n),a=(t=N(b(a,o)),n=j(r),N(t-R)>F&&(t%=R),((t,n)=>{if(n===R)return[0,0];var e,i,a=L(n),r=a*a,o=r*r,s=1+o,l=1+3*o,u=1-o,h=j(1/I(s)),c=u+r*s*h,g=(1-a)/c,d=I(g),f=g*s,p=I(f),_=d*u;if(0===t)return[0,-(_+r*p)];var m=P(n),y=1/m,v=2*a*m,b=-y*v,x=-y*(r*s*(m=(-c*m-(-3*r+h*l)*v*(1-a))/(c*c))+g*l*v),w=-2*y*(.5*m/d*u-2*r*d*v),S=4*t/O;
5245
+ function fy(t,n,e){for(var i=(e-n)/50,a=t(n)+t(e),r=1,o=n;r<50;++r)a+=2*t(o+=i);return.5*a*i}function py(m,y,v,b,x,w,S,C){function t(t,n){var e,i,a;return n?(a=t*j((i=m+(e=n*n)*(y+e*(v+e*b)))/(i=(i*i+(i=n*(x-1+e*(w-C+e*S)))*i)/(2*i)))/O,[i*L(a),n*(1+e*C)+i*(1-P(a))]):[m*t/O,0]}return arguments.length<8&&(C=0),t.invert=function(t,n){var e=O*t/m,i=n,a=50;do{var r=i*i,o=m+r*(y+r*(v+r*b)),s=i*(x-1+r*(w-C+r*S)),l=o*o+s*s,u=2*s,h=l/u,c=h*h,g=j(o/h)/O,d=e*g,f=o*o,p=(2*y+r*(4*v+6*r*b))*i,_=x+r*(3*w+5*r*S),s=(2*(o*p+s*(_-1))*u-l*(2*(_-1)))/(u*u),l=P(d),_=L(d),u=h*l,d=h*_,f=e/O*(1/I(1-f/c))*(p*h-o*s)/c,p=d-t,o=i*(1+r*C)+h-u-n,c=s*_+u*f,r=u*g,h=1+s-(s*l-d*f),_=d*g,u=c*_-h*r}while(u&&(e-=s=(o*c-p*h)/u,i-=l=(p*_-o*r)/u,(N(s)>F||N(l)>F)&&0<--a));return[e,i]},t}sy.invert=function(t,n){n/=1+oy;return[t&&t/(oy*I(1-n*n)),2*nm(n)]},ly.invert=function(t,n){var n=nm(n/dm),e=P(n),n=2*n;return[t*dm/2/(P(n)*e*e),n]};var _y=py(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);var my=py(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);var yy=py(5/6*O,-.62636,-.0344,0,1.3493,-.05524,0,.045);function vy(t,n){var e=t*t,i=n*n;return[t*(1-.162388*i)*(.87-952426e-9*e*e),n*(1+i/12)]}vy.invert=function(t,n){var e,i=t,a=n,r=50;do{var o=a*a}while(a-=e=(a*(1+o/12)-n)/(1+o/4),N(e)>F&&0<--r);r=50,t/=1-.162388*o;do{var s=(s=i*i)*s}while(i-=e=(i*(.87-952426e-9*s)-t)/(.87-.00476213*s),N(e)>F&&0<--r);return[i,a]};var by=py(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function xy(i){var a=i(R,0)[0]-i(-R,0)[0];function t(t,n){var e=0<t?-.5:.5,t=i(t+e*O,n);return t[0]-=e*a,t}return i.invert&&(t.invert=function(t,n){var e=0<t?-.5:.5,t=i.invert(t+e*a,n),n=t[0]-e*O;return n<-O?n+=2*O:O<n&&(n-=2*O),t[0]=n,t}),t}function wy(t,n){var e=y(t),i=y(n),a=P(n),r=P(t)*a,a=L(t)*a,o=L(i*n),a=(t=N(b(a,o)),n=j(r),N(t-R)>F&&(t%=R),((t,n)=>{if(n===R)return[0,0];var e,i,a=L(n),r=a*a,o=r*r,s=1+o,l=1+3*o,u=1-o,h=j(1/I(s)),c=u+r*s*h,g=(1-a)/c,d=I(g),f=g*s,p=I(f),_=d*u;if(0===t)return[0,-(_+r*p)];var m=P(n),y=1/m,v=2*a*m,b=-y*v,x=-y*(r*s*(m=(-c*m-(-3*r+h*l)*v*(1-a))/(c*c))+g*l*v),w=-2*y*(.5*m/d*u-2*r*d*v),S=4*t/O;
5250
5246
  // Slower but accurate bisection method.
5251
5247
  if(.222*O<t||n<O/4&&.175*O<t){if(e=(_+r*I(f*(1+o)-_*_))/(1+o),O/4<t)return[e,e];var C=e,k=.5*e;e=.5*(k+C),i=50;do{var A=I(f-e*e),A=e*(w+b*A)+x*j(e/p)-S}while(A&&(A<0?k=e:C=e,e=.5*(k+C),N(C-k)>F&&0<--i))}else{e=F,i=25;do{var M=e*e,E=I(f-M),z=w+b*E,T=e*z+x*j(e/p)-S,z=z+(x-b*M)/E}while(e-=M=E?T/z:0,N(M)>F&&0<--i)}return[e,-_-r*I(f-e*e)]})(O/4<t?R-t:t,n));return O/4<t&&(o=a[0],a[0]=-a[1],a[1]=-o),a[0]*=e,a[1]*=-i,a}
5252
5248
  // Returns [sn, cn, dn, ph](u|m).
5253
- function wy(t,n){var e,i,a,r;if(n<F)return[(a=L(t))-(e=n*(t-a*(u=P(t)))/4)*u,u+e*a,1-n*a*a/2,t-e];if(1-F<=n)return e=(1-n)/4,i=1/(u=_m(t)),[(a=((r=nm(2*(r=t)))-1)/(r+1))+e*((h=u*pm(t))-t)/(u*u),i-e*a*i*(h-t),i+e*a*i*(h+t),2*tm(nm(t))-R+e*(h-t)/u];for(var o=[1,0,0,0,0,0,0,0,0],s=[I(n),0,0,0,0,0,0,0,0],l=0,u=I(1-n),h=1;N(s[l]/o[l])>F&&l<8;)e=o[l++],s[l]=(e-u)/2,o[l]=(e+u)/2,u=I(e*u),h*=2;for(i=h*o[l]*t;i=(j(a=s[l]*L(u=i)/o[l])+i)/2,--l;);return[L(i),a=P(i),a/P(i-u),i]}
5249
+ function Sy(t,n){var e,i,a,r;if(n<F)return[(a=L(t))-(e=n*(t-a*(u=P(t)))/4)*u,u+e*a,1-n*a*a/2,t-e];if(1-F<=n)return e=(1-n)/4,i=1/(u=mm(t)),[(a=((r=em(2*(r=t)))-1)/(r+1))+e*((h=u*_m(t))-t)/(u*u),i-e*a*i*(h-t),i+e*a*i*(h+t),2*nm(em(t))-R+e*(h-t)/u];for(var o=[1,0,0,0,0,0,0,0,0],s=[I(n),0,0,0,0,0,0,0,0],l=0,u=I(1-n),h=1;N(s[l]/o[l])>F&&l<8;)e=o[l++],s[l]=(e-u)/2,o[l]=(e+u)/2,u=I(e*u),h*=2;for(i=h*o[l]*t;i=(j(a=s[l]*L(u=i)/o[l])+i)/2,--l;);return[L(i),a=P(i),a/P(i-u),i]}
5254
5250
  // Calculate F(phi+iPsi|m).
5255
5251
  // See Abramowitz and Stegun, 17.4.11.
5256
5252
  // Calculate F(phi|m) where m = k² = sin²α.
5257
5253
  // See Abramowitz and Stegun, 17.6.7.
5258
- function Sy(t,n){if(!n)return t;if(1===n)return im(g(t/2+um));for(var e,i=1,a=I(1-n),r=I(n),o=0;N(r)>F;o++)t%O?((e=tm(a*g(t)/i))<0&&(e+=O),t+=e+~~(t/O)*O):t+=t,r=(i+a)/2,a=I(i*a),r=((i=r)-a)/2;return t/(om(2,o)*i)}function Cy(t,n){var e,i=(cm-1)/(cm+1),a=I(1-i*i),r=Sy(R,a*a),o=im(g(O/4+N(n)/2)),o=nm(-1*o)/I(i),i=(i=o*P(-1*t),o=o*L(-1*t),t=o+1,[.5*((0<=i?R:-R)-b(o=1-(s=i*i)-o*o,2*i)),-.25*im(o*o+4*s)+.5*im(t*t+s)]),s=(o=i[1],t=a*a,a=N(s=i[0]),i=pm(N(o)),a?(e=1/L(a),e=(-(e=-((a=1/(g(a)*g(a)))+t*(i*i*e*e)-1+t))+I(e*e-4*((t-1)*a)))/2,[Sy(tm(1/I(e)),t)*y(s),Sy(tm(I((e/a-1)/t)),1-t)*y(o)]):[0,Sy(tm(i),1-t)*y(o)]);return[-s[1],(0<=n?1:-1)*(.5*r-s[0])]}function ky(t){var u=L(t),o=P(t),h=Ay(t);function n(t,n){var e=h(t,n),e=(t=e[0],L(n=e[1])),n=P(n),i=P(t),a=fm(u*e+o*n*i),r=L(a),a=N(r)>F?a/r:1;return[a*o*L(t),(N(t)>R?a:-a)*(u*n-o*e*i)]}return h.invert=Ay(-t),n.invert=function(t,n){var e=I(t*t+n*n),i=-L(e),a=P(e),r=e*a,o=-n*i,s=e*u,l=I(r*r+o*o-s*s),o=b(r*s+o*l,o*s-r*l),s=(R<e?-1:1)*b(t*i,e*P(o)*a+n*L(o)*i);return h.invert(s,o)},n}
5254
+ function Cy(t,n){if(!n)return t;if(1===n)return am(g(t/2+hm));for(var e,i=1,a=I(1-n),r=I(n),o=0;N(r)>F;o++)t%O?((e=nm(a*g(t)/i))<0&&(e+=O),t+=e+~~(t/O)*O):t+=t,r=(i+a)/2,a=I(i*a),r=((i=r)-a)/2;return t/(sm(2,o)*i)}function ky(t,n){var e,i=(gm-1)/(gm+1),a=I(1-i*i),r=Cy(R,a*a),o=am(g(O/4+N(n)/2)),o=em(-1*o)/I(i),i=(i=o*P(-1*t),o=o*L(-1*t),t=o+1,[.5*((0<=i?R:-R)-b(o=1-(s=i*i)-o*o,2*i)),-.25*am(o*o+4*s)+.5*am(t*t+s)]),s=(o=i[1],t=a*a,a=N(s=i[0]),i=_m(N(o)),a?(e=1/L(a),e=(-(e=-((a=1/(g(a)*g(a)))+t*(i*i*e*e)-1+t))+I(e*e-4*((t-1)*a)))/2,[Cy(nm(1/I(e)),t)*y(s),Cy(nm(I((e/a-1)/t)),1-t)*y(o)]):[0,Cy(nm(i),1-t)*y(o)]);return[-s[1],(0<=n?1:-1)*(.5*r-s[0])]}function Ay(t){var u=L(t),o=P(t),h=My(t);function n(t,n){var e=h(t,n),e=(t=e[0],L(n=e[1])),n=P(n),i=P(t),a=pm(u*e+o*n*i),r=L(a),a=N(r)>F?a/r:1;return[a*o*L(t),(N(t)>R?a:-a)*(u*n-o*e*i)]}return h.invert=My(-t),n.invert=function(t,n){var e=I(t*t+n*n),i=-L(e),a=P(e),r=e*a,o=-n*i,s=e*u,l=I(r*r+o*o-s*s),o=b(r*s+o*l,o*s-r*l),s=(R<e?-1:1)*b(t*i,e*P(o)*a+n*L(o)*i);return h.invert(s,o)},n}
5259
5255
  // Latitudinal rotation by phi0.
5260
5256
  // Temporary hack until D3 supports arbitrary small-circle clipping origins.
5261
- function Ay(t){var a=L(t),r=P(t);return function(t,n){var e=P(n),i=P(t)*e,t=L(t)*e,e=L(n);return[b(t,i*r-e*a),j(e*r+i*a)]}}xy.invert=function(t,n){1<N(t)&&(t=2*y(t)-t),1<N(n)&&(n=2*y(n)-n);var e=y(t),i=y(n),t=-e*t,n=-i*n,a=n/t<1,t=((t,n)=>{for(var e,i,a,r,o=0,s=1,l=.5,u=50;;){var h=l*l,c=I(l),g=j(1/I(1+h)),d=1-h+l*(1+h)*g,f=(1-c)/d,p=I(f),_=f*(1+h),m=p*(1-h),y=I(_-t*t),m=n+m+l*y;if(N(s-o)<lm||0==--u||0===m)break;0<m?o=l:s=l,l=.5*(o+s)}return u?(e=j(c),a=P(e),[O/4*(t*(-2*(i=1/a)*((1-h)*(.5*(r=(-d*a-(1-c)*((-3*l+g*(1+3*h))*(a=2*c*a)))/(d*d))/p)-2*l*p*a)+-i*a*y)+-i*(l*(1+h)*r+f*(1+3*h)*a)*j(t/I(_))),e]):null})(a?n:t,a?t:n),n=t[0],t=t[1],r=P(t);return[e*(b(L(n=a?-R-n:n)*r,-L(t))+O),i*j(P(n)*r)]},Cy.invert=function(t,n){var e=(cm-1)/(cm+1),i=I(1-e*e),a=Sy(R,i*i),n=(t=-t,i=i*i,(a=.5*a-n)?(a=wy(a,i),t?(n=(r=wy(t,1-i))[1]*r[1]+i*a[0]*a[0]*r[0]*r[0],[[a[0]*r[2]/n,a[1]*a[2]*r[0]*r[1]/n],[a[1]*r[1]/n,-a[0]*a[2]*r[0]*r[2]/n],[a[2]*r[1]*r[2]/n,-i*a[0]*a[1]*r[0]/n]]):[[a[0],0],[a[1],0],[a[2],0]]):[[0,(r=wy(t,1-i))[0]/r[1]],[1/r[1],0],[r[2]/r[1],0]]),r=(a=n[0],i=(t=n[1])[0]*t[0]+t[1]*t[1],[(a[0]*t[0]+a[1]*t[1])/i,(a[1]*t[0]-a[0]*t[1])/i]);return[b(r[1],r[0])/-1,2*tm(nm(-.5*im(e*r[0]*r[0]+e*r[1]*r[1])))-R]};var My=j(1-1/3)*m,Ey=Vm(0);function zy(r){var o=My*x,s=qm(O,o)[0]-qm(-O,o)[0],l=Ey(0,o)[1],u=qm(0,o)[1],h=gm-u,c=dm/r,g=4/dm,d=l+h*h*4/dm;function t(t,n){var e,i,a=N(n);return o<a?(i=rm(r-1,am(0,em((t+O)/c))),(e=qm(t+=O*(r-1)/r-i*c,a))[0]=e[0]*dm/s-dm*(r-1)/(2*r)+i*dm/r,e[1]=l+4*(e[1]-u)*h/dm,n<0&&(e[1]=-e[1])):e=Ey(t,n),e[0]*=g,e[1]/=d,e}return t.invert=function(t,n){t/=g;var e,i=N(n*=d);return l<i?(e=rm(r-1,am(0,em((t+O)/c))),t=(t+O*(r-1)/r-e*c)*s/dm,(i=qm.invert(t,.25*(i-l)*dm/h+u))[0]-=O*(r-1)/r-e*c,n<0&&(i[1]=-i[1]),i):Ey.invert(t,n)},t}function Ty(t,n){return[t,1&n?90-F:My]}function By(t,n){return[t,1&n?-90+F:-My]}function Dy(t){return[t[0]*(1-F),t[1]]}function Ny(c){var g,d=1+c,f=j(L(1/d)),p=2*I(O/(g=O+4*f*d)),_=.5*p*(d+I(c*(2+c))),m=c*c,y=d*d;function t(t,n){var e,i,a=1-L(n);if(a&&a<2){var r=R-n,o=25;do{var s=L(r),l=P(r),u=f+b(s,d-l),h=1+y-2*d*l}while(r-=l=(r-m*f-d*s+h*u-.5*a*g)/(2*d*s*u),N(l)>lm&&0<--o);e=p*I(h),i=t*u/O}else e=p*(c+a),i=t*f/O;return[e*L(i),_-e*P(i)]}return t.invert=function(t,n){var n=t*t+(n-=_)*n,e=(1+y-n/(p*p))/(2*d),i=fm(e),a=L(i),r=f+b(a,d-e);return[j(t/I(n))*O/r,j(1-2*(i-m*f-d*a+(1+y-2*d*e)*r)/g)]},t}var Py=.7109889596207567,Ly=.0528035274542;function Fy(t,n){return-.7109889596207567<n?((t=Dm(t,n))[1]+=Ly,t):Fm(t,n)}function Oy(t,n){return N(n)>Py?((t=Dm(t,n))[1]-=0<n?Ly:-.0528035274542,t):Fm(t,n)}function Ry(n,e,i,t){var a=I(4*O/(2*i+(1+n-e/2)*L(2*i)+(n+e)/2*L(4*i)+e/2*L(6*i))),r=I(t*L(i)*I((1+n*P(2*i)+e*P(4*i))/(1+n+e))),o=i*l(1);function s(t){return I(1+n*P(2*t)+e*P(4*t))}function l(t){t*=i;return(2*t+(1+n-e/2)*L(2*t)+(n+e)/2*L(4*t)+e/2*L(6*t))/i}function u(t){return s(t)*L(t)}var h=function(t,n){var e=i*Mm(l,o*L(n)/i,n/O),n=(isNaN(e)&&(e=i*y(n)),a*s(e));return[n*r*t/O*P(e),n/r*L(e)]};return h.invert=function(t,n){n=Mm(u,n*r/a);return[t*O/(P(n)*a*r*s(n)),j(i*l(n/i)/o)]},0===i&&(a=I(t/O),(h=function(t,n){return[t*a,L(n)/a]}).invert=function(t,n){return[t/a,j(n*a)]}),h}function jy(t,n,e,i,a){void 0===a&&(a=20);var r=t(n),o=t(.5*(n+e)),s=t(e);
5257
+ function My(t){var a=L(t),r=P(t);return function(t,n){var e=P(n),i=P(t)*e,t=L(t)*e,e=L(n);return[b(t,i*r-e*a),j(e*r+i*a)]}}wy.invert=function(t,n){1<N(t)&&(t=2*y(t)-t),1<N(n)&&(n=2*y(n)-n);var e=y(t),i=y(n),t=-e*t,n=-i*n,a=n/t<1,t=((t,n)=>{for(var e,i,a,r,o=0,s=1,l=.5,u=50;;){var h=l*l,c=I(l),g=j(1/I(1+h)),d=1-h+l*(1+h)*g,f=(1-c)/d,p=I(f),_=f*(1+h),m=p*(1-h),y=I(_-t*t),m=n+m+l*y;if(N(s-o)<um||0==--u||0===m)break;0<m?o=l:s=l,l=.5*(o+s)}return u?(e=j(c),a=P(e),[O/4*(t*(-2*(i=1/a)*((1-h)*(.5*(r=(-d*a-(1-c)*((-3*l+g*(1+3*h))*(a=2*c*a)))/(d*d))/p)-2*l*p*a)+-i*a*y)+-i*(l*(1+h)*r+f*(1+3*h)*a)*j(t/I(_))),e]):null})(a?n:t,a?t:n),n=t[0],t=t[1],r=P(t);return[e*(b(L(n=a?-R-n:n)*r,-L(t))+O),i*j(P(n)*r)]},ky.invert=function(t,n){var e=(gm-1)/(gm+1),i=I(1-e*e),a=Cy(R,i*i),n=(t=-t,i=i*i,(a=.5*a-n)?(a=Sy(a,i),t?(n=(r=Sy(t,1-i))[1]*r[1]+i*a[0]*a[0]*r[0]*r[0],[[a[0]*r[2]/n,a[1]*a[2]*r[0]*r[1]/n],[a[1]*r[1]/n,-a[0]*a[2]*r[0]*r[2]/n],[a[2]*r[1]*r[2]/n,-i*a[0]*a[1]*r[0]/n]]):[[a[0],0],[a[1],0],[a[2],0]]):[[0,(r=Sy(t,1-i))[0]/r[1]],[1/r[1],0],[r[2]/r[1],0]]),r=(a=n[0],i=(t=n[1])[0]*t[0]+t[1]*t[1],[(a[0]*t[0]+a[1]*t[1])/i,(a[1]*t[0]-a[0]*t[1])/i]);return[b(r[1],r[0])/-1,2*nm(em(-.5*am(e*r[0]*r[0]+e*r[1]*r[1])))-R]};var Ey=j(1-1/3)*m,zy=Zm(0);function Ty(r){var o=Ey*x,s=Um(O,o)[0]-Um(-O,o)[0],l=zy(0,o)[1],u=Um(0,o)[1],h=dm-u,c=fm/r,g=4/fm,d=l+h*h*4/fm;function t(t,n){var e,i,a=N(n);return o<a?(i=om(r-1,rm(0,im((t+O)/c))),(e=Um(t+=O*(r-1)/r-i*c,a))[0]=e[0]*fm/s-fm*(r-1)/(2*r)+i*fm/r,e[1]=l+4*(e[1]-u)*h/fm,n<0&&(e[1]=-e[1])):e=zy(t,n),e[0]*=g,e[1]/=d,e}return t.invert=function(t,n){t/=g;var e,i=N(n*=d);return l<i?(e=om(r-1,rm(0,im((t+O)/c))),t=(t+O*(r-1)/r-e*c)*s/fm,(i=Um.invert(t,.25*(i-l)*fm/h+u))[0]-=O*(r-1)/r-e*c,n<0&&(i[1]=-i[1]),i):zy.invert(t,n)},t}function By(t,n){return[t,1&n?90-F:Ey]}function Dy(t,n){return[t,1&n?-90+F:-Ey]}function Ny(t){return[t[0]*(1-F),t[1]]}function Py(c){var g,d=1+c,f=j(L(1/d)),p=2*I(O/(g=O+4*f*d)),_=.5*p*(d+I(c*(2+c))),m=c*c,y=d*d;function t(t,n){var e,i,a=1-L(n);if(a&&a<2){var r=R-n,o=25;do{var s=L(r),l=P(r),u=f+b(s,d-l),h=1+y-2*d*l}while(r-=l=(r-m*f-d*s+h*u-.5*a*g)/(2*d*s*u),N(l)>um&&0<--o);e=p*I(h),i=t*u/O}else e=p*(c+a),i=t*f/O;return[e*L(i),_-e*P(i)]}return t.invert=function(t,n){var n=t*t+(n-=_)*n,e=(1+y-n/(p*p))/(2*d),i=pm(e),a=L(i),r=f+b(a,d-e);return[j(t/I(n))*O/r,j(1-2*(i-m*f-d*a+(1+y-2*d*e)*r)/g)]},t}var Ly=.7109889596207567,Fy=.0528035274542;function Oy(t,n){return-.7109889596207567<n?((t=Nm(t,n))[1]+=Fy,t):Om(t,n)}function Ry(t,n){return N(n)>Ly?((t=Nm(t,n))[1]-=0<n?Fy:-.0528035274542,t):Om(t,n)}function jy(n,e,i,t){var a=I(4*O/(2*i+(1+n-e/2)*L(2*i)+(n+e)/2*L(4*i)+e/2*L(6*i))),r=I(t*L(i)*I((1+n*P(2*i)+e*P(4*i))/(1+n+e))),o=i*l(1);function s(t){return I(1+n*P(2*t)+e*P(4*t))}function l(t){t*=i;return(2*t+(1+n-e/2)*L(2*t)+(n+e)/2*L(4*t)+e/2*L(6*t))/i}function u(t){return s(t)*L(t)}var h=function(t,n){var e=i*Em(l,o*L(n)/i,n/O),n=(isNaN(e)&&(e=i*y(n)),a*s(e));return[n*r*t/O*P(e),n/r*L(e)]};return h.invert=function(t,n){n=Em(u,n*r/a);return[t*O/(P(n)*a*r*s(n)),j(i*l(n/i)/o)]},0===i&&(a=I(t/O),(h=function(t,n){return[t*a,L(n)/a]}).invert=function(t,n){return[t/a,j(n*a)]}),h}function Iy(t,n,e,i,a){void 0===a&&(a=20);var r=t(n),o=t(.5*(n+e)),s=t(e);
5262
5258
  /*
5263
5259
  if (state.maxDepthCount > 0 && console && console.warn) {
5264
5260
  console.warn('integrate-adaptive-simpson: Warning: maximum recursion depth (' + maxdepth + ') reached ' + state.maxDepthCount + ' times');
@@ -5275,74 +5271,74 @@ return function t(n,e,i,a,r,o,s,l,u,h,c){if(c.nanEncountered)return NaN;var g,d,
5275
5271
  // Simple check for NaN:
5276
5272
  if(!isNaN(_)&&!isNaN(m))return s=((f=(g=p*(a+4*_+r)/12)+(d=p*(r+4*m+o)/12))-s)/15,u<h?(c.maxDepthCount++,f+s):Math.abs(s)<l?f+s:(s=t(n,e,f=e+.5*p,a,_,r,g,.5*l,u,h+1,c),isNaN(s)||(e=t(n,f,i,r,m,o,d,.5*l,u,h+1,c),isNaN(e))?(c.nanEncountered=!0,NaN):s+e);
5277
5273
  // Simple check for NaN:
5278
- c.nanEncountered=!0}(t,n,e,r,o,s,(r+4*o+s)*(e-n)/6,i,a,1,{maxDepthCount:0,nanEncountered:!1})}function Iy(n,e,t){function i(t){return n+(1-n)*om(1-om(t,e),1/e)}function a(t){return jy(i,0,t,1e-4)}for(var r=1/a(1),o=(1+1e-8)*r,s=[],l=0;l<=1e3;l++)s.push(a(l/1e3)*o);function u(t){for(var n=0,e=1e3,i=500;t<s[i]?e=i:n=i,n<(i=n+e>>1););var a=s[i+1]-s[i];return(i+1+(a=a&&(t-s[i+1])/a))/1e3}function h(t,n){var e=u(N(L(n))),t=i(e)*t;return e/=c,[t,0<=n?e:-e]}var c=2*u(1)/O*r/t;return h.invert=function(t,n){var e;return N(n*=c)<1&&(e=y(n)*j(a(N(n))*r)),[t/i(N(n)),e]},h}function Hy(t,n){for(var e=-1,i=t.length,a=t[0],r=[];++e<i;){for(var o,s=((o=t[e])[0]-a[0])/n,l=(o[1]-a[1])/n,u=0;u<n;++u)r.push([a[0]+u*s,a[1]+u*l]);a=o}return r.push(o),r}function Gy(u,h,t){var a,c;function g(t,n){for(var e=n<0?-1:1,i=h[+(n<0)],a=0,r=i.length-1;a<r&&t>i[a][2][0];++a);var o=u(t-i[a][1][0],n);return o[0]+=u(i[a][1][0],e*n>e*i[a][0][1]?i[a][0][1]:n)[0],o}t?g.invert=t(g):u.invert&&(g.invert=function(t,n){for(var e,i,a=c[+(n<0)],r=h[+(n<0)],o=0,s=a.length;o<s;++o){var l=a[o];if(l[0][0]<=t&&t<l[1][0]&&l[0][1]<=n&&n<l[1][1])return(l=u.invert(t-u(r[o][1][0],0)[0],n))[0]+=r[o][1][0],e=g(l[0],l[1]),i=[t,n],N(e[0]-i[0])<F&&N(e[1]-i[1])<F?l:null}});var r=d(g),o=r.stream;return r.stream=function(t){var n=r.rotate(),e=o(t),i=(r.rotate([0,0]),o(t));return r.rotate(n),e.sphere=function(){X0(a,i)},e},r.lobes=function(t){return arguments.length?(a=(t=>{
5274
+ c.nanEncountered=!0}(t,n,e,r,o,s,(r+4*o+s)*(e-n)/6,i,a,1,{maxDepthCount:0,nanEncountered:!1})}function Hy(n,e,t){function i(t){return n+(1-n)*sm(1-sm(t,e),1/e)}function a(t){return Iy(i,0,t,1e-4)}for(var r=1/a(1),o=(1+1e-8)*r,s=[],l=0;l<=1e3;l++)s.push(a(l/1e3)*o);function u(t){for(var n=0,e=1e3,i=500;t<s[i]?e=i:n=i,n<(i=n+e>>1););var a=s[i+1]-s[i];return(i+1+(a=a&&(t-s[i+1])/a))/1e3}function h(t,n){var e=u(N(L(n))),t=i(e)*t;return e/=c,[t,0<=n?e:-e]}var c=2*u(1)/O*r/t;return h.invert=function(t,n){var e;return N(n*=c)<1&&(e=y(n)*j(a(N(n))*r)),[t/i(N(n)),e]},h}function Gy(t,n){for(var e=-1,i=t.length,a=t[0],r=[];++e<i;){for(var o,s=((o=t[e])[0]-a[0])/n,l=(o[1]-a[1])/n,u=0;u<n;++u)r.push([a[0]+u*s,a[1]+u*l]);a=o}return r.push(o),r}function Ky(u,h,t){var a,c;function g(t,n){for(var e=n<0?-1:1,i=h[+(n<0)],a=0,r=i.length-1;a<r&&t>i[a][2][0];++a);var o=u(t-i[a][1][0],n);return o[0]+=u(i[a][1][0],e*n>e*i[a][0][1]?i[a][0][1]:n)[0],o}t?g.invert=t(g):u.invert&&(g.invert=function(t,n){for(var e,i,a=c[+(n<0)],r=h[+(n<0)],o=0,s=a.length;o<s;++o){var l=a[o];if(l[0][0]<=t&&t<l[1][0]&&l[0][1]<=n&&n<l[1][1])return(l=u.invert(t-u(r[o][1][0],0)[0],n))[0]+=r[o][1][0],e=g(l[0],l[1]),i=[t,n],N(e[0]-i[0])<F&&N(e[1]-i[1])<F?l:null}});var r=d(g),o=r.stream;return r.stream=function(t){var n=r.rotate(),e=o(t),i=(r.rotate([0,0]),o(t));return r.rotate(n),e.sphere=function(){J0(a,i)},e},r.lobes=function(t){return arguments.length?(a=(t=>{
5279
5275
  // Northern Hemisphere
5280
- for(var n,e,i,a,r,o,s=[],l=t[0].length,u=0;u<l;++u)e=(n=t[0][u])[0][0],i=n[0][1],a=n[1][1],r=n[2][0],o=n[2][1],s.push(Hy([[e+F,i+F],[e+F,a-F],[r-F,a-F],[r-F,o+F]],30));
5276
+ for(var n,e,i,a,r,o,s=[],l=t[0].length,u=0;u<l;++u)e=(n=t[0][u])[0][0],i=n[0][1],a=n[1][1],r=n[2][0],o=n[2][1],s.push(Gy([[e+F,i+F],[e+F,a-F],[r-F,a-F],[r-F,o+F]],30));
5281
5277
  // Southern Hemisphere
5282
- for(u=t[1].length-1;0<=u;--u)e=(n=t[1][u])[0][0],i=n[0][1],a=n[1][1],r=n[2][0],o=n[2][1],s.push(Hy([[r-F,o-F],[r-F,a+F],[e+F,a+F],[e+F,i-F]],30));return{type:"Polygon",coordinates:[ii(s)]}})(t),h=t.map(function(t){return t.map(function(t){return[[t[0][0]*x,t[0][1]*x],[t[1][0]*x,t[1][1]*x],[t[2][0]*x,t[2][1]*x]]})}),c=h.map(function(t){return t.map(function(t){var n,e=u(t[0][0],t[0][1])[0],i=u(t[2][0],t[2][1])[0],a=u(t[1][0],t[0][1])[1],t=u(t[1][0],t[1][1])[1];return t<a&&(n=a,a=t,t=n),[[e,a],[i,t]]})}),r):h.map(function(t){return t.map(function(t){return[[t[0][0]*m,t[0][1]*m],[t[1][0]*m,t[1][1]*m],[t[2][0]*m,t[2][1]*m]]})})},null!=h&&r.lobes(h),r}Fy.invert=function(t,n){return-.7109889596207567<n?Dm.invert(t,n-Ly):Fm.invert(t,n)},Oy.invert=function(t,n){return N(n)>Py?Dm.invert(t,n+(0<n?Ly:-.0528035274542)):Fm.invert(t,n)};var Ky=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var $y=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var qy=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var Uy=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];var Wy=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];var Yy=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Vy(t,n){return[3/dm*t*I(O*O/3-n*n),n]}function Zy(a){function t(t,n){var e;return N(N(n)-R)<F?[0,n<0?-2:2]:(n=L(n),e=.5*((n=om((1+n)/(1-n),a/2))+1/n)+P(t*=a),[2*L(t)/e,(n-1/n)/e])}return t.invert=function(t,n){var e,i=N(n);return N(i-2)<F?t?null:[0,y(n)*R]:2<i?null:(i=(t/=2)*t,e=(n/=2)*n,// tanh(nPhi)
5283
- n=om((1+(n=2*n/(1+i+e)))/(1-n),1/a),[b(2*t,1-i-e)/a,j((n-1)/(n+1))])},t}Vy.invert=function(t,n){return[dm/3*t/I(O*O/3-n*n),n]};var Xy=O/cm;function Jy(t,n){return[t*(1+I(P(n)))/2,n/(P(n/2)*P(t/6))]}function Qy(t,n){var e=t*t,i=n*n;return[t*(.975534+i*(-.0143059*e-.119161+-.0547009*i)),n*(1.00384+e*(.0802894+-.02855*i+199025e-9*e)+i*(.0998909+-.0491032*i))]}function tv(t,n){return[L(t)/P(n),g(n)*P(t)]}function nv(a){var r=P(a),o=g(um+a/2);function t(t,n){var e=n-a,i=N(e)<F?t*r:N(i=um+n/2)<F||N(N(i)-R)<F?0:t*e/im(g(i)/o);return[i,e]}return t.invert=function(t,n){var e,i=n+a;return[N(n)<F?t/r:N(e=um+i/2)<F||N(N(e)-R)<F?0:t*im(g(e)/o)/n,i]},t}function ev(t,n){return[t,1.25*im(g(um+.4*n))]}function iv(m){var y=m.length-1;function t(t,n){for(var e,i=P(n),a=2/(1+i*P(t)),r=a*i*L(t),o=a*L(n),s=y,l=m[s],u=l[0],h=l[1];0<=--s;)u=(l=m[s])[0]+r*(e=u)-o*h,h=l[1]+r*h+o*e;return[u=r*(e=u)-o*h,h=r*h+o*e]}return t.invert=function(t,n){var e,i,a,r=20,o=t,s=n;do{for(var l,u=y,h=m[u],c=h[0],g=h[1],d=0,f=0;0<=--u;)d=c+o*(l=d)-s*f,f=g+o*f+s*l,c=(h=m[u])[0]+o*(l=c)-s*g,g=h[1]+o*g+s*l;var p,_=(d=c+o*(l=d)-s*f)*d+(f=g+o*f+s*l)*f}while(o-=p=((c=o*(l=c)-s*g-t)*d+(g=o*g+s*l-n)*f)/_,s-=_=(g*d-c*f)/_,N(p)+N(_)>F*F&&0<--r);if(r)return e=I(o*o+s*s),i=2*tm(.5*e),a=L(i),[b(o*a,e*P(i)),e?j(s*a/e):0]},t}Jy.invert=function(t,n){var e=N(t),i=N(n),a=F,r=R;i<Xy?r*=i/Xy:a+=6*fm(Xy/i);for(var o=0;o<25;o++){var s=L(r),l=I(P(r)),u=L(r/2),h=P(r/2),c=L(a/6),g=P(a/6),d=.5*a*(1+l)-e,f=r/(h*g)-i,s=l?-.25*a*s/l:0,l=.5*(1+l),u=(1+.5*r*u/h)/(h*g),h=r/h*(c/6)/(g*g),c=s*h-u*l,g=(d*h-f*l)/c,h=(f*s-d*u)/c;if(r-=g,a-=h,N(g)<F&&N(h)<F)break}return[t<0?-a:a,n<0?-r:r]},Qy.invert=function(t,n){var e=y(t)*O,i=n/2,a=50;do{var r=e*e,o=i*i,s=e*i,l=e*(.975534+o*(-.0143059*r-.119161+-.0547009*o))-t,u=i*(1.00384+r*(.0802894+-.02855*o+199025e-9*r)+o*(.0998909+-.0491032*o))-n,h=.975534-o*(.119161+3*r*.0143059+.0547009*o),c=-s*(.238322+.2188036*o+.0286118*r),s=s*(.1605788+7961e-7*r+-.0571*o),r=1.00384+r*(.0802894+199025e-9*r)+o*(3*(.0998909-.02855*r)-.245516*o),o=c*s-r*h,c=(u*c-l*r)/o,r=(l*s-u*h)/o}while(e-=c,i-=r,(N(c)>F||N(r)>F)&&0<--a);return a&&[e,i]},tv.invert=function(t,n){var e=t*t,i=1+n*n,a=e+i,a=t?hm*I((a-I(a*a-4*e))/e):1/I(i);return[j(t*a),y(n)*fm(a)]},ev.invert=function(t,n){return[t,2.5*tm(nm(.8*n))-.625*O]};var av=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],rv=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],ov=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],sv=[[.9245,0],[0,0],[.01943,0]],lv=[[.721316,0],[0,0],[-.00881625,-.00617325]];function uv(t,n){var t=d(iv(t)).rotate(n).clipAngle(90),e=w1(n),i=t.center;return delete t.rotate,t.center=function(t){return arguments.length?i(e(t)):e.invert(i())},t}var hv=I(6),cv=I(7);function gv(t,n){n=j(7*L(n)/(3*hv));return[hv*t*(2*P(2*n/3)-1)/cv,9*L(n/3)/cv]}function dv(t,n){for(var e,i=(1+hm)*L(n),a=n,r=0;r<25&&(a-=e=(L(a/2)+L(a)-i)/(.5*P(a/2)+P(a)),!(N(e)<F));r++);return[t*(1+2*P(a)/P(a/2))/(3*cm),2*I(3)*L(a/2)/I(2+cm)]}function fv(t,n){for(var e,i=I(6/(4+O)),a=(1+O/4)*L(n),r=n/2,o=0;o<25&&(r-=e=(r/2+L(r)-a)/(.5+P(r)),!(N(e)<F));o++);return[i*(.5+P(r))*t/1.5,i*r]}function pv(t,n){var e=n*n,i=e*e,a=e*i;return[t*(.84719-.13063*e+a*a*(.05494*e-.04515-.02326*i+.00331*a)),n*(1.01183+i*i*(.01926*e-.02625-.00396*i))]}function _v(t,n){return[t*(1+P(n))/2,2*(n-g(n/2))]}gv.invert=function(t,n){n=3*j(n*cv/9);return[t*cv/(hv*(2*P(2*n/3)-1)),j(3*L(n)*hv/7)]},dv.invert=function(t,n){var n=n*I(2+cm)/(2*I(3)),e=2*j(n);return[3*cm*t/(1+2*P(e)/P(e/2)),j((n+L(e))/(1+hm))]},fv.invert=function(t,n){var e=I(6/(4+O)),n=n/e;return N(N(n)-R)<F&&(n=n<0?-R:R),[1.5*t/(e*(.5+P(n))),j((n/2+L(n))/(1+O/4))]},pv.invert=function(t,n){for(var e,i,a,r=n,o=25;r-=e=(r*(1.01183+(a=(i=r*r)*i)*a*(.01926*i-.02625-.00396*a))-n)/(1.01183+a*a*(.21186*i-.23625+-.05148*a)),N(e)>lm&&0<--o;);return[t/(.84719-.13063*(i=r*r)+(t=i*(a=i*i))*t*(.05494*i-.04515-.02326*a+.00331*t)),r]},_v.invert=function(t,n){for(var e=n/2,i=0,a=1/0;i<10&&N(a)>F;++i){var r=P(n/2);n-=a=(n-g(n/2)-e)/(1-.5/(r*r))}return[2*t/(1+P(n)),n]};var mv=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];
5278
+ for(u=t[1].length-1;0<=u;--u)e=(n=t[1][u])[0][0],i=n[0][1],a=n[1][1],r=n[2][0],o=n[2][1],s.push(Gy([[r-F,o-F],[r-F,a+F],[e+F,a+F],[e+F,i-F]],30));return{type:"Polygon",coordinates:[ii(s)]}})(t),h=t.map(function(t){return t.map(function(t){return[[t[0][0]*x,t[0][1]*x],[t[1][0]*x,t[1][1]*x],[t[2][0]*x,t[2][1]*x]]})}),c=h.map(function(t){return t.map(function(t){var n,e=u(t[0][0],t[0][1])[0],i=u(t[2][0],t[2][1])[0],a=u(t[1][0],t[0][1])[1],t=u(t[1][0],t[1][1])[1];return t<a&&(n=a,a=t,t=n),[[e,a],[i,t]]})}),r):h.map(function(t){return t.map(function(t){return[[t[0][0]*m,t[0][1]*m],[t[1][0]*m,t[1][1]*m],[t[2][0]*m,t[2][1]*m]]})})},null!=h&&r.lobes(h),r}Oy.invert=function(t,n){return-.7109889596207567<n?Nm.invert(t,n-Fy):Om.invert(t,n)},Ry.invert=function(t,n){return N(n)>Ly?Nm.invert(t,n+(0<n?Fy:-.0528035274542)):Om.invert(t,n)};var $y=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var qy=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var Uy=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];var Wy=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];var Yy=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];var Vy=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Zy(t,n){return[3/fm*t*I(O*O/3-n*n),n]}function Xy(a){function t(t,n){var e;return N(N(n)-R)<F?[0,n<0?-2:2]:(n=L(n),e=.5*((n=sm((1+n)/(1-n),a/2))+1/n)+P(t*=a),[2*L(t)/e,(n-1/n)/e])}return t.invert=function(t,n){var e,i=N(n);return N(i-2)<F?t?null:[0,y(n)*R]:2<i?null:(i=(t/=2)*t,e=(n/=2)*n,// tanh(nPhi)
5279
+ n=sm((1+(n=2*n/(1+i+e)))/(1-n),1/a),[b(2*t,1-i-e)/a,j((n-1)/(n+1))])},t}Zy.invert=function(t,n){return[fm/3*t/I(O*O/3-n*n),n]};var Jy=O/gm;function Qy(t,n){return[t*(1+I(P(n)))/2,n/(P(n/2)*P(t/6))]}function tv(t,n){var e=t*t,i=n*n;return[t*(.975534+i*(-.0143059*e-.119161+-.0547009*i)),n*(1.00384+e*(.0802894+-.02855*i+199025e-9*e)+i*(.0998909+-.0491032*i))]}function nv(t,n){return[L(t)/P(n),g(n)*P(t)]}function ev(a){var r=P(a),o=g(hm+a/2);function t(t,n){var e=n-a,i=N(e)<F?t*r:N(i=hm+n/2)<F||N(N(i)-R)<F?0:t*e/am(g(i)/o);return[i,e]}return t.invert=function(t,n){var e,i=n+a;return[N(n)<F?t/r:N(e=hm+i/2)<F||N(N(e)-R)<F?0:t*am(g(e)/o)/n,i]},t}function iv(t,n){return[t,1.25*am(g(hm+.4*n))]}function av(m){var y=m.length-1;function t(t,n){for(var e,i=P(n),a=2/(1+i*P(t)),r=a*i*L(t),o=a*L(n),s=y,l=m[s],u=l[0],h=l[1];0<=--s;)u=(l=m[s])[0]+r*(e=u)-o*h,h=l[1]+r*h+o*e;return[u=r*(e=u)-o*h,h=r*h+o*e]}return t.invert=function(t,n){var e,i,a,r=20,o=t,s=n;do{for(var l,u=y,h=m[u],c=h[0],g=h[1],d=0,f=0;0<=--u;)d=c+o*(l=d)-s*f,f=g+o*f+s*l,c=(h=m[u])[0]+o*(l=c)-s*g,g=h[1]+o*g+s*l;var p,_=(d=c+o*(l=d)-s*f)*d+(f=g+o*f+s*l)*f}while(o-=p=((c=o*(l=c)-s*g-t)*d+(g=o*g+s*l-n)*f)/_,s-=_=(g*d-c*f)/_,N(p)+N(_)>F*F&&0<--r);if(r)return e=I(o*o+s*s),i=2*nm(.5*e),a=L(i),[b(o*a,e*P(i)),e?j(s*a/e):0]},t}Qy.invert=function(t,n){var e=N(t),i=N(n),a=F,r=R;i<Jy?r*=i/Jy:a+=6*pm(Jy/i);for(var o=0;o<25;o++){var s=L(r),l=I(P(r)),u=L(r/2),h=P(r/2),c=L(a/6),g=P(a/6),d=.5*a*(1+l)-e,f=r/(h*g)-i,s=l?-.25*a*s/l:0,l=.5*(1+l),u=(1+.5*r*u/h)/(h*g),h=r/h*(c/6)/(g*g),c=s*h-u*l,g=(d*h-f*l)/c,h=(f*s-d*u)/c;if(r-=g,a-=h,N(g)<F&&N(h)<F)break}return[t<0?-a:a,n<0?-r:r]},tv.invert=function(t,n){var e=y(t)*O,i=n/2,a=50;do{var r=e*e,o=i*i,s=e*i,l=e*(.975534+o*(-.0143059*r-.119161+-.0547009*o))-t,u=i*(1.00384+r*(.0802894+-.02855*o+199025e-9*r)+o*(.0998909+-.0491032*o))-n,h=.975534-o*(.119161+3*r*.0143059+.0547009*o),c=-s*(.238322+.2188036*o+.0286118*r),s=s*(.1605788+7961e-7*r+-.0571*o),r=1.00384+r*(.0802894+199025e-9*r)+o*(3*(.0998909-.02855*r)-.245516*o),o=c*s-r*h,c=(u*c-l*r)/o,r=(l*s-u*h)/o}while(e-=c,i-=r,(N(c)>F||N(r)>F)&&0<--a);return a&&[e,i]},nv.invert=function(t,n){var e=t*t,i=1+n*n,a=e+i,a=t?cm*I((a-I(a*a-4*e))/e):1/I(i);return[j(t*a),y(n)*pm(a)]},iv.invert=function(t,n){return[t,2.5*nm(em(.8*n))-.625*O]};var rv=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],ov=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],sv=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],lv=[[.9245,0],[0,0],[.01943,0]],uv=[[.721316,0],[0,0],[-.00881625,-.00617325]];function hv(t,n){var t=d(av(t)).rotate(n).clipAngle(90),e=S1(n),i=t.center;return delete t.rotate,t.center=function(t){return arguments.length?i(e(t)):e.invert(i())},t}var cv=I(6),gv=I(7);function dv(t,n){n=j(7*L(n)/(3*cv));return[cv*t*(2*P(2*n/3)-1)/gv,9*L(n/3)/gv]}function fv(t,n){for(var e,i=(1+cm)*L(n),a=n,r=0;r<25&&(a-=e=(L(a/2)+L(a)-i)/(.5*P(a/2)+P(a)),!(N(e)<F));r++);return[t*(1+2*P(a)/P(a/2))/(3*gm),2*I(3)*L(a/2)/I(2+gm)]}function pv(t,n){for(var e,i=I(6/(4+O)),a=(1+O/4)*L(n),r=n/2,o=0;o<25&&(r-=e=(r/2+L(r)-a)/(.5+P(r)),!(N(e)<F));o++);return[i*(.5+P(r))*t/1.5,i*r]}function _v(t,n){var e=n*n,i=e*e,a=e*i;return[t*(.84719-.13063*e+a*a*(.05494*e-.04515-.02326*i+.00331*a)),n*(1.01183+i*i*(.01926*e-.02625-.00396*i))]}function mv(t,n){return[t*(1+P(n))/2,2*(n-g(n/2))]}dv.invert=function(t,n){n=3*j(n*gv/9);return[t*gv/(cv*(2*P(2*n/3)-1)),j(3*L(n)*cv/7)]},fv.invert=function(t,n){var n=n*I(2+gm)/(2*I(3)),e=2*j(n);return[3*gm*t/(1+2*P(e)/P(e/2)),j((n+L(e))/(1+cm))]},pv.invert=function(t,n){var e=I(6/(4+O)),n=n/e;return N(N(n)-R)<F&&(n=n<0?-R:R),[1.5*t/(e*(.5+P(n))),j((n/2+L(n))/(1+O/4))]},_v.invert=function(t,n){for(var e,i,a,r=n,o=25;r-=e=(r*(1.01183+(a=(i=r*r)*i)*a*(.01926*i-.02625-.00396*a))-n)/(1.01183+a*a*(.21186*i-.23625+-.05148*a)),N(e)>um&&0<--o;);return[t/(.84719-.13063*(i=r*r)+(t=i*(a=i*i))*t*(.05494*i-.04515-.02326*a+.00331*t)),r]},mv.invert=function(t,n){for(var e=n/2,i=0,a=1/0;i<10&&N(a)>F;++i){var r=P(n/2);n-=a=(n-g(n/2)-e)/(1-.5/(r*r))}return[2*t/(1+P(n)),n]};var yv=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];
5284
5280
  // Based on Torben Jansen's implementation
5285
5281
  // https://beta.observablehq.com/@toja/nicolosi-globular-projection
5286
5282
  // https://beta.observablehq.com/@toja/nicolosi-globular-inverse
5287
- function yv(t,n){var e,i,a,r,o,s=L(n),l=P(n),u=y(t);return 0===t||N(n)===R?[0,n]:0===n?[t,0]:N(t)===R?[t*l,R*s]:(o=(r=((i=(a=(1-(a=2*n/O)*a)/(s-a))*a)*s/(e=(t=O/(2*t)-2*t/O)*t)+a/2)/(o=1+i/e))*r-(i*s*s/e+a*s-1)/o,[R*((a=(t*s/a-t/2)/(s=1+e/i))+I(a*a+l*l/s)*u),R*(r+I(o<0?0:o)*y(-n*t)*u)])}yv.invert=function(t,n){var e=(t/=R)*t,i=e+(n/=R)*n,a=O*O;return[t?(i-1+I((1-i)*(1-i)+4*e))/(2*t)*R:0,Mm(function(t){return i*(O*L(t)-2*t)*O+4*t*t*(n-L(t))+2*O*t-a*n},0)]};
5283
+ function vv(t,n){var e,i,a,r,o,s=L(n),l=P(n),u=y(t);return 0===t||N(n)===R?[0,n]:0===n?[t,0]:N(t)===R?[t*l,R*s]:(o=(r=((i=(a=(1-(a=2*n/O)*a)/(s-a))*a)*s/(e=(t=O/(2*t)-2*t/O)*t)+a/2)/(o=1+i/e))*r-(i*s*s/e+a*s-1)/o,[R*((a=(t*s/a-t/2)/(s=1+e/i))+I(a*a+l*l/s)*u),R*(r+I(o<0?0:o)*y(-n*t)*u)])}vv.invert=function(t,n){var e=(t/=R)*t,i=e+(n/=R)*n,a=O*O;return[t?(i-1+I((1-i)*(1-i)+4*e))/(2*t)*R:0,Em(function(t){return i*(O*L(t)-2*t)*O+4*t*t*(n-L(t))+2*O*t-a*n},0)]};
5288
5284
  // Based on Java implementation by Bojan Savric.
5289
5285
  // https://github.com/OSUCartography/JMapProjLib/blob/master/src/com/jhlabs/map/proj/PattersonProjection.java
5290
- var vv=1.0148,bv=.23185,xv=-.14499,wv=.02406,Sv=1.790857183;function Cv(t,n){var e=n*n;return[t,n*(vv+e*e*(bv+e*(xv+wv*e)))]}function kv(t,n){var e;return N(n)<F?[t,0]:(e=g(n),t=t*L(n),[L(t)/e,n+(1-P(t))/e])}
5286
+ var bv=1.0148,xv=.23185,wv=-.14499,Sv=.02406,Cv=1.790857183;function kv(t,n){var e=n*n;return[t,n*(bv+e*e*(xv+e*(wv+Sv*e)))]}function Av(t,n){var e;return N(n)<F?[t,0]:(e=g(n),t=t*L(n),[L(t)/e,n+(1-P(t))/e])}
5291
5287
  // Note: 6-element arrays are used to denote the 3x3 affine transform matrix:
5292
5288
  // [a, b, c,
5293
5289
  // d, e, f,
5294
5290
  // 0, 0, 1] - this redundant row is left out.
5295
5291
  // Transform matrix for [a0, a1] -> [b0, b1].
5296
- function Av(t,n){var e=zv(t[1],t[0]),i=zv(n[1],n[0]),a=b(e[0]*i[1]-e[1]*i[0],e[0]*i[0]+e[1]*i[1]),e=Tv(e)/Tv(i);return Ev([1,0,t[0][0],0,1,t[0][1]],Ev([e,0,0,0,e,0],Ev([P(a),L(a),0,-L(a),P(a),0],[1,0,-n[0][0],0,1,-n[0][1]])))}
5292
+ function Mv(t,n){var e=Tv(t[1],t[0]),i=Tv(n[1],n[0]),a=b(e[0]*i[1]-e[1]*i[0],e[0]*i[0]+e[1]*i[1]),e=Bv(e)/Bv(i);return zv([1,0,t[0][0],0,1,t[0][1]],zv([e,0,0,0,e,0],zv([P(a),L(a),0,-L(a),P(a),0],[1,0,-n[0][0],0,1,-n[0][1]])))}
5297
5293
  // Inverts a transform matrix.
5298
- function Mv(t){var n=1/(t[0]*t[4]-t[1]*t[3]);return[n*t[4],-n*t[1],n*(t[1]*t[5]-t[2]*t[4]),-n*t[3],n*t[0],n*(t[2]*t[3]-t[0]*t[5])]}
5294
+ function Ev(t){var n=1/(t[0]*t[4]-t[1]*t[3]);return[n*t[4],-n*t[1],n*(t[1]*t[5]-t[2]*t[4]),-n*t[3],n*t[0],n*(t[2]*t[3]-t[0]*t[5])]}
5299
5295
  // Multiplies two 3x2 matrices.
5300
- function Ev(t,n){return[t[0]*n[0]+t[1]*n[3],t[0]*n[1]+t[1]*n[4],t[0]*n[2]+t[1]*n[5]+t[2],t[3]*n[0]+t[4]*n[3],t[3]*n[1]+t[4]*n[4],t[3]*n[2]+t[4]*n[5]+t[5]]}
5296
+ function zv(t,n){return[t[0]*n[0]+t[1]*n[3],t[0]*n[1]+t[1]*n[4],t[0]*n[2]+t[1]*n[5]+t[2],t[3]*n[0]+t[4]*n[3],t[3]*n[1]+t[4]*n[4],t[3]*n[2]+t[4]*n[5]+t[5]]}
5301
5297
  // Subtracts 2D vectors.
5302
- function zv(t,n){return[t[0]-n[0],t[1]-n[1]]}
5298
+ function Tv(t,n){return[t[0]-n[0],t[1]-n[1]]}
5303
5299
  // Magnitude of a 2D vector.
5304
- function Tv(t){return I(t[0]*t[0]+t[1]*t[1])}
5300
+ function Bv(t){return I(t[0]*t[0]+t[1]*t[1])}
5305
5301
  // Angle between two 2D vectors.
5306
5302
  // Creates a polyhedral projection.
5307
5303
  // * root: a spanning tree of polygon faces. Nodes are automatically
5308
5304
  // augmented with a transform matrix.
5309
5305
  // * face: a function that returns the appropriate node for a given {lambda, phi}
5310
5306
  // point (radians).
5311
- function Bv(a,i){function t(t,n){var e=i(t,n),t=e.project([t*m,n*m]);return(n=e.transform)?[n[0]*t[0]+n[1]*t[1]+n[2],-(n[3]*t[0]+n[4]*t[1]+n[5])]:(t[1]=-t[1],t)}
5307
+ function Dv(a,i){function t(t,n){var e=i(t,n),t=e.project([t*m,n*m]);return(n=e.transform)?[n[0]*t[0]+n[1]*t[1]+n[2],-(n[3]*t[0]+n[4]*t[1]+n[5])]:(t[1]=-t[1],t)}
5312
5308
  // Naive inverse! A faster solution would use bounding boxes, or even a
5313
5309
  // polygonal quadtree.
5314
- function h(t){return i(t[0]*x,t[1]*x)}!function n(e,t){e.edges=Pv(e.face);
5310
+ function h(t){return i(t[0]*x,t[1]*x)}!function n(e,t){e.edges=Lv(e.face);
5315
5311
  // Find shared edge.
5316
- if(t.face){for(var i=e.shared=Nv(e.face,t.face),a=Av(i.map(t.project),i.map(e.project)),r=(e.transform=t.transform?Ev(t.transform,a):a,t.edges),o=0,s=r.length;o<s;++o)Dv(i[0],r[o][1])&&Dv(i[1],r[o][0])&&(r[o]=e),Dv(i[0],r[o][0])&&Dv(i[1],r[o][1])&&(r[o]=e);for(r=e.edges,o=0,s=r.length;o<s;++o)Dv(i[0],r[o][0])&&Dv(i[1],r[o][1])&&(r[o]=t),Dv(i[0],r[o][1])&&Dv(i[1],r[o][0])&&(r[o]=t)}else e.transform=t.transform;e.children&&e.children.forEach(function(t){n(t,e)});return e}(a,{transform:null}),Lv(a)&&(t.invert=function(t,n){t=function t(n,e){var i=n.project.invert,a=n.transform,r=e;a&&(a=Mv(a),r=[a[0]*r[0]+a[1]*r[1]+a[2],a[3]*r[0]+a[4]*r[1]+a[5]]);if(i&&n===h(o=i(r)))return o;var o,s=n.children;for(var l=0,u=s&&s.length;l<u;++l)if(o=t(s[l],e))return o}(a,[t,-n]);return t&&(t[0]*=x,t[1]*=x,t)});var r=d(t),o=r.stream;return r.stream=function(t){var n=r.rotate(),e=o(t),i=(r.rotate([0,0]),o(t));return r.rotate(n),e.sphere=function(){i.polygonStart(),i.lineStart(),function t(n,e,i){var a,r,o=e.edges,s=o.length,l={type:"MultiPoint",coordinates:e.face},u=e.face.filter(function(t){return 90!==N(t[1])}),u=e1({type:"MultiPoint",coordinates:u}),h=!1,c=-1,g=u[1][0]-u[0][0];
5312
+ if(t.face){for(var i=e.shared=Pv(e.face,t.face),a=Mv(i.map(t.project),i.map(e.project)),r=(e.transform=t.transform?zv(t.transform,a):a,t.edges),o=0,s=r.length;o<s;++o)Nv(i[0],r[o][1])&&Nv(i[1],r[o][0])&&(r[o]=e),Nv(i[0],r[o][0])&&Nv(i[1],r[o][1])&&(r[o]=e);for(r=e.edges,o=0,s=r.length;o<s;++o)Nv(i[0],r[o][0])&&Nv(i[1],r[o][1])&&(r[o]=t),Nv(i[0],r[o][1])&&Nv(i[1],r[o][0])&&(r[o]=t)}else e.transform=t.transform;e.children&&e.children.forEach(function(t){n(t,e)});return e}(a,{transform:null}),Fv(a)&&(t.invert=function(t,n){t=function t(n,e){var i=n.project.invert,a=n.transform,r=e;a&&(a=Ev(a),r=[a[0]*r[0]+a[1]*r[1]+a[2],a[3]*r[0]+a[4]*r[1]+a[5]]);if(i&&n===h(o=i(r)))return o;var o,s=n.children;for(var l=0,u=s&&s.length;l<u;++l)if(o=t(s[l],e))return o}(a,[t,-n]);return t&&(t[0]*=x,t[1]*=x,t)});var r=d(t),o=r.stream;return r.stream=function(t){var n=r.rotate(),e=o(t),i=(r.rotate([0,0]),o(t));return r.rotate(n),e.sphere=function(){i.polygonStart(),i.lineStart(),function t(n,e,i){var a,r,o=e.edges,s=o.length,l={type:"MultiPoint",coordinates:e.face},u=e.face.filter(function(t){return 90!==N(t[1])}),u=i1({type:"MultiPoint",coordinates:u}),h=!1,c=-1,g=u[1][0]-u[0][0];
5317
5313
  // TODO
5318
- var d=180==g||360==g?[(u[0][0]+u[1][0])/2,(u[0][1]+u[1][1])/2]:f1(l);
5314
+ var d=180==g||360==g?[(u[0][0]+u[1][0])/2,(u[0][1]+u[1][1])/2]:p1(l);
5319
5315
  // First find the shared edge…
5320
- if(i)for(;++c<s&&o[c]!==i;);++c;for(var f=0;f<s;++f)r=o[(f+c)%s],Array.isArray(r)?(h||(n.point((a=hp(r[0],d)(F))[0],a[1]),h=!0),n.point((a=hp(r[1],d)(F))[0],a[1])):(h=!1,r!==i&&t(n,r,e))}
5316
+ if(i)for(;++c<s&&o[c]!==i;);++c;for(var f=0;f<s;++f)r=o[(f+c)%s],Array.isArray(r)?(h||(n.point((a=cp(r[0],d)(F))[0],a[1]),h=!0),n.point((a=cp(r[1],d)(F))[0],a[1])):(h=!1,r!==i&&t(n,r,e))}
5321
5317
  // Tests equality of two spherical points.
5322
- (i,a),i.lineEnd(),i.polygonEnd()},e},r.angle(-30)}function Dv(t,n){return t&&n&&t[0]===n[0]&&t[1]===n[1]}
5318
+ (i,a),i.lineEnd(),i.polygonEnd()},e},r.angle(-30)}function Nv(t,n){return t&&n&&t[0]===n[0]&&t[1]===n[1]}
5323
5319
  // Finds a shared edge given two clockwise polygons.
5324
- function Nv(t,n){for(var e,i=t.length,a=null,r=0;r<i;++r)for(var o=t[r],s=n.length;0<=--s;)if(e=n[s],o[0]===e[0]&&o[1]===e[1]){if(a)return[a,o];a=o}}
5320
+ function Pv(t,n){for(var e,i=t.length,a=null,r=0;r<i;++r)for(var o=t[r],s=n.length;0<=--s;)if(e=n[s],o[0]===e[0]&&o[1]===e[1]){if(a)return[a,o];a=o}}
5325
5321
  // Converts an array of n face vertices to an array of n + 1 edges.
5326
- function Pv(t){for(var n=t.length,e=[],i=t[n-1],a=0;a<n;++a)e.push([i,i=t[a]]);return e}function Lv(t){return t.project.invert||t.children&&t.children.some(Lv)}
5322
+ function Lv(t){for(var n=t.length,e=[],i=t[n-1],a=0;a<n;++a)e.push([i,i=t[a]]);return e}function Fv(t){return t.project.invert||t.children&&t.children.some(Fv)}
5327
5323
  // TODO generate on-the-fly to avoid external modification.
5328
- Cv.invert=function(t,n){Sv<n?n=Sv:n<-1.790857183&&(n=-1.790857183);var e=n;do{var i=e*e}while(e-=i=(e*(vv+i*i*(bv+i*(xv+wv*i)))-n)/(1.0148+i*i*(1.1592500000000001+i*(.21654*i-1.01493))),N(i)>F);return[t,e]},kv.invert=function(t,n){if(N(n)<F)return[t,0];var e=t*t+n*n,i=.5*n,a=10;do{var r=g(i),o=1/P(i),s=e-2*n*i+i*i}while(i-=s=(r*s+2*(i-n))/(2+s*o*o+2*(i-n)*r),N(s)>F&&0<--a);return r=g(i),[(N(n)<N(i+1/r)?j(t*r):y(n)*y(t)*(fm(N(t*r))+R))/L(i),i]};var Fv=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],Ov=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(t){return t.map(function(t){return Fv[t]})});var Rv=2/I(3);function jv(t,n){t=qm(t,n);return[t[0]*Rv,t[1]]}function Iv(t,n){for(var e=0,i=t.length,a=0;e<i;++e)a+=t[e]*n[e];return a}
5324
+ kv.invert=function(t,n){Cv<n?n=Cv:n<-1.790857183&&(n=-1.790857183);var e=n;do{var i=e*e}while(e-=i=(e*(bv+i*i*(xv+i*(wv+Sv*i)))-n)/(1.0148+i*i*(1.1592500000000001+i*(.21654*i-1.01493))),N(i)>F);return[t,e]},Av.invert=function(t,n){if(N(n)<F)return[t,0];var e=t*t+n*n,i=.5*n,a=10;do{var r=g(i),o=1/P(i),s=e-2*n*i+i*i}while(i-=s=(r*s+2*(i-n))/(2+s*o*o+2*(i-n)*r),N(s)>F&&0<--a);return r=g(i),[(N(n)<N(i+1/r)?j(t*r):y(n)*y(t)*(pm(N(t*r))+R))/L(i),i]};var Ov=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],Rv=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(t){return t.map(function(t){return Ov[t]})});var jv=2/I(3);function Iv(t,n){t=Um(t,n);return[t[0]*jv,t[1]]}function Hv(t,n){for(var e=0,i=t.length,a=0;e<i;++e)a+=t[e]*n[e];return a}
5329
5325
  // Converts 3D Cartesian to spherical coordinates (degrees).
5330
- function Hv(t){return[b(t[1],t[0])*m,j(am(-1,rm(1,t[2])))*m]}
5326
+ function Gv(t){return[b(t[1],t[0])*m,j(rm(-1,om(1,t[2])))*m]}
5331
5327
  // Converts spherical coordinates (degrees) to 3D Cartesian.
5332
- function Gv(t){var n=t[0]*x,t=t[1]*x,e=P(t);return[e*P(n),e*L(n),L(t)]}jv.invert=function(t,n){return qm.invert(t/Rv,n)};_n=()=>{};function Kv(t,n){return{type:"FeatureCollection",features:t.features.map(function(t){return $v(t,n)})}}function $v(t,n){return{type:"Feature",id:t.id,properties:t.properties,geometry:qv(t.geometry,n)}}function qv(t,n){if(!t)return null;if("GeometryCollection"===t.type)return e=n,{type:"GeometryCollection",geometries:t.geometries.map(function(t){return qv(t,e)})};var e,i;switch(t.type){case"Point":case"MultiPoint":i=Yv;break;case"LineString":case"MultiLineString":i=Vv;break;case"Polygon":case"MultiPolygon":case"Sphere":i=Zv;break;default:return null}return X0(t,n(i)),i.result()}var Uv=[],Wv=[],Yv={point:function(t,n){Uv.push([t,n])},result:function(){var t=Uv.length?Uv.length<2?{type:"Point",coordinates:Uv[0]}:{type:"MultiPoint",coordinates:Uv}:null;return Uv=[],t}},Vv={lineStart:_n,point:function(t,n){Uv.push([t,n])},lineEnd:function(){Uv.length&&(Wv.push(Uv),Uv=[])},result:function(){var t=Wv.length?Wv.length<2?{type:"LineString",coordinates:Wv[0]}:{type:"MultiLineString",coordinates:Wv}:null;return Wv=[],t}},Zv={polygonStart:_n,lineStart:_n,point:function(t,n){Uv.push([t,n])},lineEnd:function(){var t=Uv.length;if(t){for(;Uv.push(Uv[0].slice()),++t<4;);Wv.push(Uv),Uv=[]}},polygonEnd:_n,result:function(){var i,n;return Wv.length&&(i=[],n=[],
5328
+ function Kv(t){var n=t[0]*x,t=t[1]*x,e=P(t);return[e*P(n),e*L(n),L(t)]}Iv.invert=function(t,n){return Um.invert(t/jv,n)};_n=()=>{};function $v(t,n){return{type:"FeatureCollection",features:t.features.map(function(t){return qv(t,n)})}}function qv(t,n){return{type:"Feature",id:t.id,properties:t.properties,geometry:Uv(t.geometry,n)}}function Uv(t,n){if(!t)return null;if("GeometryCollection"===t.type)return e=n,{type:"GeometryCollection",geometries:t.geometries.map(function(t){return Uv(t,e)})};var e,i;switch(t.type){case"Point":case"MultiPoint":i=Vv;break;case"LineString":case"MultiLineString":i=Zv;break;case"Polygon":case"MultiPolygon":case"Sphere":i=Xv;break;default:return null}return J0(t,n(i)),i.result()}var Wv=[],Yv=[],Vv={point:function(t,n){Wv.push([t,n])},result:function(){var t=Wv.length?Wv.length<2?{type:"Point",coordinates:Wv[0]}:{type:"MultiPoint",coordinates:Wv}:null;return Wv=[],t}},Zv={lineStart:_n,point:function(t,n){Wv.push([t,n])},lineEnd:function(){Wv.length&&(Yv.push(Wv),Wv=[])},result:function(){var t=Yv.length?Yv.length<2?{type:"LineString",coordinates:Yv[0]}:{type:"MultiLineString",coordinates:Yv}:null;return Yv=[],t}},Xv={polygonStart:_n,lineStart:_n,point:function(t,n){Wv.push([t,n])},lineEnd:function(){var t=Wv.length;if(t){for(;Wv.push(Wv[0].slice()),++t<4;);Yv.push(Wv),Wv=[]}},polygonEnd:_n,result:function(){var i,n;return Yv.length&&(i=[],n=[],
5333
5329
  // https://github.com/d3/d3/issues/1558
5334
- Wv.forEach(function(t){(t=>{if(!((n=t.length)<4)){for(var n,e=0,i=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)i+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return i<=0}})(t)?i.push([t]):n.push(t)}),n.forEach(function(n){var e=n[0];i.some(function(t){if(((t,n)=>{for(var e=n[0],i=n[1],a=!1,r=0,o=t.length,s=o-1;r<o;s=r++){var l=t[r],u=l[0],l=l[1],h=t[s],c=h[0],h=h[1];i<l^i<h&&e<(c-u)*(i-l)/(h-l)+u&&(a=!a)}return a})(t[0],e))return t.push(n),!0})||i.push([n])}),Wv=[],i.length)?1<i.length?{type:"MultiPolygon",coordinates:i}:{type:"Polygon",coordinates:i[0]}:null}};function Xv(s){var l=s(R,0)[0]-s(-R,0)[0];function t(t,n){var e,i=N(t)<R,t=s(i?t:0<t?t-O:t+O,n),n=(t[0]-t[1])*hm,t=(t[0]+t[1])*hm;return i?[n,t]:(i=l*hm,[(e=0<n^0<t?-1:1)*n-y(t)*i,e*t-y(n)*i])}return s.invert&&(t.invert=function(t,n){var e,i,a=(t+n)*hm,r=(n-t)*hm,o=N(a)<.5*l&&N(r)<.5*l,n=(o||(a=(-(e=-(i=0<a^0<r?-1:1)*t+(0<r?1:-1)*(t=l*hm))-(i=-i*n+(0<a?1:-1)*t))*hm,r=(e-i)*hm),s.invert(a,r));return o||(n[0]+=0<a?O:-O),n}),d(t).rotate([-90,-90,45]).clipAngle(179.999)}function Jv(l){var u=L(l);function t(t,n){var e,i,t=u?g(t*u/2)/u:t/2;return n?(e=2*tm(t*L(n)),i=1/g(n),[L(e)*i,n+(1-P(e))*i-l]):[2*t,-l]}
5330
+ Yv.forEach(function(t){(t=>{if(!((n=t.length)<4)){for(var n,e=0,i=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)i+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return i<=0}})(t)?i.push([t]):n.push(t)}),n.forEach(function(n){var e=n[0];i.some(function(t){if(((t,n)=>{for(var e=n[0],i=n[1],a=!1,r=0,o=t.length,s=o-1;r<o;s=r++){var l=t[r],u=l[0],l=l[1],h=t[s],c=h[0],h=h[1];i<l^i<h&&e<(c-u)*(i-l)/(h-l)+u&&(a=!a)}return a})(t[0],e))return t.push(n),!0})||i.push([n])}),Yv=[],i.length)?1<i.length?{type:"MultiPolygon",coordinates:i}:{type:"Polygon",coordinates:i[0]}:null}};function Jv(s){var l=s(R,0)[0]-s(-R,0)[0];function t(t,n){var e,i=N(t)<R,t=s(i?t:0<t?t-O:t+O,n),n=(t[0]-t[1])*cm,t=(t[0]+t[1])*cm;return i?[n,t]:(i=l*cm,[(e=0<n^0<t?-1:1)*n-y(t)*i,e*t-y(n)*i])}return s.invert&&(t.invert=function(t,n){var e,i,a=(t+n)*cm,r=(n-t)*cm,o=N(a)<.5*l&&N(r)<.5*l,n=(o||(a=(-(e=-(i=0<a^0<r?-1:1)*t+(0<r?1:-1)*(t=l*cm))-(i=-i*n+(0<a?1:-1)*t))*cm,r=(e-i)*cm),s.invert(a,r));return o||(n[0]+=0<a?O:-O),n}),d(t).rotate([-90,-90,45]).clipAngle(179.999)}function Qv(l){var u=L(l);function t(t,n){var e,i,t=u?g(t*u/2)/u:t/2;return n?(e=2*nm(t*L(n)),i=1/g(n),[L(e)*i,n+(1-P(e))*i-l]):[2*t,-l]}
5335
5331
  // TODO return null for points outside outline.
5336
- return t.invert=function(t,n){if(N(n+=l)<F)return[u?2*tm(u*t/2)/u:t,0];var e=t*t+n*n,i=0,a=10;do{var r=g(i),o=1/P(i),s=e-2*n*i+i*i}while(i-=s=(r*s+2*(i-n))/(2+s*o*o+2*(i-n)*r),N(s)>F&&0<--a);t*=r=g(i),t=g(N(n)<N(i+1/r)?.5*j(t):.5*fm(t)+O/4)/L(i);return[u?2*tm(u*t)/u:2*t,i]},t}var Qv=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function t2(t,n){var e=rm(18,36*N(n)/O),i=em(e),e=e-i,a=(l=Qv[i])[0],r=l[1],o=(l=Qv[++i])[0],s=l[1],i=(l=Qv[rm(19,++i)])[0],l=l[1];return[t*(o+e*(i-a)/2+e*e*(i-2*o+a)/2),y(n)*(s+e*(l-r)/2+e*e*(l-2*s+r)/2)]}function n2(i,t){a=i,n.invert=function(t,n){var e=t*t+n*n,i=I(e),e=(a-I(1-e*(a+1)/(a-1)))/((a-1)/i+i/(a-1));return[b(t*e,i*I(1-e*e)),i?j(n*e/i):0]};var a,r,o,s=n;function n(t,n){var e=P(n),i=(a-1)/(a-e*P(t));return[i*e*L(t),i*L(n)]}return t?(r=P(t),o=L(t),e.invert=function(t,n){var e=(i-1)/(i-1-n*o);return s.invert(e*t,e*n*r)},e):s;function e(t,n){var t=s(t,n),n=t[1],e=n*o/(i-1)+r;return[t[0]*r/e,n/e]}}Qv.forEach(function(t){t[1]*=1.593415793900743}),t2.invert=function(t,n){var e=rm(18,N((g=90*n)/5)),i=am(0,em(e));do{var a=Qv[i][1],r=Qv[i+1][1],o=Qv[rm(19,i+2)][1],s=o-a,l=o-2*r+a,u=2*(N(n)-r)/s,l=l/s,h=u*(1-l*u*(1-2*l*u));if(0<=h||1===i){for(var c,g=(0<=n?5:-5)*(h+e),d=50;h=(e=rm(18,N(g)/5))-(i=em(e)),a=Qv[i][1],r=Qv[i+1][1],o=Qv[rm(19,i+2)][1],g-=(c=y(n)*(r+h*(o-a)/2+h*h*(o-2*r+a)/2)-n)*m,N(c)>lm&&0<--d;);break}}while(0<=--i);var f=Qv[i][0],p=Qv[i+1][0],_=Qv[rm(19,i+2)][0];return[t/(p+h*(_-f)/2+h*h*(_-2*p+f)/2),g*x]};var e2=1e4,i2=-180,a2=i2+1e-4,r2=180,o2=r2-1e-4,s2=-90,l2=s2+1e-4,u2=90,h2=u2-1e-4;function c2(t){return 0<t.length}function g2(t){return t===s2||t===u2?[0,t]:[i2,Math.floor(t*e2)/e2];// pole or antimeridian?
5337
- }function d2(t){var n=t[0],e=t[1],i=!1;return n<=a2?(n=i2,i=!0):o2<=n&&(n=r2,i=!0),e<=l2?(e=s2,i=!0):h2<=e&&(e=u2,i=!0),i?[n,e]:t}function f2(t){return t.map(d2)}
5332
+ return t.invert=function(t,n){if(N(n+=l)<F)return[u?2*nm(u*t/2)/u:t,0];var e=t*t+n*n,i=0,a=10;do{var r=g(i),o=1/P(i),s=e-2*n*i+i*i}while(i-=s=(r*s+2*(i-n))/(2+s*o*o+2*(i-n)*r),N(s)>F&&0<--a);t*=r=g(i),t=g(N(n)<N(i+1/r)?.5*j(t):.5*pm(t)+O/4)/L(i);return[u?2*nm(u*t)/u:2*t,i]},t}var t2=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function n2(t,n){var e=om(18,36*N(n)/O),i=im(e),e=e-i,a=(l=t2[i])[0],r=l[1],o=(l=t2[++i])[0],s=l[1],i=(l=t2[om(19,++i)])[0],l=l[1];return[t*(o+e*(i-a)/2+e*e*(i-2*o+a)/2),y(n)*(s+e*(l-r)/2+e*e*(l-2*s+r)/2)]}function e2(i,t){a=i,n.invert=function(t,n){var e=t*t+n*n,i=I(e),e=(a-I(1-e*(a+1)/(a-1)))/((a-1)/i+i/(a-1));return[b(t*e,i*I(1-e*e)),i?j(n*e/i):0]};var a,r,o,s=n;function n(t,n){var e=P(n),i=(a-1)/(a-e*P(t));return[i*e*L(t),i*L(n)]}return t?(r=P(t),o=L(t),e.invert=function(t,n){var e=(i-1)/(i-1-n*o);return s.invert(e*t,e*n*r)},e):s;function e(t,n){var t=s(t,n),n=t[1],e=n*o/(i-1)+r;return[t[0]*r/e,n/e]}}t2.forEach(function(t){t[1]*=1.593415793900743}),n2.invert=function(t,n){var e=om(18,N((g=90*n)/5)),i=rm(0,im(e));do{var a=t2[i][1],r=t2[i+1][1],o=t2[om(19,i+2)][1],s=o-a,l=o-2*r+a,u=2*(N(n)-r)/s,l=l/s,h=u*(1-l*u*(1-2*l*u));if(0<=h||1===i){for(var c,g=(0<=n?5:-5)*(h+e),d=50;h=(e=om(18,N(g)/5))-(i=im(e)),a=t2[i][1],r=t2[i+1][1],o=t2[om(19,i+2)][1],g-=(c=y(n)*(r+h*(o-a)/2+h*h*(o-2*r+a)/2)-n)*m,N(c)>um&&0<--d;);break}}while(0<=--i);var f=t2[i][0],p=t2[i+1][0],_=t2[om(19,i+2)][0];return[t/(p+h*(_-f)/2+h*h*(_-2*p+f)/2),g*x]};var i2=1e4,a2=-180,r2=a2+1e-4,o2=180,s2=o2-1e-4,l2=-90,u2=l2+1e-4,h2=90,c2=h2-1e-4;function g2(t){return 0<t.length}function d2(t){return t===l2||t===h2?[0,t]:[a2,Math.floor(t*i2)/i2];// pole or antimeridian?
5333
+ }function f2(t){var n=t[0],e=t[1],i=!1;return n<=r2?(n=a2,i=!0):s2<=n&&(n=o2,i=!0),e<=u2?(e=l2,i=!0):c2<=e&&(e=h2,i=!0),i?[n,e]:t}function p2(t){return t.map(f2)}
5338
5334
  // For each ring, detect where it crosses the antimeridian or pole.
5339
- function p2(t,n,e){for(var i=0,a=t.length;i<a;++i){var r=t[i].slice();
5335
+ function _2(t,n,e){for(var i=0,a=t.length;i<a;++i){var r=t[i].slice();
5340
5336
  // By default, assume that this ring doesn’t need any stitching.
5341
5337
  e.push({index:-1,polygon:n,ring:r});for(var o=0,s=r.length;o<s;++o){var l=r[o],u=l[0],h=l[1];
5342
5338
  // If this is an antimeridian or polar point…
5343
- if(u<=a2||o2<=u||h<=l2||h2<=h){r[o]=d2(l);
5339
+ if(u<=r2||s2<=u||h<=u2||c2<=h){r[o]=f2(l);
5344
5340
  // Advance through any antimeridian or polar points…
5345
- for(var c=o+1;c<s;++c){var g=r[c],d=g[0],g=g[1];if(a2<d&&d<o2&&l2<g&&g<h2)break}
5341
+ for(var c=o+1;c<s;++c){var g=r[c],d=g[0],g=g[1];if(r2<d&&d<s2&&u2<g&&g<c2)break}
5346
5342
  // If this was just a single antimeridian or polar point,
5347
5343
  // we don’t need to cut this ring into a fragment;
5348
5344
  // we can just leave it as-is.
@@ -5353,11 +5349,11 @@ if(
5353
5349
  // Otherwise, if this is not the first point in the ring,
5354
5350
  // cut the current fragment so that it ends at the current point.
5355
5351
  // The current point is also normalized for later joining.
5356
- o?((u={index:-1,polygon:n,ring:r.slice(0,o+1)}).ring[u.ring.length-1]=g2(h),e[e.length-1]=u):e.pop(),s<=c)break;
5352
+ o?((u={index:-1,polygon:n,ring:r.slice(0,o+1)}).ring[u.ring.length-1]=d2(h),e[e.length-1]=u):e.pop(),s<=c)break;
5357
5353
  // Otherwise, add the remaining ring fragment and continue.
5358
- e.push({index:-1,polygon:n,ring:r=r.slice(c-1)}),r[0]=g2(r[0][1]),o=-1,s=r.length}}}}}
5354
+ e.push({index:-1,polygon:n,ring:r=r.slice(c-1)}),r[0]=d2(r[0][1]),o=-1,s=r.length}}}}}
5359
5355
  // Now stitch the fragments back together into rings.
5360
- function _2(t){
5356
+ function m2(t){
5361
5357
  // For each fragment…
5362
5358
  for(var n,e,i,a,r,o=t.length,s={},l={},u=0
5363
5359
  // To connect the fragments start-to-end, create a simple index by end.
@@ -5372,58 +5368,58 @@ t[i.index]=null,n={index:-1,polygon:i.polygon,ring:i.ring.concat(n.ring)},i===r?
5372
5368
  // Connect both ends to this single fragment to create a ring.
5373
5369
  n.polygon.push(n.ring):(n.index=o++,t.push(s[n.ring[0]]=l[n.ring[n.ring.length-1]]=n))):r?(delete s[a],delete l[r.ring[r.ring.length-1]],n.ring.pop(),// drop the shared coordinate
5374
5370
  n={index:o++,polygon:r.polygon,ring:n.ring.concat(r.ring)},t[r.index]=null,t.push(s[n.ring[0]]=l[n.ring[n.ring.length-1]]=n)):(n.ring.push(n.ring[0]),// close ring
5375
- n.polygon.push(n.ring)))}function m2(t){var n={type:"Feature",geometry:y2(t.geometry)};return null!=t.id&&(n.id=t.id),null!=t.bbox&&(n.bbox=t.bbox),null!=t.properties&&(n.properties=t.properties),n}function y2(t){if(null==t)return t;var n;switch(t.type){case"GeometryCollection":n={type:"GeometryCollection",geometries:t.geometries.map(y2)};break;case"Point":n={type:"Point",coordinates:d2(t.coordinates)};break;case"MultiPoint":case"LineString":n={type:t.type,coordinates:f2(t.coordinates)};break;case"MultiLineString":n={type:"MultiLineString",coordinates:t.coordinates.map(f2)};break;case"Polygon":var e=[];p2(t.coordinates,e,i=[]),_2(i),n={type:"Polygon",coordinates:e};break;case"MultiPolygon":for(var i=[],a=-1,r=t.coordinates.length,o=new Array(r);++a<r;)p2(t.coordinates[a],o[a]=[],i);_2(i),n={type:"MultiPolygon",coordinates:o.filter(c2)};break;default:return t}return null!=t.bbox&&(n.bbox=t.bbox),n}function v2(t,n){var n=g(n/2),e=L(um*n);return[t*(.74482-.34588*e*e),1.70711*n]}
5371
+ n.polygon.push(n.ring)))}function y2(t){var n={type:"Feature",geometry:v2(t.geometry)};return null!=t.id&&(n.id=t.id),null!=t.bbox&&(n.bbox=t.bbox),null!=t.properties&&(n.properties=t.properties),n}function v2(t){if(null==t)return t;var n;switch(t.type){case"GeometryCollection":n={type:"GeometryCollection",geometries:t.geometries.map(v2)};break;case"Point":n={type:"Point",coordinates:f2(t.coordinates)};break;case"MultiPoint":case"LineString":n={type:t.type,coordinates:p2(t.coordinates)};break;case"MultiLineString":n={type:"MultiLineString",coordinates:t.coordinates.map(p2)};break;case"Polygon":var e=[];_2(t.coordinates,e,i=[]),m2(i),n={type:"Polygon",coordinates:e};break;case"MultiPolygon":for(var i=[],a=-1,r=t.coordinates.length,o=new Array(r);++a<r;)_2(t.coordinates[a],o[a]=[],i);m2(i),n={type:"MultiPolygon",coordinates:o.filter(g2)};break;default:return t}return null!=t.bbox&&(n.bbox=t.bbox),n}function b2(t,n){var n=g(n/2),e=L(hm*n);return[t*(.74482-.34588*e*e),1.70711*n]}
5376
5372
  // Compute the origin as the midpoint of the two reference points.
5377
5373
  // Rotate one of the reference points by the origin.
5378
5374
  // Apply the spherical law of sines to compute gamma rotation.
5379
- function b2(t,n,e){var e=hp(n,e),i=e(.5),n=w1([-i[0],-i[1]])(n),e=e.distance/2,a=-j(L(n[1]*x)/L(e)),i=[-i[0],-i[1],-(0<n[0]?O-a:a)*m],n=d(t(e)).rotate(i),r=w1(i),o=n.center;return delete n.rotate,n.center=function(t){return arguments.length?o(r(t)):r.invert(o())},n.clipAngle(90)}function x2(t){var e=P(t);function n(t,n){t=W_(t,n);return t[0]*=e,t}return n.invert=function(t,n){return W_.invert(t/e,n)},n}function w2(t,n){return b2(x2,t,n)}function S2(i){var r,o,a,s,l;return(i*=2)?(a=i*i,s=g(o=-(r=-i/2)),l=.5/L(o),t.invert=function(t,n){var e,i=n*n,a=P(I(i+(e=t+r)*e)),i=P(I(i+(e=t+o)*e));return[b(t=a-i,e=(a+i)*s),(n<0?-1:1)*fm(I(e*e+t*t)*l)]},t):N_;function t(t,n){var e=fm(P(n)*P(t-r)),t=fm(P(n)*P(t-o));return[((e*=e)-(t*=t))/(2*i),(n<0?-1:1)*I(4*a*t-(a-e+t)*(a-e+t))/(2*i)]}}function C2(t,n){return b2(S2,t,n)}function k2(t,n){var e,i,a,r,o,s,l,u;return N(n)<F?[t,0]:(a=j(r=N(n/R)),N(t)<F||N(N(n)-R)<F?[0,y(n)*O*g(a/2)]:(s=(o=(r=(a=(a=P(a))/(r+a-1))*(2/r-1))*r)+(i=(e=N(O/t-t/O)/2)*e),l=a-o,u=i+a,[y(t)*O*(e*l+I(i*l*l-s*(a*a-o)))/s,y(n)*O*(r*u-e*I((1+i)*s-u*u))/s]))}function A2(t,n){var e,i,a,r;return N(n)<F?[t,0]:(r=j(e=N(n/R)),N(t)<F||N(N(n)-R)<F?[0,y(n)*O*g(r/2)]:(r=(r=P(r))*(I(1+(a=(i=N(O/t-t/O)/2)*i))-i*r)/(1+a*e*e),[y(t)*O*r,y(n)*O*I(1-r*(2*i+r))]))}function M2(t,n){var e,i;return N(n)<F?[t,0]:(e=j(i=n/R),N(t)<F||N(N(n)-R)<F?[0,O*g(e/2)]:(n=(O/t-t/O)/2,i=i/(1+P(e)),[O*(y(t)*I(n*n+1-i*i)-n),O*i]))}function E2(t,n){var e,i,a,r,o,s,l;return n?(r=N(n),t&&r!==R?(a=(l=(r=r/R)*r)+(e=(o=(8*r-l*(2+l)-5)/(2*l*(r-1)))*o)+2*(i=r*o),r=r+3*o,o=(o=t/R)+1/o,l=((o=y(N(t)-R)*I(o*o-4))*(a+e-1)+2*I(a*(l+e*(s=o*o)-1)+(1-l)*(l*(r*r+4*e)+12*i*e+4*e*e)))/(4*a+s),[y(t)*R*l,y(n)*R*I(1+o*N(l)-l*l)]):[0,n]):[t,0]}function z2(t,n,e,i){
5375
+ function x2(t,n,e){var e=cp(n,e),i=e(.5),n=S1([-i[0],-i[1]])(n),e=e.distance/2,a=-j(L(n[1]*x)/L(e)),i=[-i[0],-i[1],-(0<n[0]?O-a:a)*m],n=d(t(e)).rotate(i),r=S1(i),o=n.center;return delete n.rotate,n.center=function(t){return arguments.length?o(r(t)):r.invert(o())},n.clipAngle(90)}function w2(t){var e=P(t);function n(t,n){t=Y_(t,n);return t[0]*=e,t}return n.invert=function(t,n){return Y_.invert(t/e,n)},n}function S2(t,n){return x2(w2,t,n)}function C2(i){var r,o,a,s,l;return(i*=2)?(a=i*i,s=g(o=-(r=-i/2)),l=.5/L(o),t.invert=function(t,n){var e,i=n*n,a=P(I(i+(e=t+r)*e)),i=P(I(i+(e=t+o)*e));return[b(t=a-i,e=(a+i)*s),(n<0?-1:1)*pm(I(e*e+t*t)*l)]},t):P_;function t(t,n){var e=pm(P(n)*P(t-r)),t=pm(P(n)*P(t-o));return[((e*=e)-(t*=t))/(2*i),(n<0?-1:1)*I(4*a*t-(a-e+t)*(a-e+t))/(2*i)]}}function k2(t,n){return x2(C2,t,n)}function A2(t,n){var e,i,a,r,o,s,l,u;return N(n)<F?[t,0]:(a=j(r=N(n/R)),N(t)<F||N(N(n)-R)<F?[0,y(n)*O*g(a/2)]:(s=(o=(r=(a=(a=P(a))/(r+a-1))*(2/r-1))*r)+(i=(e=N(O/t-t/O)/2)*e),l=a-o,u=i+a,[y(t)*O*(e*l+I(i*l*l-s*(a*a-o)))/s,y(n)*O*(r*u-e*I((1+i)*s-u*u))/s]))}function M2(t,n){var e,i,a,r;return N(n)<F?[t,0]:(r=j(e=N(n/R)),N(t)<F||N(N(n)-R)<F?[0,y(n)*O*g(r/2)]:(r=(r=P(r))*(I(1+(a=(i=N(O/t-t/O)/2)*i))-i*r)/(1+a*e*e),[y(t)*O*r,y(n)*O*I(1-r*(2*i+r))]))}function E2(t,n){var e,i;return N(n)<F?[t,0]:(e=j(i=n/R),N(t)<F||N(N(n)-R)<F?[0,O*g(e/2)]:(n=(O/t-t/O)/2,i=i/(1+P(e)),[O*(y(t)*I(n*n+1-i*i)-n),O*i]))}function z2(t,n){var e,i,a,r,o,s,l;return n?(r=N(n),t&&r!==R?(a=(l=(r=r/R)*r)+(e=(o=(8*r-l*(2+l)-5)/(2*l*(r-1)))*o)+2*(i=r*o),r=r+3*o,o=(o=t/R)+1/o,l=((o=y(N(t)-R)*I(o*o-4))*(a+e-1)+2*I(a*(l+e*(s=o*o)-1)+(1-l)*(l*(r*r+4*e)+12*i*e+4*e*e)))/(4*a+s),[y(t)*R*l,y(n)*R*I(1+o*N(l)-l*l)]):[0,n]):[t,0]}function T2(t,n,e,i){
5380
5376
  // 60 is always used as reference parallel
5381
5377
  var a,r,o,s,l,u=O/3,e=(
5382
5378
  // sanitizing the input values
5383
5379
  // poleline and parallels may approximate but never equal 0
5384
- t=am(t,F),n=am(n,F),
5380
+ t=rm(t,F),n=rm(n,F),
5385
5381
  // poleline must be <= 90; parallels may approximate but never equal 180
5386
- t=rm(t,R),n=rm(n,O-F),
5382
+ t=om(t,R),n=om(n,O-F),
5387
5383
  // 0 <= inflation <= 99.999
5388
- e=am(e,0),(e=rm(e,100-F))/100+1),i=(
5384
+ e=rm(e,0),(e=om(e,100-F))/100+1),i=(
5389
5385
  // ratio > 0.
5390
5386
  // sensible values, i.e. something that renders a map which still can be
5391
5387
  // recognized as world map, are e.g. 20 <= ratio <= 1000.
5392
- i=am(i,F))/100,e=fm(e*P(u))/u,u=L(t)/L(e*R),h=n/O,i=I(i*L(t/2)/L(n/2)),t=i/I(h*u*e),n=1/(i*I(h*u*e));return a=t,r=n,o=u,s=e,l=h,c.invert=function(t,n){var e=t/a,i=n/r,e=I(e*e+i*i),i=2*j(e/2);return[b(t*g(i),a*e)/l,e&&j(n*L(i)/(r*o*e))/s]},c;function c(t,n){var n=o*L(s*n),e=I(1-n*n),i=I(2/(1+e*P(t*=l)));return[a*e*i*L(t),r*n*i]}}function T2(){
5388
+ i=rm(i,F))/100,e=pm(e*P(u))/u,u=L(t)/L(e*R),h=n/O,i=I(i*L(t/2)/L(n/2)),t=i/I(h*u*e),n=1/(i*I(h*u*e));return a=t,r=n,o=u,s=e,l=h,c.invert=function(t,n){var e=t/a,i=n/r,e=I(e*e+i*i),i=2*j(e/2);return[b(t*g(i),a*e)/l,e&&j(n*L(i)/(r*o*e))/s]},c;function c(t,n){var n=o*L(s*n),e=I(1-n*n),i=I(2/(1+e*P(t*=l)));return[a*e*i*L(t),r*n*i]}}function B2(){
5393
5389
  // default values generate wagner8
5394
- var n=65*x,e=60*x,i=20,a=200,r=k_(z2),t=r(n,e,i,a);return t.poleline=function(t){return arguments.length?r(n=+t*x,e,i,a):n*m},t.parallels=function(t){return arguments.length?r(n,e=+t*x,i,a):e*m},t.inflation=function(t){return arguments.length?r(n,e,i=+t,a):i},t.ratio=function(t){return arguments.length?r(n,e,i,a=+t):a},t.scale(163.775)}v2.invert=function(t,n){var n=n/1.70711,e=L(um*n);return[t/(.74482-.34588*e*e),2*tm(n)]},k2.invert=function(t,n){var e,i,a,r,o,s,l,u;return N(n)<F?[t,0]:N(t)<F?[0,R*L(2*tm(n/O))]:(r=(a=(e=(t/=O)*t)+(i=(n/=O)*n))*a,u=fm(3*(i/(s=-2*(l=-N(n)*(1+a))+1+2*i+r)+(2*(o=l-2*i+e)*o*o/(s*s*s)-9*l*o/(s*s))/27)/((l=(l-o*o/(3*s))/s)*(l=2*I(-l/3))))/3,[O*(a-1+I(1+2*(e-i)+r))/(2*t),y(n)*O*(-l*P(u+O/3)-o/(3*s))])},A2.invert=function(t,n){var e,i,a;return t?(a=I(1+(i=(1-(e=N(t/O))*e-(n/=O)*n)/(2*e))*i),[y(t)*O*(a-i),y(n)*R*L(2*b(I((1-2*i*e)*(i+a)-e),I(a+i+e)))]):[0,R*L(2*tm(n/O))]},M2.invert=function(t,n){var e;return n?(e=(O*O*(1-(n=n/O)*n)-t*t)/(2*O*t),[t?O*(y(t)*I(e*e+1)-e):0,R*L(2*tm(n))]):[t,0]},E2.invert=function(t,n){if(!t||!n)return[t,n];var e=y(n),i=(n=N(n)/O,y(t)*t/R),a=(i*i-1+4*n*n)/N(i),r=a*a,o=n*(2-(.5<n?rm(n,N(t)):0)),s=t*t+n*n,l=50;do{var u=o*o,h=(8*o-u*(2+u)-5)/(2*u*(o-1)),c=(3*o-u*o-10)/(2*u*o),g=h*h,d=o*h,f=o+h,p=f*f,_=o+3*h,m=-2*f*(4*d*g+(1-4*u+3*u*u)*(1+c)+g*(14*u-6-r+(8*u-8-2*r)*c)+d*(12*u-8+(10*u-10-r)*c)),u=I(p*(u+g*r-1)+(1-u)*(u*(_*_+4*g)+g*(12*d+4*g)))}while(o-=_=(a*(p+g-1)+2*u-i*(4*p+r))/(a*(2*h*c+2*f*(1+c))+m/u-8*f*(a*(g-1+p)+2*u)*(1+c)/(r+4*p)),F<_*s*s&&0<--l);return[y(t)*(I(a*a+4)+a)*O/4,e*R*o]};var ri=4*O+3*I(3),gr=2*I(2*O*I(3)/ri),B2=Bm(gr*I(3)/O,gr,ri/6);function D2(t,n){return[t*I(1-3*n*n/(O*O)),n]}function N2(t,n){var e=P(n),i=P(t)*e,a=1-i,n=P(t=b(L(t)*e,-L(n))),t=L(t);return[t*(e=I(1-i*i))-n*a,-n*e-t*a]}function P2(t,n){var e=ym(t,n);return[(e[0]+t/R)/2,(e[1]+n)/2]}D2.invert=function(t,n){return[t/I(1-3*n*n/(O*O)),n]},N2.invert=function(t,n){var e=(t*t+n*n)/-2,i=I(-e*(2+e)),a=n*e+t*i,t=t*e-n*i,n=I(t*t+a*a);return[b(i*a,n*(1+e)),n?-j(i*t/n):0]},P2.invert=function(t,n){var e=t,i=n,a=25;do{var r,o=P(i),s=L(i),l=L(2*i),u=s*s,h=o*o,c=L(e),g=P(e/2),d=L(e/2),f=d*d,p=1-h*g*g,p=p?fm(o*g)*I(r=1/p):r=0,_=.5*(2*p*o*d+e/R)-t,m=.5*(p*s+i)-n,y=.5*r*(h*f+p*o*g*u)+.5/R,v=r*(c*l/4-p*s*d),l=.125*r*(l*d-p*s*h*c),d=.5*r*(u*g+p*f*o)+.5,s=v*l-d*y,h=(m*v-_*d)/s,c=(_*l-m*y)/s}while(e-=h,i-=c,(N(h)>F||N(c)>F)&&0<--a);return[e,i]};var L2=Object.freeze({__proto__:null,geoAiry:function(){var n=R,e=k_(mm),t=e(n);return t.radius=function(t){return arguments.length?e(n=t*x):n*m},t.scale(179.976).clipAngle(147)},geoAiryRaw:mm,geoAitoff:function(){return d(ym).scale(152.63)},geoAitoffRaw:ym,geoArmadillo:function(){var r=20*x,o=0<=r?1:-1,s=g(o*r),n=k_(vm),l=n(r),u=l.stream;return l.parallel=function(t){return arguments.length?(s=g((o=0<=(r=t*x)?1:-1)*r),n(r)):r*m},l.stream=function(t){var n=l.rotate(),e=u(t),i=(l.rotate([0,0]),u(t)),a=l.precision();return l.rotate(n),e.sphere=function(){i.polygonStart(),i.lineStart();for(var t=-180*o;o*t<180;t+=90*o)i.point(t,90*o);if(r)for(;-180<=o*(t-=3*o*a);)i.point(t,o*-b(P(t*x/2),s)*m);i.lineEnd(),i.polygonEnd()},e},l.scale(218.695).center([0,28.0974])},geoArmadilloRaw:vm,geoAugust:function(){return d(bm).scale(66.1603)},geoAugustRaw:bm,geoBaker:function(){return d(Sm).scale(112.314)},geoBakerRaw:Sm,geoBerghaus:function(){var o=5,n=k_(Cm),i=n(o),a=i.stream,s=-P(.01*x),l=L(.01*x);return i.lobes=function(t){return arguments.length?n(o=+t):o},i.stream=function(t){var n=i.rotate(),e=a(t),r=(i.rotate([0,0]),a(t));return i.rotate(n),e.sphere=function(){r.polygonStart(),r.lineStart();for(var t=0,n=360/o,e=2*O/o,i=90-180/o,a=R;t<o;++t,i-=n,a-=e)r.point(b(l*P(a),s)*m,j(l*L(a))*m),i<-90?(r.point(-90,-180-i-.01),r.point(-90,-180-i+.01)):(r.point(90,i+.01),r.point(90,i-.01));r.lineEnd(),r.polygonEnd()},e},i.scale(87.8076).center([0,17.1875]).clipAngle(179.999)},geoBerghausRaw:Cm,geoBertin1953:function(){
5390
+ var n=65*x,e=60*x,i=20,a=200,r=A_(T2),t=r(n,e,i,a);return t.poleline=function(t){return arguments.length?r(n=+t*x,e,i,a):n*m},t.parallels=function(t){return arguments.length?r(n,e=+t*x,i,a):e*m},t.inflation=function(t){return arguments.length?r(n,e,i=+t,a):i},t.ratio=function(t){return arguments.length?r(n,e,i,a=+t):a},t.scale(163.775)}b2.invert=function(t,n){var n=n/1.70711,e=L(hm*n);return[t/(.74482-.34588*e*e),2*nm(n)]},A2.invert=function(t,n){var e,i,a,r,o,s,l,u;return N(n)<F?[t,0]:N(t)<F?[0,R*L(2*nm(n/O))]:(r=(a=(e=(t/=O)*t)+(i=(n/=O)*n))*a,u=pm(3*(i/(s=-2*(l=-N(n)*(1+a))+1+2*i+r)+(2*(o=l-2*i+e)*o*o/(s*s*s)-9*l*o/(s*s))/27)/((l=(l-o*o/(3*s))/s)*(l=2*I(-l/3))))/3,[O*(a-1+I(1+2*(e-i)+r))/(2*t),y(n)*O*(-l*P(u+O/3)-o/(3*s))])},M2.invert=function(t,n){var e,i,a;return t?(a=I(1+(i=(1-(e=N(t/O))*e-(n/=O)*n)/(2*e))*i),[y(t)*O*(a-i),y(n)*R*L(2*b(I((1-2*i*e)*(i+a)-e),I(a+i+e)))]):[0,R*L(2*nm(n/O))]},E2.invert=function(t,n){var e;return n?(e=(O*O*(1-(n=n/O)*n)-t*t)/(2*O*t),[t?O*(y(t)*I(e*e+1)-e):0,R*L(2*nm(n))]):[t,0]},z2.invert=function(t,n){if(!t||!n)return[t,n];var e=y(n),i=(n=N(n)/O,y(t)*t/R),a=(i*i-1+4*n*n)/N(i),r=a*a,o=n*(2-(.5<n?om(n,N(t)):0)),s=t*t+n*n,l=50;do{var u=o*o,h=(8*o-u*(2+u)-5)/(2*u*(o-1)),c=(3*o-u*o-10)/(2*u*o),g=h*h,d=o*h,f=o+h,p=f*f,_=o+3*h,m=-2*f*(4*d*g+(1-4*u+3*u*u)*(1+c)+g*(14*u-6-r+(8*u-8-2*r)*c)+d*(12*u-8+(10*u-10-r)*c)),u=I(p*(u+g*r-1)+(1-u)*(u*(_*_+4*g)+g*(12*d+4*g)))}while(o-=_=(a*(p+g-1)+2*u-i*(4*p+r))/(a*(2*h*c+2*f*(1+c))+m/u-8*f*(a*(g-1+p)+2*u)*(1+c)/(r+4*p)),F<_*s*s&&0<--l);return[y(t)*(I(a*a+4)+a)*O/4,e*R*o]};var ri=4*O+3*I(3),gr=2*I(2*O*I(3)/ri),D2=Dm(gr*I(3)/O,gr,ri/6);function N2(t,n){return[t*I(1-3*n*n/(O*O)),n]}function P2(t,n){var e=P(n),i=P(t)*e,a=1-i,n=P(t=b(L(t)*e,-L(n))),t=L(t);return[t*(e=I(1-i*i))-n*a,-n*e-t*a]}function L2(t,n){var e=vm(t,n);return[(e[0]+t/R)/2,(e[1]+n)/2]}N2.invert=function(t,n){return[t/I(1-3*n*n/(O*O)),n]},P2.invert=function(t,n){var e=(t*t+n*n)/-2,i=I(-e*(2+e)),a=n*e+t*i,t=t*e-n*i,n=I(t*t+a*a);return[b(i*a,n*(1+e)),n?-j(i*t/n):0]},L2.invert=function(t,n){var e=t,i=n,a=25;do{var r,o=P(i),s=L(i),l=L(2*i),u=s*s,h=o*o,c=L(e),g=P(e/2),d=L(e/2),f=d*d,p=1-h*g*g,p=p?pm(o*g)*I(r=1/p):r=0,_=.5*(2*p*o*d+e/R)-t,m=.5*(p*s+i)-n,y=.5*r*(h*f+p*o*g*u)+.5/R,v=r*(c*l/4-p*s*d),l=.125*r*(l*d-p*s*h*c),d=.5*r*(u*g+p*f*o)+.5,s=v*l-d*y,h=(m*v-_*d)/s,c=(_*l-m*y)/s}while(e-=h,i-=c,(N(h)>F||N(c)>F)&&0<--a);return[e,i]};var F2=Object.freeze({__proto__:null,geoAiry:function(){var n=R,e=A_(ym),t=e(n);return t.radius=function(t){return arguments.length?e(n=t*x):n*m},t.scale(179.976).clipAngle(147)},geoAiryRaw:ym,geoAitoff:function(){return d(vm).scale(152.63)},geoAitoffRaw:vm,geoArmadillo:function(){var r=20*x,o=0<=r?1:-1,s=g(o*r),n=A_(bm),l=n(r),u=l.stream;return l.parallel=function(t){return arguments.length?(s=g((o=0<=(r=t*x)?1:-1)*r),n(r)):r*m},l.stream=function(t){var n=l.rotate(),e=u(t),i=(l.rotate([0,0]),u(t)),a=l.precision();return l.rotate(n),e.sphere=function(){i.polygonStart(),i.lineStart();for(var t=-180*o;o*t<180;t+=90*o)i.point(t,90*o);if(r)for(;-180<=o*(t-=3*o*a);)i.point(t,o*-b(P(t*x/2),s)*m);i.lineEnd(),i.polygonEnd()},e},l.scale(218.695).center([0,28.0974])},geoArmadilloRaw:bm,geoAugust:function(){return d(xm).scale(66.1603)},geoAugustRaw:xm,geoBaker:function(){return d(Cm).scale(112.314)},geoBakerRaw:Cm,geoBerghaus:function(){var o=5,n=A_(km),i=n(o),a=i.stream,s=-P(.01*x),l=L(.01*x);return i.lobes=function(t){return arguments.length?n(o=+t):o},i.stream=function(t){var n=i.rotate(),e=a(t),r=(i.rotate([0,0]),a(t));return i.rotate(n),e.sphere=function(){r.polygonStart(),r.lineStart();for(var t=0,n=360/o,e=2*O/o,i=90-180/o,a=R;t<o;++t,i-=n,a-=e)r.point(b(l*P(a),s)*m,j(l*L(a))*m),i<-90?(r.point(-90,-180-i-.01),r.point(-90,-180-i+.01)):(r.point(90,i+.01),r.point(90,i-.01));r.lineEnd(),r.polygonEnd()},e},i.scale(87.8076).center([0,17.1875]).clipAngle(179.999)},geoBerghausRaw:km,geoBertin1953:function(){
5395
5391
  // this projection should not be rotated
5396
- return d(zm()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])},geoBertin1953Raw:zm,geoBoggs:function(){return d(Pm).scale(160.857)},geoBoggsRaw:Pm,geoBonne:function(){return Lm(Om).scale(123.082).center([0,26.1441]).parallel(45)},geoBonneRaw:Om,geoBottomley:function(){var n=.5,e=k_(Rm),t=e(n);return t.fraction=function(t){return arguments.length?e(n=+t):n},t.scale(158.837)},geoBottomleyRaw:Rm,geoBromley:function(){return d(jm).scale(152.63)},geoBromleyRaw:jm,geoChamberlin:$m,geoChamberlinAfrica:function(){return $m([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])},geoChamberlinRaw:Gm,geoCollignon:function(){return d(qm).scale(95.6464).center([0,30])},geoCollignonRaw:qm,geoCraig:function(){return Lm(Um).scale(249.828).clipAngle(90)},geoCraigRaw:Um,geoCraster:function(){return d(Ym).scale(156.19)},geoCrasterRaw:Ym,geoCylindricalEqualArea:function(){return Lm(Vm).parallel(38.58).scale(195.044);// width / (sqrt(width / height / pi) * 2 * pi)
5397
- },geoCylindricalEqualAreaRaw:Vm,geoCylindricalStereographic:function(){return Lm(Zm).scale(124.75)},geoCylindricalStereographicRaw:Zm,geoEckert1:function(){return d(Xm).scale(165.664)},geoEckert1Raw:Xm,geoEckert2:function(){return d(Jm).scale(165.664)},geoEckert2Raw:Jm,geoEckert3:function(){return d(Qm).scale(180.739)},geoEckert3Raw:Qm,geoEckert4:function(){return d(ty).scale(180.739)},geoEckert4Raw:ty,geoEckert5:function(){return d(ny).scale(173.044)},geoEckert5Raw:ny,geoEckert6:function(){return d(ey).scale(173.044)},geoEckert6Raw:ey,geoEisenlohr:function(){return d(ay).scale(62.5271)},geoEisenlohrRaw:ay,geoFahey:function(){return d(oy).scale(137.152)},geoFaheyRaw:oy,geoFoucaut:function(){return d(sy).scale(135.264)},geoFoucautRaw:sy,geoFoucautSinusoidal:function(){var n=.5,e=k_(ly),t=e(n);return t.alpha=function(t){return arguments.length?e(n=+t):n},t.scale(168.725)},geoFoucautSinusoidalRaw:ly,geoGilbert:function(t){var n=(t=null==t?X_:t)(),i=j_().scale(m).precision(0).clipAngle(null).translate([0,0]);// antimeridian cutting
5398
- function e(t){return n(uy(t))}function a(t){e[t]=function(){return arguments.length?(n[t].apply(n,arguments),e):n[t]()}}return n.invert&&(e.invert=function(t){return hy(n.invert(t))}),e.stream=function(t){var e=n.stream(t),t=i.stream({point:function(t,n){e.point(t/2,j(g(-n/2*x))*m)},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}});return t.sphere=e.sphere,t},e.rotate=function(t){return arguments.length?(i.rotate(t),e):i.rotate()},e.center=function(t){return arguments.length?(n.center(uy(t)),e):hy(n.center())},a("angle"),a("clipAngle"),a("clipExtent"),a("fitExtent"),a("fitHeight"),a("fitSize"),a("fitWidth"),a("scale"),a("translate"),a("precision"),e.scale(249.5)},geoGingery:function(){var a=6,n=30*x,r=P(n),o=L(n),e=k_(cy),s=e(n,a),l=s.stream,u=-P(.01*x),h=L(.01*x);return s.radius=function(t){return arguments.length?(r=P(n=t*x),o=L(n),e(n,a)):n*m},s.lobes=function(t){return arguments.length?e(n,a=+t):a},s.stream=function(t){var n=s.rotate(),e=l(t),i=(s.rotate([0,0]),l(t));return s.rotate(n),e.sphere=function(){i.polygonStart(),i.lineStart();for(var t=0,n=2*O/a,e=0;t<a;++t,e-=n)i.point(b(h*P(e),u)*m,j(h*L(e))*m),i.point(b(o*P(e-n/2),r)*m,j(o*L(e-n/2))*m);i.lineEnd(),i.polygonEnd()},e},s.rotate([90,-40]).scale(91.7095).clipAngle(179.999)},geoGingeryRaw:cy,geoGinzburg4:function(){return d(py).scale(149.995)},geoGinzburg4Raw:py,geoGinzburg5:function(){return d(_y).scale(153.93)},geoGinzburg5Raw:_y,geoGinzburg6:function(){return d(my).scale(130.945)},geoGinzburg6Raw:my,geoGinzburg8:function(){return d(yy).scale(131.747)},geoGinzburg8Raw:yy,geoGinzburg9:function(){return d(vy).scale(131.087)},geoGinzburg9Raw:vy,geoGringorten:function(){return d(by(xy)).scale(239.75)}
5392
+ return d(Tm()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])},geoBertin1953Raw:Tm,geoBoggs:function(){return d(Lm).scale(160.857)},geoBoggsRaw:Lm,geoBonne:function(){return Fm(Rm).scale(123.082).center([0,26.1441]).parallel(45)},geoBonneRaw:Rm,geoBottomley:function(){var n=.5,e=A_(jm),t=e(n);return t.fraction=function(t){return arguments.length?e(n=+t):n},t.scale(158.837)},geoBottomleyRaw:jm,geoBromley:function(){return d(Im).scale(152.63)},geoBromleyRaw:Im,geoChamberlin:qm,geoChamberlinAfrica:function(){return qm([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])},geoChamberlinRaw:Km,geoCollignon:function(){return d(Um).scale(95.6464).center([0,30])},geoCollignonRaw:Um,geoCraig:function(){return Fm(Wm).scale(249.828).clipAngle(90)},geoCraigRaw:Wm,geoCraster:function(){return d(Vm).scale(156.19)},geoCrasterRaw:Vm,geoCylindricalEqualArea:function(){return Fm(Zm).parallel(38.58).scale(195.044);// width / (sqrt(width / height / pi) * 2 * pi)
5393
+ },geoCylindricalEqualAreaRaw:Zm,geoCylindricalStereographic:function(){return Fm(Xm).scale(124.75)},geoCylindricalStereographicRaw:Xm,geoEckert1:function(){return d(Jm).scale(165.664)},geoEckert1Raw:Jm,geoEckert2:function(){return d(Qm).scale(165.664)},geoEckert2Raw:Qm,geoEckert3:function(){return d(ty).scale(180.739)},geoEckert3Raw:ty,geoEckert4:function(){return d(ny).scale(180.739)},geoEckert4Raw:ny,geoEckert5:function(){return d(ey).scale(173.044)},geoEckert5Raw:ey,geoEckert6:function(){return d(iy).scale(173.044)},geoEckert6Raw:iy,geoEisenlohr:function(){return d(ry).scale(62.5271)},geoEisenlohrRaw:ry,geoFahey:function(){return d(sy).scale(137.152)},geoFaheyRaw:sy,geoFoucaut:function(){return d(ly).scale(135.264)},geoFoucautRaw:ly,geoFoucautSinusoidal:function(){var n=.5,e=A_(uy),t=e(n);return t.alpha=function(t){return arguments.length?e(n=+t):n},t.scale(168.725)},geoFoucautSinusoidalRaw:uy,geoGilbert:function(t){var n=(t=null==t?J_:t)(),i=I_().scale(m).precision(0).clipAngle(null).translate([0,0]);// antimeridian cutting
5394
+ function e(t){return n(hy(t))}function a(t){e[t]=function(){return arguments.length?(n[t].apply(n,arguments),e):n[t]()}}return n.invert&&(e.invert=function(t){return cy(n.invert(t))}),e.stream=function(t){var e=n.stream(t),t=i.stream({point:function(t,n){e.point(t/2,j(g(-n/2*x))*m)},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}});return t.sphere=e.sphere,t},e.rotate=function(t){return arguments.length?(i.rotate(t),e):i.rotate()},e.center=function(t){return arguments.length?(n.center(hy(t)),e):cy(n.center())},a("angle"),a("clipAngle"),a("clipExtent"),a("fitExtent"),a("fitHeight"),a("fitSize"),a("fitWidth"),a("scale"),a("translate"),a("precision"),e.scale(249.5)},geoGingery:function(){var a=6,n=30*x,r=P(n),o=L(n),e=A_(gy),s=e(n,a),l=s.stream,u=-P(.01*x),h=L(.01*x);return s.radius=function(t){return arguments.length?(r=P(n=t*x),o=L(n),e(n,a)):n*m},s.lobes=function(t){return arguments.length?e(n,a=+t):a},s.stream=function(t){var n=s.rotate(),e=l(t),i=(s.rotate([0,0]),l(t));return s.rotate(n),e.sphere=function(){i.polygonStart(),i.lineStart();for(var t=0,n=2*O/a,e=0;t<a;++t,e-=n)i.point(b(h*P(e),u)*m,j(h*L(e))*m),i.point(b(o*P(e-n/2),r)*m,j(o*L(e-n/2))*m);i.lineEnd(),i.polygonEnd()},e},s.rotate([90,-40]).scale(91.7095).clipAngle(179.999)},geoGingeryRaw:gy,geoGinzburg4:function(){return d(_y).scale(149.995)},geoGinzburg4Raw:_y,geoGinzburg5:function(){return d(my).scale(153.93)},geoGinzburg5Raw:my,geoGinzburg6:function(){return d(yy).scale(130.945)},geoGinzburg6Raw:yy,geoGinzburg8:function(){return d(vy).scale(131.747)},geoGinzburg8Raw:vy,geoGinzburg9:function(){return d(by).scale(131.087)},geoGinzburg9Raw:by,geoGringorten:function(){return d(xy(wy)).scale(239.75)}
5399
5395
  // Returns [sn, cn, dn](u + iv|m).
5400
- ,geoGringortenQuincuncial:function(){return Xv(xy).scale(176.423)},geoGringortenRaw:xy,geoGuyou:function(){return d(by(Cy)).scale(151.496)},geoGuyouRaw:Cy,geoHammer:function(){var n=2,e=k_(km),t=e(n);return t.coefficient=function(t){return arguments.length?e(n=+t):n},t.scale(169.529)},geoHammerRaw:km,geoHammerRetroazimuthal:function(){var e=0,i=k_(ky),a=i(e),n=a.rotate,t=a.stream,r=k1();return a.parallel=function(t){var n;return arguments.length?(n=a.rotate(),i(e=t*x).rotate(n)):e*m},
5396
+ ,geoGringortenQuincuncial:function(){return Jv(wy).scale(176.423)},geoGringortenRaw:wy,geoGuyou:function(){return d(xy(ky)).scale(151.496)},geoGuyouRaw:ky,geoHammer:function(){var n=2,e=A_(Am),t=e(n);return t.coefficient=function(t){return arguments.length?e(n=+t):n},t.scale(169.529)},geoHammerRaw:Am,geoHammerRetroazimuthal:function(){var e=0,i=A_(Ay),a=i(e),n=a.rotate,t=a.stream,r=A1();return a.parallel=function(t){var n;return arguments.length?(n=a.rotate(),i(e=t*x).rotate(n)):e*m},
5401
5397
  // Temporary hack; see hammerRetroazimuthalRotation.
5402
- a.rotate=function(t){return arguments.length?(n.call(a,[t[0],t[1]-e*m]),r.center([-t[0],-t[1]]),a):((t=n.call(a))[1]+=e*m,t)},a.stream=function(a){return(a=t(a)).sphere=function(){a.polygonStart();var t,n=r.radius(89.99)().coordinates[0],e=n.length-1,i=-1;for(a.lineStart();++i<e;)a.point((t=n[i])[0],t[1]);for(a.lineEnd(),e=(n=r.radius(90.01)().coordinates[0]).length-1,a.lineStart();0<=--i;)a.point((t=n[i])[0],t[1]);a.lineEnd(),a.polygonEnd()},a},a.scale(79.4187).parallel(45).clipAngle(179.999)},geoHammerRetroazimuthalRaw:ky,geoHealpix:function(){var a=4,n=k_(zy),r=n(a),o=r.stream;return r.lobes=function(t){return arguments.length?n(a=+t):a},r.stream=function(t){var n=r.rotate(),e=o(t),i=(r.rotate([0,0]),o(t));return r.rotate(n),e.sphere=function(){var t,n;X0((t=180/a,n=[].concat(Lt(-180,180+t/2,t).map(Ty),Lt(180,-180-t/2,-t).map(By)),{type:"Polygon",coordinates:[180===t?n.map(Dy):n]}),i)},e},r.scale(239.75)},geoHealpixRaw:zy,geoHill:function(){var n=1,e=k_(Ny),t=e(n);return t.ratio=function(t){return arguments.length?e(n=+t):n},t.scale(167.774).center([0,18.67])},geoHillRaw:Ny,geoHomolosine:function(){return d(Oy).scale(152.63)},geoHomolosineRaw:Oy,geoHufnagel:function(){var n=1,e=0,i=45*x,a=2,r=k_(Ry),t=r(n,e,i,a);return t.a=function(t){return arguments.length?r(n=+t,e,i,a):n},t.b=function(t){return arguments.length?r(n,e=+t,i,a):e},t.psiMax=function(t){return arguments.length?r(n,e,i=+t*x,a):i*m},t.ratio=function(t){return arguments.length?r(n,e,i,a=+t):a},t.scale(180.739)},geoHufnagelRaw:Ry,geoHyperelliptical:function(){var n=0,e=2.5,i=1.183136,a=k_(Iy),t=a(n,e,i);return t.alpha=function(t){return arguments.length?a(n=+t,e,i):n},t.k=function(t){return arguments.length?a(n,e=+t,i):e},t.gamma=function(t){return arguments.length?a(n,e,i=+t):i},t.scale(152.63)},geoHyperellipticalRaw:Iy,geoInterrupt:Gy,geoInterruptedBoggs:function(){return Gy(Pm,Ky).scale(160.857)},geoInterruptedHomolosine:function(){return Gy(Oy,$y).scale(152.63)},geoInterruptedMollweide:function(){return Gy(Dm,qy).scale(169.529)},geoInterruptedMollweideHemispheres:function(){return Gy(Dm,Uy).scale(169.529).rotate([20,0])},geoInterruptedQuarticAuthalic:function(){return Gy(km(1/0),mv).rotate([20,0]).scale(152.63)},geoInterruptedSinuMollweide:function(){return Gy(Fy,Wy,Em).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},geoInterruptedSinusoidal:function(){return Gy(Fm,Yy).scale(152.63).rotate([-20,0])},geoKavrayskiy7:function(){return d(Vy).scale(158.837)},geoKavrayskiy7Raw:Vy,geoLagrange:function(){var n=.5,e=k_(Zy),t=e(n);return t.spacing=function(t){return arguments.length?e(n=+t):n},t.scale(124.75)},geoLagrangeRaw:Zy,geoLarrivee:function(){return d(Jy).scale(97.2672)},geoLarriveeRaw:Jy,geoLaskowski:function(){return d(Qy).scale(139.98)},geoLaskowskiRaw:Qy,geoLittrow:function(){return d(tv).scale(144.049).clipAngle(89.999)},geoLittrowRaw:tv,geoLoximuthal:function(){return Lm(nv).parallel(40).scale(158.837)},geoLoximuthalRaw:nv,geoMiller:function(){return d(ev).scale(108.318)},geoMillerRaw:ev,geoModifiedStereographic:uv,geoModifiedStereographicAlaska:function(){return uv(av,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},geoModifiedStereographicGs48:function(){return uv(rv,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},geoModifiedStereographicGs50:function(){return uv(ov,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},geoModifiedStereographicLee:function(){return uv(lv,[165,10]).scale(250).clipAngle(130).center([-165,-10])},geoModifiedStereographicMiller:function(){return uv(sv,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},geoModifiedStereographicRaw:iv,geoMollweide:function(){return d(Dm).scale(169.529)},geoMollweideRaw:Dm,geoMtFlatPolarParabolic:function(){return d(gv).scale(164.859)},geoMtFlatPolarParabolicRaw:gv,geoMtFlatPolarQuartic:function(){return d(dv).scale(188.209)},geoMtFlatPolarQuarticRaw:dv,geoMtFlatPolarSinusoidal:function(){return d(fv).scale(166.518)},geoMtFlatPolarSinusoidalRaw:fv,geoNaturalEarth2:function(){return d(pv).scale(175.295)},geoNaturalEarth2Raw:pv,geoNellHammer:function(){return d(_v).scale(152.63)},geoNellHammerRaw:_v,geoNicolosi:function(){return d(yv).scale(127.267)},geoNicolosiRaw:yv,geoPatterson:function(){return d(Cv).scale(139.319)},geoPattersonRaw:Cv,geoPeirceQuincuncial:function(){return Xv(Cy).scale(111.48)},geoPolyconic:function(){return d(kv).scale(103.74)},geoPolyconicRaw:kv,geoPolyhedral:Bv,geoPolyhedralButterfly:function(n){n=n||function(t){t=f1({type:"MultiPoint",coordinates:t});return Y_().scale(1).translate([0,0]).rotate([-t[0],-t[1]])};var e=Ov.map(function(t){return{face:t,project:n(t)}});return[-1,0,0,1,0,1,4,5].forEach(function(t,n){t=e[t];t&&(t.children||(t.children=[])).push(e[n])}),Bv(e[0],function(t,n){return e[t<-O/2?n<0?6:4:t<0?n<0?2:0:t<O/2?n<0?3:1:n<0?7:5]}).angle(-30).scale(101.858).center([0,45])},geoPolyhedralCollignon:function(n){n=n||function(t){t=f1({type:"MultiPoint",coordinates:t});return d(jv).translate([0,0]).scale(1).rotate(0<t[1]?[-t[0],0]:[180-t[0],180])};var e=Ov.map(function(t){return{face:t,project:n(t)}});return[-1,0,0,1,0,1,4,5].forEach(function(t,n){t=e[t];t&&(t.children||(t.children=[])).push(e[n])}),Bv(e[0],function(t,n){return e[t<-O/2?n<0?6:4:t<0?n<0?2:0:t<O/2?n<0?3:1:n<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])},geoPolyhedralWaterman:function(n){n=n||function(t){t=6===t.length?f1({type:"MultiPoint",coordinates:t}):t[0];return Y_().scale(1).translate([0,0]).rotate([-t[0],-t[1]])};var l=Ov.map(function(t){for(var n,e=t.map(Gv),i=e.length,a=e[i-1],r=[],o=0;o<i;++o)n=e[o],r.push(Hv([.9486832980505138*a[0]+.31622776601683794*n[0],.9486832980505138*a[1]+.31622776601683794*n[1],.9486832980505138*a[2]+.31622776601683794*n[2]]),Hv([.9486832980505138*n[0]+.31622776601683794*a[0],.9486832980505138*n[1]+.31622776601683794*a[1],.9486832980505138*n[2]+.31622776601683794*a[2]])),a=n;return r}),u=[],h=[-1,0,0,1,0,1,4,5],i=(l.forEach(function(t,n){for(var e,i,a=Ov[n],r=a.length,o=u[n]=[],s=0;s<r;++s)l.push([a[s],t[(2*s+2)%(2*r)],t[(2*s+1)%(2*r)]]),h.push(n),o.push((e=Gv(t[(2*s+2)%(2*r)]),i=Gv(t[(2*s+1)%(2*r)]),[e[1]*i[2]-e[2]*i[1],e[2]*i[0]-e[0]*i[2],e[0]*i[1]-e[1]*i[0]]))}),l.map(function(t){return{project:n(t),face:t}}));return h.forEach(function(t,n){t=i[t];t&&(t.children||(t.children=[])).push(i[n])}),Bv(i[0],function(t,n){var e=[(e=P(n))*P(t),e*L(t),L(n)];return i[Iv((n=u[t=t<-O/2?n<0?6:4:t<0?n<0?2:0:t<O/2?n<0?3:1:n<0?7:5])[0],e)<0?8+3*t:Iv(n[1],e)<0?8+3*t+1:Iv(n[2],e)<0?8+3*t+2:t]}).angle(-30).scale(110.625).center([0,45])},geoProject:function(t,n){var e;if(!(n=n.stream))throw new Error("invalid projection");switch(t&&t.type){case"Feature":e=$v;break;case"FeatureCollection":e=Kv;break;default:e=qv}return e(t,n)},geoQuantize:function(t,a){if(!(0<=(a=+a)&&a<=20))throw new Error("invalid digits");function r(t){var n=t.length,e=2,i=new Array(n);for(i[0]=+t[0].toFixed(a),i[1]=+t[1].toFixed(a);e<n;)i[e]=t[e],++e;return i}function e(t){for(var n=r(t[0]),e=[n],i=1;i<t.length;i++){var a=r(t[i]);(2<a.length||a[0]!=n[0]||a[1]!=n[1])&&(e.push(a),n=a)}return 1===e.length&&1<t.length&&e.push(r(t[t.length-1])),e}function i(t){return t.map(e)}function o(t){if(null==t)return t;var n;switch(t.type){case"GeometryCollection":n={type:"GeometryCollection",geometries:t.geometries.map(o)};break;case"Point":n={type:"Point",coordinates:r(t.coordinates)};break;case"MultiPoint":n={type:t.type,coordinates:t.coordinates.map(r)};break;case"LineString":n={type:t.type,coordinates:e(t.coordinates)};break;case"MultiLineString":case"Polygon":n={type:t.type,coordinates:i(t.coordinates)};break;case"MultiPolygon":n={type:"MultiPolygon",coordinates:t.coordinates.map(i)};break;default:return t}return null!=t.bbox&&(n.bbox=t.bbox),n}function n(t){var n={type:"Feature",properties:t.properties,geometry:o(t.geometry)};return null!=t.id&&(n.id=t.id),null!=t.bbox&&(n.bbox=t.bbox),n}if(null!=t)switch(t.type){case"Feature":return n(t);case"FeatureCollection":var s={type:"FeatureCollection",features:t.features.map(n)};return null!=t.bbox&&(s.bbox=t.bbox),s;default:return o(t)}return t},geoQuincuncial:Xv,geoRectangularPolyconic:function(){return Lm(Jv).scale(131.215)},geoRectangularPolyconicRaw:Jv,geoRobinson:function(){return d(t2).scale(152.63)},geoRobinsonRaw:t2,geoSatellite:function(){var n=2,e=0,i=k_(n2),t=i(n,e);
5398
+ a.rotate=function(t){return arguments.length?(n.call(a,[t[0],t[1]-e*m]),r.center([-t[0],-t[1]]),a):((t=n.call(a))[1]+=e*m,t)},a.stream=function(a){return(a=t(a)).sphere=function(){a.polygonStart();var t,n=r.radius(89.99)().coordinates[0],e=n.length-1,i=-1;for(a.lineStart();++i<e;)a.point((t=n[i])[0],t[1]);for(a.lineEnd(),e=(n=r.radius(90.01)().coordinates[0]).length-1,a.lineStart();0<=--i;)a.point((t=n[i])[0],t[1]);a.lineEnd(),a.polygonEnd()},a},a.scale(79.4187).parallel(45).clipAngle(179.999)},geoHammerRetroazimuthalRaw:Ay,geoHealpix:function(){var a=4,n=A_(Ty),r=n(a),o=r.stream;return r.lobes=function(t){return arguments.length?n(a=+t):a},r.stream=function(t){var n=r.rotate(),e=o(t),i=(r.rotate([0,0]),o(t));return r.rotate(n),e.sphere=function(){var t,n;J0((t=180/a,n=[].concat(Lt(-180,180+t/2,t).map(By),Lt(180,-180-t/2,-t).map(Dy)),{type:"Polygon",coordinates:[180===t?n.map(Ny):n]}),i)},e},r.scale(239.75)},geoHealpixRaw:Ty,geoHill:function(){var n=1,e=A_(Py),t=e(n);return t.ratio=function(t){return arguments.length?e(n=+t):n},t.scale(167.774).center([0,18.67])},geoHillRaw:Py,geoHomolosine:function(){return d(Ry).scale(152.63)},geoHomolosineRaw:Ry,geoHufnagel:function(){var n=1,e=0,i=45*x,a=2,r=A_(jy),t=r(n,e,i,a);return t.a=function(t){return arguments.length?r(n=+t,e,i,a):n},t.b=function(t){return arguments.length?r(n,e=+t,i,a):e},t.psiMax=function(t){return arguments.length?r(n,e,i=+t*x,a):i*m},t.ratio=function(t){return arguments.length?r(n,e,i,a=+t):a},t.scale(180.739)},geoHufnagelRaw:jy,geoHyperelliptical:function(){var n=0,e=2.5,i=1.183136,a=A_(Hy),t=a(n,e,i);return t.alpha=function(t){return arguments.length?a(n=+t,e,i):n},t.k=function(t){return arguments.length?a(n,e=+t,i):e},t.gamma=function(t){return arguments.length?a(n,e,i=+t):i},t.scale(152.63)},geoHyperellipticalRaw:Hy,geoInterrupt:Ky,geoInterruptedBoggs:function(){return Ky(Lm,$y).scale(160.857)},geoInterruptedHomolosine:function(){return Ky(Ry,qy).scale(152.63)},geoInterruptedMollweide:function(){return Ky(Nm,Uy).scale(169.529)},geoInterruptedMollweideHemispheres:function(){return Ky(Nm,Wy).scale(169.529).rotate([20,0])},geoInterruptedQuarticAuthalic:function(){return Ky(Am(1/0),yv).rotate([20,0]).scale(152.63)},geoInterruptedSinuMollweide:function(){return Ky(Oy,Yy,zm).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},geoInterruptedSinusoidal:function(){return Ky(Om,Vy).scale(152.63).rotate([-20,0])},geoKavrayskiy7:function(){return d(Zy).scale(158.837)},geoKavrayskiy7Raw:Zy,geoLagrange:function(){var n=.5,e=A_(Xy),t=e(n);return t.spacing=function(t){return arguments.length?e(n=+t):n},t.scale(124.75)},geoLagrangeRaw:Xy,geoLarrivee:function(){return d(Qy).scale(97.2672)},geoLarriveeRaw:Qy,geoLaskowski:function(){return d(tv).scale(139.98)},geoLaskowskiRaw:tv,geoLittrow:function(){return d(nv).scale(144.049).clipAngle(89.999)},geoLittrowRaw:nv,geoLoximuthal:function(){return Fm(ev).parallel(40).scale(158.837)},geoLoximuthalRaw:ev,geoMiller:function(){return d(iv).scale(108.318)},geoMillerRaw:iv,geoModifiedStereographic:hv,geoModifiedStereographicAlaska:function(){return hv(rv,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},geoModifiedStereographicGs48:function(){return hv(ov,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},geoModifiedStereographicGs50:function(){return hv(sv,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},geoModifiedStereographicLee:function(){return hv(uv,[165,10]).scale(250).clipAngle(130).center([-165,-10])},geoModifiedStereographicMiller:function(){return hv(lv,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},geoModifiedStereographicRaw:av,geoMollweide:function(){return d(Nm).scale(169.529)},geoMollweideRaw:Nm,geoMtFlatPolarParabolic:function(){return d(dv).scale(164.859)},geoMtFlatPolarParabolicRaw:dv,geoMtFlatPolarQuartic:function(){return d(fv).scale(188.209)},geoMtFlatPolarQuarticRaw:fv,geoMtFlatPolarSinusoidal:function(){return d(pv).scale(166.518)},geoMtFlatPolarSinusoidalRaw:pv,geoNaturalEarth2:function(){return d(_v).scale(175.295)},geoNaturalEarth2Raw:_v,geoNellHammer:function(){return d(mv).scale(152.63)},geoNellHammerRaw:mv,geoNicolosi:function(){return d(vv).scale(127.267)},geoNicolosiRaw:vv,geoPatterson:function(){return d(kv).scale(139.319)},geoPattersonRaw:kv,geoPeirceQuincuncial:function(){return Jv(ky).scale(111.48)},geoPolyconic:function(){return d(Av).scale(103.74)},geoPolyconicRaw:Av,geoPolyhedral:Dv,geoPolyhedralButterfly:function(n){n=n||function(t){t=p1({type:"MultiPoint",coordinates:t});return V_().scale(1).translate([0,0]).rotate([-t[0],-t[1]])};var e=Rv.map(function(t){return{face:t,project:n(t)}});return[-1,0,0,1,0,1,4,5].forEach(function(t,n){t=e[t];t&&(t.children||(t.children=[])).push(e[n])}),Dv(e[0],function(t,n){return e[t<-O/2?n<0?6:4:t<0?n<0?2:0:t<O/2?n<0?3:1:n<0?7:5]}).angle(-30).scale(101.858).center([0,45])},geoPolyhedralCollignon:function(n){n=n||function(t){t=p1({type:"MultiPoint",coordinates:t});return d(Iv).translate([0,0]).scale(1).rotate(0<t[1]?[-t[0],0]:[180-t[0],180])};var e=Rv.map(function(t){return{face:t,project:n(t)}});return[-1,0,0,1,0,1,4,5].forEach(function(t,n){t=e[t];t&&(t.children||(t.children=[])).push(e[n])}),Dv(e[0],function(t,n){return e[t<-O/2?n<0?6:4:t<0?n<0?2:0:t<O/2?n<0?3:1:n<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])},geoPolyhedralWaterman:function(n){n=n||function(t){t=6===t.length?p1({type:"MultiPoint",coordinates:t}):t[0];return V_().scale(1).translate([0,0]).rotate([-t[0],-t[1]])};var l=Rv.map(function(t){for(var n,e=t.map(Kv),i=e.length,a=e[i-1],r=[],o=0;o<i;++o)n=e[o],r.push(Gv([.9486832980505138*a[0]+.31622776601683794*n[0],.9486832980505138*a[1]+.31622776601683794*n[1],.9486832980505138*a[2]+.31622776601683794*n[2]]),Gv([.9486832980505138*n[0]+.31622776601683794*a[0],.9486832980505138*n[1]+.31622776601683794*a[1],.9486832980505138*n[2]+.31622776601683794*a[2]])),a=n;return r}),u=[],h=[-1,0,0,1,0,1,4,5],i=(l.forEach(function(t,n){for(var e,i,a=Rv[n],r=a.length,o=u[n]=[],s=0;s<r;++s)l.push([a[s],t[(2*s+2)%(2*r)],t[(2*s+1)%(2*r)]]),h.push(n),o.push((e=Kv(t[(2*s+2)%(2*r)]),i=Kv(t[(2*s+1)%(2*r)]),[e[1]*i[2]-e[2]*i[1],e[2]*i[0]-e[0]*i[2],e[0]*i[1]-e[1]*i[0]]))}),l.map(function(t){return{project:n(t),face:t}}));return h.forEach(function(t,n){t=i[t];t&&(t.children||(t.children=[])).push(i[n])}),Dv(i[0],function(t,n){var e=[(e=P(n))*P(t),e*L(t),L(n)];return i[Hv((n=u[t=t<-O/2?n<0?6:4:t<0?n<0?2:0:t<O/2?n<0?3:1:n<0?7:5])[0],e)<0?8+3*t:Hv(n[1],e)<0?8+3*t+1:Hv(n[2],e)<0?8+3*t+2:t]}).angle(-30).scale(110.625).center([0,45])},geoProject:function(t,n){var e;if(!(n=n.stream))throw new Error("invalid projection");switch(t&&t.type){case"Feature":e=qv;break;case"FeatureCollection":e=$v;break;default:e=Uv}return e(t,n)},geoQuantize:function(t,a){if(!(0<=(a=+a)&&a<=20))throw new Error("invalid digits");function r(t){var n=t.length,e=2,i=new Array(n);for(i[0]=+t[0].toFixed(a),i[1]=+t[1].toFixed(a);e<n;)i[e]=t[e],++e;return i}function e(t){for(var n=r(t[0]),e=[n],i=1;i<t.length;i++){var a=r(t[i]);(2<a.length||a[0]!=n[0]||a[1]!=n[1])&&(e.push(a),n=a)}return 1===e.length&&1<t.length&&e.push(r(t[t.length-1])),e}function i(t){return t.map(e)}function o(t){if(null==t)return t;var n;switch(t.type){case"GeometryCollection":n={type:"GeometryCollection",geometries:t.geometries.map(o)};break;case"Point":n={type:"Point",coordinates:r(t.coordinates)};break;case"MultiPoint":n={type:t.type,coordinates:t.coordinates.map(r)};break;case"LineString":n={type:t.type,coordinates:e(t.coordinates)};break;case"MultiLineString":case"Polygon":n={type:t.type,coordinates:i(t.coordinates)};break;case"MultiPolygon":n={type:"MultiPolygon",coordinates:t.coordinates.map(i)};break;default:return t}return null!=t.bbox&&(n.bbox=t.bbox),n}function n(t){var n={type:"Feature",properties:t.properties,geometry:o(t.geometry)};return null!=t.id&&(n.id=t.id),null!=t.bbox&&(n.bbox=t.bbox),n}if(null!=t)switch(t.type){case"Feature":return n(t);case"FeatureCollection":var s={type:"FeatureCollection",features:t.features.map(n)};return null!=t.bbox&&(s.bbox=t.bbox),s;default:return o(t)}return t},geoQuincuncial:Jv,geoRectangularPolyconic:function(){return Fm(Qv).scale(131.215)},geoRectangularPolyconicRaw:Qv,geoRobinson:function(){return d(n2).scale(152.63)},geoRobinsonRaw:n2,geoSatellite:function(){var n=2,e=0,i=A_(e2),t=i(n,e);
5403
5399
  // As a multiple of radius.
5404
- return t.distance=function(t){return arguments.length?i(n=+t,e):n},t.tilt=function(t){return arguments.length?i(n,e=t*x):e*m},t.scale(432.147).clipAngle(fm(1/n)*m-1e-6)},geoSatelliteRaw:n2,geoSinuMollweide:function(){return d(Fy).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},geoSinuMollweideRaw:Fy,geoSinusoidal:function(){return d(Fm).scale(152.63)},geoSinusoidalRaw:Fm,geoStitch:function(t){if(null==t)return t;switch(t.type){case"Feature":return m2(t);case"FeatureCollection":var n={type:"FeatureCollection",features:t.features.map(m2)};return null!=t.bbox&&(n.bbox=t.bbox),n;default:return y2(t)}},geoTimes:function(){return d(v2).scale(146.153)},geoTimesRaw:v2,geoTwoPointAzimuthal:w2,geoTwoPointAzimuthalRaw:x2,geoTwoPointAzimuthalUsa:function(){return w2([-158,21.5],[-77,39]).clipAngle(60).scale(400)},geoTwoPointEquidistant:C2,geoTwoPointEquidistantRaw:S2,geoTwoPointEquidistantUsa:function(){return C2([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},geoVanDerGrinten:function(){return d(k2).scale(79.4183)},geoVanDerGrinten2:function(){return d(A2).scale(79.4183)},geoVanDerGrinten2Raw:A2,geoVanDerGrinten3:function(){return d(M2).scale(79.4183)},geoVanDerGrinten3Raw:M2,geoVanDerGrinten4:function(){return d(E2).scale(127.16)},geoVanDerGrinten4Raw:E2,geoVanDerGrintenRaw:k2,geoWagner:T2,geoWagner4:function(){return d(B2).scale(176.84)},geoWagner4Raw:B2,geoWagner6:function(){return d(D2).scale(152.63)},geoWagner6Raw:D2,geoWagner7:function(){return T2().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},geoWagnerRaw:z2,geoWiechel:function(){return d(N2).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},geoWiechelRaw:N2,geoWinkel3:function(){return d(P2).scale(158.837)},geoWinkel3Raw:P2}),G=1e-6;
5400
+ return t.distance=function(t){return arguments.length?i(n=+t,e):n},t.tilt=function(t){return arguments.length?i(n,e=t*x):e*m},t.scale(432.147).clipAngle(pm(1/n)*m-1e-6)},geoSatelliteRaw:e2,geoSinuMollweide:function(){return d(Oy).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},geoSinuMollweideRaw:Oy,geoSinusoidal:function(){return d(Om).scale(152.63)},geoSinusoidalRaw:Om,geoStitch:function(t){if(null==t)return t;switch(t.type){case"Feature":return y2(t);case"FeatureCollection":var n={type:"FeatureCollection",features:t.features.map(y2)};return null!=t.bbox&&(n.bbox=t.bbox),n;default:return v2(t)}},geoTimes:function(){return d(b2).scale(146.153)},geoTimesRaw:b2,geoTwoPointAzimuthal:S2,geoTwoPointAzimuthalRaw:w2,geoTwoPointAzimuthalUsa:function(){return S2([-158,21.5],[-77,39]).clipAngle(60).scale(400)},geoTwoPointEquidistant:k2,geoTwoPointEquidistantRaw:C2,geoTwoPointEquidistantUsa:function(){return k2([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},geoVanDerGrinten:function(){return d(A2).scale(79.4183)},geoVanDerGrinten2:function(){return d(M2).scale(79.4183)},geoVanDerGrinten2Raw:M2,geoVanDerGrinten3:function(){return d(E2).scale(79.4183)},geoVanDerGrinten3Raw:E2,geoVanDerGrinten4:function(){return d(z2).scale(127.16)},geoVanDerGrinten4Raw:z2,geoVanDerGrintenRaw:A2,geoWagner:B2,geoWagner4:function(){return d(D2).scale(176.84)},geoWagner4Raw:D2,geoWagner6:function(){return d(N2).scale(152.63)},geoWagner6Raw:N2,geoWagner7:function(){return B2().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},geoWagnerRaw:T2,geoWiechel:function(){return d(P2).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},geoWiechelRaw:P2,geoWinkel3:function(){return d(L2).scale(158.837)},geoWinkel3Raw:L2}),G=1e-6;
5405
5401
  // https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423
5406
- class F2{add(n){var e=this._partials;let i=0;for(let t=0;t<this._n&&t<32;t++){var a=e[t],r=n+a,a=Math.abs(n)<Math.abs(a)?n-(r-a):a-(r-n);a&&(e[i++]=a),n=r}return e[i]=n,this._n=i+1,this}valueOf(){var t=this._partials;let n=this._n,e,i,a,r=0;if(0<n){for(r=t[--n];0<n&&(e=r,i=t[--n],r=e+i,!(a=i-(r-e))););0<n&&(a<0&&t[n-1]<0||0<a&&0<t[n-1])&&(i=2*a,e=r+i,i==e-r)&&(r=e)}return r}constructor(){this._partials=new Float64Array(32),this._n=0}}function O2(t){return Array.from(function*(t){for(var n of t)yield*n}(t))}var R2=1e-6,K=Math.PI,j2=K/2,I2=K/4,H2=2*K,G2=180/K,K2=K/180,$2=Math.abs,q2=Math.atan,U2=Math.atan2,W2=Math.cos,Y2=Math.exp,V2=Math.log,Z2=Math.pow,$=Math.sin,X2=Math.sign||function(t){return 0<t?1:t<0?-1:0},J2=Math.sqrt,Q2=Math.tan;function t3(t){return 1<t?j2:t<-1?-j2:Math.asin(t)}function n3(){}function e3(t,n){t&&a3.hasOwnProperty(t.type)&&a3[t.type](t,n)}var i3={Feature:function(t,n){e3(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,i=-1,a=e.length;++i<a;)e3(e[i].geometry,n)}},a3={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)t=e[i],n.point(t[0],t[1],t[2])},LineString:function(t,n){r3(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)r3(e[i],n,0)},Polygon:function(t,n){o3(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)o3(e[i],n)},GeometryCollection:function(t,n){for(var e=t.geometries,i=-1,a=e.length;++i<a;)e3(e[i],n)}};function r3(t,n,e){var i,a=-1,r=t.length-e;for(n.lineStart();++a<r;)i=t[a],n.point(i[0],i[1],i[2]);n.lineEnd()}function o3(t,n){var e=-1,i=t.length;for(n.polygonStart();++e<i;)r3(t[e],n,1);n.polygonEnd()}function s3(t,n){t&&i3.hasOwnProperty(t.type)?i3[t.type](t,n):e3(t,n)}function l3(t){return[U2(t[1],t[0]),t3(t[2])]}function u3(t){var n=t[0],t=t[1],e=W2(t);return[e*W2(n),e*$(n),$(t)]}function h3(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function c3(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}
5402
+ class O2{add(n){var e=this._partials;let i=0;for(let t=0;t<this._n&&t<32;t++){var a=e[t],r=n+a,a=Math.abs(n)<Math.abs(a)?n-(r-a):a-(r-n);a&&(e[i++]=a),n=r}return e[i]=n,this._n=i+1,this}valueOf(){var t=this._partials;let n=this._n,e,i,a,r=0;if(0<n){for(r=t[--n];0<n&&(e=r,i=t[--n],r=e+i,!(a=i-(r-e))););0<n&&(a<0&&t[n-1]<0||0<a&&0<t[n-1])&&(i=2*a,e=r+i,i==e-r)&&(r=e)}return r}constructor(){this._partials=new Float64Array(32),this._n=0}}function R2(t){return Array.from(function*(t){for(var n of t)yield*n}(t))}var j2=1e-6,K=Math.PI,I2=K/2,H2=K/4,G2=2*K,K2=180/K,$2=K/180,q2=Math.abs,U2=Math.atan,W2=Math.atan2,Y2=Math.cos,V2=Math.exp,Z2=Math.log,X2=Math.pow,$=Math.sin,J2=Math.sign||function(t){return 0<t?1:t<0?-1:0},Q2=Math.sqrt,t3=Math.tan;function n3(t){return 1<t?I2:t<-1?-I2:Math.asin(t)}function e3(){}function i3(t,n){t&&r3.hasOwnProperty(t.type)&&r3[t.type](t,n)}var a3={Feature:function(t,n){i3(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,i=-1,a=e.length;++i<a;)i3(e[i].geometry,n)}},r3={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)t=e[i],n.point(t[0],t[1],t[2])},LineString:function(t,n){o3(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)o3(e[i],n,0)},Polygon:function(t,n){s3(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,i=-1,a=e.length;++i<a;)s3(e[i],n)},GeometryCollection:function(t,n){for(var e=t.geometries,i=-1,a=e.length;++i<a;)i3(e[i],n)}};function o3(t,n,e){var i,a=-1,r=t.length-e;for(n.lineStart();++a<r;)i=t[a],n.point(i[0],i[1],i[2]);n.lineEnd()}function s3(t,n){var e=-1,i=t.length;for(n.polygonStart();++e<i;)o3(t[e],n,1);n.polygonEnd()}function l3(t,n){t&&a3.hasOwnProperty(t.type)?a3[t.type](t,n):i3(t,n)}function u3(t){return[W2(t[1],t[0]),n3(t[2])]}function h3(t){var n=t[0],t=t[1],e=Y2(t);return[e*Y2(n),e*$(n),$(t)]}function c3(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function g3(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}
5407
5403
  // TODO return a
5408
- function g3(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function d3(t,n){return[t[0]*n,t[1]*n,t[2]*n]}
5404
+ function d3(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function f3(t,n){return[t[0]*n,t[1]*n,t[2]*n]}
5409
5405
  // TODO return d
5410
- function f3(t){var n=J2(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function p3(e,i){function t(t,n){return t=e(t,n),i(t[0],t[1])}return e.invert&&i.invert&&(t.invert=function(t,n){return(t=i.invert(t,n))&&e.invert(t[0],t[1])}),t}function _3(t,n){return[$2(t)>K?t+Math.round(-t/H2)*H2:t,n]}function m3(t,n,e){return(t%=H2)?n||e?p3(v3(t),b3(n,e)):v3(t):n||e?b3(n,e):_3}function y3(e){return function(t,n){return[K<(t+=e)?t-H2:t<-K?t+H2:t,n]}}function v3(t){var n=y3(t);return n.invert=y3(-t),n}function b3(t,n){var a=W2(t),r=$(t),o=W2(n),s=$(n);function e(t,n){var e=W2(n),i=W2(t)*e,t=$(t)*e,e=$(n),n=e*a+i*r;return[U2(t*o-n*s,i*a-e*r),t3(n*o+t*s)]}return e.invert=function(t,n){var e=W2(n),i=W2(t)*e,t=$(t)*e,e=$(n),n=e*o-t*s;return[U2(t*o+e*s,i*a+n*r),t3(n*a-i*r)]},e}
5406
+ function p3(t){var n=Q2(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function _3(e,i){function t(t,n){return t=e(t,n),i(t[0],t[1])}return e.invert&&i.invert&&(t.invert=function(t,n){return(t=i.invert(t,n))&&e.invert(t[0],t[1])}),t}function m3(t,n){return[q2(t)>K?t+Math.round(-t/G2)*G2:t,n]}function y3(t,n,e){return(t%=G2)?n||e?_3(b3(t),x3(n,e)):b3(t):n||e?x3(n,e):m3}function v3(e){return function(t,n){return[K<(t+=e)?t-G2:t<-K?t+G2:t,n]}}function b3(t){var n=v3(t);return n.invert=v3(-t),n}function x3(t,n){var a=Y2(t),r=$(t),o=Y2(n),s=$(n);function e(t,n){var e=Y2(n),i=Y2(t)*e,t=$(t)*e,e=$(n),n=e*a+i*r;return[W2(t*o-n*s,i*a-e*r),n3(n*o+t*s)]}return e.invert=function(t,n){var e=Y2(n),i=Y2(t)*e,t=$(t)*e,e=$(n),n=e*o-t*s;return[W2(t*o+e*s,i*a+n*r),n3(n*a-i*r)]},e}
5411
5407
  // Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0].
5412
- function x3(t,n){(n=u3(n))[0]-=t,f3(n);t=1<(t=-n[1])?0:t<-1?K:Math.acos(t);return((-n[2]<0?-t:t)+H2-R2)%H2}function w3(){var i,n=[];return{point:function(t,n,e){i.push([t,n,e])},lineStart:function(){n.push(i=[])},lineEnd:n3,rejoin:function(){1<n.length&&n.push(n.pop().concat(n.shift()))},result:function(){var t=n;return n=[],i=null,t}}}function S3(t,n){return $2(t[0]-n[0])<R2&&$2(t[1]-n[1])<R2}function C3(t,n,e,i){this.x=t,this.z=n,this.o=e,// another intersection
5408
+ function w3(t,n){(n=h3(n))[0]-=t,p3(n);t=1<(t=-n[1])?0:t<-1?K:Math.acos(t);return((-n[2]<0?-t:t)+G2-j2)%G2}function S3(){var i,n=[];return{point:function(t,n,e){i.push([t,n,e])},lineStart:function(){n.push(i=[])},lineEnd:e3,rejoin:function(){1<n.length&&n.push(n.pop().concat(n.shift()))},result:function(){var t=n;return n=[],i=null,t}}}function C3(t,n){return q2(t[0]-n[0])<j2&&q2(t[1]-n[1])<j2}function k3(t,n,e,i){this.x=t,this.z=n,this.o=e,// another intersection
5413
5409
  this.e=i,// is an entry?
5414
5410
  this.v=!1,// visited
5415
5411
  this.n=this.p=null}
5416
5412
  // A generalized polygon clipping algorithm: given a polygon that has been cut
5417
5413
  // into its visible line segments, and rejoins the segments by interpolating
5418
5414
  // along the clip edge.
5419
- function k3(t,n,e,i,r){var o,a,s=[],l=[];if(t.forEach(function(t){if(!((n=t.length-1)<=0)){var n,e,i=t[0],a=t[n];if(S3(i,a)){if(!i[2]&&!a[2]){for(r.lineStart(),o=0;o<n;++o)r.point((i=t[o])[0],i[1]);return void r.lineEnd()}
5415
+ function A3(t,n,e,i,r){var o,a,s=[],l=[];if(t.forEach(function(t){if(!((n=t.length-1)<=0)){var n,e,i=t[0],a=t[n];if(C3(i,a)){if(!i[2]&&!a[2]){for(r.lineStart(),o=0;o<n;++o)r.point((i=t[o])[0],i[1]);return void r.lineEnd()}
5420
5416
  // handle degenerate cases by moving the point
5421
- a[0]+=2*R2}s.push(e=new C3(i,t,null,!0)),l.push(e.o=new C3(i,null,e,!1)),s.push(e=new C3(a,t,null,!1)),l.push(e.o=new C3(a,null,e,!0))}}),s.length){for(l.sort(n),A3(s),A3(l),o=0,a=l.length;o<a;++o)l[o].e=e=!e;for(var u,h,c=s[0];;){for(
5417
+ a[0]+=2*j2}s.push(e=new k3(i,t,null,!0)),l.push(e.o=new k3(i,null,e,!1)),s.push(e=new k3(a,t,null,!1)),l.push(e.o=new k3(a,null,e,!0))}}),s.length){for(l.sort(n),M3(s),M3(l),o=0,a=l.length;o<a;++o)l[o].e=e=!e;for(var u,h,c=s[0];;){for(
5422
5418
  // Find first unvisited intersection.
5423
- var g=c,d=!0;g.v;)if((g=g.n)===c)return;u=g.z,r.lineStart();do{if(g.v=g.o.v=!0,g.e){if(d)for(o=0,a=u.length;o<a;++o)r.point((h=u[o])[0],h[1]);else i(g.x,g.n.x,1,r);g=g.n}else{if(d)for(u=g.p.z,o=u.length-1;0<=o;--o)r.point((h=u[o])[0],h[1]);else i(g.x,g.p.x,-1,r);g=g.p}}while(u=(g=g.o).z,d=!d,!g.v);r.lineEnd()}}}function A3(t){if(n=t.length){for(var n,e,i=0,a=t[0];++i<n;)a.n=e=t[i],e.p=a,a=e;a.n=e=t[0],e.p=a}}function M3(t){return $2(t[0])<=K?t[0]:X2(t[0])*(($2(t[0])+K)%H2-K)}function E3(_,m,y,v){return function(s){var l,u,h,e=m(s),c=w3(),g=m(c),d=!1,n={point:i,lineStart:a,lineEnd:r,polygonStart:function(){n.point=f,n.lineStart=o,n.lineEnd=p,u=[],l=[]},polygonEnd:function(){n.point=i,n.lineStart=a,n.lineEnd=r,u=O2(u);var t=((t,n)=>{var e=M3(n),i=n[1],n=$(i),a=[$(e),-W2(e),0],r=0,o=0,s=new F2;1===n?i=j2+R2:-1===n&&(i=-j2-R2);for(var l=0,u=t.length;l<u;++l)if(c=(h=t[l]).length)for(var h,c,g=h[c-1],d=M3(g),f=g[1]/2+I2,p=$(f),_=W2(f),m=0;m<c;++m,d=v,p=x,_=b,g=y){var y=h[m],v=M3(y),b=y[1]/2+I2,x=$(b),b=W2(b),w=v-d,S=0<=w?1:-1,C=S*w,k=K<C,A=p*x;s.add(U2(A*S*$(C),_*b+A*W2(C))),r+=k?w+S*H2:w,
5419
+ var g=c,d=!0;g.v;)if((g=g.n)===c)return;u=g.z,r.lineStart();do{if(g.v=g.o.v=!0,g.e){if(d)for(o=0,a=u.length;o<a;++o)r.point((h=u[o])[0],h[1]);else i(g.x,g.n.x,1,r);g=g.n}else{if(d)for(u=g.p.z,o=u.length-1;0<=o;--o)r.point((h=u[o])[0],h[1]);else i(g.x,g.p.x,-1,r);g=g.p}}while(u=(g=g.o).z,d=!d,!g.v);r.lineEnd()}}}function M3(t){if(n=t.length){for(var n,e,i=0,a=t[0];++i<n;)a.n=e=t[i],e.p=a,a=e;a.n=e=t[0],e.p=a}}function E3(t){return q2(t[0])<=K?t[0]:J2(t[0])*((q2(t[0])+K)%G2-K)}function z3(_,m,y,v){return function(s){var l,u,h,e=m(s),c=S3(),g=m(c),d=!1,n={point:i,lineStart:a,lineEnd:r,polygonStart:function(){n.point=f,n.lineStart=o,n.lineEnd=p,u=[],l=[]},polygonEnd:function(){n.point=i,n.lineStart=a,n.lineEnd=r,u=R2(u);var t=((t,n)=>{var e=E3(n),i=n[1],n=$(i),a=[$(e),-Y2(e),0],r=0,o=0,s=new O2;1===n?i=I2+j2:-1===n&&(i=-I2-j2);for(var l=0,u=t.length;l<u;++l)if(c=(h=t[l]).length)for(var h,c,g=h[c-1],d=E3(g),f=g[1]/2+H2,p=$(f),_=Y2(f),m=0;m<c;++m,d=v,p=x,_=b,g=y){var y=h[m],v=E3(y),b=y[1]/2+H2,x=$(b),b=Y2(b),w=v-d,S=0<=w?1:-1,C=S*w,k=K<C,A=p*x;s.add(W2(A*S*$(C),_*b+A*Y2(C))),r+=k?w+S*G2:w,
5424
5420
  // Are the longitudes either side of the point’s meridian (lambda),
5425
5421
  // and are the latitudes smaller than the parallel (phi)?
5426
- k^e<=d^e<=v&&(f3(A=c3(u3(g),u3(y))),f3(C=c3(a,A)),(S=(k^0<=w?-1:1)*t3(C[2]))<i||i===S&&(A[0]||A[1]))&&(o+=k^0<=w?1:-1)}
5422
+ k^e<=d^e<=v&&(p3(A=g3(h3(g),h3(y))),p3(C=g3(a,A)),(S=(k^0<=w?-1:1)*n3(C[2]))<i||i===S&&(A[0]||A[1]))&&(o+=k^0<=w?1:-1)}
5427
5423
  // First, determine whether the South pole is inside or outside:
5428
5424
  //
5429
5425
  // It is inside if:
@@ -5434,83 +5430,83 @@ k^e<=d^e<=v&&(f3(A=c3(u3(g),u3(y))),f3(C=c3(a,A)),(S=(k^0<=w?-1:1)*t3(C[2]))<i||
5434
5430
  // Second, count the (signed) number of times a segment crosses a lambda
5435
5431
  // from the point to the South pole. If it is zero, then the point is the
5436
5432
  // same side as the South pole.
5437
- return(r<-1e-6||r<R2&&s<-1e-12)^1&o})(l,v);u.length?(d||(s.polygonStart(),d=!0),k3(u,T3,t,y,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),y(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),u=l=null},sphere:function(){s.polygonStart(),s.lineStart(),y(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function i(t,n){_(t,n)&&s.point(t,n)}function t(t,n){e.point(t,n)}function a(){n.point=t,e.lineStart()}function r(){n.point=i,e.lineEnd()}function f(t,n){h.push([t,n]),g.point(t,n)}function o(){g.lineStart(),h=[]}function p(){f(h[0][0],h[0][1]),g.lineEnd();var t,n,e,i,a=g.clean(),r=c.result(),o=r.length;if(h.pop(),l.push(h),h=null,o)
5433
+ return(r<-1e-6||r<j2&&s<-1e-12)^1&o})(l,v);u.length?(d||(s.polygonStart(),d=!0),A3(u,B3,t,y,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),y(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),u=l=null},sphere:function(){s.polygonStart(),s.lineStart(),y(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function i(t,n){_(t,n)&&s.point(t,n)}function t(t,n){e.point(t,n)}function a(){n.point=t,e.lineStart()}function r(){n.point=i,e.lineEnd()}function f(t,n){h.push([t,n]),g.point(t,n)}function o(){g.lineStart(),h=[]}function p(){f(h[0][0],h[0][1]),g.lineEnd();var t,n,e,i,a=g.clean(),r=c.result(),o=r.length;if(h.pop(),l.push(h),h=null,o)
5438
5434
  // No intersections.
5439
5435
  if(1&a){if(0<(n=(e=r[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<n;++t)s.point((i=e[t])[0],i[1]);s.lineEnd()}}else
5440
5436
  // Rejoin connected segments.
5441
5437
  // TODO reuse ringBuffer.rejoin()?
5442
- 1<o&&2&a&&r.push(r.pop().concat(r.shift())),u.push(r.filter(z3))}return n}}function z3(t){return 1<t.length}
5438
+ 1<o&&2&a&&r.push(r.pop().concat(r.shift())),u.push(r.filter(T3))}return n}}function T3(t){return 1<t.length}
5443
5439
  // Intersections are sorted along the clip edge. For both antimeridian cutting
5444
5440
  // and circle clipping, the same comparison is used.
5445
- function T3(t,n){return((t=t.x)[0]<0?t[1]-j2-R2:j2-t[1])-((n=n.x)[0]<0?n[1]-j2-R2:j2-n[1])}_3.invert=_3;var B3=E3(function(){return 1},
5441
+ function B3(t,n){return((t=t.x)[0]<0?t[1]-I2-j2:I2-t[1])-((n=n.x)[0]<0?n[1]-I2-j2:I2-n[1])}m3.invert=m3;var D3=z3(function(){return 1},
5446
5442
  // Takes a line and cuts into visible segments. Return values: 0 - there were
5447
5443
  // intersections or the line was empty; 1 - no intersections; 2 - there were
5448
5444
  // intersections, and the first and last segments should be rejoined.
5449
5445
  function(u){var h,c=NaN,g=NaN,d=NaN;// no intersections
5450
- return{lineStart:function(){u.lineStart(),h=1},point:function(t,n){var e,i,a,r,o,s=0<t?K:-K,l=$2(t-c);$2(l-K)<R2?(u.point(c,g=0<(g+n)/2?j2:-j2),u.point(d,g),u.lineEnd(),u.lineStart(),u.point(s,g),u.point(t,g),h=0):d!==s&&K<=l&&($2(c-d)<R2&&(c-=d*R2),// handle degeneracies
5451
- $2(t-s)<R2&&(t-=s*R2),l=g,a=n,o=$((e=c)-(i=t)),g=$2(o)>R2?q2(($(l)*(r=W2(a))*$(i)-$(a)*(i=W2(l))*$(e))/(i*r*o)):(l+a)/2,u.point(d,g),u.lineEnd(),u.lineStart(),u.point(s,g),h=0),u.point(c=t,g=n),d=s},lineEnd:function(){u.lineEnd(),c=g=NaN},clean:function(){return 2-h;// if intersections, rejoin first and last segments
5452
- }}},function(t,n,e,i){var a;null==t?(a=e*j2,i.point(-K,a),i.point(0,a),i.point(K,a),i.point(K,0),i.point(K,-a),i.point(0,-a),i.point(-K,-a),i.point(-K,0),i.point(-K,a)):$2(t[0]-n[0])>R2?(t=t[0]<n[0]?K:-K,a=e*t/2,i.point(-t,a),i.point(0,a),i.point(t,a)):i.point(n[0],n[1])},[-K,-j2]);function D3(d){var p=W2(d),f=6*K2,c=0<p,g=$2(p)>R2;// TODO optimise for this common case
5453
- function _(t,n){return W2(t)*W2(n)>p}
5446
+ return{lineStart:function(){u.lineStart(),h=1},point:function(t,n){var e,i,a,r,o,s=0<t?K:-K,l=q2(t-c);q2(l-K)<j2?(u.point(c,g=0<(g+n)/2?I2:-I2),u.point(d,g),u.lineEnd(),u.lineStart(),u.point(s,g),u.point(t,g),h=0):d!==s&&K<=l&&(q2(c-d)<j2&&(c-=d*j2),// handle degeneracies
5447
+ q2(t-s)<j2&&(t-=s*j2),l=g,a=n,o=$((e=c)-(i=t)),g=q2(o)>j2?U2(($(l)*(r=Y2(a))*$(i)-$(a)*(i=Y2(l))*$(e))/(i*r*o)):(l+a)/2,u.point(d,g),u.lineEnd(),u.lineStart(),u.point(s,g),h=0),u.point(c=t,g=n),d=s},lineEnd:function(){u.lineEnd(),c=g=NaN},clean:function(){return 2-h;// if intersections, rejoin first and last segments
5448
+ }}},function(t,n,e,i){var a;null==t?(a=e*I2,i.point(-K,a),i.point(0,a),i.point(K,a),i.point(K,0),i.point(K,-a),i.point(0,-a),i.point(-K,-a),i.point(-K,0),i.point(-K,a)):q2(t[0]-n[0])>j2?(t=t[0]<n[0]?K:-K,a=e*t/2,i.point(-t,a),i.point(0,a),i.point(t,a)):i.point(n[0],n[1])},[-K,-I2]);function N3(d){var p=Y2(d),f=6*$2,c=0<p,g=q2(p)>j2;// TODO optimise for this common case
5449
+ function _(t,n){return Y2(t)*Y2(n)>p}
5454
5450
  // Takes a line and cuts into visible segments. Return values used for polygon
5455
5451
  // clipping: 0 - there were intersections or the line was empty; 1 - no
5456
5452
  // intersections 2 - there were intersections, and the first and last segments
5457
5453
  // should be rejoined.
5458
5454
  // Intersects the great circle between a and b with the clip circle.
5459
- function m(t,n,e){var i,a,r,o,s,l,u,h=[1,0,0],c=c3(u3(t),u3(n)),g=h3(c,c),d=c[0],f=g-d*d;
5455
+ function m(t,n,e){var i,a,r,o,s,l,u,h=[1,0,0],c=g3(h3(t),h3(n)),g=c3(c,c),d=c[0],f=g-d*d;
5460
5456
  // We have two planes, n1.p = d1 and n2.p = d2.
5461
5457
  // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2).
5462
5458
  // Two polar points.
5463
- return f?(i=c3(h,c),g3(h=d3(h,p*g/f),d3(c,-p*d/f)),(f=(c=h3(h,g=i))*c-(d=h3(g,g))*(h3(h,h)-1))<0?void 0:(g3(f=d3(g,(-c-(i=J2(f)))/d),h),f=l3(f),e?(
5459
+ return f?(i=g3(h,c),d3(h=f3(h,p*g/f),f3(c,-p*d/f)),(f=(c=c3(h,g=i))*c-(d=c3(g,g))*(c3(h,h)-1))<0?void 0:(d3(f=f3(g,(-c-(i=Q2(f)))/d),h),f=u3(f),e?(
5464
5460
  // Check that the first point is between a and b.
5465
- a=t[0],r=n[0],o=t[1],n=n[1],r<a&&(u=a,a=r,r=u),!(l=$2((s=r-a)-K)<R2)&&n<o&&(u=o,o=n,n=u),(l||s<R2?l?0<o+n^f[1]<($2(f[0]-a)<R2?o:n):o<=f[1]&&f[1]<=n:K<s^(a<=f[0]&&f[0]<=r))?(g3(u=d3(g,(-c+i)/d),h),[f,l3(u)]):void 0):f)):!e&&t}
5461
+ a=t[0],r=n[0],o=t[1],n=n[1],r<a&&(u=a,a=r,r=u),!(l=q2((s=r-a)-K)<j2)&&n<o&&(u=o,o=n,n=u),(l||s<j2?l?0<o+n^f[1]<(q2(f[0]-a)<j2?o:n):o<=f[1]&&f[1]<=n:K<s^(a<=f[0]&&f[0]<=r))?(d3(u=f3(g,(-c+i)/d),h),[f,u3(u)]):void 0):f)):!e&&t}
5466
5462
  // Generates a 4-bit vector representing the location of a point relative to
5467
5463
  // the small circle's bounding box.
5468
5464
  function y(t,n){var e=c?d:K-d,i=0;// above
5469
5465
  return t<-e?i|=1:e<t&&(i|=2),// right
5470
- n<-e?i|=4:e<n&&(i|=8),i}return E3(_,function(r){var o,s,l,u,h;// no intersections
5471
- return{lineStart:function(){u=l=!1,h=1},point:function(t,n){var e,i=[t,n],a=_(t,n),t=c?a?0:y(t,n):a?y(t+(t<0?K:-K),n):0;!o&&(u=l=a)&&r.lineStart(),a===l||(e=m(o,i))&&!S3(o,e)&&!S3(i,e)||(i[2]=1),a!==l?(h=0,a?(
5466
+ n<-e?i|=4:e<n&&(i|=8),i}return z3(_,function(r){var o,s,l,u,h;// no intersections
5467
+ return{lineStart:function(){u=l=!1,h=1},point:function(t,n){var e,i=[t,n],a=_(t,n),t=c?a?0:y(t,n):a?y(t+(t<0?K:-K),n):0;!o&&(u=l=a)&&r.lineStart(),a===l||(e=m(o,i))&&!C3(o,e)&&!C3(i,e)||(i[2]=1),a!==l?(h=0,a?(
5472
5468
  // outside going in
5473
5469
  r.lineStart(),e=m(i,o),r.point(e[0],e[1])):(
5474
5470
  // inside going out
5475
5471
  e=m(o,i),r.point(e[0],e[1],2),r.lineEnd()),o=e):g&&o&&c^a&&(
5476
5472
  // If the codes for two points are different, or are both zero,
5477
5473
  // and there this segment intersects with the small circle.
5478
- t&s||!(n=m(i,o,!0))||(h=0,c?(r.lineStart(),r.point(n[0][0],n[0][1]),r.point(n[1][0],n[1][1]),r.lineEnd()):(r.point(n[1][0],n[1][1]),r.lineEnd(),r.lineStart(),r.point(n[0][0],n[0][1],3)))),!a||o&&S3(o,i)||r.point(i[0],i[1]),o=i,l=a,s=t},lineEnd:function(){l&&r.lineEnd(),o=null},
5474
+ t&s||!(n=m(i,o,!0))||(h=0,c?(r.lineStart(),r.point(n[0][0],n[0][1]),r.point(n[1][0],n[1][1]),r.lineEnd()):(r.point(n[1][0],n[1][1]),r.lineEnd(),r.lineStart(),r.point(n[0][0],n[0][1],3)))),!a||o&&C3(o,i)||r.point(i[0],i[1]),o=i,l=a,s=t},lineEnd:function(){l&&r.lineEnd(),o=null},
5479
5475
  // Rejoin first and last segments if there were intersections and the first
5480
5476
  // and last points were visible.
5481
- clean:function(){return h|(u&&l)<<1}}},function(t,n,e,i){var a=i,i=d,r=f,o=e,e=t,s=n;if(r){var l=W2(i),u=$(i),h=o*r;null==e?(e=i+o*H2,s=i-h/2):(e=x3(l,e),s=x3(l,s),(0<o?e<s:s<e)&&(e+=o*H2));for(var c,g=e;0<o?s<g:g<s;g-=h)c=l3([l,-u*W2(g),-u*$(g)]),a.point(c[0],c[1])}},c?[0,-d]:[-K,d-K])}var N3=1e9,P3=-1e9;
5477
+ clean:function(){return h|(u&&l)<<1}}},function(t,n,e,i){var a=i,i=d,r=f,o=e,e=t,s=n;if(r){var l=Y2(i),u=$(i),h=o*r;null==e?(e=i+o*G2,s=i-h/2):(e=w3(l,e),s=w3(l,s),(0<o?e<s:s<e)&&(e+=o*G2));for(var c,g=e;0<o?s<g:g<s;g-=h)c=u3([l,-u*Y2(g),-u*$(g)]),a.point(c[0],c[1])}},c?[0,-d]:[-K,d-K])}var P3=1e9,L3=-1e9;
5482
5478
  // TODO Use d3-polygon’s polygonContains here for the ring check?
5483
5479
  // TODO Eliminate duplicate buffering in clipBuffer and polygon.push?
5484
- function L3(m,y,v,b){function x(t,n){return m<=t&&t<=v&&y<=n&&n<=b}function w(t,n,e,i){var a=0,r=0;if(null==t||(a=o(t,e))!==(r=o(n,e))||s(t,n)<0^0<e)for(;i.point(0===a||3===a?m:v,1<a?b:y),(a=(a+e+4)%4)!==r;);else i.point(n[0],n[1])}function o(t,n){return $2(t[0]-m)<R2?0<n?0:3:$2(t[0]-v)<R2?0<n?2:1:$2(t[1]-y)<R2?0<n?1:0:0<n?3:2;// abs(p[1] - y1) < epsilon
5485
- }function S(t,n){return s(t.x,n.x)}function s(t,n){var e=o(t,1),i=o(n,1);return e!==i?e-i:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(i){var a,c,r,o,s,l,u,h,g,d,f,p=i,t=w3(),n={point:e,lineStart:function(){n.point=_,c&&c.push(r=[]);d=!0,g=!1,u=h=NaN}
5480
+ function F3(m,y,v,b){function x(t,n){return m<=t&&t<=v&&y<=n&&n<=b}function w(t,n,e,i){var a=0,r=0;if(null==t||(a=o(t,e))!==(r=o(n,e))||s(t,n)<0^0<e)for(;i.point(0===a||3===a?m:v,1<a?b:y),(a=(a+e+4)%4)!==r;);else i.point(n[0],n[1])}function o(t,n){return q2(t[0]-m)<j2?0<n?0:3:q2(t[0]-v)<j2?0<n?2:1:q2(t[1]-y)<j2?0<n?1:0:0<n?3:2;// abs(p[1] - y1) < epsilon
5481
+ }function S(t,n){return s(t.x,n.x)}function s(t,n){var e=o(t,1),i=o(n,1);return e!==i?e-i:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(i){var a,c,r,o,s,l,u,h,g,d,f,p=i,t=S3(),n={point:e,lineStart:function(){n.point=_,c&&c.push(r=[]);d=!0,g=!1,u=h=NaN}
5486
5482
  // TODO rather than special-case polygons, simply handle them separately.
5487
5483
  // Ideally, coincident intersection points should be jittered to avoid
5488
5484
  // clipping issues.
5489
5485
  ,lineEnd:function(){a&&(_(o,s),l&&g&&t.rejoin(),a.push(t.result()));n.point=e,g&&p.lineEnd()},polygonStart:
5490
5486
  // Buffer geometry within a polygon and then clip it en masse.
5491
- function(){p=t,a=[],c=[],f=!0},polygonEnd:function(){var t=(()=>{for(var t=0,n=0,e=c.length;n<e;++n)for(var i,a,r=c[n],o=1,s=r.length,l=r[0],u=l[0],h=l[1];o<s;++o)i=u,a=h,l=r[o],u=l[0],h=l[1],a<=b?b<h&&(h-a)*(m-i)<(u-i)*(b-a)&&++t:h<=b&&(u-i)*(b-a)<(h-a)*(m-i)&&--t;return t})(),n=f&&t,e=(a=O2(a)).length;(n||e)&&(i.polygonStart(),n&&(i.lineStart(),w(null,null,1,i),i.lineEnd()),e&&k3(a,S,t,w,i),i.polygonEnd());p=i,a=c=r=null}};function e(t,n){x(t,n)&&p.point(t,n)}function _(t,n){var e,i,a=x(t,n);c&&r.push([t,n]),d?(o=t,s=n,d=!1,(l=a)&&(p.lineStart(),p.point(t,n))):a&&g?p.point(t,n):((t,n,e,i,a,r)=>{var o=t[0],s=t[1],l=0,u=1,h=n[0]-o,c=n[1]-s,e=e-o;if(h||!(0<e)){if(e/=h,h<0){if(e<l)return;e<u&&(u=e)}else if(0<h){if(u<e)return;l<e&&(l=e)}if(e=a-o,h||!(e<0)){if(e/=h,h<0){if(u<e)return;l<e&&(l=e)}else if(0<h){if(e<l)return;e<u&&(u=e)}if(e=i-s,c||!(0<e)){if(e/=c,c<0){if(e<l)return;e<u&&(u=e)}else if(0<c){if(u<e)return;l<e&&(l=e)}if(e=r-s,c||!(e<0)){if(e/=c,c<0){if(u<e)return;l<e&&(l=e)}else if(0<c){if(e<l)return;e<u&&(u=e)}return 0<l&&(t[0]=o+l*h,t[1]=s+l*c),u<1&&(n[0]=o+u*h,n[1]=s+u*c),1}}}}})(e=[u=Math.max(P3,Math.min(N3,u)),h=Math.max(P3,Math.min(N3,h))],i=[t=Math.max(P3,Math.min(N3,t)),n=Math.max(P3,Math.min(N3,n))],m,y,v,b)?(g||(p.lineStart(),p.point(e[0],e[1])),p.point(i[0],i[1]),a||p.lineEnd(),f=!1):a&&(p.lineStart(),p.point(t,n),f=!1),u=t,h=n,g=a}return n}}var F3=t=>t,O3=1/0,R3=O3,j3=-O3,I3=j3,H3={point:function(t,n){t<O3&&(O3=t);j3<t&&(j3=t);n<R3&&(R3=n);I3<n&&(I3=n)},lineStart:n3,lineEnd:n3,polygonStart:n3,polygonEnd:n3,result:function(){var t=[[O3,R3],[j3,I3]];return j3=I3=-(R3=O3=1/0),t}};function G3(i){return function(t){var n,e=new K3;for(n in i)e[n]=i[n];return e.stream=t,e}}function K3(){}function $3(t,n,e){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),s3(e,t.stream(H3)),n(H3.result()),null!=i&&t.clipExtent(i),t}function q3(a,r,t){return $3(a,function(t){var n=r[1][0]-r[0][0],e=r[1][1]-r[0][1],i=Math.min(n/(t[1][0]-t[0][0]),e/(t[1][1]-t[0][1])),n=+r[0][0]+(n-i*(t[1][0]+t[0][0]))/2,e=+r[0][1]+(e-i*(t[1][1]+t[0][1]))/2;a.scale(150*i).translate([n,e])},t)}K3.prototype={constructor:K3,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var U3=16,W3=W2(30*K2);// cos(minimum angular distance)
5492
- function Y3(t,n){return+n?(M=t,E=n,function(i){var e,a,r,o,s,l,u,h,c,g,d,f,p={point:t,lineStart:n,lineEnd:m,polygonStart:function(){i.polygonStart(),p.lineStart=y},polygonEnd:function(){i.polygonEnd(),p.lineStart=n}};// previous point
5493
- function t(t,n){t=M(t,n),i.point(t[0],t[1])}function n(){h=NaN,p.point=_,i.lineStart()}function _(t,n){var e=u3([t,n]),n=M(t,n);z(h,c,u,g,d,f,h=n[0],c=n[1],u=t,g=e[0],d=e[1],f=e[2],U3,i),i.point(h,c)}function m(){p.point=t,i.lineEnd()}function y(){n(),p.point=v,p.lineEnd=b}function v(t,n){_(e=t,n),a=h,r=c,o=g,s=d,l=f,p.point=_}function b(){z(h,c,u,g,d,f,a,r,e,o,s,l,U3,i),p.lineEnd=m,m()}return p}):(e=t,G3({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}}));var e,M,E;function z(t,n,e,i,a,r,o,s,l,u,h,c,g,d){var f,p,_,m,y,v,b,x,w,S,C=o-t,k=s-n,A=C*C+k*k;4*E<A&&g--&&(_=r+c,b=t3(_/=m=J2((f=i+u)*f+(p=a+h)*p+_*_)),y=$2($2(_)-1)<R2||$2(e-l)<R2?(e+l)/2:U2(p,f),v=(b=M(y,b))[0],E<(S=k*(x=v-t)-C*(w=(b=b[1])-n))*S/A||.3<$2((C*x+k*w)/A-.5)||i*u+a*h+r*c<W3)&&(z(t,n,e,i,a,r,v,b,y,f/=m,p/=m,_,g,d),d.point(v,b),z(v,b,y,f,p,_,o,s,l,u,h,c,g,d))}}var V3,Z3=G3({point:function(t,n){this.stream.point(t*K2,n*K2)}});function X3(t,e,i,a,r,n){var o,s,l,u,h,c,g,d,f,p,_,m;return n?(c=W2(n),n=$(n),g=c*t,d=n*t,f=c/t,p=n/t,_=(n*i-c*e)/t,m=(n*e+c*i)/t,v.invert=function(t,n){return[a*(f*t-p*n+_),r*(m-p*t-f*n)]},v):(o=t,s=e,l=i,u=a,h=r,y.invert=function(t,n){return[(t-s)/o*u,(l-n)/o*h]},y);function y(t,n){return[s+o*(t*=u),l-o*(n*=h)]}function v(t,n){return[g*(t*=a)-d*(n*=r)+e,i-d*t-g*n]}}function J3(t){return Q3(function(){return t})()}function Q3(t){var n,i,e,a,r,o,s,l,u,h,c=150,g=480,d=250,f=0,p=0,_=0,m=0,y=0,v=0,b=1,x=1,w=null,S=B3,C=null,k=F3,A=.5;function M(t){return l(t[0]*K2,t[1]*K2)}function E(t){return(t=l.invert(t[0],t[1]))&&[t[0]*G2,t[1]*G2]}function z(){var t=X3(c,0,0,b,x,v).apply(null,n(f,p)),t=X3(c,g-t[0],d-t[1],b,x,v);return i=m3(_,m,y),s=p3(n,t),l=p3(i,s),o=Y3(s,A),T()}function T(){return u=h=null,M}return M.stream=function(t){return u&&h===t?u:u=Z3((e=i,G3({point:function(t,n){t=e(t,n);return this.stream.point(t[0],t[1])}})(S(o(k(h=t))))));var e},M.preclip=function(t){return arguments.length?(S=t,w=void 0,T()):S},M.postclip=function(t){return arguments.length?(k=t,C=e=a=r=null,T()):k},M.clipAngle=function(t){return arguments.length?(S=+t?D3(w=t*K2):(w=null,B3),T()):w*G2},M.clipExtent=function(t){return arguments.length?(k=null==t?(C=e=a=r=null,F3):L3(C=+t[0][0],e=+t[0][1],a=+t[1][0],r=+t[1][1]),T()):null==C?null:[[C,e],[a,r]]},M.scale=function(t){return arguments.length?(c=+t,z()):c},M.translate=function(t){return arguments.length?(g=+t[0],d=+t[1],z()):[g,d]},M.center=function(t){return arguments.length?(f=t[0]%360*K2,p=t[1]%360*K2,z()):[f*G2,p*G2]},M.rotate=function(t){return arguments.length?(_=t[0]%360*K2,m=t[1]%360*K2,y=2<t.length?t[2]%360*K2:0,z()):[_*G2,m*G2,y*G2]},M.angle=function(t){return arguments.length?(v=t%360*K2,z()):v*G2},M.reflectX=function(t){return arguments.length?(b=t?-1:1,z()):b<0},M.reflectY=function(t){return arguments.length?(x=t?-1:1,z()):x<0},M.precision=function(t){return arguments.length?(o=Y3(s,A=t*t),T()):J2(A)},M.fitExtent=function(t,n){return q3(M,t,n)},M.fitSize=function(t,n){return q3(M,[[0,0],t],n)},M.fitWidth=function(t,n){return a=t,$3(i=M,function(t){var n=+a,e=n/(t[1][0]-t[0][0]),n=(n-e*(t[1][0]+t[0][0]))/2,t=-e*t[0][1];i.scale(150*e).translate([n,t])},n);var i,a},M.fitHeight=function(t,n){return r=t,$3(a=M,function(t){var n=+r,e=n/(t[1][1]-t[0][1]),i=-e*t[0][0],n=(n-e*(t[1][1]+t[0][1]))/2;a.scale(150*e).translate([i,n])},n);var a,r},function(){return n=t.apply(this,arguments),M.invert=n.invert&&E,z()}}function t6(t){var n=0,e=K/3,i=Q3(t),t=i(n,e);return t.parallels=function(t){return arguments.length?i(n=t[0]*K2,e=t[1]*K2):[n*G2,e*G2]},t}function n6(t,n){var e,i,a,r=$(t),o=(r+$(n))/2;
5487
+ function(){p=t,a=[],c=[],f=!0},polygonEnd:function(){var t=(()=>{for(var t=0,n=0,e=c.length;n<e;++n)for(var i,a,r=c[n],o=1,s=r.length,l=r[0],u=l[0],h=l[1];o<s;++o)i=u,a=h,l=r[o],u=l[0],h=l[1],a<=b?b<h&&(h-a)*(m-i)<(u-i)*(b-a)&&++t:h<=b&&(u-i)*(b-a)<(h-a)*(m-i)&&--t;return t})(),n=f&&t,e=(a=R2(a)).length;(n||e)&&(i.polygonStart(),n&&(i.lineStart(),w(null,null,1,i),i.lineEnd()),e&&A3(a,S,t,w,i),i.polygonEnd());p=i,a=c=r=null}};function e(t,n){x(t,n)&&p.point(t,n)}function _(t,n){var e,i,a=x(t,n);c&&r.push([t,n]),d?(o=t,s=n,d=!1,(l=a)&&(p.lineStart(),p.point(t,n))):a&&g?p.point(t,n):((t,n,e,i,a,r)=>{var o=t[0],s=t[1],l=0,u=1,h=n[0]-o,c=n[1]-s,e=e-o;if(h||!(0<e)){if(e/=h,h<0){if(e<l)return;e<u&&(u=e)}else if(0<h){if(u<e)return;l<e&&(l=e)}if(e=a-o,h||!(e<0)){if(e/=h,h<0){if(u<e)return;l<e&&(l=e)}else if(0<h){if(e<l)return;e<u&&(u=e)}if(e=i-s,c||!(0<e)){if(e/=c,c<0){if(e<l)return;e<u&&(u=e)}else if(0<c){if(u<e)return;l<e&&(l=e)}if(e=r-s,c||!(e<0)){if(e/=c,c<0){if(u<e)return;l<e&&(l=e)}else if(0<c){if(e<l)return;e<u&&(u=e)}return 0<l&&(t[0]=o+l*h,t[1]=s+l*c),u<1&&(n[0]=o+u*h,n[1]=s+u*c),1}}}}})(e=[u=Math.max(L3,Math.min(P3,u)),h=Math.max(L3,Math.min(P3,h))],i=[t=Math.max(L3,Math.min(P3,t)),n=Math.max(L3,Math.min(P3,n))],m,y,v,b)?(g||(p.lineStart(),p.point(e[0],e[1])),p.point(i[0],i[1]),a||p.lineEnd(),f=!1):a&&(p.lineStart(),p.point(t,n),f=!1),u=t,h=n,g=a}return n}}var O3=t=>t,R3=1/0,j3=R3,I3=-R3,H3=I3,G3={point:function(t,n){t<R3&&(R3=t);I3<t&&(I3=t);n<j3&&(j3=n);H3<n&&(H3=n)},lineStart:e3,lineEnd:e3,polygonStart:e3,polygonEnd:e3,result:function(){var t=[[R3,j3],[I3,H3]];return I3=H3=-(j3=R3=1/0),t}};function K3(i){return function(t){var n,e=new $3;for(n in i)e[n]=i[n];return e.stream=t,e}}function $3(){}function q3(t,n,e){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),l3(e,t.stream(G3)),n(G3.result()),null!=i&&t.clipExtent(i),t}function U3(a,r,t){return q3(a,function(t){var n=r[1][0]-r[0][0],e=r[1][1]-r[0][1],i=Math.min(n/(t[1][0]-t[0][0]),e/(t[1][1]-t[0][1])),n=+r[0][0]+(n-i*(t[1][0]+t[0][0]))/2,e=+r[0][1]+(e-i*(t[1][1]+t[0][1]))/2;a.scale(150*i).translate([n,e])},t)}$3.prototype={constructor:$3,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var W3=16,Y3=Y2(30*$2);// cos(minimum angular distance)
5488
+ function V3(t,n){return+n?(M=t,E=n,function(i){var e,a,r,o,s,l,u,h,c,g,d,f,p={point:t,lineStart:n,lineEnd:m,polygonStart:function(){i.polygonStart(),p.lineStart=y},polygonEnd:function(){i.polygonEnd(),p.lineStart=n}};// previous point
5489
+ function t(t,n){t=M(t,n),i.point(t[0],t[1])}function n(){h=NaN,p.point=_,i.lineStart()}function _(t,n){var e=h3([t,n]),n=M(t,n);z(h,c,u,g,d,f,h=n[0],c=n[1],u=t,g=e[0],d=e[1],f=e[2],W3,i),i.point(h,c)}function m(){p.point=t,i.lineEnd()}function y(){n(),p.point=v,p.lineEnd=b}function v(t,n){_(e=t,n),a=h,r=c,o=g,s=d,l=f,p.point=_}function b(){z(h,c,u,g,d,f,a,r,e,o,s,l,W3,i),p.lineEnd=m,m()}return p}):(e=t,K3({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}}));var e,M,E;function z(t,n,e,i,a,r,o,s,l,u,h,c,g,d){var f,p,_,m,y,v,b,x,w,S,C=o-t,k=s-n,A=C*C+k*k;4*E<A&&g--&&(_=r+c,b=n3(_/=m=Q2((f=i+u)*f+(p=a+h)*p+_*_)),y=q2(q2(_)-1)<j2||q2(e-l)<j2?(e+l)/2:W2(p,f),v=(b=M(y,b))[0],E<(S=k*(x=v-t)-C*(w=(b=b[1])-n))*S/A||.3<q2((C*x+k*w)/A-.5)||i*u+a*h+r*c<Y3)&&(z(t,n,e,i,a,r,v,b,y,f/=m,p/=m,_,g,d),d.point(v,b),z(v,b,y,f,p,_,o,s,l,u,h,c,g,d))}}var Z3,X3=K3({point:function(t,n){this.stream.point(t*$2,n*$2)}});function J3(t,e,i,a,r,n){var o,s,l,u,h,c,g,d,f,p,_,m;return n?(c=Y2(n),n=$(n),g=c*t,d=n*t,f=c/t,p=n/t,_=(n*i-c*e)/t,m=(n*e+c*i)/t,v.invert=function(t,n){return[a*(f*t-p*n+_),r*(m-p*t-f*n)]},v):(o=t,s=e,l=i,u=a,h=r,y.invert=function(t,n){return[(t-s)/o*u,(l-n)/o*h]},y);function y(t,n){return[s+o*(t*=u),l-o*(n*=h)]}function v(t,n){return[g*(t*=a)-d*(n*=r)+e,i-d*t-g*n]}}function Q3(t){return t6(function(){return t})()}function t6(t){var n,i,e,a,r,o,s,l,u,h,c=150,g=480,d=250,f=0,p=0,_=0,m=0,y=0,v=0,b=1,x=1,w=null,S=D3,C=null,k=O3,A=.5;function M(t){return l(t[0]*$2,t[1]*$2)}function E(t){return(t=l.invert(t[0],t[1]))&&[t[0]*K2,t[1]*K2]}function z(){var t=J3(c,0,0,b,x,v).apply(null,n(f,p)),t=J3(c,g-t[0],d-t[1],b,x,v);return i=y3(_,m,y),s=_3(n,t),l=_3(i,s),o=V3(s,A),T()}function T(){return u=h=null,M}return M.stream=function(t){return u&&h===t?u:u=X3((e=i,K3({point:function(t,n){t=e(t,n);return this.stream.point(t[0],t[1])}})(S(o(k(h=t))))));var e},M.preclip=function(t){return arguments.length?(S=t,w=void 0,T()):S},M.postclip=function(t){return arguments.length?(k=t,C=e=a=r=null,T()):k},M.clipAngle=function(t){return arguments.length?(S=+t?N3(w=t*$2):(w=null,D3),T()):w*K2},M.clipExtent=function(t){return arguments.length?(k=null==t?(C=e=a=r=null,O3):F3(C=+t[0][0],e=+t[0][1],a=+t[1][0],r=+t[1][1]),T()):null==C?null:[[C,e],[a,r]]},M.scale=function(t){return arguments.length?(c=+t,z()):c},M.translate=function(t){return arguments.length?(g=+t[0],d=+t[1],z()):[g,d]},M.center=function(t){return arguments.length?(f=t[0]%360*$2,p=t[1]%360*$2,z()):[f*K2,p*K2]},M.rotate=function(t){return arguments.length?(_=t[0]%360*$2,m=t[1]%360*$2,y=2<t.length?t[2]%360*$2:0,z()):[_*K2,m*K2,y*K2]},M.angle=function(t){return arguments.length?(v=t%360*$2,z()):v*K2},M.reflectX=function(t){return arguments.length?(b=t?-1:1,z()):b<0},M.reflectY=function(t){return arguments.length?(x=t?-1:1,z()):x<0},M.precision=function(t){return arguments.length?(o=V3(s,A=t*t),T()):Q2(A)},M.fitExtent=function(t,n){return U3(M,t,n)},M.fitSize=function(t,n){return U3(M,[[0,0],t],n)},M.fitWidth=function(t,n){return a=t,q3(i=M,function(t){var n=+a,e=n/(t[1][0]-t[0][0]),n=(n-e*(t[1][0]+t[0][0]))/2,t=-e*t[0][1];i.scale(150*e).translate([n,t])},n);var i,a},M.fitHeight=function(t,n){return r=t,q3(a=M,function(t){var n=+r,e=n/(t[1][1]-t[0][1]),i=-e*t[0][0],n=(n-e*(t[1][1]+t[0][1]))/2;a.scale(150*e).translate([i,n])},n);var a,r},function(){return n=t.apply(this,arguments),M.invert=n.invert&&E,z()}}function n6(t){var n=0,e=K/3,i=t6(t),t=i(n,e);return t.parallels=function(t){return arguments.length?i(n=t[0]*$2,e=t[1]*$2):[n*K2,e*K2]},t}function e6(t,n){var e,i,a,r=$(t),o=(r+$(n))/2;
5494
5490
  // Are the parallels symmetrical around the Equator?
5495
- return $2(o)<R2?(e=W2(t),s.invert=function(t,n){return[t/e,t3(n*e)]},s):(a=J2(i=1+r*(2*o-r))/o,l.invert=function(t,n){var n=a-n,e=U2(t,$2(n))*X2(n);return n*o<0&&(e-=K*X2(t)*X2(n)),[e/o,t3((i-(t*t+n*n)*o*o)/(2*o))]},l);function s(t,n){return[t*e,$(n)/e]}function l(t,n){n=J2(i-2*o*$(n))/o;return[n*$(t*=o),a-n*W2(t)]}}function e6(){return t6(n6).scale(155.424).center([0,33.6442])}function i6(){return e6().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function a6(t,n){return[t,V2(Q2((j2+n)/2))]}function r6(){return o6(a6).scale(961/H2)}function o6(i){var a,r,o,s=J3(i),n=s.center,l=s.scale,e=s.translate,u=s.clipExtent,h=null;// clip extent
5496
- function c(){var n,t=K*l(),e=s((n=m3((n=s.rotate())[0]*K2,n[1]*K2,2<n.length?n[2]*K2:0),function(t){return(t=n.invert(t[0]*K2,t[1]*K2))[0]*=G2,t[1]*=G2,t}([0,0])));return u(null==h?[[e[0]-t,e[1]-t],[e[0]+t,e[1]+t]]:i===a6?[[Math.max(e[0]-t,h),a],[Math.min(e[0]+t,r),o]]:[[h,Math.max(e[1]-t,a)],[r,Math.min(e[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),c):l)()},s.translate=function(t){return(arguments.length?(e(t),c):e)()},s.center=function(t){return(arguments.length?(n(t),c):n)()},s.clipExtent=function(t){return arguments.length?(null==t?h=a=r=o=null:(h=+t[0][0],a=+t[0][1],r=+t[1][0],o=+t[1][1]),c()):null==h?null:[[h,a],[r,o]]},c()}function s6(t){return Q2((j2+t)/2)}function l6(t,n){var e=W2(t),a=t===n?$(t):V2(e/W2(n))/V2(s6(n)/s6(t)),r=e*Z2(s6(t),a)/a;return a?(i.invert=function(t,n){var n=r-n,e=X2(a)*J2(t*t+n*n),i=U2(t,$2(n))*X2(n);return n*a<0&&(i-=K*X2(t)*X2(n)),[i/a,2*q2(Z2(r/e,1/a))-j2]},i):a6;function i(t,n){0<r?n<-j2+R2&&(n=-j2+R2):j2-R2<n&&(n=j2-R2);n=r/Z2(s6(n),a);return[n*$(a*t),r-n*W2(a*t)]}}function u6(){return t6(l6).scale(109.5).parallels([30,30])}function h6(t,n){return[t,n]}function c6(){return J3(h6).scale(152.63)}function g6(t,n){var e=W2(t),i=t===n?$(t):(e-W2(n))/(n-t),a=e/i+t;return $2(i)<R2?h6:(r.invert=function(t,n){var n=a-n,e=U2(t,$2(n))*X2(n);return n*i<0&&(e-=K*X2(t)*X2(n)),[e/i,a-X2(i)*J2(t*t+n*n)]},r);function r(t,n){n=a-n,t*=i;return[n*$(t),a-n*W2(t)]}}function d6(){return t6(g6).scale(131.154).center([0,13.9389])}function f6(t,n){var e=W2(n),i=1+W2(t)*e;return[e*$(t)/i,$(n)/i]}function p6(t,n){return[V2(Q2((j2+n)/2)),-t]}function _6(){}a6.invert=function(t,n){return[t,2*q2(Y2(n))-j2]},h6.invert=h6,f6.invert=(V3=function(t){return 2*q2(t)},function(t,n){var e=J2(t*t+n*n),i=V3(e),a=$(i),i=W2(i);return[U2(t*a,e*i),t3(e&&n*a/e)]}),p6.invert=function(t,n){return[-n,2*q2(Y2(t))-j2]};var m6=1/0,y6=m6,v6=-m6,b6=v6,x6={point:function(t,n){t<m6&&(m6=t);v6<t&&(v6=t);n<y6&&(y6=n);b6<n&&(b6=n)},lineStart:_6,lineEnd:_6,polygonStart:_6,polygonEnd:_6,result:function(){var t=[[m6,y6],[v6,b6]];return v6=b6=-(y6=m6=1/0),t}};function w6(t,n,e){var i=n[1][0]-n[0][0],a=n[1][1]-n[0][1],r=t.clipExtent&&t.clipExtent(),e=(t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),s3(e,t.stream(x6)),x6.result()),o=Math.min(i/(e[1][0]-e[0][0]),a/(e[1][1]-e[0][1])),i=+n[0][0]+(i-o*(e[1][0]+e[0][0]))/2,n=+n[0][1]+(a-o*(e[1][1]+e[0][1]))/2;return null!=r&&t.clipExtent(r),t.scale(150*o).translate([i,n])}function S6(t,n,e){return w6(t,[[0,0],n],e)}let C6=Math.PI,k6=2*C6,A6=1e-6,M6=k6-A6;function E6(){this._x0=this._y0=this._x1=this._y1=null,// end of current subpath
5497
- this._=""}function z6(){return new E6}E6.prototype=z6.prototype={constructor:E6,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,a,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+a)+","+(this._y1=+r)},arcTo:function(t,n,e,i,a){var r,o,s=this._x1,l=this._y1,u=(e=+e)-(t=+t),h=(i=+i)-(n=+n),c=s-t,g=l-n,d=c*c+g*g;
5491
+ return q2(o)<j2?(e=Y2(t),s.invert=function(t,n){return[t/e,n3(n*e)]},s):(a=Q2(i=1+r*(2*o-r))/o,l.invert=function(t,n){var n=a-n,e=W2(t,q2(n))*J2(n);return n*o<0&&(e-=K*J2(t)*J2(n)),[e/o,n3((i-(t*t+n*n)*o*o)/(2*o))]},l);function s(t,n){return[t*e,$(n)/e]}function l(t,n){n=Q2(i-2*o*$(n))/o;return[n*$(t*=o),a-n*Y2(t)]}}function i6(){return n6(e6).scale(155.424).center([0,33.6442])}function a6(){return i6().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function r6(t,n){return[t,Z2(t3((I2+n)/2))]}function o6(){return s6(r6).scale(961/G2)}function s6(i){var a,r,o,s=Q3(i),n=s.center,l=s.scale,e=s.translate,u=s.clipExtent,h=null;// clip extent
5492
+ function c(){var n,t=K*l(),e=s((n=y3((n=s.rotate())[0]*$2,n[1]*$2,2<n.length?n[2]*$2:0),function(t){return(t=n.invert(t[0]*$2,t[1]*$2))[0]*=K2,t[1]*=K2,t}([0,0])));return u(null==h?[[e[0]-t,e[1]-t],[e[0]+t,e[1]+t]]:i===r6?[[Math.max(e[0]-t,h),a],[Math.min(e[0]+t,r),o]]:[[h,Math.max(e[1]-t,a)],[r,Math.min(e[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),c):l)()},s.translate=function(t){return(arguments.length?(e(t),c):e)()},s.center=function(t){return(arguments.length?(n(t),c):n)()},s.clipExtent=function(t){return arguments.length?(null==t?h=a=r=o=null:(h=+t[0][0],a=+t[0][1],r=+t[1][0],o=+t[1][1]),c()):null==h?null:[[h,a],[r,o]]},c()}function l6(t){return t3((I2+t)/2)}function u6(t,n){var e=Y2(t),a=t===n?$(t):Z2(e/Y2(n))/Z2(l6(n)/l6(t)),r=e*X2(l6(t),a)/a;return a?(i.invert=function(t,n){var n=r-n,e=J2(a)*Q2(t*t+n*n),i=W2(t,q2(n))*J2(n);return n*a<0&&(i-=K*J2(t)*J2(n)),[i/a,2*U2(X2(r/e,1/a))-I2]},i):r6;function i(t,n){0<r?n<-I2+j2&&(n=-I2+j2):I2-j2<n&&(n=I2-j2);n=r/X2(l6(n),a);return[n*$(a*t),r-n*Y2(a*t)]}}function h6(){return n6(u6).scale(109.5).parallels([30,30])}function c6(t,n){return[t,n]}function g6(){return Q3(c6).scale(152.63)}function d6(t,n){var e=Y2(t),i=t===n?$(t):(e-Y2(n))/(n-t),a=e/i+t;return q2(i)<j2?c6:(r.invert=function(t,n){var n=a-n,e=W2(t,q2(n))*J2(n);return n*i<0&&(e-=K*J2(t)*J2(n)),[e/i,a-J2(i)*Q2(t*t+n*n)]},r);function r(t,n){n=a-n,t*=i;return[n*$(t),a-n*Y2(t)]}}function f6(){return n6(d6).scale(131.154).center([0,13.9389])}function p6(t,n){var e=Y2(n),i=1+Y2(t)*e;return[e*$(t)/i,$(n)/i]}function _6(t,n){return[Z2(t3((I2+n)/2)),-t]}function m6(){}r6.invert=function(t,n){return[t,2*U2(V2(n))-I2]},c6.invert=c6,p6.invert=(Z3=function(t){return 2*U2(t)},function(t,n){var e=Q2(t*t+n*n),i=Z3(e),a=$(i),i=Y2(i);return[W2(t*a,e*i),n3(e&&n*a/e)]}),_6.invert=function(t,n){return[-n,2*U2(V2(t))-I2]};var y6=1/0,v6=y6,b6=-y6,x6=b6,w6={point:function(t,n){t<y6&&(y6=t);b6<t&&(b6=t);n<v6&&(v6=n);x6<n&&(x6=n)},lineStart:m6,lineEnd:m6,polygonStart:m6,polygonEnd:m6,result:function(){var t=[[y6,v6],[b6,x6]];return b6=x6=-(v6=y6=1/0),t}};function S6(t,n,e){var i=n[1][0]-n[0][0],a=n[1][1]-n[0][1],r=t.clipExtent&&t.clipExtent(),e=(t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),l3(e,t.stream(w6)),w6.result()),o=Math.min(i/(e[1][0]-e[0][0]),a/(e[1][1]-e[0][1])),i=+n[0][0]+(i-o*(e[1][0]+e[0][0]))/2,n=+n[0][1]+(a-o*(e[1][1]+e[0][1]))/2;return null!=r&&t.clipExtent(r),t.scale(150*o).translate([i,n])}function C6(t,n,e){return S6(t,[[0,0],n],e)}let k6=Math.PI,A6=2*k6,M6=1e-6,E6=A6-M6;function z6(){this._x0=this._y0=this._x1=this._y1=null,// end of current subpath
5493
+ this._=""}function T6(){return new z6}z6.prototype=T6.prototype={constructor:z6,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,a,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+a)+","+(this._y1=+r)},arcTo:function(t,n,e,i,a){var r,o,s=this._x1,l=this._y1,u=(e=+e)-(t=+t),h=(i=+i)-(n=+n),c=s-t,g=l-n,d=c*c+g*g;
5498
5494
  // Is the radius negative? Error.
5499
5495
  if((a=+a)<0)throw new Error("negative radius: "+a);
5500
5496
  // Is this path empty? Move to (x1,y1).
5501
- null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=n):d>A6&&(Math.abs(g*u-h*c)>A6&&a?(o=u*u+h*h,i=(e=e-s)*e+(s=i-l)*s,l=Math.sqrt(o),r=Math.sqrt(d),d=(o=a*Math.tan((C6-Math.acos((o+d-i)/(2*l*r)))/2))/r,i=o/l,
5497
+ null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=n):d>M6&&(Math.abs(g*u-h*c)>M6&&a?(o=u*u+h*h,i=(e=e-s)*e+(s=i-l)*s,l=Math.sqrt(o),r=Math.sqrt(d),d=(o=a*Math.tan((k6-Math.acos((o+d-i)/(2*l*r)))/2))/r,i=o/l,
5502
5498
  // If the start tangent is not coincident with (x0,y0), line to.
5503
- Math.abs(d-1)>A6&&(this._+="L"+(t+d*c)+","+(n+d*g)),this._+="A"+a+","+a+",0,0,"+ +(c*s<g*e)+","+(this._x1=t+i*u)+","+(this._y1=n+i*h)):this._+="L"+(this._x1=t)+","+(this._y1=n))},arc:function(t,n,e,i,a,r){t=+t,n=+n,r=!!r;var o=(e=+e)*Math.cos(i),s=e*Math.sin(i),l=t+o,u=n+s,h=1^r,r=r?i-a:a-i;
5499
+ Math.abs(d-1)>M6&&(this._+="L"+(t+d*c)+","+(n+d*g)),this._+="A"+a+","+a+",0,0,"+ +(c*s<g*e)+","+(this._x1=t+i*u)+","+(this._y1=n+i*h)):this._+="L"+(this._x1=t)+","+(this._y1=n))},arc:function(t,n,e,i,a,r){t=+t,n=+n,r=!!r;var o=(e=+e)*Math.cos(i),s=e*Math.sin(i),l=t+o,u=n+s,h=1^r,r=r?i-a:a-i;
5504
5500
  // Is the radius negative? Error.
5505
5501
  if(e<0)throw new Error("negative radius: "+e);
5506
5502
  // Is this path empty? Move to (x0,y0).
5507
- null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>A6||Math.abs(this._y1-u)>A6)&&(this._+="L"+l+","+u),
5503
+ null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>M6||Math.abs(this._y1-u)>M6)&&(this._+="L"+l+","+u),
5508
5504
  // Is this arc empty? We’re done.
5509
5505
  e&&(
5510
5506
  // Is this a complete circle? Draw two arcs to complete the circle.
5511
5507
  (
5512
5508
  // Does the angle go the wrong way? Flip the direction.
5513
- r=r<0?r%k6+k6:r)>M6?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-s)+"A"+e+","+e+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):r>A6&&(this._+="A"+e+","+e+",0,"+ +(r>=C6)+","+h+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};n=Object.freeze({__proto__:null,geoAlbersUk:function(){var n,e,a,r,i,o=i6().rotate([4.4,.8]).center([0,55.4]).parallels([50,60]),s=i6().rotate([4.4,.8]).center([0,55.4]).parallels([50,60]),l={point:function(t,n){i=[t,n]}};function u(t){var n=t[0],t=t[1];return i=null,a.point(n,t),i||(r.point(n,t),i)}function h(){return n=e=null,u}return u.invert=function(t){var n=o.scale(),e=o.translate(),i=(t[0]-e[0])/n,e=(t[1]-e[1])/n;return(-.089<=e&&e<.06&&.029<=i&&i<.046?s:o).invert(t)},u.stream=function(t){return n&&e===t?n:(i=[o.stream(e=t),s.stream(t)],a=i.length,n={point:function(t,n){for(var e=-1;++e<a;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<a;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<a;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<a;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<a;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<a;)i[t].polygonEnd()}});var i,a},u.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),h()):o.precision()},u.scale=function(t){return arguments.length?(o.scale(t),s.scale(t),u.translate(o.translate())):o.scale()},u.translate=function(t){var n,e,i;return arguments.length?(n=o.scale(),e=+t[0],i=+t[1],a=o.translate(t).clipExtent([[e-.065*n,i-.089*n],[e+.075*n,i+.089*n]]).stream(l),r=s.translate([e+.01*n,i+.025*n]).clipExtent([[e+.029*n+G,i-.089*n+G],[e+.046*n-G,i-.06*n-G]]).stream(l),h()):o.translate()},u.fitExtent=function(t,n){return w6(u,t,n)},u.fitSize=function(t,n){return S6(u,t,n)},u.drawCompositionBorders=function(t){
5509
+ r=r<0?r%A6+A6:r)>E6?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-s)+"A"+e+","+e+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):r>M6&&(this._+="A"+e+","+e+",0,"+ +(r>=k6)+","+h+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};n=Object.freeze({__proto__:null,geoAlbersUk:function(){var n,e,a,r,i,o=a6().rotate([4.4,.8]).center([0,55.4]).parallels([50,60]),s=a6().rotate([4.4,.8]).center([0,55.4]).parallels([50,60]),l={point:function(t,n){i=[t,n]}};function u(t){var n=t[0],t=t[1];return i=null,a.point(n,t),i||(r.point(n,t),i)}function h(){return n=e=null,u}return u.invert=function(t){var n=o.scale(),e=o.translate(),i=(t[0]-e[0])/n,e=(t[1]-e[1])/n;return(-.089<=e&&e<.06&&.029<=i&&i<.046?s:o).invert(t)},u.stream=function(t){return n&&e===t?n:(i=[o.stream(e=t),s.stream(t)],a=i.length,n={point:function(t,n){for(var e=-1;++e<a;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<a;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<a;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<a;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<a;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<a;)i[t].polygonEnd()}});var i,a},u.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),h()):o.precision()},u.scale=function(t){return arguments.length?(o.scale(t),s.scale(t),u.translate(o.translate())):o.scale()},u.translate=function(t){var n,e,i;return arguments.length?(n=o.scale(),e=+t[0],i=+t[1],a=o.translate(t).clipExtent([[e-.065*n,i-.089*n],[e+.075*n,i+.089*n]]).stream(l),r=s.translate([e+.01*n,i+.025*n]).clipExtent([[e+.029*n+G,i-.089*n+G],[e+.046*n-G,i-.06*n-G]]).stream(l),h()):o.translate()},u.fitExtent=function(t,n){return S6(u,t,n)},u.fitSize=function(t,n){return C6(u,t,n)},u.drawCompositionBorders=function(t){
5514
5510
  /*var ul = main.invert([
5515
5511
  shetland.clipExtent()[0][0],
5516
5512
  shetland.clipExtent()[0][1]
@@ -5537,16 +5533,16 @@ r=r<0?r%k6+k6:r)>M6?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-s)+"A"+e+","+
5537
5533
  console.log("context.lineTo(ur[0], ur[1]);");
5538
5534
  console.log("context.lineTo(ld[0], ld[1]);");
5539
5535
  console.log("context.lineTo(ll[0], ll[1]);");
5540
- console.log("context.closePath();");*/var n=o([-1.113205870242365,59.64920050773357]),e=o([.807899092399606,59.59085836472269]),i=o([.5778611961420386,57.93467822832577]),a=o([-1.25867782078448,57.99029450085142]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath()},u.getCompositionBorders=function(){var t=z6();return this.drawCompositionBorders(t),t.toString()},u.scale(2800)},geoAlbersUsa:
5536
+ console.log("context.closePath();");*/var n=o([-1.113205870242365,59.64920050773357]),e=o([.807899092399606,59.59085836472269]),i=o([.5778611961420386,57.93467822832577]),a=o([-1.25867782078448,57.99029450085142]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath()},u.getCompositionBorders=function(){var t=T6();return this.drawCompositionBorders(t),t.toString()},u.scale(2800)},geoAlbersUsa:
5541
5537
  // A composite projection for the United States, configured by default for
5542
5538
  // 960×500. The projection also works quite well at 960×600 if you change the
5543
5539
  // scale to 1285 and adjust the translate accordingly. The set of standard
5544
5540
  // parallels for each region comes from USGS, which is published here:
5545
5541
  // http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers
5546
- function(){var n,e,a,r,o,i,u=i6(),s=e6().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=e6().rotate([157,0]).center([-3,19.9]).parallels([8,18]),h={point:function(t,n){i=[t,n]}};function c(t){var n=t[0],t=t[1];return i=null,a.point(n,t),i||(r.point(n,t),i)||(o.point(n,t),i)}function g(){return n=e=null,c}return c.invert=function(t){var n=u.scale(),e=u.translate(),i=(t[0]-e[0])/n,e=(t[1]-e[1])/n;return(.12<=e&&e<.234&&-.425<=i&&i<-.214?s:.166<=e&&e<.234&&-.214<=i&&i<-.115?l:u).invert(t)},c.stream=function(t){return n&&e===t?n:(i=[u.stream(e=t),s.stream(t),l.stream(t)],a=i.length,n={point:function(t,n){for(var e=-1;++e<a;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<a;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<a;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<a;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<a;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<a;)i[t].polygonEnd()}});
5542
+ function(){var n,e,a,r,o,i,u=a6(),s=i6().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=i6().rotate([157,0]).center([-3,19.9]).parallels([8,18]),h={point:function(t,n){i=[t,n]}};function c(t){var n=t[0],t=t[1];return i=null,a.point(n,t),i||(r.point(n,t),i)||(o.point(n,t),i)}function g(){return n=e=null,c}return c.invert=function(t){var n=u.scale(),e=u.translate(),i=(t[0]-e[0])/n,e=(t[1]-e[1])/n;return(.12<=e&&e<.234&&-.425<=i&&i<-.214?s:.166<=e&&e<.234&&-.214<=i&&i<-.115?l:u).invert(t)},c.stream=function(t){return n&&e===t?n:(i=[u.stream(e=t),s.stream(t),l.stream(t)],a=i.length,n={point:function(t,n){for(var e=-1;++e<a;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<a;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<a;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<a;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<a;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<a;)i[t].polygonEnd()}});
5547
5543
  // The projections must have mutually exclusive clip regions on the sphere,
5548
5544
  // as this will avoid emitting interleaving lines and polygons.
5549
- var i,a},c.precision=function(t){return arguments.length?(u.precision(t),s.precision(t),l.precision(t),g()):u.precision()},c.scale=function(t){return arguments.length?(u.scale(t),s.scale(.35*t),l.scale(t),c.translate(u.translate())):u.scale()},c.translate=function(t){var n,e,i;return arguments.length?(n=u.scale(),e=+t[0],i=+t[1],a=u.translate(t).clipExtent([[e-.455*n,i-.238*n],[e+.455*n,i+.238*n]]).stream(h),r=s.translate([e-.307*n,i+.201*n]).clipExtent([[e-.425*n+G,i+.12*n+G],[e-.214*n-G,i+.234*n-G]]).stream(h),o=l.translate([e-.205*n,i+.212*n]).clipExtent([[e-.214*n+G,i+.166*n+G],[e-.115*n-G,i+.234*n-G]]).stream(h),g()):u.translate()},c.fitExtent=function(t,n){return w6(c,t,n)},c.fitSize=function(t,n){return S6(c,t,n)},c.drawCompositionBorders=function(t){var n=u([-102.91,26.3]),e=u([-104,27.5]),i=u([-108,29.1]),a=u([-110,29.1]),r=u([-110,26.7]),o=u([-112.8,27.6]),s=u([-114.3,30.6]),l=u([-119.3,30.1]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.moveTo(r[0],r[1]),t.lineTo(o[0],o[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1])},c.getCompositionBorders=function(){var t=z6();return this.drawCompositionBorders(t),t.toString()},c.scale(1070)}
5545
+ var i,a},c.precision=function(t){return arguments.length?(u.precision(t),s.precision(t),l.precision(t),g()):u.precision()},c.scale=function(t){return arguments.length?(u.scale(t),s.scale(.35*t),l.scale(t),c.translate(u.translate())):u.scale()},c.translate=function(t){var n,e,i;return arguments.length?(n=u.scale(),e=+t[0],i=+t[1],a=u.translate(t).clipExtent([[e-.455*n,i-.238*n],[e+.455*n,i+.238*n]]).stream(h),r=s.translate([e-.307*n,i+.201*n]).clipExtent([[e-.425*n+G,i+.12*n+G],[e-.214*n-G,i+.234*n-G]]).stream(h),o=l.translate([e-.205*n,i+.212*n]).clipExtent([[e-.214*n+G,i+.166*n+G],[e-.115*n-G,i+.234*n-G]]).stream(h),g()):u.translate()},c.fitExtent=function(t,n){return S6(c,t,n)},c.fitSize=function(t,n){return C6(c,t,n)},c.drawCompositionBorders=function(t){var n=u([-102.91,26.3]),e=u([-104,27.5]),i=u([-108,29.1]),a=u([-110,29.1]),r=u([-110,26.7]),o=u([-112.8,27.6]),s=u([-114.3,30.6]),l=u([-119.3,30.1]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.moveTo(r[0],r[1]),t.lineTo(o[0],o[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1])},c.getCompositionBorders=function(){var t=T6();return this.drawCompositionBorders(t),t.toString()},c.scale(1070)}
5550
5546
  // The projections must have mutually exclusive clip regions on the sphere,
5551
5547
  // as this will avoid emitting interleaving lines and polygons.
5552
5548
  ,geoAlbersUsaTerritories:
@@ -5554,7 +5550,7 @@ var i,a},c.precision=function(t){return arguments.length?(u.precision(t),s.preci
5554
5550
  // 960×500. Also works quite well at 960×600 with scale 1285. The set of
5555
5551
  // standard parallels for each region comes from USGS, which is published here:
5556
5552
  // http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers
5557
- function(){var n,e,a,r,o,s,l,u,i,x=i6(),h=e6().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=e6().rotate([157,0]).center([-3,19.9]).parallels([8,18]),g=e6().rotate([66,0]).center([0,18]).parallels([8,18]),d=c6().rotate([173,14]),f=c6().rotate([-145,-16.8]),p={point:function(t,n){i=[t,n]}};
5553
+ function(){var n,e,a,r,o,s,l,u,i,x=a6(),h=i6().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=i6().rotate([157,0]).center([-3,19.9]).parallels([8,18]),g=i6().rotate([66,0]).center([0,18]).parallels([8,18]),d=g6().rotate([173,14]),f=g6().rotate([-145,-16.8]),p={point:function(t,n){i=[t,n]}};
5558
5554
  /*
5559
5555
  var puertoRicoBbox = [[-68.3, 19], [-63.9, 17]];
5560
5556
  var samoaBbox = [[-171, -14], [-168, -14.8]];
@@ -5656,7 +5652,7 @@ function(){var n,e,a,r,o,s,l,u,i,x=i6(),h=e6().rotate([154,0]).center([-2,58.5])
5656
5652
  ' * k - epsilon, y '+
5657
5653
  (y1<0?'+ ':'- ') + Math.abs(y1.toFixed(4))+
5658
5654
  ' * k - epsilon]])');
5659
- */a=x.translate(t).clipExtent([[e-.455*n,i-.238*n],[e+.455*n,i+.238*n]]).stream(p),r=h.translate([e-.307*n,i+.201*n]).clipExtent([[e-.425*n+G,i+.12*n+G],[e-.214*n-G,i+.233*n-G]]).stream(p),o=c.translate([e-.205*n,i+.212*n]).clipExtent([[e-.214*n+G,i+.166*n+G],[e-.115*n-G,i+.233*n-G]]).stream(p),s=g.translate([e+.35*n,i+.224*n]).clipExtent([[e+.312*n+G,i+.2064*n+G],[e+.385*n-G,i+.233*n-G]]).stream(p),l=d.translate([e-.492*n,i+.09*n]).clipExtent([[e-.4243*n+G,i+.0903*n+G],[e-.3233*n-G,i+.1197*n-G]]).stream(p),u=f.translate([e-.408*n,i+.018*n]).clipExtent([[e-.4244*n+G,i-.0519*n+G],[e-.3824*n-G,i+.0895*n-G]]).stream(p),m()):x.translate()},_.fitExtent=function(t,n){return w6(_,t,n)},_.fitSize=function(t,n){return S6(_,t,n)},_.drawCompositionBorders=function(t){
5655
+ */a=x.translate(t).clipExtent([[e-.455*n,i-.238*n],[e+.455*n,i+.238*n]]).stream(p),r=h.translate([e-.307*n,i+.201*n]).clipExtent([[e-.425*n+G,i+.12*n+G],[e-.214*n-G,i+.233*n-G]]).stream(p),o=c.translate([e-.205*n,i+.212*n]).clipExtent([[e-.214*n+G,i+.166*n+G],[e-.115*n-G,i+.233*n-G]]).stream(p),s=g.translate([e+.35*n,i+.224*n]).clipExtent([[e+.312*n+G,i+.2064*n+G],[e+.385*n-G,i+.233*n-G]]).stream(p),l=d.translate([e-.492*n,i+.09*n]).clipExtent([[e-.4243*n+G,i+.0903*n+G],[e-.3233*n-G,i+.1197*n-G]]).stream(p),u=f.translate([e-.408*n,i+.018*n]).clipExtent([[e-.4244*n+G,i-.0519*n+G],[e-.3824*n-G,i+.0895*n-G]]).stream(p),m()):x.translate()},_.fitExtent=function(t,n){return S6(_,t,n)},_.fitSize=function(t,n){return C6(_,t,n)},_.drawCompositionBorders=function(t){
5660
5656
  /*
5661
5657
  console.info("CLIP EXTENT hawaii: ", hawaii.clipExtent());
5662
5658
  console.info("UL BBOX:", lower48.invert([hawaii.clipExtent()[0][0], hawaii.clipExtent()[0][1]]));
@@ -5688,19 +5684,19 @@ function(){var n,e,a,r,o,s,l,u,i,x=i6(),h=e6().rotate([154,0]).center([-2,58.5])
5688
5684
  console.info("UR BBOX:", lower48.invert([guam.clipExtent()[1][0], guam.clipExtent()[0][1]]));
5689
5685
  console.info("LD BBOX:", lower48.invert([guam.clipExtent()[1][0], guam.clipExtent()[1][1]]));
5690
5686
  console.info("LL BBOX:", lower48.invert([guam.clipExtent()[0][0], guam.clipExtent()[1][1]]));
5691
- */var n=x([-110.4641,28.2805]),e=x([-104.0597,28.9528]),i=x([-103.7049,25.1031]),a=x([-109.8337,24.4531]),r=x([-124.4745,28.1407]),o=x([-110.931,30.8844]),s=x([-109.8337,24.4531]),l=x([-122.4628,21.8562]),u=x([-76.8579,25.1544]),h=x([-72.429,24.2097]),c=x([-72.8265,22.7056]),g=x([-77.1852,23.6392]),d=x([-125.0093,29.7791]),f=x([-118.5193,31.3262]),p=x([-118.064,29.6912]),_=x([-124.4369,28.169]),m=x([-128.1314,37.4582]),y=x([-125.2132,38.214]),v=x([-122.3616,30.5115]),b=x([-125.0315,29.8211]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),t.moveTo(r[0],r[1]),t.lineTo(o[0],o[1]),t.lineTo(s[0],s[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1]),t.closePath(),t.moveTo(u[0],u[1]),t.lineTo(h[0],h[1]),t.lineTo(c[0],c[1]),t.lineTo(c[0],c[1]),t.lineTo(g[0],g[1]),t.closePath(),t.moveTo(d[0],d[1]),t.lineTo(f[0],f[1]),t.lineTo(p[0],p[1]),t.lineTo(p[0],p[1]),t.lineTo(_[0],_[1]),t.closePath(),t.moveTo(m[0],m[1]),t.lineTo(y[0],y[1]),t.lineTo(v[0],v[1]),t.lineTo(v[0],v[1]),t.lineTo(b[0],b[1]),t.closePath()},_.getCompositionBorders=function(){var t=z6();return this.drawCompositionBorders(t),t.toString()},_.scale(1070)}
5687
+ */var n=x([-110.4641,28.2805]),e=x([-104.0597,28.9528]),i=x([-103.7049,25.1031]),a=x([-109.8337,24.4531]),r=x([-124.4745,28.1407]),o=x([-110.931,30.8844]),s=x([-109.8337,24.4531]),l=x([-122.4628,21.8562]),u=x([-76.8579,25.1544]),h=x([-72.429,24.2097]),c=x([-72.8265,22.7056]),g=x([-77.1852,23.6392]),d=x([-125.0093,29.7791]),f=x([-118.5193,31.3262]),p=x([-118.064,29.6912]),_=x([-124.4369,28.169]),m=x([-128.1314,37.4582]),y=x([-125.2132,38.214]),v=x([-122.3616,30.5115]),b=x([-125.0315,29.8211]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),t.moveTo(r[0],r[1]),t.lineTo(o[0],o[1]),t.lineTo(s[0],s[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1]),t.closePath(),t.moveTo(u[0],u[1]),t.lineTo(h[0],h[1]),t.lineTo(c[0],c[1]),t.lineTo(c[0],c[1]),t.lineTo(g[0],g[1]),t.closePath(),t.moveTo(d[0],d[1]),t.lineTo(f[0],f[1]),t.lineTo(p[0],p[1]),t.lineTo(p[0],p[1]),t.lineTo(_[0],_[1]),t.closePath(),t.moveTo(m[0],m[1]),t.lineTo(y[0],y[1]),t.lineTo(v[0],v[1]),t.lineTo(v[0],v[1]),t.lineTo(b[0],b[1]),t.closePath()},_.getCompositionBorders=function(){var t=T6();return this.drawCompositionBorders(t),t.toString()},_.scale(1070)}
5692
5688
  // The projections must have mutually exclusive clip regions on the sphere,
5693
5689
  // as this will avoid emitting interleaving lines and polygons.
5694
5690
  ,geoConicConformalEurope:
5695
5691
  // A composite projection for Portugal, configured by default for 960×500.
5696
- function(){var n,e,i,a,r,o,s,l,u,h,c,g,d,f,p,_=u6().rotate([-10,-53]).parallels([0,60]),m=r6().center([-61.46,16.14]),y=r6().center([-53.2,3.9]),v=u6().rotate([27.8,-38.9]).parallels([0,60]),b=u6().rotate([25.43,-37.398]).parallels([0,60]),x=u6().rotate([31.17,-39.539]).parallels([0,60]),w=u6().rotate([17,-32.7]).parallels([0,60]),S=u6().rotate([16,-28.5]).parallels([0,60]),C=r6().center([-61.03,14.67]),k=r6().center([45.16,-12.8]),A=r6().center([55.52,-21.13]),M=u6().rotate([-14.4,-35.95]).parallels([0,60]),E={point:function(t,n){p=[t,n]}};
5692
+ function(){var n,e,i,a,r,o,s,l,u,h,c,g,d,f,p,_=h6().rotate([-10,-53]).parallels([0,60]),m=o6().center([-61.46,16.14]),y=o6().center([-53.2,3.9]),v=h6().rotate([27.8,-38.9]).parallels([0,60]),b=h6().rotate([25.43,-37.398]).parallels([0,60]),x=h6().rotate([31.17,-39.539]).parallels([0,60]),w=h6().rotate([17,-32.7]).parallels([0,60]),S=h6().rotate([16,-28.5]).parallels([0,60]),C=o6().center([-61.03,14.67]),k=o6().center([45.16,-12.8]),A=o6().center([55.52,-21.13]),M=h6().rotate([-14.4,-35.95]).parallels([0,60]),E={point:function(t,n){p=[t,n]}};
5697
5693
  /*
5698
5694
  var europeBbox = [[-6.5, 51], [10, 41]];
5699
5695
  var guyaneBbox = [[-54.5, 6.29], [-50.9, 1.48]];
5700
5696
  */function z(t){var n=t[0],t=t[1];return p=null,i.point(n,t),p||(r.point(n,t),p)||(c.point(n,t),p)||(a.point(n,t),p)||(h.point(n,t),p)||(u.point(n,t),p)||(g.point(n,t),p)||(d.point(n,t),p)||(f.point(n,t),p)||(o.point(n,t),p)||(s.point(n,t),p)||(l.point(n,t),p)}function T(){return n=e=null,z}return z.invert=function(t){var n=_.scale(),e=_.translate(),i=(t[0]-(e[0]+.08*n))/n,e=(t[1]-e[1])/n;return(-.31<=e&&e<-.24&&.14<=i&&i<.24?m:-.24<=e&&e<-.17&&.14<=i&&i<.24?y:-.17<=e&&e<-.12&&.21<=i&&i<.24?b:-.17<=e&&e<-.14&&.14<=i&&i<.165?x:-.17<=e&&e<-.1&&.14<=i&&i<.24?v:-.1<=e&&e<-.03&&.14<=i&&i<.24?w:-.03<=e&&e<.04&&.14<=i&&i<.24?S:-.31<=e&&e<-.24&&.24<=i&&i<.34?C:-.24<=e&&e<-.17&&.24<=i&&i<.34?k:-.17<=e&&e<-.1&&.24<=i&&i<.34?A:-.1<=e&&e<-.03&&.24<=i&&i<.34?M:_).invert(t)},z.stream=function(t){return n&&e===t?n:(i=[_.stream(e=t),y.stream(t),C.stream(t),m.stream(t),S.stream(t),w.stream(t),k.stream(t),A.stream(t),M.stream(t),v.stream(t),b.stream(t),x.stream(t)],a=i.length,n={point:function(t,n){for(var e=-1;++e<a;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<a;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<a;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<a;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<a;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<a;)i[t].polygonEnd()}});
5701
5697
  // The projections must have mutually exclusive clip regions on the sphere,
5702
5698
  // as this will avoid emitting interleaving lines and polygons.
5703
- var i,a},z.precision=function(t){return arguments.length?(_.precision(t),y.precision(t),C.precision(t),m.precision(t),S.precision(t),w.precision(t),k.precision(t),A.precision(t),M.precision(t),v.precision(t),b.precision(t),x.precision(t),T()):_.precision()},z.scale=function(t){return arguments.length?(_.scale(t),m.scale(3*t),y.scale(.8*t),C.scale(3.5*t),A.scale(2.7*t),v.scale(2*t),b.scale(2*t),x.scale(2*t),w.scale(3*t),S.scale(t),k.scale(5.5*t),M.scale(6*t),z.translate(_.translate())):_.scale()},z.translate=function(t){var n,e;return arguments.length?(n=_.scale(),e=+t[0],i=_.translate([e-.08*n,t=+t[1]]).clipExtent([[e-.51*n,t-.33*n],[e+.5*n,t+.33*n]]).stream(E),a=m.translate([e+.19*n,t-.275*n]).clipExtent([[e+.14*n+G,t-.31*n+G],[e+.24*n-G,t-.24*n-G]]).stream(E),r=y.translate([e+.19*n,t-.205*n]).clipExtent([[e+.14*n+G,t-.24*n+G],[e+.24*n-G,t-.17*n-G]]).stream(E),o=v.translate([e+.19*n,t-.135*n]).clipExtent([[e+.14*n+G,t-.17*n+G],[e+.24*n-G,t-.1*n-G]]).stream(E),s=b.translate([e+.225*n,t-.147*n]).clipExtent([[e+.21*n+G,t-.17*n+G],[e+.24*n-G,t-.12*n-G]]).stream(E),l=x.translate([e+.153*n,t-.15*n]).clipExtent([[e+.14*n+G,t-.17*n+G],[e+.165*n-G,t-.14*n-G]]).stream(E),u=w.translate([e+.19*n,t-.065*n]).clipExtent([[e+.14*n+G,t-.1*n+G],[e+.24*n-G,t-.03*n-G]]).stream(E),h=S.translate([e+.19*n,t+.005*n]).clipExtent([[e+.14*n+G,t-.03*n+G],[e+.24*n-G,t+.04*n-G]]).stream(E),c=C.translate([e+.29*n,t-.275*n]).clipExtent([[e+.24*n+G,t-.31*n+G],[e+.34*n-G,t-.24*n-G]]).stream(E),g=k.translate([e+.29*n,t-.205*n]).clipExtent([[e+.24*n+G,t-.24*n+G],[e+.34*n-G,t-.17*n-G]]).stream(E),d=A.translate([e+.29*n,t-.135*n]).clipExtent([[e+.24*n+G,t-.17*n+G],[e+.34*n-G,t-.1*n-G]]).stream(E),f=M.translate([e+.29*n,t-.065*n]).clipExtent([[e+.24*n+G,t-.1*n+G],[e+.34*n-G,t-.03*n-G]]).stream(E),T()):_.translate()},z.fitExtent=function(t,n){return w6(z,t,n)},z.fitSize=function(t,n){return S6(z,t,n)},z.drawCompositionBorders=function(t){
5699
+ var i,a},z.precision=function(t){return arguments.length?(_.precision(t),y.precision(t),C.precision(t),m.precision(t),S.precision(t),w.precision(t),k.precision(t),A.precision(t),M.precision(t),v.precision(t),b.precision(t),x.precision(t),T()):_.precision()},z.scale=function(t){return arguments.length?(_.scale(t),m.scale(3*t),y.scale(.8*t),C.scale(3.5*t),A.scale(2.7*t),v.scale(2*t),b.scale(2*t),x.scale(2*t),w.scale(3*t),S.scale(t),k.scale(5.5*t),M.scale(6*t),z.translate(_.translate())):_.scale()},z.translate=function(t){var n,e;return arguments.length?(n=_.scale(),e=+t[0],i=_.translate([e-.08*n,t=+t[1]]).clipExtent([[e-.51*n,t-.33*n],[e+.5*n,t+.33*n]]).stream(E),a=m.translate([e+.19*n,t-.275*n]).clipExtent([[e+.14*n+G,t-.31*n+G],[e+.24*n-G,t-.24*n-G]]).stream(E),r=y.translate([e+.19*n,t-.205*n]).clipExtent([[e+.14*n+G,t-.24*n+G],[e+.24*n-G,t-.17*n-G]]).stream(E),o=v.translate([e+.19*n,t-.135*n]).clipExtent([[e+.14*n+G,t-.17*n+G],[e+.24*n-G,t-.1*n-G]]).stream(E),s=b.translate([e+.225*n,t-.147*n]).clipExtent([[e+.21*n+G,t-.17*n+G],[e+.24*n-G,t-.12*n-G]]).stream(E),l=x.translate([e+.153*n,t-.15*n]).clipExtent([[e+.14*n+G,t-.17*n+G],[e+.165*n-G,t-.14*n-G]]).stream(E),u=w.translate([e+.19*n,t-.065*n]).clipExtent([[e+.14*n+G,t-.1*n+G],[e+.24*n-G,t-.03*n-G]]).stream(E),h=S.translate([e+.19*n,t+.005*n]).clipExtent([[e+.14*n+G,t-.03*n+G],[e+.24*n-G,t+.04*n-G]]).stream(E),c=C.translate([e+.29*n,t-.275*n]).clipExtent([[e+.24*n+G,t-.31*n+G],[e+.34*n-G,t-.24*n-G]]).stream(E),g=k.translate([e+.29*n,t-.205*n]).clipExtent([[e+.24*n+G,t-.24*n+G],[e+.34*n-G,t-.17*n-G]]).stream(E),d=A.translate([e+.29*n,t-.135*n]).clipExtent([[e+.24*n+G,t-.17*n+G],[e+.34*n-G,t-.1*n-G]]).stream(E),f=M.translate([e+.29*n,t-.065*n]).clipExtent([[e+.24*n+G,t-.1*n+G],[e+.34*n-G,t-.03*n-G]]).stream(E),T()):_.translate()},z.fitExtent=function(t,n){return S6(z,t,n)},z.fitSize=function(t,n){return C6(z,t,n)},z.drawCompositionBorders=function(t){
5704
5700
  /*
5705
5701
  console.log("var ul, ur, ld, ll;");
5706
5702
  var projs = [guyane, martinique, guadeloupe, canaryIslands, madeira, mayotte, reunion, malta, azores, azores2, azores3];
@@ -5721,19 +5717,19 @@ var i,a},z.precision=function(t){return arguments.length?(_.precision(t),y.preci
5721
5717
  console.log("context.lineTo(ll[0], ll[1]);");
5722
5718
  console.log("context.closePath();");
5723
5719
 
5724
- }*/var n=_([42.45755610828648,63.343658547914934]),e=_([52.65837266667029,59.35045080290929]),i=_([47.19754502247785,56.12653496548117]),a=_([37.673034273363044,59.61638268506111]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([59.41110754003403,62.35069727399336]),e=_([66.75050228640794,57.11797303636038]),i=_([60.236065725110436,54.63331433818992]),a=_([52.65837313153311,59.350450804599355]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([48.81091130080243,66.93353402634641]),e=_([59.41110730654679,62.35069740653086]),i=_([52.6583728974441,59.3504509222445]),a=_([42.45755631675751,63.34365868805821]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([31.054198418446475,52.1080673766184]),e=_([39.09869284884117,49.400700047190554]),i=_([36.0580811499175,46.02944174908498]),a=_([28.690508588835726,48.433126979386415]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([33.977877745912025,55.849945501331]),e=_([42.75328432167726,52.78455122462353]),i=_([39.09869297540224,49.400700176148625]),a=_([31.05419851807008,52.10806751810923]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([52.658372900759296,59.35045068526415]),e=_([60.23606549583304,54.63331423800264]),i=_([54.6756370953122,51.892298789399455]),a=_([47.19754524788189,56.126534861222794]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([47.19754506082455,56.126534735591456]),e=_([54.675636900123514,51.892298681337095]),i=_([49.94448648951486,48.98775484983285]),a=_([42.75328468716108,52.78455126060818]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([42.75328453416769,52.78455113209101]),e=_([49.94448632339758,48.98775473706457]),i=_([45.912339990394315,45.99361784987003]),a=_([39.09869317356607,49.40070009378711]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([37.673034114296634,59.61638254183119]),e=_([47.197544835420544,56.126534839849846]),i=_([42.75328447467064,52.78455135314068]),a=_([33.977877870363905,55.849945644671145]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([44.56748486446032,57.26489367845818]),i=_([43.9335791193588,53.746540942601726]),a=_([43,56]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([37.673034114296634,59.61638254183119]),e=_([40.25902691953466,58.83002044222639]),i=_([38.458270492742024,57.26232178028002]),a=_([35.97754948030156,58.00266637992386]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath()},z.getCompositionBorders=function(){var t=z6();return this.drawCompositionBorders(t),t.toString()},z.scale(750)}
5720
+ }*/var n=_([42.45755610828648,63.343658547914934]),e=_([52.65837266667029,59.35045080290929]),i=_([47.19754502247785,56.12653496548117]),a=_([37.673034273363044,59.61638268506111]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([59.41110754003403,62.35069727399336]),e=_([66.75050228640794,57.11797303636038]),i=_([60.236065725110436,54.63331433818992]),a=_([52.65837313153311,59.350450804599355]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([48.81091130080243,66.93353402634641]),e=_([59.41110730654679,62.35069740653086]),i=_([52.6583728974441,59.3504509222445]),a=_([42.45755631675751,63.34365868805821]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([31.054198418446475,52.1080673766184]),e=_([39.09869284884117,49.400700047190554]),i=_([36.0580811499175,46.02944174908498]),a=_([28.690508588835726,48.433126979386415]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([33.977877745912025,55.849945501331]),e=_([42.75328432167726,52.78455122462353]),i=_([39.09869297540224,49.400700176148625]),a=_([31.05419851807008,52.10806751810923]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([52.658372900759296,59.35045068526415]),e=_([60.23606549583304,54.63331423800264]),i=_([54.6756370953122,51.892298789399455]),a=_([47.19754524788189,56.126534861222794]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([47.19754506082455,56.126534735591456]),e=_([54.675636900123514,51.892298681337095]),i=_([49.94448648951486,48.98775484983285]),a=_([42.75328468716108,52.78455126060818]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([42.75328453416769,52.78455113209101]),e=_([49.94448632339758,48.98775473706457]),i=_([45.912339990394315,45.99361784987003]),a=_([39.09869317356607,49.40070009378711]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([37.673034114296634,59.61638254183119]),e=_([47.197544835420544,56.126534839849846]),i=_([42.75328447467064,52.78455135314068]),a=_([33.977877870363905,55.849945644671145]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([44.56748486446032,57.26489367845818]),i=_([43.9335791193588,53.746540942601726]),a=_([43,56]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([37.673034114296634,59.61638254183119]),e=_([40.25902691953466,58.83002044222639]),i=_([38.458270492742024,57.26232178028002]),a=_([35.97754948030156,58.00266637992386]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath()},z.getCompositionBorders=function(){var t=T6();return this.drawCompositionBorders(t),t.toString()},z.scale(750)}
5725
5721
  // The projections must have mutually exclusive clip regions on the sphere,
5726
5722
  // as this will avoid emitting interleaving lines and polygons.
5727
5723
  ,geoConicConformalFrance:
5728
5724
  // A composite projection for France, configured by default for 960×500.
5729
- function(){var n,e,a,r,o,s,l,u,h,c,g,d,f,p,i,_=u6().rotate([-3,-46.2]).parallels([0,60]),m=r6().center([-53.2,3.9]),y=r6().center([-61.03,14.67]),v=r6().center([-61.46,16.14]),b=r6().center([-62.85,17.92]),x=r6().center([-56.23,46.93]),w=r6().center([45.16,-12.8]),S=r6().center([55.52,-21.13]),C=r6().center([165.8,-21.07]),k=r6().center([-178.1,-14.3]),A=r6().center([-150.55,-17.11]),M=r6().center([-150.55,-17.11]),E={point:function(t,n){i=[t,n]}};
5725
+ function(){var n,e,a,r,o,s,l,u,h,c,g,d,f,p,i,_=h6().rotate([-3,-46.2]).parallels([0,60]),m=o6().center([-53.2,3.9]),y=o6().center([-61.03,14.67]),v=o6().center([-61.46,16.14]),b=o6().center([-62.85,17.92]),x=o6().center([-56.23,46.93]),w=o6().center([45.16,-12.8]),S=o6().center([55.52,-21.13]),C=o6().center([165.8,-21.07]),k=o6().center([-178.1,-14.3]),A=o6().center([-150.55,-17.11]),M=o6().center([-150.55,-17.11]),E={point:function(t,n){i=[t,n]}};
5730
5726
  /*
5731
5727
  var europeBbox = [[-6.5, 51], [10, 41]];
5732
5728
  var guyaneBbox = [[-54.5, 6.29], [-50.9, 1.48]];
5733
5729
  */function z(t){var n=t[0],t=t[1];return i=null,a.point(n,t),i||(r.point(n,t),i)||(o.point(n,t),i)||(s.point(n,t),i)||(l.point(n,t),i)||(u.point(n,t),i)||(h.point(n,t),i)||(c.point(n,t),i)||(g.point(n,t),i)||(d.point(n,t),i)||(f.point(n,t),i)||(p.point(n,t),i)}function T(){return n=e=null,z}return z.invert=function(t){var n=_.scale(),e=_.translate(),i=(t[0]-e[0])/n,e=(t[1]-e[1])/n;return(.029<=e&&e<.0864&&-.14<=i&&i<-.0996?m:0<=e&&e<.029&&-.14<=i&&i<-.0996?y:-.032<=e&&e<0&&-.14<=i&&i<-.0996?v:-.052<=e&&e<-.032&&-.14<=i&&i<-.0996?b:-.076<=e&&e<.052&&-.14<=i&&i<-.0996?x:-.076<=e&&e<-.052&&.0967<=i&&i<.1371?w:-.052<=e&&e<-.02&&.0967<=i&&i<.1371?S:-.02<=e&&e<.012&&.0967<=i&&i<.1371?C:.012<=e&&e<.033&&.0967<=i&&i<.1371?k:.033<=e&&e<.0864&&.0967<=i&&i<.1371?A:_).invert(t)},z.stream=function(t){return n&&e===t?n:(i=[_.stream(e=t),m.stream(t),y.stream(t),v.stream(t),b.stream(t),x.stream(t),w.stream(t),S.stream(t),C.stream(t),k.stream(t),A.stream(t),M.stream(t)],a=i.length,n={point:function(t,n){for(var e=-1;++e<a;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<a;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<a;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<a;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<a;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<a;)i[t].polygonEnd()}});
5734
5730
  // The projections must have mutually exclusive clip regions on the sphere,
5735
5731
  // as this will avoid emitting interleaving lines and polygons.
5736
- var i,a},z.precision=function(t){return arguments.length?(_.precision(t),m.precision(t),y.precision(t),v.precision(t),b.precision(t),x.precision(t),w.precision(t),S.precision(t),C.precision(t),k.precision(t),A.precision(t),M.precision(t),T()):_.precision()},z.scale=function(t){return arguments.length?(_.scale(t),m.scale(.6*t),y.scale(1.6*t),v.scale(1.4*t),b.scale(5*t),x.scale(1.3*t),w.scale(1.6*t),S.scale(1.2*t),C.scale(.3*t),k.scale(2.7*t),A.scale(.5*t),M.scale(.06*t),z.translate(_.translate())):_.scale()},z.translate=function(t){var n,e,i;return arguments.length?(n=_.scale(),e=+t[0],i=+t[1],a=_.translate(t).clipExtent([[e-.0996*n,i-.0908*n],[e+.0967*n,i+.0864*n]]).stream(E),r=m.translate([e-.12*n,i+.0575*n]).clipExtent([[e-.14*n+G,i+.029*n+G],[e-.0996*n-G,i+.0864*n-G]]).stream(E),o=y.translate([e-.12*n,i+.013*n]).clipExtent([[e-.14*n+G,i+0*n+G],[e-.0996*n-G,i+.029*n-G]]).stream(E),s=v.translate([e-.12*n,i-.014*n]).clipExtent([[e-.14*n+G,i-.032*n+G],[e-.0996*n-G,i+0*n-G]]).stream(E),l=b.translate([e-.12*n,i-.044*n]).clipExtent([[e-.14*n+G,i-.052*n+G],[e-.0996*n-G,i-.032*n-G]]).stream(E),u=x.translate([e-.12*n,i-.065*n]).clipExtent([[e-.14*n+G,i-.076*n+G],[e-.0996*n-G,i-.052*n-G]]).stream(E),h=w.translate([e+.117*n,i-.064*n]).clipExtent([[e+.0967*n+G,i-.076*n+G],[e+.1371*n-G,i-.052*n-G]]).stream(E),c=S.translate([e+.116*n,i-.0355*n]).clipExtent([[e+.0967*n+G,i-.052*n+G],[e+.1371*n-G,i-.02*n-G]]).stream(E),g=C.translate([e+.116*n,i-.0048*n]).clipExtent([[e+.0967*n+G,i-.02*n+G],[e+.1371*n-G,i+.012*n-G]]).stream(E),d=k.translate([e+.116*n,i+.022*n]).clipExtent([[e+.0967*n+G,i+.012*n+G],[e+.1371*n-G,i+.033*n-G]]).stream(E),p=M.translate([e+.11*n,i+.045*n]).clipExtent([[e+.0967*n+G,i+.033*n+G],[e+.1371*n-G,i+.06*n-G]]).stream(E),f=A.translate([e+.115*n,i+.075*n]).clipExtent([[e+.0967*n+G,i+.06*n+G],[e+.1371*n-G,i+.0864*n-G]]).stream(E),T()):_.translate()},z.fitExtent=function(t,n){return w6(z,t,n)},z.fitSize=function(t,n){return S6(z,t,n)},z.drawCompositionBorders=function(t){
5732
+ var i,a},z.precision=function(t){return arguments.length?(_.precision(t),m.precision(t),y.precision(t),v.precision(t),b.precision(t),x.precision(t),w.precision(t),S.precision(t),C.precision(t),k.precision(t),A.precision(t),M.precision(t),T()):_.precision()},z.scale=function(t){return arguments.length?(_.scale(t),m.scale(.6*t),y.scale(1.6*t),v.scale(1.4*t),b.scale(5*t),x.scale(1.3*t),w.scale(1.6*t),S.scale(1.2*t),C.scale(.3*t),k.scale(2.7*t),A.scale(.5*t),M.scale(.06*t),z.translate(_.translate())):_.scale()},z.translate=function(t){var n,e,i;return arguments.length?(n=_.scale(),e=+t[0],i=+t[1],a=_.translate(t).clipExtent([[e-.0996*n,i-.0908*n],[e+.0967*n,i+.0864*n]]).stream(E),r=m.translate([e-.12*n,i+.0575*n]).clipExtent([[e-.14*n+G,i+.029*n+G],[e-.0996*n-G,i+.0864*n-G]]).stream(E),o=y.translate([e-.12*n,i+.013*n]).clipExtent([[e-.14*n+G,i+0*n+G],[e-.0996*n-G,i+.029*n-G]]).stream(E),s=v.translate([e-.12*n,i-.014*n]).clipExtent([[e-.14*n+G,i-.032*n+G],[e-.0996*n-G,i+0*n-G]]).stream(E),l=b.translate([e-.12*n,i-.044*n]).clipExtent([[e-.14*n+G,i-.052*n+G],[e-.0996*n-G,i-.032*n-G]]).stream(E),u=x.translate([e-.12*n,i-.065*n]).clipExtent([[e-.14*n+G,i-.076*n+G],[e-.0996*n-G,i-.052*n-G]]).stream(E),h=w.translate([e+.117*n,i-.064*n]).clipExtent([[e+.0967*n+G,i-.076*n+G],[e+.1371*n-G,i-.052*n-G]]).stream(E),c=S.translate([e+.116*n,i-.0355*n]).clipExtent([[e+.0967*n+G,i-.052*n+G],[e+.1371*n-G,i-.02*n-G]]).stream(E),g=C.translate([e+.116*n,i-.0048*n]).clipExtent([[e+.0967*n+G,i-.02*n+G],[e+.1371*n-G,i+.012*n-G]]).stream(E),d=k.translate([e+.116*n,i+.022*n]).clipExtent([[e+.0967*n+G,i+.012*n+G],[e+.1371*n-G,i+.033*n-G]]).stream(E),p=M.translate([e+.11*n,i+.045*n]).clipExtent([[e+.0967*n+G,i+.033*n+G],[e+.1371*n-G,i+.06*n-G]]).stream(E),f=A.translate([e+.115*n,i+.075*n]).clipExtent([[e+.0967*n+G,i+.06*n+G],[e+.1371*n-G,i+.0864*n-G]]).stream(E),T()):_.translate()},z.fitExtent=function(t,n){return S6(z,t,n)},z.fitSize=function(t,n){return C6(z,t,n)},z.drawCompositionBorders=function(t){
5737
5733
  /*
5738
5734
  console.log("var ul, ur, ld, ll;");
5739
5735
  var projs = [guyane, martinique, guadeloupe, saintBarthelemy, stPierreMiquelon, mayotte, reunion, nouvelleCaledonie, wallisFutuna, polynesie, polynesie2];
@@ -5754,9 +5750,9 @@ var i,a},z.precision=function(t){return arguments.length?(_.precision(t),m.preci
5754
5750
  console.log("context.lineTo(ll[0], ll[1]);");
5755
5751
  console.log("context.closePath();");
5756
5752
 
5757
- }*/var n=_([-7.938886725111036,43.7219460918835]),e=_([-4.832080896458295,44.12930268549372]),i=_([-4.205299743793263,40.98096346967365]),a=_([-7.071796453126152,40.610037319181444]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([-8.42751373617692,45.32889452553031]),e=_([-5.18599305777107,45.7566442062976]),i=_([-4.832080905154431,44.129302726751426]),a=_([-7.938886737126192,43.72194613263854]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([-9.012656899657046,47.127733821030176]),e=_([-5.6105244772793155,47.579777861410626]),i=_([-5.185993067168585,45.756644248170346]),a=_([-8.427513749141811,45.32889456686326]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([-9.405747558985553,48.26506375557457]),e=_([-5.896175018439575,48.733352850851624]),i=_([-5.610524487556043,47.57977790393761]),a=_([-9.012656913808351,47.127733862971255]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([-9.908436061346974,49.642448789505856]),e=_([-6.262026716233124,50.131426841787174]),i=_([-5.896175029331232,48.73335289377258]),a=_([-9.40574757396393,48.26506379787767]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([11.996907706504462,50.16039028163579]),e=_([15.649907879773343,49.68279246765253]),i=_([15.156712840526632,48.30371557625831]),a=_([11.64122661754411,48.761078240546816]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([11.641226606955788,48.7610781975889]),e=_([15.156712825832164,48.30371553390465]),i=_([14.549932166241172,46.4866532486199]),a=_([11.204443787952183,46.91899233914248]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([11.204443778297161,46.918992296823646]),e=_([14.549932152815039,46.486653206856396]),i=_([13.994409796764009,44.695833444323256]),a=_([10.805306599253848,45.105133870684924]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([10.805306590412085,45.10513382903308]),e=_([13.99440978444733,44.695833403183606]),i=_([13.654633799024392,43.53552468558152]),a=_([10.561516803980956,43.930671459798624]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([10.561516795617383,43.93067141859757]),e=_([13.654633787361952,43.5355246448671]),i=_([12.867691604239901,40.640701985019405]),a=_([9.997809515987688,41.00288343254471]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([10.8,42.4]),e=_([12.8,42.13]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1])},z.getCompositionBorders=function(){var t=z6();return this.drawCompositionBorders(t),t.toString()},z.scale(2700)},geoConicConformalNetherlands:
5753
+ }*/var n=_([-7.938886725111036,43.7219460918835]),e=_([-4.832080896458295,44.12930268549372]),i=_([-4.205299743793263,40.98096346967365]),a=_([-7.071796453126152,40.610037319181444]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([-8.42751373617692,45.32889452553031]),e=_([-5.18599305777107,45.7566442062976]),i=_([-4.832080905154431,44.129302726751426]),a=_([-7.938886737126192,43.72194613263854]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([-9.012656899657046,47.127733821030176]),e=_([-5.6105244772793155,47.579777861410626]),i=_([-5.185993067168585,45.756644248170346]),a=_([-8.427513749141811,45.32889456686326]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([-9.405747558985553,48.26506375557457]),e=_([-5.896175018439575,48.733352850851624]),i=_([-5.610524487556043,47.57977790393761]),a=_([-9.012656913808351,47.127733862971255]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([-9.908436061346974,49.642448789505856]),e=_([-6.262026716233124,50.131426841787174]),i=_([-5.896175029331232,48.73335289377258]),a=_([-9.40574757396393,48.26506379787767]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([11.996907706504462,50.16039028163579]),e=_([15.649907879773343,49.68279246765253]),i=_([15.156712840526632,48.30371557625831]),a=_([11.64122661754411,48.761078240546816]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([11.641226606955788,48.7610781975889]),e=_([15.156712825832164,48.30371553390465]),i=_([14.549932166241172,46.4866532486199]),a=_([11.204443787952183,46.91899233914248]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([11.204443778297161,46.918992296823646]),e=_([14.549932152815039,46.486653206856396]),i=_([13.994409796764009,44.695833444323256]),a=_([10.805306599253848,45.105133870684924]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([10.805306590412085,45.10513382903308]),e=_([13.99440978444733,44.695833403183606]),i=_([13.654633799024392,43.53552468558152]),a=_([10.561516803980956,43.930671459798624]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([10.561516795617383,43.93067141859757]),e=_([13.654633787361952,43.5355246448671]),i=_([12.867691604239901,40.640701985019405]),a=_([9.997809515987688,41.00288343254471]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=_([10.8,42.4]),e=_([12.8,42.13]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1])},z.getCompositionBorders=function(){var t=T6();return this.drawCompositionBorders(t),t.toString()},z.scale(2700)},geoConicConformalNetherlands:
5758
5754
  // A composite projection for the Netherlands, configured by default for 960×500.
5759
- function(){var n,e,a,r,o,i,u=u6().rotate([-5.5,-52.2]).parallels([0,60]),s=r6().center([-68.25,12.2]),l=r6().center([-63.1,17.5]),h={point:function(t,n){i=[t,n]}};function c(t){var[t,n]=t;return i=null,a.point(t,n),i||(r.point(t,n),i)||(o.point(t,n),i)}function g(){return n=e=null,c}return c.invert=function(t){var n=u.scale(),e=u.translate(),i=(t[0]-e[0])/n,e=(t[1]-e[1])/n;return(-.0067<=e&&e<.0015&&-.0232<=i&&i<-.0154?s:-.022<=e&&e<-.014&&-.023<=i&&i<-.014?l:u).invert(t)},c.stream=function(t){return n&&e===t?n:(i=[u.stream(e=t),s.stream(t),l.stream(t)],a=i.length,n={point:function(t,n){for(var e=-1;++e<a;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<a;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<a;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<a;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<a;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<a;)i[t].polygonEnd()}});var i,a},c.precision=function(t){return arguments.length?(u.precision(t),s.precision(t),l.precision(t),g()):u.precision()},c.scale=function(t){return arguments.length?(u.scale(t),s.scale(t),l.scale(t),c.translate(u.translate())):u.scale()},c.translate=function(t){var n,e,i;return arguments.length?(n=u.scale(),e=+t[0],i=+t[1],a=u.translate(t).clipExtent([[e-.0245*n,i-.026*n],[e+.023*n,i+.026*n]]).stream(h),r=s.translate([e-.0186*n,i-.00325*n]).clipExtent([[e-.0232*n+G,i-.0067*n+G],[e-.0154*n-G,i+.0015*n-G]]).stream(h),o=l.translate([e-.0185*n,i-.017*n]).clipExtent([[e-.023*n+G,i-.022*n+G],[e-.014*n-G,i-.014*n-G]]).stream(h),g()):u.translate()},c.fitExtent=function(t,n){return w6(c,t,n)},c.fitSize=function(t,n){return S6(c,t,n)},c.drawCompositionBorders=function(t){
5755
+ function(){var n,e,a,r,o,i,u=h6().rotate([-5.5,-52.2]).parallels([0,60]),s=o6().center([-68.25,12.2]),l=o6().center([-63.1,17.5]),h={point:function(t,n){i=[t,n]}};function c(t){var[t,n]=t;return i=null,a.point(t,n),i||(r.point(t,n),i)||(o.point(t,n),i)}function g(){return n=e=null,c}return c.invert=function(t){var n=u.scale(),e=u.translate(),i=(t[0]-e[0])/n,e=(t[1]-e[1])/n;return(-.0067<=e&&e<.0015&&-.0232<=i&&i<-.0154?s:-.022<=e&&e<-.014&&-.023<=i&&i<-.014?l:u).invert(t)},c.stream=function(t){return n&&e===t?n:(i=[u.stream(e=t),s.stream(t),l.stream(t)],a=i.length,n={point:function(t,n){for(var e=-1;++e<a;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<a;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<a;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<a;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<a;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<a;)i[t].polygonEnd()}});var i,a},c.precision=function(t){return arguments.length?(u.precision(t),s.precision(t),l.precision(t),g()):u.precision()},c.scale=function(t){return arguments.length?(u.scale(t),s.scale(t),l.scale(t),c.translate(u.translate())):u.scale()},c.translate=function(t){var n,e,i;return arguments.length?(n=u.scale(),e=+t[0],i=+t[1],a=u.translate(t).clipExtent([[e-.0245*n,i-.026*n],[e+.023*n,i+.026*n]]).stream(h),r=s.translate([e-.0186*n,i-.00325*n]).clipExtent([[e-.0232*n+G,i-.0067*n+G],[e-.0154*n-G,i+.0015*n-G]]).stream(h),o=l.translate([e-.0185*n,i-.017*n]).clipExtent([[e-.023*n+G,i-.022*n+G],[e-.014*n-G,i-.014*n-G]]).stream(h),g()):u.translate()},c.fitExtent=function(t,n){return S6(c,t,n)},c.fitSize=function(t,n){return C6(c,t,n)},c.drawCompositionBorders=function(t){
5760
5756
  /*
5761
5757
  console.table({
5762
5758
  "Clip extent": ["Bonaire", bonaire.clipExtent()],
@@ -5773,12 +5769,12 @@ function(){var n,e,a,r,o,i,u=u6().rotate([-5.5,-52.2]).parallels([0,60]),s=r6().
5773
5769
  "LD BBOX:": netherlandsMainland.invert([sabaSintEustatius.clipExtent()[1][0], sabaSintEustatius.clipExtent()[1][1]]),
5774
5770
  "LL BBOX:": netherlandsMainland.invert([sabaSintEustatius.clipExtent()[0][0], sabaSintEustatius.clipExtent()[1][1]])
5775
5771
  });
5776
- */var n=u([3.30573,52.5562]),e=u([4.043,52.572]),i=u([4.0646,52.1017]),a=u([3.3382,52.0861]),r=u([3.262,53.439]),o=u([4.1373,53.4571]),s=u([4.1574,52.9946]),l=u([3.2951,52.9768]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),t.moveTo(r[0],r[1]),t.lineTo(o[0],o[1]),t.lineTo(s[0],s[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1]),t.closePath()},c.getCompositionBorders=function(){var t=z6();return this.drawCompositionBorders(t),t.toString()},c.scale(4200)}
5772
+ */var n=u([3.30573,52.5562]),e=u([4.043,52.572]),i=u([4.0646,52.1017]),a=u([3.3382,52.0861]),r=u([3.262,53.439]),o=u([4.1373,53.4571]),s=u([4.1574,52.9946]),l=u([3.2951,52.9768]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),t.moveTo(r[0],r[1]),t.lineTo(o[0],o[1]),t.lineTo(s[0],s[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1]),t.closePath()},c.getCompositionBorders=function(){var t=T6();return this.drawCompositionBorders(t),t.toString()},c.scale(4200)}
5777
5773
  // The projections must have mutually exclusive clip regions on the sphere,
5778
5774
  // as this will avoid emitting interleaving lines and polygons.
5779
5775
  ,geoConicConformalPortugal:
5780
5776
  // A composite projection for Portugal, configured by default for 960×500.
5781
- function(){var n,e,a,r,o,i,u=u6().rotate([10,-39.3]).parallels([0,60]),s=u6().rotate([17,-32.7]).parallels([0,60]),l=u6().rotate([27.8,-38.6]).parallels([0,60]),h={point:function(t,n){i=[t,n]}};
5777
+ function(){var n,e,a,r,o,i,u=h6().rotate([10,-39.3]).parallels([0,60]),s=h6().rotate([17,-32.7]).parallels([0,60]),l=h6().rotate([27.8,-38.6]).parallels([0,60]),h={point:function(t,n){i=[t,n]}};
5782
5778
  /*
5783
5779
  var iberianPeninsuleBbox = [[-11, 46], [4, 34]];
5784
5780
  var madeiraBbox = [[-17.85, 33.6], [-16, 32.02]];
@@ -5871,7 +5867,7 @@ var i,a},c.precision=function(t){return arguments.length?(u.precision(t),s.preci
5871
5867
  ' * k - epsilon, y '+
5872
5868
  (y1<0?'+ ':'- ') + Math.abs(y1.toFixed(4))+
5873
5869
  ' * k - epsilon]])');
5874
- */a=u.translate(t).clipExtent([[e-.0115*n,i-.1138*n],[e+.2105*n,i+.0673*n]]).stream(h),r=s.translate([e-.0265*n,i+.025*n]).clipExtent([[e-.0388*n+G,i+.0093*n+G],[e-.0116*n-G,i+.0368*n-G]]).stream(h),o=l.translate([e-.045*n,i+-.02*n]).clipExtent([[e-.0778*n+G,i-.0413*n+G],[e-.0117*n-G,i+.0091*n-G]]).stream(h),g()):u.translate()},c.fitExtent=function(t,n){return w6(c,t,n)},c.fitSize=function(t,n){return S6(c,t,n)},c.drawCompositionBorders=function(t){
5870
+ */a=u.translate(t).clipExtent([[e-.0115*n,i-.1138*n],[e+.2105*n,i+.0673*n]]).stream(h),r=s.translate([e-.0265*n,i+.025*n]).clipExtent([[e-.0388*n+G,i+.0093*n+G],[e-.0116*n-G,i+.0368*n-G]]).stream(h),o=l.translate([e-.045*n,i+-.02*n]).clipExtent([[e-.0778*n+G,i-.0413*n+G],[e-.0117*n-G,i+.0091*n-G]]).stream(h),g()):u.translate()},c.fitExtent=function(t,n){return S6(c,t,n)},c.fitSize=function(t,n){return C6(c,t,n)},c.drawCompositionBorders=function(t){
5875
5871
  /*
5876
5872
  console.info("CLIP EXTENT MADEIRA: ", madeira.clipExtent());
5877
5873
  console.info("UL BBOX:", iberianPeninsule.invert([madeira.clipExtent()[0][0], madeira.clipExtent()[0][1]]));
@@ -5884,12 +5880,12 @@ var i,a},c.precision=function(t){return arguments.length?(u.precision(t),s.preci
5884
5880
  console.info("UR BBOX:", iberianPeninsule.invert([azores.clipExtent()[1][0], azores.clipExtent()[0][1]]));
5885
5881
  console.info("LD BBOX:", iberianPeninsule.invert([azores.clipExtent()[1][0], azores.clipExtent()[1][1]]));
5886
5882
  console.info("LL BBOX:", iberianPeninsule.invert([azores.clipExtent()[0][0], azores.clipExtent()[1][1]]));
5887
- */var n=u([-12.8351,38.7113]),e=u([-10.8482,38.7633]),i=u([-10.8181,37.2072]),a=u([-12.7345,37.1573]),r=u([-16.0753,41.4436]),o=u([-10.9168,41.6861]),s=u([-10.8557,38.7747]),l=u([-15.6728,38.5505]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),t.moveTo(r[0],r[1]),t.lineTo(o[0],o[1]),t.lineTo(s[0],s[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1]),t.closePath()},c.getCompositionBorders=function(){var t=z6();return this.drawCompositionBorders(t),t.toString()},c.scale(4200)}
5883
+ */var n=u([-12.8351,38.7113]),e=u([-10.8482,38.7633]),i=u([-10.8181,37.2072]),a=u([-12.7345,37.1573]),r=u([-16.0753,41.4436]),o=u([-10.9168,41.6861]),s=u([-10.8557,38.7747]),l=u([-15.6728,38.5505]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),t.moveTo(r[0],r[1]),t.lineTo(o[0],o[1]),t.lineTo(s[0],s[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1]),t.closePath()},c.getCompositionBorders=function(){var t=T6();return this.drawCompositionBorders(t),t.toString()},c.scale(4200)}
5888
5884
  // The projections must have mutually exclusive clip regions on the sphere,
5889
5885
  // as this will avoid emitting interleaving lines and polygons.
5890
5886
  ,geoConicConformalSpain:
5891
5887
  // A composite projection for Spain, configured by default for 960×500.
5892
- function(){var n,e,a,r,i,o=u6().rotate([5,-38.6]).parallels([0,60]),s=u6().rotate([5,-38.6]).parallels([0,60]),l={point:function(t,n){i=[t,n]}};
5888
+ function(){var n,e,a,r,i,o=h6().rotate([5,-38.6]).parallels([0,60]),s=h6().rotate([5,-38.6]).parallels([0,60]),l={point:function(t,n){i=[t,n]}};
5893
5889
  /*
5894
5890
  var iberianPeninsuleBbox = [[-11, 46], [4, 35]];
5895
5891
  var canaryIslandsBbox = [[-19.0, 28.85], [-12.7, 28.1]];
@@ -5914,15 +5910,15 @@ function(){var n,e,a,r,i,o=u6().rotate([5,-38.6]).parallels([0,60]),s=u6().rotat
5914
5910
  y1 = (y - c1[1]) / k;
5915
5911
 
5916
5912
  console.info('Canry Islands: p0: ' + x0 + ', ' + y0 + ' , p1: ' + x1 + ' - ' + y1);
5917
- */a=o.translate(t).clipExtent([[e-.06857*n,i-.1288*n],[e+.13249*n,i+.06*n]]).stream(l),r=s.translate([e+.1*n,i-.094*n]).clipExtent([[e-.1331*n+G,i+.053457*n+G],[e-.0354*n-G,i+.08969*n-G]]).stream(l),h()):o.translate()},u.fitExtent=function(t,n){return w6(u,t,n)},u.fitSize=function(t,n){return S6(u,t,n)},u.drawCompositionBorders=function(t){
5913
+ */a=o.translate(t).clipExtent([[e-.06857*n,i-.1288*n],[e+.13249*n,i+.06*n]]).stream(l),r=s.translate([e+.1*n,i-.094*n]).clipExtent([[e-.1331*n+G,i+.053457*n+G],[e-.0354*n-G,i+.08969*n-G]]).stream(l),h()):o.translate()},u.fitExtent=function(t,n){return S6(u,t,n)},u.fitSize=function(t,n){return C6(u,t,n)},u.drawCompositionBorders=function(t){
5918
5914
  /*
5919
5915
  console.info("CLIP EXTENT: ", canaryIslands.clipExtent());
5920
5916
  console.info("UL BBOX:", iberianPeninsule.invert([canaryIslands.clipExtent()[0][0], canaryIslands.clipExtent()[0][1]]));
5921
5917
  console.info("UR BBOX:", iberianPeninsule.invert([canaryIslands.clipExtent()[1][0], canaryIslands.clipExtent()[0][1]]));
5922
5918
  console.info("LD BBOX:", iberianPeninsule.invert([canaryIslands.clipExtent()[1][0], canaryIslands.clipExtent()[1][1]]));
5923
- */var n=o([-14.034675,34.965007]),e=o([-7.4208899,35.536988]),i=o([-7.3148275,33.54359]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1])},u.getCompositionBorders=function(){var t=z6();return this.drawCompositionBorders(t),t.toString()},u.scale(2700)},geoConicEquidistantJapan:
5919
+ */var n=o([-14.034675,34.965007]),e=o([-7.4208899,35.536988]),i=o([-7.3148275,33.54359]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1])},u.getCompositionBorders=function(){var t=T6();return this.drawCompositionBorders(t),t.toString()},u.scale(2700)},geoConicEquidistantJapan:
5924
5920
  // A composite projection for Portugal, configured by default for 960×500.
5925
- function(){var n,e,a,r,o,i,u=d6().rotate([-136,-22]).parallels([40,34]),s=d6().rotate([-146,-26]).parallels([40,34]),l=d6().rotate([-126,-19]).parallels([40,34]),h={point:function(t,n){i=[t,n]}};
5921
+ function(){var n,e,a,r,o,i,u=f6().rotate([-136,-22]).parallels([40,34]),s=f6().rotate([-146,-26]).parallels([40,34]),l=f6().rotate([-126,-19]).parallels([40,34]),h={point:function(t,n){i=[t,n]}};
5926
5922
  /*
5927
5923
  var mainlandBbox = [[126.0, 41.606], [142.97, 29.97]];
5928
5924
  var hokkaidoBbox = [[138.7, 45.61], [146.2, 41.2]];
@@ -6015,16 +6011,16 @@ var i,a},c.precision=function(t){return arguments.length?(u.precision(t),s.preci
6015
6011
  ' * k - epsilon, y '+
6016
6012
  (y1<0?'+ ':'- ') + Math.abs(y1.toFixed(4))+
6017
6013
  ' * k - epsilon]])');
6018
- */a=u.translate(t).clipExtent([[e-.1352*n,i-.1091*n],[e+.117*n,i+.098*n]]).stream(h),r=s.translate([e-.0425*n,i-.005*n]).clipExtent([[e-.135*n+G,i-.1093*n+G],[e-.0397*n-G,i-.027*n-G]]).stream(h),o=l.translate(t).clipExtent([[e-.0399*n+G,i+.0471*n+G],[e+.051*n-G,i+.1114*n-G]]).stream(h),g()):u.translate()},c.fitExtent=function(t,n){return w6(c,t,n)},c.fitSize=function(t,n){return S6(c,t,n)},c.drawCompositionBorders=function(t){
6014
+ */a=u.translate(t).clipExtent([[e-.1352*n,i-.1091*n],[e+.117*n,i+.098*n]]).stream(h),r=s.translate([e-.0425*n,i-.005*n]).clipExtent([[e-.135*n+G,i-.1093*n+G],[e-.0397*n-G,i-.027*n-G]]).stream(h),o=l.translate(t).clipExtent([[e-.0399*n+G,i+.0471*n+G],[e+.051*n-G,i+.1114*n-G]]).stream(h),g()):u.translate()},c.fitExtent=function(t,n){return S6(c,t,n)},c.fitSize=function(t,n){return C6(c,t,n)},c.drawCompositionBorders=function(t){
6019
6015
  /*
6020
6016
  console.info("CLIP EXTENT hokkaido: ", hokkaido.clipExtent());
6021
6017
  console.info("UL BBOX:", mainland.invert([hokkaido.clipExtent()[0][0], hokkaido.clipExtent()[0][1]]));
6022
6018
  console.info("UR BBOX:", mainland.invert([hokkaido.clipExtent()[1][0], hokkaido.clipExtent()[0][1]]));
6023
6019
  console.info("LD BBOX:", mainland.invert([hokkaido.clipExtent()[1][0], hokkaido.clipExtent()[1][1]]));
6024
6020
  console.info("LL BBOX:", mainland.invert([hokkaido.clipExtent()[0][0], hokkaido.clipExtent()[1][1]]));
6025
- */var n=u([126.01320483689143,41.621090310215585]),e=u([133.04304387025903,42.15087523707186]),i=u([133.3021766080688,37.43975444725098]),a=u([126.87889168628224,36.95488945159779]),r=u([132.9,29.8]),o=u([134,33]),s=u([139.3,33.2]),l=u([139.16,30.5]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),t.moveTo(r[0],r[1]),t.lineTo(o[0],o[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1])},c.getCompositionBorders=function(){var t=z6();return this.drawCompositionBorders(t),t.toString()},c.scale(2200)},geoMercatorEcuador:
6021
+ */var n=u([126.01320483689143,41.621090310215585]),e=u([133.04304387025903,42.15087523707186]),i=u([133.3021766080688,37.43975444725098]),a=u([126.87889168628224,36.95488945159779]),r=u([132.9,29.8]),o=u([134,33]),s=u([139.3,33.2]),l=u([139.16,30.5]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),t.moveTo(r[0],r[1]),t.lineTo(o[0],o[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1])},c.getCompositionBorders=function(){var t=T6();return this.drawCompositionBorders(t),t.toString()},c.scale(2200)},geoMercatorEcuador:
6026
6022
  // A composite projection for Ecuador, configured by default for 960×500.
6027
- function(){var n,e,a,r,i,o=r6().rotate([80,1.5]),s=r6().rotate([90.73,1]),l={point:function(t,n){i=[t,n]}};
6023
+ function(){var n,e,a,r,i,o=o6().rotate([80,1.5]),s=o6().rotate([90.73,1]),l={point:function(t,n){i=[t,n]}};
6028
6024
  /*
6029
6025
  var mainlandBbox = [[-81.5, 2.7], [-70.0, -6.0]];
6030
6026
  var galapagosBbox = [[-92.2, 0.58], [-88.8, -1.8]];
@@ -6081,22 +6077,22 @@ function(){var n,e,a,r,i,o=r6().rotate([80,1.5]),s=r6().rotate([90.73,1]),l={poi
6081
6077
  (x1<0?'+ ':'- ') + Math.abs(x1.toFixed(4))+
6082
6078
  ' * k - epsilon, y '+
6083
6079
  (y1<0?'+ ':'- ') + Math.abs(y1.toFixed(4))+
6084
- ' * k - epsilon]])');*/a=o.translate(t).clipExtent([[e-.0262*n,i-.0734*n],[e+.1741*n,i+.079*n]]).stream(l),r=s.translate([e-.06*n,i-.04*n]).clipExtent([[e-.0857*n+G,i-.0676*n+G],[e-.0263*n-G,i-.026*n-G]]).stream(l),h()):o.translate()},u.fitExtent=function(t,n){return w6(u,t,n)},u.fitSize=function(t,n){return S6(u,t,n)},u.drawCompositionBorders=function(t){
6080
+ ' * k - epsilon]])');*/a=o.translate(t).clipExtent([[e-.0262*n,i-.0734*n],[e+.1741*n,i+.079*n]]).stream(l),r=s.translate([e-.06*n,i-.04*n]).clipExtent([[e-.0857*n+G,i-.0676*n+G],[e-.0263*n-G,i-.026*n-G]]).stream(l),h()):o.translate()},u.fitExtent=function(t,n){return S6(u,t,n)},u.fitSize=function(t,n){return C6(u,t,n)},u.drawCompositionBorders=function(t){
6085
6081
  /*
6086
6082
  console.info("CLIP EXTENT: ", galapagos.clipExtent());
6087
6083
  console.info("UL BBOX:", mainland.invert([galapagos.clipExtent()[0][0], galapagos.clipExtent()[0][1]]));
6088
6084
  console.info("UR BBOX:", mainland.invert([galapagos.clipExtent()[1][0], galapagos.clipExtent()[0][1]]));
6089
6085
  console.info("LD BBOX:", mainland.invert([galapagos.clipExtent()[1][0], galapagos.clipExtent()[1][1]]));
6090
6086
  console.info("LL BBOX:", mainland.invert([galapagos.clipExtent()[0][0], galapagos.clipExtent()[1][1]]));
6091
- */var n=o([-84.9032,2.3757]),e=o([-81.5047,2.3708]),i=o([-81.5063,-.01]),a=o([-84.9086,-.005]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath()},u.getCompositionBorders=function(){var t=z6();return this.drawCompositionBorders(t),t.toString()},u.scale(3500)}
6087
+ */var n=o([-84.9032,2.3757]),e=o([-81.5047,2.3708]),i=o([-81.5063,-.01]),a=o([-84.9086,-.005]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath()},u.getCompositionBorders=function(){var t=T6();return this.drawCompositionBorders(t),t.toString()},u.scale(3500)}
6092
6088
  // The projections must have mutually exclusive clip regions on the sphere,
6093
6089
  // as this will avoid emitting interleaving lines and polygons.
6094
6090
  ,geoMercatorEquatorialGuinea:
6095
6091
  // A composite projection for Equatorial Guinea, configured by default for 960×500.
6096
- function(){var n,e,a,r,o,i,s=r6().rotate([-9.5,-1.5]),l=r6().rotate([-8.6,-3.5]),u=r6().rotate([-5.6,1.45]),h={point:function(t,n){i=[t,n]}};function c(t){var n=t[0],t=t[1];return i=null,a.point(n,t),i||(r.point(n,t),i)||(o.point(n,t),i)}function g(){return n=e=null,c}return c.invert=function(t){var n=s.scale(),e=s.translate(),i=(t[0]-e[0])/n,e=(t[1]-e[1])/n;return(-.02<=e&&e<0&&-.038<=i&&i<-.005?l:0<=e&&e<.02&&-.038<=i&&i<-.005?u:s).invert(t)},c.stream=function(t){return n&&e===t?n:(i=[s.stream(e=t),l.stream(t),u.stream(t)],a=i.length,n={point:function(t,n){for(var e=-1;++e<a;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<a;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<a;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<a;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<a;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<a;)i[t].polygonEnd()}});
6092
+ function(){var n,e,a,r,o,i,s=o6().rotate([-9.5,-1.5]),l=o6().rotate([-8.6,-3.5]),u=o6().rotate([-5.6,1.45]),h={point:function(t,n){i=[t,n]}};function c(t){var n=t[0],t=t[1];return i=null,a.point(n,t),i||(r.point(n,t),i)||(o.point(n,t),i)}function g(){return n=e=null,c}return c.invert=function(t){var n=s.scale(),e=s.translate(),i=(t[0]-e[0])/n,e=(t[1]-e[1])/n;return(-.02<=e&&e<0&&-.038<=i&&i<-.005?l:0<=e&&e<.02&&-.038<=i&&i<-.005?u:s).invert(t)},c.stream=function(t){return n&&e===t?n:(i=[s.stream(e=t),l.stream(t),u.stream(t)],a=i.length,n={point:function(t,n){for(var e=-1;++e<a;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<a;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<a;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<a;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<a;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<a;)i[t].polygonEnd()}});
6097
6093
  // The projections must have mutually exclusive clip regions on the sphere,
6098
6094
  // as this will avoid emitting interleaving lines and polygons.
6099
- var i,a},c.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),u.precision(t),g()):s.precision()},c.scale=function(t){return arguments.length?(s.scale(t),l.scale(1.5*t),u.scale(4*t),c.translate(s.translate())):s.scale()},c.translate=function(t){var n,e,i;return arguments.length?(n=s.scale(),e=+t[0],i=+t[1],a=s.translate(t).clipExtent([[e-.005*n,i-.02*n],[e+.038*n,i+.02*n]]).stream(h),r=l.translate([e-.025*n,i-.01*n]).clipExtent([[e-.038*n+G,i-.02*n+G],[e-.005*n-G,i+0*n-G]]).stream(h),o=u.translate([e-.025*n,i+.01*n]).clipExtent([[e-.038*n+G,i-0*n+G],[e-.005*n-G,i+.02*n-G]]).stream(h),g()):s.translate()},c.fitExtent=function(t,n){return w6(c,t,n)},c.fitSize=function(t,n){return S6(c,t,n)},c.drawCompositionBorders=function(t){
6095
+ var i,a},c.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),u.precision(t),g()):s.precision()},c.scale=function(t){return arguments.length?(s.scale(t),l.scale(1.5*t),u.scale(4*t),c.translate(s.translate())):s.scale()},c.translate=function(t){var n,e,i;return arguments.length?(n=s.scale(),e=+t[0],i=+t[1],a=s.translate(t).clipExtent([[e-.005*n,i-.02*n],[e+.038*n,i+.02*n]]).stream(h),r=l.translate([e-.025*n,i-.01*n]).clipExtent([[e-.038*n+G,i-.02*n+G],[e-.005*n-G,i+0*n-G]]).stream(h),o=u.translate([e-.025*n,i+.01*n]).clipExtent([[e-.038*n+G,i-0*n+G],[e-.005*n-G,i+.02*n-G]]).stream(h),g()):s.translate()},c.fitExtent=function(t,n){return S6(c,t,n)},c.fitSize=function(t,n){return C6(c,t,n)},c.drawCompositionBorders=function(t){
6100
6096
  /*
6101
6097
  console.log("var ul, ur, ld, ll;");
6102
6098
  var projs = [continent, bioko, annobon];
@@ -6117,11 +6113,11 @@ var i,a},c.precision=function(t){return arguments.length?(s.precision(t),l.preci
6117
6113
  console.log("context.lineTo(ll[0], ll[1]);");
6118
6114
  console.log("context.closePath();");
6119
6115
 
6120
- }*/var n=s([9.21327272751682,2.645820439454123]),e=s([11.679126293239872,2.644755519268689]),i=s([11.676845389029227,.35307824637606433]),a=s([9.213572917774014,.35414205204417754]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=s([7.320873711543669,2.64475551449975]),e=s([9.213272722738658,2.645820434679803]),i=s([9.213422896480349,1.4999812505283054]),a=s([7.322014760520787,1.4989168878985566]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=s([7.3220147605302905,1.4989168783492766]),e=s([9.213422896481598,1.499981240979021]),i=s([9.213572912999604,.354142056817247]),a=s([7.323154615739809,.353078251154504]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath()},c.getCompositionBorders=function(){var t=z6();return this.drawCompositionBorders(t),t.toString()},c.scale(12e3)},geoMercatorMalaysia:
6116
+ }*/var n=s([9.21327272751682,2.645820439454123]),e=s([11.679126293239872,2.644755519268689]),i=s([11.676845389029227,.35307824637606433]),a=s([9.213572917774014,.35414205204417754]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=s([7.320873711543669,2.64475551449975]),e=s([9.213272722738658,2.645820434679803]),i=s([9.213422896480349,1.4999812505283054]),a=s([7.322014760520787,1.4989168878985566]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),n=s([7.3220147605302905,1.4989168783492766]),e=s([9.213422896481598,1.499981240979021]),i=s([9.213572912999604,.354142056817247]),a=s([7.323154615739809,.353078251154504]),t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath()},c.getCompositionBorders=function(){var t=T6();return this.drawCompositionBorders(t),t.toString()},c.scale(12e3)},geoMercatorMalaysia:
6121
6117
  // A composite projection for Malaysia, configured by default for 960×500.
6122
- function(){var n,e,a,r,i,o=r6().center([105.25,4]),s=r6().center([118.65,2.86]),l={point:function(t,n){i=[t,n]}};function u(t){var n=t[0],t=t[1];return i=null,a.point(n,t),i||(r.point(n,t),i)}function h(){return n=e=null,u}return u.invert=function(t){var n=o.scale(),e=o.translate(),i=(t[0]-e[0])/n,e=(t[1]-e[1])/n;return(-.0521<=e&&e<.0229&&-.0111<=i&&i<.1?s:o).invert(t)},u.stream=function(t){return n&&e===t?n:(i=[o.stream(e=t),s.stream(t)],a=i.length,n={point:function(t,n){for(var e=-1;++e<a;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<a;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<a;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<a;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<a;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<a;)i[t].polygonEnd()}});var i,a},u.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),h()):o.precision()},u.scale=function(t){return arguments.length?(o.scale(t),s.scale(.615*t),u.translate(o.translate())):o.scale()},u.translate=function(t){var n,e,i;return arguments.length?(n=o.scale(),e=+t[0],i=+t[1],a=o.translate(t).clipExtent([[e-.11*n,i-.0521*n],[e-.0111*n,i+.0521*n]]).stream(l),r=s.translate([e+.09*n,i-0*n]).clipExtent([[e-.0111*n+G,i-.0521*n+G],[e+.1*n-G,i+.024*n-G]]).stream(l),h()):o.translate()},u.fitExtent=function(t,n){return w6(u,t,n)},u.fitSize=function(t,n){return S6(u,t,n)},u.drawCompositionBorders=function(t){var n=o([106.3214,2.0228]),e=o([105.1843,2.3761]),i=o([104.2151,3.3618]),a=o([104.215,4.5651]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1])},u.getCompositionBorders=function(){var t=z6();return this.drawCompositionBorders(t),t.toString()},u.scale(4800)},geoTransverseMercatorChile:
6118
+ function(){var n,e,a,r,i,o=o6().center([105.25,4]),s=o6().center([118.65,2.86]),l={point:function(t,n){i=[t,n]}};function u(t){var n=t[0],t=t[1];return i=null,a.point(n,t),i||(r.point(n,t),i)}function h(){return n=e=null,u}return u.invert=function(t){var n=o.scale(),e=o.translate(),i=(t[0]-e[0])/n,e=(t[1]-e[1])/n;return(-.0521<=e&&e<.0229&&-.0111<=i&&i<.1?s:o).invert(t)},u.stream=function(t){return n&&e===t?n:(i=[o.stream(e=t),s.stream(t)],a=i.length,n={point:function(t,n){for(var e=-1;++e<a;)i[e].point(t,n)},sphere:function(){for(var t=-1;++t<a;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<a;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<a;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<a;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<a;)i[t].polygonEnd()}});var i,a},u.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),h()):o.precision()},u.scale=function(t){return arguments.length?(o.scale(t),s.scale(.615*t),u.translate(o.translate())):o.scale()},u.translate=function(t){var n,e,i;return arguments.length?(n=o.scale(),e=+t[0],i=+t[1],a=o.translate(t).clipExtent([[e-.11*n,i-.0521*n],[e-.0111*n,i+.0521*n]]).stream(l),r=s.translate([e+.09*n,i-0*n]).clipExtent([[e-.0111*n+G,i-.0521*n+G],[e+.1*n-G,i+.024*n-G]]).stream(l),h()):o.translate()},u.fitExtent=function(t,n){return S6(u,t,n)},u.fitSize=function(t,n){return C6(u,t,n)},u.drawCompositionBorders=function(t){var n=o([106.3214,2.0228]),e=o([105.1843,2.3761]),i=o([104.2151,3.3618]),a=o([104.215,4.5651]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1])},u.getCompositionBorders=function(){var t=T6();return this.drawCompositionBorders(t),t.toString()},u.scale(4800)},geoTransverseMercatorChile:
6123
6119
  // A composite projection for Chile, configured by default for 960×500.
6124
- function(){t=o6(p6),l=t.center,u=t.rotate,t.center=function(t){return arguments.length?l([-t[1],t[0]]):[(t=l())[1],-t[0]]},t.rotate=function(t){return arguments.length?u([t[0],t[1],2<t.length?t[2]+90:90]):[(t=u())[0],t[1],t[2]-90]};var n,e,a,r,o,s,i,t,l,u,d=u([0,0,90]).scale(159.155).rotate([72,37]),h=J3(f6).scale(250).clipAngle(142).rotate([72,0]),c=r6().rotate([80,33.5]),g=r6().rotate([110,25]),f={point:function(t,n){i=[t,n]}};
6120
+ function(){t=s6(_6),l=t.center,u=t.rotate,t.center=function(t){return arguments.length?l([-t[1],t[0]]):[(t=l())[1],-t[0]]},t.rotate=function(t){return arguments.length?u([t[0],t[1],2<t.length?t[2]+90:90]):[(t=u())[0],t[1],t[2]-90]};var n,e,a,r,o,s,i,t,l,u,d=u([0,0,90]).scale(159.155).rotate([72,37]),h=Q3(p6).scale(250).clipAngle(142).rotate([72,0]),c=o6().rotate([80,33.5]),g=o6().rotate([110,25]),f={point:function(t,n){i=[t,n]}};
6125
6121
  /*
6126
6122
  var mainlandBbox = [[-75.5, -15.0], [-32, -49.0]];
6127
6123
  var antarcticBbox = [[-91.0, -60.0], [-43.0, -90.0]];
@@ -6243,7 +6239,7 @@ function(){t=o6(p6),l=t.center,u=t.rotate,t.center=function(t){return arguments.
6243
6239
  ' * k - epsilon, y '+
6244
6240
  (y1<0?'+ ':'- ') + Math.abs(y1.toFixed(4))+
6245
6241
  ' * k - epsilon]])');
6246
- */a=d.translate(t).clipExtent([[e-.059*n,i-.3835*n],[e+.4498*n,i+.3375*n]]).stream(f),r=h.translate([e-.087*n,i+.17*n]).clipExtent([[e-.1166*n+G,i+.2582*n+G],[e-.06*n-G,i+.32*n-G]]).stream(f),o=c.translate([e-.092*n,i-0*n]).clipExtent([[e-.114*n+G,i-.013*n+G],[e-.0594*n-G,i+.0133*n-G]]).stream(f),s=g.translate([e-.089*n,i-.0265*n]).clipExtent([[e-.089*n+G,i+.0154*n+G],[e-.0588*n-G,i+.0391*n-G]]).stream(f),_()):d.translate()},p.fitExtent=function(t,n){return w6(p,t,n)},p.fitSize=function(t,n){return S6(p,t,n)},p.drawCompositionBorders=function(t){
6242
+ */a=d.translate(t).clipExtent([[e-.059*n,i-.3835*n],[e+.4498*n,i+.3375*n]]).stream(f),r=h.translate([e-.087*n,i+.17*n]).clipExtent([[e-.1166*n+G,i+.2582*n+G],[e-.06*n-G,i+.32*n-G]]).stream(f),o=c.translate([e-.092*n,i-0*n]).clipExtent([[e-.114*n+G,i-.013*n+G],[e-.0594*n-G,i+.0133*n-G]]).stream(f),s=g.translate([e-.089*n,i-.0265*n]).clipExtent([[e-.089*n+G,i+.0154*n+G],[e-.0588*n-G,i+.0391*n-G]]).stream(f),_()):d.translate()},p.fitExtent=function(t,n){return S6(p,t,n)},p.fitSize=function(t,n){return C6(p,t,n)},p.drawCompositionBorders=function(t){
6247
6243
  /*
6248
6244
  console.info("CLIP EXTENT antarctic: ", antarctic.clipExtent());
6249
6245
  console.info("UL BBOX:", mainland.invert([antarctic.clipExtent()[0][0], antarctic.clipExtent()[0][1]]));
@@ -6262,29 +6258,29 @@ function(){t=o6(p6),l=t.center,u=t.rotate,t.center=function(t){return arguments.
6262
6258
  console.info("UR BBOX:", mainland.invert([pascua.clipExtent()[1][0], pascua.clipExtent()[0][1]]));
6263
6259
  console.info("LD BBOX:", mainland.invert([pascua.clipExtent()[1][0], pascua.clipExtent()[1][1]]));
6264
6260
  console.info("LL BBOX:", mainland.invert([pascua.clipExtent()[0][0], pascua.clipExtent()[1][1]]));
6265
- */var n=d([-82.6999,-51.3043]),e=d([-77.5442,-51.6631]),i=d([-78.0254,-55.186]),a=d([-83.6106,-54.7785]),r=d([-80.0638,-35.984]),o=d([-76.2153,-36.1811]),s=d([-76.2994,-37.6839]),l=d([-80.2231,-37.4757]),u=d([-78.442,-37.706]),h=d([-76.263,-37.8054]),c=d([-76.344,-39.1595]),g=d([-78.5638,-39.0559]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),t.moveTo(r[0],r[1]),t.lineTo(o[0],o[1]),t.lineTo(s[0],s[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1]),t.closePath(),t.moveTo(u[0],u[1]),t.lineTo(h[0],h[1]),t.lineTo(c[0],c[1]),t.lineTo(c[0],c[1]),t.lineTo(g[0],g[1]),t.closePath()},p.getCompositionBorders=function(){var t=z6();return this.drawCompositionBorders(t),t.toString()},p.scale(700)}});function T6(t){return t.k}function B6(t){return[t.x,t.y]}function D6(t){return function(){return t}}function N6(t){return t}function P6(t,n){var d,f,e=n.id,i=n.bbox,a=null==n.properties?{}:n.properties,t=(d=(t=>{var r,o,s,l,u,h;return null==t?N6:(s=t.scale[0],l=t.scale[1],u=t.translate[0],h=t.translate[1],function(t,n){n||(r=o=0);var e=2,i=t.length,a=new Array(i);for(a[0]=(r+=t[0])*s+u,a[1]=(o+=t[1])*l+h;e<i;)a[e]=t[e],++e;return a})})(t.transform),f=t.arcs,function t(n){var e,i=n.type;switch(i){case"GeometryCollection":return{type:i,geometries:n.geometries.map(t)};case"Point":e=r(n.coordinates);break;case"MultiPoint":e=n.coordinates.map(r);break;case"LineString":e=o(n.arcs);break;case"MultiLineString":e=n.arcs.map(o);break;case"Polygon":e=l(n.arcs);break;case"MultiPolygon":e=n.arcs.map(l);break;default:return null}return{type:i,coordinates:e}}(n));function r(t){return d(t)}function o(t){for(var n=[],e=0,i=t.length;e<i;++e){g=c=u=h=l=s=o=r=a=void 0;var a=t[e],r=n;r.length&&r.pop();for(var o=f[a<0?~a:a],s=0,l=o.length;s<l;++s)r.push(d(o[s],s));if(a<0)for(var u,h=r,a=l,c=h.length,g=c-a;g<--c;)u=h[g],h[g++]=h[c],h[c]=u}// This should never happen per the specification.
6261
+ */var n=d([-82.6999,-51.3043]),e=d([-77.5442,-51.6631]),i=d([-78.0254,-55.186]),a=d([-83.6106,-54.7785]),r=d([-80.0638,-35.984]),o=d([-76.2153,-36.1811]),s=d([-76.2994,-37.6839]),l=d([-80.2231,-37.4757]),u=d([-78.442,-37.706]),h=d([-76.263,-37.8054]),c=d([-76.344,-39.1595]),g=d([-78.5638,-39.0559]);t.moveTo(n[0],n[1]),t.lineTo(e[0],e[1]),t.lineTo(i[0],i[1]),t.lineTo(i[0],i[1]),t.lineTo(a[0],a[1]),t.closePath(),t.moveTo(r[0],r[1]),t.lineTo(o[0],o[1]),t.lineTo(s[0],s[1]),t.lineTo(s[0],s[1]),t.lineTo(l[0],l[1]),t.closePath(),t.moveTo(u[0],u[1]),t.lineTo(h[0],h[1]),t.lineTo(c[0],c[1]),t.lineTo(c[0],c[1]),t.lineTo(g[0],g[1]),t.closePath()},p.getCompositionBorders=function(){var t=T6();return this.drawCompositionBorders(t),t.toString()},p.scale(700)}});function B6(t){return t.k}function D6(t){return[t.x,t.y]}function N6(t){return function(){return t}}function P6(t){return t}function L6(t,n){var d,f,e=n.id,i=n.bbox,a=null==n.properties?{}:n.properties,t=(d=(t=>{var r,o,s,l,u,h;return null==t?P6:(s=t.scale[0],l=t.scale[1],u=t.translate[0],h=t.translate[1],function(t,n){n||(r=o=0);var e=2,i=t.length,a=new Array(i);for(a[0]=(r+=t[0])*s+u,a[1]=(o+=t[1])*l+h;e<i;)a[e]=t[e],++e;return a})})(t.transform),f=t.arcs,function t(n){var e,i=n.type;switch(i){case"GeometryCollection":return{type:i,geometries:n.geometries.map(t)};case"Point":e=r(n.coordinates);break;case"MultiPoint":e=n.coordinates.map(r);break;case"LineString":e=o(n.arcs);break;case"MultiLineString":e=n.arcs.map(o);break;case"Polygon":e=l(n.arcs);break;case"MultiPolygon":e=n.arcs.map(l);break;default:return null}return{type:i,coordinates:e}}(n));function r(t){return d(t)}function o(t){for(var n=[],e=0,i=t.length;e<i;++e){g=c=u=h=l=s=o=r=a=void 0;var a=t[e],r=n;r.length&&r.pop();for(var o=f[a<0?~a:a],s=0,l=o.length;s<l;++s)r.push(d(o[s],s));if(a<0)for(var u,h=r,a=l,c=h.length,g=c-a;g<--c;)u=h[g],h[g++]=h[c],h[c]=u}// This should never happen per the specification.
6266
6262
  return n.length<2&&n.push(n[0]),n}function s(t){for(var n=o(t);n.length<4;)n.push(n[0]);// This may happen if an arc has only two points.
6267
- return n}function l(t){return t.map(s)}return null==e&&null==i?{type:"Feature",properties:a,geometry:t}:null==i?{type:"Feature",id:e,properties:a,geometry:t}:{type:"Feature",id:e,bbox:i,properties:a,geometry:t}}var L6=[{matches:["cartodb","cartocdn"],text:"© <a href='http://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors, © <a href='https://carto.com/attribution' target='_blank'>CARTO</a>"},{matches:["opentopomap.org"],text:"© <a href='http://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors"},{matches:["arcgisonline.com"],text:"Powered by <a href='https://developers.arcgis.com/terms/attribution/' target='_blank'>Esri</a>"},{matches:["/watercolor/"],text:"Map tiles by <a href='http://stamen.com' target='_blank'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0' target='_blank'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org' target='_blank'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright' target='_blank'>ODbL</a>."},{matches:["stamen-tiles","stamen.com"],text:"Map tiles by <a href='http://stamen.com' target='_blank'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0' target='_blank'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org' target='_blank'>OpenStreetMap</a>, under <a href='http://creativecommons.org/licenses/by-sa/3.0' target='_blank'>CC BY SA</a>."}];let F6=Object.assign({},Wl,L2,n);
6263
+ return n}function l(t){return t.map(s)}return null==e&&null==i?{type:"Feature",properties:a,geometry:t}:null==i?{type:"Feature",id:e,properties:a,geometry:t}:{type:"Feature",id:e,bbox:i,properties:a,geometry:t}}var F6=[{matches:["cartodb","cartocdn"],text:"© <a href='http://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors, © <a href='https://carto.com/attribution' target='_blank'>CARTO</a>"},{matches:["opentopomap.org"],text:"© <a href='http://www.openstreetmap.org/copyright' target='_blank'>OpenStreetMap</a> contributors"},{matches:["arcgisonline.com"],text:"Powered by <a href='https://developers.arcgis.com/terms/attribution/' target='_blank'>Esri</a>"},{matches:["/watercolor/"],text:"Map tiles by <a href='http://stamen.com' target='_blank'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0' target='_blank'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org' target='_blank'>OpenStreetMap</a>, under <a href='http://www.openstreetmap.org/copyright' target='_blank'>ODbL</a>."},{matches:["stamen-tiles","stamen.com"],text:"Map tiles by <a href='http://stamen.com' target='_blank'>Stamen Design</a>, under <a href='http://creativecommons.org/licenses/by/3.0' target='_blank'>CC BY 3.0</a>. Data by <a href='http://openstreetmap.org' target='_blank'>OpenStreetMap</a>, under <a href='http://creativecommons.org/licenses/by-sa/3.0' target='_blank'>CC BY SA</a>."}];let O6=Object.assign({},Wl,F2,n);
6268
6264
  /**
6269
6265
  * @name findAttribution
6270
6266
  * @param {String} url
6271
6267
  * @private
6272
- */function O6(n){var t=L6.find(t=>t.matches.some(t=>n.includes(t)));return!!t&&t.text}
6268
+ */function R6(n){var t=F6.find(t=>t.matches.some(t=>n.includes(t)));return!!t&&t.text}
6273
6269
  /**
6274
6270
  @name topo2feature
6275
6271
  @desc Converts a specific topojson object key into a feature ready for projection.
6276
6272
  @param {Object} *topo* A valid topojson json object.
6277
6273
  @param {String} [*key*] The topojson object key to be used. If undefined, the first key available will be used.
6278
6274
  @private
6279
- */function R6(t,n){var e,n=n&&t.objects[n]?n:Object.keys(t.objects)[0];return e=t,"GeometryCollection"===(t="string"==typeof(t=n)?e.objects[t]:t).type?{type:"FeatureCollection",features:t.geometries.map(function(t){return P6(e,t)})}:P6(e,t)}class j6 extends r0{
6275
+ */function j6(t,n){var e,n=n&&t.objects[n]?n:Object.keys(t.objects)[0];return e=t,"GeometryCollection"===(t="string"==typeof(t=n)?e.objects[t]:t).type?{type:"FeatureCollection",features:t.geometries.map(function(t){return L6(e,t)})}:L6(e,t)}class I6 extends o0{
6280
6276
  /**
6281
6277
  Renders map tiles based on the current zoom level.
6282
6278
  @private
6283
- */_renderTiles(n=kd(this._container.node()),t=0){let e=[];this._tiles&&(e=this._tileGen.extent(this._zoomBehavior.translateExtent()).scale(this._projection.scale()*(2*Math.PI)*n.k).translate(n.apply(this._projection.translate()))(),this._tileGroup.transition().duration(t).attr("transform",n));var i=this._tileGroup.selectAll("image.d3plus-geomap-tile").data(e,([t,n,e])=>t+`-${n}-`+e);i.exit().transition().duration(t).attr("opacity",0).remove();let a=e.scale/n.k;var r=i.enter().append("image").attr("class","d3plus-geomap-tile");r.attr("opacity",0).transition().duration(t).attr("opacity",1),i.merge(r).attr("width",a).attr("height",a).attr("xlink:href",([t,n,e])=>this._tileUrl.replace("{s}",["a","b","c"][3*Math.random()|0]).replace("{z}",e).replace("{x}",t).replace("{y}",n)).attr("x",([t])=>t*a+e.translate[0]*a-n.x/n.k).attr("y",([,t])=>t*a+e.translate[1]*a-n.y/n.k)}
6279
+ */_renderTiles(n=Ad(this._container.node()),t=0){let e=[];this._tiles&&(e=this._tileGen.extent(this._zoomBehavior.translateExtent()).scale(this._projection.scale()*(2*Math.PI)*n.k).translate(n.apply(this._projection.translate()))(),this._tileGroup.transition().duration(t).attr("transform",n));var i=this._tileGroup.selectAll("image.d3plus-geomap-tile").data(e,([t,n,e])=>t+`-${n}-`+e);i.exit().transition().duration(t).attr("opacity",0).remove();let a=e.scale/n.k;var r=i.enter().append("image").attr("class","d3plus-geomap-tile");r.attr("opacity",0).transition().duration(t).attr("opacity",1),i.merge(r).attr("width",a).attr("height",a).attr("xlink:href",([t,n,e])=>this._tileUrl.replace("{s}",["a","b","c"][3*Math.random()|0]).replace("{z}",e).replace("{x}",t).replace("{y}",n)).attr("x",([t])=>t*a+e.translate[0]*a-n.x/n.k).attr("y",([,t])=>t*a+e.translate[1]*a-n.y/n.k)}
6284
6280
  /**
6285
6281
  Extends the draw behavior of the abstract Viz class.
6286
6282
  @private
6287
- */_draw(t){super._draw(t);var t=this._height-this._margin.top-this._margin.bottom,n=this._width-this._margin.left-this._margin.right,i=(this._container=this._select.selectAll("svg.d3plus-geomap").data([0]),this._container=this._container.enter().append("svg").attr("class","d3plus-geomap").attr("opacity",0).attr("width",n).attr("height",t).attr("x",this._margin.left).attr("y",this._margin.top).style("background-color",this._ocean||"transparent").merge(this._container),this._container.transition(this._transition).attr("opacity",1).attr("width",n).attr("height",t).attr("x",this._margin.left).attr("y",this._margin.top),this._container.selectAll("rect.d3plus-geomap-ocean").data([0]));i.enter().append("rect").attr("class","d3plus-geomap-ocean").merge(i).attr("width",n).attr("height",t).attr("fill",this._ocean||"transparent"),this._tileGroup=this._container.selectAll("g.d3plus-geomap-tileGroup").data([0]),this._tileGroup=this._tileGroup.enter().append("g").attr("class","d3plus-geomap-tileGroup").merge(this._tileGroup),this._zoomGroup=this._container.selectAll("g.d3plus-geomap-zoomGroup").data([0]),this._zoomGroup=this._zoomGroup.enter().append("g").attr("class","d3plus-geomap-zoomGroup").merge(this._zoomGroup);let e=this._zoomGroup.selectAll("g.d3plus-geomap-paths").data([0]);e=e.enter().append("g").attr("class","d3plus-geomap-paths").merge(e);i=this._coordData=this._topojson?R6(this._topojson,this._topojsonKey):{type:"FeatureCollection",features:[]};this._topojsonFilter&&(i.features=i.features.filter(this._topojsonFilter));let s=this._path=F6.geoPath().projection(this._projection);var a=this._filteredData.filter((t,n)=>this._point(t,n)instanceof Array);let r=this._filteredData.filter((t,n)=>!(this._point(t,n)instanceof Array)).reduce((t,n)=>(t[this._id(n)]=n,t),{});var o=i.features.reduce((t,n)=>{var e=this._topojsonId(n);return t.push({__d3plus__:!0,data:r[e],feature:n,id:e}),t},[]);let l=ss["scale"+this._pointSizeScale.charAt(0).toUpperCase()+this._pointSizeScale.slice(1)]().domain(Re(a,(t,n)=>this._pointSize(t,n))).range([this._pointSizeMin,this._pointSizeMax]);if(!this._zoomSet){i=this._fitObject?R6(this._fitObject,this._fitKey):i;if(this._extentBounds={type:"FeatureCollection",features:this._fitFilter?i.features.filter(this._fitFilter):i.features.slice()},this._extentBounds.features=this._extentBounds.features.reduce((t,o)=>{if(o.geometry){let e={type:o.type,id:o.id,geometry:{coordinates:o.geometry.coordinates,type:o.geometry.type}};if("MultiPolygon"===o.geometry.type&&1<o.geometry.coordinates.length){let i=[],a=[],n=(o.geometry.coordinates.forEach(t=>{e.geometry.coordinates=[t],i.push(s.area(e))}),e.geometry.coordinates=[o.geometry.coordinates[i.indexOf(Nt(i))]],s.centroid(e)),r=(o.geometry.coordinates.forEach(t=>{e.geometry.coordinates=[t],a.push(wh(s.centroid(e),n))}),ni(i.reduce((t,n,e)=>(n&&t.push(i[e]/n),t),[]),.9));e.geometry.coordinates=o.geometry.coordinates.filter((t,n)=>{var e=a[n];return 0===e||i[n]/e>=r})}t.push(e)}return t},[]),!this._extentBounds.features.length&&a.length){let e=[[void 0,void 0],[void 0,void 0]];a.forEach((t,n)=>{t=this._projection(this._point(t,n));(void 0===e[0][0]||t[0]<e[0][0])&&(e[0][0]=t[0]),(void 0===e[1][0]||t[0]>e[1][0])&&(e[1][0]=t[0]),(void 0===e[0][1]||t[1]<e[0][1])&&(e[0][1]=t[1]),(void 0===e[1][1]||t[1]>e[1][1])&&(e[1][1]=t[1])}),this._extentBounds={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:e.map(t=>this._projection.invert(t))}}]};i=Nt(a,(t,n)=>l(this._pointSize(t,n)));this._projectionPadding.top+=i,this._projectionPadding.right+=i,this._projectionPadding.bottom+=i,this._projectionPadding.left+=i}this._zoomBehavior.extent([[0,0],[n,t]]).scaleExtent([1,this._zoomMax]).translateExtent([[0,0],[n,t]]),this._zoomSet=!0}this._projection=this._projection.fitExtent(this._extentBounds.features.length?[[this._projectionPadding.left,this._projectionPadding.top],[n-this._projectionPadding.right,t-this._projectionPadding.bottom]]:[[0,0],[n,t]],this._extentBounds.features.length?this._extentBounds:{type:"Sphere"}),this._shapes.push((new oc).data(o).d(t=>s(t.feature)).select(e.node()).x(0).y(0).config(Ft.bind(this)(this._shapeConfig,"shape","Path")).render());let u=this._zoomGroup.selectAll("g.d3plus-geomap-pins").data([0]);u=u.enter().append("g").attr("class","d3plus-geomap-pins").merge(u);var h=(new Qh).config(Ft.bind(this)(this._shapeConfig,"shape","Circle")).data(a).r((t,n)=>l(this._pointSize(t,n))).select(u.node()).sort((t,n)=>this._pointSize(n)-this._pointSize(t)).x((t,n)=>this._projection(this._point(t,n))[0]).y((t,n)=>this._projection(this._point(t,n))[1]),i=Object.keys(this._on),c=i.filter(t=>t.includes(".Circle")),g=i.filter(t=>!t.includes(".")),d=i.filter(t=>t.includes(".shape"));for(let t=0;t<g.length;t++)h.on(g[t],this._on[g[t]]);for(let t=0;t<d.length;t++)h.on(d[t],this._on[d[t]]);for(let t=0;t<c.length;t++)h.on(c[t],this._on[c[t]]);return this._shapes.push(h.render()),this}
6283
+ */_draw(t){super._draw(t);var t=this._height-this._margin.top-this._margin.bottom,n=this._width-this._margin.left-this._margin.right,i=(this._container=this._select.selectAll("svg.d3plus-geomap").data([0]),this._container=this._container.enter().append("svg").attr("class","d3plus-geomap").attr("opacity",0).attr("width",n).attr("height",t).attr("x",this._margin.left).attr("y",this._margin.top).style("background-color",this._ocean||"transparent").merge(this._container),this._container.transition(this._transition).attr("opacity",1).attr("width",n).attr("height",t).attr("x",this._margin.left).attr("y",this._margin.top),this._container.selectAll("rect.d3plus-geomap-ocean").data([0]));i.enter().append("rect").attr("class","d3plus-geomap-ocean").merge(i).attr("width",n).attr("height",t).attr("fill",this._ocean||"transparent"),this._tileGroup=this._container.selectAll("g.d3plus-geomap-tileGroup").data([0]),this._tileGroup=this._tileGroup.enter().append("g").attr("class","d3plus-geomap-tileGroup").merge(this._tileGroup),this._zoomGroup=this._container.selectAll("g.d3plus-geomap-zoomGroup").data([0]),this._zoomGroup=this._zoomGroup.enter().append("g").attr("class","d3plus-geomap-zoomGroup").merge(this._zoomGroup);let e=this._zoomGroup.selectAll("g.d3plus-geomap-paths").data([0]);e=e.enter().append("g").attr("class","d3plus-geomap-paths").merge(e);i=this._coordData=this._topojson?j6(this._topojson,this._topojsonKey):{type:"FeatureCollection",features:[]};this._topojsonFilter&&(i.features=i.features.filter(this._topojsonFilter));let s=this._path=O6.geoPath().projection(this._projection);var a=this._filteredData.filter((t,n)=>this._point(t,n)instanceof Array);let r=this._filteredData.filter((t,n)=>!(this._point(t,n)instanceof Array)).reduce((t,n)=>(t[this._id(n)]=n,t),{});var o=i.features.reduce((t,n)=>{var e=this._topojsonId(n);return t.push({__d3plus__:!0,data:r[e],feature:n,id:e}),t},[]);let l=ss["scale"+this._pointSizeScale.charAt(0).toUpperCase()+this._pointSizeScale.slice(1)]().domain(Re(a,(t,n)=>this._pointSize(t,n))).range([this._pointSizeMin,this._pointSizeMax]);if(!this._zoomSet){i=this._fitObject?j6(this._fitObject,this._fitKey):i;if(this._extentBounds={type:"FeatureCollection",features:this._fitFilter?i.features.filter(this._fitFilter):i.features.slice()},this._extentBounds.features=this._extentBounds.features.reduce((t,o)=>{if(o.geometry){let e={type:o.type,id:o.id,geometry:{coordinates:o.geometry.coordinates,type:o.geometry.type}};if("MultiPolygon"===o.geometry.type&&1<o.geometry.coordinates.length){let i=[],a=[],n=(o.geometry.coordinates.forEach(t=>{e.geometry.coordinates=[t],i.push(s.area(e))}),e.geometry.coordinates=[o.geometry.coordinates[i.indexOf(Nt(i))]],s.centroid(e)),r=(o.geometry.coordinates.forEach(t=>{e.geometry.coordinates=[t],a.push(wh(s.centroid(e),n))}),ni(i.reduce((t,n,e)=>(n&&t.push(i[e]/n),t),[]),.9));e.geometry.coordinates=o.geometry.coordinates.filter((t,n)=>{var e=a[n];return 0===e||i[n]/e>=r})}t.push(e)}return t},[]),!this._extentBounds.features.length&&a.length){let e=[[void 0,void 0],[void 0,void 0]];a.forEach((t,n)=>{t=this._projection(this._point(t,n));(void 0===e[0][0]||t[0]<e[0][0])&&(e[0][0]=t[0]),(void 0===e[1][0]||t[0]>e[1][0])&&(e[1][0]=t[0]),(void 0===e[0][1]||t[1]<e[0][1])&&(e[0][1]=t[1]),(void 0===e[1][1]||t[1]>e[1][1])&&(e[1][1]=t[1])}),this._extentBounds={type:"FeatureCollection",features:[{type:"Feature",geometry:{type:"MultiPoint",coordinates:e.map(t=>this._projection.invert(t))}}]};i=Nt(a,(t,n)=>l(this._pointSize(t,n)));this._projectionPadding.top+=i,this._projectionPadding.right+=i,this._projectionPadding.bottom+=i,this._projectionPadding.left+=i}this._zoomBehavior.extent([[0,0],[n,t]]).scaleExtent([1,this._zoomMax]).translateExtent([[0,0],[n,t]]),this._zoomSet=!0}this._projection=this._projection.fitExtent(this._extentBounds.features.length?[[this._projectionPadding.left,this._projectionPadding.top],[n-this._projectionPadding.right,t-this._projectionPadding.bottom]]:[[0,0],[n,t]],this._extentBounds.features.length?this._extentBounds:{type:"Sphere"}),this._shapes.push((new sc).data(o).d(t=>s(t.feature)).select(e.node()).x(0).y(0).config(Ft.bind(this)(this._shapeConfig,"shape","Path")).render());let u=this._zoomGroup.selectAll("g.d3plus-geomap-pins").data([0]);u=u.enter().append("g").attr("class","d3plus-geomap-pins").merge(u);var h=(new tc).config(Ft.bind(this)(this._shapeConfig,"shape","Circle")).data(a).r((t,n)=>l(this._pointSize(t,n))).select(u.node()).sort((t,n)=>this._pointSize(n)-this._pointSize(t)).x((t,n)=>this._projection(this._point(t,n))[0]).y((t,n)=>this._projection(this._point(t,n))[1]),i=Object.keys(this._on),c=i.filter(t=>t.includes(".Circle")),g=i.filter(t=>!t.includes(".")),d=i.filter(t=>t.includes(".shape"));for(let t=0;t<g.length;t++)h.on(g[t],this._on[g[t]]);for(let t=0;t<d.length;t++)h.on(d[t],this._on[d[t]]);for(let t=0;t<c.length;t++)h.on(c[t],this._on[c[t]]);return this._shapes.push(h.render()),this}
6288
6284
  /**
6289
6285
  @memberof Geomap
6290
6286
  @desc Topojson files sometimes include small geographies that negatively impact how the library determines the default zoom level (for example, a small island or territory far off the coast that is barely visible to the eye). The fitFilter method can be used to remove specific geographies from the logic used to determine the zooming.
@@ -6345,7 +6341,7 @@ return n}function l(t){return t.map(s)}return null==e&&null==i?{type:"Feature",p
6345
6341
  @desc Sets the map projection used when displaying topojson and coordinate points. All of the projections exported from [d3-geo](https://github.com/d3/d3-geo#projections), [d3-geo-projection](https://github.com/d3/d3-geo-projection#api-reference), and [d3-composite-projections](http://geoexamples.com/d3-composite-projections/) are accepted, whether as the string name (ie. "geoMercator") or the generator function itself. Map tiles are only usable when the projection is set to Mercator (which is also the default value).
6346
6342
  @param {Function|String} *projection* = "geoMercator"
6347
6343
  @chainable
6348
- */projection(t){return arguments.length&&"geoMercator"!==t&&this.tiles(!1),arguments.length?(this._projection="string"==typeof t?F6[t]?F6[t]():F6.geoMercator():t,this):this._projection}
6344
+ */projection(t){return arguments.length&&"geoMercator"!==t&&this.tiles(!1),arguments.length?(this._projection="string"==typeof t?O6[t]?O6[t]():O6.geoMercator():t,this):this._projection}
6349
6345
  /**
6350
6346
  @memberof Geomap
6351
6347
  @desc The outer padding between the edge of the visualization and the shapes drawn. The value passed can be either a single number to be used on all sides, or a CSS string pattern (ie. `"20px 0 10px"`).
@@ -6363,13 +6359,13 @@ return n}function l(t){return t.map(s)}return null==e&&null==i?{type:"Feature",p
6363
6359
  @desc Toggles the visibility of the map tiles.
6364
6360
  @param {Boolean} [*value* = true]
6365
6361
  @chainable
6366
- */tiles(t){var n;return arguments.length?(this._tiles=t,n=O6(this._tileUrl),t&&""===this._attribution?this._attribution=n:t||this._attribution!==n||(this._attribution=""),this):this._tiles}
6362
+ */tiles(t){var n;return arguments.length?(this._tiles=t,n=R6(this._tileUrl),t&&""===this._attribution?this._attribution=n:t||this._attribution!==n||(this._attribution=""),this):this._tiles}
6367
6363
  /**
6368
6364
  @memberof Geomap
6369
6365
  @desc By default, d3plus uses the `light_all` style provided by [CARTO](https://carto.com/location-data-services/basemaps/) for it's map tiles. The [tileUrl](https://d3plus.org/docs/#Geomap.tileUrl) method changes the base URL used for fetching the tiles, as long as the string passed contains `{x}`, `{y}`, and `{z}` variables enclosed in curly brackets for the zoom logic to load the correct tiles.
6370
6366
  @param {String} [url="https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"]
6371
6367
  @chainable
6372
- */tileUrl(t){return arguments.length?(this._tileUrl=t,this._tiles&&(this._attribution=O6(t)),this._tileGroup&&this._renderTiles.bind(this)(),this):this._tileUrl}
6368
+ */tileUrl(t){return arguments.length?(this._tileUrl=t,this._tiles&&(this._attribution=R6(t)),this._tileGroup&&this._renderTiles.bind(this)(),this):this._tileUrl}
6373
6369
  /**
6374
6370
  @memberof Geomap
6375
6371
  @desc The topojson to be used for drawing geographical paths. The value passed should either be a valid Topojson *Object* or a *String* representing a filepath or URL to be loaded.
@@ -6409,21 +6405,21 @@ return n}function l(t){return t.map(s)}return null==e&&null==i?{type:"Feature",p
6409
6405
  @memberof Geomap
6410
6406
  @desc Invoked when creating a new class instance, and sets any default parameters.
6411
6407
  @private
6412
- */constructor(){super(),this._fitObject=!1,this._noDataMessage=!1,this._ocean="#d4dadc",this._point=p("point"),this._pointSize=Ot(1),this._pointSizeMax=10,this._pointSizeMin=5,this._pointSizeScale="linear",this._projection=F6.geoMercator(),this._projectionPadding=wi(20),this._shape=Ot("Circle"),this._shapeConfig=Tt(this._shapeConfig,{ariaLabel:(t,n)=>this._drawLabel(t,n)+", "+this._pointSize(t,n),hoverOpacity:1,Path:{ariaLabel:(t,n)=>{var e=this._colorScale?", "+this._colorScale(t,n):"";return this._drawLabel(t,n)+e+"."},fill:(t,n)=>{if(this._colorScale&&!this._coordData.features.includes(t)){var e=this._colorScale(t);if(null!=e){if(this._colorScaleClass._colorScale)return this._colorScaleClass._colorScale(e);{let t=this._colorScaleClass.color();return t=t instanceof Array?t[t.length-1]:t}}}return this._topojsonFill(t,n)},on:{mouseenter:(t,n,e,i)=>this._coordData.features.includes(t)?null:this._on.mouseenter.bind(this)(t,n,e,i),"mousemove.shape":(t,n,e,i)=>this._coordData.features.includes(t)?null:this._on["mousemove.shape"].bind(this)(t,n,e,i),mouseleave:(t,n,e,i)=>this._coordData.features.includes(t)?null:this._on.mouseleave.bind(this)(t,n,e,i)},stroke:(t,n)=>Mn("function"==typeof this._shapeConfig.Path.fill?this._shapeConfig.Path.fill(t,n):this._shapeConfig.Path.fill).darker(),strokeWidth:1}}),this._tiles=!0,this._tileGen=(()=>{let u=0,h=0,c=960,g=500,d=!0,f=!0,p=256,_=T6,m=B6,y=0;function n(){var t=+_.apply(this,arguments),n=m.apply(this,arguments),e=Math.log2(t/p),i=Math.round(Math.max(e+y,0)),e=Math.pow(2,e-i)*p,a=+n[0]-t/2,n=+n[1]-t/2,r=Math.max(d?0:-1/0,Math.floor((u-a)/e)),o=Math.min(d?1<<i:1/0,Math.ceil((c-a)/e)),t=Math.max(f?0:-1/0,Math.floor((h-n)/e)),s=Math.min(f?1<<i:1/0,Math.ceil((g-n)/e)),l=[];for(let n=t;n<s;++n)for(let t=r;t<o;++t)l.push([t,n,i]);return l.translate=[a/e,n/e],l.scale=e,l}return n.size=function(t){return arguments.length?(u=h=0,c=+t[0],g=+t[1],n):[c-u,g-h]},n.extent=function(t){return arguments.length?(u=+t[0][0],h=+t[0][1],c=+t[1][0],g=+t[1][1],n):[[u,h],[c,g]]},n.scale=function(t){return arguments.length?(_="function"==typeof t?t:D6(+t),n):_},n.translate=function(t){return arguments.length?(m="function"==typeof t?t:D6([+t[0],+t[1]]),n):m},n.zoomDelta=function(t){return arguments.length?(y=+t,n):y},n.tileSize=function(t){return arguments.length?(p=+t,n):p},n.clamp=function(t){return arguments.length?(d=f=!!t,n):d&&f},n.clampX=function(t){return arguments.length?(d=!!t,n):d},n.clampY=function(t){return arguments.length?(f=!!t,n):f},n})(),this.tileUrl("https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}@2x.png"),this._topojson=!1,this._topojsonFill=Ot("#f5f5f3"),this._topojsonFilter=t=>!["010"].includes(t.id),this._topojsonId=p("id"),this._zoom=!0,this._zoomSet=!1}}class I6 extends b0{
6408
+ */constructor(){super(),this._fitObject=!1,this._noDataMessage=!1,this._ocean="#d4dadc",this._point=p("point"),this._pointSize=Ot(1),this._pointSizeMax=10,this._pointSizeMin=5,this._pointSizeScale="linear",this._projection=O6.geoMercator(),this._projectionPadding=wi(20),this._shape=Ot("Circle"),this._shapeConfig=Tt(this._shapeConfig,{ariaLabel:(t,n)=>this._drawLabel(t,n)+", "+this._pointSize(t,n),hoverOpacity:1,Path:{ariaLabel:(t,n)=>{var e=this._colorScale?", "+this._colorScale(t,n):"";return this._drawLabel(t,n)+e+"."},fill:(t,n)=>{if(this._colorScale&&!this._coordData.features.includes(t)){var e=this._colorScale(t);if(null!=e){if(this._colorScaleClass._colorScale)return this._colorScaleClass._colorScale(e);{let t=this._colorScaleClass.color();return t=t instanceof Array?t[t.length-1]:t}}}return this._topojsonFill(t,n)},on:{mouseenter:(t,n,e,i)=>this._coordData.features.includes(t)?null:this._on.mouseenter.bind(this)(t,n,e,i),"mousemove.shape":(t,n,e,i)=>this._coordData.features.includes(t)?null:this._on["mousemove.shape"].bind(this)(t,n,e,i),mouseleave:(t,n,e,i)=>this._coordData.features.includes(t)?null:this._on.mouseleave.bind(this)(t,n,e,i)},stroke:(t,n)=>Mn("function"==typeof this._shapeConfig.Path.fill?this._shapeConfig.Path.fill(t,n):this._shapeConfig.Path.fill).darker(),strokeWidth:1}}),this._tiles=!0,this._tileGen=(()=>{let u=0,h=0,c=960,g=500,d=!0,f=!0,p=256,_=B6,m=D6,y=0;function n(){var t=+_.apply(this,arguments),n=m.apply(this,arguments),e=Math.log2(t/p),i=Math.round(Math.max(e+y,0)),e=Math.pow(2,e-i)*p,a=+n[0]-t/2,n=+n[1]-t/2,r=Math.max(d?0:-1/0,Math.floor((u-a)/e)),o=Math.min(d?1<<i:1/0,Math.ceil((c-a)/e)),t=Math.max(f?0:-1/0,Math.floor((h-n)/e)),s=Math.min(f?1<<i:1/0,Math.ceil((g-n)/e)),l=[];for(let n=t;n<s;++n)for(let t=r;t<o;++t)l.push([t,n,i]);return l.translate=[a/e,n/e],l.scale=e,l}return n.size=function(t){return arguments.length?(u=h=0,c=+t[0],g=+t[1],n):[c-u,g-h]},n.extent=function(t){return arguments.length?(u=+t[0][0],h=+t[0][1],c=+t[1][0],g=+t[1][1],n):[[u,h],[c,g]]},n.scale=function(t){return arguments.length?(_="function"==typeof t?t:N6(+t),n):_},n.translate=function(t){return arguments.length?(m="function"==typeof t?t:N6([+t[0],+t[1]]),n):m},n.zoomDelta=function(t){return arguments.length?(y=+t,n):y},n.tileSize=function(t){return arguments.length?(p=+t,n):p},n.clamp=function(t){return arguments.length?(d=f=!!t,n):d&&f},n.clampX=function(t){return arguments.length?(d=!!t,n):d},n.clampY=function(t){return arguments.length?(f=!!t,n):f},n})(),this.tileUrl("https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}@2x.png"),this._topojson=!1,this._topojsonFill=Ot("#f5f5f3"),this._topojsonFilter=t=>!["010"].includes(t.id),this._topojsonId=p("id"),this._zoom=!0,this._zoomSet=!1}}class H6 extends x0{
6413
6409
  /**
6414
6410
  @memberof LinePlot
6415
6411
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Plot.
6416
6412
  @private
6417
- */constructor(){super(),this._discrete="x",this._shape=Ot("Line"),this.x("x")}}
6413
+ */constructor(){super(),this._discrete="x",this._shape=Ot("Line")}}
6418
6414
  /**
6419
6415
  @module matrixData
6420
6416
  @private
6421
- */function H6(){let a=this._filteredData;var t,e,n=(this._rowList||Yu(a.map(this._row))).sort(this._rowSort),i=(this._columnList||Yu(a.map(this._column))).sort(this._columnSort);return n.length&&i.length?(e=i,t=[].concat(...n.map(n=>e.map(t=>[].concat(n,t)))).map(([e,i])=>{var t={__d3plusTooltip__:!0,__d3plus__:!0,column:i,row:e},n=a.findIndex((t,n)=>this._row(t,n)===e&&this._column(t,n)===i);return 0<=n?(t.i=n,t.data=a[n]):t.data={row:e,column:i},t}),{rowValues:n,columnValues:i,shapeData:t}):this}let G6={align:"start",barConfig:{stroke:0},gridSize:0,padding:5,paddingInner:0,paddingOuter:0,scale:"band",tickSize:0};class K6 extends r0{
6417
+ */function G6(){let a=this._filteredData;var t,e,n=(this._rowList||Yu(a.map(this._row))).sort(this._rowSort),i=(this._columnList||Yu(a.map(this._column))).sort(this._columnSort);return n.length&&i.length?(e=i,t=[].concat(...n.map(n=>e.map(t=>[].concat(n,t)))).map(([e,i])=>{var t={__d3plusTooltip__:!0,__d3plus__:!0,column:i,row:e},n=a.findIndex((t,n)=>this._row(t,n)===e&&this._column(t,n)===i);return 0<=n?(t.i=n,t.data=a[n]):t.data={row:e,column:i},t}),{rowValues:n,columnValues:i,shapeData:t}):this}let K6={align:"start",barConfig:{stroke:0},gridSize:0,padding:5,paddingInner:0,paddingOuter:0,scale:"band",tickSize:0};class $6 extends o0{
6422
6418
  /**
6423
6419
  @memberof Matrix
6424
6420
  @desc Extends the draw behavior of the abstract Viz class.
6425
6421
  @private
6426
- */_draw(l){var{rowValues:u,columnValues:h,shapeData:c}=H6.bind(this)(this._filteredData);if(u.length&&h.length){let t=this._height-this._margin.top-this._margin.bottom,e=this._select,i=this._transition,n=this._width-this._margin.left-this._margin.right;var g={opacity:0},d={opacity:1},f=n/h.length<120,p=(t,n)=>Dt("g.d3plus-Matrix-"+t,Object.assign({parent:e,transition:i},n)).node(),_=(this._rowAxis.select(p("row",{enter:g,update:g})).domain(u).height(t-this._margin.top-this._margin.bottom-this._padding.bottom-this._padding.top).maxSize(n/4).width(n).config(this._rowConfig).render(),this._rowAxis.outerBounds().width),m=(this._padding.left+=_,`translate(0, ${this._margin.top})`),g=Object.assign({transform:m},g),g=(this._columnAxis.select(p("column",{enter:g,update:g})).domain(h).range([this._margin.left+this._padding.left,n-this._margin.right+this._padding.right]).height(t).maxSize(t/4).width(n).labelRotation(f).config(this._columnConfig).render(),this._columnAxis.outerBounds().height),f=(this._padding.top+=g,super._draw(l),`translate(${this._margin.left}, ${this._margin.top})`),m=`translate(0, ${this._margin.top})`,l=Object.assign({transform:m},d);this._rowAxis.select(p("row",{update:Object.assign({transform:f},d)})).height(t-this._margin.top-this._margin.bottom-this._padding.bottom).maxSize(_).range([g+this._columnAxis.padding(),void 0]).render(),this._columnAxis.select(p("column",{update:l})).range([this._margin.left+this._padding.left+this._rowAxis.padding(),n-this._margin.right+this._padding.right]).maxSize(g).render();let a=this._rowAxis._getPosition.bind(this._rowAxis),r=this._columnAxis._getPosition.bind(this._columnAxis),o=1<u.length?a(u[1])-a(u[0]):this._rowAxis.height(),s=1<h.length?r(h[1])-r(h[0]):this._columnAxis.width();m=`translate(0, ${this._margin.top})`,f=Ft.bind(this)(this._shapeConfig,"shape","Rect");this._shapes.push((new tc).data(c).select(Dt("g.d3plus-Matrix-cells",{parent:this._select,enter:{transform:m},update:{transform:m}}).node()).config({height:o-this._cellPadding,width:s-this._cellPadding,x:t=>r(t.column)+s/2,y:t=>a(t.row)+o/2}).config(f).render())}return this}
6422
+ */_draw(l){var{rowValues:u,columnValues:h,shapeData:c}=G6.bind(this)(this._filteredData);if(u.length&&h.length){let t=this._height-this._margin.top-this._margin.bottom,e=this._select,i=this._transition,n=this._width-this._margin.left-this._margin.right;var g={opacity:0},d={opacity:1},f=n/h.length<120,p=(t,n)=>Dt("g.d3plus-Matrix-"+t,Object.assign({parent:e,transition:i},n)).node(),_=(this._rowAxis.select(p("row",{enter:g,update:g})).domain(u).height(t-this._margin.top-this._margin.bottom-this._padding.bottom-this._padding.top).maxSize(n/4).width(n).config(this._rowConfig).render(),this._rowAxis.outerBounds().width),m=(this._padding.left+=_,`translate(0, ${this._margin.top})`),g=Object.assign({transform:m},g),g=(this._columnAxis.select(p("column",{enter:g,update:g})).domain(h).range([this._margin.left+this._padding.left,n-this._margin.right+this._padding.right]).height(t).maxSize(t/4).width(n).labelRotation(f).config(this._columnConfig).render(),this._columnAxis.outerBounds().height),f=(this._padding.top+=g,super._draw(l),`translate(${this._margin.left}, ${this._margin.top})`),m=`translate(0, ${this._margin.top})`,l=Object.assign({transform:m},d);this._rowAxis.select(p("row",{update:Object.assign({transform:f},d)})).height(t-this._margin.top-this._margin.bottom-this._padding.bottom).maxSize(_).range([g+this._columnAxis.padding(),void 0]).render(),this._columnAxis.select(p("column",{update:l})).range([this._margin.left+this._padding.left+this._rowAxis.padding(),n-this._margin.right+this._padding.right]).maxSize(g).render();let a=this._rowAxis._getPosition.bind(this._rowAxis),r=this._columnAxis._getPosition.bind(this._columnAxis),o=1<u.length?a(u[1])-a(u[0]):this._rowAxis.height(),s=1<h.length?r(h[1])-r(h[0]):this._columnAxis.width();m=`translate(0, ${this._margin.top})`,f=Ft.bind(this)(this._shapeConfig,"shape","Rect");this._shapes.push((new nc).data(c).select(Dt("g.d3plus-Matrix-cells",{parent:this._select,enter:{transform:m},update:{transform:m}}).node()).config({height:o-this._cellPadding,width:s-this._cellPadding,x:t=>r(t.column)+s/2,y:t=>a(t.row)+o/2}).config(f).render())}return this}
6427
6423
  /**
6428
6424
  @memberof Matrix
6429
6425
  @desc The pixel padding in between each cell.
@@ -6491,7 +6487,7 @@ return n}function l(t){return t.map(s)}return null==e&&null==i?{type:"Feature",p
6491
6487
  @memberof Matrix
6492
6488
  @desc Invoked when creating a new class instance, and sets any default parameters.
6493
6489
  @private
6494
- */constructor(){super(),this._cellPadding=2,this._column=p("column"),this._columnAxis=new fc,this._columnConfig=Tt({orient:"top"},G6),this._columnSort=(t,n)=>(""+t).localeCompare(""+n),this._label=(t,n)=>ji.bind(this)("row",t,n)+" / "+ji.bind(this)("column",t,n);let o=this._on["mousemove.shape"];this._on["mousemove.shape"]=(t,n,e,i)=>{o(t,n,e,i);let a=ji.bind(this)("row",t,n),r=ji.bind(this)("column",t,n);this.hover((t,n)=>ji.bind(this)("row",t,n)===a||ji.bind(this)("column",t,n)===r)},this._row=p("row"),this._rowAxis=new fc,this._rowConfig=Tt({orient:"left"},G6),this._rowSort=(t,n)=>(""+t).localeCompare(""+n)}}function $6(t,n,e,i){if(!isNaN(n)&&!isNaN(e)){// ignore invalid points
6490
+ */constructor(){super(),this._cellPadding=2,this._column=p("column"),this._columnAxis=new pc,this._columnConfig=Tt({orient:"top"},K6),this._columnSort=(t,n)=>(""+t).localeCompare(""+n),this._label=(t,n)=>ji.bind(this)("row",t,n)+" / "+ji.bind(this)("column",t,n);let o=this._on["mousemove.shape"];this._on["mousemove.shape"]=(t,n,e,i)=>{o(t,n,e,i);let a=ji.bind(this)("row",t,n),r=ji.bind(this)("column",t,n);this.hover((t,n)=>ji.bind(this)("row",t,n)===a||ji.bind(this)("column",t,n)===r)},this._row=p("row"),this._rowAxis=new pc,this._rowConfig=Tt({orient:"left"},K6),this._rowSort=(t,n)=>(""+t).localeCompare(""+n)}}function q6(t,n,e,i){if(!isNaN(n)&&!isNaN(e)){// ignore invalid points
6495
6491
  var a,r,o,s,l,u,h,c,g,d=t._root,f={data:i},p=t._x0,_=t._y0,m=t._x1,y=t._y1;
6496
6492
  // If the tree is empty, initialize the root as a leaf.
6497
6493
  if(d){
@@ -6500,9 +6496,9 @@ for(;d.length;)if((u=n>=(r=(p+m)/2))?p=r:m=r,(h=e>=(o=(_+y)/2))?_=o:y=o,!(d=(a=d
6500
6496
  // Is the new point is exactly coincident with the existing point?
6501
6497
  if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),n===s&&e===l)f.next=d,a?a[c]=f:t._root=f;else{
6502
6498
  // Otherwise, split the leaf node until the old and new point are separated.
6503
- for(;a=a?a[c]=new Array(4):t._root=new Array(4),(u=n>=(r=(p+m)/2))?p=r:m=r,(h=e>=(o=(_+y)/2))?_=o:y=o,(c=h<<1|u)==(g=(o<=l)<<1|r<=s););a[g]=d,a[c]=f}}else t._root=f}return t}function q6(t,n,e,i,a){this.node=t,this.x0=n,this.y0=e,this.x1=i,this.y1=a}function U6(t){return t[0]}function W6(t){return t[1]}function Y6(t,n,e){n=new V6(null==n?U6:n,null==e?W6:e,NaN,NaN,NaN,NaN);return null==t?n:n.addAll(t)}function V6(t,n,e,i,a,r){this._x=t,this._y=n,this._x0=e,this._y0=i,this._x1=a,this._y1=r,this._root=void 0}function Z6(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}Rl=Y6.prototype=V6.prototype;function X6(t){return function(){return t}}function J6(t){return 1e-6*(t()-.5)}function Q6(t){return t.index}function tb(t,n){t=t.get(n);if(t)return t;throw new Error("node not found: "+n)}function nb(u){var h,c,r,o,g,d,s=Q6,e=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},i=X6(30),f=1;function n(t){for(var n=0,e=u.length;n<f;++n)for(var i,a,r,o,s,l=0;l<e;++l)i=(a=u[l]).source,r=(a=a.target).x+a.vx-i.x-i.vx||J6(d),o=a.y+a.vy-i.y-i.vy||J6(d),r*=s=((s=Math.sqrt(r*r+o*o))-c[l])/s*t*h[l],o*=s,a.vx-=r*(s=g[l]),a.vy-=o*s,i.vx+=r*(s=1-s),i.vy+=o*s}function a(){if(r){var t,n=r.length,e=u.length,i=new Map(r.map((t,n)=>[s(t,n,r),t])),a=0;for(o=new Array(n);a<e;++a)(t=u[a]).index=a,"object"!=typeof t.source&&(t.source=tb(i,t.source)),"object"!=typeof t.target&&(t.target=tb(i,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(a=0,g=new Array(e);a<e;++a)t=u[a],g[a]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);h=new Array(e),l(),c=new Array(e),p()}}function l(){if(r)for(var t=0,n=u.length;t<n;++t)h[t]=+e(u[t],t,u)}function p(){if(r)for(var t=0,n=u.length;t<n;++t)c[t]=+i(u[t],t,u)}return null==u&&(u=[]),n.initialize=function(t,n){r=t,d=n,a()},n.links=function(t){return arguments.length?(u=t,a(),n):u},n.id=function(t){return arguments.length?(s=t,n):s},n.iterations=function(t){return arguments.length?(f=+t,n):f},n.strength=function(t){return arguments.length?(e="function"==typeof t?t:X6(+t),l(),n):e},n.distance=function(t){return arguments.length?(i="function"==typeof t?t:X6(+t),p(),n):i},n}
6499
+ for(;a=a?a[c]=new Array(4):t._root=new Array(4),(u=n>=(r=(p+m)/2))?p=r:m=r,(h=e>=(o=(_+y)/2))?_=o:y=o,(c=h<<1|u)==(g=(o<=l)<<1|r<=s););a[g]=d,a[c]=f}}else t._root=f}return t}function U6(t,n,e,i,a){this.node=t,this.x0=n,this.y0=e,this.x1=i,this.y1=a}function W6(t){return t[0]}function Y6(t){return t[1]}function V6(t,n,e){n=new Z6(null==n?W6:n,null==e?Y6:e,NaN,NaN,NaN,NaN);return null==t?n:n.addAll(t)}function Z6(t,n,e,i,a,r){this._x=t,this._y=n,this._x0=e,this._y0=i,this._x1=a,this._y1=r,this._root=void 0}function X6(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}Rl=V6.prototype=Z6.prototype;function J6(t){return function(){return t}}function Q6(t){return 1e-6*(t()-.5)}function tb(t){return t.index}function nb(t,n){t=t.get(n);if(t)return t;throw new Error("node not found: "+n)}function eb(u){var h,c,r,o,g,d,s=tb,e=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},i=J6(30),f=1;function n(t){for(var n=0,e=u.length;n<f;++n)for(var i,a,r,o,s,l=0;l<e;++l)i=(a=u[l]).source,r=(a=a.target).x+a.vx-i.x-i.vx||Q6(d),o=a.y+a.vy-i.y-i.vy||Q6(d),r*=s=((s=Math.sqrt(r*r+o*o))-c[l])/s*t*h[l],o*=s,a.vx-=r*(s=g[l]),a.vy-=o*s,i.vx+=r*(s=1-s),i.vy+=o*s}function a(){if(r){var t,n=r.length,e=u.length,i=new Map(r.map((t,n)=>[s(t,n,r),t])),a=0;for(o=new Array(n);a<e;++a)(t=u[a]).index=a,"object"!=typeof t.source&&(t.source=nb(i,t.source)),"object"!=typeof t.target&&(t.target=nb(i,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(a=0,g=new Array(e);a<e;++a)t=u[a],g[a]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);h=new Array(e),l(),c=new Array(e),p()}}function l(){if(r)for(var t=0,n=u.length;t<n;++t)h[t]=+e(u[t],t,u)}function p(){if(r)for(var t=0,n=u.length;t<n;++t)c[t]=+i(u[t],t,u)}return null==u&&(u=[]),n.initialize=function(t,n){r=t,d=n,a()},n.links=function(t){return arguments.length?(u=t,a(),n):u},n.id=function(t){return arguments.length?(s=t,n):s},n.iterations=function(t){return arguments.length?(f=+t,n):f},n.strength=function(t){return arguments.length?(e="function"==typeof t?t:J6(+t),l(),n):e},n.distance=function(t){return arguments.length?(i="function"==typeof t?t:J6(+t),p(),n):i},n}
6504
6500
  // https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use
6505
- Rl.copy=function(){var t,n,e=new V6(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(i)if(i.length)for(t=[{source:i,target:e._root=new Array(4)}];i=t.pop();)for(var a=0;a<4;++a)(n=i.source[a])&&(n.length?t.push({source:n,target:i.target[a]=new Array(4)}):i.target[a]=Z6(n));else e._root=Z6(i);return e},Rl.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return $6(this.cover(n,e),n,e,t)},Rl.addAll=function(t){
6501
+ Rl.copy=function(){var t,n,e=new Z6(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(i)if(i.length)for(t=[{source:i,target:e._root=new Array(4)}];i=t.pop();)for(var a=0;a<4;++a)(n=i.source[a])&&(n.length?t.push({source:n,target:i.target[a]=new Array(4)}):i.target[a]=X6(n));else e._root=X6(i);return e},Rl.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return q6(this.cover(n,e),n,e,t)},Rl.addAll=function(t){
6506
6502
  // Compute the points and their extent.
6507
6503
  for(var n,e,i=t.length,a=new Array(i),r=new Array(i),o=1/0,s=1/0,l=-1/0,u=-1/0,h=0;h<i;++h)isNaN(n=+this._x.call(null,e=t[h]))||isNaN(e=+this._y.call(null,e))||((a[h]=n)<o&&(o=n),l<n&&(l=n),(r[h]=e)<s&&(s=e),u<e&&(u=e));
6508
6504
  // If there were no (valid) points, abort.
@@ -6510,16 +6506,16 @@ if(!(l<o||u<s))
6510
6506
  // Add the new points.
6511
6507
  for(
6512
6508
  // Expand the tree to cover the new points.
6513
- this.cover(o,s).cover(l,u),h=0;h<i;++h)$6(this,a[h],r[h],t[h]);return this},Rl.cover=function(t,n){if(!isNaN(t=+t)&&!isNaN(n=+n)){// ignore invalid points
6509
+ this.cover(o,s).cover(l,u),h=0;h<i;++h)q6(this,a[h],r[h],t[h]);return this},Rl.cover=function(t,n){if(!isNaN(t=+t)&&!isNaN(n=+n)){// ignore invalid points
6514
6510
  var e=this._x0,i=this._y0,a=this._x1,r=this._y1;
6515
6511
  // If the quadtree has no extent, initialize them.
6516
6512
  // Integer extent are necessary so that if we later double the extent,
6517
6513
  // the existing quadrant boundaries don’t change due to floating point error!
6518
- if(isNaN(e))a=(e=Math.floor(t))+1,r=(i=Math.floor(n))+1;else{for(var o,s,l=a-e||1,u=this._root;t<e||a<=t||n<i||r<=n;)switch(s=(n<i)<<1|t<e,(o=new Array(4))[s]=u,u=o,l*=2,s){case 0:a=e+l,r=i+l;break;case 1:e=a-l,r=i+l;break;case 2:a=e+l,i=r-l;break;case 3:e=a-l,i=r-l}this._root&&this._root.length&&(this._root=u)}this._x0=e,this._y0=i,this._x1=a,this._y1=r}return this},Rl.data=function(){var n=[];return this.visit(function(t){if(!t.length)for(;n.push(t.data),t=t.next;);}),n},Rl.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Rl.find=function(t,n,e){var i,a,r,o,s,l,u,h,c=this._x0,g=this._y0,d=this._x1,f=this._y1,p=[],_=this._root;for(_&&p.push(new q6(_,c,g,d,f)),null==e?e=1/0:(c=t-e,g=n-e,d=t+e,f=n+e,e*=e);i=p.pop();)
6514
+ if(isNaN(e))a=(e=Math.floor(t))+1,r=(i=Math.floor(n))+1;else{for(var o,s,l=a-e||1,u=this._root;t<e||a<=t||n<i||r<=n;)switch(s=(n<i)<<1|t<e,(o=new Array(4))[s]=u,u=o,l*=2,s){case 0:a=e+l,r=i+l;break;case 1:e=a-l,r=i+l;break;case 2:a=e+l,i=r-l;break;case 3:e=a-l,i=r-l}this._root&&this._root.length&&(this._root=u)}this._x0=e,this._y0=i,this._x1=a,this._y1=r}return this},Rl.data=function(){var n=[];return this.visit(function(t){if(!t.length)for(;n.push(t.data),t=t.next;);}),n},Rl.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Rl.find=function(t,n,e){var i,a,r,o,s,l,u,h,c=this._x0,g=this._y0,d=this._x1,f=this._y1,p=[],_=this._root;for(_&&p.push(new U6(_,c,g,d,f)),null==e?e=1/0:(c=t-e,g=n-e,d=t+e,f=n+e,e*=e);i=p.pop();)
6519
6515
  // Stop searching if this quadrant can’t contain a closer node.
6520
6516
  !(_=i.node)||(s=i.x0)>d||(l=i.y0)>f||(o=i.x1)<c||(a=i.y1)<g||(
6521
6517
  // Bisect the current quadrant.
6522
- _.length?(p.push(new q6(_[3],r=(s+o)/2,u=(l+a)/2,o,a),new q6(_[2],s,u,r,a),new q6(_[1],r,l,o,u),new q6(_[0],s,l,r,u)),
6518
+ _.length?(p.push(new U6(_[3],r=(s+o)/2,u=(l+a)/2,o,a),new U6(_[2],s,u,r,a),new U6(_[1],r,l,o,u),new U6(_[0],s,l,r,u)),
6523
6519
  // Visit the closest quadrant first.
6524
6520
  (a=(u<=n)<<1|r<=t)&&(i=p[p.length-1],p[p.length-1]=p[p.length-1-a],p[p.length-1-a]=i)):(l=(o=t-+this._x.call(null,_.data))*o+(s=n-+this._y.call(null,_.data))*s)<e&&(c=t-(u=Math.sqrt(e=l)),g=n-u,d=t+u,f=n+u,h=_.data));return h},Rl.remove=function(t){if(!isNaN(r=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){// ignore invalid points
6525
6521
  var n,e,i,a,r,o,s,l,u,h,c,g=this._root,d=this._x0,f=this._y0,p=this._x1,_=this._y1;
@@ -6537,27 +6533,27 @@ n?(
6537
6533
  // Remove this leaf.
6538
6534
  a?n[h]=a:delete n[h],
6539
6535
  // If the parent now contains exactly one leaf, collapse superfluous parents.
6540
- (g=n[0]||n[1]||n[2]||n[3])&&g===(n[3]||n[2]||n[1]||n[0])&&!g.length&&(e?e[c]=g:this._root=g)):this._root=a}}return this},Rl.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},Rl.root=function(){return this._root},Rl.size=function(){var n=0;return this.visit(function(t){if(!t.length)for(;++n,t=t.next;);}),n},Rl.visit=function(t){var n,e,i,a,r,o,s,l=[],u=this._root;for(u&&l.push(new q6(u,this._x0,this._y0,this._x1,this._y1));r=l.pop();)!t(u=r.node,e=r.x0,i=r.y0,a=r.x1,r=r.y1)&&u.length&&(o=(e+a)/2,s=(i+r)/2,(n=u[3])&&l.push(new q6(n,o,s,a,r)),(n=u[2])&&l.push(new q6(n,e,s,o,r)),(n=u[1])&&l.push(new q6(n,o,i,a,s)),n=u[0])&&l.push(new q6(n,e,i,o,s));return this},Rl.visitAfter=function(t){var n,e=[],i=[];for(this._root&&e.push(new q6(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var a,r,o,s,l,u,h,c=n.node;c.length&&(r=n.x0,o=n.y0,u=(r+(s=n.x1))/2,h=(o+(l=n.y1))/2,(a=c[0])&&e.push(new q6(a,r,o,u,h)),(a=c[1])&&e.push(new q6(a,u,o,s,h)),(a=c[2])&&e.push(new q6(a,r,h,u,l)),a=c[3])&&e.push(new q6(a,u,h,s,l)),i.push(n)}for(;n=i.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},Rl.x=function(t){return arguments.length?(this._x=t,this):this._x},Rl.y=function(t){return arguments.length?(this._y=t,this):this._y};let eb=1664525,ib=1013904223,ab=4294967296;function rb(t){return t.x}function ob(t){return t.y}var sb=Math.PI*(3-Math.sqrt(5));function lb(l){var r,o=1,n=.001,s=1-Math.pow(n,1/300),u=0,h=.6,c=new Map,t=Ut(a),e=xt("tick","end"),i=(// 2^32
6541
- ()=>{let t=1;return()=>(t=(eb*t+ib)%ab)/ab})();function a(){g(),e.call("tick",r),o<n&&(t.stop(),e.call("end",r))}function g(t){var n,e,i=l.length;void 0===t&&(t=1);for(var a=0;a<t;++a)for(o+=(u-o)*s,c.forEach(function(t){t(o)}),n=0;n<i;++n)null==(e=l[n]).fx?e.x+=e.vx*=h:(e.x=e.fx,e.vx=0),null==e.fy?e.y+=e.vy*=h:(e.y=e.fy,e.vy=0);return r}function d(){for(var t,n,e,i=0,a=l.length;i<a;++i)(e=l[i]).index=i,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),(isNaN(e.x)||isNaN(e.y))&&(t=10*Math.sqrt(.5+i),n=i*sb,e.x=t*Math.cos(n),e.y=t*Math.sin(n)),(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}function f(t){return t.initialize&&t.initialize(l,i),t}return null==l&&(l=[]),d(),r={tick:g,restart:function(){return t.restart(a),r},stop:function(){return t.stop(),r},nodes:function(t){return arguments.length?(l=t,d(),c.forEach(f),r):l},alpha:function(t){return arguments.length?(o=+t,r):o},alphaMin:function(t){return arguments.length?(n=+t,r):n},alphaDecay:function(t){return arguments.length?(s=+t,r):+s},alphaTarget:function(t){return arguments.length?(u=+t,r):u},velocityDecay:function(t){return arguments.length?(h=1-t,r):1-h},randomSource:function(t){return arguments.length?(i=t,c.forEach(f),r):i},force:function(t,n){return 1<arguments.length?(null==n?c.delete(t):c.set(t,f(n)),r):c.get(t)},find:function(t,n,e){var i,a,r,o=0,s=l.length;for(null==e?e=1/0:e*=e,o=0;o<s;++o)(i=(i=t-(a=l[o]).x)*i+(i=n-a.y)*i)<e&&(r=a,e=i);return r},on:function(t,n){return 1<arguments.length?(e.on(t,n),r):e.on(t)}}}
6536
+ (g=n[0]||n[1]||n[2]||n[3])&&g===(n[3]||n[2]||n[1]||n[0])&&!g.length&&(e?e[c]=g:this._root=g)):this._root=a}}return this},Rl.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},Rl.root=function(){return this._root},Rl.size=function(){var n=0;return this.visit(function(t){if(!t.length)for(;++n,t=t.next;);}),n},Rl.visit=function(t){var n,e,i,a,r,o,s,l=[],u=this._root;for(u&&l.push(new U6(u,this._x0,this._y0,this._x1,this._y1));r=l.pop();)!t(u=r.node,e=r.x0,i=r.y0,a=r.x1,r=r.y1)&&u.length&&(o=(e+a)/2,s=(i+r)/2,(n=u[3])&&l.push(new U6(n,o,s,a,r)),(n=u[2])&&l.push(new U6(n,e,s,o,r)),(n=u[1])&&l.push(new U6(n,o,i,a,s)),n=u[0])&&l.push(new U6(n,e,i,o,s));return this},Rl.visitAfter=function(t){var n,e=[],i=[];for(this._root&&e.push(new U6(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var a,r,o,s,l,u,h,c=n.node;c.length&&(r=n.x0,o=n.y0,u=(r+(s=n.x1))/2,h=(o+(l=n.y1))/2,(a=c[0])&&e.push(new U6(a,r,o,u,h)),(a=c[1])&&e.push(new U6(a,u,o,s,h)),(a=c[2])&&e.push(new U6(a,r,h,u,l)),a=c[3])&&e.push(new U6(a,u,h,s,l)),i.push(n)}for(;n=i.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},Rl.x=function(t){return arguments.length?(this._x=t,this):this._x},Rl.y=function(t){return arguments.length?(this._y=t,this):this._y};let ib=1664525,ab=1013904223,rb=4294967296;function ob(t){return t.x}function sb(t){return t.y}var lb=Math.PI*(3-Math.sqrt(5));function ub(l){var r,o=1,n=.001,s=1-Math.pow(n,1/300),u=0,h=.6,c=new Map,t=Ut(a),e=xt("tick","end"),i=(// 2^32
6537
+ ()=>{let t=1;return()=>(t=(ib*t+ab)%rb)/rb})();function a(){g(),e.call("tick",r),o<n&&(t.stop(),e.call("end",r))}function g(t){var n,e,i=l.length;void 0===t&&(t=1);for(var a=0;a<t;++a)for(o+=(u-o)*s,c.forEach(function(t){t(o)}),n=0;n<i;++n)null==(e=l[n]).fx?e.x+=e.vx*=h:(e.x=e.fx,e.vx=0),null==e.fy?e.y+=e.vy*=h:(e.y=e.fy,e.vy=0);return r}function d(){for(var t,n,e,i=0,a=l.length;i<a;++i)(e=l[i]).index=i,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),(isNaN(e.x)||isNaN(e.y))&&(t=10*Math.sqrt(.5+i),n=i*lb,e.x=t*Math.cos(n),e.y=t*Math.sin(n)),(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}function f(t){return t.initialize&&t.initialize(l,i),t}return null==l&&(l=[]),d(),r={tick:g,restart:function(){return t.restart(a),r},stop:function(){return t.stop(),r},nodes:function(t){return arguments.length?(l=t,d(),c.forEach(f),r):l},alpha:function(t){return arguments.length?(o=+t,r):o},alphaMin:function(t){return arguments.length?(n=+t,r):n},alphaDecay:function(t){return arguments.length?(s=+t,r):+s},alphaTarget:function(t){return arguments.length?(u=+t,r):u},velocityDecay:function(t){return arguments.length?(h=1-t,r):1-h},randomSource:function(t){return arguments.length?(i=t,c.forEach(f),r):i},force:function(t,n){return 1<arguments.length?(null==n?c.delete(t):c.set(t,f(n)),r):c.get(t)},find:function(t,n,e){var i,a,r,o=0,s=l.length;for(null==e?e=1/0:e*=e,o=0;o<s;++o)(i=(i=t-(a=l[o]).x)*i+(i=n-a.y)*i)<e&&(r=a,e=i);return r},on:function(t,n){return 1<arguments.length?(e.on(t,n),r):e.on(t)}}}
6542
6538
  /**
6543
6539
  * Fetches the unique ID for a data point, whether it's defined by data or nodes.
6544
6540
  * @private
6545
- */function ub(t,n){return""+(this._id(t,n)||this._nodeGroupBy[Pt([this._drawDepth,this._nodeGroupBy.length-1])](t,n))}class hb extends r0{
6541
+ */function hb(t,n){return""+(this._id(t,n)||this._nodeGroupBy[Pt([this._drawDepth,this._nodeGroupBy.length-1])](t,n))}class cb extends o0{
6546
6542
  /**
6547
6543
  Extends the draw behavior of the abstract Viz class.
6548
6544
  @private
6549
- */_draw(t){super._draw(t);var t=this._duration,n=this._height-this._margin.top-this._margin.bottom,e=`translate(${this._margin.left}, ${this._margin.top})`,i=this._width-this._margin.left-this._margin.right;let a=this._filteredData.reduce((t,n,e)=>(t[this._id(n,e)]=n,t),{}),r=this._nodes.reduce((t,n,e)=>(t[ub.bind(this)(n,e)]=n,t),{}),o=(r=Array.from(new Set(Object.keys(a).concat(Object.keys(r)))).map((t,n)=>{var e=a[t],i=r[t];return void 0!==i&&{__d3plus__:!0,data:e||i,i:n,id:t,fx:void 0===e||isNaN(this._x(e))?this._x(i):this._x(e),fy:void 0===e||isNaN(this._y(e))?this._y(i):this._y(e),node:i,r:this._size?void 0!==e&&void 0!==this._size(e)?this._size(e):this._size(i):this._sizeMin,shape:void 0!==e&&void 0!==this._shape(e)?this._shape(e):this._shape(i)}}).filter(t=>t),this._nodeLookup=r.reduce((t,n)=>(t[n.id]=n,t),{})),s=r.map(t=>t.node);var l,u,h,c,g,d,f,p,_,m=this._links.map(t=>{var n=typeof t.source;return{size:this._linkSize(t),source:"number"==n?r[s.indexOf(this._nodes[t.source])]:"string"==n?o[t.source]:o[t.source.id],target:"number"==n?r[s.indexOf(this._nodes[t.target])]:"string"==n?o[t.target]:o[t.target.id]}}),y=(this._linkLookup=m.reduce((t,n)=>(t[n.source.id]||(t[n.source.id]=[]),t[n.source.id].push(n.target),t[n.target.id]||(t[n.target.id]=[]),t[n.target.id].push(n.source),t),{}),r.some(t=>void 0===t.fx||void 0===t.fy));if(y){let n=ka().domain(Re(m,t=>t.size)).range([.1,.5]);var y=lb().force("link",nb(m).id(t=>t.id).distance(1).strength(t=>n(t.size)).iterations(4)).force("charge",(d=X6(-30),p=(f=1)/0,_=.81,b.initialize=function(t,n){l=t,h=n,x()},b.strength=function(t){return arguments.length?(d="function"==typeof t?t:X6(+t),x(),b):d},b.distanceMin=function(t){return arguments.length?(f=t*t,b):Math.sqrt(f)},b.distanceMax=function(t){return arguments.length?(p=t*t,b):Math.sqrt(p)},b.theta=function(t){return arguments.length?(_=t*t,b):Math.sqrt(_)},b.strength(-1))).stop(),v=1-Math.pow(.001,.01),v=(y.velocityDecay(0),y.alphaMin(.001),y.alphaDecay(v),y.alphaDecay(0),y.nodes(r),y.tick(100).stop(),r.map(t=>[t.vx,t.vy]));let e=0,i=0,a=0;2===v.length?e=100:2<v.length&&(y=xh((t=>{if((n=t.length)<3)return null;for(var n,e=new Array(n),i=new Array(n),a=0;a<n;++a)e[a]=[+t[a][0],+t[a][1],a];for(e.sort(eh),a=0;a<n;++a)i[a]=[e[a][0],-e[a][1]];var r=ih(e),o=ih(i),s=o[0]===r[0],l=o[o.length-1]===r[r.length-1],u=[];
6545
+ */_draw(t){super._draw(t);var t=this._duration,n=this._height-this._margin.top-this._margin.bottom,e=`translate(${this._margin.left}, ${this._margin.top})`,i=this._width-this._margin.left-this._margin.right;let a=this._filteredData.reduce((t,n,e)=>(t[this._id(n,e)]=n,t),{}),r=this._nodes.reduce((t,n,e)=>(t[hb.bind(this)(n,e)]=n,t),{}),o=(r=Array.from(new Set(Object.keys(a).concat(Object.keys(r)))).map((t,n)=>{var e=a[t],i=r[t];return void 0!==i&&{__d3plus__:!0,data:e||i,i:n,id:t,fx:void 0===e||isNaN(this._x(e))?this._x(i):this._x(e),fy:void 0===e||isNaN(this._y(e))?this._y(i):this._y(e),node:i,r:this._size?void 0!==e&&void 0!==this._size(e)?this._size(e):this._size(i):this._sizeMin,shape:void 0!==e&&void 0!==this._shape(e)?this._shape(e):this._shape(i)}}).filter(t=>t),this._nodeLookup=r.reduce((t,n)=>(t[n.id]=n,t),{})),s=r.map(t=>t.node);var l,u,h,c,g,d,f,p,_,m=this._links.map(t=>{var n=typeof t.source;return{size:this._linkSize(t),source:"number"==n?r[s.indexOf(this._nodes[t.source])]:"string"==n?o[t.source]:o[t.source.id],target:"number"==n?r[s.indexOf(this._nodes[t.target])]:"string"==n?o[t.target]:o[t.target.id]}}),y=(this._linkLookup=m.reduce((t,n)=>(t[n.source.id]||(t[n.source.id]=[]),t[n.source.id].push(n.target),t[n.target.id]||(t[n.target.id]=[]),t[n.target.id].push(n.source),t),{}),r.some(t=>void 0===t.fx||void 0===t.fy));if(y){let n=ka().domain(Re(m,t=>t.size)).range([.1,.5]);var y=ub().force("link",eb(m).id(t=>t.id).distance(1).strength(t=>n(t.size)).iterations(4)).force("charge",(d=J6(-30),p=(f=1)/0,_=.81,b.initialize=function(t,n){l=t,h=n,x()},b.strength=function(t){return arguments.length?(d="function"==typeof t?t:J6(+t),x(),b):d},b.distanceMin=function(t){return arguments.length?(f=t*t,b):Math.sqrt(f)},b.distanceMax=function(t){return arguments.length?(p=t*t,b):Math.sqrt(p)},b.theta=function(t){return arguments.length?(_=t*t,b):Math.sqrt(_)},b.strength(-1))).stop(),v=1-Math.pow(.001,.01),v=(y.velocityDecay(0),y.alphaMin(.001),y.alphaDecay(v),y.alphaDecay(0),y.nodes(r),y.tick(100).stop(),r.map(t=>[t.vx,t.vy]));let e=0,i=0,a=0;2===v.length?e=100:2<v.length&&(y=xh((t=>{if((n=t.length)<3)return null;for(var n,e=new Array(n),i=new Array(n),a=0;a<n;++a)e[a]=[+t[a][0],+t[a][1],a];for(e.sort(eh),a=0;a<n;++a)i[a]=[e[a][0],-e[a][1]];var r=ih(e),o=ih(i),s=o[0]===r[0],l=o[o.length-1]===r[r.length-1],u=[];
6550
6546
  // Construct the hull polygon, removing possible duplicate endpoints.
6551
6547
  // Add upper hull in right-to-l order.
6552
6548
  // Then add lower hull in left-to-right order.
6553
- for(a=r.length-1;0<=a;--a)u.push(t[e[r[a]][2]]);for(a=+s;a<o.length-l;++a)u.push(t[e[o[a]][2]]);return u})(v),{verbose:!0}),e=y.angle,i=y.cx,a=y.cy),r.forEach(t=>{var n=fh([t.vx,t.vy],Math.PI/180*e*-1,[i,a]);t.fx=n[0],t.fy=n[1]})}function b(t){var n,e=l.length,i=Y6(l,rb,ob).visitAfter(w);for(c=t,n=0;n<e;++n)u=l[n],i.visit(S)}function x(){if(l){var t,n,e=l.length;for(g=new Array(e),t=0;t<e;++t)n=l[t],g[n.index]=+d(n,t,l)}}function w(t){var n,e,i,a,r,o=0,s=0;
6549
+ for(a=r.length-1;0<=a;--a)u.push(t[e[r[a]][2]]);for(a=+s;a<o.length-l;++a)u.push(t[e[o[a]][2]]);return u})(v),{verbose:!0}),e=y.angle,i=y.cx,a=y.cy),r.forEach(t=>{var n=fh([t.vx,t.vy],Math.PI/180*e*-1,[i,a]);t.fx=n[0],t.fy=n[1]})}function b(t){var n,e=l.length,i=V6(l,ob,sb).visitAfter(w);for(c=t,n=0;n<e;++n)u=l[n],i.visit(S)}function x(){if(l){var t,n,e=l.length;for(g=new Array(e),t=0;t<e;++t)n=l[t],g[n.index]=+d(n,t,l)}}function w(t){var n,e,i,a,r,o=0,s=0;
6554
6550
  // For internal nodes, accumulate forces from child quadrants.
6555
6551
  if(t.length){for(i=a=r=0;r<4;++r)(n=t[r])&&(e=Math.abs(n.value))&&(o+=n.value,s+=e,i+=e*n.x,a+=e*n.y);t.x=i/s,t.y=a/s}else for((n=t).x=n.data.x,n.y=n.data.y;o+=g[n.data.index],n=n.next;);t.value=o}function S(t,n,e,i){if(!t.value)return!0;var a=t.x-u.x,r=t.y-u.y,o=i-n,s=a*a+r*r;
6556
6552
  // Apply the Barnes-Hut approximation if possible.
6557
6553
  // Limit forces for very close nodes; randomize direction if coincident.
6558
- if(o*o/_<s)return s<p&&(0===a&&(s+=(a=J6(h))*a),0===r&&(s+=(r=J6(h))*r),s<f&&(s=Math.sqrt(f*s)),u.vx+=a*t.value*c/s,u.vy+=r*t.value*c/s),!0;
6554
+ if(o*o/_<s)return s<p&&(0===a&&(s+=(a=Q6(h))*a),0===r&&(s+=(r=Q6(h))*r),s<f&&(s=Math.sqrt(f*s)),u.vx+=a*t.value*c/s,u.vy+=r*t.value*c/s),!0;
6559
6555
  // Limit forces for very close nodes; randomize direction if coincident.
6560
- if(!(t.length||p<=s))for((t.data!==u||t.next)&&(0===a&&(s+=(a=J6(h))*a),0===r&&(s+=(r=J6(h))*r),s<f)&&(s=Math.sqrt(f*s));t.data!==u&&(o=g[t.data.index]*c/s,u.vx+=a*o,u.vy+=r*o),t=t.next;);}v=Re(r.map(t=>t.fx)),y=Re(r.map(t=>t.fy));let C=ka().domain(v).range([0,i]),k=ka().domain(y).range([0,n]);var v=(v[1]-v[0])/(y[1]-y[0])||1,y=i/n,A=(y<v?(A=n*y/v,k.range([(n-A)/2,n-(n-A)/2])):(A=i*v/y,C.range([(i-A)/2,i-(i-A)/2])),r.forEach(t=>{t.x=C(t.fx),t.y=k(t.fy)}),Re(r.map(t=>t.r))),M=this._sizeMax||Nt([1,Pt(ii(r.map(n=>r.map(t=>n===t?null:wh([n.x,n.y],[t.x,t.y])))))/2]);let E=ss["scale"+this._sizeScale.charAt(0).toUpperCase()+this._sizeScale.slice(1)]().domain(A).range([A[0]===A[1]?M:Pt([M/2,this._sizeMin]),M]),z=C.domain(),T=k.domain();var B=z[1]-z[0],D=T[1]-T[0],N=(r.forEach(t=>{var n=E(t.r);z[0]>C.invert(t.x-n)&&(z[0]=C.invert(t.x-n)),z[1]<C.invert(t.x+n)&&(z[1]=C.invert(t.x+n)),T[0]>k.invert(t.y-n)&&(T[0]=k.invert(t.y-n)),T[1]<k.invert(t.y+n)&&(T[1]=k.invert(t.y+n))}),z[1]-z[0]);M*=Pt([B/N,D/(T[1]-T[0])]),E.range([A[0]===A[1]?M:Pt([M/2,this._sizeMin]),M]),C.domain(z),k.domain(T);let P=(y<v?i:n)/2;r.forEach(t=>{t.x=C(t.fx),t.fx=t.x,t.y=k(t.fy),t.fy=t.y,t.r=E(t.r)||P,t.width=2*t.r,t.height=2*t.r}),this._container=this._select.selectAll("svg.d3plus-network").data([0]),this._container=this._container.enter().append("svg").attr("class","d3plus-network").attr("opacity",0).attr("width",i).attr("height",n).attr("x",this._margin.left).attr("y",this._margin.top).style("background-color","transparent").merge(this._container),this._container.transition().duration(t).attr("opacity",1).attr("width",i).attr("height",n).attr("x",this._margin.left).attr("y",this._margin.top);B=this._container.selectAll("rect.d3plus-network-hitArea").data([0]),B.enter().append("rect").attr("class","d3plus-network-hitArea").merge(B).attr("width",i).attr("height",n).attr("fill","transparent").on("click",()=>{this._focus&&(this.active(!1),this._focus=void 0,this._zoomToBounds(null))}),this._zoomGroup=this._container.selectAll("g.d3plus-network-zoomGroup").data([0]),N=this._zoomGroup=this._zoomGroup.enter().append("g").attr("class","d3plus-network-zoomGroup").merge(this._zoomGroup),D=Re(m,t=>t.size);if(D[0]!==D[1]){let n=ss["scale"+this._linkSizeScale.charAt(0).toUpperCase()+this._linkSizeScale.slice(1)]().domain(D).range([this._linkSizeMin,E.range()[0]]);m.forEach(t=>{t.size=n(t.size)})}A=Ft.bind(this)(this._shapeConfig,"edge","Path");delete A.on,this._shapes.push((new oc).config(A).strokeWidth(t=>t.size).activeStyle({"stroke-width":t=>t.size}).d(t=>`M${t.source.x},${t.source.y} ${t.target.x},`+t.target.y).data(m).select(Dt("g.d3plus-network-links",{parent:N,duration:t,enter:{transform:e},update:{transform:e}}).node()).render());let L={label:t=>!!(r.length<=this._dataCutoff||this._hover&&this._hover(t)||this._active&&this._active(t))&&this._drawLabel(t.data||t.node,t.i),select:Dt("g.d3plus-network-nodes",{parent:N,duration:t,enter:{transform:e},update:{transform:e}}).node()};return Ki().key(t=>t.shape).entries(r).forEach(t=>{this._shapes.push((new sc[t.key]).config(Ft.bind(this)(this._shapeConfig,"shape",t.key)).config(L).config(L[t.key]||{}).data(t.values).render())}),this}
6556
+ if(!(t.length||p<=s))for((t.data!==u||t.next)&&(0===a&&(s+=(a=Q6(h))*a),0===r&&(s+=(r=Q6(h))*r),s<f)&&(s=Math.sqrt(f*s));t.data!==u&&(o=g[t.data.index]*c/s,u.vx+=a*o,u.vy+=r*o),t=t.next;);}v=Re(r.map(t=>t.fx)),y=Re(r.map(t=>t.fy));let C=ka().domain(v).range([0,i]),k=ka().domain(y).range([0,n]);var v=(v[1]-v[0])/(y[1]-y[0])||1,y=i/n,A=(y<v?(A=n*y/v,k.range([(n-A)/2,n-(n-A)/2])):(A=i*v/y,C.range([(i-A)/2,i-(i-A)/2])),r.forEach(t=>{t.x=C(t.fx),t.y=k(t.fy)}),Re(r.map(t=>t.r))),M=this._sizeMax||Nt([1,Pt(ii(r.map(n=>r.map(t=>n===t?null:wh([n.x,n.y],[t.x,t.y])))))/2]);let E=ss["scale"+this._sizeScale.charAt(0).toUpperCase()+this._sizeScale.slice(1)]().domain(A).range([A[0]===A[1]?M:Pt([M/2,this._sizeMin]),M]),z=C.domain(),T=k.domain();var B=z[1]-z[0],D=T[1]-T[0],N=(r.forEach(t=>{var n=E(t.r);z[0]>C.invert(t.x-n)&&(z[0]=C.invert(t.x-n)),z[1]<C.invert(t.x+n)&&(z[1]=C.invert(t.x+n)),T[0]>k.invert(t.y-n)&&(T[0]=k.invert(t.y-n)),T[1]<k.invert(t.y+n)&&(T[1]=k.invert(t.y+n))}),z[1]-z[0]);M*=Pt([B/N,D/(T[1]-T[0])]),E.range([A[0]===A[1]?M:Pt([M/2,this._sizeMin]),M]),C.domain(z),k.domain(T);let P=(y<v?i:n)/2;r.forEach(t=>{t.x=C(t.fx),t.fx=t.x,t.y=k(t.fy),t.fy=t.y,t.r=E(t.r)||P,t.width=2*t.r,t.height=2*t.r}),this._container=this._select.selectAll("svg.d3plus-network").data([0]),this._container=this._container.enter().append("svg").attr("class","d3plus-network").attr("opacity",0).attr("width",i).attr("height",n).attr("x",this._margin.left).attr("y",this._margin.top).style("background-color","transparent").merge(this._container),this._container.transition().duration(t).attr("opacity",1).attr("width",i).attr("height",n).attr("x",this._margin.left).attr("y",this._margin.top);B=this._container.selectAll("rect.d3plus-network-hitArea").data([0]),B.enter().append("rect").attr("class","d3plus-network-hitArea").merge(B).attr("width",i).attr("height",n).attr("fill","transparent").on("click",()=>{this._focus&&(this.active(!1),this._focus=void 0,this._zoomToBounds(null))}),this._zoomGroup=this._container.selectAll("g.d3plus-network-zoomGroup").data([0]),N=this._zoomGroup=this._zoomGroup.enter().append("g").attr("class","d3plus-network-zoomGroup").merge(this._zoomGroup),D=Re(m,t=>t.size);if(D[0]!==D[1]){let n=ss["scale"+this._linkSizeScale.charAt(0).toUpperCase()+this._linkSizeScale.slice(1)]().domain(D).range([this._linkSizeMin,E.range()[0]]);m.forEach(t=>{t.size=n(t.size)})}A=Ft.bind(this)(this._shapeConfig,"edge","Path");delete A.on,this._shapes.push((new sc).config(A).strokeWidth(t=>t.size).activeStyle({"stroke-width":t=>t.size}).d(t=>`M${t.source.x},${t.source.y} ${t.target.x},`+t.target.y).data(m).select(Dt("g.d3plus-network-links",{parent:N,duration:t,enter:{transform:e},update:{transform:e}}).node()).render());let L={label:t=>!!(r.length<=this._dataCutoff||this._hover&&this._hover(t)||this._active&&this._active(t))&&this._drawLabel(t.data||t.node,t.i),select:Dt("g.d3plus-network-nodes",{parent:N,duration:t,enter:{transform:e},update:{transform:e}}).node()};return Ki().key(t=>t.shape).entries(r).forEach(t=>{this._shapes.push((new lc[t.key]).config(Ft.bind(this)(this._shapeConfig,"shape",t.key)).config(L).config(L[t.key]||{}).data(t.values).render())}),this}
6561
6557
  /**
6562
6558
  @memberof Network
6563
6559
  @desc If *value* is specified, sets the hover method to the specified function and returns the current class instance.
@@ -6649,38 +6645,38 @@ if(!(t.length||p<=s))for((t.data!==u||t.next)&&(0===a&&(s+=(a=J6(h))*a),0===r&&(
6649
6645
  @memberof Network
6650
6646
  @desc Invoked when creating a new class instance, and sets any default parameters.
6651
6647
  @private
6652
- */constructor(){super(),this._links=[],this._linkSize=Ot(1),this._linkSizeMin=1,this._linkSizeScale="sqrt",this._noDataMessage=!1,this._nodeGroupBy=[p("id")],this._nodes=[],this._on["click.shape"]=(t,o,n,e)=>{if(this._tooltipClass.data([]).render(),this._hover&&this._drawDepth>=this._groupBy.length-1){let r=ub.bind(this)(t,o);if(this._focus&&this._focus===r)this.active(!1),this._on.mouseenter.bind(this)(t,o,n,e),this._focus=void 0,this._zoomToBounds(null);else{this.hover(!1);t=this._linkLookup[r],o=this._nodeLookup[r];let e=[r],n=[o.x-o.r,o.x+o.r],i=[o.y-o.r,o.y+o.r],a=(t.forEach(t=>{e.push(t.id),t.x-t.r<n[0]&&(n[0]=t.x-t.r),t.x+t.r>n[1]&&(n[1]=t.x+t.r),t.y-t.r<i[0]&&(i[0]=t.y-t.r),t.y+t.r>i[1]&&(i[1]=t.y+t.r)}),this.active((t,n)=>t.source&&t.target?t.source.id===r||t.target.id===r:e.includes(ub.bind(this)(t,n))),this._focus=r,kd(this._container.node()));n=n.map(t=>t*a.k+a.x),i=i.map(t=>t*a.k+a.y),this._zoomToBounds([[n[0],i[0]],[n[1],i[1]]])}}},this._on["click.legend"]=(t,n,e,i)=>{var r=this._id(t),o=(o=this._ids(t))[o.length-1];if(this._hover&&this._drawDepth>=this._groupBy.length-1){if(this._focus&&this._focus===r)this.active(!1),this._focus=void 0,this._zoomToBounds(null);else{this.hover(!1);var s=r.map(t=>this._nodeLookup[t]);let e=[""+o],n=[s[0].x-s[0].r,s[0].x+s[0].r],i=[s[0].y-s[0].r,s[0].y+s[0].r],a=(s.forEach(t=>{e.push(t.id),t.x-t.r<n[0]&&(n[0]=t.x-t.r),t.x+t.r>n[1]&&(n[1]=t.x+t.r),t.y-t.r<i[0]&&(i[0]=t.y-t.r),t.y+t.r>i[1]&&(i[1]=t.y+t.r)}),this.active((t,n)=>t.source&&t.target?e.includes(t.source.id)&&e.includes(t.target.id):(t=this._ids(t,n),e.includes(""+t[t.length-1]))),this._focus=r,kd(this._container.node()));n=n.map(t=>t*a.k+a.x),i=i.map(t=>t*a.k+a.y),this._zoomToBounds([[n[0],i[0]],[n[1],i[1]]])}this._on.mouseenter.bind(this)(t,n,e,i),this._on["mousemove.legend"].bind(this)(t,n,e,i)}},this._on.mouseenter=()=>{},this._on["mouseleave.shape"]=()=>{this.hover(!1)};let h=this._on["mousemove.shape"];this._on["mousemove.shape"]=(t,n,e,i)=>{h(t,n,e,i);let a=ub.bind(this)(t,n),r=this._linkLookup[a]||[],o=this._nodeLookup[a],s=[a],l=[o.x-o.r,o.x+o.r],u=[o.y-o.r,o.y+o.r];r.forEach(t=>{s.push(t.id),t.x-t.r<l[0]&&(l[0]=t.x-t.r),t.x+t.r>l[1]&&(l[1]=t.x+t.r),t.y-t.r<u[0]&&(u[0]=t.y-t.r),t.y+t.r>u[1]&&(u[1]=t.y+t.r)}),this.hover((t,n)=>t.source&&t.target?t.source.id===a||t.target.id===a:s.includes(""+this._ids(t,n)[this._drawDepth]))},this._sizeMin=5,this._sizeScale="sqrt",this._shape=Ot("Circle"),this._shapeConfig=Tt(this._shapeConfig,{ariaLabel:(t,n)=>{var e=this._size?", "+this._size(t,n):"";return this._drawLabel(t,n)+e+"."},labelConfig:{duration:0,fontMin:1,fontResize:!0,labelPadding:0,textAnchor:"middle",verticalAlign:"middle"},Path:{fill:"none",label:!1,stroke:"#eee"}}),this._x=p("x"),this._y=p("y"),this._zoom=!0}}function cb(t){var n=0,e=t.children,i=e&&e.length;if(i)for(;0<=--i;)n+=e[i].value;else n=1;t.value=n}function gb(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=fb)):void 0===n&&(n=db);for(var e,i,a,r,o,t=new mb(t),s=[t];e=s.pop();)if((a=n(e.data))&&(o=(a=Array.from(a)).length))for(e.children=a,r=o-1;0<=r;--r)s.push(i=a[r]=new mb(a[r])),i.parent=e,i.depth=e.depth+1;return t.eachBefore(_b)}function db(t){return t.children}function fb(t){return Array.isArray(t)?t[1]:null}function pb(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function _b(t){for(var n=0;t.height=n,(t=t.parent)&&t.height<++n;);}function mb(t){this.data=t,this.depth=this.height=0,this.parent=null}function yb(t){if("function"!=typeof t)throw new Error;return t}function vb(){return 0}function bb(t){return function(){return t}}
6648
+ */constructor(){super(),this._links=[],this._linkSize=Ot(1),this._linkSizeMin=1,this._linkSizeScale="sqrt",this._noDataMessage=!1,this._nodeGroupBy=[p("id")],this._nodes=[],this._on["click.shape"]=(t,o,n,e)=>{if(this._tooltipClass.data([]).render(),this._hover&&this._drawDepth>=this._groupBy.length-1){let r=hb.bind(this)(t,o);if(this._focus&&this._focus===r)this.active(!1),this._on.mouseenter.bind(this)(t,o,n,e),this._focus=void 0,this._zoomToBounds(null);else{this.hover(!1);t=this._linkLookup[r],o=this._nodeLookup[r];let e=[r],n=[o.x-o.r,o.x+o.r],i=[o.y-o.r,o.y+o.r],a=(t.forEach(t=>{e.push(t.id),t.x-t.r<n[0]&&(n[0]=t.x-t.r),t.x+t.r>n[1]&&(n[1]=t.x+t.r),t.y-t.r<i[0]&&(i[0]=t.y-t.r),t.y+t.r>i[1]&&(i[1]=t.y+t.r)}),this.active((t,n)=>t.source&&t.target?t.source.id===r||t.target.id===r:e.includes(hb.bind(this)(t,n))),this._focus=r,Ad(this._container.node()));n=n.map(t=>t*a.k+a.x),i=i.map(t=>t*a.k+a.y),this._zoomToBounds([[n[0],i[0]],[n[1],i[1]]])}}},this._on["click.legend"]=(t,n,e,i)=>{var r=this._id(t),o=(o=this._ids(t))[o.length-1];if(this._hover&&this._drawDepth>=this._groupBy.length-1){if(this._focus&&this._focus===r)this.active(!1),this._focus=void 0,this._zoomToBounds(null);else{this.hover(!1);var s=r.map(t=>this._nodeLookup[t]);let e=[""+o],n=[s[0].x-s[0].r,s[0].x+s[0].r],i=[s[0].y-s[0].r,s[0].y+s[0].r],a=(s.forEach(t=>{e.push(t.id),t.x-t.r<n[0]&&(n[0]=t.x-t.r),t.x+t.r>n[1]&&(n[1]=t.x+t.r),t.y-t.r<i[0]&&(i[0]=t.y-t.r),t.y+t.r>i[1]&&(i[1]=t.y+t.r)}),this.active((t,n)=>t.source&&t.target?e.includes(t.source.id)&&e.includes(t.target.id):(t=this._ids(t,n),e.includes(""+t[t.length-1]))),this._focus=r,Ad(this._container.node()));n=n.map(t=>t*a.k+a.x),i=i.map(t=>t*a.k+a.y),this._zoomToBounds([[n[0],i[0]],[n[1],i[1]]])}this._on.mouseenter.bind(this)(t,n,e,i),this._on["mousemove.legend"].bind(this)(t,n,e,i)}},this._on.mouseenter=()=>{},this._on["mouseleave.shape"]=()=>{this.hover(!1)};let h=this._on["mousemove.shape"];this._on["mousemove.shape"]=(t,n,e,i)=>{h(t,n,e,i);let a=hb.bind(this)(t,n),r=this._linkLookup[a]||[],o=this._nodeLookup[a],s=[a],l=[o.x-o.r,o.x+o.r],u=[o.y-o.r,o.y+o.r];r.forEach(t=>{s.push(t.id),t.x-t.r<l[0]&&(l[0]=t.x-t.r),t.x+t.r>l[1]&&(l[1]=t.x+t.r),t.y-t.r<u[0]&&(u[0]=t.y-t.r),t.y+t.r>u[1]&&(u[1]=t.y+t.r)}),this.hover((t,n)=>t.source&&t.target?t.source.id===a||t.target.id===a:s.includes(""+this._ids(t,n)[this._drawDepth]))},this._sizeMin=5,this._sizeScale="sqrt",this._shape=Ot("Circle"),this._shapeConfig=Tt(this._shapeConfig,{ariaLabel:(t,n)=>{var e=this._size?", "+this._size(t,n):"";return this._drawLabel(t,n)+e+"."},labelConfig:{duration:0,fontMin:1,fontResize:!0,labelPadding:0,textAnchor:"middle",verticalAlign:"middle"},Path:{fill:"none",label:!1,stroke:"#eee"}}),this._x=p("x"),this._y=p("y"),this._zoom=!0}}function gb(t){var n=0,e=t.children,i=e&&e.length;if(i)for(;0<=--i;)n+=e[i].value;else n=1;t.value=n}function db(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=pb)):void 0===n&&(n=fb);for(var e,i,a,r,o,t=new yb(t),s=[t];e=s.pop();)if((a=n(e.data))&&(o=(a=Array.from(a)).length))for(e.children=a,r=o-1;0<=r;--r)s.push(i=a[r]=new yb(a[r])),i.parent=e,i.depth=e.depth+1;return t.eachBefore(mb)}function fb(t){return t.children}function pb(t){return Array.isArray(t)?t[1]:null}function _b(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function mb(t){for(var n=0;t.height=n,(t=t.parent)&&t.height<++n;);}function yb(t){this.data=t,this.depth=this.height=0,this.parent=null}function vb(t){if("function"!=typeof t)throw new Error;return t}function bb(){return 0}function xb(t){return function(){return t}}
6653
6649
  // https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use
6654
- mb.prototype=gb.prototype={constructor:mb,count:function(){return this.eachAfter(cb)},each:function(t,n){let e=-1;for(var i of this)t.call(n,i,++e,this);return this},eachAfter:function(t,n){for(var e,i,a,r=this,o=[r],s=[],l=-1;r=o.pop();)if(s.push(r),e=r.children)for(i=0,a=e.length;i<a;++i)o.push(e[i]);for(;r=s.pop();)t.call(n,r,++l,this);return this},eachBefore:function(t,n){for(var e,i,a,r=[this],o=-1;e=r.pop();)if(t.call(n,e,++o,this),i=e.children)for(a=i.length-1;0<=a;--a)r.push(i[a]);return this},find:function(t,n){let e=-1;for(var i of this)if(t.call(n,i,++e,this))return i},sum:function(a){return this.eachAfter(function(t){for(var n=+a(t.data)||0,e=t.children,i=e&&e.length;0<=--i;)n+=e[i].value;t.value=n})},sort:function(n){return this.eachBefore(function(t){t.children&&t.children.sort(n)})},path:function(t){for(var n=this,e=((t,n)=>{if(t===n)return t;var e=t.ancestors(),i=n.ancestors(),a=null;for(t=e.pop(),n=i.pop();t===n;)a=t,t=e.pop(),n=i.pop();return a})(n,t),i=[n];n!==e;)n=n.parent,i.push(n);for(var a=i.length;t!==e;)i.splice(a,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var n=[];return this.eachBefore(function(t){t.children||n.push(t)}),n},links:function(){var n=this,e=[];return n.each(function(t){t!==n&&e.push({source:t.parent,target:t})}),e},copy:function(){return gb(this).eachBefore(pb)},[Symbol.iterator]:function*(){var t,n,e,i,a,r=[this];do{for(n=r.reverse(),r=[];t=n.pop();)if(yield t,e=t.children)for(i=0,a=e.length;i<a;++i)r.push(e[i])}while(r.length)}};let xb=1664525,wb=1013904223,Sb=4294967296;function Cb(t,n){for(var e,i,a=0,r=(t=((t,n)=>{let e=t.length,i,a;for(;e;)a=n()*e--|0,i=t[e],t[e]=t[a],t[a]=i;return t})(Array.from(t),n)).length,o=[];a<r;)e=t[a],i&&Ab(i,e)?++a:(i=(t=>{switch(t.length){case 1:return(t=>({x:t.x,y:t.y,r:t.r}))(t[0]);case 2:return Eb(t[0],t[1]);case 3:return zb(t[0],t[1],t[2])}})(o=((t,n)=>{var e,i;if(Mb(n,t))return[n];
6650
+ yb.prototype=db.prototype={constructor:yb,count:function(){return this.eachAfter(gb)},each:function(t,n){let e=-1;for(var i of this)t.call(n,i,++e,this);return this},eachAfter:function(t,n){for(var e,i,a,r=this,o=[r],s=[],l=-1;r=o.pop();)if(s.push(r),e=r.children)for(i=0,a=e.length;i<a;++i)o.push(e[i]);for(;r=s.pop();)t.call(n,r,++l,this);return this},eachBefore:function(t,n){for(var e,i,a,r=[this],o=-1;e=r.pop();)if(t.call(n,e,++o,this),i=e.children)for(a=i.length-1;0<=a;--a)r.push(i[a]);return this},find:function(t,n){let e=-1;for(var i of this)if(t.call(n,i,++e,this))return i},sum:function(a){return this.eachAfter(function(t){for(var n=+a(t.data)||0,e=t.children,i=e&&e.length;0<=--i;)n+=e[i].value;t.value=n})},sort:function(n){return this.eachBefore(function(t){t.children&&t.children.sort(n)})},path:function(t){for(var n=this,e=((t,n)=>{if(t===n)return t;var e=t.ancestors(),i=n.ancestors(),a=null;for(t=e.pop(),n=i.pop();t===n;)a=t,t=e.pop(),n=i.pop();return a})(n,t),i=[n];n!==e;)n=n.parent,i.push(n);for(var a=i.length;t!==e;)i.splice(a,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var n=[];return this.eachBefore(function(t){t.children||n.push(t)}),n},links:function(){var n=this,e=[];return n.each(function(t){t!==n&&e.push({source:t.parent,target:t})}),e},copy:function(){return db(this).eachBefore(_b)},[Symbol.iterator]:function*(){var t,n,e,i,a,r=[this];do{for(n=r.reverse(),r=[];t=n.pop();)if(yield t,e=t.children)for(i=0,a=e.length;i<a;++i)r.push(e[i])}while(r.length)}};let wb=1664525,Sb=1013904223,Cb=4294967296;function kb(t,n){for(var e,i,a=0,r=(t=((t,n)=>{let e=t.length,i,a;for(;e;)a=n()*e--|0,i=t[e],t[e]=t[a],t[a]=i;return t})(Array.from(t),n)).length,o=[];a<r;)e=t[a],i&&Mb(i,e)?++a:(i=(t=>{switch(t.length){case 1:return(t=>({x:t.x,y:t.y,r:t.r}))(t[0]);case 2:return zb(t[0],t[1]);case 3:return Tb(t[0],t[1],t[2])}})(o=((t,n)=>{var e,i;if(Eb(n,t))return[n];
6655
6651
  // If we get here then B must have at least one element.
6656
- for(e=0;e<t.length;++e)if(kb(n,t[e])&&Mb(Eb(t[e],n),t))return[t[e],n];
6652
+ for(e=0;e<t.length;++e)if(Ab(n,t[e])&&Eb(zb(t[e],n),t))return[t[e],n];
6657
6653
  // If we get here then B must have at least two elements.
6658
- for(e=0;e<t.length-1;++e)for(i=e+1;i<t.length;++i)if(kb(Eb(t[e],t[i]),n)&&kb(Eb(t[e],n),t[i])&&kb(Eb(t[i],n),t[e])&&Mb(zb(t[e],t[i],n),t))return[t[e],t[i],n];
6654
+ for(e=0;e<t.length-1;++e)for(i=e+1;i<t.length;++i)if(Ab(zb(t[e],t[i]),n)&&Ab(zb(t[e],n),t[i])&&Ab(zb(t[i],n),t[e])&&Eb(Tb(t[e],t[i],n),t))return[t[e],t[i],n];
6659
6655
  // If we get here then something is very wrong.
6660
- throw new Error})(o,e)),a=0);return i}function kb(t,n){var e=t.r-n.r,i=n.x-t.x,n=n.y-t.y;return e<0||e*e<i*i+n*n}function Ab(t,n){var e=t.r-n.r+1e-9*Math.max(t.r,n.r,1),i=n.x-t.x,n=n.y-t.y;return 0<e&&i*i+n*n<e*e}function Mb(t,n){for(var e=0;e<n.length;++e)if(!Ab(t,n[e]))return;return 1}function Eb(t,n){var e=t.x,i=t.y,t=t.r,a=n.x,r=n.y,n=n.r,o=a-e,s=r-i,l=n-t,u=Math.sqrt(o*o+s*s);return{x:(e+a+o/u*l)/2,y:(i+r+s/u*l)/2,r:(u+t+n)/2}}function zb(t,n,e){var i=t.x,a=t.y,t=t.r,r=n.x,o=n.y,n=n.r,s=e.x,l=e.y,e=e.r,u=i-r,h=i-s,c=a-o,g=a-l,d=n-t,f=e-t,p=i*i+a*a-t*t,r=p-r*r-o*o+n*n,o=p-s*s-l*l+e*e,n=h*c-u*g,p=(c*o-g*r)/(2*n)-i,s=(g*d-c*f)/n,l=(h*r-u*o)/(2*n)-a,e=(u*f-h*d)/n,g=s*s+e*e-1,c=2*(t+p*s+l*e),r=p*p+l*l-t*t,o=-(1e-6<Math.abs(g)?(c+Math.sqrt(c*c-4*g*r))/(2*g):r/c);return{x:i+p+s*o,y:a+l+e*o,r:o}}function Tb(t,n,e){var i,a,r,o,s=t.x-n.x,l=t.y-n.y,u=s*s+l*l;u?(a=n.r+e.r,o=t.r+e.r,(o*=o)<(a*=a)?(i=(u+o-a)/(2*u),r=Math.sqrt(Math.max(0,o/u-i*i)),e.x=t.x-i*s-r*l,e.y=t.y-i*l+r*s):(i=(u+a-o)/(2*u),r=Math.sqrt(Math.max(0,a/u-i*i)),e.x=n.x+i*s-r*l,e.y=n.y+i*l+r*s)):(e.x=n.x+e.r,e.y=n.y)}function Bb(t,n){var e=t.r+n.r-1e-6,i=n.x-t.x,n=n.y-t.y;return 0<e&&i*i+n*n<e*e}function Db(t){var n=t._,t=t.next._,e=n.r+t.r,i=(n.x*t.r+t.x*n.r)/e,t=(n.y*t.r+t.y*n.r)/e;return i*i+t*t}function Nb(t){this._=t,this.next=null,this.previous=null}function Pb(t,n){if(!(r=(t="object"==typeof(e=t)&&"length"in e?e:Array.from(e)).length))return 0;var e,i,a,r,o,s,l,u,h,c,g,
6656
+ throw new Error})(o,e)),a=0);return i}function Ab(t,n){var e=t.r-n.r,i=n.x-t.x,n=n.y-t.y;return e<0||e*e<i*i+n*n}function Mb(t,n){var e=t.r-n.r+1e-9*Math.max(t.r,n.r,1),i=n.x-t.x,n=n.y-t.y;return 0<e&&i*i+n*n<e*e}function Eb(t,n){for(var e=0;e<n.length;++e)if(!Mb(t,n[e]))return;return 1}function zb(t,n){var e=t.x,i=t.y,t=t.r,a=n.x,r=n.y,n=n.r,o=a-e,s=r-i,l=n-t,u=Math.sqrt(o*o+s*s);return{x:(e+a+o/u*l)/2,y:(i+r+s/u*l)/2,r:(u+t+n)/2}}function Tb(t,n,e){var i=t.x,a=t.y,t=t.r,r=n.x,o=n.y,n=n.r,s=e.x,l=e.y,e=e.r,u=i-r,h=i-s,c=a-o,g=a-l,d=n-t,f=e-t,p=i*i+a*a-t*t,r=p-r*r-o*o+n*n,o=p-s*s-l*l+e*e,n=h*c-u*g,p=(c*o-g*r)/(2*n)-i,s=(g*d-c*f)/n,l=(h*r-u*o)/(2*n)-a,e=(u*f-h*d)/n,g=s*s+e*e-1,c=2*(t+p*s+l*e),r=p*p+l*l-t*t,o=-(1e-6<Math.abs(g)?(c+Math.sqrt(c*c-4*g*r))/(2*g):r/c);return{x:i+p+s*o,y:a+l+e*o,r:o}}function Bb(t,n,e){var i,a,r,o,s=t.x-n.x,l=t.y-n.y,u=s*s+l*l;u?(a=n.r+e.r,o=t.r+e.r,(o*=o)<(a*=a)?(i=(u+o-a)/(2*u),r=Math.sqrt(Math.max(0,o/u-i*i)),e.x=t.x-i*s-r*l,e.y=t.y-i*l+r*s):(i=(u+a-o)/(2*u),r=Math.sqrt(Math.max(0,a/u-i*i)),e.x=n.x+i*s-r*l,e.y=n.y+i*l+r*s)):(e.x=n.x+e.r,e.y=n.y)}function Db(t,n){var e=t.r+n.r-1e-6,i=n.x-t.x,n=n.y-t.y;return 0<e&&i*i+n*n<e*e}function Nb(t){var n=t._,t=t.next._,e=n.r+t.r,i=(n.x*t.r+t.x*n.r)/e,t=(n.y*t.r+t.y*n.r)/e;return i*i+t*t}function Pb(t){this._=t,this.next=null,this.previous=null}function Lb(t,n){if(!(r=(t="object"==typeof(e=t)&&"length"in e?e:Array.from(e)).length))return 0;var e,i,a,r,o,s,l,u,h,c,g,
6661
6657
  // Place the first circle.
6662
6658
  d=t[0];if(d.x=0,d.y=0,!(1<r))return d.r;
6663
6659
  // Place the second circle.
6664
6660
  if(d.x=-(i=t[1]).r,i.x=d.r,i.y=0,!(2<r))return d.r+i.r;
6665
6661
  // Place the third circle.
6666
- Tb(i,d,a=t[2]),
6662
+ Bb(i,d,a=t[2]),
6667
6663
  // Initialize the front-chain using the first three circles a, b and c.
6668
- d=new Nb(d),i=new Nb(i),a=new Nb(a),((d.next=a.previous=i).next=d.previous=a).next=i.previous=d;
6664
+ d=new Pb(d),i=new Pb(i),a=new Pb(a),((d.next=a.previous=i).next=d.previous=a).next=i.previous=d;
6669
6665
  // Attempt to place each remaining circle…
6670
- t:for(l=3;l<r;++l){Tb(d._,i._,a=t[l]),a=new Nb(a),
6666
+ t:for(l=3;l<r;++l){Bb(d._,i._,a=t[l]),a=new Pb(a),
6671
6667
  // Find the closest intersecting circle on the front-chain, if any.
6672
6668
  // “Closeness” is determined by linear distance along the front-chain.
6673
6669
  // “Ahead” or “behind” is likewise determined by linear distance.
6674
- u=i.next,h=d.previous,c=i._.r,g=d._.r;do{if(c<=g){if(Bb(u._,a._)){i=u,(d.next=i).previous=d,--l;continue t}c+=u._.r,u=u.next}else{if(Bb(h._,a._)){((d=h).next=i).previous=d,--l;continue t}g+=h._.r,h=h.previous}}while(u!==h.next);
6670
+ u=i.next,h=d.previous,c=i._.r,g=d._.r;do{if(c<=g){if(Db(u._,a._)){i=u,(d.next=i).previous=d,--l;continue t}c+=u._.r,u=u.next}else{if(Db(h._,a._)){((d=h).next=i).previous=d,--l;continue t}g+=h._.r,h=h.previous}}while(u!==h.next);
6675
6671
  // Success! Insert the new circle c between a and b.
6676
6672
  for(a.previous=d,a.next=i,d.next=i.previous=i=a,
6677
6673
  // Compute the new closest circle pair to the centroid.
6678
- o=Db(d);(a=a.next)!==i;)(s=Db(a))<o&&(d=a,o=s);i=d.next}
6674
+ o=Nb(d);(a=a.next)!==i;)(s=Nb(a))<o&&(d=a,o=s);i=d.next}
6679
6675
  // Compute the enclosing circle of the front chain.
6680
6676
  for(d=[i._],a=i;(a=a.next)!==i;)d.push(a._);
6681
6677
  // Translate the circles to put the enclosing circle around the origin.
6682
- for(a=Cb(d,n),l=0;l<r;++l)(d=t[l]).x-=a.x,d.y-=a.y;return a.r}function Lb(t){return Math.sqrt(t.value)}function Fb(){var e=null,i=1,a=1,r=vb;function n(t){var n=(// 2^32
6683
- ()=>{let t=1;return()=>(t=(xb*t+wb)%Sb)/Sb})();return t.x=i/2,t.y=a/2,e?t.eachBefore(Ob(e)).eachAfter(Rb(r,.5,n)).eachBefore(jb(1)):t.eachBefore(Ob(Lb)).eachAfter(Rb(vb,1,n)).eachAfter(Rb(r,t.r/Math.min(i,a),n)).eachBefore(jb(Math.min(i,a)/(2*t.r))),t}return n.radius=function(t){return arguments.length?(e=null==(t=t)?null:yb(t),n):e},n.size=function(t){return arguments.length?(i=+t[0],a=+t[1],n):[i,a]},n.padding=function(t){return arguments.length?(r="function"==typeof t?t:bb(+t),n):r},n}function Ob(n){return function(t){t.children||(t.r=Math.max(0,+n(t)||0))}}function Rb(o,s,l){return function(t){if(n=t.children){var n,e,i,a=n.length,r=o(t)*s||0;if(r)for(e=0;e<a;++e)n[e].r+=r;if(i=Pb(n,l),r)for(e=0;e<a;++e)n[e].r-=r;t.r=i+r}}}function jb(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function Ib(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 Hb(t,n,e,i,a){for(var r,o=t.children,s=-1,l=o.length,u=t.value&&(i-n)/t.value;++s<l;)(r=o[s]).y0=e,r.y1=a,r.x0=n,r.x1=n+=r.value*u}function Gb(t,n){return t.parent===n.parent?1:2}
6678
+ for(a=kb(d,n),l=0;l<r;++l)(d=t[l]).x-=a.x,d.y-=a.y;return a.r}function Fb(t){return Math.sqrt(t.value)}function Ob(){var e=null,i=1,a=1,r=bb;function n(t){var n=(// 2^32
6679
+ ()=>{let t=1;return()=>(t=(wb*t+Sb)%Cb)/Cb})();return t.x=i/2,t.y=a/2,e?t.eachBefore(Rb(e)).eachAfter(jb(r,.5,n)).eachBefore(Ib(1)):t.eachBefore(Rb(Fb)).eachAfter(jb(bb,1,n)).eachAfter(jb(r,t.r/Math.min(i,a),n)).eachBefore(Ib(Math.min(i,a)/(2*t.r))),t}return n.radius=function(t){return arguments.length?(e=null==(t=t)?null:vb(t),n):e},n.size=function(t){return arguments.length?(i=+t[0],a=+t[1],n):[i,a]},n.padding=function(t){return arguments.length?(r="function"==typeof t?t:xb(+t),n):r},n}function Rb(n){return function(t){t.children||(t.r=Math.max(0,+n(t)||0))}}function jb(o,s,l){return function(t){if(n=t.children){var n,e,i,a=n.length,r=o(t)*s||0;if(r)for(e=0;e<a;++e)n[e].r+=r;if(i=Lb(n,l),r)for(e=0;e<a;++e)n[e].r-=r;t.r=i+r}}}function Ib(e){return function(t){var n=t.parent;t.r*=e,n&&(t.x=n.x+e*t.x,t.y=n.y+e*t.y)}}function Hb(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 Gb(t,n,e,i,a){for(var r,o=t.children,s=-1,l=o.length,u=t.value&&(i-n)/t.value;++s<l;)(r=o[s]).y0=e,r.y1=a,r.x0=n,r.x1=n+=r.value*u}function Kb(t,n){return t.parent===n.parent?1:2}
6684
6680
  // function radialSeparation(a, b) {
6685
6681
  // return (a.parent === b.parent ? 1 : 2) / a.depth;
6686
6682
  // }
@@ -6688,12 +6684,12 @@ for(a=Cb(d,n),l=0;l<r;++l)(d=t[l]).x-=a.x,d.y-=a.y;return a.r}function Lb(t){ret
6688
6684
  // subforest). It returns the successor of v on this contour. This successor is
6689
6685
  // either given by the leftmost child of v or by the thread of v. The function
6690
6686
  // returns null if and only if v is on the highest level of its subtree.
6691
- function Kb(t){var n=t.children;return n?n[0]:t.t}
6687
+ function $b(t){var n=t.children;return n?n[0]:t.t}
6692
6688
  // This function works analogously to nextLeft.
6693
- function $b(t){var n=t.children;return n?n[n.length-1]:t.t}
6689
+ function qb(t){var n=t.children;return n?n[n.length-1]:t.t}
6694
6690
  // Shifts the current subtree rooted at w+. This is done by increasing
6695
6691
  // prelim(w+) and mod(w+) by shift.
6696
- function qb(t,n){this._=t,this.parent=null,this.children=null,this.A=null,// ancestor
6692
+ function Ub(t,n){this._=t,this.parent=null,this.children=null,this.A=null,// ancestor
6697
6693
  (// default ancestor
6698
6694
  this.a=this).z=0,// prelim
6699
6695
  this.m=0,// mod
@@ -6702,7 +6698,7 @@ this.s=0,// shift
6702
6698
  this.t=null,// thread
6703
6699
  this.i=n}
6704
6700
  // Node-link tree diagram using the Reingold-Tilford "tidy" algorithm
6705
- function Ub(){var g=Gb,l=1,u=1,h=null;function n(t){var n,e,i,a,r,o,s=(t=>{for(var n,e,i,a,r,o=[t=new qb(t,0)];n=o.pop();)if(i=n._.children)for(n.children=new Array(r=i.length),a=r-1;0<=a;--a)o.push(e=n.children[a]=new qb(i[a],a)),e.parent=n;return(t.parent=new qb(null,0)).children=[t],t})(t);
6701
+ function Wb(){var g=Kb,l=1,u=1,h=null;function n(t){var n,e,i,a,r,o,s=(t=>{for(var n,e,i,a,r,o=[t=new Ub(t,0)];n=o.pop();)if(i=n._.children)for(n.children=new Array(r=i.length),a=r-1;0<=a;--a)o.push(e=n.children[a]=new Ub(i[a],a)),e.parent=n;return(t.parent=new Ub(null,0)).children=[t],t})(t);
6706
6702
  // Compute the layout using Buchheim et al.’s algorithm.
6707
6703
  return s.eachAfter(c),s.parent.m=-s.z,s.eachBefore(d),
6708
6704
  // If a fixed node size is specified, scale x and y.
@@ -6723,26 +6719,26 @@ function c(t){var n=t.children,e=t.parent.children,i=t.i?e[t.i-1]:null;if(n){for
6723
6719
  // greatest uncommon ancestors using the function ANCESTOR and call MOVE
6724
6720
  // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees.
6725
6721
  // Finally, we add a new thread (if necessary).
6726
- (t,n,e)=>{if(n){for(var i,a=t,r=t,o=n,s=a.parent.children[0],l=a.m,u=r.m,h=o.m,c=s.m;o=$b(o),a=Kb(a),o&&a;)s=Kb(s),(r=$b(r)).a=t,0<(i=o.z+h-a.z-l+g(o._,a._))&&(((t,n,e)=>{var i=e/(n.i-t.i);n.c-=i,n.s+=e,t.c+=i,n.z+=e,n.m+=e}
6722
+ (t,n,e)=>{if(n){for(var i,a=t,r=t,o=n,s=a.parent.children[0],l=a.m,u=r.m,h=o.m,c=s.m;o=qb(o),a=$b(a),o&&a;)s=$b(s),(r=qb(r)).a=t,0<(i=o.z+h-a.z-l+g(o._,a._))&&(((t,n,e)=>{var i=e/(n.i-t.i);n.c-=i,n.s+=e,t.c+=i,n.z+=e,n.m+=e}
6727
6723
  // All other shifts, applied to the smaller subtrees between w- and w+, are
6728
6724
  // performed by this function. To prepare the shifts, we have to adjust
6729
6725
  // change(w+), shift(w+), and change(w-).
6730
6726
  )((
6731
6727
  // If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise,
6732
6728
  // returns the specified (default) ancestor.
6733
- (t,n,e)=>t.a.parent===n.parent?t.a:e)(o,t,e),t,i),l+=i,u+=i),h+=o.m,l+=a.m,c+=s.m,u+=r.m;o&&!$b(r)&&(r.t=o,r.m+=h-u),a&&!Kb(s)&&(s.t=a,s.m+=l-c,e=t)}return e})(t,i,t.parent.A||e[0])}
6729
+ (t,n,e)=>t.a.parent===n.parent?t.a:e)(o,t,e),t,i),l+=i,u+=i),h+=o.m,l+=a.m,c+=s.m,u+=r.m;o&&!qb(r)&&(r.t=o,r.m+=h-u),a&&!$b(s)&&(s.t=a,s.m+=l-c,e=t)}return e})(t,i,t.parent.A||e[0])}
6734
6730
  // Computes all real x-coordinates by summing up the modifiers recursively.
6735
- function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function f(t){t.x*=l,t.y=t.depth*u}return n.separation=function(t){return arguments.length?(g=t,n):g},n.size=function(t){return arguments.length?(h=!1,l=+t[0],u=+t[1],n):h?null:[l,u]},n.nodeSize=function(t){return arguments.length?(h=!0,l=+t[0],u=+t[1],n):h?[l,u]:null},n}function Wb(t,n,e,i,a){for(var r,o=t.children,s=-1,l=o.length,u=t.value&&(a-e)/t.value;++s<l;)(r=o[s]).x0=n,r.x1=i,r.y0=e,r.y1=e+=r.value*u}qb.prototype=Object.create(mb.prototype);Il=(1+Math.sqrt(5))/2;function Yb(t,n,e,i,a,r){for(var o,s,l,u,h,c,g,d,f,p,_,m=[],y=n.children,v=0,b=0,x=y.length,w=n.value;v<x;){
6731
+ function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function f(t){t.x*=l,t.y=t.depth*u}return n.separation=function(t){return arguments.length?(g=t,n):g},n.size=function(t){return arguments.length?(h=!1,l=+t[0],u=+t[1],n):h?null:[l,u]},n.nodeSize=function(t){return arguments.length?(h=!0,l=+t[0],u=+t[1],n):h?[l,u]:null},n}function Yb(t,n,e,i,a){for(var r,o=t.children,s=-1,l=o.length,u=t.value&&(a-e)/t.value;++s<l;)(r=o[s]).x0=n,r.x1=i,r.y0=e,r.y1=e+=r.value*u}Ub.prototype=Object.create(yb.prototype);Il=(1+Math.sqrt(5))/2;function Vb(t,n,e,i,a,r){for(var o,s,l,u,h,c,g,d,f,p,_,m=[],y=n.children,v=0,b=0,x=y.length,w=n.value;v<x;){
6736
6732
  // Find the next non-empty node.
6737
6733
  for(l=a-e,u=r-i;!(h=y[b++].value)&&b<x;);
6738
6734
  // Keep adding nodes while the aspect ratio maintains or improves.
6739
6735
  for(_=(c=g=h)*h*(p=Math.max(u/l,l/u)/(w*t)),f=Math.max(g/_,_/c);b<x;++b){if(h+=s=y[b].value,s<c&&(c=s),g<s&&(g=s),_=h*h*p,f<(d=Math.max(g/_,_/c))){h-=s;break}f=d}
6740
6736
  // Position and record the row orientation.
6741
- m.push(o={value:h,dice:l<u,children:y.slice(v,b)}),o.dice?Hb(o,e,i,a,w?i+=u*h/w:r):Wb(o,e,i,w?e+=l*h/w:a,r),w-=h,v=b}return m}var Vb=function n(r){function t(t,n,e,i,a){Yb(r,t,n,e,i,a)}return t.ratio=function(t){return n(1<(t=+t)?t:1)},t}(Il);let Zb=function n(d){function t(t,n,e,i,a){if((r=t._squarify)&&r.ratio===d)for(var r,o,s,l,u,h=-1,c=r.length,g=t.value;++h<c;){for(s=(o=r[h]).children,l=o.value=0,u=s.length;l<u;++l)o.value+=s[l].value;o.dice?Hb(o,n,e,i,g?e+=(a-e)*o.value/g:a):Wb(o,n,e,g?n+=(i-n)*o.value/g:i,a),g-=o.value}else t._squarify=r=Yb(d,t,n,e,i,a),r.ratio=d}return t.ratio=function(t){return n(1<(t=+t)?t:1)},t}(Il),Xb=(t,n=[])=>(t.values?t.values.forEach(t=>{n.push(t),Xb(t,n)}):n.push(t),n);class Jb extends r0{
6737
+ m.push(o={value:h,dice:l<u,children:y.slice(v,b)}),o.dice?Gb(o,e,i,a,w?i+=u*h/w:r):Yb(o,e,i,w?e+=l*h/w:a,r),w-=h,v=b}return m}var Zb=function n(r){function t(t,n,e,i,a){Vb(r,t,n,e,i,a)}return t.ratio=function(t){return n(1<(t=+t)?t:1)},t}(Il);let Xb=function n(d){function t(t,n,e,i,a){if((r=t._squarify)&&r.ratio===d)for(var r,o,s,l,u,h=-1,c=r.length,g=t.value;++h<c;){for(s=(o=r[h]).children,l=o.value=0,u=s.length;l<u;++l)o.value+=s[l].value;o.dice?Gb(o,n,e,i,g?e+=(a-e)*o.value/g:a):Yb(o,n,e,g?n+=(i-n)*o.value/g:i,a),g-=o.value}else t._squarify=r=Vb(d,t,n,e,i,a),r.ratio=d}return t.ratio=function(t){return n(1<(t=+t)?t:1)},t}(Il),Jb=(t,n=[])=>(t.values?t.values.forEach(t=>{n.push(t),Jb(t,n)}):n.push(t),n);class Qb extends o0{
6742
6738
  /**
6743
6739
  Extends the draw behavior of the abstract Viz class.
6744
6740
  @private
6745
- */_draw(t){super._draw(t);var t=this._height-this._margin.top-this._margin.bottom,n=this._width-this._margin.left-this._margin.right,e=Math.min(t,n),n=`translate(${(n-e)/2}, ${(t-e)/2})`;let i=Ki();for(let t=0;t<=this._drawDepth;t++)i.key(this._groupBy[t]);i=i.entries(this._filteredData);t=this._pack.padding(this._layoutPadding).size([e,e])(gb({key:i.key,values:i},t=>t.values).sum(this._sum).sort(this._sort)).descendants();return t.forEach((t,n)=>{t.__d3plus__=!0,t.i=n,t.id=t.parent?t.parent.data.key:null,t.data.__d3plusOpacity__=t.height?this._packOpacity(t.data,n):1,t.data.__d3plusTooltip__=!t.height}),this._shapes.push((new Qh).data(t).select(Dt("g.d3plus-Pack",{parent:this._select,enter:{transform:n},update:{transform:n}}).node()).config(Ft.bind(this)(this._shapeConfig,"shape","Circle")).render()),this}
6741
+ */_draw(t){super._draw(t);var t=this._height-this._margin.top-this._margin.bottom,n=this._width-this._margin.left-this._margin.right,e=Math.min(t,n),n=`translate(${(n-e)/2}, ${(t-e)/2})`;let i=Ki();for(let t=0;t<=this._drawDepth;t++)i.key(this._groupBy[t]);i=i.entries(this._filteredData);t=this._pack.padding(this._layoutPadding).size([e,e])(db({key:i.key,values:i},t=>t.values).sum(this._sum).sort(this._sort)).descendants().filter((t,n)=>(t.__d3plus__=!0,t.i=n,t.id=t.parent?t.parent.data.key:"root",t.data.__d3plusOpacity__=t.height?this._packOpacity(t.data,n):1,t.data.__d3plusTooltip__=!t.height,!t.children||1<t.children.length));return this._shapes.push((new tc).data(t).select(Dt("g.d3plus-Pack",{parent:this._select,enter:{transform:n},update:{transform:n}}).node()).config(Ft.bind(this)(this._shapeConfig,"shape","Circle")).render()),this}
6746
6742
  /**
6747
6743
  @memberof Pack
6748
6744
  @desc If *value* is specified, sets the hover method to the specified function and returns the current class instance.
@@ -6781,12 +6777,12 @@ m.push(o={value:h,dice:l<u,children:y.slice(v,b)}),o.dice?Hb(o,e,i,a,w?i+=u*h/w:
6781
6777
  @memberof Pack
6782
6778
  @desc Invoked when creating a new class instance, and sets any default parameters.
6783
6779
  @private
6784
- */constructor(){super(),this._layoutPadding=1;let e=this._legend,o=(this._legend=(t,n)=>n.length!==this._filteredData.length&&e.bind(this)(t,n),this._on.mouseenter=()=>{},this._on["mousemove.legend"]),a=(this._on["mousemove.legend"]=(e,t,n,i)=>{o(e,t,n,i);let a=this._ids(e,t),r=Xb(e);this.hover(n=>(Object.keys(n).filter(t=>"value"!==t).every(t=>e[t]&&e[t].includes(n[t]))?r.push(n):a.includes(n.key)&&r.push(...Xb(n,[n])),r.includes(n)))},this._on["mousemove.shape"]);this._on["mousemove.shape"]=(n,t,e,i)=>{n.__d3plusTooltip__&&a(n,t,e,i),this.hover(t=>Xb(n,[n]).includes(t))},this._pack=Fb(),this._packOpacity=Ot(.25),this._shape=Ot("Circle"),this._shapeConfig=Tt(this._shapeConfig,{Circle:{label:t=>!(!t.parent||t.children)&&t.id,labelConfig:{fontResize:!0},opacity:t=>t.__d3plusOpacity__}}),this._sort=(t,n)=>n.value-t.value,this._sum=p("value")}}class Qb extends r0{
6780
+ */constructor(){super(),this._layoutPadding=1;let e=this._legend,o=(this._legend=(t,n)=>n.length!==this._filteredData.length&&e.bind(this)(t,n),this._on.mouseenter=()=>{},this._on["mousemove.legend"]),r=(this._on["mousemove.legend"]=(e,t,n,i)=>{o(e,t,n,i);let a=this._ids(e,t),r=Jb(e);this.hover(n=>(Object.keys(n).filter(t=>"value"!==t).every(t=>e[t]&&e[t].includes(n[t]))?r.push(n):a.includes(n.key)&&r.push(...Jb(n,[n])),r.includes(n)))},this._on["mousemove.shape"]);this._on["mousemove.shape"]=(t,n,e,i)=>{t.__d3plusTooltip__&&r(t,n,e,i);let a=Jb(t,[t]);this.hover(t=>a.includes(t))},this._pack=Ob(),this._packOpacity=Ot(.25),this._shape=Ot("Circle"),this._shapeConfig=Tt(this._shapeConfig,{Circle:{label:t=>!(!t.parent||t.children)&&t.id,labelConfig:{fontResize:!0},opacity:t=>t.__d3plusOpacity__}}),this._sort=(t,n)=>n.value-t.value,this._sum=p("value")}}class t9 extends o0{
6785
6781
  /**
6786
6782
  @memberof Priestley
6787
6783
  @desc Extends the render behavior of the abstract Viz class.
6788
6784
  @private
6789
- */_draw(r){if(super._draw(r),this._filteredData){r=this._filteredData.map((t,n)=>({__d3plus__:!0,data:t,end:"time"===this._axisConfig.scale?Bt(this._end(t,n)):this._end(t,n),i:n,id:this._id(t,n),start:"time"===this._axisConfig.scale?Bt(this._start(t,n)):this._start(t,n)})).filter(t=>0<t.end-t.start).sort((t,n)=>t.start-n.start);let t;if(1<this._groupBy.length&&0<this._drawDepth){var o=Ki();for(let n=0;n<this._drawDepth;n++)o.key(t=>this._groupBy[n](t.data,t.i));t=o.entries(r)}else t=[{values:r}];let i=0;t.forEach(t=>{let e=[];t.values.forEach(n=>{var t=(e=e.map(t=>!(t<=n.start)&&t)).indexOf(!1);t<0?(n.lane=i+e.length,e.push(n.end)):(e[t]=n.end,n.lane=i+t)}),i+=e.length});var s={domain:[Pt(r,t=>t.start)||0,Nt(r,t=>t.end)||0],height:this._height-this._margin.top-this._margin.bottom,width:this._width-this._margin.left-this._margin.right},l=`translate(${this._margin.left}, ${this._margin.top})`,s=(this._axisTest.config(s).config(this._axisConfig).select(Dt("g.d3plus-priestley-axis-test",{parent:this._select,enter:{opacity:0}}).node()).render(),this._axis.config(s).config(this._axisConfig).select(Dt("g.d3plus-priestley-axis",{parent:this._select,enter:{transform:l},update:{transform:l}}).node()).render(),this._axisTest._padding);let n=this._axis._d3Scale,e=Qi().domain(Lt(0,i,1)).paddingInner(this._paddingInner).paddingOuter(this._paddingOuter).rangeRound([this._height-this._margin.bottom-this._axisTest.outerBounds().height-s,this._margin.top+s]),a=e.bandwidth();this._shapes.push((new tc).data(r).duration(this._duration).height(a).label((t,n)=>this._drawLabel(t.data,n)).select(Dt("g.d3plus-priestley-shapes",{parent:this._select}).node()).width(t=>{t=Math.abs(n(t.end)-n(t.start));return 2<t?t-2:t}).x(t=>n(t.start)+(n(t.end)-n(t.start))/2).y(t=>e(t.lane)+a/2).config(Ft.bind(this)(this._shapeConfig,"shape","Rect")).render())}return this}
6785
+ */_draw(r){if(super._draw(r),this._filteredData){r=this._filteredData.map((t,n)=>({__d3plus__:!0,data:t,end:"time"===this._axisConfig.scale?Bt(this._end(t,n)):this._end(t,n),i:n,id:this._id(t,n),start:"time"===this._axisConfig.scale?Bt(this._start(t,n)):this._start(t,n)})).filter(t=>0<t.end-t.start).sort((t,n)=>t.start-n.start);let t;if(1<this._groupBy.length&&0<this._drawDepth){var o=Ki();for(let n=0;n<this._drawDepth;n++)o.key(t=>this._groupBy[n](t.data,t.i));t=o.entries(r)}else t=[{values:r}];let i=0;t.forEach(t=>{let e=[];t.values.forEach(n=>{var t=(e=e.map(t=>!(t<=n.start)&&t)).indexOf(!1);t<0?(n.lane=i+e.length,e.push(n.end)):(e[t]=n.end,n.lane=i+t)}),i+=e.length});var s={domain:[Pt(r,t=>t.start)||0,Nt(r,t=>t.end)||0],height:this._height-this._margin.top-this._margin.bottom,width:this._width-this._margin.left-this._margin.right},l=`translate(${this._margin.left}, ${this._margin.top})`,s=(this._axisTest.config(s).config(this._axisConfig).select(Dt("g.d3plus-priestley-axis-test",{parent:this._select,enter:{opacity:0}}).node()).render(),this._axis.config(s).config(this._axisConfig).select(Dt("g.d3plus-priestley-axis",{parent:this._select,enter:{transform:l},update:{transform:l}}).node()).render(),this._axisTest._padding);let n=this._axis._d3Scale,e=Qi().domain(Lt(0,i,1)).paddingInner(this._paddingInner).paddingOuter(this._paddingOuter).rangeRound([this._height-this._margin.bottom-this._axisTest.outerBounds().height-s,this._margin.top+s]),a=e.bandwidth();this._shapes.push((new nc).data(r).duration(this._duration).height(a).label((t,n)=>this._drawLabel(t.data,n)).select(Dt("g.d3plus-priestley-shapes",{parent:this._select}).node()).width(t=>{t=Math.abs(n(t.end)-n(t.start));return 2<t?t-2:t}).x(t=>n(t.start)+(n(t.end)-n(t.start))/2).y(t=>e(t.lane)+a/2).config(Ft.bind(this)(this._shapeConfig,"shape","Rect")).render())}return this}
6790
6786
  /**
6791
6787
  @memberof Priestley
6792
6788
  @desc If *value* is specified, sets the config method for the axis and returns the current class instance. If *value* is not specified, returns the current axis configuration.
@@ -6821,11 +6817,11 @@ m.push(o={value:h,dice:l<u,children:y.slice(v,b)}),o.dice?Hb(o,e,i,a,w?i+=u*h/w:
6821
6817
  @memberof Priestley
6822
6818
  @desc Invoked when creating a new class instance, and sets any default parameters.
6823
6819
  @private
6824
- */constructor(){super(),this._axis=(new fc).align("end").orient("bottom"),this._axisConfig={scale:"time"},this._axisTest=(new fc).align("end").gridSize(0).orient("bottom"),this.end("end"),this._paddingInner=.05,this._paddingOuter=.05,this._shapeConfig=Tt({},this._shapeConfig,{ariaLabel:(t,n)=>`${this._drawLabel(t,n)}, ${this._start(t,n)} - ${this._end(t,n)}.`}),this.start("start")}}let t9=2*Math.PI;class n9 extends r0{
6820
+ */constructor(){super(),this._axis=(new pc).align("end").orient("bottom"),this._axisConfig={scale:"time"},this._axisTest=(new pc).align("end").gridSize(0).orient("bottom"),this.end("end"),this._paddingInner=.05,this._paddingOuter=.05,this._shapeConfig=Tt({},this._shapeConfig,{ariaLabel:(t,n)=>`${this._drawLabel(t,n)}, ${this._start(t,n)} - ${this._end(t,n)}.`}),this.start("start")}}let n9=2*Math.PI;class e9 extends o0{
6825
6821
  /**
6826
6822
  Extends the draw behavior of the abstract Viz class.
6827
6823
  @private
6828
- */_draw(t){super._draw(t);let u=this._height-this._margin.top-this._margin.bottom,h=this._width-this._margin.left-this._margin.right,c=Pt([u,h])/2-this._outerPadding,n=`translate(${h/2}, ${u/2})`;var t=Ki().key(this._metric).entries(this._filteredData),e=Ki().key(this._id).key(this._metric).entries(this._filteredData);let i=Nt(e.map(t=>t.values.map(t=>ai(t.values,(t,n)=>this._value(t,n)))).flat());var a=Array.from(Array(this._levels).keys()).map(t=>({id:t,r:c*((t+1)/this._levels)})),r=Ft.bind(this)(this._axisConfig.shapeConfig,"shape","Circle");delete r.label,(new Qh).data(a).select(Dt("g.d3plus-Radar-radial-circles",{parent:this._select,enter:{transform:n},update:{transform:n}}).node()).config(r).render();let g=t.length;var a=t.map((t,n)=>{var e=this._outerPadding,i=2*(1.4*(this._shapeConfig.labelConfig.fontSize&&this._shapeConfig.labelConfig.fontSize(t,n)||11)),a=parseInt(360-360/g*n/90,10)%4+1,r=t9/g*n;let o=360/g*n,s="start",l=10;2!=a&&3!=a||(l=-e-10,s="end",o+=180);a={x:l,y:-i/2,width:e,height:i};return{__d3plus__:!0,data:Vu(t.values,this._aggs),i:n,id:t.key,angle:o,textAnchor:s,labelBounds:a,rotateAnchor:[-l,i/2],x:c*Math.cos(r),y:c*Math.sin(r)}}).sort((t,n)=>t.key-n.key),r=((new tc).data(a).rotate(t=>t.angle||0).width(0).height(0).x(t=>t.x).y(t=>t.y).label(t=>t.id).labelBounds(t=>t.labelBounds).labelConfig(this._axisConfig.shapeConfig.labelConfig).select(Dt("g.d3plus-Radar-text",{parent:this._select,enter:{transform:n},update:{transform:n}}).node()).render(),(new oc).data(a).d(t=>`M0,0 ${-t.x},`+-t.y).select(Dt("g.d3plus-Radar-axis",{parent:this._select,enter:{transform:n},update:{transform:n}}).node()).config(Ft.bind(this)(this._axisConfig.shapeConfig,"shape","Path")).render(),e.map(t=>{var n=t.values.map((t,n)=>{t=ai(t.values,(t,n)=>this._value(t,n))/i*c,n=t9/g*n;return{x:t*Math.cos(n),y:t*Math.sin(n)}}),e=`M ${n[0].x} ${n[0].y} ${n.map(t=>`L ${t.x} `+t.y).join(" ")} L ${n[0].x} `+n[0].y;return{arr:t.values.map(t=>Vu(t.values,this._aggs)),id:t.key,points:n,d:e,__d3plus__:!0,data:Vu(t.values.map(t=>Vu(t.values,this._aggs)),this._aggs)}})),o=Ft.bind(this)(this._shapeConfig,"shape","Path"),s=Object.keys(o.on);o.on={};for(let t=0;t<s.length;t++){let l=s[t];o.on[l]=(t,n,e,i)=>{var a=t.points.map(t=>t.x+h/2),r=t.points.map(t=>t.y+u/2);let o=vt(i,this._select.node());a=a.map(t=>Math.abs(t-o[0]));let s=r.map(t=>Math.abs(t-o[1]));r=a.map((t,n)=>t+s[n]);this._on[l].bind(this)(t.arr[r.indexOf(Pt(r))],n,e,i)}}return this._shapes.push((new oc).data(r).d(t=>t.d).select(Dt("g.d3plus-Radar-items",{parent:this._select,enter:{transform:n},update:{transform:n}}).node()).config(o).render()),this}
6824
+ */_draw(t){super._draw(t);let u=this._height-this._margin.top-this._margin.bottom,h=this._width-this._margin.left-this._margin.right,c=Pt([u,h])/2-this._outerPadding,n=`translate(${h/2}, ${u/2})`;var t=Ki().key(this._metric).entries(this._filteredData),e=Ki().key(this._id).key(this._metric).entries(this._filteredData);let i=Nt(e.map(t=>t.values.map(t=>ai(t.values,(t,n)=>this._value(t,n)))).flat());var a=Array.from(Array(this._levels).keys()).map(t=>({id:t,r:c*((t+1)/this._levels)})),r=Ft.bind(this)(this._axisConfig.shapeConfig,"shape","Circle");delete r.label,(new tc).data(a).select(Dt("g.d3plus-Radar-radial-circles",{parent:this._select,enter:{transform:n},update:{transform:n}}).node()).config(r).render();let g=t.length;var a=t.map((t,n)=>{var e=this._outerPadding,i=2*(1.4*(this._shapeConfig.labelConfig.fontSize&&this._shapeConfig.labelConfig.fontSize(t,n)||11)),a=parseInt(360-360/g*n/90,10)%4+1,r=n9/g*n;let o=360/g*n,s="start",l=10;2!=a&&3!=a||(l=-e-10,s="end",o+=180);a={x:l,y:-i/2,width:e,height:i};return{__d3plus__:!0,data:Vu(t.values,this._aggs),i:n,id:t.key,angle:o,textAnchor:s,labelBounds:a,rotateAnchor:[-l,i/2],x:c*Math.cos(r),y:c*Math.sin(r)}}).sort((t,n)=>t.key-n.key),r=((new nc).data(a).rotate(t=>t.angle||0).width(0).height(0).x(t=>t.x).y(t=>t.y).label(t=>t.id).labelBounds(t=>t.labelBounds).labelConfig(this._axisConfig.shapeConfig.labelConfig).select(Dt("g.d3plus-Radar-text",{parent:this._select,enter:{transform:n},update:{transform:n}}).node()).render(),(new sc).data(a).d(t=>`M0,0 ${-t.x},`+-t.y).select(Dt("g.d3plus-Radar-axis",{parent:this._select,enter:{transform:n},update:{transform:n}}).node()).config(Ft.bind(this)(this._axisConfig.shapeConfig,"shape","Path")).render(),e.map(t=>{var n=t.values.map((t,n)=>{t=ai(t.values,(t,n)=>this._value(t,n))/i*c,n=n9/g*n;return{x:t*Math.cos(n),y:t*Math.sin(n)}}),e=`M ${n[0].x} ${n[0].y} ${n.map(t=>`L ${t.x} `+t.y).join(" ")} L ${n[0].x} `+n[0].y;return{arr:t.values.map(t=>Vu(t.values,this._aggs)),id:t.key,points:n,d:e,__d3plus__:!0,data:Vu(t.values.map(t=>Vu(t.values,this._aggs)),this._aggs)}})),o=Ft.bind(this)(this._shapeConfig,"shape","Path"),s=Object.keys(o.on);o.on={};for(let t=0;t<s.length;t++){let l=s[t];o.on[l]=(t,n,e,i)=>{var a=t.points.map(t=>t.x+h/2),r=t.points.map(t=>t.y+u/2);let o=vt(i,this._select.node());a=a.map(t=>Math.abs(t-o[0]));let s=r.map(t=>Math.abs(t-o[1]));r=a.map((t,n)=>t+s[n]);this._on[l].bind(this)(t.arr[r.indexOf(Pt(r))],n,e,i)}}return this._shapes.push((new sc).data(r).d(t=>t.d).select(Dt("g.d3plus-Radar-items",{parent:this._select,enter:{transform:n},update:{transform:n}}).node()).config(o).render()),this}
6829
6825
  /**
6830
6826
  @memberof Radar
6831
6827
  @desc Sets the config method used for the radial spokes, circles, and labels.
@@ -6857,16 +6853,16 @@ m.push(o={value:h,dice:l<u,children:y.slice(v,b)}),o.dice?Hb(o,e,i,a,w?i+=u*h/w:
6857
6853
  @memberof Radar
6858
6854
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Viz.
6859
6855
  @private
6860
- */constructor(){super(),this._axisConfig={shapeConfig:{fill:Ot("none"),labelConfig:{fontColor:"#999",padding:0,textAnchor:(t,n,e)=>e.textAnchor,verticalAlign:"middle"},stroke:"#eee",strokeWidth:Ot(1)}},this._discrete="metric",this._levels=6,this._metric=p("metric"),this._outerPadding=100,this._shape=Ot("Path"),this._value=p("value")}}let e9=2*Math.PI;class i9 extends r0{
6856
+ */constructor(){super(),this._axisConfig={shapeConfig:{fill:Ot("none"),labelConfig:{fontColor:"#999",padding:0,textAnchor:(t,n,e)=>e.textAnchor,verticalAlign:"middle"},stroke:"#eee",strokeWidth:Ot(1)}},this._discrete="metric",this._levels=6,this._metric=p("metric"),this._outerPadding=100,this._shape=Ot("Path"),this._value=p("value")}}let i9=2*Math.PI;class a9 extends o0{
6861
6857
  /**
6862
6858
  @memberof RadialMatrix
6863
6859
  @desc Extends the draw behavior of the abstract Viz class.
6864
6860
  @private
6865
- */_draw(l){let{rowValues:u,columnValues:h,shapeData:c}=H6.bind(this)(this._filteredData);if(u.length&&h.length){super._draw(l);var l=this._height-this._margin.top-this._margin.bottom,g=this._select,d=this._transition,f=this._width-this._margin.left-this._margin.right;let o=Pt([l-100,f-200])/2,t=`translate(${f/2+this._margin.left}, ${l/2+this._margin.top})`;f=h.slice().reverse();f.unshift(f.pop());let s=f.length,n=f.map((t,n)=>{var n=n/s*e9,e=Math.round(180*n/Math.PI),i=Math.floor((e+90)/90%4+1),a=[0,180].includes(e)?-50:[2,3].includes(i)?-100:0,r=[90,270].includes(e)?-25:[2,1].includes(i)?-50:0;return{key:t,angle:e,quadrant:i,radians:n,x:o*Math.sin(n+Math.PI)+a,y:o*Math.cos(n+Math.PI)+r}});
6861
+ */_draw(l){let{rowValues:u,columnValues:h,shapeData:c}=G6.bind(this)(this._filteredData);if(u.length&&h.length){super._draw(l);var l=this._height-this._margin.top-this._margin.bottom,g=this._select,d=this._transition,f=this._width-this._margin.left-this._margin.right;let o=Pt([l-100,f-200])/2,t=`translate(${f/2+this._margin.left}, ${l/2+this._margin.top})`;f=h.slice().reverse();f.unshift(f.pop());let s=f.length,n=f.map((t,n)=>{var n=n/s*i9,e=Math.round(180*n/Math.PI),i=Math.floor((e+90)/90%4+1),a=[0,180].includes(e)?-50:[2,3].includes(i)?-100:0,r=[90,270].includes(e)?-25:[2,1].includes(i)?-50:0;return{key:t,angle:e,quadrant:i,radians:n,x:o*Math.sin(n+Math.PI)+a,y:o*Math.cos(n+Math.PI)+r}});
6866
6862
  /**
6867
6863
  * Extracts the axis config "labels" Array, if it exists, it filters
6868
6864
  * the column labels by the values included in the Array.
6869
- */l=this._columnConfig.labels instanceof Array?n.filter(t=>this._columnConfig.labels.includes(t.key)):n;this._columnLabels.data(l).x(t=>t.x).y(t=>t.y).text(t=>t.key).width(100).height(50).config(this._columnConfig.shapeConfig.labelConfig).select(Dt("g.d3plus-RadialMatrix-columns",{parent:g,transition:d,enter:{transform:t},update:{transform:t}}).node()).render();let e=this._innerRadius(o),i=(o-e)/u.length,a=1<n.length?n[1].radians-n[0].radians:e9,r=u.slice().reverse();f=Ns().padAngle(this._cellPadding/o).innerRadius(t=>e+r.indexOf(t.row)*i+this._cellPadding/2).outerRadius(t=>e+(r.indexOf(t.row)+1)*i-this._cellPadding/2).startAngle(t=>n[h.indexOf(t.column)].radians-a/2).endAngle(t=>n[h.indexOf(t.column)].radians+a/2);this._shapes.push((new oc).data(c).d(f).select(Dt("g.d3plus-RadialMatrix-arcs",{parent:g,transition:d,enter:{transform:t},update:{transform:t}}).node()).config({id:t=>this._ids(t).join("-"),x:0,y:0}).config(Ft.bind(this)(this._shapeConfig,"shape","Path")).render())}return this}
6865
+ */l=this._columnConfig.labels instanceof Array?n.filter(t=>this._columnConfig.labels.includes(t.key)):n;this._columnLabels.data(l).x(t=>t.x).y(t=>t.y).text(t=>t.key).width(100).height(50).config(this._columnConfig.shapeConfig.labelConfig).select(Dt("g.d3plus-RadialMatrix-columns",{parent:g,transition:d,enter:{transform:t},update:{transform:t}}).node()).render();let e=this._innerRadius(o),i=(o-e)/u.length,a=1<n.length?n[1].radians-n[0].radians:i9,r=u.slice().reverse();f=Ns().padAngle(this._cellPadding/o).innerRadius(t=>e+r.indexOf(t.row)*i+this._cellPadding/2).outerRadius(t=>e+(r.indexOf(t.row)+1)*i-this._cellPadding/2).startAngle(t=>n[h.indexOf(t.column)].radians-a/2).endAngle(t=>n[h.indexOf(t.column)].radians+a/2);this._shapes.push((new sc).data(c).d(f).select(Dt("g.d3plus-RadialMatrix-arcs",{parent:g,transition:d,enter:{transform:t},update:{transform:t}}).node()).config({id:t=>this._ids(t).join("-"),x:0,y:0}).config(Ft.bind(this)(this._shapeConfig,"shape","Path")).render())}return this}
6870
6866
  /**
6871
6867
  @memberof RadialMatrix
6872
6868
  @desc The pixel padding in between each cell.
@@ -6937,11 +6933,11 @@ m.push(o={value:h,dice:l<u,children:y.slice(v,b)}),o.dice?Hb(o,e,i,a,w?i+=u*h/w:
6937
6933
  @memberof RadialMatrix
6938
6934
  @desc Invoked when creating a new class instance, and sets any default parameters.
6939
6935
  @private
6940
- */constructor(){super(),this._cellPadding=2,this._column=p("column"),this._columnConfig={shapeConfig:{labelConfig:{fontColor:"#000",padding:5,textAnchor:t=>[0,180].includes(t.angle)?"middle":[2,3].includes(t.quadrant)?"end":"start",verticalAlign:t=>[90,270].includes(t.angle)?"middle":[2,1].includes(t.quadrant)?"bottom":"top"}}},this._columnSort=(t,n)=>(""+t).localeCompare(""+n),this._innerRadius=t=>t/5,this._label=(t,n)=>ji.bind(this)("row",t,n)+" / "+ji.bind(this)("column",t,n);let o=this._on["mousemove.shape"];this._on["mousemove.shape"]=(t,n,e,i)=>{o(t,n,e,i);let a=ji.bind(this)("row",t,n),r=ji.bind(this)("column",t,n);this.hover((t,n)=>ji.bind(this)("row",t,n)===a||ji.bind(this)("column",t,n)===r)},this._row=p("row"),this._rowSort=(t,n)=>(""+t).localeCompare(""+n),this._columnLabels=new Sc}}class a9 extends r0{
6936
+ */constructor(){super(),this._cellPadding=2,this._column=p("column"),this._columnConfig={shapeConfig:{labelConfig:{fontColor:"#000",padding:5,textAnchor:t=>[0,180].includes(t.angle)?"middle":[2,3].includes(t.quadrant)?"end":"start",verticalAlign:t=>[90,270].includes(t.angle)?"middle":[2,1].includes(t.quadrant)?"bottom":"top"}}},this._columnSort=(t,n)=>(""+t).localeCompare(""+n),this._innerRadius=t=>t/5,this._label=(t,n)=>ji.bind(this)("row",t,n)+" / "+ji.bind(this)("column",t,n);let o=this._on["mousemove.shape"];this._on["mousemove.shape"]=(t,n,e,i)=>{o(t,n,e,i);let a=ji.bind(this)("row",t,n),r=ji.bind(this)("column",t,n);this.hover((t,n)=>ji.bind(this)("row",t,n)===a||ji.bind(this)("column",t,n)===r)},this._row=p("row"),this._rowSort=(t,n)=>(""+t).localeCompare(""+n),this._columnLabels=new Cc}}class r9 extends o0{
6941
6937
  /**
6942
6938
  Extends the draw behavior of the abstract Viz class.
6943
6939
  @private
6944
- */_draw(e){super._draw(e);let a=this._filteredData.reduce((t,n,e)=>(t[this._id(n,e)]=n,t),{}),l=this._nodes;!this._nodes.length&&this._links.length&&(e=Array.from(new Set(this._links.reduce((t,n)=>t.concat([n.source,n.target]),[]))),l=e.map(t=>"object"==typeof t?t:{id:t})),l=l.reduce((t,n,e)=>(t[this._nodeGroupBy?this._nodeGroupBy[this._drawDepth](n,e):this._id(n,e)]=n,t),{}),l=Array.from(new Set(Object.keys(a).concat(Object.keys(l)))).map((t,n)=>{var e=a[t],i=l[t];return void 0!==i&&{__d3plus__:!0,data:e||i,i:n,id:t,node:i,shape:void 0!==e&&void 0!==this._shape(e)?this._shape(e):this._shape(i)}}).filter(t=>t);let i=this._nodeLookup=l.reduce((t,n)=>(t[n.id]=n,t),{});e=this._links.map(e=>{var t=["source","target"].reduce((t,n)=>(t[n]="number"==typeof e[n]?l[e[n]]:i[e[n].id||e[n]],t),{});return t.size=this._linkSize(e),t});let r=e.reduce((t,n)=>(t[n.source.id]||(t[n.source.id]=[]),t[n.source.id].push(n),t[n.target.id]||(t[n.target.id]=[]),t[n.target.id].push(n),t),{}),t=this._duration,u=this._height-this._margin.top-this._margin.bottom,n=`translate(${this._margin.left}, ${this._margin.top})`,h=this._width-this._margin.left-this._margin.right,c=[],o=Pt([u,h])/2,g=o/3,d=g,f=2*g,p=i[this._center],s=(p.x=h/2,p.y=u/2,p.r=this._sizeMin?Nt([this._sizeMin,.65*d]):this._sizeMax?Pt([this._sizeMax,.65*d]):.65*d,[p]),_=[],m=(r[this._center].forEach(t=>{var n=t.source.id===this._center?t.target:t.source;n.edges=r[n.id].filter(t=>t.source.id!==this._center||t.target.id!==this._center),n.edge=t,s.push(n),_.push(n)}),_.sort((t,n)=>t.edges.length-n.edges.length),[]),y=0,v=(_.forEach(t=>{let e=t.id;t.edges=t.edges.filter(t=>!s.includes(t.source)&&t.target.id===e||!s.includes(t.target)&&t.source.id===e),y+=t.edges.length||1,t.edges.forEach(t=>{var{source:t,target:n}=t,t=n.id===e?t:n;s.push(t)})}),2*Math.PI),b=0;_.forEach((i,t)=>{let a=i.edges.length||1;var n=v/y*a;0===t&&(b-=n/2);let r=b+n/2-v/4;i.radians=r,i.x=h/2+d*Math.cos(r),i.y=u/2+d*Math.sin(r),b+=n,i.edges.forEach((t,n)=>{var t=t.source.id===i.id?t.target:t.source,e=v/y,e=r-e*a/2+e/2+e*n;t.radians=e,t.x=h/2+f*Math.cos(e),t.y=u/2+f*Math.sin(e),m.push(t)})});var x=g/2,w=g/4;let S=x/2-4,C=(x/2-4<8&&(S=Pt([x/2,8])),w/2-4);(C=(C=w/2-4<4?Pt([w/2,4]):C)>g/10?g/10:C)>S&&10<C&&(C=.75*S),S>1.5*C&&(S=1.5*C),S=Math.floor(S),C=Math.floor(C);let k;this._size?((x=Re(a,t=>t.size))[0]===x[1]&&(x[0]=0),k=ka().domain(x).rangeRound([3,Pt([S,C])]),w=p.size,p.r=k(w)):k=ka().domain([1,2]).rangeRound([S,C]),m.forEach(t=>{t.ring=2;var n=this._size?t.size:2;t.r=this._sizeMin?Nt([this._sizeMin,k(n)]):this._sizeMax?Pt([this._sizeMax,k(n)]):k(n)}),_.forEach(t=>{t.ring=1;var n=this._size?t.size:1;t.r=this._sizeMin?Nt([this._sizeMin,k(n)]):this._sizeMax?Pt([this._sizeMax,k(n)]):k(n)}),l=[p].concat(_).concat(m),_.forEach(s=>{let e=s.edge;["source","target"].forEach(n=>{e[n]=l.find(t=>t.id===e[n].id)}),c.push(e),r[s.id].forEach(o=>{let n=o.source.id===s.id?o.target:o.source;if(n.id!==p.id){let r=m.find(t=>t.id===n.id);if(r=r||_.find(t=>t.id===n.id)){o.spline=!0;let e=h/2,i=u/2,a=d+.5*(f-d);["source","target"].forEach((n,t)=>{o[n+"X"]=o[n].x+Math.cos(2===o[n].ring?o[n].radians+Math.PI:o[n].radians)*o[n].r,o[n+"Y"]=o[n].y+Math.sin(2===o[n].ring?o[n].radians+Math.PI:o[n].radians)*o[n].r,o[n+"BisectX"]=e+a*Math.cos(o[n].radians),o[n+"BisectY"]=i+a*Math.sin(o[n].radians),o[n]=l.find(t=>t.id===o[n].id),void 0===o[n].edges&&(o[n].edges={});t=(0===t?o.target:o.source).id;o[n].id===s.id?o[n].edges[t]={angle:s.radians+Math.PI,radius:g/2}:o[n].edges[t]={angle:r.radians,radius:g/2}}),c.push(o)}}})}),l.forEach(i=>{if(i.id!==this._center){var a=1.4*(this._shapeConfig.labelConfig.fontSize&&this._shapeConfig.labelConfig.fontSize(i)||11),r=2*a,o=g-i.r;let t=i.radians*(180/Math.PI),n=i.r+5,e="start";(t<-90||90<t)&&(n=-i.r-o-5,e="end",t+=180),i.labelBounds={x:n,y:-a/2,width:o,height:r},i.rotate=t,i.textAnchor=e}else i.labelBounds={x:-d/2,y:-d/2,width:d,height:d}}),this._linkLookup=e.reduce((t,n)=>(t[n.source.id]||(t[n.source.id]=[]),t[n.source.id].push(n.target),t[n.target.id]||(t[n.target.id]=[]),t[n.target.id].push(n.source),t),{});x=Re(e,t=>t.size);if(x[0]!==x[1]){let t=Pt(l,t=>t.r),n=ss["scale"+this._linkSizeScale.charAt(0).toUpperCase()+this._linkSizeScale.slice(1)]().domain(x).range([this._linkSizeMin,t]);e.forEach(t=>{t.size=n(t.size)})}w=Ft.bind(this)(this._shapeConfig,"edge","Path");delete w.on,this._shapes.push((new oc).config(w).strokeWidth(t=>t.size).id(t=>t.source.id+"_"+t.target.id).d(t=>t.spline?`M${t.sourceX},${t.sourceY}C${t.sourceBisectX},${t.sourceBisectY} ${t.targetBisectX},${t.targetBisectY} ${t.targetX},`+t.targetY:`M${t.source.x},${t.source.y} ${t.target.x},`+t.target.y).data(c).select(Dt("g.d3plus-rings-links",{parent:this._select,duration:t,enter:{transform:n},update:{transform:n}}).node()).render());let A=this,M={label:t=>!!(l.length<=this._dataCutoff||this._hover&&this._hover(t)||this._active&&this._active(t))&&this._drawLabel(t.data||t.node,t.i),labelBounds:t=>t.labelBounds,labelConfig:{fontColor:t=>t.id===this._center?Ft.bind(A)(A._shapeConfig,"shape",t.key).labelConfig.fontColor(t):xu(Ft.bind(A)(A._shapeConfig,"shape",t.key).fill(t)),fontResize:t=>t.id===this._center,padding:0,textAnchor:t=>i[t.id].textAnchor||Ft.bind(A)(A._shapeConfig,"shape",t.key).labelConfig.textAnchor,verticalAlign:t=>t.id===this._center?"middle":"top"},rotate:t=>i[t.id].rotate||0,select:Dt("g.d3plus-rings-nodes",{parent:this._select,duration:t,enter:{transform:n},update:{transform:n}}).node()};return Ki().key(t=>t.shape).entries(l).forEach(t=>{this._shapes.push((new sc[t.key]).config(Ft.bind(this)(this._shapeConfig,"shape",t.key)).config(M).data(t.values).render())}),this}
6940
+ */_draw(e){super._draw(e);let a=this._filteredData.reduce((t,n,e)=>(t[this._id(n,e)]=n,t),{}),l=this._nodes;!this._nodes.length&&this._links.length&&(e=Array.from(new Set(this._links.reduce((t,n)=>t.concat([n.source,n.target]),[]))),l=e.map(t=>"object"==typeof t?t:{id:t})),l=l.reduce((t,n,e)=>(t[this._nodeGroupBy?this._nodeGroupBy[this._drawDepth](n,e):this._id(n,e)]=n,t),{}),l=Array.from(new Set(Object.keys(a).concat(Object.keys(l)))).map((t,n)=>{var e=a[t],i=l[t];return void 0!==i&&{__d3plus__:!0,data:e||i,i:n,id:t,node:i,shape:void 0!==e&&void 0!==this._shape(e)?this._shape(e):this._shape(i)}}).filter(t=>t);let i=this._nodeLookup=l.reduce((t,n)=>(t[n.id]=n,t),{});e=this._links.map(e=>{var t=["source","target"].reduce((t,n)=>(t[n]="number"==typeof e[n]?l[e[n]]:i[e[n].id||e[n]],t),{});return t.size=this._linkSize(e),t});let r=e.reduce((t,n)=>(t[n.source.id]||(t[n.source.id]=[]),t[n.source.id].push(n),t[n.target.id]||(t[n.target.id]=[]),t[n.target.id].push(n),t),{}),t=this._duration,u=this._height-this._margin.top-this._margin.bottom,n=`translate(${this._margin.left}, ${this._margin.top})`,h=this._width-this._margin.left-this._margin.right,c=[],o=Pt([u,h])/2,g=o/3,d=g,f=2*g,p=i[this._center],s=(p.x=h/2,p.y=u/2,p.r=this._sizeMin?Nt([this._sizeMin,.65*d]):this._sizeMax?Pt([this._sizeMax,.65*d]):.65*d,[p]),_=[],m=(r[this._center].forEach(t=>{var n=t.source.id===this._center?t.target:t.source;n.edges=r[n.id].filter(t=>t.source.id!==this._center||t.target.id!==this._center),n.edge=t,s.push(n),_.push(n)}),_.sort((t,n)=>t.edges.length-n.edges.length),[]),y=0,v=(_.forEach(t=>{let e=t.id;t.edges=t.edges.filter(t=>!s.includes(t.source)&&t.target.id===e||!s.includes(t.target)&&t.source.id===e),y+=t.edges.length||1,t.edges.forEach(t=>{var{source:t,target:n}=t,t=n.id===e?t:n;s.push(t)})}),2*Math.PI),b=0;_.forEach((i,t)=>{let a=i.edges.length||1;var n=v/y*a;0===t&&(b-=n/2);let r=b+n/2-v/4;i.radians=r,i.x=h/2+d*Math.cos(r),i.y=u/2+d*Math.sin(r),b+=n,i.edges.forEach((t,n)=>{var t=t.source.id===i.id?t.target:t.source,e=v/y,e=r-e*a/2+e/2+e*n;t.radians=e,t.x=h/2+f*Math.cos(e),t.y=u/2+f*Math.sin(e),m.push(t)})});var x=g/2,w=g/4;let S=x/2-4,C=(x/2-4<8&&(S=Pt([x/2,8])),w/2-4);(C=(C=w/2-4<4?Pt([w/2,4]):C)>g/10?g/10:C)>S&&10<C&&(C=.75*S),S>1.5*C&&(S=1.5*C),S=Math.floor(S),C=Math.floor(C);let k;this._size?((x=Re(a,t=>t.size))[0]===x[1]&&(x[0]=0),k=ka().domain(x).rangeRound([3,Pt([S,C])]),w=p.size,p.r=k(w)):k=ka().domain([1,2]).rangeRound([S,C]),m.forEach(t=>{t.ring=2;var n=this._size?t.size:2;t.r=this._sizeMin?Nt([this._sizeMin,k(n)]):this._sizeMax?Pt([this._sizeMax,k(n)]):k(n)}),_.forEach(t=>{t.ring=1;var n=this._size?t.size:1;t.r=this._sizeMin?Nt([this._sizeMin,k(n)]):this._sizeMax?Pt([this._sizeMax,k(n)]):k(n)}),l=[p].concat(_).concat(m),_.forEach(s=>{let e=s.edge;["source","target"].forEach(n=>{e[n]=l.find(t=>t.id===e[n].id)}),c.push(e),r[s.id].forEach(o=>{let n=o.source.id===s.id?o.target:o.source;if(n.id!==p.id){let r=m.find(t=>t.id===n.id);if(r=r||_.find(t=>t.id===n.id)){o.spline=!0;let e=h/2,i=u/2,a=d+.5*(f-d);["source","target"].forEach((n,t)=>{o[n+"X"]=o[n].x+Math.cos(2===o[n].ring?o[n].radians+Math.PI:o[n].radians)*o[n].r,o[n+"Y"]=o[n].y+Math.sin(2===o[n].ring?o[n].radians+Math.PI:o[n].radians)*o[n].r,o[n+"BisectX"]=e+a*Math.cos(o[n].radians),o[n+"BisectY"]=i+a*Math.sin(o[n].radians),o[n]=l.find(t=>t.id===o[n].id),void 0===o[n].edges&&(o[n].edges={});t=(0===t?o.target:o.source).id;o[n].id===s.id?o[n].edges[t]={angle:s.radians+Math.PI,radius:g/2}:o[n].edges[t]={angle:r.radians,radius:g/2}}),c.push(o)}}})}),l.forEach(i=>{if(i.id!==this._center){var a=1.4*(this._shapeConfig.labelConfig.fontSize&&this._shapeConfig.labelConfig.fontSize(i)||11),r=2*a,o=g-i.r;let t=i.radians*(180/Math.PI),n=i.r+5,e="start";(t<-90||90<t)&&(n=-i.r-o-5,e="end",t+=180),i.labelBounds={x:n,y:-a/2,width:o,height:r},i.rotate=t,i.textAnchor=e}else i.labelBounds={x:-d/2,y:-d/2,width:d,height:d}}),this._linkLookup=e.reduce((t,n)=>(t[n.source.id]||(t[n.source.id]=[]),t[n.source.id].push(n.target),t[n.target.id]||(t[n.target.id]=[]),t[n.target.id].push(n.source),t),{});x=Re(e,t=>t.size);if(x[0]!==x[1]){let t=Pt(l,t=>t.r),n=ss["scale"+this._linkSizeScale.charAt(0).toUpperCase()+this._linkSizeScale.slice(1)]().domain(x).range([this._linkSizeMin,t]);e.forEach(t=>{t.size=n(t.size)})}w=Ft.bind(this)(this._shapeConfig,"edge","Path");delete w.on,this._shapes.push((new sc).config(w).strokeWidth(t=>t.size).id(t=>t.source.id+"_"+t.target.id).d(t=>t.spline?`M${t.sourceX},${t.sourceY}C${t.sourceBisectX},${t.sourceBisectY} ${t.targetBisectX},${t.targetBisectY} ${t.targetX},`+t.targetY:`M${t.source.x},${t.source.y} ${t.target.x},`+t.target.y).data(c).select(Dt("g.d3plus-rings-links",{parent:this._select,duration:t,enter:{transform:n},update:{transform:n}}).node()).render());let A=this,M={label:t=>!!(l.length<=this._dataCutoff||this._hover&&this._hover(t)||this._active&&this._active(t))&&this._drawLabel(t.data||t.node,t.i),labelBounds:t=>t.labelBounds,labelConfig:{fontColor:t=>t.id===this._center?Ft.bind(A)(A._shapeConfig,"shape",t.key).labelConfig.fontColor(t):xu(Ft.bind(A)(A._shapeConfig,"shape",t.key).fill(t)),fontResize:t=>t.id===this._center,padding:0,textAnchor:t=>i[t.id].textAnchor||Ft.bind(A)(A._shapeConfig,"shape",t.key).labelConfig.textAnchor,verticalAlign:t=>t.id===this._center?"middle":"top"},rotate:t=>i[t.id].rotate||0,select:Dt("g.d3plus-rings-nodes",{parent:this._select,duration:t,enter:{transform:n},update:{transform:n}}).node()};return Ki().key(t=>t.shape).entries(l).forEach(t=>{this._shapes.push((new lc[t.key]).config(Ft.bind(this)(this._shapeConfig,"shape",t.key)).config(M).data(t.values).render())}),this}
6945
6941
  /**
6946
6942
  @memberof Rings
6947
6943
  @desc Sets the center node to be the node with the given id.
@@ -7031,41 +7027,41 @@ m.push(o={value:h,dice:l<u,children:y.slice(v,b)}),o.dice?Hb(o,e,i,a,w?i+=u*h/w:
7031
7027
  // Need to resets margins and padding because we are
7032
7028
  // skipping over the default render method and using
7033
7029
  // _draw directly.
7034
- this._margin={bottom:0,left:0,right:0,top:0},this._padding={bottom:0,left:0,right:0,top:0},this._draw()},this._sizeMin=5,this._sizeScale="sqrt",this._shape=Ot("Circle"),this._shapeConfig=Tt(this._shapeConfig,{ariaLabel:(t,n)=>{var e=this._size?", "+this._size(t,n):"";return this._drawLabel(t,n)+e+"."},labelConfig:{duration:0,fontMin:1,fontResize:!0,labelPadding:0,textAnchor:"middle",verticalAlign:"middle"},Path:{fill:"none",label:!1,stroke:"#eee",strokeWidth:1}})}}function r9(n,e){let i;if(void 0===e)for(var t of n)null!=t&&(i<t||void 0===i&&t>=t)&&(i=t);else{let t=-1;for(var a of n)null!=(a=e(a,++t,n))&&(i<a||void 0===i&&a>=a)&&(i=a)}return i}function o9(n,e){let i;if(void 0===e)for(var t of n)null!=t&&(i>t||void 0===i&&t>=t)&&(i=t);else{let t=-1;for(var a of n)null!=(a=e(a,++t,n))&&(i>a||void 0===i&&a>=a)&&(i=a)}return i}function s9(n,e){let i=0;if(void 0===e)for(var t of n)(t=+t)&&(i+=t);else{let t=-1;for(var a of n)(a=+e(a,++t,n))&&(i+=a)}return i}function l9(t){return t.target.depth}function u9(t,n){return t.sourceLinks.length?t.depth:n-1}function h9(t){return function(){return t}}function c9(t,n){return d9(t.source,n.source)||t.index-n.index}function g9(t,n){return d9(t.target,n.target)||t.index-n.index}function d9(t,n){return t.y0-n.y0}function f9(t){return t.value}function p9(t){return t.index}function _9(t){return t.nodes}function m9(t){return t.links}function y9(t,n){t=t.get(n);if(t)return t;throw new Error("missing: "+n)}function v9({nodes:t}){for(var e of t){let t=e.y0,n=t;for(var i of e.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(var a of e.targetLinks)a.y1=n+a.width/2,n+=a.width}}function b9(){let S=0,C=0,k=1,A=1,M=24,E=8,z,T=p9,B=u9,D,N,P=_9,L=m9,F=6;// extent
7035
- function n(){var t,n,a={nodes:P.apply(null,arguments),links:L.apply(null,arguments)},{nodes:e,links:r}=[a][0];for([t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];var i,o,s=new Map(e.map((t,n)=>[T(t,n,e),t]));for([i,o]of r.entries()){o.index=i;let{source:t,target:n}=o;"object"!=typeof t&&(t=o.source=y9(s,t)),"object"!=typeof n&&(n=o.target=y9(s,n)),t.sourceLinks.push(o),n.targetLinks.push(o)}if(null!=N)for(var{sourceLinks:l,targetLinks:u}of e)l.sort(N),u.sort(N);var h,r=a.nodes;for(h of r)h.value=void 0===h.fixedValue?Math.max(s9(h.sourceLinks,f9),s9(h.targetLinks,f9)):h.fixedValue;{let t=(r=a.nodes).length,n=new Set(r),e=new Set,i=0;for(;n.size;){for(var c of n){c.depth=i;for(var{target:g}of c.sourceLinks)e.add(g)}if(++i>t)throw new Error("circular link");n=e,e=new Set}}{let t=(r=a.nodes).length,n=new Set(r),e=new Set,i=0;for(;n.size;){for(var d of n){d.height=i;for(var{source:f}of d.targetLinks)e.add(f)}if(++i>t)throw new Error("circular link");n=e,e=new Set}}var p,r=a,_=(({nodes:t})=>{var n,e=r9(t,t=>t.depth)+1,i=(k-S-M)/(e-1),a=new Array(e);for(n of t){var r=Math.max(0,Math.min(e-1,Math.floor(B.call(null,n,e))));n.layer=r,n.x0=S+r*i,n.x1=n.x0+M,a[r]?a[r].push(n):a[r]=[n]}if(D)for(var o of a)o.sort(D);return a})(r),r=(z=Math.min(E,(A-C)/(r9(_,t=>t.length)-1)),_),m=o9(r,t=>(A-C-(t.length-1)*z)/s9(t,f9));for(p of r){let n=C;for(var y of p){y.y0=n,y.y1=n+y.value*m,n=y.y1+z;for(var v of y.sourceLinks)v.width=v.value*m}n=(A-n+z)/(p.length+1);for(let t=0;t<p.length;++t){var b=p[t];b.y0+=n*(t+1),b.y1+=n*(t+1)}(t=>{if(void 0===N)for(var{sourceLinks:n,targetLinks:e}of t)n.sort(g9),e.sort(c9)}
7030
+ this._margin={bottom:0,left:0,right:0,top:0},this._padding={bottom:0,left:0,right:0,top:0},this._draw()},this._sizeMin=5,this._sizeScale="sqrt",this._shape=Ot("Circle"),this._shapeConfig=Tt(this._shapeConfig,{ariaLabel:(t,n)=>{var e=this._size?", "+this._size(t,n):"";return this._drawLabel(t,n)+e+"."},labelConfig:{duration:0,fontMin:1,fontResize:!0,labelPadding:0,textAnchor:"middle",verticalAlign:"middle"},Path:{fill:"none",label:!1,stroke:"#eee",strokeWidth:1}})}}function o9(n,e){let i;if(void 0===e)for(var t of n)null!=t&&(i<t||void 0===i&&t>=t)&&(i=t);else{let t=-1;for(var a of n)null!=(a=e(a,++t,n))&&(i<a||void 0===i&&a>=a)&&(i=a)}return i}function s9(n,e){let i;if(void 0===e)for(var t of n)null!=t&&(i>t||void 0===i&&t>=t)&&(i=t);else{let t=-1;for(var a of n)null!=(a=e(a,++t,n))&&(i>a||void 0===i&&a>=a)&&(i=a)}return i}function l9(n,e){let i=0;if(void 0===e)for(var t of n)(t=+t)&&(i+=t);else{let t=-1;for(var a of n)(a=+e(a,++t,n))&&(i+=a)}return i}function u9(t){return t.target.depth}function h9(t,n){return t.sourceLinks.length?t.depth:n-1}function c9(t){return function(){return t}}function g9(t,n){return f9(t.source,n.source)||t.index-n.index}function d9(t,n){return f9(t.target,n.target)||t.index-n.index}function f9(t,n){return t.y0-n.y0}function p9(t){return t.value}function _9(t){return t.index}function m9(t){return t.nodes}function y9(t){return t.links}function v9(t,n){t=t.get(n);if(t)return t;throw new Error("missing: "+n)}function b9({nodes:t}){for(var e of t){let t=e.y0,n=t;for(var i of e.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(var a of e.targetLinks)a.y1=n+a.width/2,n+=a.width}}function x9(){let S=0,C=0,k=1,A=1,M=24,E=8,z,T=_9,B=h9,D,N,P=m9,L=y9,F=6;// extent
7031
+ function n(){var t,n,a={nodes:P.apply(null,arguments),links:L.apply(null,arguments)},{nodes:e,links:r}=[a][0];for([t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];var i,o,s=new Map(e.map((t,n)=>[T(t,n,e),t]));for([i,o]of r.entries()){o.index=i;let{source:t,target:n}=o;"object"!=typeof t&&(t=o.source=v9(s,t)),"object"!=typeof n&&(n=o.target=v9(s,n)),t.sourceLinks.push(o),n.targetLinks.push(o)}if(null!=N)for(var{sourceLinks:l,targetLinks:u}of e)l.sort(N),u.sort(N);var h,r=a.nodes;for(h of r)h.value=void 0===h.fixedValue?Math.max(l9(h.sourceLinks,p9),l9(h.targetLinks,p9)):h.fixedValue;{let t=(r=a.nodes).length,n=new Set(r),e=new Set,i=0;for(;n.size;){for(var c of n){c.depth=i;for(var{target:g}of c.sourceLinks)e.add(g)}if(++i>t)throw new Error("circular link");n=e,e=new Set}}{let t=(r=a.nodes).length,n=new Set(r),e=new Set,i=0;for(;n.size;){for(var d of n){d.height=i;for(var{source:f}of d.targetLinks)e.add(f)}if(++i>t)throw new Error("circular link");n=e,e=new Set}}var p,r=a,_=(({nodes:t})=>{var n,e=o9(t,t=>t.depth)+1,i=(k-S-M)/(e-1),a=new Array(e);for(n of t){var r=Math.max(0,Math.min(e-1,Math.floor(B.call(null,n,e))));n.layer=r,n.x0=S+r*i,n.x1=n.x0+M,a[r]?a[r].push(n):a[r]=[n]}if(D)for(var o of a)o.sort(D);return a})(r),r=(z=Math.min(E,(A-C)/(o9(_,t=>t.length)-1)),_),m=s9(r,t=>(A-C-(t.length-1)*z)/l9(t,p9));for(p of r){let n=C;for(var y of p){y.y0=n,y.y1=n+y.value*m,n=y.y1+z;for(var v of y.sourceLinks)v.width=v.value*m}n=(A-n+z)/(p.length+1);for(let t=0;t<p.length;++t){var b=p[t];b.y0+=n*(t+1),b.y1+=n*(t+1)}(t=>{if(void 0===N)for(var{sourceLinks:n,targetLinks:e}of t)n.sort(d9),e.sort(g9)}
7036
7032
  // Returns the target.y0 that would produce an ideal link from source to target.
7037
7033
  )(p)}for(let t=0;t<F;++t){var x=Math.pow(.99,t),w=Math.max(1-x,(t+1)/F);(
7038
7034
  // Reposition each node based on its outgoing (source) links.
7039
7035
  (e,i,a)=>{for(let t=e.length,n=t-2;0<=n;--n){var r,o,s=e[n];for(r of s){let t=0,n=0;for(var{target:l,value:u}of r.sourceLinks){u=u*(l.layer-r.layer);t+=(
7040
7036
  // Returns the source.y0 that would produce an ideal link from source to target.
7041
- (t,n)=>{let e=n.y0-(n.targetLinks.length-1)*z/2;for(var{source:i,width:a}of n.targetLinks){if(i===t)break;e+=a+z}for(var{target:r,width:o}of t.sourceLinks){if(r===n)break;e-=o}return e})(r,l)*u,n+=u}0<n&&(o=(t/n-r.y0)*i,r.y0+=o,r.y1+=o,R(r))}void 0===D&&s.sort(d9),O(s,a)}})(_,x,w),(
7037
+ (t,n)=>{let e=n.y0-(n.targetLinks.length-1)*z/2;for(var{source:i,width:a}of n.targetLinks){if(i===t)break;e+=a+z}for(var{target:r,width:o}of t.sourceLinks){if(r===n)break;e-=o}return e})(r,l)*u,n+=u}0<n&&(o=(t/n-r.y0)*i,r.y0+=o,r.y1+=o,R(r))}void 0===D&&s.sort(f9),O(s,a)}})(_,x,w),(
7042
7038
  // Reposition each node based on its incoming (target) links.
7043
- (e,i,a)=>{for(let t=1,n=e.length;t<n;++t){var r,o,s=e[t];for(r of s){let t=0,n=0;for(var{source:l,value:u}of r.targetLinks){u=u*(r.layer-l.layer);t+=((t,n)=>{let e=t.y0-(t.sourceLinks.length-1)*z/2;for(var{target:i,width:a}of t.sourceLinks){if(i===n)break;e+=a+z}for(var{source:r,width:o}of n.targetLinks){if(r===t)break;e-=o}return e})(l,r)*u,n+=u}0<n&&(o=(t/n-r.y0)*i,r.y0+=o,r.y1+=o,R(r))}void 0===D&&s.sort(d9),O(s,a)}})(_,x,w)}return v9(a),a}function O(t,n){var e=t.length>>1,i=t[e];r(t,i.y0-z,e-1,n),a(t,i.y1+z,1+e,n),r(t,A,t.length-1,n),a(t,C,0,n)}
7039
+ (e,i,a)=>{for(let t=1,n=e.length;t<n;++t){var r,o,s=e[t];for(r of s){let t=0,n=0;for(var{source:l,value:u}of r.targetLinks){u=u*(r.layer-l.layer);t+=((t,n)=>{let e=t.y0-(t.sourceLinks.length-1)*z/2;for(var{target:i,width:a}of t.sourceLinks){if(i===n)break;e+=a+z}for(var{source:r,width:o}of n.targetLinks){if(r===t)break;e-=o}return e})(l,r)*u,n+=u}0<n&&(o=(t/n-r.y0)*i,r.y0+=o,r.y1+=o,R(r))}void 0===D&&s.sort(f9),O(s,a)}})(_,x,w)}return b9(a),a}function O(t,n){var e=t.length>>1,i=t[e];r(t,i.y0-z,e-1,n),a(t,i.y1+z,1+e,n),r(t,A,t.length-1,n),a(t,C,0,n)}
7044
7040
  // Push any overlapping nodes down.
7045
7041
  function a(t,n,e,i){for(;e<t.length;++e){var a=t[e],r=(n-a.y0)*i;1e-6<r&&(a.y0+=r,a.y1+=r),n=a.y1+z}}
7046
7042
  // Push any overlapping nodes up.
7047
- function r(t,n,e,i){for(;0<=e;--e){var a=t[e],r=(a.y1-n)*i;1e-6<r&&(a.y0-=r,a.y1-=r),n=a.y0-z}}function R({sourceLinks:n,targetLinks:e}){if(void 0===N){for(let{source:{sourceLinks:t}}of e)t.sort(g9);for(let{target:{targetLinks:t}}of n)t.sort(c9)}}return n.update=function(t){return v9(t),t},n.nodeId=function(t){return arguments.length?(T="function"==typeof t?t:h9(t),n):T},n.nodeAlign=function(t){return arguments.length?(B="function"==typeof t?t:h9(t),n):B},n.nodeSort=function(t){return arguments.length?(D=t,n):D},n.nodeWidth=function(t){return arguments.length?(M=+t,n):M},n.nodePadding=function(t){return arguments.length?(E=z=+t,n):E},n.nodes=function(t){return arguments.length?(P="function"==typeof t?t:h9(t),n):P},n.links=function(t){return arguments.length?(L="function"==typeof t?t:h9(t),n):L},n.linkSort=function(t){return arguments.length?(N=t,n):N},n.size=function(t){return arguments.length?(S=C=0,k=+t[0],A=+t[1],n):[k-S,A-C]},n.extent=function(t){return arguments.length?(S=+t[0][0],k=+t[1][0],C=+t[0][1],A=+t[1][1],n):[[S,C],[k,A]]},n.iterations=function(t){return arguments.length?(F=+t,n):F},n}var x9=Math.PI,w9=2*x9,S9=1e-6,C9=w9-S9;function k9(){this._x0=this._y0=this._x1=this._y1=null,// end of current subpath
7048
- this._=""}function A9(){return new k9}function M9(t){return function(){return t}}function E9(t){return t[0]}function z9(t){return t[1]}k9.prototype=A9.prototype={constructor:k9,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,a,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+a)+","+(this._y1=+r)},arcTo:function(t,n,e,i,a){var r,o,s=this._x1,l=this._y1,u=(e=+e)-(t=+t),h=(i=+i)-(n=+n),c=s-t,g=l-n,d=c*c+g*g;
7043
+ function r(t,n,e,i){for(;0<=e;--e){var a=t[e],r=(a.y1-n)*i;1e-6<r&&(a.y0-=r,a.y1-=r),n=a.y0-z}}function R({sourceLinks:n,targetLinks:e}){if(void 0===N){for(let{source:{sourceLinks:t}}of e)t.sort(d9);for(let{target:{targetLinks:t}}of n)t.sort(g9)}}return n.update=function(t){return b9(t),t},n.nodeId=function(t){return arguments.length?(T="function"==typeof t?t:c9(t),n):T},n.nodeAlign=function(t){return arguments.length?(B="function"==typeof t?t:c9(t),n):B},n.nodeSort=function(t){return arguments.length?(D=t,n):D},n.nodeWidth=function(t){return arguments.length?(M=+t,n):M},n.nodePadding=function(t){return arguments.length?(E=z=+t,n):E},n.nodes=function(t){return arguments.length?(P="function"==typeof t?t:c9(t),n):P},n.links=function(t){return arguments.length?(L="function"==typeof t?t:c9(t),n):L},n.linkSort=function(t){return arguments.length?(N=t,n):N},n.size=function(t){return arguments.length?(S=C=0,k=+t[0],A=+t[1],n):[k-S,A-C]},n.extent=function(t){return arguments.length?(S=+t[0][0],k=+t[1][0],C=+t[0][1],A=+t[1][1],n):[[S,C],[k,A]]},n.iterations=function(t){return arguments.length?(F=+t,n):F},n}var w9=Math.PI,S9=2*w9,C9=1e-6,k9=S9-C9;function A9(){this._x0=this._y0=this._x1=this._y1=null,// end of current subpath
7044
+ this._=""}function M9(){return new A9}function E9(t){return function(){return t}}function z9(t){return t[0]}function T9(t){return t[1]}A9.prototype=M9.prototype={constructor:A9,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,a,r){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+a)+","+(this._y1=+r)},arcTo:function(t,n,e,i,a){var r,o,s=this._x1,l=this._y1,u=(e=+e)-(t=+t),h=(i=+i)-(n=+n),c=s-t,g=l-n,d=c*c+g*g;
7049
7045
  // Is the radius negative? Error.
7050
7046
  if((a=+a)<0)throw new Error("negative radius: "+a);
7051
7047
  // Is this path empty? Move to (x1,y1).
7052
- null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=n):S9<d&&(Math.abs(g*u-h*c)>S9&&a?(o=u*u+h*h,i=(e=e-s)*e+(s=i-l)*s,l=Math.sqrt(o),r=Math.sqrt(d),d=(o=a*Math.tan((x9-Math.acos((o+d-i)/(2*l*r)))/2))/r,i=o/l,
7048
+ null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=n):C9<d&&(Math.abs(g*u-h*c)>C9&&a?(o=u*u+h*h,i=(e=e-s)*e+(s=i-l)*s,l=Math.sqrt(o),r=Math.sqrt(d),d=(o=a*Math.tan((w9-Math.acos((o+d-i)/(2*l*r)))/2))/r,i=o/l,
7053
7049
  // If the start tangent is not coincident with (x0,y0), line to.
7054
- Math.abs(d-1)>S9&&(this._+="L"+(t+d*c)+","+(n+d*g)),this._+="A"+a+","+a+",0,0,"+ +(c*s<g*e)+","+(this._x1=t+i*u)+","+(this._y1=n+i*h)):this._+="L"+(this._x1=t)+","+(this._y1=n))},arc:function(t,n,e,i,a,r){t=+t,n=+n,r=!!r;var o=(e=+e)*Math.cos(i),s=e*Math.sin(i),l=t+o,u=n+s,h=1^r,r=r?i-a:a-i;
7050
+ Math.abs(d-1)>C9&&(this._+="L"+(t+d*c)+","+(n+d*g)),this._+="A"+a+","+a+",0,0,"+ +(c*s<g*e)+","+(this._x1=t+i*u)+","+(this._y1=n+i*h)):this._+="L"+(this._x1=t)+","+(this._y1=n))},arc:function(t,n,e,i,a,r){t=+t,n=+n,r=!!r;var o=(e=+e)*Math.cos(i),s=e*Math.sin(i),l=t+o,u=n+s,h=1^r,r=r?i-a:a-i;
7055
7051
  // Is the radius negative? Error.
7056
7052
  if(e<0)throw new Error("negative radius: "+e);
7057
7053
  // Is this path empty? Move to (x0,y0).
7058
- null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>S9||Math.abs(this._y1-u)>S9)&&(this._+="L"+l+","+u),
7054
+ null===this._x1?this._+="M"+l+","+u:(Math.abs(this._x1-l)>C9||Math.abs(this._y1-u)>C9)&&(this._+="L"+l+","+u),
7059
7055
  // Is this arc empty? We’re done.
7060
7056
  e&&(
7061
7057
  // Is this a complete circle? Draw two arcs to complete the circle.
7062
- C9<(
7058
+ k9<(
7063
7059
  // Does the angle go the wrong way? Flip the direction.
7064
- r=r<0?r%w9+w9:r)?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-s)+"A"+e+","+e+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):S9<r&&(this._+="A"+e+","+e+",0,"+ +(x9<=r)+","+h+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};var T9=Array.prototype.slice;function B9(t){return t.source}function D9(t){return t.target}function N9(t,n,e,i,a){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,a,i,a)}function P9(){return a=N9,r=B9,o=D9,s=E9,l=z9,u=null,n.source=function(t){return arguments.length?(r=t,n):r},n.target=function(t){return arguments.length?(o=t,n):o},n.x=function(t){return arguments.length?(s="function"==typeof t?t:M9(+t),n):s},n.y=function(t){return arguments.length?(l="function"==typeof t?t:M9(+t),n):l},n.context=function(t){return arguments.length?(u=null==t?null:t,n):u},n;function n(){var t,n=T9.call(arguments),e=r.apply(this,n),i=o.apply(this,n);if(u=u||(t=A9()),a(u,+s.apply(this,(n[0]=e,n)),+l.apply(this,n),+s.apply(this,(n[0]=i,n)),+l.apply(this,n)),t)return u=null,t+""||null}var a,r,o,s,l,u}function L9(t){return[t.source.x1,t.y0]}function F9(t){return[t.target.x0,t.y1]}let O9={center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?o9(t.sourceLinks,l9)-1:0},justify:u9,left:function(t){return t.depth},right:function(t,n){return n-1-t.height}};class R9 extends r0{
7060
+ r=r<0?r%S9+S9:r)?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-s)+"A"+e+","+e+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):C9<r&&(this._+="A"+e+","+e+",0,"+ +(w9<=r)+","+h+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};var B9=Array.prototype.slice;function D9(t){return t.source}function N9(t){return t.target}function P9(t,n,e,i,a){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,a,i,a)}function L9(){return a=P9,r=D9,o=N9,s=z9,l=T9,u=null,n.source=function(t){return arguments.length?(r=t,n):r},n.target=function(t){return arguments.length?(o=t,n):o},n.x=function(t){return arguments.length?(s="function"==typeof t?t:E9(+t),n):s},n.y=function(t){return arguments.length?(l="function"==typeof t?t:E9(+t),n):l},n.context=function(t){return arguments.length?(u=null==t?null:t,n):u},n;function n(){var t,n=B9.call(arguments),e=r.apply(this,n),i=o.apply(this,n);if(u=u||(t=M9()),a(u,+s.apply(this,(n[0]=e,n)),+l.apply(this,n),+s.apply(this,(n[0]=i,n)),+l.apply(this,n)),t)return u=null,t+""||null}var a,r,o,s,l,u}function F9(t){return[t.source.x1,t.y0]}function O9(t){return[t.target.x0,t.y1]}let R9={center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?s9(t.sourceLinks,u9)-1:0},justify:h9,left:function(t){return t.depth},right:function(t,n){return n-1-t.height}};class j9 extends o0{
7065
7061
  /**
7066
7062
  Extends the draw behavior of the abstract Viz class.
7067
7063
  @private
7068
- */_draw(t){super._draw(t);var t=this._height-this._margin.top-this._margin.bottom,n=this._width-this._margin.left-this._margin.right,e=(Array.isArray(this._nodes)?this._nodes:this._links.reduce((t,n)=>(t.includes(n[this._linksSource])||t.push(n[this._linksSource]),t.includes(n[this._linksTarget])||t.push(n[this._linksTarget]),t),[]).map(t=>({id:t}))).map((t,n)=>({__d3plus__:!0,data:t,i:n,id:this._nodeId(t,n),node:t,shape:"Rect"}));let i=this._nodeLookup=e.reduce((t,n,e)=>(t[n.id]=e,t),{});var a=this._links.map((e,t)=>{var n=[this._linksSource,this._linksTarget].reduce((t,n)=>(t[n]=i[e[n]],t),{});return{source:n[this._linksSource],target:n[this._linksTarget],value:this._value(e,t)}});this._linkLookup=a.reduce((t,n)=>(t[n.source]||(t[n.source]=[]),t[n.source].push(n.target),t[n.target]||(t[n.target]=[]),t[n.target].push(n.source),t),{});let r=`translate(${this._margin.left}, ${this._margin.top})`;return this._sankey.nodeAlign(this._nodeAlign).nodePadding(this._nodePadding).nodeWidth(this._nodeWidth).nodes(e).links(a).size([n,t])(),this._shapes.push((new oc).config(this._shapeConfig.Path).data(a).d(this._path).select(Dt("g.d3plus-Links",{parent:this._select,enter:{transform:r},update:{transform:r}}).node()).render()),Ki().key(t=>t.shape).entries(e).forEach(t=>{this._shapes.push((new sc[t.key]).data(t.values).height(t=>t.y1-t.y0).width(t=>t.x1-t.x0).x(t=>(t.x1+t.x0)/2).y(t=>(t.y1+t.y0)/2).select(Dt("g.d3plus-sankey-nodes",{parent:this._select,enter:{transform:r},update:{transform:r}}).node()).config(Ft.bind(this)(this._shapeConfig,"shape",t.key)).render())}),this}
7064
+ */_draw(t){super._draw(t);var t=this._height-this._margin.top-this._margin.bottom,n=this._width-this._margin.left-this._margin.right,e=(Array.isArray(this._nodes)?this._nodes:this._links.reduce((t,n)=>(t.includes(n[this._linksSource])||t.push(n[this._linksSource]),t.includes(n[this._linksTarget])||t.push(n[this._linksTarget]),t),[]).map(t=>({id:t}))).map((t,n)=>({__d3plus__:!0,data:t,i:n,id:this._nodeId(t,n),node:t,shape:"Rect"}));let i=this._nodeLookup=e.reduce((t,n,e)=>(t[n.id]=e,t),{});var a=this._links.map((e,t)=>{var n=[this._linksSource,this._linksTarget].reduce((t,n)=>(t[n]=i[e[n]],t),{});return{source:n[this._linksSource],target:n[this._linksTarget],value:this._value(e,t)}});this._linkLookup=a.reduce((t,n)=>(t[n.source]||(t[n.source]=[]),t[n.source].push(n.target),t[n.target]||(t[n.target]=[]),t[n.target].push(n.source),t),{});let r=`translate(${this._margin.left}, ${this._margin.top})`;return this._sankey.nodeAlign(this._nodeAlign).nodePadding(this._nodePadding).nodeWidth(this._nodeWidth).nodes(e).links(a).size([n,t])(),this._shapes.push((new sc).config(this._shapeConfig.Path).data(a).d(this._path).select(Dt("g.d3plus-Links",{parent:this._select,enter:{transform:r},update:{transform:r}}).node()).render()),Ki().key(t=>t.shape).entries(e).forEach(t=>{this._shapes.push((new lc[t.key]).data(t.values).height(t=>t.y1-t.y0).width(t=>t.x1-t.x0).x(t=>(t.x1+t.x0)/2).y(t=>(t.y1+t.y0)/2).select(Dt("g.d3plus-sankey-nodes",{parent:this._select,enter:{transform:r},update:{transform:r}}).node()).config(Ft.bind(this)(this._shapeConfig,"shape",t.key)).render())}),this}
7069
7065
  /**
7070
7066
  @memberof Sankey
7071
7067
  @desc If *value* is specified, sets the hover method to the specified function and returns the current class instance.
@@ -7098,7 +7094,7 @@ r=r<0?r%w9+w9:r)?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-s)+"A"+e+","+e+"
7098
7094
  @desc Sets the nodeAlign property of the sankey layout, which can either be "left", "right", "center", or "justify".
7099
7095
  @param {Function|String} [*value* = "justify"]
7100
7096
  @chainable
7101
- */nodeAlign(t){return arguments.length?(this._nodeAlign="function"==typeof t?t:O9[t],this):this._nodeAlign}
7097
+ */nodeAlign(t){return arguments.length?(this._nodeAlign="function"==typeof t?t:R9[t],this):this._nodeAlign}
7102
7098
  /**
7103
7099
  @memberof Sankey
7104
7100
  @desc If *value* is specified, sets the node id accessor(s) to the specified array of values and returns the current class instance. If *value* is not specified, returns the current node group accessor.
@@ -7138,20 +7134,20 @@ r=r<0?r%w9+w9:r)?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-s)+"A"+e+","+e+"
7138
7134
  @memberof Sankey
7139
7135
  @desc Invoked when creating a new class instance, and sets any default parameters.
7140
7136
  @private
7141
- */constructor(){super(),this._nodeId=p("id"),this._links=p("links"),this._linksSource="source",this._linksTarget="target",this._noDataMessage=!1,this._nodes=p("nodes"),this._nodeAlign=O9.justify,this._nodePadding=8,this._nodeWidth=30,this._on.mouseenter=()=>{},this._on["mouseleave.shape"]=()=>{this.hover(!1)};let n=this._on["mousemove.shape"];this._on["mousemove.shape"]=(a,r,o,t)=>{if(n(a,r,o,t),this._focus&&this._focus===a.id)this.hover(!1),this._on.mouseenter.bind(this)(a,r,o,t),this._focus=void 0;else{let e=this._nodeId(a,r),t=this._nodeLookup[e],n=Object.keys(this._nodeLookup).reduce((t,n)=>(t[this._nodeLookup[n]]=isNaN(n)?n:parseInt(n,10),t),{});o=this._linkLookup[t];let i=[e];o.forEach(t=>{i.push(n[t])}),this.hover((t,n)=>t.source&&t.target?t.source.id===e||t.target.id===e:i.includes(this._nodeId(t,n)))}},this._path=P9().source(L9).target(F9),this._sankey=b9(),this._shape=Ot("Rect"),this._shapeConfig=Tt(this._shapeConfig,{Path:{fill:"none",hoverStyle:{"stroke-width":t=>Math.max(1,Math.abs(t.source.y1-t.source.y0)*(t.value/t.source.value)-2)},label:!1,stroke:"#DBDBDB",strokeOpacity:.5,strokeWidth:t=>Math.max(1,Math.abs(t.source.y1-t.source.y0)*(t.value/t.source.value)-2)},Rect:{}}),this._value=Ot(1)}}class j9 extends x0{
7137
+ */constructor(){super(),this._nodeId=p("id"),this._links=p("links"),this._linksSource="source",this._linksTarget="target",this._noDataMessage=!1,this._nodes=p("nodes"),this._nodeAlign=R9.justify,this._nodePadding=8,this._nodeWidth=30,this._on.mouseenter=()=>{},this._on["mouseleave.shape"]=()=>{this.hover(!1)};let n=this._on["mousemove.shape"];this._on["mousemove.shape"]=(a,r,o,t)=>{if(n(a,r,o,t),this._focus&&this._focus===a.id)this.hover(!1),this._on.mouseenter.bind(this)(a,r,o,t),this._focus=void 0;else{let e=this._nodeId(a,r),t=this._nodeLookup[e],n=Object.keys(this._nodeLookup).reduce((t,n)=>(t[this._nodeLookup[n]]=isNaN(n)?n:parseInt(n,10),t),{});o=this._linkLookup[t];let i=[e];o.forEach(t=>{i.push(n[t])}),this.hover((t,n)=>t.source&&t.target?t.source.id===e||t.target.id===e:i.includes(this._nodeId(t,n)))}},this._path=L9().source(F9).target(O9),this._sankey=x9(),this._shape=Ot("Rect"),this._shapeConfig=Tt(this._shapeConfig,{Path:{fill:"none",hoverStyle:{"stroke-width":t=>Math.max(1,Math.abs(t.source.y1-t.source.y0)*(t.value/t.source.value)-2)},label:!1,stroke:"#DBDBDB",strokeOpacity:.5,strokeWidth:t=>Math.max(1,Math.abs(t.source.y1-t.source.y0)*(t.value/t.source.value)-2)},Rect:{}}),this._value=Ot(1)}}class I9 extends w0{
7142
7138
  /**
7143
7139
  @memberof StackedArea
7144
7140
  @desc Invoked when creating a new class instance, and overrides any default parameters inherited from Plot.
7145
7141
  @private
7146
- */constructor(){super(),this._stacked=!0}}class I9 extends r0{
7142
+ */constructor(){super(),this._stacked=!0}}class H9 extends o0{
7147
7143
  /**
7148
7144
  Extends the draw behavior of the abstract Viz class.
7149
7145
  @private
7150
- */_draw(t){super._draw(t);let n="vertical"===this._orient?this._height-this._margin.top-this._margin.bottom:this._width-this._margin.left-this._margin.right,r="vertical"===this._orient?"left":"top",e=this,i=`translate(${this._margin.left}, ${this._margin.top})`,o="horizontal"===this._orient?this._height-this._margin.top-this._margin.bottom:this._width-this._margin.left-this._margin.right;t=this._treeData=this._tree.separation(this._separation).size([o,n])(gb({key:"root",values:Zu(this._filteredData,this._groupBy.slice(0,this._drawDepth+1))},t=>t.key&&t.values?t.values:null).sort(this._sort)).descendants().filter(t=>t.depth<=this._groupBy.length&&t.parent);
7146
+ */_draw(t){super._draw(t);let n="vertical"===this._orient?this._height-this._margin.top-this._margin.bottom:this._width-this._margin.left-this._margin.right,r="vertical"===this._orient?"left":"top",e=this,i=`translate(${this._margin.left}, ${this._margin.top})`,o="horizontal"===this._orient?this._height-this._margin.top-this._margin.bottom:this._width-this._margin.left-this._margin.right;t=this._treeData=this._tree.separation(this._separation).size([o,n])(db({key:"root",values:Zu(this._filteredData,this._groupBy.slice(0,this._drawDepth+1))},t=>t.key&&t.values?t.values:null).sort(this._sort)).descendants().filter(t=>t.depth<=this._groupBy.length&&t.parent);
7151
7147
  /**
7152
7148
  Merges the values of a given nest branch.
7153
7149
  @private
7154
- */t.forEach((t,n)=>{t.data.key&&t.data.values&&(t.data=function n(t){return Vu(t.values.map(t=>t.key&&t.values?n(t):t),e._aggs)}(t.data)),t.__d3plus__=!0,t.i=n});let a=this._shapeConfig.r;"function"!=typeof a&&(a=Ot(a));var s=Nt(t,t=>1===t.depth?a(t.data,t.i):0),l=Nt(t,t=>t.children?0:a(t.data,t.i)),u=Re(t,t=>t.y);this._labelHeight=Pt(["vertical"===this._orient?50:100,(u[1]-s-l)/(this._groupBy.length+1)]),this._labelWidths=Zu(t,t=>t.depth).map(a=>a.values.reduce((t,n,e)=>{var i=e<a.values.length-1?a.values[e+1].x:o+this._margin[r],e=e?a.values[e-1].x:this._margin[r];return Pt([t,i-n.x,n.x-e])},o));let h=ka().domain(u).range([s+this._labelHeight,n-l-this._labelHeight]);t.forEach(t=>{var n=h(t.y);"horizontal"===this._orient?(t.y=t.x,t.x=n):t.y=n});u={parent:this._select,enter:{transform:i},update:{transform:i}};return this._shapes.push((new oc).data(t.filter(t=>1<t.depth)).select(Dt("g.d3plus-Tree-Links",u).node()).config(Ft.bind(this)(this._shapeConfig,"shape","Path")).config({d:t=>{let n=this._shapeConfig.r;"function"==typeof n&&(n=n(t.data,t.i));var e=t.parent.x-t.x+("vertical"===this._orient?0:n),t=t.parent.y-t.y+("vertical"===this._orient?n:0),i="vertical"===this._orient?0:-n,a="vertical"===this._orient?-n:0;return"vertical"===this._orient?`M${i},${a}C${i},${(a+t)/2} ${e},${(a+t)/2} ${e},`+t:`M${i},${a}C${(i+e)/2},${a} ${(i+e)/2},${t} ${e},`+t},id:(t,n)=>this._ids(t,n).join("-")}).render()),this._shapes.push((new Qh).data(t).select(Dt("g.d3plus-Tree-Shapes",u).node()).config(Ft.bind(this)(this._shapeConfig,"shape","Circle")).config({id:(t,n)=>this._ids(t,n).join("-"),label:(t,n)=>this._label?this._label(t.data,n):(n=this._ids(t,n).slice(0,t.depth))[n.length-1],labelConfig:{textAnchor:t=>"vertical"===this._orient?"middle":t.data.children&&t.data.depth!==this._groupBy.length?"end":"start",verticalAlign:t=>"vertical"===this._orient?1===t.data.depth?"bottom":"top":"middle"},hitArea:(t,n,e)=>{var i=this._labelHeight,a=this._labelWidths[t.depth-1];return{width:"vertical"===this._orient?a:2*e.r+a,height:"horizontal"===this._orient?i:2*e.r+i,x:"vertical"===this._orient?-a/2:t.children&&t.depth!==this._groupBy.length?-(e.r+a):-e.r,y:"horizontal"===this._orient?-i/2:t.children&&t.depth!==this._groupBy.length?-(e.r+this._labelHeight):-e.r}},labelBounds:(t,n,e)=>{var i=this._labelHeight,a="vertical"===this._orient?"height":"width",r=this._labelWidths[t.depth-1];return{["vertical"===this._orient?"width":"height"]:r,[a]:i,["vertical"===this._orient?"x":"y"]:-r/2,["vertical"===this._orient?"y":"x"]:t.children&&t.depth!==this._groupBy.length?-(e.r+i):e.r}}}).render()),this}
7150
+ */t.forEach((t,n)=>{t.data.key&&t.data.values&&(t.data=function n(t){return Vu(t.values.map(t=>t.key&&t.values?n(t):t),e._aggs)}(t.data)),t.__d3plus__=!0,t.i=n});let a=this._shapeConfig.r;"function"!=typeof a&&(a=Ot(a));var s=Nt(t,t=>1===t.depth?a(t.data,t.i):0),l=Nt(t,t=>t.children?0:a(t.data,t.i)),u=Re(t,t=>t.y);this._labelHeight=Pt(["vertical"===this._orient?50:100,(u[1]-s-l)/(this._groupBy.length+1)]),this._labelWidths=Zu(t,t=>t.depth).map(a=>a.values.reduce((t,n,e)=>{var i=e<a.values.length-1?a.values[e+1].x:o+this._margin[r],e=e?a.values[e-1].x:this._margin[r];return Pt([t,i-n.x,n.x-e])},o));let h=ka().domain(u).range([s+this._labelHeight,n-l-this._labelHeight]);t.forEach(t=>{var n=h(t.y);"horizontal"===this._orient?(t.y=t.x,t.x=n):t.y=n});u={parent:this._select,enter:{transform:i},update:{transform:i}};return this._shapes.push((new sc).data(t.filter(t=>1<t.depth)).select(Dt("g.d3plus-Tree-Links",u).node()).config(Ft.bind(this)(this._shapeConfig,"shape","Path")).config({d:t=>{let n=this._shapeConfig.r;"function"==typeof n&&(n=n(t.data,t.i));var e=t.parent.x-t.x+("vertical"===this._orient?0:n),t=t.parent.y-t.y+("vertical"===this._orient?n:0),i="vertical"===this._orient?0:-n,a="vertical"===this._orient?-n:0;return"vertical"===this._orient?`M${i},${a}C${i},${(a+t)/2} ${e},${(a+t)/2} ${e},`+t:`M${i},${a}C${(i+e)/2},${a} ${(i+e)/2},${t} ${e},`+t},id:(t,n)=>this._ids(t,n).join("-")}).render()),this._shapes.push((new tc).data(t).select(Dt("g.d3plus-Tree-Shapes",u).node()).config(Ft.bind(this)(this._shapeConfig,"shape","Circle")).config({id:(t,n)=>this._ids(t,n).join("-"),label:(t,n)=>this._label?this._label(t.data,n):(n=this._ids(t,n).slice(0,t.depth))[n.length-1],labelConfig:{textAnchor:t=>"vertical"===this._orient?"middle":t.data.children&&t.data.depth!==this._groupBy.length?"end":"start",verticalAlign:t=>"vertical"===this._orient?1===t.data.depth?"bottom":"top":"middle"},hitArea:(t,n,e)=>{var i=this._labelHeight,a=this._labelWidths[t.depth-1];return{width:"vertical"===this._orient?a:2*e.r+a,height:"horizontal"===this._orient?i:2*e.r+i,x:"vertical"===this._orient?-a/2:t.children&&t.depth!==this._groupBy.length?-(e.r+a):-e.r,y:"horizontal"===this._orient?-i/2:t.children&&t.depth!==this._groupBy.length?-(e.r+this._labelHeight):-e.r}},labelBounds:(t,n,e)=>{var i=this._labelHeight,a="vertical"===this._orient?"height":"width",r=this._labelWidths[t.depth-1];return{["vertical"===this._orient?"width":"height"]:r,[a]:i,["vertical"===this._orient?"x":"y"]:-r/2,["vertical"===this._orient?"y":"x"]:t.children&&t.depth!==this._groupBy.length?-(e.r+i):e.r}}}).render()),this}
7155
7151
  /**
7156
7152
  @memberof Tree
7157
7153
  @desc If *value* is specified, sets the orientation to the specified value. If *value* is not specified, returns the current orientation.
@@ -7173,17 +7169,17 @@ r=r<0?r%w9+w9:r)?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-s)+"A"+e+","+e+"
7173
7169
  @memberof Tree
7174
7170
  @desc Invoked when creating a new class instance, and sets any default parameters.
7175
7171
  @private
7176
- */constructor(){super(),this._orient="vertical",this._separation=(t,n)=>t.parent===n.parent?1:2,this._shape=Ot("Circle"),this._shapeConfig=Tt(this._shapeConfig,{ariaLabel:(t,n)=>this._treeData?`${this._treeData[n].depth}. ${this._drawLabel(t,n)}.`:"",labelConfig:{fontColor:"#444"},Path:{fill:"none",stroke:"#ccc",strokeWidth:1},r:Ot(5),width:Ot(10),height:Ot(10)}),this._tree=Ub()}}let H9={treemapBinary:function(t,n,e,i,a){var r,o,p=t.children,s=p.length,_=new Array(s+1);for(_[0]=o=r=0;r<s;++r)_[r+1]=o+=p[r].value;!function t(n,e,i,a,r,o,s){if(e-1<=n)return(l=p[n]).x0=a,l.y0=r,l.x1=o,void(l.y1=s);var l=_[n],u=i/2+l,h=n+1,c=e-1;for(;h<c;){var g=h+c>>>1;_[g]<u?h=1+g:c=g}u-_[h-1]<_[h]-u&&n+1<h&&--h;var l=_[h]-l,d=i-l;{var f;s-r<o-a?(t(n,h,l,a,r,f=i?(a*d+o*l)/i:o,s),t(h,e,d,f,r,o,s)):(t(n,h,l,a,r,o,f=i?(r*d+s*l)/i:s),t(h,e,d,a,f,o,s))}}(0,s,t.value,n,e,i,a)},treemapDice:Hb,treemapSlice:Wb,treemapSliceDice:function(t,n,e,i,a){(1&t.depth?Wb:Hb)(t,n,e,i,a)},treemapSquarify:Vb,treemapResquarify:Zb};class G9 extends r0{
7172
+ */constructor(){super(),this._orient="vertical",this._separation=(t,n)=>t.parent===n.parent?1:2,this._shape=Ot("Circle"),this._shapeConfig=Tt(this._shapeConfig,{ariaLabel:(t,n)=>this._treeData?`${this._treeData[n].depth}. ${this._drawLabel(t,n)}.`:"",labelConfig:{fontColor:"#444"},Path:{fill:"none",stroke:"#ccc",strokeWidth:1},r:Ot(5),width:Ot(10),height:Ot(10)}),this._tree=Wb()}}let G9={treemapBinary:function(t,n,e,i,a){var r,o,p=t.children,s=p.length,_=new Array(s+1);for(_[0]=o=r=0;r<s;++r)_[r+1]=o+=p[r].value;!function t(n,e,i,a,r,o,s){if(e-1<=n)return(l=p[n]).x0=a,l.y0=r,l.x1=o,void(l.y1=s);var l=_[n],u=i/2+l,h=n+1,c=e-1;for(;h<c;){var g=h+c>>>1;_[g]<u?h=1+g:c=g}u-_[h-1]<_[h]-u&&n+1<h&&--h;var l=_[h]-l,d=i-l;{var f;s-r<o-a?(t(n,h,l,a,r,f=i?(a*d+o*l)/i:o,s),t(h,e,d,f,r,o,s)):(t(n,h,l,a,r,o,f=i?(r*d+s*l)/i:s),t(h,e,d,a,f,o,s))}}(0,s,t.value,n,e,i,a)},treemapDice:Gb,treemapSlice:Yb,treemapSliceDice:function(t,n,e,i,a){(1&t.depth?Yb:Gb)(t,n,e,i,a)},treemapSquarify:Zb,treemapResquarify:Xb};class K9 extends o0{
7177
7173
  /**
7178
7174
  @memberof Treemap
7179
7175
  @desc Extends the draw behavior of the abstract Viz class.
7180
7176
  @private
7181
- */_draw(t){super._draw(t);let n=Ki();for(let t=0;t<=this._drawDepth;t++)n.key(this._groupBy[t]);n=n.entries(this._filteredData);t=this._treemap.padding(this._layoutPadding).size([this._width-this._margin.left-this._margin.right,this._height-this._margin.top-this._margin.bottom]).tile(this._tile)(gb({values:n},t=>t.values).sum(this._sum).sort(this._sort));let r=[],o=this;
7177
+ */_draw(t){super._draw(t);let n=Ki();for(let t=0;t<=this._drawDepth;t++)n.key(this._groupBy[t]);n=n.entries(this._filteredData);t=this._treemap.padding(this._layoutPadding).size([this._width-this._margin.left-this._margin.right,this._height-this._margin.top-this._margin.bottom]).tile(this._tile)(db({values:n},t=>t.values).sum(this._sum).sort(this._sort));let r=[],o=this;
7182
7178
  /**
7183
7179
  @memberof Treemap
7184
7180
  @desc Flattens and merges treemap data.
7185
7181
  @private
7186
- */t.children&&!function n(e){for(let t=0;t<e.length;t++){var i,a=e[t];a.depth<=o._drawDepth?n(a.children):(i=1===a.data.values.length?o._filteredData.indexOf(a.data.values[0]):void 0,a.__d3plus__=!0,a.id=a.data.key,a.i=-1<i?i:void 0,a.data=Vu(a.data.values,o._aggs),a.x=a.x0+(a.x1-a.x0)/2,a.y=a.y0+(a.y1-a.y0)/2,r.push(a))}}(t.children),this._rankData=r.sort(this._sort).map(t=>t.data);let e=t.value;r.forEach(t=>{t.share=this._sum(t.data,t.i)/e});var t=`translate(${this._margin.left}, ${this._margin.top})`,i=Ft.bind(this)(this._shapeConfig,"shape","Rect");let s=i.labelConfig.fontMax,l=i.labelConfig.fontMin,u=i.labelConfig.padding;return this._shapes.push((new tc).data(r).label(t=>[this._drawLabel(t.data,t.i),kh(100*t.share,this._locale)+"%"]).select(Dt("g.d3plus-Treemap",{parent:this._select,enter:{transform:t},update:{transform:t}}).node()).config({height:t=>t.y1-t.y0,labelBounds:(t,n,e)=>{var i=e.height;let a=Math.min(s,.5*(i-2*u));return a<l&&(a=0),[{width:e.width,height:i-a,x:-e.width/2,y:-i/2},{width:e.width,height:a+2*u,x:-e.width/2,y:i/2-a-2*u}]},labelConfig:{textAnchor:(t,n,e)=>{let i,a=e;for(;void 0===i&&a;)void 0!==a.l&&(i=a.l),a=a.__d3plusParent__;return i?"middle":"start"},verticalAlign:(t,n,e)=>{let i,a=e;for(;void 0===i&&a;)void 0!==a.l&&(i=a.l),a=a.__d3plusParent__;return i?"bottom":"top"}},width:t=>t.x1-t.x0}).config(i).render()),this}
7182
+ */t.children&&!function n(e){for(let t=0;t<e.length;t++){var i,a=e[t];a.depth<=o._drawDepth?n(a.children):(i=1===a.data.values.length?o._filteredData.indexOf(a.data.values[0]):void 0,a.__d3plus__=!0,a.id=a.data.key,a.i=-1<i?i:void 0,a.data=Vu(a.data.values,o._aggs),a.x=a.x0+(a.x1-a.x0)/2,a.y=a.y0+(a.y1-a.y0)/2,r.push(a))}}(t.children),this._rankData=r.sort(this._sort).map(t=>t.data);let e=t.value;r.forEach(t=>{t.share=this._sum(t.data,t.i)/e});var t=`translate(${this._margin.left}, ${this._margin.top})`,i=Ft.bind(this)(this._shapeConfig,"shape","Rect");let s=i.labelConfig.fontMax,l=i.labelConfig.fontMin,u=i.labelConfig.padding;return this._shapes.push((new nc).data(r).label(t=>[this._drawLabel(t.data,t.i),kh(100*t.share,this._locale)+"%"]).select(Dt("g.d3plus-Treemap",{parent:this._select,enter:{transform:t},update:{transform:t}}).node()).config({height:t=>t.y1-t.y0,labelBounds:(t,n,e)=>{var i=e.height;let a=Math.min(s,.5*(i-2*u));return a<l&&(a=0),[{width:e.width,height:i-a,x:-e.width/2,y:-i/2},{width:e.width,height:a+2*u,x:-e.width/2,y:i/2-a-2*u}]},labelConfig:{textAnchor:(t,n,e)=>{let i,a=e;for(;void 0===i&&a;)void 0!==a.l&&(i=a.l),a=a.__d3plusParent__;return i?"middle":"start"},verticalAlign:(t,n,e)=>{let i,a=e;for(;void 0===i&&a;)void 0!==a.l&&(i=a.l),a=a.__d3plusParent__;return i?"bottom":"top"}},width:t=>t.x1-t.x0}).config(i).render()),this}
7187
7183
  /**
7188
7184
  * Applies the threshold algorithm for Treemaps.
7189
7185
  * @param {Array} data The data to process.
@@ -7225,10 +7221,10 @@ r=r<0?r%w9+w9:r)?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-s)+"A"+e+","+e+"
7225
7221
 
7226
7222
  Can either be a string referring to a d3-hierarchy [tiling method](https://github.com/d3/d3-hierarchy#treemap-tiling), or a custom function in the same format.
7227
7223
  @param {String|Function} [*value* = "squarify"]
7228
- */tile(t){return arguments.length?(this._tile="string"==typeof t?H9["treemap"+t.charAt(0).toUpperCase()+t.slice(1)]||Vb:t,this):this._tile}
7224
+ */tile(t){return arguments.length?(this._tile="string"==typeof t?G9["treemap"+t.charAt(0).toUpperCase()+t.slice(1)]||Zb:t,this):this._tile}
7229
7225
  /**
7230
7226
  @memberof Treemap
7231
7227
  @desc Invoked when creating a new class instance, and sets any default parameters.
7232
7228
  @private
7233
- */constructor(){super(),this._layoutPadding=1;let e=this._legend;function n(t){return t.x0=t.y0=0,t.x1=r,t.y1=s,t.eachBefore(i),l=[0],a&&t.eachBefore(Ib),t}function i(t){var n=l[t.depth],e=t.x0+n,i=t.y0+n,a=t.x1-n,r=t.y1-n;a<e&&(e=a=(e+a)/2),r<i&&(i=r=(i+r)/2),t.x0=e,t.y0=i,t.x1=a,t.y1=r,t.children&&(n=l[t.depth+1]=u(t)/2,e+=d(t)-n,i+=h(t)-n,(a-=c(t)-n)<e&&(e=a=(e+a)/2),(r-=g(t)-n)<i&&(i=r=(i+r)/2),o(t,e,i,a,r))}var o,a,r,s,l,u,h,c,g,d;this._legend=(t,n)=>n.length!==this._filteredData.length&&e.bind(this)(t,n),this._legendSort=(t,n)=>this._sum(n)-this._sum(t),this._legendTooltip=Tt({},this._legendTooltip,{tbody:[]}),this._shapeConfig=Tt({},this._shapeConfig,{ariaLabel:(t,n)=>(this._rankData?this._rankData.indexOf(t)+1+". ":"")+this._drawLabel(t,n)+`, ${this._sum(t,n)}.`,labelConfig:{fontMax:32,fontMin:8,fontResize:!0,padding:5}}),this._sort=(t,n)=>{var e=f(t),i=f(n);return e&&!i?1:!e&&i?-1:n.value-t.value},this._sum=p("value"),this._thresholdKey=this._sum,this._tile=Vb,this._tooltipConfig=Tt({},this._tooltipConfig,{tbody:[[()=>this._translate("Share"),(t,n,e)=>kh(100*e.share,this._locale)+"%"]]}),this._treemap=(o=Vb,a=!1,s=r=1,l=[0],d=g=c=h=u=vb,n.round=function(t){return arguments.length?(a=!!t,n):a},n.size=function(t){return arguments.length?(r=+t[0],s=+t[1],n):[r,s]},n.tile=function(t){return arguments.length?(o=yb(t),n):o},n.padding=function(t){return arguments.length?n.paddingInner(t).paddingOuter(t):n.paddingInner()},n.paddingInner=function(t){return arguments.length?(u="function"==typeof t?t:bb(+t),n):u},n.paddingOuter=function(t){return arguments.length?n.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):n.paddingTop()},n.paddingTop=function(t){return arguments.length?(h="function"==typeof t?t:bb(+t),n):h},n.paddingRight=function(t){return arguments.length?(c="function"==typeof t?t:bb(+t),n):c},n.paddingBottom=function(t){return arguments.length?(g="function"==typeof t?t:bb(+t),n):g},n.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:bb(+t),n):d},n.round(!0));let f=t=>t.children&&1===t.children.length&&t.children[0].data._isAggregation}}t.Area=Xh,t.AreaPlot=x0,t.Axis=fc,t.AxisBottom=pc,t.AxisLeft=_c,t.AxisRight=mc,t.AxisTop=yc,t.Bar=Jh,t.BarChart=w0,t.BaseClass=Ri,t.Box=rc,t.BoxWhisker=S0,t.BumpChart=C0,t.Circle=Qh,t.ColorScale=bc,t.Donut=A0,t.Geomap=j6,t.Image=Nh,t.Legend=vc,t.Line=nc,t.LinePlot=I6,t.Matrix=K6,t.Message=xc,t.Network=hb,t.Pack=Jb,t.Path=oc,t.Pie=k0,t.Plot=b0,t.Priestley=Qb,t.RESET=Pi,t.Radar=n9,t.RadialMatrix=i9,t.Rect=tc,t.Rings=a9,t.Sankey=R9,t.Shape=Ph,t.StackedArea=j9,t.TextBox=Sc,t.Timeline=ng,t.Tooltip=dd,t.Tree=I9,t.Treemap=G9,t.Viz=r0,t.Whisker=ic,t.accessor=p,t.configPrep=Ft,t.constant=Ot,t.uuid=Fi});
7229
+ */constructor(){super(),this._layoutPadding=1;let e=this._legend;function n(t){return t.x0=t.y0=0,t.x1=r,t.y1=s,t.eachBefore(i),l=[0],a&&t.eachBefore(Hb),t}function i(t){var n=l[t.depth],e=t.x0+n,i=t.y0+n,a=t.x1-n,r=t.y1-n;a<e&&(e=a=(e+a)/2),r<i&&(i=r=(i+r)/2),t.x0=e,t.y0=i,t.x1=a,t.y1=r,t.children&&(n=l[t.depth+1]=u(t)/2,e+=d(t)-n,i+=h(t)-n,(a-=c(t)-n)<e&&(e=a=(e+a)/2),(r-=g(t)-n)<i&&(i=r=(i+r)/2),o(t,e,i,a,r))}var o,a,r,s,l,u,h,c,g,d;this._legend=(t,n)=>n.length!==this._filteredData.length&&e.bind(this)(t,n),this._legendSort=(t,n)=>this._sum(n)-this._sum(t),this._legendTooltip=Tt({},this._legendTooltip,{tbody:[]}),this._shapeConfig=Tt({},this._shapeConfig,{ariaLabel:(t,n)=>(this._rankData?this._rankData.indexOf(t)+1+". ":"")+this._drawLabel(t,n)+`, ${this._sum(t,n)}.`,labelConfig:{fontMax:32,fontMin:8,fontResize:!0,padding:5}}),this._sort=(t,n)=>{var e=f(t),i=f(n);return e&&!i?1:!e&&i?-1:n.value-t.value},this._sum=p("value"),this._thresholdKey=this._sum,this._tile=Zb,this._tooltipConfig=Tt({},this._tooltipConfig,{tbody:[[()=>this._translate("Share"),(t,n,e)=>kh(100*e.share,this._locale)+"%"]]}),this._treemap=(o=Zb,a=!1,s=r=1,l=[0],d=g=c=h=u=bb,n.round=function(t){return arguments.length?(a=!!t,n):a},n.size=function(t){return arguments.length?(r=+t[0],s=+t[1],n):[r,s]},n.tile=function(t){return arguments.length?(o=vb(t),n):o},n.padding=function(t){return arguments.length?n.paddingInner(t).paddingOuter(t):n.paddingInner()},n.paddingInner=function(t){return arguments.length?(u="function"==typeof t?t:xb(+t),n):u},n.paddingOuter=function(t){return arguments.length?n.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):n.paddingTop()},n.paddingTop=function(t){return arguments.length?(h="function"==typeof t?t:xb(+t),n):h},n.paddingRight=function(t){return arguments.length?(c="function"==typeof t?t:xb(+t),n):c},n.paddingBottom=function(t){return arguments.length?(g="function"==typeof t?t:xb(+t),n):g},n.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:xb(+t),n):d},n.round(!0));let f=t=>t.children&&1===t.children.length&&t.children[0].data._isAggregation}}t.Area=Jh,t.AreaPlot=w0,t.Axis=pc,t.AxisBottom=_c,t.AxisLeft=mc,t.AxisRight=yc,t.AxisTop=vc,t.Bar=Qh,t.BarChart=S0,t.BaseClass=Ri,t.Box=oc,t.BoxWhisker=C0,t.BumpChart=k0,t.Circle=tc,t.ColorScale=xc,t.Donut=M0,t.Geomap=I6,t.Image=Nh,t.Legend=bc,t.Line=ec,t.LinePlot=H6,t.Matrix=$6,t.Message=wc,t.Network=cb,t.Pack=Qb,t.Path=sc,t.Pie=A0,t.Plot=x0,t.Priestley=t9,t.RESET=Pi,t.Radar=e9,t.RadialMatrix=a9,t.Rect=nc,t.Rings=r9,t.Sankey=j9,t.Shape=Lh,t.StackedArea=I9,t.TextBox=Cc,t.Timeline=eg,t.Tooltip=fd,t.Tree=H9,t.Treemap=K9,t.Viz=o0,t.Whisker=ac,t.accessor=p,t.configPrep=Ft,t.constant=Ot,t.uuid=Fi});
7234
7230
  //# sourceMappingURL=d3plus-core.full.js.map