eurostat-map 3.6.1 → 3.6.4
Sign up to get free protection for your applications and to get access to all the features.
- package/build/eurostatmap.min.js +1 -1
- package/package.json +1 -1
package/build/eurostatmap.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.eurostatmap=e():t.eurostatmap=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="build/",n(n.s=53)}({0:function(t,e,n){var r=n(54),i=n(55),o=n(56),a=n(57);t.exports=function(t){return r(t)||i(t)||o(t)||a()},t.exports.default=t.exports,t.exports.__esModule=!0},20:function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.default=t.exports,t.exports.__esModule=!0},21:function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},22:function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=n=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},53:function(t,e,n){t.exports=n(58)},54:function(t,e,n){var r=n(20);t.exports=function(t){if(Array.isArray(t))return r(t)},t.exports.default=t.exports,t.exports.__esModule=!0},55:function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},56:function(t,e,n){var r=n(20);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},57:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},58:function(t,e,n){"use strict";n.r(e),n.d(e,"map",(function(){return $h})),n.d(e,"getFillPatternDefinitionFun",(function(){return Kh}));var r=n(0),i=n.n(r);function o(){}var a=function(t){return null==t?o:function(){return this.querySelector(t)}};function l(){return[]}var s=function(t){return null==t?l:function(){return this.querySelectorAll(t)}},u=function(t){return function(){return this.matches(t)}},c=function(t){return new Array(t.length)};function f(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}f.prototype={constructor:f,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function h(t,e,n,r,i,o){for(var a,l=0,s=e.length,u=o.length;l<u;++l)(a=e[l])?(a.__data__=o[l],r[l]=a):n[l]=new f(t,o[l]);for(;l<s;++l)(a=e[l])&&(i[l]=a)}function p(t,e,n,r,i,o,a){var l,s,u,c={},h=e.length,p=o.length,d=new Array(h);for(l=0;l<h;++l)(s=e[l])&&(d[l]=u="$"+a.call(s,s.__data__,l,e),u in c?i[l]=s:c[u]=s);for(l=0;l<p;++l)(s=c[u="$"+a.call(t,o[l],l,o)])?(r[l]=s,s.__data__=o[l],c[u]=null):n[l]=new f(t,o[l]);for(l=0;l<h;++l)(s=e[l])&&c[d[l]]===s&&(i[l]=s)}function d(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var g="http://www.w3.org/1999/xhtml",y={svg:"http://www.w3.org/2000/svg",xhtml:g,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},_=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),y.hasOwnProperty(e)?{space:y[e],local:t}:t};function v(t){return function(){this.removeAttribute(t)}}function m(t){return function(){this.removeAttributeNS(t.space,t.local)}}function x(t,e){return function(){this.setAttribute(t,e)}}function b(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function S(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function w(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var T=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function M(t){return function(){this.style.removeProperty(t)}}function k(t,e,n){return function(){this.style.setProperty(t,e,n)}}function z(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function F(t,e){return t.style.getPropertyValue(e)||T(t).getComputedStyle(t,null).getPropertyValue(e)}function C(t){return function(){delete this[t]}}function A(t,e){return function(){this[t]=e}}function E(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function L(t){return t.trim().split(/^|\s+/)}function N(t){return t.classList||new D(t)}function D(t){this._node=t,this._names=L(t.getAttribute("class")||"")}function P(t,e){for(var n=N(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function O(t,e){for(var n=N(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function R(t){return function(){P(this,t)}}function I(t){return function(){O(this,t)}}function W(t,e){return function(){(e.apply(this,arguments)?P:O)(this,t)}}D.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function U(){this.textContent=""}function j(t){return function(){this.textContent=t}}function H(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function B(){this.innerHTML=""}function G(t){return function(){this.innerHTML=t}}function Y(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function q(){this.nextSibling&&this.parentNode.appendChild(this)}function V(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function X(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===g&&e.documentElement.namespaceURI===g?e.createElement(t):e.createElementNS(n,t)}}function Z(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var $=function(t){var e=_(t);return(e.local?Z:X)(e)};function K(){return null}function J(){var t=this.parentNode;t&&t.removeChild(this)}function Q(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function tt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var et={},nt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(et={mouseenter:"mouseover",mouseleave:"mouseout"}));function rt(t,e,n){return t=it(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function it(t,e,n){return function(r){var i=nt;nt=r;try{t.call(this,this.__data__,e,n)}finally{nt=i}}}function ot(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function at(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function lt(t,e,n){var r=et.hasOwnProperty(t.type)?rt:it;return function(i,o,a){var l,s=this.__on,u=r(e,o,a);if(s)for(var c=0,f=s.length;c<f;++c)if((l=s[c]).type===t.type&&l.name===t.name)return this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=u,l.capture=n),void(l.value=e);this.addEventListener(t.type,u,n),l={type:t.type,name:t.name,value:e,listener:u,capture:n},s?s.push(l):this.__on=[l]}}function st(t,e,n,r){var i=nt;t.sourceEvent=nt,nt=t;try{return e.apply(n,r)}finally{nt=i}}function ut(t,e,n){var r=T(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ct(t,e){return function(){return ut(this,t,e)}}function ft(t,e){return function(){return ut(this,t,e.apply(this,arguments))}}var ht=[null];function pt(t,e){this._groups=t,this._parents=e}function dt(){return new pt([[document.documentElement]],ht)}pt.prototype=dt.prototype={constructor:pt,select:function(t){"function"!=typeof t&&(t=a(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,l,s=e[i],u=s.length,c=r[i]=new Array(u),f=0;f<u;++f)(o=s[f])&&(l=t.call(o,o.__data__,f,s))&&("__data__"in o&&(l.__data__=o.__data__),c[f]=l);return new pt(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=s(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,l=e[o],u=l.length,c=0;c<u;++c)(a=l[c])&&(r.push(t.call(a,a.__data__,c,l)),i.push(a));return new pt(r,i)},filter:function(t){"function"!=typeof t&&(t=u(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],l=a.length,s=r[i]=[],c=0;c<l;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&s.push(o);return new pt(r,this._parents)},data:function(t,e){if(!t)return y=new Array(this.size()),c=-1,this.each((function(t){y[++c]=t})),y;var n,r=e?p:h,i=this._parents,o=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=o.length,l=new Array(a),s=new Array(a),u=new Array(a),c=0;c<a;++c){var f=i[c],d=o[c],g=d.length,y=t.call(f,f&&f.__data__,c,i),_=y.length,v=s[c]=new Array(_),m=l[c]=new Array(_);r(f,d,v,m,u[c]=new Array(g),y,e);for(var x,b,S=0,w=0;S<_;++S)if(x=v[S]){for(S>=w&&(w=S+1);!(b=m[w])&&++w<_;);x._next=b||null}}return(l=new pt(l,i))._enter=s,l._exit=u,l},enter:function(){return new pt(this._enter||this._groups.map(c),this._parents)},exit:function(){return new pt(this._exit||this._groups.map(c),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),l=0;l<o;++l)for(var s,u=e[l],c=n[l],f=u.length,h=a[l]=new Array(f),p=0;p<f;++p)(s=u[p]||c[p])&&(h[p]=s);for(;l<r;++l)a[l]=e[l];return new pt(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=d);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,l=n[o],s=l.length,u=i[o]=new Array(s),c=0;c<s;++c)(a=l[c])&&(u[c]=a);u.sort(e)}return new pt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,l=o.length;a<l;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=_(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?m:v:"function"==typeof e?n.local?w:S:n.local?b:x)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?M:"function"==typeof e?z:k)(t,e,null==n?"":n)):F(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?C:"function"==typeof e?E:A)(t,e)):this.node()[t]},classed:function(t,e){var n=L(t+"");if(arguments.length<2){for(var r=N(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?W:e?R:I)(n,e))},text:function(t){return arguments.length?this.each(null==t?U:("function"==typeof t?H:j)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?B:("function"==typeof t?Y:G)(t)):this.node().innerHTML},raise:function(){return this.each(q)},lower:function(){return this.each(V)},append:function(t){var e="function"==typeof t?t:$(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:$(t),r=null==e?K:"function"==typeof e?e:a(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(J)},clone:function(t){return this.select(t?tt:Q)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=ot(t+""),a=o.length;if(!(arguments.length<2)){for(l=e?lt:at,null==n&&(n=!1),r=0;r<a;++r)this.each(l(o[r],e,n));return this}var l=this.node().__on;if(l)for(var s,u=0,c=l.length;u<c;++u)for(r=0,s=l[u];r<a;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,e){return this.each(("function"==typeof e?ft:ct)(t,e))}};var gt=dt,yt=function(t){return"string"==typeof t?new pt([[document.querySelector(t)]],[document.documentElement]):new pt([[t]],ht)},_t=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},vt=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return _t(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}};var mt=vt(_t),xt=mt.right,bt=(mt.left,xt);var St=function(t){return null===t?NaN:+t},wt=function(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},Tt=Array.prototype,Mt=(Tt.slice,Tt.map,function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}),kt=Math.sqrt(50),zt=Math.sqrt(10),Ft=Math.sqrt(2),Ct=function(t,e,n){var r,i,o,a,l=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=At(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++l<i;)o[l]=(t+l)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++l<i;)o[l]=(t-l)/a;return r&&o.reverse(),o};function At(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=kt?10:o>=zt?5:o>=Ft?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=kt?10:o>=zt?5:o>=Ft?2:1)}function Et(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=kt?i*=10:o>=zt?i*=5:o>=Ft&&(i*=2),e<t?-i:i}var Lt=function(t,e,n){if(null==n&&(n=St),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}},Nt=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r},Dt=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n},Pt=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r};function Ot(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Rt(){}function It(t,e){var n=new Rt;if(t instanceof Rt)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}Rt.prototype=It.prototype={constructor:Rt,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Wt=It;function Ut(){}var jt=Wt.prototype;function Ht(t,e){var n=new Ut;if(t instanceof Ut)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}Ut.prototype=Ht.prototype={constructor:Ut,has:jt.has,add:function(t){return this["$"+(t+="")]=t,this},remove:jt.remove,clear:jt.clear,values:jt.keys,size:jt.size,empty:jt.empty,each:jt.each};var Bt=Array.prototype,Gt=Bt.map,Yt=Bt.slice,qt={name:"implicit"};function Vt(){var t=Wt(),e=[],n=[],r=qt;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==qt)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Wt();for(var r,o,a=-1,l=n.length;++a<l;)t.has(o=(r=n[a])+"")||t.set(o,e.push(r));return i},i.range=function(t){return arguments.length?(n=Yt.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Vt(e,n).unknown(r)},Ot.apply(i,arguments),i}var Xt=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Zt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function $t(){}var Kt="\\s*([+-]?\\d+)\\s*",Jt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",te=/^#([0-9a-f]{3,8})$/,ee=new RegExp("^rgb\\("+[Kt,Kt,Kt]+"\\)$"),ne=new RegExp("^rgb\\("+[Qt,Qt,Qt]+"\\)$"),re=new RegExp("^rgba\\("+[Kt,Kt,Kt,Jt]+"\\)$"),ie=new RegExp("^rgba\\("+[Qt,Qt,Qt,Jt]+"\\)$"),oe=new RegExp("^hsl\\("+[Jt,Qt,Qt]+"\\)$"),ae=new RegExp("^hsla\\("+[Jt,Qt,Qt,Jt]+"\\)$"),le={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function se(){return this.rgb().formatHex()}function ue(){return this.rgb().formatRgb()}function ce(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=te.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?fe(e):3===n?new ge(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?he(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?he(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ee.exec(t))?new ge(e[1],e[2],e[3],1):(e=ne.exec(t))?new ge(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=re.exec(t))?he(e[1],e[2],e[3],e[4]):(e=ie.exec(t))?he(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=oe.exec(t))?me(e[1],e[2]/100,e[3]/100,1):(e=ae.exec(t))?me(e[1],e[2]/100,e[3]/100,e[4]):le.hasOwnProperty(t)?fe(le[t]):"transparent"===t?new ge(NaN,NaN,NaN,0):null}function fe(t){return new ge(t>>16&255,t>>8&255,255&t,1)}function he(t,e,n,r){return r<=0&&(t=e=n=NaN),new ge(t,e,n,r)}function pe(t){return t instanceof $t||(t=ce(t)),t?new ge((t=t.rgb()).r,t.g,t.b,t.opacity):new ge}function de(t,e,n,r){return 1===arguments.length?pe(t):new ge(t,e,n,null==r?1:r)}function ge(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ye(){return"#"+ve(this.r)+ve(this.g)+ve(this.b)}function _e(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function ve(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function me(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new be(t,e,n,r)}function xe(t){if(t instanceof be)return new be(t.h,t.s,t.l,t.opacity);if(t instanceof $t||(t=ce(t)),!t)return new be;if(t instanceof be)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=e===o?(n-r)/l+6*(n<r):n===o?(r-e)/l+2:(e-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new be(a,l,s,t.opacity)}function be(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Se(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function we(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}Xt($t,ce,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:se,formatHex:se,formatHsl:function(){return xe(this).formatHsl()},formatRgb:ue,toString:ue}),Xt(ge,de,Zt($t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ge(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ge(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ye,formatHex:ye,formatRgb:_e,toString:_e})),Xt(be,(function(t,e,n,r){return 1===arguments.length?xe(t):new be(t,e,n,null==r?1:r)}),Zt($t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new be(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new be(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ge(Se(t>=240?t-240:t+120,i,r),Se(t,i,r),Se(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Te=function(t){return function(){return t}};function Me(t,e){return function(n){return t+n*e}}function ke(t){return 1==(t=+t)?ze:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Te(isNaN(e)?n:e)}}function ze(t,e){var n=e-t;return n?Me(t,n):Te(isNaN(t)?e:t)}var Fe=function t(e){var n=ke(e);function r(t,e){var r=n((t=de(t)).r,(e=de(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=ze(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Ce(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),l=new Array(i);for(n=0;n<i;++n)r=de(e[n]),o[n]=r.r||0,a[n]=r.g||0,l[n]=r.b||0;return o=t(o),a=t(a),l=t(l),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=l(t),r+""}}}var Ae=Ce((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,l=r<e-1?t[r+2]:2*o-i;return we((n-r/e)*e,a,i,o,l)}})),Ee=(Ce((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],l=t[(r+2)%e];return we((n-r/e)*e,i,o,a,l)}})),function(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}});function Le(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Ne(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Ue(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}var De=function(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}},Pe=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}},Oe=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Ue(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},Re=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ie=new RegExp(Re.source,"g");var We=function(t,e){var n,r,i,o=Re.lastIndex=Ie.lastIndex=0,a=-1,l=[],s=[];for(t+="",e+="";(n=Re.exec(t))&&(r=Ie.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),l[a]?l[a]+=i:l[++a]=i),(n=n[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,s.push({i:a,x:Pe(n,r)})),o=Ie.lastIndex;return o<e.length&&(i=e.slice(o),l[a]?l[a]+=i:l[++a]=i),l.length<2?s[0]?function(t){return function(e){return t(e)+""}}(s[0].x):function(t){return function(){return t}}(e):(e=s.length,function(t){for(var n,r=0;r<e;++r)l[(n=s[r]).i]=n.x(t);return l.join("")})},Ue=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?Te(e):("number"===r?Pe:"string"===r?(n=ce(e))?(e=n,Fe):We:e instanceof ce?Fe:e instanceof Date?De:Le(e)?Ee:Array.isArray(e)?Ne:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Oe:Pe)(t,e)},je=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}},He=function(t){return+t},Be=[0,1];function Ge(t){return t}function Ye(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function qe(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Ve(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Ye(i,r),o=n(a,o)):(r=Ye(r,i),o=n(o,a)),function(t){return o(r(t))}}function Xe(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Ye(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=bt(t,e,1,r)-1;return o[n](i[n](e))}}function Ze(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function $e(){var t,e,n,r,i,o,a=Be,l=Be,s=Ue,u=Ge;function c(){return r=Math.min(a.length,l.length)>2?Xe:Ve,i=o=null,f}function f(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),l,s)))(t(u(e)))}return f.invert=function(n){return u(e((o||(o=r(l,a.map(t),Pe)))(n)))},f.domain=function(t){return arguments.length?(a=Gt.call(t,He),u===Ge||(u=qe(a)),c()):a.slice()},f.range=function(t){return arguments.length?(l=Yt.call(t),c()):l.slice()},f.rangeRound=function(t){return l=Yt.call(t),s=je,c()},f.clamp=function(t){return arguments.length?(u=t?qe(a):Ge,f):u!==Ge},f.interpolate=function(t){return arguments.length?(s=t,c()):s},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,c()}}function Ke(t,e){return $e()(t,e)}var Je=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qe(t){if(!(e=Je.exec(t)))throw new Error("invalid format: "+t);var e;return new tn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function tn(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}Qe.prototype=tn.prototype,tn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};function en(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}var nn,rn,on,an,ln=function(t){return(t=en(Math.abs(t)))?t[1]:NaN},sn=function(t,e){var n=en(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},un={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return sn(100*t,e)},r:sn,s:function(t,e){var n=en(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(nn=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+en(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},cn=function(t){return t},fn=Array.prototype.map,hn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],pn=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?cn:(e=fn.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,l=e[0],s=0;i>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),o.push(t.substring(i-=l,i+l)),!((s+=l+1)>r));)l=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",l=void 0===t.numerals?cn:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(fn.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=Qe(t)).fill,n=t.align,f=t.sign,h=t.symbol,p=t.zero,d=t.width,g=t.comma,y=t.precision,_=t.trim,v=t.type;"n"===v?(g=!0,v="g"):un[v]||(void 0===y&&(y=12),_=!0,v="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var m="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===h?o:/[%p]/.test(v)?s:"",b=un[v],S=/[defgprs%]/.test(v);function w(t){var i,o,s,h=m,w=x;if("c"===v)w=b(t)+w,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:b(Math.abs(t),y),_&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==f&&(T=!1),h=(T?"("===f?f:u:"-"===f||"("===f?"":f)+h,w=("s"===v?hn[8+nn/3]:"")+w+(T&&"("===f?")":""),S)for(i=-1,o=t.length;++i<o;)if(48>(s=t.charCodeAt(i))||s>57){w=(46===s?a+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}g&&!p&&(t=r(t,1/0));var M=h.length+t.length+w.length,k=M<d?new Array(d-M+1).join(e):"";switch(g&&p&&(t=r(k+t,k.length?d-w.length:1/0),k=""),n){case"<":t=h+t+w+k;break;case"=":t=h+k+t+w;break;case"^":t=k.slice(0,M=k.length>>1)+h+t+w+k.slice(M);break;default:t=k+h+t+w}return l(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),w.toString=function(){return t+""},w}return{format:f,formatPrefix:function(t,e){var n=f(((t=Qe(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(ln(e)/3))),i=Math.pow(10,-r),o=hn[8+r/3];return function(t){return n(i*t)+o}}}};function dn(t){return rn=pn(t),on=rn.format,an=rn.formatPrefix,rn}dn({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var gn=function(t,e,n,r){var i,o=Et(t,e,n);switch((r=Qe(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ln(e)/3)))-ln(Math.abs(t)))}(o,a))||(r.precision=i),an(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ln(e)-ln(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-ln(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return on(r)};function yn(t){var e=t.domain;return t.ticks=function(t){var n=e();return Ct(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return gn(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,l=i[o],s=i[a];return s<l&&(r=l,l=s,s=r,r=o,o=a,a=r),(r=At(l,s,n))>0?r=At(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=At(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(l/r)*r,i[a]=Math.ceil(s/r)*r,e(i)):r<0&&(i[o]=Math.ceil(l*r)/r,i[a]=Math.floor(s*r)/r,e(i)),t},t}function _n(){var t=Ke(Ge,Ge);return t.copy=function(){return Ze(t,_n())},Ot.apply(t,arguments),yn(t)}var vn=function(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t};function mn(t){return Math.log(t)}function xn(t){return Math.exp(t)}function bn(t){return-Math.log(-t)}function Sn(t){return-Math.exp(-t)}function wn(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Tn(t){return function(e){return-t(-e)}}function Mn(t){var e,n,r=t(mn,xn),i=r.domain,o=10;function a(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(o),n=function(t){return 10===t?wn:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=Tn(e),n=Tn(n),t(bn,Sn)):t(mn,xn),r}return r.base=function(t){return arguments.length?(o=+t,a()):o},r.domain=function(t){return arguments.length?(i(t),a()):i()},r.ticks=function(t){var r,a=i(),l=a[0],s=a[a.length-1];(r=s<l)&&(h=l,l=s,s=h);var u,c,f,h=e(l),p=e(s),d=null==t?10:+t,g=[];if(!(o%1)&&p-h<d){if(h=Math.round(h)-1,p=Math.round(p)+1,l>0){for(;h<p;++h)for(c=1,u=n(h);c<o;++c)if(!((f=u*c)<l)){if(f>s)break;g.push(f)}}else for(;h<p;++h)for(c=o-1,u=n(h);c>=1;--c)if(!((f=u*c)<l)){if(f>s)break;g.push(f)}}else g=Ct(h,p,Math.min(p-h,d)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=on(i)),t===1/0)return i;null==t&&(t=10);var a=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*o<o-.5&&(r*=o),r<=a?i(t):""}},r.nice=function(){return i(vn(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function kn(){var t=Mn($e()).domain([1,10]);return t.copy=function(){return Ze(t,kn()).base(t.base())},Ot.apply(t,arguments),t}function zn(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Fn(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Cn(t){return t<0?-t*t:t*t}function An(t){var e=t(Ge,Ge),n=1;function r(){return 1===n?t(Ge,Ge):.5===n?t(Fn,Cn):t(zn(n),zn(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},yn(e)}function En(){var t=An($e());return t.copy=function(){return Ze(t,En()).exponent(t.exponent())},Ot.apply(t,arguments),t}function Ln(){return En.apply(null,arguments).exponent(.5)}function Nn(){var t,e=[],n=[],r=[];function i(){var t=0,i=Math.max(1,n.length);for(r=new Array(i-1);++t<i;)r[t-1]=Lt(e,t/i);return o}function o(e){return isNaN(e=+e)?t:n[bt(r,e)]}return o.invertExtent=function(t){var i=n.indexOf(t);return i<0?[NaN,NaN]:[i>0?r[i-1]:e[0],i<r.length?r[i]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,r=0,o=t.length;r<o;++r)null==(n=t[r])||isNaN(n=+n)||e.push(n);return e.sort(_t),i()},o.range=function(t){return arguments.length?(n=Yt.call(t),i()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return r.slice()},o.copy=function(){return Nn().domain(e).range(n).unknown(t)},Ot.apply(o,arguments)}function Dn(){var t,e=0,n=1,r=1,i=[.5],o=[0,1];function a(e){return e<=e?o[bt(i,e,0,r)]:t}function l(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return a}return a.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],l()):[e,n]},a.range=function(t){return arguments.length?(r=(o=Yt.call(t)).length-1,l()):o.slice()},a.invertExtent=function(t){var a=o.indexOf(t);return a<0?[NaN,NaN]:a<1?[e,i[0]]:a>=r?[i[r-1],n]:[i[a-1],i[a]]},a.unknown=function(e){return arguments.length?(t=e,a):a},a.thresholds=function(){return i.slice()},a.copy=function(){return Dn().domain([e,n]).range(o).unknown(t)},Ot.apply(yn(a),arguments)}function Pn(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[bt(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=Yt.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=Yt.call(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Pn().domain(e).range(n).unknown(t)},Ot.apply(i,arguments)}var On=new Date,Rn=new Date;function In(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,l=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return l;do{l.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return l},i.filter=function(n){return In((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return On.setTime(+e),Rn.setTime(+r),t(On),t(Rn),Math.floor(n(On,Rn))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Wn=In((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Wn.every=function(t){return isFinite(t=Math.floor(t))&&t>0?In((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var Un=Wn,jn=(Wn.range,In((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})));jn.range;function Hn(t){return In((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var Bn=Hn(0),Gn=Hn(1),Yn=Hn(2),qn=Hn(3),Vn=Hn(4),Xn=Hn(5),Zn=Hn(6),$n=(Bn.range,Gn.range,Yn.range,qn.range,Vn.range,Xn.range,Zn.range,In((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}))),Kn=$n,Jn=($n.range,In((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()}))),Qn=(Jn.range,In((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()}))),tr=(Qn.range,In((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()}))),er=(tr.range,In((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t})));er.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?In((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):er:null};er.range;function nr(t){return In((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var rr=nr(0),ir=nr(1),or=nr(2),ar=nr(3),lr=nr(4),sr=nr(5),ur=nr(6),cr=(rr.range,ir.range,or.range,ar.range,lr.range,sr.range,ur.range,In((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}))),fr=cr,hr=(cr.range,In((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));hr.every=function(t){return isFinite(t=Math.floor(t))&&t>0?In((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var pr=hr;hr.range;function dr(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function gr(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function yr(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var _r,vr={"-":"",_:" ",0:"0"},mr=/^\s*\d+/,xr=/^%/,br=/[\\^$*+?|[\]().{}]/g;function Sr(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function wr(t){return t.replace(br,"\\$&")}function Tr(t){return new RegExp("^(?:"+t.map(wr).join("|")+")","i")}function Mr(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function kr(t,e,n){var r=mr.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=mr.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Cr(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=mr.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Lr(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Dr(t,e,n){var r=mr.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Pr(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Or(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=mr.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ir(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Ur(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=mr.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=mr.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Br(t,e,n){var r=xr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=mr.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Yr(t,e,n){var r=mr.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function qr(t,e){return Sr(t.getDate(),e,2)}function Vr(t,e){return Sr(t.getHours(),e,2)}function Xr(t,e){return Sr(t.getHours()%12||12,e,2)}function Zr(t,e){return Sr(1+Kn.count(Un(t),t),e,3)}function $r(t,e){return Sr(t.getMilliseconds(),e,3)}function Kr(t,e){return $r(t,e)+"000"}function Jr(t,e){return Sr(t.getMonth()+1,e,2)}function Qr(t,e){return Sr(t.getMinutes(),e,2)}function ti(t,e){return Sr(t.getSeconds(),e,2)}function ei(t){var e=t.getDay();return 0===e?7:e}function ni(t,e){return Sr(Bn.count(Un(t)-1,t),e,2)}function ri(t){var e=t.getDay();return e>=4||0===e?Vn(t):Vn.ceil(t)}function ii(t,e){return t=ri(t),Sr(Vn.count(Un(t),t)+(4===Un(t).getDay()),e,2)}function oi(t){return t.getDay()}function ai(t,e){return Sr(Gn.count(Un(t)-1,t),e,2)}function li(t,e){return Sr(t.getFullYear()%100,e,2)}function si(t,e){return Sr((t=ri(t)).getFullYear()%100,e,2)}function ui(t,e){return Sr(t.getFullYear()%1e4,e,4)}function ci(t,e){var n=t.getDay();return Sr((t=n>=4||0===n?Vn(t):Vn.ceil(t)).getFullYear()%1e4,e,4)}function fi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Sr(e/60|0,"0",2)+Sr(e%60,"0",2)}function hi(t,e){return Sr(t.getUTCDate(),e,2)}function pi(t,e){return Sr(t.getUTCHours(),e,2)}function di(t,e){return Sr(t.getUTCHours()%12||12,e,2)}function gi(t,e){return Sr(1+fr.count(pr(t),t),e,3)}function yi(t,e){return Sr(t.getUTCMilliseconds(),e,3)}function _i(t,e){return yi(t,e)+"000"}function vi(t,e){return Sr(t.getUTCMonth()+1,e,2)}function mi(t,e){return Sr(t.getUTCMinutes(),e,2)}function xi(t,e){return Sr(t.getUTCSeconds(),e,2)}function bi(t){var e=t.getUTCDay();return 0===e?7:e}function Si(t,e){return Sr(rr.count(pr(t)-1,t),e,2)}function wi(t){var e=t.getUTCDay();return e>=4||0===e?lr(t):lr.ceil(t)}function Ti(t,e){return t=wi(t),Sr(lr.count(pr(t),t)+(4===pr(t).getUTCDay()),e,2)}function Mi(t){return t.getUTCDay()}function ki(t,e){return Sr(ir.count(pr(t)-1,t),e,2)}function zi(t,e){return Sr(t.getUTCFullYear()%100,e,2)}function Fi(t,e){return Sr((t=wi(t)).getUTCFullYear()%100,e,2)}function Ci(t,e){return Sr(t.getUTCFullYear()%1e4,e,4)}function Ai(t,e){var n=t.getUTCDay();return Sr((t=n>=4||0===n?lr(t):lr.ceil(t)).getUTCFullYear()%1e4,e,4)}function Ei(){return"+0000"}function Li(){return"%"}function Ni(t){return+t}function Di(t){return Math.floor(+t/1e3)}_r=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,l=t.months,s=t.shortMonths,u=Tr(i),c=Mr(i),f=Tr(o),h=Mr(o),p=Tr(a),d=Mr(a),g=Tr(l),y=Mr(l),_=Tr(s),v=Mr(s),m={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return s[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:null,d:qr,e:qr,f:Kr,g:si,G:ci,H:Vr,I:Xr,j:Zr,L:$r,m:Jr,M:Qr,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Ni,s:Di,S:ti,u:ei,U:ni,V:ii,w:oi,W:ai,x:null,X:null,y:li,Y:ui,Z:fi,"%":Li},x={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return l[t.getUTCMonth()]},c:null,d:hi,e:hi,f:_i,g:Fi,G:Ai,H:pi,I:di,j:gi,L:yi,m:vi,M:mi,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Ni,s:Di,S:xi,u:bi,U:Si,V:Ti,w:Mi,W:ki,x:null,X:null,y:zi,Y:Ci,Z:Ei,"%":Li},b={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=_.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:Or,e:Or,f:Hr,g:Lr,G:Er,H:Ir,I:Ir,j:Rr,L:jr,m:Pr,M:Wr,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:Dr,Q:Gr,s:Yr,S:Ur,u:zr,U:Fr,V:Cr,w:kr,W:Ar,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:Lr,Y:Er,Z:Nr,"%":Br};function S(t,e){return function(n){var r,i,o,a=[],l=-1,s=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++l<u;)37===t.charCodeAt(l)&&(a.push(t.slice(s,l)),null!=(i=vr[r=t.charAt(++l)])?r=t.charAt(++l):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),s=l+1);return a.push(t.slice(s,l)),a.join("")}}function w(t,e){return function(n){var r,i,o=yr(1900,void 0,1);if(T(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(e&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=gr(yr(o.y,0,1))).getUTCDay(),r=i>4||0===i?ir.ceil(r):ir(r),r=fr.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=dr(yr(o.y,0,1))).getDay(),r=i>4||0===i?Gn.ceil(r):Gn(r),r=Kn.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?gr(yr(o.y,0,1)).getUTCDay():dr(yr(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,gr(o)):dr(o)}}function T(t,e,n,r){for(var i,o,a=0,l=e.length,s=n.length;a<l;){if(r>=s)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=b[i in vr?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return m.x=S(n,m),m.X=S(r,m),m.c=S(e,m),x.x=S(n,x),x.X=S(r,x),x.c=S(e,x),{format:function(t){var e=S(t+="",m);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=S(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),_r.format,_r.parse,_r.utcFormat,_r.utcParse;var Pi=In((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),Oi=(Pi.range,In((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()}))),Ri=(Oi.range,In((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})));Ri.range;var Ii=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n},Wi=function(t){return Ae(t[t.length-1])},Ui=Wi(new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Ii)),ji={b:"break in time series",c:"confidential",d:"definition differs, see metadata",e:"estimated",f:"forecast",n:"not significant",p:"provisional",r:"revised",s:"Eurostat estimate",u:"low reliability",z:"not applicable"};var Hi=n(21),Bi=n.n(Hi),Gi=n(22),Yi=n.n(Gi);function qi(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}var Vi=function(t,e){return fetch(t,e).then(qi)},Xi={value:function(){}};function Zi(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new $i(r)}function $i(t){this._=t}function Ki(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Ji(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Qi(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Xi,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}$i.prototype=Zi.prototype={constructor:$i,on:function(t,e){var n,r=this._,i=Ki(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=Qi(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Qi(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=Ji(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new $i(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var to=Zi;var eo=function(){nt.preventDefault(),nt.stopImmediatePropagation()},no=function(t){var e=t.document.documentElement,n=yt(t).on("dragstart.drag",eo,!0);"onselectstart"in e?n.on("selectstart.drag",eo,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function ro(t,e){var n=t.document.documentElement,r=yt(t).on("dragstart.drag",null);e&&(r.on("click.drag",eo,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var io=Math.SQRT2;function oo(t){return((t=Math.exp(t))+1/t)/2}var ao,lo,so=function(t,e){var n,r,i=t[0],o=t[1],a=t[2],l=e[0],s=e[1],u=e[2],c=l-i,f=s-o,h=c*c+f*f;if(h<1e-12)r=Math.log(u/a)/io,n=function(t){return[i+t*c,o+t*f,a*Math.exp(io*t*r)]};else{var p=Math.sqrt(h),d=(u*u-a*a+4*h)/(2*a*2*p),g=(u*u-a*a-4*h)/(2*u*2*p),y=Math.log(Math.sqrt(d*d+1)-d),_=Math.log(Math.sqrt(g*g+1)-g);r=(_-y)/io,n=function(t){var e,n=t*r,l=oo(y),s=a/(2*p)*(l*(e=io*n+y,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+s*c,o+s*f,a*l/oo(io*n+y)]}}return n.duration=1e3*r,n},uo=function(){for(var t,e=nt;t=e.sourceEvent;)e=t;return e},co=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]},fo=function(t){var e=uo();return e.changedTouches&&(e=e.changedTouches[0]),co(t,e)},ho=function(t,e,n){arguments.length<3&&(n=e,e=uo().changedTouches);for(var r,i=0,o=e?e.length:0;i<o;++i)if((r=e[i]).identifier===n)return co(t,r);return null},po=0,go=0,yo=0,_o=0,vo=0,mo=0,xo="object"==typeof performance&&performance.now?performance:Date,bo="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function So(){return vo||(bo(wo),vo=xo.now()+mo)}function wo(){vo=0}function To(){this._call=this._time=this._next=null}function Mo(t,e,n){var r=new To;return r.restart(t,e,n),r}function ko(){vo=(_o=xo.now())+mo,po=go=0;try{!function(){So(),++po;for(var t,e=ao;e;)(t=vo-e._time)>=0&&e._call.call(null,t),e=e._next;--po}()}finally{po=0,function(){var t,e,n=ao,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:ao=e);lo=t,Fo(r)}(),vo=0}}function zo(){var t=xo.now(),e=t-_o;e>1e3&&(mo-=e,_o=t)}function Fo(t){po||(go&&(go=clearTimeout(go)),t-vo>24?(t<1/0&&(go=setTimeout(ko,t-xo.now()-mo)),yo&&(yo=clearInterval(yo))):(yo||(_o=xo.now(),yo=setInterval(zo,1e3)),po=1,bo(ko)))}To.prototype=Mo.prototype={constructor:To,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?So():+n)+(null==e?0:+e),this._next||lo===this||(lo?lo._next=this:ao=this,lo=this),this._call=t,this._time=n,Fo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fo())}};var Co=function(t,e,n){var r=new To;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},Ao=to("start","end","cancel","interrupt"),Eo=[],Lo=function(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(s){var u,c,f,h;if(1!==n.state)return l();for(u in i)if((h=i[u]).name===n.name){if(3===h.state)return Co(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[u]):+u<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[u])}if(Co((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(s))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(f=n.tween.length),u=0,c=-1;u<f;++u)(h=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Mo((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Ao,tween:Eo,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})};function No(t,e){var n=Po(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Do(t,e){var n=Po(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Po(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var Oo,Ro,Io,Wo,Uo=function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}},jo=180/Math.PI,Ho={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Bo=function(t,e,n,r,i,o){var a,l,s;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,s/=l),t*r<e*n&&(t=-t,e=-e,s=-s,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*jo,skewX:Math.atan(s)*jo,scaleX:a,scaleY:l}};function Go(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var l=[],s=[];return o=t(o),a=t(a),function(t,r,i,o,a,l){if(t!==i||r!==o){var s=a.push("translate(",null,e,null,n);l.push({i:s-4,x:Pe(t,i)},{i:s-2,x:Pe(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,l,s),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Pe(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,l,s),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Pe(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,l,s),function(t,e,n,r,o,a){if(t!==n||e!==r){var l=o.push(i(o)+"scale(",null,",",null,")");a.push({i:l-4,x:Pe(t,n)},{i:l-2,x:Pe(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,l,s),o=a=null,function(t){for(var e,n=-1,r=s.length;++n<r;)l[(e=s[n]).i]=e.x(t);return l.join("")}}}var Yo=Go((function(t){return"none"===t?Ho:(Oo||(Oo=document.createElement("DIV"),Ro=document.documentElement,Io=document.defaultView),Oo.style.transform=t,t=Io.getComputedStyle(Ro.appendChild(Oo),null).getPropertyValue("transform"),Ro.removeChild(Oo),t=t.slice(7,-1).split(","),Bo(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),qo=Go((function(t){return null==t?Ho:(Wo||(Wo=document.createElementNS("http://www.w3.org/2000/svg","g")),Wo.setAttribute("transform",t),(t=Wo.transform.baseVal.consolidate())?(t=t.matrix,Bo(t.a,t.b,t.c,t.d,t.e,t.f)):Ho)}),", ",")",")");function Vo(t,e){var n,r;return function(){var i=Do(this,t),o=i.tween;if(o!==n)for(var a=0,l=(r=n=o).length;a<l;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function Xo(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Do(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var l={name:e,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===e){i[s]=l;break}s===u&&i.push(l)}o.tween=i}}function Zo(t,e,n){var r=t._id;return t.each((function(){var t=Do(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Po(t,r).value[e]}}var $o=function(t,e){var n;return("number"==typeof e?Pe:e instanceof ce?Fe:(n=ce(e))?(e=n,Fe):We)(t,e)};function Ko(t){return function(){this.removeAttribute(t)}}function Jo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Qo(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function ta(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function ea(t,e,n){var r,i,o;return function(){var a,l,s=n(this);if(null!=s)return(a=this.getAttribute(t))===(l=s+"")?null:a===r&&l===i?o:(i=l,o=e(r=a,s));this.removeAttribute(t)}}function na(t,e,n){var r,i,o;return function(){var a,l,s=n(this);if(null!=s)return(a=this.getAttributeNS(t.space,t.local))===(l=s+"")?null:a===r&&l===i?o:(i=l,o=e(r=a,s));this.removeAttributeNS(t.space,t.local)}}function ra(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function ia(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function oa(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&ia(t,i)),n}return i._value=e,i}function aa(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&ra(t,i)),n}return i._value=e,i}function la(t,e){return function(){No(this,t).delay=+e.apply(this,arguments)}}function sa(t,e){return e=+e,function(){No(this,t).delay=e}}function ua(t,e){return function(){Do(this,t).duration=+e.apply(this,arguments)}}function ca(t,e){return e=+e,function(){Do(this,t).duration=e}}function fa(t,e){if("function"!=typeof e)throw new Error;return function(){Do(this,t).ease=e}}function ha(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?No:Do;return function(){var a=o(this,t),l=a.on;l!==r&&(i=(r=l).copy()).on(e,n),a.on=i}}var pa=gt.prototype.constructor;function da(t){return function(){this.style.removeProperty(t)}}function ga(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ya(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&ga(t,o,n)),r}return o._value=e,o}function _a(t){return function(e){this.textContent=t.call(this,e)}}function va(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&_a(r)),e}return r._value=t,r}var ma=0;function xa(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ba(){return++ma}var Sa=gt.prototype;xa.prototype=function(t){return gt().transition(t)}.prototype={constructor:xa,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=a(t));for(var r=this._groups,i=r.length,o=new Array(i),l=0;l<i;++l)for(var s,u,c=r[l],f=c.length,h=o[l]=new Array(f),p=0;p<f;++p)(s=c[p])&&(u=t.call(s,s.__data__,p,c))&&("__data__"in s&&(u.__data__=s.__data__),h[p]=u,Lo(h[p],e,n,p,h,Po(s,n)));return new xa(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=s(t));for(var r=this._groups,i=r.length,o=[],a=[],l=0;l<i;++l)for(var u,c=r[l],f=c.length,h=0;h<f;++h)if(u=c[h]){for(var p,d=t.call(u,u.__data__,h,c),g=Po(u,n),y=0,_=d.length;y<_;++y)(p=d[y])&&Lo(p,e,n,y,d,g);o.push(d),a.push(u)}return new xa(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=u(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],l=a.length,s=r[i]=[],c=0;c<l;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&s.push(o);return new xa(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),l=0;l<o;++l)for(var s,u=e[l],c=n[l],f=u.length,h=a[l]=new Array(f),p=0;p<f;++p)(s=u[p]||c[p])&&(h[p]=s);for(;l<r;++l)a[l]=e[l];return new xa(a,this._parents,this._name,this._id)},selection:function(){return new pa(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=ba(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,l=r[o],s=l.length,u=0;u<s;++u)if(a=l[u]){var c=Po(a,e);Lo(a,t,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new xa(r,this._parents,t,n)},call:Sa.call,nodes:Sa.nodes,node:Sa.node,size:Sa.size,empty:Sa.empty,each:Sa.each,on:function(t,e){var n=this._id;return arguments.length<2?Po(this.node(),n).on.on(t):this.each(ha(n,t,e))},attr:function(t,e){var n=_(t),r="transform"===n?qo:$o;return this.attrTween(t,"function"==typeof e?(n.local?na:ea)(n,r,Zo(this,"attr."+t,e)):null==e?(n.local?Jo:Ko)(n):(n.local?ta:Qo)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=_(t);return this.tween(n,(r.local?oa:aa)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Yo:$o;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=F(this,t),a=(this.style.removeProperty(t),F(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,da(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=F(this,t),l=n(this),s=l+"";return null==l&&(this.style.removeProperty(t),s=l=F(this,t)),a===s?null:a===r&&s===i?o:(i=s,o=e(r=a,l))}}(t,r,Zo(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,l="end."+a;return function(){var s=Do(this,t),u=s.on,c=null==s.value[a]?o||(o=da(e)):void 0;u===n&&i===c||(r=(n=u).copy()).on(l,i=c),s.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=F(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,ya(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Zo(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,va(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Po(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?Vo:Xo)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?la:sa)(e,t)):Po(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ua:ca)(e,t)):Po(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(fa(e,t)):Po(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var l={value:a},s={value:function(){0==--i&&o()}};n.each((function(){var n=Do(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(l),e._.interrupt.push(l),e._.end.push(s)),n.on=e}))}))}};var wa={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Ta(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return wa.time=So(),wa;return n}gt.prototype.interrupt=function(t){return this.each((function(){Uo(this,t)}))},gt.prototype.transition=function(t){var e,n;t instanceof xa?(e=t._id,t=t._name):(e=ba(),(n=wa).time=So(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,l=r[o],s=l.length,u=0;u<s;++u)(a=l[u])&&Lo(a,t,e,u,l,n||Ta(a,e));return new xa(r,this._parents,t,e)};var Ma=function(t){return function(){return t}};function ka(t,e,n){this.target=t,this.type=e,this.transform=n}function za(t,e,n){this.k=t,this.x=e,this.y=n}za.prototype={constructor:za,scale:function(t){return 1===t?this:new za(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new za(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Fa=new za(1,0,0);function Ca(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Fa;return t.__zoom}function Aa(){nt.stopImmediatePropagation()}Ca.prototype=za.prototype;var Ea=function(){nt.preventDefault(),nt.stopImmediatePropagation()};function La(){return!nt.ctrlKey&&!nt.button}function Na(){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 Da(){return this.__zoom||Fa}function Pa(){return-nt.deltaY*(1===nt.deltaMode?.05:nt.deltaMode?1:.002)}function Oa(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ra(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}var Ia=function(t){return"string"==typeof t?new pt([document.querySelectorAll(t)],[document.documentElement]):new pt([null==t?[]:t],ht)},Wa=1e-6,Ua=Math.PI,ja=Ua/2,Ha=Ua/4,Ba=2*Ua,Ga=180/Ua,Ya=Ua/180,qa=Math.abs,Va=Math.atan,Xa=Math.atan2,Za=Math.cos,$a=Math.ceil,Ka=(Math.exp,Math.floor,Math.log,Math.pow,Math.sin),Ja=Math.sign||function(t){return t>0?1:t<0?-1:0},Qa=Math.sqrt;Math.tan;function tl(t){return t>1?ja:t<-1?-ja:Math.asin(t)}function el(){}var nl=function(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:el,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},rl=function(t,e){return qa(t[0]-e[0])<Wa&&qa(t[1]-e[1])<Wa};function il(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var ol=function(t,e,n,r,i){var o,a,l=[],s=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(rl(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);return void i.lineEnd()}a[0]+=2*Wa}l.push(n=new il(r,t,null,!0)),s.push(n.o=new il(r,null,n,!1)),l.push(n=new il(a,t,null,!1)),s.push(n.o=new il(a,null,n,!0))}})),l.length){for(s.sort(e),al(l),al(s),o=0,a=s.length;o<a;++o)s[o].e=n=!n;for(var u,c,f=l[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,a=u.length;o<a;++o)i.point((c=u[o])[0],c[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(u=h.p.z,o=u.length-1;o>=0;--o)i.point((c=u[o])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}u=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}};function al(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function ll(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,l,u){var c=0,f=0;if(null==i||(c=a(i,l))!==(f=a(o,l))||s(i,o)<0^l>0)do{u.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+l+4)%4)!==f);else u.point(o[0],o[1])}function a(r,i){return qa(r[0]-t)<Wa?i>0?0:3:qa(r[0]-n)<Wa?i>0?2:1:qa(r[1]-e)<Wa?i>0?1:0:i>0?3:2}function l(t,e){return s(t.x,e.x)}function s(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var s,u,c,f,h,p,d,g,y,_,v,m=a,x=nl(),b={point:S,lineStart:function(){b.point=w,u&&u.push(c=[]);_=!0,y=!1,d=g=NaN},lineEnd:function(){s&&(w(f,h),p&&y&&x.rejoin(),s.push(x.result()));b.point=S,y&&m.lineEnd()},polygonStart:function(){m=x,s=[],u=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var o,a,l=u[n],s=1,c=l.length,f=l[0],h=f[0],p=f[1];s<c;++s)o=h,a=p,f=l[s],h=f[0],p=f[1],a<=r?p>r&&(h-o)*(r-a)>(p-a)*(t-o)&&++e:p<=r&&(h-o)*(r-a)<(p-a)*(t-o)&&--e;return e}(),n=v&&e,i=(s=Dt(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&ol(s,l,e,o,a),a.polygonEnd());m=a,s=u=c=null}};function S(t,e){i(t,e)&&m.point(t,e)}function w(o,a){var l=i(o,a);if(u&&c.push([o,a]),_)f=o,h=a,p=l,_=!1,l&&(m.lineStart(),m.point(o,a));else if(l&&y)m.point(o,a);else{var s=[d=Math.max(-1e9,Math.min(1e9,d)),g=Math.max(-1e9,Math.min(1e9,g))],x=[o=Math.max(-1e9,Math.min(1e9,o)),a=Math.max(-1e9,Math.min(1e9,a))];!function(t,e,n,r,i,o){var a,l=t[0],s=t[1],u=0,c=1,f=e[0]-l,h=e[1]-s;if(a=n-l,f||!(a>0)){if(a/=f,f<0){if(a<u)return;a<c&&(c=a)}else if(f>0){if(a>c)return;a>u&&(u=a)}if(a=i-l,f||!(a<0)){if(a/=f,f<0){if(a>c)return;a>u&&(u=a)}else if(f>0){if(a<u)return;a<c&&(c=a)}if(a=r-s,h||!(a>0)){if(a/=h,h<0){if(a<u)return;a<c&&(c=a)}else if(h>0){if(a>c)return;a>u&&(u=a)}if(a=o-s,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>u&&(u=a)}else if(h>0){if(a<u)return;a<c&&(c=a)}return u>0&&(t[0]=l+u*f,t[1]=s+u*h),c<1&&(e[0]=l+c*f,e[1]=s+c*h),!0}}}}}(s,x,t,e,n,r)?l&&(m.lineStart(),m.point(o,a),v=!1):(y||(m.lineStart(),m.point(s[0],s[1])),m.point(x[0],x[1]),l||m.lineEnd(),v=!1)}d=o,g=a,y=l}return b}}var sl=function(t){return t};function ul(t){return function(e){var n=new cl;for(var r in t)n[r]=t[r];return n.stream=e,n}}function cl(){}function fl(t,e){t&&pl.hasOwnProperty(t.type)&&pl[t.type](t,e)}cl.prototype={constructor:cl,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var hl={Feature:function(t,e){fl(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)fl(n[r].geometry,e)}},pl={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){dl(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)dl(n[r],e,0)},Polygon:function(t,e){gl(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)gl(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)fl(n[r],e)}};function dl(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function gl(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)dl(t[n],e,1);e.polygonEnd()}var yl=function(t,e){t&&hl.hasOwnProperty(t.type)?hl[t.type](t,e):fl(t,e)},_l=1/0,vl=_l,ml=-_l,xl=ml;var bl={point:function(t,e){t<_l&&(_l=t);t>ml&&(ml=t);e<vl&&(vl=e);e>xl&&(xl=e)},lineStart:el,lineEnd:el,polygonStart:el,polygonEnd:el,result:function(){var t=[[_l,vl],[ml,xl]];return ml=xl=-(vl=_l=1/0),t}};function Sl(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),yl(n,t.stream(bl)),e(bl.result()),null!=r&&t.clipExtent(r),t}function wl(t,e,n){return Sl(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,l])}),n)}function Tl(t,e,n){return wl(t,[[0,0],e],n)}function Ml(t,e,n){return Sl(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}function kl(t,e,n){return Sl(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}var zl=function(){return new Fl};function Fl(){this.reset()}Fl.prototype={constructor:Fl,reset:function(){this.s=this.t=0},add:function(t){Al(Cl,t,this.t),Al(this,Cl.s,this.s),this.s?this.t+=Cl.t:this.s=Cl.t},valueOf:function(){return this.s}};var Cl=new Fl;function Al(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var El,Ll,Nl,Dl,Pl=zl(),Ol=zl(),Rl={point:el,lineStart:el,lineEnd:el,polygonStart:function(){Rl.lineStart=Il,Rl.lineEnd=jl},polygonEnd:function(){Rl.lineStart=Rl.lineEnd=Rl.point=el,Pl.add(qa(Ol)),Ol.reset()},result:function(){var t=Pl/2;return Pl.reset(),t}};function Il(){Rl.point=Wl}function Wl(t,e){Rl.point=Ul,El=Nl=t,Ll=Dl=e}function Ul(t,e){Ol.add(Dl*t-Nl*e),Nl=t,Dl=e}function jl(){Ul(El,Ll)}var Hl,Bl,Gl,Yl,ql=Rl,Vl=0,Xl=0,Zl=0,$l=0,Kl=0,Jl=0,Ql=0,ts=0,es=0,ns={point:rs,lineStart:is,lineEnd:ls,polygonStart:function(){ns.lineStart=ss,ns.lineEnd=us},polygonEnd:function(){ns.point=rs,ns.lineStart=is,ns.lineEnd=ls},result:function(){var t=es?[Ql/es,ts/es]:Jl?[$l/Jl,Kl/Jl]:Zl?[Vl/Zl,Xl/Zl]:[NaN,NaN];return Vl=Xl=Zl=$l=Kl=Jl=Ql=ts=es=0,t}};function rs(t,e){Vl+=t,Xl+=e,++Zl}function is(){ns.point=os}function os(t,e){ns.point=as,rs(Gl=t,Yl=e)}function as(t,e){var n=t-Gl,r=e-Yl,i=Qa(n*n+r*r);$l+=i*(Gl+t)/2,Kl+=i*(Yl+e)/2,Jl+=i,rs(Gl=t,Yl=e)}function ls(){ns.point=rs}function ss(){ns.point=cs}function us(){fs(Hl,Bl)}function cs(t,e){ns.point=fs,rs(Hl=Gl=t,Bl=Yl=e)}function fs(t,e){var n=t-Gl,r=e-Yl,i=Qa(n*n+r*r);$l+=i*(Gl+t)/2,Kl+=i*(Yl+e)/2,Jl+=i,Ql+=(i=Yl*t-Gl*e)*(Gl+t),ts+=i*(Yl+e),es+=3*i,rs(Gl=t,Yl=e)}var hs=ns;function ps(t){this._context=t}ps.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Ba)}},result:el};var ds,gs,ys,_s,vs,ms=zl(),xs={point:el,lineStart:function(){xs.point=bs},lineEnd:function(){ds&&Ss(gs,ys),xs.point=el},polygonStart:function(){ds=!0},polygonEnd:function(){ds=null},result:function(){var t=+ms;return ms.reset(),t}};function bs(t,e){xs.point=Ss,gs=_s=t,ys=vs=e}function Ss(t,e){_s-=t,vs-=e,ms.add(Qa(_s*_s+vs*vs)),_s=t,vs=e}var ws=xs;function Ts(){this._string=[]}function Ms(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Ts.prototype={_radius:4.5,_circle:Ms(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Ms(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var ks,zs,Fs,Cs,As,Es,Ls,Ns,Ds,Ps,Os,Rs,Is,Ws,Us,js;function Hs(t,e,n){var r=Mt(t,e-Wa,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Bs(t,e,n){var r=Mt(t,e-Wa,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function Gs(){var t,e,n,r,i,o,a,l,s,u,c,f,h=10,p=h,d=90,g=360,y=2.5;function _(){return{type:"MultiLineString",coordinates:v()}}function v(){return Mt($a(r/d)*d,n,d).map(c).concat(Mt($a(l/g)*g,a,g).map(f)).concat(Mt($a(e/h)*h,t,h).filter((function(t){return qa(t%d)>Wa})).map(s)).concat(Mt($a(o/p)*p,i,p).filter((function(t){return qa(t%g)>Wa})).map(u))}return _.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},_.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(a).slice(1),c(n).reverse().slice(1),f(l).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],l=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),l>a&&(t=l,l=a,a=t),_.precision(y)):[[r,l],[n,a]]},_.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),_.precision(y)):[[e,o],[t,i]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(d=+t[0],g=+t[1],_):[d,g]},_.stepMinor=function(t){return arguments.length?(h=+t[0],p=+t[1],_):[h,p]},_.precision=function(h){return arguments.length?(y=+h,s=Hs(o,i,90),u=Bs(e,t,y),c=Hs(l,a,90),f=Bs(r,n,y),_):y},_.extentMajor([[-180,-90+Wa],[180,90-Wa]]).extentMinor([[-180,-80-Wa],[180,80+Wa]])}var Ys={sphere:el,point:qs,lineStart:Xs,lineEnd:Ks,polygonStart:function(){Ys.lineStart=Js,Ys.lineEnd=Qs},polygonEnd:function(){Ys.lineStart=Xs,Ys.lineEnd=Ks}};function qs(t,e){t*=Ya;var n=Za(e*=Ya);Vs(n*Za(t),n*Ka(t),Ka(e))}function Vs(t,e,n){++ks,Fs+=(t-Fs)/ks,Cs+=(e-Cs)/ks,As+=(n-As)/ks}function Xs(){Ys.point=Zs}function Zs(t,e){t*=Ya;var n=Za(e*=Ya);Ws=n*Za(t),Us=n*Ka(t),js=Ka(e),Ys.point=$s,Vs(Ws,Us,js)}function $s(t,e){t*=Ya;var n=Za(e*=Ya),r=n*Za(t),i=n*Ka(t),o=Ka(e),a=Xa(Qa((a=Us*o-js*i)*a+(a=js*r-Ws*o)*a+(a=Ws*i-Us*r)*a),Ws*r+Us*i+js*o);zs+=a,Es+=a*(Ws+(Ws=r)),Ls+=a*(Us+(Us=i)),Ns+=a*(js+(js=o)),Vs(Ws,Us,js)}function Ks(){Ys.point=qs}function Js(){Ys.point=tu}function Qs(){eu(Rs,Is),Ys.point=qs}function tu(t,e){Rs=t,Is=e,t*=Ya,e*=Ya,Ys.point=eu;var n=Za(e);Ws=n*Za(t),Us=n*Ka(t),js=Ka(e),Vs(Ws,Us,js)}function eu(t,e){t*=Ya;var n=Za(e*=Ya),r=n*Za(t),i=n*Ka(t),o=Ka(e),a=Us*o-js*i,l=js*r-Ws*o,s=Ws*i-Us*r,u=Qa(a*a+l*l+s*s),c=tl(u),f=u&&-c/u;Ds+=f*a,Ps+=f*l,Os+=f*s,zs+=c,Es+=c*(Ws+(Ws=r)),Ls+=c*(Us+(Us=i)),Ns+=c*(js+(js=o)),Vs(Ws,Us,js)}var nu=function(t){ks=zs=Fs=Cs=As=Es=Ls=Ns=Ds=Ps=Os=0,yl(t,Ys);var e=Ds,n=Ps,r=Os,i=e*e+n*n+r*r;return i<1e-12&&(e=Es,n=Ls,r=Ns,zs<Wa&&(e=Fs,n=Cs,r=As),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[Xa(n,e)*Ga,tl(r/Qa(i))*Ga]};function ru(t){return[Xa(t[1],t[0]),tl(t[2])]}function iu(t){var e=t[0],n=t[1],r=Za(n);return[r*Za(e),r*Ka(e),Ka(n)]}function ou(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function au(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function lu(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function su(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function uu(t){var e=Qa(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var cu=zl();function fu(t){return qa(t[0])<=Ua?t[0]:Ja(t[0])*((qa(t[0])+Ua)%Ba-Ua)}var hu=function(t,e,n,r){return function(i){var o,a,l,s=e(i),u=nl(),c=e(u),f=!1,h={point:p,lineStart:g,lineEnd:y,polygonStart:function(){h.point=_,h.lineStart=v,h.lineEnd=m,a=[],o=[]},polygonEnd:function(){h.point=p,h.lineStart=g,h.lineEnd=y,a=Dt(a);var t=function(t,e){var n=fu(e),r=e[1],i=Ka(r),o=[Ka(n),-Za(n),0],a=0,l=0;cu.reset(),1===i?r=ja+Wa:-1===i&&(r=-ja-Wa);for(var s=0,u=t.length;s<u;++s)if(f=(c=t[s]).length)for(var c,f,h=c[f-1],p=fu(h),d=h[1]/2+Ha,g=Ka(d),y=Za(d),_=0;_<f;++_,p=m,g=b,y=S,h=v){var v=c[_],m=fu(v),x=v[1]/2+Ha,b=Ka(x),S=Za(x),w=m-p,T=w>=0?1:-1,M=T*w,k=M>Ua,z=g*b;if(cu.add(Xa(z*T*Ka(M),y*S+z*Za(M))),a+=k?w+T*Ba:w,k^p>=n^m>=n){var F=au(iu(h),iu(v));uu(F);var C=au(o,F);uu(C);var A=(k^w>=0?-1:1)*tl(C[2]);(r>A||r===A&&(F[0]||F[1]))&&(l+=k^w>=0?1:-1)}}return(a<-Wa||a<Wa&&cu<-Wa)^1&l}(o,r);a.length?(f||(i.polygonStart(),f=!0),ol(a,du,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){s.point(t,e)}function g(){h.point=d,s.lineStart()}function y(){h.point=p,s.lineEnd()}function _(t,e){l.push([t,e]),c.point(t,e)}function v(){c.lineStart(),l=[]}function m(){_(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,s=c.clean(),h=u.result(),p=h.length;if(l.pop(),o.push(l),l=null,p)if(1&s){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else p>1&&2&s&&h.push(h.pop().concat(h.shift())),a.push(h.filter(pu))}return h}};function pu(t){return t.length>1}function du(t,e){return((t=t.x)[0]<0?t[1]-ja-Wa:ja-t[1])-((e=e.x)[0]<0?e[1]-ja-Wa:ja-e[1])}var gu=hu((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var l=o>0?Ua:-Ua,s=qa(o-n);qa(s-Ua)<Wa?(t.point(n,r=(r+a)/2>0?ja:-ja),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(o,r),e=0):i!==l&&s>=Ua&&(qa(n-i)<Wa&&(n-=i*Wa),qa(o-l)<Wa&&(o-=l*Wa),r=function(t,e,n,r){var i,o,a=Ka(t-n);return qa(a)>Wa?Va((Ka(e)*(o=Za(r))*Ka(n)-Ka(r)*(i=Za(e))*Ka(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),e=0),t.point(n=o,r=a),i=l},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*ja,r.point(-Ua,i),r.point(0,i),r.point(Ua,i),r.point(Ua,0),r.point(Ua,-i),r.point(0,-i),r.point(-Ua,-i),r.point(-Ua,0),r.point(-Ua,i);else if(qa(t[0]-e[0])>Wa){var o=t[0]<e[0]?Ua:-Ua;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}),[-Ua,-ja]);var yu=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n};function _u(t,e){return[qa(t)>Ua?t+Math.round(-t/Ba)*Ba:t,e]}function vu(t,e,n){return(t%=Ba)?e||n?yu(xu(t),bu(e,n)):xu(t):e||n?bu(e,n):_u}function mu(t){return function(e,n){return[(e+=t)>Ua?e-Ba:e<-Ua?e+Ba:e,n]}}function xu(t){var e=mu(t);return e.invert=mu(-t),e}function bu(t,e){var n=Za(t),r=Ka(t),i=Za(e),o=Ka(e);function a(t,e){var a=Za(e),l=Za(t)*a,s=Ka(t)*a,u=Ka(e),c=u*n+l*r;return[Xa(s*i-c*o,l*n-u*r),tl(c*i+s*o)]}return a.invert=function(t,e){var a=Za(e),l=Za(t)*a,s=Ka(t)*a,u=Ka(e),c=u*i-s*o;return[Xa(s*i+u*o,l*n+c*r),tl(c*n-l*r)]},a}_u.invert=_u;function Su(t,e,n,r,i,o){if(n){var a=Za(e),l=Ka(e),s=r*n;null==i?(i=e+r*Ba,o=e-s/2):(i=wu(a,i),o=wu(a,o),(r>0?i<o:i>o)&&(i+=r*Ba));for(var u,c=i;r>0?c>o:c<o;c-=s)u=ru([a,-l*Za(c),-l*Ka(c)]),t.point(u[0],u[1])}}function wu(t,e){(e=iu(e))[0]-=t,uu(e);var n,r=(n=-e[1])>1?0:n<-1?Ua:Math.acos(n);return((-e[2]<0?-r:r)+Ba-Wa)%Ba}var Tu=function(t){var e=Za(t),n=6*Ya,r=e>0,i=qa(e)>Wa;function o(t,n){return Za(t)*Za(n)>e}function a(t,n,r){var i=[1,0,0],o=au(iu(t),iu(n)),a=ou(o,o),l=o[0],s=a-l*l;if(!s)return!r&&t;var u=e*a/s,c=-e*l/s,f=au(i,o),h=su(i,u);lu(h,su(o,c));var p=f,d=ou(h,p),g=ou(p,p),y=d*d-g*(ou(h,h)-1);if(!(y<0)){var _=Qa(y),v=su(p,(-d-_)/g);if(lu(v,h),v=ru(v),!r)return v;var m,x=t[0],b=n[0],S=t[1],w=n[1];b<x&&(m=x,x=b,b=m);var T=b-x,M=qa(T-Ua)<Wa;if(!M&&w<S&&(m=S,S=w,w=m),M||T<Wa?M?S+w>0^v[1]<(qa(v[0]-x)<Wa?S:w):S<=v[1]&&v[1]<=w:T>Ua^(x<=v[0]&&v[0]<=b)){var k=su(p,(-d+_)/g);return lu(k,h),[v,ru(k)]}}}function l(e,n){var i=r?t:Ua-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return hu(o,(function(t){var e,n,s,u,c;return{lineStart:function(){u=s=!1,c=1},point:function(f,h){var p,d=[f,h],g=o(f,h),y=r?g?0:l(f,h):g?l(f+(f<0?Ua:-Ua),h):0;if(!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(p=a(e,d))||rl(e,p)||rl(d,p))&&(d[2]=1),g!==s)c=0,g?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(i&&e&&r^g){var _;y&n||!(_=a(d,e,!0))||(c=0,r?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1],3)))}!g||e&&rl(e,d)||t.point(d[0],d[1]),e=d,s=g,n=y},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(u&&s)<<1}}}),(function(e,r,i,o){Su(o,t,n,i,e,r)}),r?[0,-t]:[-Ua,t-Ua])},Mu=Za(30*Ya),ku=function(t,e){return+e?function(t,e){function n(r,i,o,a,l,s,u,c,f,h,p,d,g,y){var _=u-r,v=c-i,m=_*_+v*v;if(m>4*e&&g--){var x=a+h,b=l+p,S=s+d,w=Qa(x*x+b*b+S*S),T=tl(S/=w),M=qa(qa(S)-1)<Wa||qa(o-f)<Wa?(o+f)/2:Xa(b,x),k=t(M,T),z=k[0],F=k[1],C=z-r,A=F-i,E=v*C-_*A;(E*E/m>e||qa((_*C+v*A)/m-.5)>.3||a*h+l*p+s*d<Mu)&&(n(r,i,o,a,l,s,z,F,M,x/=w,b/=w,S,g,y),y.point(z,F),n(z,F,M,x,b,S,u,c,f,h,p,d,g,y))}}return function(e){var r,i,o,a,l,s,u,c,f,h,p,d,g={point:y,lineStart:_,lineEnd:m,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=_}};function y(n,r){n=t(n,r),e.point(n[0],n[1])}function _(){c=NaN,g.point=v,e.lineStart()}function v(r,i){var o=iu([r,i]),a=t(r,i);n(c,f,u,h,p,d,c=a[0],f=a[1],u=r,h=o[0],p=o[1],d=o[2],16,e),e.point(c,f)}function m(){g.point=y,e.lineEnd()}function x(){_(),g.point=b,g.lineEnd=S}function b(t,e){v(r=t,e),i=c,o=f,a=h,l=p,s=d,g.point=v}function S(){n(c,f,u,h,p,d,i,o,r,a,l,s,16,e),g.lineEnd=m,m()}return g}}(t,e):function(t){return ul({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)};var zu=ul({point:function(t,e){this.stream.point(t*Ya,e*Ya)}});function Fu(t,e,n,r,i){function o(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return o.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},o}function Cu(t,e,n,r,i,o){var a=Za(o),l=Ka(o),s=a*t,u=l*t,c=a/t,f=l/t,h=(l*n-a*e)/t,p=(l*e+a*n)/t;function d(t,o){return[s*(t*=r)-u*(o*=i)+e,n-u*t-s*o]}return d.invert=function(t,e){return[r*(c*t-f*e+h),i*(p-f*t-c*e)]},d}function Au(t){return function(t){var e,n,r,i,o,a,l,s,u,c,f=150,h=480,p=250,d=0,g=0,y=0,_=0,v=0,m=0,x=1,b=1,S=null,w=gu,T=null,M=sl,k=.5;function z(t){return s(t[0]*Ya,t[1]*Ya)}function F(t){return(t=s.invert(t[0],t[1]))&&[t[0]*Ga,t[1]*Ga]}function C(){var t=Cu(f,0,0,x,b,m).apply(null,e(d,g)),r=(m?Cu:Fu)(f,h-t[0],p-t[1],x,b,m);return n=vu(y,_,v),l=yu(e,r),s=yu(n,l),a=ku(l,k),A()}function A(){return u=c=null,z}return z.stream=function(t){return u&&c===t?u:u=zu(function(t){return ul({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(w(a(M(c=t)))))},z.preclip=function(t){return arguments.length?(w=t,S=void 0,A()):w},z.postclip=function(t){return arguments.length?(M=t,T=r=i=o=null,A()):M},z.clipAngle=function(t){return arguments.length?(w=+t?Tu(S=t*Ya):(S=null,gu),A()):S*Ga},z.clipExtent=function(t){return arguments.length?(M=null==t?(T=r=i=o=null,sl):ll(T=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),A()):null==T?null:[[T,r],[i,o]]},z.scale=function(t){return arguments.length?(f=+t,C()):f},z.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],C()):[h,p]},z.center=function(t){return arguments.length?(d=t[0]%360*Ya,g=t[1]%360*Ya,C()):[d*Ga,g*Ga]},z.rotate=function(t){return arguments.length?(y=t[0]%360*Ya,_=t[1]%360*Ya,v=t.length>2?t[2]%360*Ya:0,C()):[y*Ga,_*Ga,v*Ga]},z.angle=function(t){return arguments.length?(m=t%360*Ya,C()):m*Ga},z.reflectX=function(t){return arguments.length?(x=t?-1:1,C()):x<0},z.reflectY=function(t){return arguments.length?(b=t?-1:1,C()):b<0},z.precision=function(t){return arguments.length?(a=ku(l,k=t*t),A()):Qa(k)},z.fitExtent=function(t,e){return wl(z,t,e)},z.fitSize=function(t,e){return Tl(z,t,e)},z.fitWidth=function(t,e){return Ml(z,t,e)},z.fitHeight=function(t,e){return kl(z,t,e)},function(){return e=t.apply(this,arguments),z.invert=e.invert&&F,C()}}((function(){return t}))()}var Eu=Math.abs,Lu=(Math.atan,Math.atan2,Math.ceil,Math.cos,Math.exp,Math.floor),Nu=(Math.log,Math.max),Du=Math.min,Pu=(Math.pow,Math.round,Math.sign,Math.sin,Math.tan,Math.PI),Ou=Pu/2,Ru=(Math.SQRT1_2,Wu(2),Wu(Pu),180/Pu),Iu=Pu/180;function Wu(t){return t>0?Math.sqrt(t):0}var Uu=[[.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 ju(t,e){var n,r=Du(18,36*Eu(e)/Pu),i=Lu(r),o=r-i,a=(n=Uu[i])[0],l=n[1],s=(n=Uu[++i])[0],u=n[1],c=(n=Uu[Du(19,++i)])[0],f=n[1];return[t*(s+o*(c-a)/2+o*o*(c-2*s+a)/2),(e>0?Ou:-Ou)*(u+o*(f-l)/2+o*o*(f-2*u+l)/2)]}Uu.forEach((function(t){t[1]*=1.0144})),ju.invert=function(t,e){var n=e/Ou,r=90*n,i=Du(18,Eu(r/5)),o=Nu(0,Lu(i));do{var a=Uu[o][1],l=Uu[o+1][1],s=Uu[Du(19,o+2)][1],u=s-a,c=s-2*l+a,f=2*(Eu(n)-l)/u,h=c/u,p=f*(1-h*f*(1-2*h*f));if(p>=0||1===o){r=(e>=0?5:-5)*(p+i);var d,g=50;do{p=(i=Du(18,Eu(r)/5))-(o=Lu(i)),a=Uu[o][1],l=Uu[o+1][1],s=Uu[Du(19,o+2)][1],r-=(d=(e>=0?Ou:-Ou)*(l+p*(s-a)/2+p*p*(s-2*l+a)/2)-e)*Ru}while(Eu(d)>1e-12&&--g>0);break}}while(--o>=0);var y=Uu[o][0],_=Uu[o+1][0],v=Uu[Du(19,o+2)][0];return[t/(_+p*(v-y)/2+p*p*(v-2*_+y)/2),r*Iu]};var Hu=function(t){return t},Bu=function(t){if(null==t)return Hu;var e,n,r=t.scale[0],i=t.scale[1],o=t.translate[0],a=t.translate[1];return function(t,l){l||(e=n=0);var s=2,u=t.length,c=new Array(u);for(c[0]=(e+=t[0])*r+o,c[1]=(n+=t[1])*i+a;s<u;)c[s]=t[s],++s;return c}},Gu=function(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return Yu(t,e)}))}:Yu(t,e)};function Yu(t,e){var n=e.id,r=e.bbox,i=null==e.properties?{}:e.properties,o=qu(t,e);return null==n&&null==r?{type:"Feature",properties:i,geometry:o}:null==r?{type:"Feature",id:n,properties:i,geometry:o}:{type:"Feature",id:n,bbox:r,properties:i,geometry:o}}function qu(t,e){var n=Bu(t.transform),r=t.arcs;function i(t,e){e.length&&e.pop();for(var i=r[t<0?~t:t],o=0,a=i.length;o<a;++o)e.push(n(i[o],o));t<0&&function(t,e){for(var n,r=t.length,i=r-e;i<--r;)n=t[i],t[i++]=t[r],t[r]=n}(e,a)}function o(t){return n(t)}function a(t){for(var e=[],n=0,r=t.length;n<r;++n)i(t[n],e);return e.length<2&&e.push(e[0]),e}function l(t){for(var e=a(t);e.length<4;)e.push(e[0]);return e}function s(t){return t.map(l)}return function t(e){var n,r=e.type;switch(r){case"GeometryCollection":return{type:r,geometries:e.geometries.map(t)};case"Point":n=o(e.coordinates);break;case"MultiPoint":n=e.coordinates.map(o);break;case"LineString":n=a(e.arcs);break;case"MultiLineString":n=e.arcs.map(a);break;case"Polygon":n=s(e.arcs);break;case"MultiPolygon":n=e.arcs.map(s);break;default:return null}return{type:r,coordinates:n}}(e)}var Vu=function(t){return t.toLocaleString("en").replace(/,/gi," ")},Xu=function(t){var e;function n(){e=yt("#"+t.div),e.empty()&&(e=yt("body").append("div").attr("id",t.div)),e.style("max-width",t.maxWidth),e.style("overflow","hidden"),e.style("font-size",t.fontSize),e.style("background",t.background),e.style("padding",t.padding),e.style("border",t.border),e.style("border-radius",t["border-radius"]),e.style("box-shadow",t["box-shadow"]),e.style("position","absolute"),e.style("font-family",t["font-family"]),e.style("pointer-events","none"),e.style("opacity","0")}return(t=t||{}).containerId=t.containerId||"map",t.div=t.div||"tooltip_eurostat",t.maxWidth=t.maxWidth||"200px",t.fontSize=t.fontSize||"14px",t.background=t.background||"white",t.padding=t.padding||"5px",t.border=t.border||"0px",t["border-radius"]=t["border-radius"]||"5px",t["box-shadow"]=t["box-shadow"]||"5px 5px 5px grey",t["font-family"]=t["font-family"]||"Helvetica, Arial, sans-serif",t.transitionDuration=t.transitionDuration||0,t.xOffset=t.xOffset||30,t.yOffset=t.yOffset||20,n.mouseover=function(t){t&&e.html(t);var r=nt.pageX,i=nt.pageY;n.ensureTooltipOnScreen(r,i)},n.mousemove=function(){var t=nt.pageX,e=nt.pageY;this.ensureTooltipOnScreen(t,e)},n.mouseout=function(){e.style("opacity",0)},n.style=function(t,r){return 1==arguments.length?e.style(t):(e.style(t,r),n)},n.attr=function(t,r){return 1==arguments.length?e.attr(t):(e.attr(t,r),n)},n.ensureTooltipOnScreen=function(n,r){e.style("opacity",1);var i=e.node();i.style.left=n+t.xOffset+"px",i.style.top=r-t.yOffset+"px";var o=document.getElementById(t.containerId).getBoundingClientRect(),a=o.width,l=o.height;if(i.offsetLeft>o.left+a-i.clientWidth){var s=n-i.clientWidth-t.xOffset;if(i.style.left=s+"px",i.offsetLeft+i.clientWidth>n){var u=n-(i.clientWidth+t.xOffset);i.style.left=u+"px"}}i.offsetTop+i.clientHeight>o.top+l&&(i.style.top=i.offsetTop-i.clientHeight+"px")},n(),n},Zu={EUR_3035:{cc:[{text:"AL",x:51e5,y:206e4,class:"cc",size:7},{text:"AT",x:467e4,y:2629e3,class:"cc",size:18},{text:"BE",x:393e4,y:301e4,class:"cc",size:17},{text:"BG",x:5567e3,y:22e5,class:"cc",size:22},{text:"HR",x:4876e3,y:2455e3,class:"cc",size:10},{text:"CY",x:6426e3,y:148e4,class:"cc",size:10},{text:"CZ",x:4707e3,y:2885e3,class:"cc",size:18},{text:"DK",x:4316e3,y:3621e3,class:"cc",size:20},{text:"EE",x:522e4,y:399e4,class:"cc",size:12},{text:"FI",x:515e4,y:4424e3,class:"cc",size:20},{text:"FR",x:3767740,y:2662817,class:"cc",size:22},{text:"DE",x:4347284,y:3093276,class:"cc",size:22},{text:"EL",x:537e4,y:175e4,class:"cc",size:22},{text:"HU",x:502e4,y:263e4,class:"cc",size:17},{text:"IS",x:304e4,y:4833e3,class:"cc",size:10},{text:"IE",x:3136e3,y:3394e3,class:"cc",size:17},{text:"IT",x:4469967,y:2181963,class:"cc",size:22},{text:"LV",x:529e4,y:38e5,class:"cc",size:12},{text:"LT",x:519e4,y:363e4,class:"cc",size:12},{text:"LU",x:412e4,y:294e4,class:"cc",size:12},{text:"MT",x:4731e3,y:13e5,class:"cc",size:10},{text:"ME",x:5073e3,y:2185e3,class:"cc",size:7},{text:"MK",x:53e5,y:208e4,class:"cc",size:10},{text:"NL",x:402e4,y:3208e3,class:"cc",size:17},{text:"NO",x:43e5,y:4147e3,class:"cc",size:20},{text:"PL",x:4964e3,y:32e5,class:"cc",size:22},{text:"PT",x:28e5,y:199e4,class:"cc",size:18},{text:"RO",x:5451e3,y:26e5,class:"cc",size:22},{text:"RS",x:52e5,y:23e5,class:"cc",size:10},{text:"SK",x:504e4,y:2835e3,class:"cc",size:12},{text:"SI",x:4655e3,y:248e4,class:"cc",size:10},{text:"ES",x:3160096,y:19e5,class:"cc",size:22},{text:"SE",x:463e4,y:4e6,class:"cc",size:20},{text:"CH",x:42e5,y:2564e3,class:"cc",size:16},{text:"TR",x:651e4,y:21e5,class:"cc",size:22},{text:"UK",x:3558e3,y:325e4,class:"cc",size:17}],en:[{text:"MEDITERRANEAN SEA",x:5472e3,y:12e5,class:"seas",size:12,letterSpacing:7},{text:"ATLANTIC OCEAN",x:282e4,y:254e4,class:"seas",size:12,letterSpacing:2},{text:"NORTH SEA",x:3915e3,y:37e5,class:"seas",size:12},{text:"BALTIC SEA",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"NORWEGIAN SEA",x:385e4,y:48e5,class:"seas",size:12,letterSpacing:1},{text:"BLACK SEA",x:63e5,y:25e5,class:"seas",size:12,letterSpacing:4},{text:"ALBANIA",cc:"AL",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"AUSTRIA",cc:"AT",x:467e4,y:2629e3,class:"countries",size:10},{text:"BELGIUM",cc:"BE",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIA",cc:"BG",x:5567e3,y:2256e3,class:"countries",size:12},{text:"CROATIA",cc:"HR",x:4876e3,y:2455e3,class:"countries",size:7},{text:"CYPRUS",cc:"CY",x:6426e3,y:148e4,class:"countries",size:10},{text:"CZECHIA",cc:"CZ",x:4707e3,y:2885e3,class:"countries",size:12},{text:"DENMARK",cc:"DK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTONIA",cc:"EE",x:522e4,y:399e4,class:"countries",size:7},{text:"FINLAND",cc:"FI",x:515e4,y:4424e3,class:"countries",size:12},{text:"FRANCE",cc:"FR",x:3767740,y:2662817,class:"countries",size:12},{text:"GERMANY",cc:"DE",x:4347284,y:3093276,class:"countries",size:12},{text:"GREECE",cc:"EL",x:547e4,y:186e4,class:"countries",size:12},{text:"HUNGARY",cc:"HU",x:502e4,y:263e4,class:"countries",size:10},{text:"ICELAND",cc:"IS",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRELAND",cc:"IE",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALY",cc:"IT",x:4469967,y:2181963,class:"countries",size:12},{text:"LATVIA",cc:"LV",x:529e4,y:38e5,class:"countries",size:7},{text:"LITHUANIA",cc:"LT",x:519e4,y:363e4,class:"countries",size:7},{text:"LUX.",cc:"LU",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTA",cc:"MT",x:4731e3,y:133e4,class:"countries",size:7},{text:"MONT.",cc:"ME",x:5073e3,y:2185e3,class:"countries",size:7},{text:"N. MACEDONIA",cc:"MK",x:53e5,y:2082e3,class:"countries",size:7},{text:"NETHERLANDS",cc:"NL",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORWAY",cc:"NO",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLAND",cc:"PL",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",cc:"PT",x:283e4,y:199e4,class:"countries",size:10,rotate:-75},{text:"ROMANIA",cc:"RO",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIA",cc:"RS",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOVAKIA",cc:"SK",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOVENIA",cc:"SI",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-30},{text:"SPAIN",cc:"ES",x:3160096,y:185e4,class:"countries",size:12},{text:"SWEDEN",cc:"SE",x:463e4,y:41e5,class:"countries",size:12,rotate:-75},{text:"SWITZERLAND",cc:"CH",x:42e5,y:2564e3,class:"countries",size:7},{text:"TURKEY",cc:"TR",x:651e4,y:21e5,class:"countries",size:12},{text:"U.K.",cc:"UK",x:3558e3,y:325e4,class:"countries",size:12}],fr:[{text:"MER MÉDITERRANÉE",x:5472e3,y:1242e3,class:"seas",size:12},{text:"OCÈAN ATLANTIQUE",x:282e4,y:254e4,class:"seas",size:12},{text:"MER DU NORD",x:3915e3,y:37e5,class:"seas",size:12},{text:"MER BALTIQUE",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"MER DE NORVÈGE",x:385e4,y:48e5,class:"seas",size:12},{text:"MER NOIRE",x:6265e3,y:2472e3,class:"seas",size:12},{text:"ALBANIE",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"AUTRICHE",x:467e4,y:2629e3,class:"countries",size:10},{text:"BELGIQUE",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIE",x:5567e3,y:2256e3,class:"countries",size:12},{text:"CROATIE",x:4876e3,y:2455e3,class:"countries",size:7},{text:"CHYPRE",x:6426e3,y:148e4,class:"countries",size:10},{text:"TCHÉQUIE",x:4707e3,y:2885e3,class:"countries",size:12},{text:"DANEMARK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTONIE",x:522e4,y:399e4,class:"countries",size:10},{text:"FINLANDE",x:5125e3,y:4424e3,class:"countries",size:12},{text:"FRANCE",x:3767740,y:2662817,class:"countries",size:12},{text:"ALLEMAGNE",x:4347284,y:3093276,class:"countries",size:12},{text:"GRÈCE",x:542e4,y:186e4,class:"countries",size:12},{text:"HONGRIE",x:502e4,y:2654e3,class:"countries",size:10},{text:"ISLANDE",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRLANDE",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALIE",x:45e5,y:2181963,class:"countries",size:12},{text:"LETTONIE",x:529e4,y:3776e3,class:"countries",size:10},{text:"LITUANIE",x:519e4,y:363e4,class:"countries",size:10},{text:"LUX.",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTE",x:4731e3,y:1335e3,class:"countries",size:7},{text:"MONT.",x:5073e3,y:2185e3,class:"countries",size:7},{text:"MAC. DU NORD",x:53e5,y:2082e3,class:"countries",size:7},{text:"PAYS-BAS",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORVEGE",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLOGNE",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",x:2836136,y:1956179,class:"countries",size:10,rotate:-75},{text:"ROUMANIE",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIE",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOVAQUIE",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOVÉNIE",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-35},{text:"ESPAGNE",x:3160096,y:185e4,class:"countries",size:12},{text:"SUÈDE",x:47e5,y:4401e3,class:"countries",size:12,rotate:-75},{text:"SUISSE",x:42e5,y:2564e3,class:"countries",size:7},{text:"TURQUIE",x:651e4,y:21e5,class:"countries",size:12},{text:"ROYAUME-UNI",x:3558e3,y:325e4,class:"countries",size:10}],de:[{text:"MITTELMEER",x:5472e3,y:12e5,class:"seas",size:12,letterSpacing:7},{text:"ATLANTISCHER OZEAN",x:282e4,y:254e4,class:"seas",size:12},{text:"NORDSEE",x:3915e3,y:37e5,class:"seas",size:12},{text:"OSTSEE",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"NORWEGISCHE MEER",x:385e4,y:48e5,class:"seas",size:12},{text:"SCHWARZE MEER",x:63e5,y:25e5,class:"seas",size:12,letterSpacing:1},{text:"ALBANIEN",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"ÖSTERREICH",x:465e4,y:2629e3,class:"countries",size:7},{text:"BELGIEN",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIEN",x:5567e3,y:2256e3,class:"countries",size:10},{text:"KROATIEN",x:4876e3,y:2455e3,class:"countries",size:7},{text:"ZYPERN",x:6426e3,y:148e4,class:"countries",size:10},{text:"TSCHECHIEN",x:4707e3,y:2885e3,class:"countries",size:7},{text:"DÄNEMARK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTLAND",x:522e4,y:399e4,class:"countries",size:7},{text:"FINNLAND",x:515e4,y:4424e3,class:"countries",size:12},{text:"FRANKREICH",x:3767740,y:2662817,class:"countries",size:12},{text:"DEUTSCHLAND",x:4347284,y:3093276,class:"countries",size:10},{text:"GRIECHENLAND",x:555e4,y:15e5,class:"countries",size:10},{text:"UNGARN",x:502e4,y:263e4,class:"countries",size:10},{text:"ISLAND",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRLAND",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALIEN",x:4469967,y:2181963,class:"countries",size:12,rotate:35},{text:"LETTLAND",x:529e4,y:38e5,class:"countries",size:7},{text:"LITAUEN",x:519e4,y:363e4,class:"countries",size:7},{text:"LUX.",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTA",x:4731e3,y:133e4,class:"countries",size:7},{text:"MONT.",x:5073e3,y:2185e3,class:"countries",size:7},{text:"NORDMAZEDONIEN",x:535e4,y:2082e3,class:"countries",size:7},{text:"NIEDERLANDE",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORWEGEN",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLEN",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",x:2836136,y:1956179,class:"countries",size:10,rotate:-75},{text:"RUMÄNIEN",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIEN",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOWAKEI",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOWENIEN",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-30},{text:"SPANIEN",x:3160096,y:185e4,class:"countries",size:12},{text:"SCHWEDEN",x:467e4,y:418e4,class:"countries",size:12,rotate:-75},{text:"SCHWEIZ",x:42e5,y:2564e3,class:"countries",size:7},{text:"TRUTHAHN",x:651e4,y:21e5,class:"countries",size:12},{text:"VEREINIGTES",x:355e4,y:352e4,class:"countries",size:10},{text:"KÖNIGREICH",x:355e4,y:342e4,class:"countries",size:10}]},IC_32628:{cc:[{text:"ES",x:420468,y:3180647,class:"cc",size:12}],en:[{text:"Canary Islands",x:420468,y:3180647,class:"countries",size:12}],fr:[{text:"Les îles Canaries",x:420468,y:3180647,class:"countries",size:12}],de:[{text:"Kanarische Inseln",x:41e4,y:3180647,class:"countries",size:12}]},GP_32620:{cc:[{text:"FR",x:667e3,y:174e4,class:"cc",size:12}],en:[{text:"Guadeloupe",x:7e5,y:181e4,class:"countries",size:12}]},MQ_32620:{cc:[{text:"FR",x:716521,y:1621322,class:"cc",size:12}],en:[{text:"Martinique",x:716521,y:1621322,class:"countries",size:12}]},GF_32622:{cc:[{text:"FR",x:266852,y:444074,class:"cc",size:12}],en:[{text:"Guyane",x:266852,y:444074,class:"countries",size:12}],de:[{text:"Guayana",x:266852,y:444074,class:"countries",size:12}]},RE_32740:{cc:[{text:"FR",x:348011,y:768e4,class:"cc",size:10}],en:[{text:"Réunion",x:348011,y:768e4,class:"countries",size:10}]},YT_32738:{cc:[{text:"FR",x:516549,y:8593920,class:"cc",size:10}],en:[{text:"Mayotte",x:516549,y:8593920,class:"countries",size:10}]},MT_3035:{cc:[{text:"MT",x:4719755,y:1410701,class:"cc",size:10}],en:[{text:"Malta",x:4719755,y:1410701,class:"countries",size:10}]},PT20_32626:{cc:[{text:"PT",x:397418,y:432e4,class:"cc",size:10}],en:[{text:"Azores",x:397418,y:432e4,class:"countries",size:10}],fr:[{text:"Açores",x:397418,y:4271471,class:"countries",size:10}],de:[{text:"Azoren",x:397418,y:4271471,class:"countries",size:10}]},PT30_32628:{cc:[{text:"PT",x:333586,y:3624e3,class:"cc",size:10,rotate:30}],en:[{text:"Madeira",x:333586,y:3624e3,class:"countries",size:10,rotate:30}],fr:[{text:"Madère",x:333586,y:3624e3,class:"countries",size:10,rotate:30}]},LI_3035:{cc:[{text:"LI",x:4287060,y:266e4,class:"cc",size:12}],en:[{text:"Liechtenstein",x:4287060,y:2679e3,class:"countries",size:7}]},IS_3035:{cc:[{text:"IS",x:3011804,y:496e4,class:"cc",size:12}],en:[{text:"Iceland",x:3011804,y:496e4,class:"countries",size:12}],fr:[{text:"Islande",x:3011804,y:496e4,class:"countries",size:12}],de:[{text:"Island",x:3011804,y:496e4,class:"countries",size:12}]},SJ_SV_3035:{cc:[{text:"NO",x:457e4,y:626e4,class:"cc",size:10}],en:[{text:"Svalbard",x:457e4,y:626e4,class:"countries",size:10}],de:[{text:"Spitzbergen",x:457e4,y:626e4,class:"countries",size:7}]},SJ_JM_3035:{cc:[{text:"NO",x:3647762,y:5420300,class:"cc",size:10}],en:[{text:"Jan Mayen",x:3647762,y:5420300,class:"countries",size:7}]},CARIB_32620:{cc:[{text:"FR",x:7e5,y:181e4,class:"cc",size:10},{text:"FR",x:64e4,y:159e4,class:"cc",size:10},{text:"FR",x:54e4,y:1962e3,class:"cc",size:7}],en:[{text:"Guadeloupe",x:7e5,y:181e4,class:"countries",size:10},{text:"Martinique",x:57e4,y:159e4,class:"countries",size:10},{text:"Saint Martin",x:597e3,y:1962e3,class:"countries",size:7}]},WORLD_54030:{en:[{text:"NORTH ATLANTIC",x:-45,y:25,class:"seas",size:10,letterSpacing:1},{text:"SOUTH ATLANTIC",x:-15,y:-25,class:"seas",size:10,letterSpacing:1},{text:"SOUTH PACIFIC",x:-126,y:-25,class:"seas",size:10,letterSpacing:1},{text:"NORTH",x:-136,y:25,class:"seas",size:10,letterSpacing:1},{text:"PACIFIC",x:-134,y:20,class:"seas",size:10,letterSpacing:1},{text:"INDIAN OCEAN",x:80,y:-25,class:"seas",size:10,letterSpacing:1},{text:"SOUTHERN OCEAN",x:-5,y:-67,class:"seas",size:10,letterSpacing:6}]}},$u={"03M":{type:"Topology",arcs:[[[3061,1303],[-152,-59],[-32,-66],[-65,72],[-96,7],[-16,59],[-64,19],[-56,-39],[-120,39],[-184,-19],[-16,26],[32,52],[-16,72],[24,40],[8,183]],[[2885,0],[-8,46],[-65,85],[-40,-7],[-40,40],[0,111],[80,13],[25,46],[72,13],[40,98],[-56,118],[144,196],[-24,79],[88,59],[-24,98],[-8,20],[24,39],[8,52],[48,72],[-88,125]],[[825,2638],[-112,-98],[-72,-7],[-88,-118],[-176,-39],[56,-91],[88,-33],[24,-53],[56,-39],[24,-91],[-56,-46],[24,-105],[-56,-92],[-104,0],[-48,-104],[-16,-40],[-57,7],[-40,-53],[-16,-78],[113,-118],[-97,-65],[-88,-99],[-80,20],[-80,-39],[-24,-13]],[[1098,2304],[-193,66],[24,39],[-16,39],[65,13],[0,33],[-65,79],[-88,65]],[[2308,1689],[-153,-20],[-64,59],[-40,7],[-96,-27],[-104,138],[-8,92],[-32,78],[-64,26],[-32,-59],[-24,0],[-56,86],[-40,137],[-25,65],[-56,0],[-56,46],[-64,-72],[-120,53],[-88,-40],[-88,46]]],transform:{scale:[37.761044752777565,38.54734205626113],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"10M":{type:"Topology",arcs:[[[962,0],[-29,75],[48,131],[21,35],[11,38],[32,117],[-24,44]],[[1021,440],[-64,-29],[-70,36],[-120,2],[3,121]],[[770,570],[-126,16],[-40,91],[-45,4],[-51,93],[-142,4]],[[275,891],[-131,-99],[30,-36],[24,-31],[-6,-86],[-98,-86],[13,-64],[-27,-38],[-80,-31]],[[366,778],[-37,22],[-54,91]]],transform:{scale:[113.2099448513097,114.12782081303801],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}},"20M":{type:"Topology",arcs:[[[536,0],[-24,45],[15,30],[45,92],[-1,44],[-2,37]],[[569,248],[-130,9],[-10,64]],[[429,321],[-64,10],[-78,94],[-83,13]],[[153,502],[-73,-51],[26,-84],[-48,-53],[-3,-52],[-55,-25]],[[204,438],[-51,64]]],transform:{scale:[203.12309601494124,202.56551463031246],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}},"60M":{type:"Topology",arcs:[[[310,138],[-36,-2],[-40,42]],[[234,178],[-123,65]],[[84,278],[-84,-147]],[[111,243],[-27,35]],[[292,0],[18,138]]],transform:{scale:[372.84281730215633,364.87611898580536],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}}};function Ku(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}dn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]});var Ju=function t(e,n){var r={svgId_:"map",svg_:void 0};r.width_=Math.min(800,window.innerWidth),r.height_=0,r.containerId_=void 0,r.nutsLvl_=3,r.nutsYear_=2016,r.geo_="EUR",r.proj_="3035",r.scale_="20M",r.geoCenter_=void 0,r.pixSize_=void 0,r.zoomExtent_=void 0,r.fontFamily_="Helvetica, Arial, sans-serif",r.title_="",r.titleFontSize_=20,r.titleFill_="black",r.titlePosition_=void 0,r.titleFontWeight_="bold",r.titleStroke_="none",r.titleStrokeWidth_="none",r.subtitle_="",r.subtitleFontSize_=12,r.subtitleFill_="grey",r.subtitlePosition_=void 0,r.subtitleFontWeight_="bold",r.subtitleStroke_="none",r.subtitleStrokeWidth_="none",r.frameStroke_="none",r.frameStrokeWidth_=0,r.showScalebar_=!1,r.scalebarPosition_=[],r.scalebarFontSize_=9,r.scalebarUnits_=" km",r.scalebarTextOffset_=[0,12],r.scalebarMaxWidth_=150,r.scalebarHeight_=90,r.scalebarStrokeWidth_=1,r.scalebarSegmentHeight_=6,r.scalebarTickHeight_=8,r.tooltip_={maxWidth:"200px",fontSize:"14px",background:"white",padding:"5px",border:"0px",borderRadius:"5px",boxShadow:"5px 5px 5px grey",transitionDuration:200,xOffset:0,yOffset:0,textFunction:null,showFlags:!1},r.tooltipText_=function(t){return t.properties.na},r.tooltipShowFlags_=!1,r.bordersToShow_=["eu","efta","cc","oth","co"],r.countriesToShow_=["AL","AT","BE","BG","CH","CY","CZ","DE","DK","EE","EL","ES","FI","FR","HR","HU","IE","IS","IT","LI","LT","LU","LV","ME","MK","MT","NL","NO","PL","PT","RO","RS","SE","SI","SK","TR","UK"],r.nutsrgFillStyle_="white",r.nutsrgSelFillSty_="#e0bcdf",r.nutsbnStroke_={0:"black",1:"black",2:"black",3:"black",oth:"grey",co:"black"},r.nutsbnStrokeWidth_={0:1,1:.4,2:.4,3:.4,oth:0,co:.3},r.cntrgFillStyle_="#f4f4f4",r.cntbnStroke_={eu:"black",efta:"black",cc:"black",oth:"grey",co:"#7f7f7f"},r.cntbnStrokeWidth_={eu:1,efta:1,cc:1,oth:.5,co:.2},r.worldFillStyle_="#E6E6E6",r.worldStroke_="black",r.worldStrokeWidth_=1,r.worldCoastStroke_="none",r.worldCoastStrokeWidth_=.3,r.seaFillStyle_="white",r.drawCoastalMargin_=!0,r.coastalMarginColor_="#c2daed",r.coastalMarginWidth_=5,r.coastalMarginStdDev_=2,r.drawGraticule_=!1,r.graticuleStroke_="lightgray",r.graticuleStrokeWidth_=1,r.labelling_=!1,r.labelsConfig_=Zu,r.labelsToShow_=["countries","seas"],r.labelFill_={seas:"#003399",countries:"black",cc:"black",values:"black"},r.labelStroke_={seas:"#003399",countries:"black",cc:"black",values:"black"},r.labelStrokeWidth_={seas:.5,countries:.5,cc:.5,values:.5},r.labelOpacity_={seas:1,countries:.8,cc:.8,values:.9},r.labelValuesFontSize_=10,r.labelShadow_=!1,r.labelShadowWidth_={seas:3,countries:3,cc:3,values:1},r.labelShadowColor_={seas:"white",countries:"white",cc:"white",values:"white"},r.showSourceLink_=!0,r.bottomText_="Administrative boundaries: ©EuroGeographics ©UN-FAO ©INSTAT ©Turkstat",r.botTxtFontSize_=10,r.botTxtFill_="black",r.botTxtPadding_=10,r.botTxtTooltipTxt_="The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the European Union concerning the legal status of any country, territory, city or area or of its authorities, or concerning the delimitation of its frontiers or boundaries. Kosovo*: This designation is without prejudice to positions on status, and is in line with UNSCR 1244/1999 and the ICJ Opinion on the Kosovo declaration of independence. Palestine*: This designation shall not be construed as recognition of a State of Palestine and is without prejudice to the individual positions of the Member States on this issue.",r.nuts2jsonBaseURL_="https://gisco-services.ec.europa.eu/pub/nuts2json/v2/",r.insets_=[],r.insetTemplates_={},r.insetBoxPosition_=void 0,r.insetBoxPadding_=5,r.insetBoxWidth_=210,r.insetZoomExtent_=null,r.insetScale_="03M",r._geom={mixed:{rg0:void 0,rg1:void 0,rg2:void 0,rg3:void 0},cntbn:void 0,cntrg:void 0,nutsbn:void 0,nutsrg:void 0,gra:void 0,worldrg:void 0,worldbn:void 0,kosovo:void 0,path:void 0};var o=function(t){r[t.substring(0,t.length-1)]=function(e){return arguments.length?(r[t]=e,r):r[t]}};for(var a in r)o(a);["tooltip_"].forEach((function(t){r[t.substring(0,t.length-1)]=function(e){if(!arguments.length)return r[t];if("object"===Yi()(e)&&null!==e)for(var n in e)r[t][n]=e[n];else r[t]=e;return l(t,e),r}}));var l=function(t,e){if(r.insetTemplates_)for(var n in r.insetTemplates_)if(Array.isArray(r.insetTemplates_[n]))for(var i=0;i<r.insetTemplates_[n].length;i++)if(Array.isArray(r.insetTemplates_[n][i]))for(var o=0;o<r.insetTemplates_[n][i].length;o++)r.insetTemplates_[n][i][o][t](e);else r.insetTemplates_[n][i][t](e);else r.insetTemplates_[n][t](e)};r.tooltipText=function(t){return console.log("map.tooltipText() is now deprecated. Please use map.tooltip(config.textFunction) instead. See API reference for details."),r.tooltip_.textFunction=t,r},r.title=function(t){return arguments.length?(r.title_=t,r.svg()&&r.svg().select("#title"+r.geo()).text(t),r):r.title_},r.subtitle=function(t){return arguments.length?(r.subtitle_=t,r.svg()&&r.svg().select("#subtitle"+r.geo()).text(t),r):r.subtitle_},r.insets=function(){return arguments.length?(1==arguments.length&&"default"===arguments[0]?r.insets_="default":1==arguments.length&&Array.isArray(arguments[0])?r.insets_=arguments[0]:r.insets_=arguments,r):r.insets_},r.drawGraticule=function(t){if(!arguments.length)return r.drawGraticule_;r.drawGraticule_=t;var e=yt("#g_gra"),n=r.svg_?r.svg_.select("#zoomgroup"+r.svgId_):null;return e._groups[0][0]&&0==t?e.remove():r._geom.gra&&r._geom.path&&n&&1==t&&(e.remove(),n.append("g").attr("id","g_gra").style("fill","none").style("stroke",r.graticuleStroke()).style("stroke-width",r.graticuleStrokeWidth()).selectAll("path").data(r._geom.gra).enter().append("path").attr("d",r._geom.path).attr("class","gra"),yt("#g_gra").each((function(){"WORLD"==r.geo_?this.parentNode.insertBefore(this,this.parentNode.childNodes[3]):this.parentNode.insertBefore(this,this.parentNode.childNodes[1])}))),r},r.seaFillStyle=function(t){if(!arguments.length)return r.seaFillStyle_;if(r.seaFillStyle_=t,"WORLD"==r.geo_){var e=yt("#sphere");e&&e.style("fill",r.seaFillStyle_)}else{var n=Ia("#sea");n&&n.style("fill",r.seaFillStyle_)}for(var i in r.insetTemplates_)if(Array.isArray(r.insetTemplates_[i]))for(var o=0;o<r.insetTemplates_[i].length;o++)if(Array.isArray(r.insetTemplates_[i][o]))for(var a=0;a<r.insetTemplates_[i][o].length;a++){var l=r.insetTemplates_[i][o][a];l.seaFillStyle_=r.seaFillStyle_}else{var s=r.insetTemplates_[i][o];s.seaFillStyle_=r.seaFillStyle_}else{var u=r.insetTemplates_[i];u.seaFillStyle_=r.seaFillStyle_}return r},r.cntrgFillStyle=function(t){if(!arguments.length)return r.cntrgFillStyle_;if(r.cntrgFillStyle_=t,"WORLD"==r.geo_){var e=Ia(".worldrg");e&&e.style("fill",r.cntrgFillStyle_)}else{var n=Ia(".cntrg");n&&n.style("fill",r.cntrgFillStyle_)}for(var i in r.insetTemplates_)if(Array.isArray(r.insetTemplates_[i]))for(var o=0;o<r.insetTemplates_[i].length;o++)if(Array.isArray(r.insetTemplates_[i][o]))for(var a=0;a<r.insetTemplates_[i][o].length;a++){var l=r.insetTemplates_[i][o][a];l.cntrgFillStyle_=r.cntrgFillStyle_}else{var s=r.insetTemplates_[i][o];s.cntrgFillStyle_=r.cntrgFillStyle_}else{var u=r.insetTemplates_[i];u.cntrgFillStyle_=r.cntrgFillStyle_}return r},r.drawCoastalMargin=function(t){if(!arguments.length)return r.drawCoastalMargin_;r.drawCoastalMargin_=t;var e=Ia("#g_coast_margin"),n=yt("#coastal_blur"),i=r.svg_?r.svg_.select("#zoomgroup"+r.svgId_):null;if(e._groups[0][0]&&0==t)e.remove();else if(1==t&&r._geom.path&&i){e.remove(),n.remove(),r.svg_.append("filter").attr("id","coastal_blur").attr("x","-200%").attr("y","-200%").attr("width","400%").attr("height","400%").append("feGaussianBlur").attr("in","SourceGraphic").attr("stdDeviation",r.coastalMarginStdDev_);var o=function(t){var e=r.svg().select("#zoomgroup"+t.svgId_).append("g").attr("id","g_coast_margin").style("fill","none").style("stroke-width",t.coastalMarginWidth_).style("stroke",t.coastalMarginColor_).style("filter","url(#coastal_blur)").style("stroke-linejoin","round").style("stroke-linecap","round");t._geom.cntbn&&e.append("g").attr("id","g_coast_margin_cnt").selectAll("path").data(t._geom.cntbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",t._geom.path),t._geom.nutsbn&&e.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(t._geom.nutsbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",t._geom.path),t._geom.worldbn&&e.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(t._geom.worldbn).enter().filter((function(t){return"T"===t.properties.COAS_FLAG})).append("path").attr("d",t._geom.path)};for(var a in r.insetTemplates_)if(Array.isArray(r.insetTemplates_[a]))for(var l=0;l<r.insetTemplates_[a].length;l++)if(Array.isArray(r.insetTemplates_[a][l]))for(var s=0;s<r.insetTemplates_[a][l].length;s++){var u=r.insetTemplates_[a][l][s];u.drawCoastalMargin_=r.drawCoastalMargin_;r.svg().select("#zoomgroup"+u.svgId_);r.drawCoastalMargin_&&o(u)}else{var c=r.insetTemplates_[a][l];c.drawCoastalMargin_=r.drawCoastalMargin_;r.svg().select("#zoomgroup"+c.svgId_);r.drawCoastalMargin_&&o(c)}else{var f=r.insetTemplates_[a];f.drawCoastalMargin_=r.drawCoastalMargin_;r.svg().select("#zoomgroup"+f.svgId_);r.drawCoastalMargin_&&o(f)}r.drawCoastalMargin_&&o(r),Ia("#g_coast_margin").each((function(){"WORLD"==r.geo_?this.parentNode.insertBefore(this,this.parentNode.childNodes[3]):this.parentNode.insertBefore(this,this.parentNode.childNodes[1])}))}return r},r.coastalMarginWidth=function(t){if(!arguments.length)return r.coastalMarginWidth_;for(var e in r.coastalMarginWidth_=t,r.insetTemplates_)if(Array.isArray(r.insetTemplates_[e]))for(var n=0;n<r.insetTemplates_[e].length;n++)if(Array.isArray(r.insetTemplates_[e][n]))for(var i=0;i<r.insetTemplates_[e][n].length;i++){var o=r.insetTemplates_[e][n][i];o.coastalMarginWidth_=r.coastalMarginWidth_,o.drawCoastalMargin(!0)}else{var a=r.insetTemplates_[e][n];a.coastalMarginWidth_=r.coastalMarginWidth_,a.drawCoastalMargin(!0)}else{var l=r.insetTemplates_[e];l.coastalMarginWidth_=r.coastalMarginWidth_,l.drawCoastalMargin(!0)}return r.drawCoastalMargin(!0),r},r.coastalMarginColor=function(t){if(!arguments.length)return r.coastalMarginColor_;for(var e in r.coastalMarginColor_=t,r.insetTemplates_)if(Array.isArray(r.insetTemplates_[e]))for(var n=0;n<r.insetTemplates_[e].length;n++)if(Array.isArray(r.insetTemplates_[e][n]))for(var i=0;i<r.insetTemplates_[e][n].length;i++){var o=r.insetTemplates_[e][n][i];o.coastalMarginColor_=r.coastalMarginColor_,o.drawCoastalMargin(!0)}else{var a=r.insetTemplates_[e][n];a.coastalMarginColor_=r.coastalMarginColor_,a.drawCoastalMargin(!0)}else{var l=r.insetTemplates_[e];l.coastalMarginColor_=r.coastalMarginColor_,l.drawCoastalMargin(!0)}return r.drawCoastalMargin(!0),r};var s=void 0,u=void 0,c=void 0;function f(t,e){var n=t.labelsConfig_,r=t.lg_,i=[],o=e.append("g").attr("class","labels-container");if((t.labelsToShow_.includes("countries")||t.labelsToShow_.includes("seas"))&&(i=n[t.geo_+"_"+t.proj_][r]?n[t.geo_+"_"+t.proj_][r]:n[t.geo_+"_"+t.proj_].en),t.labelsToShow_.includes("cc")&&(i=i.concat(n[t.geo_+"_"+t.proj_].cc)),t.labelsToShow_.includes("values")&&t._geom.nutsrg){var a,l=o.append("g").attr("class","g_stat_label_shadows").style("font-size",t.labelValuesFontSize_+"px").attr("text-anchor","middle").style("opacity",(function(e){return t.labelOpacity_.values})).style("fill",(function(e){return t.labelShadowColor_.values})).attr("stroke",(function(e){return t.labelShadowColor_.values})).attr("stroke-width",(function(e){return t.labelStrokeWidth_.values+t.labelShadowWidth_.values})).style("font-family",t.fontFamily_),s=o.append("g").attr("class","g_stat_labels").style("font-size",t.labelValuesFontSize_+"px").attr("text-anchor","middle").style("opacity",(function(e){return t.labelOpacity_.values})).style("fill",(function(e){return t.labelFill_.values})).attr("stroke",(function(e){return t.labelStroke_.values})).attr("stroke-width",(function(e){return t.labelStrokeWidth_.values})).style("font-family",t.fontFamily_);"mixed"==t.nutsLvl_?(t._geom.mixed.rg0=t._geom.nutsrg,t._geom.mixed.rg1=Gu(u[1],u[1].objects.nutsrg).features,t._geom.mixed.rg2=Gu(u[2],u[2].objects.nutsrg).features,t._geom.mixed.rg3=Gu(u[3],u[3].objects.nutsrg).features,a=t._geom.mixed.rg0.concat(t._geom.mixed.rg1,t._geom.mixed.rg2,t._geom.mixed.rg3)):a=t._geom.nutsrg,s.selectAll("g").data(a).enter().append("g").attr("transform",(function(e){return"translate("+t._geom.path.centroid(e)+")"})).attr("class","stat-label"),t.labelShadow_&&l.selectAll("g").data(a).enter().append("g").attr("transform",(function(e){return"translate("+t._geom.path.centroid(e)+")"})).attr("class","stat-label-shadow")}if(i){var c=i.filter((function(e){return"countries"==e.class&&t.labelsToShow_.includes("countries")||"seas"==e.class&&t.labelsToShow_.includes("seas")||"cc"==e.class&&t.labelsToShow_.includes("cc")?e:void 0})),f=o.append("g").attr("class","g_labelShadows").style("pointer-events","none").style("font-family",t.fontFamily_).attr("text-anchor","middle"),h=o.append("g").attr("class","g_geolabels").style("pointer-events","none").style("font-family",t.fontFamily_).attr("text-anchor","middle");if(t.labelShadow_)f.selectAll("text").data(c).enter().append("text").attr("class",(function(t){return"labelShadow_"+t.class})).attr("x",(function(e){return e.rotate?0:t._projection([e.x,e.y])[0]})).attr("y",(function(e){return e.rotate?0:t._projection([e.x,e.y])[1]})).attr("dy",-7).style("opacity",(function(e){return t.labelOpacity_[e.class]})).style("letter-spacing",(function(t){return t.letterSpacing?t.letterSpacing:0})).style("fill",(function(e){return t.labelShadowColor_[e.class]})).attr("stroke",(function(e){return t.labelShadowColor_[e.class]})).attr("stroke-width",(function(e){return t.labelStrokeWidth_[e.class]+t.labelShadowWidth_[e.class]})).style("font-size",(function(t){return t.size+"px"})).style("font-style",(function(t){return"seas"==t.class?"italic":"normal"})).attr("transform",(function(e){if(e.rotate){var n=t._projection([e.x,e.y]),r=n[0],i=n[1];return"translate(".concat(r,",").concat(i,") rotate(").concat(e.rotate,")")}return"rotate(0)"})).style("font-style",(function(t){return"seas"==t.class?"italic":"normal"})).text((function(t){return t.text}));h.selectAll("text").data(c).enter().append("text").attr("class",(function(t){return"geolabel_"+t.class})).attr("x",(function(e){return e.rotate?0:t._projection([e.x,e.y])[0]})).attr("y",(function(e){return e.rotate?0:t._projection([e.x,e.y])[1]})).attr("dy",-7).style("opacity",(function(e){return t.labelOpacity_[e.class]})).style("letter-spacing",(function(t){return t.letterSpacing?t.letterSpacing:0})).style("fill",(function(e){return t.labelFill_[e.class]})).attr("stroke",(function(e){return t.labelStroke_[e.class]})).attr("stroke-width",(function(e){return t.labelStrokeWidth_[e.class]})).style("font-size",(function(t){return t.size+"px"})).attr("transform",(function(e){if(e.rotate){var n=t._projection([e.x,e.y]),r=n[0],i=n[1];return"translate(".concat(r,",").concat(i,") rotate(").concat(e.rotate,")")}return"rotate(0)"})).text((function(t){return t.text}))}}function h(t){return t<.01?1e3*t+"mm":t<1?100*t+"cm":t<1e3?1*t+"m":t/1e3}r.isGeoReady=function(){if(!s)return!1;for(var t in r.insetTemplates_)if(Array.isArray(r.insetTemplates_[t])){for(var e=0;e<r.insetTemplates_[t].length;e++)if(Array.isArray(r.insetTemplates_[t][e])){for(var n=0;n<r.insetTemplates_[t][e].length;n++)if(!r.insetTemplates_[t][e][n].isGeoReady())return!1}else if(!r.insetTemplates_[t][e].isGeoReady())return!1}else if(!r.insetTemplates_[t].isGeoReady())return!1;return!0},r.getGeoDataPromise=function(){var t=this;if("mixed"==r.nutsLvl_&&"WORLD"!==r.geo_){var e=[];return[0,1,2,3].forEach((function(n){var i=[];i.push(r.nuts2jsonBaseURL_),i.push(r.nutsYear_),"EUR"!=r.geo_&&i.push("/"+t.geo_),i.push("/"),i.push(r.proj_),i.push("/"),i.push(r.scale_),i.push("/"),i.push(n),i.push(".json"),e.push(Vi(i.join("")))})),n&&[0,1,2,3].forEach((function(n){var i=[];i.push(r.nuts2jsonBaseURL_),i.push(r.nutsYear_),"EUR"!=r.geo_&&i.push("/"+t.geo_),i.push("/"),i.push(r.proj_),i.push("/nutspt_"),i.push(n),i.push(".json"),e.push(Vi(i.join("")))})),e}if("WORLD"==r.geo_)return[Vi("https://raw.githubusercontent.com/eurostat/eurostat-map.js/master/src/assets/topojson/WORLD_4326.json")];var i=[],o=[];if(o.push(r.nuts2jsonBaseURL_),o.push(r.nutsYear_),"EUR"!=r.geo_&&o.push("/"+this.geo_),o.push("/"),o.push(r.proj_),o.push("/"),o.push(r.scale_),o.push("/"),o.push(r.nutsLvl_),o.push(".json"),i.push(Vi(o.join(""))),n){var a=[];a.push(r.nuts2jsonBaseURL_),a.push(r.nutsYear_),"EUR"!=r.geo_&&a.push("/"+this.geo_),a.push("/"),a.push(r.proj_),a.push("/nutspt_"),a.push(r.nutsLvl_),a.push(".json"),i.push(Vi(a.join("")))}return i},r.updateGeoMT=function(t){if(s=null,u=null,c=null,"mixed"==r.nutsLvl_&&"WORLD"!==r.geo_){var e=r.getGeoDataPromise();Promise.all(e).then((function(e){u=e,s=e[0],n&&(c=[e[4],e[5],e[6],e[7]]),r.buildMapTemplate(),t&&t()}),(function(t){console.error(t)}))}else{var i=r.getGeoDataPromise();Promise.all(i).then((function(e){s=e[0],n&&(c=e[1]),r.buildMapTemplate(),t&&t()}),(function(t){console.error(t)}))}for(var o in r.insetTemplates_)if(Array.isArray(r.insetTemplates_[o]))for(var a=0;a<r.insetTemplates_[o].length;a++)if(Array.isArray(r.insetTemplates_[o][a]))for(var l=0;l<r.insetTemplates_[o][a].length;l++)r.insetTemplates_[o][a][l].updateGeoMT(t);else r.insetTemplates_[o][a].updateGeoMT(t);else r.insetTemplates_[o].updateGeoMT(t);return r},r.buildMapTemplateBase=function(){r.insetTemplates_={};var t=yt("#"+r.svgId());0==t.size()&&(t=yt("body").append("svg").attr("id",r.svgId())),r.svg(t),r.containerId_||(r.containerId_=r.svgId_),r.tooltip_.containerId||(r.tooltip_.containerId=r.containerId_),Ia("#"+r.svgId()+" > *").remove(),"WORLD"==r.geo_.toUpperCase()&&(r.height()||r.height(.55*r.width()),t.attr("width",r.width()).attr("height",r.height()),r.proj_=54030),r.height()||r.height(.85*r.width()),t.attr("width",r.width()).attr("height",r.height()),t.append("defs").append("clipPath").attr("id",r.svgId_+"_clipP").append("path").attr("d",function(t,e,n,r){t=parseFloat(t,10),e=parseFloat(e,10),n=parseFloat(n,10),r=parseFloat(r,10);if(t<0||e<0||n<0||r<0)return"";return"M"+t+","+e+"L"+(t+n)+","+e+" "+(t+n)+","+(e+r)+" "+t+","+(e+r)+"z"}(0,0,r.width_,r.height_)),r.drawCoastalMargin_&&t.append("filter").attr("id","coastal_blur").attr("x","-200%").attr("y","-200%").attr("width","400%").attr("height","400%").append("feGaussianBlur").attr("in","SourceGraphic").attr("stdDeviation",r.coastalMarginStdDev_);var e=t.insert("g",":first-child").attr("id","drawing"+r.svgId_).attr("clip-path","url(#"+r.svgId_+"_clipP)"),n=e.append("g").attr("id","zoomgroup"+r.svgId_);r.insetBoxPosition_||(r.insetBoxPosition_=[r.width()-r.insetBoxWidth()-2*r.insetBoxPadding(),2*r.insetBoxPadding()]);var i=e.append("g").attr("id","insetsgroup").attr("transform","translate("+r.insetBoxPosition()[0]+","+r.insetBoxPosition()[1]+")");"default"===r.insets_&&(r.insets_=tc(r.insetBoxWidth(),r.insetBoxPadding()));for(var o=0;o<r.insets_.length;o++){var a=r.insets_[o];if(a.svgId=a.svgId||"inset"+a.geo+Math.random().toString(36).substring(7),0==yt("#"+a.svgId).size()){var l=null==a.x?r.insetBoxPadding_:a.x,s=null==a.y?r.insetBoxPadding_+o*(r.insetBoxPadding_+r.insetBoxWidth_):a.y;i.append("g").attr("id","insetzg"+a.svgId).attr("transform","translate("+l+","+s+")").append("svg").attr("id",a.svgId)}r.insetTemplates_[a.geo]?r.insetTemplates_[a.geo]=[r.insetTemplates_[a.geo],p(a,r).buildMapTemplateBase()]:r.insetTemplates_[a.geo]=p(a,r).buildMapTemplateBase()}if(e.append("rect").attr("id","frame"+r.geo_).attr("x",0).attr("y",0).attr("width",r.width_).attr("height",r.height_).style("stroke-width",r.frameStrokeWidth_).style("stroke",r.frameStroke_).style("fill","none"),r.zoomExtent()){var u=function(){var t,e,n=La,r=Na,i=Ra,o=Pa,a=Oa,l=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,c=so,f=to("start","zoom","end"),h=0;function p(t){t.property("__zoom",Da).on("wheel.zoom",x).on("mousedown.zoom",b).on("dblclick.zoom",S).filter(a).on("touchstart.zoom",w).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",M).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new za(e,t.x,t.y)}function g(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new za(t.k,r,i)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function _(t,e,n){t.on("start.zoom",(function(){v(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){v(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,o=v(t,i),a=r.apply(t,i),l=null==n?y(a):"function"==typeof n?n.apply(t,i):n,s=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),u=t.__zoom,f="function"==typeof e?e.apply(t,i):e,h=c(u.invert(l).concat(s/u.k),f.invert(l).concat(s/f.k));return function(t){if(1===t)t=f;else{var e=h(t),n=s/e[2];t=new za(n,l[0]-e[0]*n,l[1]-e[1]*n)}o.zoom(null,t)}}))}function v(t,e,n){return!n&&t.__zooming||new m(t,e)}function m(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function x(){if(n.apply(this,arguments)){var t=v(this,arguments),e=this.__zoom,r=Math.max(l[0],Math.min(l[1],e.k*Math.pow(2,o.apply(this,arguments)))),a=fo(this);if(t.wheel)t.mouse[0][0]===a[0]&&t.mouse[0][1]===a[1]||(t.mouse[1]=e.invert(t.mouse[0]=a)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[a,e.invert(a)],Uo(this),t.start()}Ea(),t.wheel=setTimeout(u,150),t.zoom("mouse",i(g(d(e,r),t.mouse[0],t.mouse[1]),t.extent,s))}function u(){t.wheel=null,t.end()}}function b(){if(!e&&n.apply(this,arguments)){var t=v(this,arguments,!0),r=yt(nt.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",c,!0),o=fo(this),a=nt.clientX,l=nt.clientY;no(nt.view),Aa(),t.mouse=[o,this.__zoom.invert(o)],Uo(this),t.start()}function u(){if(Ea(),!t.moved){var e=nt.clientX-a,n=nt.clientY-l;t.moved=e*e+n*n>h}t.zoom("mouse",i(g(t.that.__zoom,t.mouse[0]=fo(t.that),t.mouse[1]),t.extent,s))}function c(){r.on("mousemove.zoom mouseup.zoom",null),ro(nt.view,t.moved),Ea(),t.end()}}function S(){if(n.apply(this,arguments)){var t=this.__zoom,e=fo(this),o=t.invert(e),a=t.k*(nt.shiftKey?.5:2),l=i(g(d(t,a),e,o),r.apply(this,arguments),s);Ea(),u>0?yt(this).transition().duration(u).call(_,l,e):yt(this).call(p.transform,l)}}function w(){if(n.apply(this,arguments)){var e,r,i,o,a=nt.touches,l=a.length,s=v(this,arguments,nt.changedTouches.length===l);for(Aa(),r=0;r<l;++r)i=a[r],o=[o=ho(this,a,i.identifier),this.__zoom.invert(o),i.identifier],s.touch0?s.touch1||s.touch0[2]===o[2]||(s.touch1=o,s.taps=0):(s.touch0=o,e=!0,s.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(s.taps<2&&(t=setTimeout((function(){t=null}),500)),Uo(this),s.start())}}function T(){if(this.__zooming){var e,n,r,o,a=v(this,arguments),l=nt.changedTouches,u=l.length;for(Ea(),t&&(t=clearTimeout(t)),a.taps=0,e=0;e<u;++e)n=l[e],r=ho(this,l,n.identifier),a.touch0&&a.touch0[2]===n.identifier?a.touch0[0]=r:a.touch1&&a.touch1[2]===n.identifier&&(a.touch1[0]=r);if(n=a.that.__zoom,a.touch1){var c=a.touch0[0],f=a.touch0[1],h=a.touch1[0],p=a.touch1[1],y=(y=h[0]-c[0])*y+(y=h[1]-c[1])*y,_=(_=p[0]-f[0])*_+(_=p[1]-f[1])*_;n=d(n,Math.sqrt(y/_)),r=[(c[0]+h[0])/2,(c[1]+h[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!a.touch0)return;r=a.touch0[0],o=a.touch0[1]}a.zoom("touch",i(g(n,r,o),a.extent,s))}}function M(){if(this.__zooming){var t,n,r=v(this,arguments),i=nt.changedTouches,o=i.length;for(Aa(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),500),t=0;t<o;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var a=yt(this).on("dblclick.zoom");a&&a.apply(this,arguments)}}}return p.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",Da),t!==r?_(t,e,n):r.interrupt().each((function(){v(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},p.scaleBy=function(t,e,n){p.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},p.scaleTo=function(t,e,n){p.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,a=null==n?y(t):"function"==typeof n?n.apply(this,arguments):n,l=o.invert(a),u="function"==typeof e?e.apply(this,arguments):e;return i(g(d(o,u),a,l),t,s)}),n)},p.translateBy=function(t,e,n){p.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),s)}))},p.translateTo=function(t,e,n,o){p.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,l=null==o?y(t):"function"==typeof o?o.apply(this,arguments):o;return i(Fa.translate(l[0],l[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,s)}),o)},m.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){st(new ka(p,t,this.that.__zoom),f.apply,f,[t,this.that,this.args])}},p.wheelDelta=function(t){return arguments.length?(o="function"==typeof t?t:Ma(+t),p):o},p.filter=function(t){return arguments.length?(n="function"==typeof t?t:Ma(!!t),p):n},p.touchable=function(t){return arguments.length?(a="function"==typeof t?t:Ma(!!t),p):a},p.extent=function(t){return arguments.length?(r="function"==typeof t?t:Ma([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),p):r},p.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],p):[l[0],l[1]]},p.translateExtent=function(t){return arguments.length?(s[0][0]=+t[0][0],s[1][0]=+t[1][0],s[0][1]=+t[0][1],s[1][1]=+t[1][1],p):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},p.constrain=function(t){return arguments.length?(i=t,p):i},p.duration=function(t){return arguments.length?(u=+t,p):u},p.interpolate=function(t){return arguments.length?(c=t,p):c},p.on=function(){var t=f.on.apply(f,arguments);return t===f?p:t},p.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,p):Math.sqrt(h)},p}().scaleExtent(r.zoomExtent()).on("zoom",(function(){for(var t=nt.transform.k,e=["gra","bn_0","bn_co","cntbn","symbol"],i=0;i<e.length;i++)r.svg().selectAll("."+e[i]).style("stroke-width",(function(e){return 1/t+"px"}));n.attr("transform",nt.transform)})).on("end",(function(){var e=Ca(t.node()),n=(fo(this),e.invert([r.width_/2,r.height_/2])),i=r._projection.invert(n);console.log("geoCenter: ",[parseInt(i[0]),parseInt(i[1])]),console.log("pixSize:",parseInt(r.pixSize_/e.k))}));t.call(u)}return r},r.buildMapTemplate=function(){r.tooltip_?r._tooltip=Xu(r.tooltip_):r._tooltip=Xu();var t=Qu[r.geo()+"_"+r.proj()];r.geoCenter()||(t?r.geoCenter(t.geoCenter):r.geoCenter([.5*(s.bbox[0]+s.bbox[2]),.5*(s.bbox[1]+s.bbox[3])])),r.pixSize()||(t?r.pixSize(800*t.pixSize/r.width()):r.pixSize(Math.min((s.bbox[2]-s.bbox[0])/r.width_,(s.bbox[3]-s.bbox[1])/r.height_)));var e,o=[r.geoCenter_[0]-.5*r.pixSize_*r.width_,r.geoCenter_[1]-.5*r.pixSize_*r.height_,r.geoCenter_[0]+.5*r.pixSize_*r.width_,r.geoCenter_[1]+.5*r.pixSize_*r.height_];"WORLD"==r.geo_?"54030"==r.proj_?r._projection=Au(ju).scale(152.63).translate([r.width_/2,r.height_/2]).scale((r.width_-20)/2/Math.PI):console.error("unsupported projection"):r._projection=function(){var t,e,n,r,i,o,a,l=1,s=0,u=0,c=1,f=1,h=0,p=null,d=1,g=1,y=ul({point:function(t,e){var n=m([t,e]);this.stream.point(n[0],n[1])}}),_=sl;function v(){return d=l*c,g=l*f,o=a=null,m}function m(n){var r=n[0]*d,i=n[1]*g;if(h){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+s,i+u]}return m.invert=function(n){var r=n[0]-s,i=n[1]-u;if(h){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/d,i/g]},m.stream=function(t){return o&&a===t?o:o=y(_(a=t))},m.postclip=function(t){return arguments.length?(_=t,p=n=r=i=null,v()):_},m.clipExtent=function(t){return arguments.length?(_=null==t?(p=n=r=i=null,sl):ll(p=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),v()):null==p?null:[[p,n],[r,i]]},m.scale=function(t){return arguments.length?(l=+t,v()):l},m.translate=function(t){return arguments.length?(s=+t[0],u=+t[1],v()):[s,u]},m.angle=function(n){return arguments.length?(e=Ka(h=n%360*Ya),t=Za(h),v()):h*Ga},m.reflectX=function(t){return arguments.length?(c=t?-1:1,v()):c<0},m.reflectY=function(t){return arguments.length?(f=t?-1:1,v()):f<0},m.fitExtent=function(t,e){return wl(m,t,e)},m.fitSize=function(t,e){return Tl(m,t,e)},m.fitWidth=function(t,e){return Ml(m,t,e)},m.fitHeight=function(t,e){return kl(m,t,e)},m}().reflectY(!0).fitSize([r.width_,r.height_],{type:"Feature",geometry:{type:"MultiPoint",coordinates:[[(e=o)[0],e[1]],[e[2],e[3]]]}}),r._geom.path=function(t,e){var n,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),yl(t,n(r))),r.result()}return o.area=function(t){return yl(t,n(ql)),ql.result()},o.measure=function(t){return yl(t,n(ws)),ws.result()},o.bounds=function(t){return yl(t,n(bl)),bl.result()},o.centroid=function(t){return yl(t,n(hs)),hs.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,sl):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new Ts):new ps(e=t),"function"!=typeof i&&r.pointRadius(i),o):e},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(e)}().projection(r._projection),"WORLD"==r.geo_?(r._geom.worldrg=Gu(s,s.objects.CNTR_RG_20M_2020_4326).features,r._geom.worldbn=Gu(s,s.objects.CNTR_BN_20M_2020_4326).features,r._geom.kosovo=Gu(s,s.objects.NUTS_BN_20M_2021_RS_XK_border).features,r._geom.gra=[Gs().step([30,30])()]):(r._geom.gra=Gu(s,s.objects.gra).features,r._geom.nutsrg=Gu(s,s.objects.nutsrg).features,r._geom.nutsbn=Gu(s,s.objects.nutsbn).features,r._geom.cntrg=Gu(s,s.objects.cntrg).features,r._geom.cntbn=Gu(s,s.objects.cntbn).features);var a,l=r.svg().select("#zoomgroup"+r.svgId_);if(l.selectAll("*").remove(),l.append("rect").attr("id","sea").attr("x",-5*r.width_).attr("y",-5*r.height_).attr("width",11*r.width_).attr("height",11*r.height_).style("fill",(function(){return"WORLD"==r.geo_?"white":r.seaFillStyle_})),"WORLD"==r.geo_&&l.append("path").datum({type:"Sphere"}).attr("id","sphere").attr("d",r._geom.path).attr("stroke",r.graticuleStroke()).attr("stroke-width",r.graticuleStrokeWidth()).attr("fill",r.seaFillStyle_),r.drawCoastalMargin_){var p=l.append("g").attr("id","g_coast_margin").style("fill","none").style("stroke-width",r.coastalMarginWidth_).style("stroke",r.coastalMarginColor_).style("filter","url(#coastal_blur)").style("stroke-linejoin","round").style("stroke-linecap","round");r._geom.cntbn&&p.append("g").attr("id","g_coast_margin_cnt").selectAll("path").data(r._geom.cntbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",r._geom.path),r._geom.nutsbn&&p.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(r._geom.nutsbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",r._geom.path),r._geom.worldbn&&p.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(r._geom.worldbn).enter().filter((function(t){return"T"===t.properties.COAS_FLAG})).append("path").attr("d",r._geom.path)}if(r._geom.gra&&r.drawGraticule_&&l.append("g").attr("id","g_gra").style("fill","none").style("stroke",r.graticuleStroke()).style("stroke-width",r.graticuleStrokeWidth()).selectAll("path").data(r._geom.gra).enter().append("path").attr("d",r._geom.path).attr("class","gra"),r._geom.cntrg&&l.append("g").attr("id","g_cntrg").selectAll("path").data(r._geom.cntrg).enter().append("path").attr("d",r._geom.path).attr("class","cntrg").style("fill",r.cntrgFillStyle()),r._geom.worldrg&&l.append("g").attr("id","g_worldrg").selectAll("path").data(r._geom.worldrg).enter().append("path").attr("d",r._geom.path).attr("class","worldrg").attr("fill",r.worldFillStyle_),r._geom.nutsrg)if("mixed"==r.nutsLvl_){if(r._geom.mixed.rg0=r._geom.nutsrg,r._geom.mixed.rg1=Gu(u[1],u[1].objects.nutsrg).features,r._geom.mixed.rg2=Gu(u[2],u[2].objects.nutsrg).features,r._geom.mixed.rg3=Gu(u[3],u[3].objects.nutsrg).features,[r._geom.mixed.rg0,r._geom.mixed.rg1,r._geom.mixed.rg2,r._geom.mixed.rg3].forEach((function(t,e){l.append("g").attr("id","g_nutsrg").selectAll("path").data(t).enter().append("path").attr("d",r._geom.path).attr("class","nutsrg").attr("lvl",e).attr("fill",r.nutsrgFillStyle_)})),"EUR"==r.geo_){var d=Gu($u[r.scale_],"nutsbn_1").features;r.bordersToShow_.includes("cc")&&l.append("g").attr("id","g_kosovo").style("fill","none").selectAll("path").data(d).enter().append("path").attr("d",r._geom.path).style("stroke","grey").style("stroke-width",.3)}}else l.append("g").attr("id","g_nutsrg").selectAll("path").data(r._geom.nutsrg).enter().append("path").attr("d",r._geom.path).attr("class","nutsrg").attr("fill",r.nutsrgFillStyle_);if(r._geom.cntbn&&l.append("g").attr("id","g_cntbn").style("fill","none").selectAll("path").data(r._geom.cntbn).enter().append("path").filter((function(t){return r.bordersToShow_.includes("eu")&&"T"==t.properties.eu||r.bordersToShow_.includes("efta")&&"T"==t.properties.efta||r.bordersToShow_.includes("cc")&&"T"==t.properties.cc||r.bordersToShow_.includes("oth")&&"T"==t.properties.oth||r.bordersToShow_.includes("co")&&"T"==t.properties.co?t:void 0})).attr("d",r._geom.path).attr("class",(function(t){return"T"===t.properties.co?"bn_co":"cntbn"})).style("stroke",(function(t){return"T"===t.properties.co?r.cntbnStroke_.co:"T"===t.properties.eu?r.cntbnStroke_.eu:"T"===t.properties.efta?r.cntbnStroke_.efta:"T"===t.properties.cc?r.cntbnStroke_.cc:"T"===t.properties.oth?r.cntbnStroke_.oth:void 0})).style("stroke-width",(function(t){return"T"===t.properties.co?r.cntbnStrokeWidth_.co+"px":"T"===t.properties.eu?r.cntbnStrokeWidth_.eu+"px":"T"===t.properties.efta?r.cntbnStrokeWidth_.efta+"px":"T"===t.properties.cc?r.cntbnStrokeWidth_.cc+"px":"T"===t.properties.oth?r.cntbnStrokeWidth_.oth+"px":void 0})),r._geom.nutsbn&&(r._geom.nutsbn.sort((function(t,e){return e.properties.lvl-t.properties.lvl})),l.append("g").attr("id","g_nutsbn").style("fill","none").selectAll("path").data(r._geom.nutsbn).enter().filter((function(t){return r.bordersToShow_.includes("eu")&&"T"==t.properties.eu||r.bordersToShow_.includes("efta")&&"T"==t.properties.efta||r.bordersToShow_.includes("cc")&&"T"==t.properties.cc||r.bordersToShow_.includes("oth")&&"T"==t.properties.oth||r.bordersToShow_.includes("co")&&"T"==t.properties.co?t:void 0})).append("path").attr("d",r._geom.path).attr("class",(function(t){return"T"===(t=t.properties).co?"bn_co":["bn_"+t.lvl].join(" ")})).style("stroke",(function(t){return"T"===(t=t.properties).co?r.nutsbnStroke_.co||"#1f78b4":r.nutsbnStroke_[t.lvl]||"#777"})).style("stroke-width",(function(t){return"T"===(t=t.properties).co?r.nutsbnStrokeWidth_.co:t.lvl>0?r.nutsbnStrokeWidth_[t.lvl]:r.nutsbnStrokeWidth_[t.lvl]||.2})),"EUR"==r.geo_)){var g=Gu($u[r.scale_],"nutsbn_1").features;r.bordersToShow_.includes("cc")&&l.append("g").attr("id","g_kosovo").style("fill","none").selectAll("path").data(g).enter().append("path").attr("d",r._geom.path).style("stroke","grey").style("stroke-width",.3)}(r._geom.worldbn&&l.append("g").attr("id","g_worldbn").style("fill","none").selectAll("path").data(r._geom.worldbn).enter().append("path").attr("d",r._geom.path).style("stroke",(function(t){return t.properties.POL_STAT>0?"#b2b2b2":"F"==t.properties.COAS_FLAG?r.worldStroke_:"T"==t.properties.COAS_FLAG?r.worldCoastStroke_:void 0})).style("stroke-width",(function(t){return"F"==t.properties.COAS_FLAG?r.worldStrokeWidth_:"T"==t.properties.COAS_FLAG?r.worldCoastStrokeWidth_:void 0})),r._geom.kosovo&&l.append("g").attr("id","g_worldbn").style("fill","none").selectAll("path").data(r._geom.kosovo).enter().append("path").attr("d",r._geom.path).style("stroke","#4f4f4f").style("stroke-width",(function(t){return"0.3px"})),n)&&(c?a="mixed"==r.nutsLvl_?[].concat(i()(c[0].features),i()(c[1].features),i()(c[2].features),i()(c[3].features)):c.features:"WORLD"==r.geo_&&(a=[],r._geom.worldrg.forEach((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ku(Object(n),!0).forEach((function(e){Bi()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ku(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);e.geometry={coordinates:nu(t),type:"Point"},a.push(e)}))),l.append("g").attr("id","g_ps").selectAll("g").data(a).enter().append("g").attr("transform",(function(t){return"translate("+r._projection(t.geometry.coordinates)+")"})).attr("class","symbol").style("fill","gray").attr("id",(function(t){return"ps"+t.properties.id})).on("mouseover",(function(t){var e=yt(this.childNodes[0]);e.attr("fill___",e.style("fill")),e.style("fill",r.nutsrgSelFillSty_),r._tooltip&&r._tooltip.mouseover(r.tooltip_.textFunction(t,r))})).on("mousemove",(function(){r._tooltip&&r._tooltip.mousemove()})).on("mouseout",(function(){var t=yt(this.childNodes[0]);t.style("fill",t.attr("fill___")),r._tooltip&&r._tooltip.mouseout()})));if(r.labelling_&&f(r,l),r.title()&&(r.titlePosition()||r.titlePosition([10,5+r.titleFontSize()]),r.svg().append("text").attr("id","title"+r.geo_).attr("x",r.titlePosition()[0]).attr("y",r.titlePosition()[1]).text(r.title()).style("font-family",r.fontFamily_).style("font-size",r.titleFontSize()+"px").style("font-weight",r.titleFontWeight()).style("fill",r.titleFill()).style("stroke",r.titleStroke()).style("stroke-width",r.titleStrokeWidth()).style("stroke-linejoin","round").style("paint-order","stroke")),r.subtitle()&&(r.subtitlePosition()||r.subtitlePosition([10,8+r.titleFontSize()+5+r.subtitleFontSize()]),r.svg().append("text").attr("id","subtitle"+r.geo_).attr("x",r.subtitlePosition()[0]).attr("y",r.subtitlePosition()[1]).text(r.subtitle()).style("font-family",r.fontFamily_).style("font-size",r.subtitleFontSize()+"px").style("font-weight",r.subtitleFontWeight()).style("fill",r.subtitleFill()).style("stroke",r.subtitleStroke()).style("stroke-width",r.subtitleStrokeWidth()).style("stroke-linejoin","round").style("paint-order","stroke")),r.bottomText()&&r.svg().append("text").attr("id","bottomtext").attr("x",r.botTxtPadding_).attr("y",r.height_-r.botTxtPadding_).text(r.bottomText()).style("font-family",r.fontFamily_).style("font-size",r.botTxtFontSize_+"px").style("fill",r.botTxtFill_).on("mouseover",(function(){r._tooltip.mw___=r._tooltip.style("max-width"),r._tooltip.style("max-width","400px"),r._tooltip.style("font-size",r.botTxtFontSize_),r.botTxtTooltipTxt_&&r._tooltip.mouseover(r.botTxtTooltipTxt_)})).on("mousemove",(function(){r.botTxtTooltipTxt_&&r._tooltip.mousemove()})).on("mouseout",(function(){r.botTxtTooltipTxt_&&r._tooltip.mouseout(),r._tooltip.style("max-width",r._tooltip.mw___)})),r.showSourceLink_&&r.stat()&&r.stat().eurostatDatasetCode){var y=r.stat().eurostatDatasetCode,_="https://ec.europa.eu/eurostat/databrowser/view/".concat(y,"/default/table?lang=en"),v=r.svg().append("a").attr("href",_).attr("target","_blank").append("text").attr("id","source-dataset-link").attr("x",r.width_-r.botTxtPadding_).attr("y",r.height_-r.botTxtPadding_).text("EUROSTAT").style("font-family",r.fontFamily_).style("font-size",r.botTxtFontSize_+"px").style("font-weight","bold").attr("text-anchor","end").on("mouseover",(function(){var t=yt(this);t.attr("fill","lightblue"),t.style("cursor","pointer"),t.style("text-decoration","underline")})).on("mouseout",(function(){var t=yt(this);t.attr("fill","black"),t.style("cursor","default"),t.style("text-decoration","none")})).node().getComputedTextLength();r.svg().append("text").attr("x",r.width_-r.botTxtPadding_-v-2).attr("y",r.height_-r.botTxtPadding_).text("Source:").style("font-family",r.fontFamily_).style("font-size",r.botTxtFontSize_+"px").style("stroke-width","0.3px").attr("text-anchor","end")}return r.showScalebar_&&(2!==r.scalebarPosition_.length&&(r.scalebarPosition_[0]=15,r.scalebarPosition_[1]=r.height_-50),function(){var t=r.svg().append("svg").attr("id","scalebar").attr("x",r.scalebarPosition_[0]).attr("y",r.scalebarPosition_[1]),e=(r.scalebarSegmentHeight_,r.scalebarMaxWidth_),n=r.scalebarTextOffset_[0],i=r.scalebarTextOffset_[1],o=r.pixSize_,a=function(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10)));return 5*e<=t?[5*e,5]:2*e<=t?[2*e,2]:[e,1]}(e*o),l=a[0]/o,s=a[1],u=r.svg().append("svg").attr("id","scalebar").attr("x",r.scalebarPosition_[0]).attr("y",r.scalebarPosition_[1]).attr("width",e+20).attr("height",r.scalebarHeight_);u.append("line").attr("x1",5).attr("y1",1).attr("x2",l+5).attr("y2",1).style("stroke","#000").style("stroke-width","0.8px"),u.append("line").attr("x1",5).attr("y1",r.scalebarSegmentHeight_).attr("x2",l+5).attr("y2",r.scalebarSegmentHeight_).style("stroke","#000").style("stroke-width","0.8px"),u.append("line").attr("x1",5).attr("y1",1).attr("x2",5).attr("y2",r.scalebarTickHeight_).style("stroke","#000").style("stroke-width",r.scalebarStrokeWidth_+"px"),u.append("text").attr("x",5+n).attr("y",r.scalebarTickHeight_+i).text("0").style("font-size",r.scalebarFontSize_+"px").style("font-family",r.fontFamily_).attr("text-anchor","middle");var c={1:4,2:2,5:5}[s],f=l/c;if(f>=15){for(var p=1;p<c;p++)u.append("line").attr("x1",5+r.scalebarStrokeWidth_/2+p*f).attr("y1",1).attr("x2",5+r.scalebarStrokeWidth_/2+p*f).attr("y2",r.scalebarTickHeight_).style("stroke","#000").style("stroke-width","0.8px").style("stroke","black").style("stroke-width",r.scalebarStrokeWidth_),u.append("text").attr("x",5+n+p*f).attr("y",r.scalebarTickHeight_+i).text(h(a[0]/c*p)).style("font-size",r.scalebarFontSize_+"px").style("font-family",r.fontFamily_).attr("text-anchor","middle");for(var d=-1;d<c;d+=2)if(1==d)t.append("line").attr("x1",5+r.scalebarStrokeWidth_-1).attr("y1",r.scalebarSegmentHeight_/2).attr("x2",5+r.scalebarStrokeWidth_/2+d*f).attr("y2",r.scalebarSegmentHeight_/2).style("stroke","#000").style("stroke-width",r.scalebarStrokeWidth_+"px");else{var g=5+r.scalebarStrokeWidth_/2+(d-1)*f;g>0&&t.append("line").attr("x1",g).attr("y1",r.scalebarSegmentHeight_/2).attr("x2",5+r.scalebarStrokeWidth_/2+d*f).attr("y2",r.scalebarSegmentHeight_/2).style("stroke","#000").style("stroke-width","0.8px")}}else t.append("line").attr("x1",5+r.scalebarStrokeWidth_-1).attr("y1",r.scalebarSegmentHeight_/2).attr("x2",5+r.scalebarStrokeWidth_/2+f*c).attr("y2",r.scalebarSegmentHeight_/2).style("stroke","#000").style("stroke-width",r.scalebarStrokeWidth_+"px");u.append("line").attr("x1",l+5).attr("y1",1).attr("x2",l+5).attr("y2",r.scalebarTickHeight_).style("stroke","#000").style("stroke-width",r.scalebarStrokeWidth_+"px"),u.append("text").attr("x",l+5+n).attr("y",r.scalebarTickHeight_+i).text(h(a[0])+r.scalebarUnits_).style("text-anchor","middle").style("font-size",r.scalebarFontSize_+"px").style("font-family",r.fontFamily_)}()),r},r.updateLabels=function(){var t=r.svg_.selectAll("g.labels-container > *");if(t&&t.remove(),r.labelling_){var e=r.svg_.select("#zoomgroup"+r.svgId_);f(r,e),r.labelsToShow_.includes("values")&&r.updateValuesLabels()}};var p=function(e,i){var o=t(e,n);for(var a in(e=e||{}).proj=e.proj||ec[e.geo],e.scale=e.scale||r.insetScale_,e.bottomText=e.bottomText||"",e.showSourceLink=e.showSourceLink||!1,e.botTxtTooltipTxt=e.botTxtTooltipTxt||"",e.zoomExtent=e.zoomExtent||r.insetZoomExtent_,e.width=e.width||r.insetBoxWidth_,e.height=e.height||r.insetBoxWidth_,e.insets=e.insets||[],e.insetTemplates=e.insetTemplates||{},e.callback=e.callback||void 0,["nutsLvl_","nutsYear_","nutsrgFillStyle_","nutsrgSelFillSty_","nutsbnStroke_","nutsbnStrokeWidth_","cntrgFillStyle_","cntbnStroke_","cntbnStrokeWidth_","seaFillStyle_","drawCoastalMargin_","coastalMarginColor_","coastalMarginWidth_","coastalMarginStdDev_","graticuleStroke_","graticuleStrokeWidth_","labelling_","labelFill_","labelValuesFontSize_","labelOpacity_","labelStroke_","labelStrokeWidth_","labelShadowWidth_","labelShadow_","labelShadowColor_","labelsToShow_","fontFamily_","lg_"].forEach((function(t){o[t]=r[t]})),["stat","statData","legend","legendObj","noDataText","lg","transitionDuration","tooltip_","classToText_"].forEach((function(t){o[t]=r[t]})),e)o[a+"_"]=e[a];return o};return r},Qu={EUR_3035:{geoCenter:[497e4,335e4],pixSize:6800},IC_32628:{geoCenter:[443468,3145647],pixSize:1e3},GP_32620:{geoCenter:[669498,1784552],pixSize:130},MQ_32620:{geoCenter:[716521,1621322],pixSize:130},GF_32622:{geoCenter:[266852,444074],pixSize:500},RE_32740:{geoCenter:[348011,7661627],pixSize:130},YT_32738:{geoCenter:[516549,8583920],pixSize:70},MT_3035:{geoCenter:[4719755,1441701],pixSize:70},PT20_32626:{geoCenter:[397418,4271471],pixSize:1500},PT30_32628:{geoCenter:[333586,3622706],pixSize:150},LI_3035:{geoCenter:[4287060,2672e3],pixSize:40},IS_3035:{geoCenter:[3011804,496e4],pixSize:700},SJ_SV_3035:{geoCenter:[457e4,6160156],pixSize:800},SJ_JM_3035:{geoCenter:[3647762,5408300],pixSize:100},CARIB_32620:{geoCenter:[636345,1669439],pixSize:500},WORLD_54030:{geoCenter:[14,17],pixSize:9e3}},tc=function(t,e){for(var n=[{geo:"IC",x:0,y:0,width:t,height:.3*t},{geo:"CARIB",x:0,y:.3*t+e,width:.5*t,height:t},{geo:"GF",x:.5*t,y:.3*t+e,width:.5*t,height:.75*t},{geo:"YT",x:.5*t,y:1.05*t+e,width:.25*t,height:.25*t},{geo:"RE",x:.75*t,y:1.05*t+e,width:.25*t,height:.25*t},{geo:"PT20",x:0,y:1.3*t+2*e,width:.75*t,height:.25*t},{geo:"PT30",x:.75*t,y:1.3*t+2*e,width:.25*t,height:.25*t},{geo:"MT",x:0,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"LI",x:.25*t,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"SJ_SV",x:.5*t,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"SJ_JM",x:.75*t,y:1.55*t+3*e,width:.25*t,height:.25*t}],r=0;r<n.length;r++)n[r].drawGraticule=!1;return n},ec={EUR:"3035",IC:"32628",GP:"32620",MQ:"32620",GF:"32622",RE:"32740",YT:"32738",MT:"3035",PT20:"32626",PT30:"32628",LI:"3035",IS:"3035",SJ_SV:"3035",SJ_JM:"3035",CARIB:"32620",WORLD:"54030"};var nc={},rc={};function ic(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function oc(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function ac(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function lc(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+ac(-e,6):e>9999?"+"+ac(e,6):ac(e,4))+"-"+ac(t.getUTCMonth()+1,2)+"-"+ac(t.getUTCDate(),2)+(o?"T"+ac(n,2)+":"+ac(r,2)+":"+ac(i,2)+"."+ac(o,3)+"Z":i?"T"+ac(n,2)+":"+ac(r,2)+":"+ac(i,2)+"Z":r||n?"T"+ac(n,2)+":"+ac(r,2)+"Z":"")}var sc=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,l=0,s=o<=0,u=!1;function c(){if(s)return rc;if(u)return u=!1,nc;var e,r,i=a;if(34===t.charCodeAt(i)){for(;a++<o&&34!==t.charCodeAt(a)||34===t.charCodeAt(++a););return(e=a)>=o?s=!0:10===(r=t.charCodeAt(a++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a<o;){if(10===(r=t.charCodeAt(e=a++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(a)&&++a;else if(r!==n)continue;return t.slice(i,e)}return s=!0,t.slice(i,o)}for(10===t.charCodeAt(o-1)&&--o,13===t.charCodeAt(o-1)&&--o;(r=c())!==rc;){for(var f=[];r!==nc&&r!==rc;)f.push(r),r=c();e&&null==(f=e(f,l++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return a(e[t])})).join(t)}))}function o(e){return e.map(a).join(t)}function a(t){return null==t?"":t instanceof Date?lc(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,o=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=ic(t);return function(r,i){return e(n(r),i,t)}}(t,e):ic(t)}));return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=oc(e)),[n.map(a).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=oc(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}},uc=sc(","),cc=uc.parse,fc=(uc.parseRows,uc.format,uc.formatBody,uc.formatRows,uc.formatRow,uc.formatValue,sc("\t")),hc=fc.parse;fc.parseRows,fc.format,fc.formatBody,fc.formatRows,fc.formatRow,fc.formatValue;function pc(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var dc=function(t,e){return fetch(t,e).then(pc)};function gc(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),dc(e,n).then((function(e){return t(e,r)}))}}var yc=gc(cc);gc(hc);function _c(t){var e,n,r,i,o=function(t,e){var n,r=[];if("string"==typeof t&&(t=[t]),Array.isArray(t)){if(t.length===e)return t;if(1===t.length){for(n=0;n<e;n++)r.push(t[0]);return r}}for(n=0;n<e;n++){var i=void 0===t[n]?null:t[n];r.push(i)}return r};if(this.length=0,this.id=[],null!=t)switch(this.class=t.class||"bundle",this.class){case"bundle":var a=[],l=0;if(this.error=null,this.length=0,null===t||"object"!=typeof t)return void(this.class=null);if(t.hasOwnProperty("error"))return void(this.error=t.error);if("dataset"===t.class||"collection"===t.class||"dimension"===t.class)return new _c(t);for(n in t)l++,a.push(n);this.__tree__=t,this.length=l,this.id=a;break;case"dataset":t.hasOwnProperty("__tree__")?this.__tree__=e=t.__tree__:this.__tree__=e=t,this.label=e.label||null,this.note=e.note||null,this.link=e.link||null,this.href=e.href||null,this.updated=e.updated||null,this.source=e.source||null,this.extension=e.extension||null;var s,u=0,c=e.size||e.dimension&&e.dimension.size;if(this.size=c,this.value=e.hasOwnProperty("value")&&null!==e.value&&0!==e.value.length?e.value:{},Array.isArray(this.value))u=this.value.length;else{var f=1;for(s=c.length;s--;)f*=c[s];u=f}if(this.value=o(this.value,u),this.status=e.hasOwnProperty("status")?o(e.status,u):null,e.hasOwnProperty("dimension")){var h=e.dimension,p=e.role||!e.version&&h.role||null,d=e.id||h.id,g=c.length,y=function(t){p.hasOwnProperty(t)||(p[t]=null)};if(!Array.isArray(d)||!Array.isArray(c)||d.length!=g)return;if(this.length=g,this.id=d,p&&(y("time"),y("geo"),y("metric"),y("classification")),p&&null===p.classification){var _=[],v=["time","geo","metric"],m=function(t,e){for(var n=e.length;n--;)if(t===e[n])return!0;return!1};for(s=0;s<3;s++){var x=p[v[s]];null!==x&&(_=_.concat(x))}for(p.classification=[],s=0;s<g;s++)m(d[s],_)||p.classification.push(d[s]);0===p.classification.length&&(p.classification=null)}this.role=p,this.n=u;for(var b=0,S=this.length;b<S;b++)if(h[d[b]].category.hasOwnProperty("index")){if(Array.isArray(h[d[b]].category.index)){var w={},T=h[d[b]].category.index;for(r=T.length,i=0;i<r;i++)w[T[i]]=i;h[d[b]].category.index=w}}else{var M=0;for(n in h[d[b]].category.index={},h[d[b]].category.label)h[d[b]].category.index[n]=M++}}else this.length=0;break;case"dimension":if(!t.hasOwnProperty("__tree__"))return new _c({version:"2.0",class:"dataset",dimension:{d:t},id:["d"],size:[function(t){var e=void 0===t.index?t.label:t.index;return Array.isArray(e)?e.length:Object.keys(e).length}(t.category)],value:[null]}).Dimension(0);var k=[],z=(e=t.__tree__).category;if(!e.hasOwnProperty("category"))return;if(!z.hasOwnProperty("label"))for(n in z.label={},z.index)z.label[n]=n;for(n in z.index)k[z.index[n]]=n;this.__tree__=e,this.label=e.label||null,this.note=e.note||null,this.link=e.link||null,this.href=e.href||null,this.id=k,this.length=k.length,this.role=t.role,this.hierarchy=z.hasOwnProperty("child"),this.extension=e.extension||null;break;case"category":var F=t.child;this.id=F,this.length=null===F?0:F.length,this.index=t.index,this.label=t.label,this.note=t.note||null,this.unit=t.unit,this.coordinates=t.coord;break;case"collection":if(this.length=0,this.label=t.label||null,this.note=t.note||null,this.link=t.link||null,this.href=t.href||null,this.updated=t.updated||null,this.source=t.source||null,this.extension=t.extension||null,null!==this.link&&t.link.item){var C=t.link.item;if(this.length=Array.isArray(C)?C.length:0,this.length)for(i=0;i<this.length;i++)this.id[i]=C[i].href}}}function vc(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}_c.prototype.Item=function(t){if(null===this||"collection"!==this.class||!this.length)return null;if("number"==typeof t)return t>this.length||t<0?null:this.link.item[t];var e,n=[];if("object"==typeof t){if(!t.class&&!t.follow)return null;t.class&&(e="dataset"===t.class&&"boolean"==typeof t.embedded?!0===t.embedded?function(t,e,r){var i=t.link.item[e];r.class===i.class&&i.id&&i.size&&i.dimension&&n.push(i)}:function(t,e,r){var i=t.link.item[e];r.class!==i.class||i.id&&i.size&&i.dimension||n.push(i)}:function(t,e,r){r.class===t.link.item[e].class&&n.push(t.link.item[e])})}else e=function(t,e){n.push(t.link.item[e])};for(var r=0;r<this.length;r++)e(this,r,t);return n},_c.prototype.Dataset=function(t){if(null===this)return null;if("dataset"===this.class)return void 0!==t?this:[this];var e,n=[],r=0;if("collection"===this.class){var i=this.Item({class:"dataset",embedded:!0});if(void 0===t){for(e=i.length;r<e;r++)n.push(new _c(i[r]));return n}if("number"==typeof t&&t>=0&&t<i.length)return new _c(i[t]);if("string"==typeof t)for(e=i.length;r<e;r++)if(i[r].href===t)return new _c(i[r]);return null}if("bundle"!==this.class)return null;if(void 0===t){for(e=this.id.length;r<e;r++)n.push(this.Dataset(this.id[r]));return n}if("number"==typeof t){var o=this.id[t];return void 0!==o?this.Dataset(o):null}var a=this.__tree__[t];return void 0===a?null:new _c({class:"dataset",__tree__:a})},_c.prototype.Dimension=function(t,e){e="boolean"!=typeof e||e;var n,r=[],i=this.id.length,o=function(t,e){if(null!==t)for(var n in t)for(var r=null!==t[n]?t[n].length:0;r--;)if(t[n][r]===e)return n;return null};if(null===this||"dataset"!==this.class)return null;if(void 0===t){for(n=0;n<i;n++)r.push(this.Dimension(this.id[n]));return r}if("number"==typeof t){var a=this.id[t];return void 0!==a?this.Dimension(a,e):null}var l=this.role;if("object"==typeof t){if(t.hasOwnProperty("role")){for(n=0;n<i;n++){var s=this.id[n];o(l,s)===t.role&&r.push(this.Dimension(s,e))}return void 0===r[0]?null:r}return null}var u=this.__tree__.dimension;if(void 0===u)return null;var c=u[t];return void 0===c?null:e?new _c({class:"dimension",__tree__:c,role:o(l,t)}):function(t,e){var n=[];for(var r in t)n[t[r]]=e[r];return n}(c.category.index,c.category.label)},_c.prototype.Category=function(t){if(null===this||"dimension"!==this.class)return null;if(void 0===t){for(var e=[],n=0,r=this.id.length;n<r;n++)e.push(this.Category(this.id[n]));return e}if("number"==typeof t){var i=this.id[t];return void 0!==i?this.Category(i):null}var o=this.__tree__.category;if(void 0===o)return null;var a=o.index[t];if(void 0===a)return null;var l=o.unit&&o.unit[t]||null,s=o.coordinates&&o.coordinates[t]||null,u=o.child&&o.child[t]||null,c=o.note&&o.note[t]||null;return new _c({class:"category",index:a,label:o.label[t],note:c,child:u,unit:l,coord:s})},_c.prototype.Dice=function(t,e,n){var r,i,o,a,l=function(t,e){return t.hasOwnProperty(e)&&!!t[e]};if(null===this||"dataset"!==this.class)return null;if("object"!=typeof t)return this;"object"!=typeof e?("boolean"==typeof e&&!0===e&&(r=!0),"boolean"==typeof n&&!0===n||(n=!1)):(r=l(e,"clone"),n=l(e,"drop"),i=l(e,"stringify"),o=l(e,"ovalue"),a=l(e,"ostatus"));var s,u=r?new _c(JSON.parse(JSON.stringify(this))):this,c=u.status,f=[],h=[],p=function(t,e){var n,r,i,o=(n=t,r=e,i={},"[object Array]"===Object.prototype.toString.call(n[r])?(n[r].forEach((function(t,e){null!==t&&(i[String(e)]=t)})),i):n[r]);delete t[e],t[e]=o};Array.isArray(t)&&(t=function(t){var e={};return t.forEach((function(t){e[t[0]]=t[1]})),e}(t)),null===t&&(t={});var d=Object.keys(t);return d.length>0&&(d.forEach((function(e){var n=t[e];Array.isArray(n)||(t[e]=[n]),0===t[e].length&&delete t[e]})),n&&(t=function(t){var e={};return Object.keys(t).forEach(n=>e[n]=u.Dimension(n).id.filter(e=>-1===t[n].indexOf(e))),e}(t)),u.toTable({type:"arrobj",content:"id",status:!0}).forEach((function(e,n){var r=[];d.forEach((function(n){var i=t[n],o=[];i.forEach((function(t){o.push(e[n]===t)})),r.push(-1!==o.indexOf(!0))})),-1===r.indexOf(!1)&&(f.push(e.value),h.push(e.status))})),d.forEach((function(e){var n=u.Dimension(e).id,r=0,i={};u.size[u.id.indexOf(e)]=t[e].length,n.forEach((function(n){-1!==t[e].indexOf(n)&&(i[n]=r,r++)})),u.__tree__.dimension[e].category.index=i})),u.n=f.length,u.value=u.__tree__.value=f,u.status=u.__tree__.status=null!==c?h:null),i?((s=u.__tree__).hasOwnProperty("id")||(s.version="2.0",s.hasOwnProperty("class")||(s.class="dataset"),s.id=s.dimension.id,s.size=s.dimension.size,delete s.dimension.id,delete s.dimension.size,s.dimension.hasOwnProperty("role")&&(s.role=s.dimension.role,delete s.dimension.role)),s.hasOwnProperty("status")&&-1!==["null","{}","[]"].indexOf(JSON.stringify(s.status))&&delete s.status,s.hasOwnProperty("role")&&(delete s.role.classification,["geo","time","metric"].forEach((function(t){null===s.role[t]&&delete s.role[t]}))),o&&p(s,"value"),a&&s.hasOwnProperty("status")&&p(s,"status"),JSON.stringify(s)):u},_c.prototype.Slice=function(t){if(null===this||"dataset"!==this.class)return null;if(void 0===t)return this;if(!Array.isArray(t)){var e,n=[];for(e in t)n.push([e,t[e]]);t=n}return this.Dice(t.map((function(t){return[t[0],[t[1]]]})))},_c.prototype.Data=function(t,e){var n,r,i=[],o=function(t){for(var e in t)if(t.hasOwnProperty(e))return e};if(null===this||"dataset"!==this.class)return null;if(void 0===t){for(r=this.value.length,n=0;n<r;n++)i.push(this.Data(n));return i}if("boolean"!=typeof e&&(e=!0),"number"==typeof t){var a=this.value[t];return void 0===a?null:e?{value:a,status:this.status?this.status[t]:null}:a}var l="object",s=this.__tree__,u=s.size||s.dimension&&s.dimension.size,c=u.length;if(Array.isArray(t)){if(!Array.isArray(t[0])){if(this.length!==t.length)return null;var f=1,h=0,p=[],d=[];for(n=0;n<c;n++)if(void 0!==t[n]){if("number"!=typeof t[n]||t[n]>=u[n])return null;h+=(f*=n>0?u[c-n]:1)*t[c-n-1]}else p.push(n),d.push(u[n]);if(p.length>1)return null;if(1===p.length){for(var g=0,y=d[0];g<y;g++){var _=[];for(n=0;n<c;n++)n!==p[0]?_.push(t[n]):_.push(g);i.push(this.Data(_,e))}return i}return e?{value:this.value[h],status:this.status?this.status[h]:null}:this.value[h]}l="array"}var v=function(t,e,n){var r,i=[],a={},l=t.dimension,s=t.id||l.id,u=t.size||l&&l.size;if("array"===n){for(r=e.length;r--;)a[e[r][0]]=e[r][1];e=a}for(var c=0,f=s.length;c<f;c++){var h=s[c],p=e[h];i.push("string"==typeof p?p:1===u[c]?o(l[h].category.index):null)}return i}(s,t,l),m=[],x=s.dimension,b=s.id||x.id;for(n=0,r=v.length;n<r;n++)m.push(x[b[n]].category.index[v[n]]);return this.Data(m,e)},_c.prototype.toTable=function(t,e){if(null===this||"dataset"!==this.class)return null;1==arguments.length&&"function"==typeof t&&(e=t,t=null),"arrobj"===(t=t||{field:"label",content:"label",vlabel:"Value",slabel:"Status",type:"array",status:!1,unit:!1,by:null,prefix:"",drop:[],meta:!1,comma:!1,bylabel:!1}).type&&void 0===t.field&&(t.field="id");var n,r,i,o,a,l=this.__tree__,s=!0===t.status;if("function"==typeof e){n=this.toTable(t);var u=[],c="array"!==t.type?0:1;for(a=(E="object"!==t.type?n.slice(c):n.rows.slice(0)).length,r=0;r<a;r++){var f=e.call(this,E[r],r);void 0!==f&&u.push(f)}return"object"===t.type?{cols:n.cols,rows:u}:("array"===t.type&&u.unshift(n[0]),u)}if("arrobj"===t.type){var h=[],p=l.role&&l.role.metric,d=function(){},g={},y=this,_=y.id,v=t.by&&-1!==_.indexOf(t.by)?t.by:null,m=!0===t.meta,x=void 0!==t.drop&&Array.isArray(t.drop)?t.drop:[],b=!0===t.comma,S=!0===t.bylabel,w=function(e){if(m){var n={};return _.forEach((function(t){var e=y.Dimension(t);n[t]={label:e.label,role:e.role,categories:{id:e.id,label:y.Dimension(t,!1)}}})),{meta:{label:y.label,source:y.source,updated:y.updated,id:_,status:s,unit:t.unit,by:v,bylabel:S,drop:null!==v&&x.length>0?x:null,prefix:null!==v?N||"":null,comma:b,dimensions:n},data:e}}return e};v&&(t.field="id");var T=(n=this.toTable({field:t.field,vlabel:t.vlabel,slabel:t.slabel,content:t.content,status:s})).shift();if(null===v&&t.unit&&p){if("id"!==t.content)for(var M=p.length;M--;){var k=this.Dimension(p[M]);g[p[M]]={};for(var z=k.length;z--;)g[p[M]][k.Category(z).label]=k.id[z]}d=function(e,n){if(-1!==p.indexOf(e)){var r=l.dimension[e].category;r.unit?F.unit=r.unit["id"!==t.content?g[e][n]:n]:F.unit=null}},t.unit=!0}else t.unit=!1;for(a=n.length,r=0;r<a;r++){var F={};for(i=n[r].length;i--;)F[T[i]]=n[r][i],d(T[i],n[r][i]);h.push(F)}if(b&&h.forEach((function(t){null!==t.value&&(t.value=(""+t.value).replace(".",","))})),null!==v){var C,A={},E=[],L={},N=void 0!==t.prefix?t.prefix:"";x.forEach((function(t,e){(!y.Dimension(t)||y.Dimension(t).length>1)&&(x[e]="")}));var D=_.filter((function(t){return t!==v&&-1===x.indexOf(t)})),P=y.Dimension(v),O=function(t,e){var n=[];return e.forEach((function(e){n.push(t[e])})),n.join("\t")},R=function(t,e){var n={};return e.forEach((function(e){n[e]=t[e]})),n};for(var I in"id"!==t.content?S?C=function(t,e,n){t[e][N+n[v]]=n.value}:(P.Category().forEach((function(t,e){L[t.label]=P.id[e]})),C=function(t,e,n){t[e][N+L[n[v]]]=n.value}):C=function(t,e,n){t[e][N+n[v]]=n.value},h.forEach((function(t){var e=O(t,D);void 0===A[e]&&(A[e]=R(t,D)),C(A,e,t,v)})),A)E.push(A[I]);return s=!1,w(E)}return w(h)}var W,U,j,H,B="id"===t.field;if("object"===t.type){var G="number"==typeof this.value[0]||null===this.value[0]?"number":"string";W=function(t,e){var n=B&&t||e||t;et.push({id:t,label:n,type:"string"})},U=function(t,e,n){var r=(B?"value":t)||"Value",i=(B?"status":e)||"Status";n&&et.push({id:"status",label:i,type:"string"}),et.push({id:"value",label:r,type:G})},j=function(t){dt.push({v:t})},H=function(t){dt.push({v:t}),nt.push({c:dt})}}else W=function(t,e){var n=B&&t||e||t;et.push(n)},U=function(t,e,n){var r=(B?"value":t)||"Value",i=(B?"status":e)||"Status";n&&et.push(i),et.push(r),tt.push(et)},j=function(t){dt.push(t)},H=function(t){dt.push(t),tt.push(dt)};var Y=l.dimension,q=l.id||Y.id,V=l.size||Y.size,X=q.length;if(X!=V.length)return!1;var Z=[],$=1,K=(M=1,[]),J=[],Q=[],tt=[],et=[],nt=[];for(r=0;r<X;r++){var rt=q[r],it=Y[rt].label;W(rt,it),$*=V[r],M*=V[r];var ot=[];for(i=0;i<V[r];i++)for(var at in Y[q[r]].category.index)if(Y[q[r]].category.index[at]===i){var lt="id"!==t.content&&Y[q[r]].category.label?Y[q[r]].category.label[at]:at;ot.push(lt)}Z.push(ot),K.push(M)}for(U(t.vlabel,t.slabel,s),a=Z.length,r=0;r<a;r++){for(var st=[],ut=0,ct=Z[r].length;ut<ct;ut++)for(var ft=0;ft<$/K[r];ft++)st.push(Z[r][ut]);J.push(st)}for(a=J.length,r=0;r<a;r++){var ht=[],pt=0;for(o=0;o<$;o++)ht.push(J[r][pt]),++pt===J[r].length&&(pt=0);Q.push(ht)}for(o=0;o<$;o++){var dt=[];a=J.length;for(var gt=0;gt<a;gt++)j(Q[gt][o]);s&&j(this.status?this.status[o]:null),H(this.value[o])}return"object"===t.type?{cols:et,rows:nt}:tt},_c.prototype.node=function(){return this.__tree__},_c.prototype.toString=function(){return this.class};var mc=function(t){var e={__data:void 0},n=void 0;e.get=function(t){return t?n?n[t]:void 0:n},e.getValue=function(t){var n=e.get(t);return n?n.value:void 0},e.set=function(t,r){var i=(n=n||{})[t];return i?r.value?(i.value=r.value,i.status=r.status):i.value=isNaN(+r)?r:+r:n[t]=r.value?r:{value:isNaN(+r)?r:+r},e},e.setData=function(t){return e.__data=t,n={},Object.keys(t).forEach((function(n){return e.set(n,t[n])})),e},e.getArray=function(){if(n)return Object.values(n).map((function(t){return t.value})).filter((function(t){return 0==t||t}))},e.getUniqueValues=function(){return Object.values(n).map((function(t){return t.value})).filter((function(t,e,n){return n.indexOf(t)===e}))},e.getMin=function(){if(n)return Object.values(n).map((function(t){return t.value})).filter((function(t){return 0==t||t&&":"!==t})).reduce((function(t,e){return Math.min(t,e)}),0)},e.getMax=function(){if(n)return Object.values(n).map((function(t){return t.value})).filter((function(t){return 0==t||t&&":"!==t})).reduce((function(t,e){return Math.max(t,e)}),0)},e.isReady=function(){return null!=n},e.metadata=void 0,e.unitText_=void 0,e.retrieveFromRemote=function(t,n,r){return e.eurostatDatasetCode_?i(t,n,r):e.csvURL_&&o(r),e},e.eurostatDatasetCode_=void 0,e.filters_={lastTimePeriod:1},e.precision_=2;var r=function(t,n){return e.filters_.geo||(e.filters_.geoLevel=t+""=="0"?"country":"nuts"+t),Vi(function(t,e,n,r){n=n||"en",r=r||"json";var i=[];if(i.push("https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/",t,"?","format=",r,"&lang=",n),e)for(var o in e){var a=e[o];if(Array.isArray(a))for(var l=0;l<a.length;l++)i.push("&",o,"=",a[l]);else i.push("&",o,"=",a)}return i.join("")}(e.eurostatDatasetCode_,e.filters_,n))},i=function(t,i,o){n=null,r(t,i).then((function(t){var r,i,a="object"==typeof(r=t)?new _c(r):"version"===r?"1.3.1":fetch?fetch(r,i).then(vc).then((function(t){return new _c(t)})):void 0;e.metadata={label:a.label,href:a.href,source:a.source,updated:a.updated,extension:a.extension},e.metadata.time=a.Dimension("time").id[0],n=function(t){for(var e={},n=t.Dimension("geo").id,r=0;r<n.length;r++)e[n[r]]=t.Data(r);return e}(a),o&&o()}))};e.getTime=function(){var t=e.filters_.time;return t||(n?e.metadata.time:void 0)},e.csvURL_=void 0,e.geoCol_="geo",e.valueCol_="value";var o=function(t){n=null,yc(e.csvURL_).then((function(r){n=function(t,e,n){for(var r={},i=0;i<t.length;i++){var o=t[i],a=o[n];r[o[e]]={value:isNaN(+a)?a:+a,status:""}}return r}(r,e.geoCol_,e.valueCol_),e.metadata={href:e.csvURL_},t&&t()}))};if(["unitText_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t)for(var a in t)e[a+"_"]=t[a];return e},xc=function(t){var e={};return e.map=t,e.svgId="legend_"+Math.round(1e16*Math.random()),e.svg=void 0,e.lgg=void 0,e.x=void 0,e.y=void 0,e.boxMargin=10,e.boxPadding=7,e.boxCornerRad=7,e.boxFill="white",e.boxOpacity=.7,e.fontFill="black",e.title="",e.titleFontSize=15,e.titleFontWeight="normal",e.build=function(){e.svg=yt("#"+e.svgId),e.svg.selectAll("#g_"+e.svgId).remove(),e.lgg=e.svg.append("g").attr("id","g_"+e.svgId)},e.update=function(){return console.log("Legend update function not implemented"),e},e.makeBackgroundBox=function(){e.lgg.append("rect").attr("id","legendBR").attr("rx",e.boxCornerRad).attr("ry",e.boxCornerRad).style("fill",e.boxFill).style("opacity",e.boxOpacity)},e.setBoxDimension=function(){var t=e.lgg.node().getBBox({stroke:!0}),n=e.boxPadding;e.svg.select("#legendBR").attr("x",t.x-n).attr("y",t.y-n).attr("width",t.width+2*n).attr("height",t.height+2*n)},e},bc=Array.prototype.slice,Sc=function(t){return t};function wc(t){return"translate("+(t+.5)+",0)"}function Tc(t){return"translate(0,"+(t+.5)+")"}function Mc(t){return function(e){return+t(e)}}function kc(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function zc(){return!this.__axis}function Fc(t,e){var n=[],r=null,i=null,o=6,a=6,l=3,s=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",c=1===t||3===t?wc:Tc;function f(f){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):Sc:i,d=Math.max(o,0)+l,g=e.range(),y=+g[0]+.5,_=+g[g.length-1]+.5,v=(e.bandwidth?kc:Mc)(e.copy()),m=f.selection?f.selection():f,x=m.selectAll(".domain").data([null]),b=m.selectAll(".tick").data(h,e).order(),S=b.exit(),w=b.enter().append("g").attr("class","tick"),T=b.select("line"),M=b.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(w),T=T.merge(w.append("line").attr("stroke","currentColor").attr(u+"2",s*o)),M=M.merge(w.append("text").attr("fill","currentColor").attr(u,s*d).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==m&&(x=x.transition(f),b=b.transition(f),T=T.transition(f),M=M.transition(f),S=S.transition(f).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=v(t))?c(t):this.getAttribute("transform")})),w.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:v(t))}))),S.remove(),x.attr("d",4===t||2==t?a?"M"+s*a+","+y+"H0.5V"+_+"H"+s*a:"M0.5,"+y+"V"+_:a?"M"+y+","+s*a+"V0.5H"+_+"V"+s*a:"M"+y+",0.5H"+_),b.attr("opacity",1).attr("transform",(function(t){return c(v(t))})),T.attr(u+"2",s*o),M.attr(u,s*d).text(p),m.filter(zc).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),m.each((function(){this.__axis=v}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=bc.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:bc.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:bc.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=a=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(a=+t,f):a},f.tickPadding=function(t){return arguments.length?(l=+t,f):l},f}function Cc(t){return[+t[0],+t[1]]}function Ac(t){return[Cc(t[0]),Cc(t[1])]}["w","e"].map(Ec),["n","s"].map(Ec),["n","w","e","s","nw","ne","sw","se"].map(Ec);function Ec(t){return{type:t}}Math.cos,Math.sin,Math.PI,Math.max;Array.prototype.slice;var Lc=Math.PI,Nc=2*Lc,Dc=Nc-1e-6;function Pc(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Oc(){return new Pc}Pc.prototype=Oc.prototype={constructor:Pc,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,l=n-t,s=r-e,u=o-t,c=a-e,f=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(c*l-s*u)>1e-6&&i){var h=n-o,p=r-a,d=l*l+s*s,g=h*h+p*p,y=Math.sqrt(d),_=Math.sqrt(f),v=i*Math.tan((Lc-Math.acos((d+f-g)/(2*y*_)))/2),m=v/_,x=v/y;Math.abs(m-1)>1e-6&&(this._+="L"+(t+m*u)+","+(e+m*c)),this._+="A"+i+","+i+",0,0,"+ +(c*h>u*p)+","+(this._x1=t+x*l)+","+(this._y1=e+x*s)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),l=n*Math.sin(r),s=t+a,u=e+l,c=1^o,f=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+s+","+u:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-u)>1e-6)&&(this._+="L"+s+","+u),n&&(f<0&&(f=f%Nc+Nc),f>Dc?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-l)+"A"+n+","+n+",0,1,"+c+","+(this._x1=s)+","+(this._y1=u):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=Lc)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Rc=Oc;Array.prototype.slice;function Ic(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,l,s,u,c,f,h,p=t._root,d={data:r},g=t._x0,y=t._y0,_=t._x1,v=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((u=e>=(o=(g+_)/2))?g=o:_=o,(c=n>=(a=(y+v)/2))?y=a:v=a,i=p,!(p=p[f=c<<1|u]))return i[f]=d,t;if(l=+t._x.call(null,p.data),s=+t._y.call(null,p.data),e===l&&n===s)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(u=e>=(o=(g+_)/2))?g=o:_=o,(c=n>=(a=(y+v)/2))?y=a:v=a}while((f=c<<1|u)==(h=(s>=a)<<1|l>=o));return i[h]=p,i[f]=d,t}var Wc=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function Uc(t){return t[0]}function jc(t){return t[1]}function Hc(t,e,n){var r=new Bc(null==e?Uc:e,null==n?jc:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Bc(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Gc(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Yc=Hc.prototype=Bc.prototype;Yc.copy=function(){var t,e,n=new Bc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Gc(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Gc(e));return n},Yc.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Ic(this.cover(e,n),e,n,t)},Yc.addAll=function(t){var e,n,r,i,o=t.length,a=new Array(o),l=new Array(o),s=1/0,u=1/0,c=-1/0,f=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(a[n]=r,l[n]=i,r<s&&(s=r),r>c&&(c=r),i<u&&(u=i),i>f&&(f=i));if(s>c||u>f)return this;for(this.cover(s,u).cover(c,f),n=0;n<o;++n)Ic(this,a[n],l[n],t[n]);return this},Yc.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,l,s=i-n,u=this._root;n>t||t>=i||r>e||e>=o;)switch(l=(e<r)<<1|t<n,(a=new Array(4))[l]=u,u=a,s*=2,l){case 0:i=n+s,o=r+s;break;case 1:n=i-s,o=r+s;break;case 2:i=n+s,r=o-s;break;case 3:n=i-s,r=o-s}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},Yc.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Yc.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]]},Yc.find=function(t,e,n){var r,i,o,a,l,s,u,c=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],g=this._root;for(g&&d.push(new Wc(g,c,f,h,p)),null==n?n=1/0:(c=t-n,f=e-n,h=t+n,p=e+n,n*=n);s=d.pop();)if(!(!(g=s.node)||(i=s.x0)>h||(o=s.y0)>p||(a=s.x1)<c||(l=s.y1)<f))if(g.length){var y=(i+a)/2,_=(o+l)/2;d.push(new Wc(g[3],y,_,a,l),new Wc(g[2],i,_,y,l),new Wc(g[1],y,o,a,_),new Wc(g[0],i,o,y,_)),(u=(e>=_)<<1|t>=y)&&(s=d[d.length-1],d[d.length-1]=d[d.length-1-u],d[d.length-1-u]=s)}else{var v=t-+this._x.call(null,g.data),m=e-+this._y.call(null,g.data),x=v*v+m*m;if(x<n){var b=Math.sqrt(n=x);c=t-b,f=e-b,h=t+b,p=e+b,r=g.data}}return r},Yc.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,l,s,u,c,f,h,p=this._root,d=this._x0,g=this._y0,y=this._x1,_=this._y1;if(!p)return this;if(p.length)for(;;){if((u=o>=(l=(d+y)/2))?d=l:y=l,(c=a>=(s=(g+_)/2))?g=s:_=s,e=p,!(p=p[f=c<<1|u]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=i,this)},Yc.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Yc.root=function(){return this._root},Yc.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Yc.visit=function(t){var e,n,r,i,o,a,l=[],s=this._root;for(s&&l.push(new Wc(s,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(s=e.node,r=e.x0,i=e.y0,o=e.x1,a=e.y1)&&s.length){var u=(r+o)/2,c=(i+a)/2;(n=s[3])&&l.push(new Wc(n,u,c,o,a)),(n=s[2])&&l.push(new Wc(n,r,c,u,a)),(n=s[1])&&l.push(new Wc(n,u,i,o,c)),(n=s[0])&&l.push(new Wc(n,r,i,u,c))}return this},Yc.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Wc(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var o,a=e.x0,l=e.y0,s=e.x1,u=e.y1,c=(a+s)/2,f=(l+u)/2;(o=i[0])&&n.push(new Wc(o,a,l,c,f)),(o=i[1])&&n.push(new Wc(o,c,l,s,f)),(o=i[2])&&n.push(new Wc(o,a,f,c,u)),(o=i[3])&&n.push(new Wc(o,c,f,s,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Yc.x=function(t){return arguments.length?(this._x=t,this):this._x},Yc.y=function(t){return arguments.length?(this._y=t,this):this._y};Math.PI,Math.sqrt(5);var qc=function(){return Math.random()},Vc=(function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(qc),function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var o;if(null!=r)o=r,r=null;else do{r=2*e()-1,o=2*e()-1,i=r*r+o*o}while(!i||i>1);return t+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(qc)),Xc=(function t(e){function n(){var t=Vc.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(qc),function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(qc)),Zc=(function t(e){function n(t){var n=Xc.source(e)(t);return function(){return n()/t}}return n.source=t,n}(qc),function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(qc),function(t){return function(){return t}}),$c=Math.abs,Kc=Math.atan2,Jc=Math.cos,Qc=Math.max,tf=Math.min,ef=Math.sin,nf=Math.sqrt,rf=Math.PI,of=rf/2,af=2*rf;function lf(t){return t>1?0:t<-1?rf:Math.acos(t)}function sf(t){return t>=1?of:t<=-1?-of:Math.asin(t)}function uf(t){return t.innerRadius}function cf(t){return t.outerRadius}function ff(t){return t.startAngle}function hf(t){return t.endAngle}function pf(t){return t&&t.padAngle}function df(t,e,n,r,i,o,a,l){var s=n-t,u=r-e,c=a-i,f=l-o,h=f*s-c*u;if(!(h*h<1e-12))return[t+(h=(c*(e-o)-f*(t-i))/h)*s,e+h*u]}function gf(t,e,n,r,i,o,a){var l=t-n,s=e-r,u=(a?o:-o)/nf(l*l+s*s),c=u*s,f=-u*l,h=t+c,p=e+f,d=n+c,g=r+f,y=(h+d)/2,_=(p+g)/2,v=d-h,m=g-p,x=v*v+m*m,b=i-o,S=h*g-d*p,w=(m<0?-1:1)*nf(Qc(0,b*b*x-S*S)),T=(S*m-v*w)/x,M=(-S*v-m*w)/x,k=(S*m+v*w)/x,z=(-S*v+m*w)/x,F=T-y,C=M-_,A=k-y,E=z-_;return F*F+C*C>A*A+E*E&&(T=k,M=z),{cx:T,cy:M,x01:-c,y01:-f,x11:T*(i/b-1),y11:M*(i/b-1)}}var yf=function(){var t=uf,e=cf,n=Zc(0),r=null,i=ff,o=hf,a=pf,l=null;function s(){var s,u,c=+t.apply(this,arguments),f=+e.apply(this,arguments),h=i.apply(this,arguments)-of,p=o.apply(this,arguments)-of,d=$c(p-h),g=p>h;if(l||(l=s=Rc()),f<c&&(u=f,f=c,c=u),f>1e-12)if(d>af-1e-12)l.moveTo(f*Jc(h),f*ef(h)),l.arc(0,0,f,h,p,!g),c>1e-12&&(l.moveTo(c*Jc(p),c*ef(p)),l.arc(0,0,c,p,h,g));else{var y,_,v=h,m=p,x=h,b=p,S=d,w=d,T=a.apply(this,arguments)/2,M=T>1e-12&&(r?+r.apply(this,arguments):nf(c*c+f*f)),k=tf($c(f-c)/2,+n.apply(this,arguments)),z=k,F=k;if(M>1e-12){var C=sf(M/c*ef(T)),A=sf(M/f*ef(T));(S-=2*C)>1e-12?(x+=C*=g?1:-1,b-=C):(S=0,x=b=(h+p)/2),(w-=2*A)>1e-12?(v+=A*=g?1:-1,m-=A):(w=0,v=m=(h+p)/2)}var E=f*Jc(v),L=f*ef(v),N=c*Jc(b),D=c*ef(b);if(k>1e-12){var P,O=f*Jc(m),R=f*ef(m),I=c*Jc(x),W=c*ef(x);if(d<rf&&(P=df(E,L,I,W,O,R,N,D))){var U=E-P[0],j=L-P[1],H=O-P[0],B=R-P[1],G=1/ef(lf((U*H+j*B)/(nf(U*U+j*j)*nf(H*H+B*B)))/2),Y=nf(P[0]*P[0]+P[1]*P[1]);z=tf(k,(c-Y)/(G-1)),F=tf(k,(f-Y)/(G+1))}}w>1e-12?F>1e-12?(y=gf(I,W,E,L,f,F,g),_=gf(O,R,N,D,f,F,g),l.moveTo(y.cx+y.x01,y.cy+y.y01),F<k?l.arc(y.cx,y.cy,F,Kc(y.y01,y.x01),Kc(_.y01,_.x01),!g):(l.arc(y.cx,y.cy,F,Kc(y.y01,y.x01),Kc(y.y11,y.x11),!g),l.arc(0,0,f,Kc(y.cy+y.y11,y.cx+y.x11),Kc(_.cy+_.y11,_.cx+_.x11),!g),l.arc(_.cx,_.cy,F,Kc(_.y11,_.x11),Kc(_.y01,_.x01),!g))):(l.moveTo(E,L),l.arc(0,0,f,v,m,!g)):l.moveTo(E,L),c>1e-12&&S>1e-12?z>1e-12?(y=gf(N,D,O,R,c,-z,g),_=gf(E,L,I,W,c,-z,g),l.lineTo(y.cx+y.x01,y.cy+y.y01),z<k?l.arc(y.cx,y.cy,z,Kc(y.y01,y.x01),Kc(_.y01,_.x01),!g):(l.arc(y.cx,y.cy,z,Kc(y.y01,y.x01),Kc(y.y11,y.x11),!g),l.arc(0,0,c,Kc(y.cy+y.y11,y.cx+y.x11),Kc(_.cy+_.y11,_.cx+_.x11),g),l.arc(_.cx,_.cy,z,Kc(_.y11,_.x11),Kc(_.y01,_.x01),!g))):l.arc(0,0,c,b,x,g):l.lineTo(N,D)}else l.moveTo(0,0);if(l.closePath(),s)return l=null,s+""||null}return s.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-rf/2;return[Jc(r)*n,ef(r)*n]},s.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Zc(+e),s):t},s.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Zc(+t),s):e},s.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Zc(+t),s):n},s.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Zc(+t),s):r},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Zc(+t),s):i},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Zc(+t),s):o},s.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Zc(+t),s):a},s.context=function(t){return arguments.length?(l=null==t?null:t,s):l},s};function _f(t){this._context=t}_f.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var vf=function(t){return new _f(t)};function mf(t){return t[0]}function xf(t){return t[1]}var bf=function(){var t=mf,e=xf,n=Zc(!0),r=null,i=vf,o=null;function a(a){var l,s,u,c=a.length,f=!1;for(null==r&&(o=i(u=Rc())),l=0;l<=c;++l)!(l<c&&n(s=a[l],l,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(s,l,a),+e(s,l,a));if(u)return o=null,u+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:Zc(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Zc(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Zc(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a},Sf=function(){var t=mf,e=null,n=Zc(0),r=xf,i=Zc(!0),o=null,a=vf,l=null;function s(s){var u,c,f,h,p,d=s.length,g=!1,y=new Array(d),_=new Array(d);for(null==o&&(l=a(p=Rc())),u=0;u<=d;++u){if(!(u<d&&i(h=s[u],u,s))===g)if(g=!g)c=u,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),f=u-1;f>=c;--f)l.point(y[f],_[f]);l.lineEnd(),l.areaEnd()}g&&(y[u]=+t(h,u,s),_[u]=+n(h,u,s),l.point(e?+e(h,u,s):y[u],r?+r(h,u,s):_[u]))}if(p)return l=null,p+""||null}function u(){return bf().defined(i).curve(a).context(o)}return s.x=function(n){return arguments.length?(t="function"==typeof n?n:Zc(+n),e=null,s):t},s.x0=function(e){return arguments.length?(t="function"==typeof e?e:Zc(+e),s):t},s.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Zc(+t),s):e},s.y=function(t){return arguments.length?(n="function"==typeof t?t:Zc(+t),r=null,s):n},s.y0=function(t){return arguments.length?(n="function"==typeof t?t:Zc(+t),s):n},s.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Zc(+t),s):r},s.lineX0=s.lineY0=function(){return u().x(t).y(n)},s.lineY1=function(){return u().x(t).y(r)},s.lineX1=function(){return u().x(e).y(n)},s.defined=function(t){return arguments.length?(i="function"==typeof t?t:Zc(!!t),s):i},s.curve=function(t){return arguments.length?(a=t,null!=o&&(l=a(o)),s):a},s.context=function(t){return arguments.length?(null==t?o=l=null:l=a(o=t),s):o},s},wf=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},Tf=function(t){return t},Mf=function(){var t=Tf,e=wf,n=null,r=Zc(0),i=Zc(af),o=Zc(0);function a(a){var l,s,u,c,f,h=a.length,p=0,d=new Array(h),g=new Array(h),y=+r.apply(this,arguments),_=Math.min(af,Math.max(-af,i.apply(this,arguments)-y)),v=Math.min(Math.abs(_)/h,o.apply(this,arguments)),m=v*(_<0?-1:1);for(l=0;l<h;++l)(f=g[d[l]=l]=+t(a[l],l,a))>0&&(p+=f);for(null!=e?d.sort((function(t,n){return e(g[t],g[n])})):null!=n&&d.sort((function(t,e){return n(a[t],a[e])})),l=0,u=p?(_-h*m)/p:0;l<h;++l,y=c)s=d[l],c=y+((f=g[s])>0?f*u:0)+m,g[s]={data:a[s],index:l,value:f,startAngle:y,endAngle:c,padAngle:v};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Zc(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Zc(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Zc(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Zc(+t),a):o},a};function kf(){this._=null}function zf(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Ff(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Cf(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Af(t){for(;t.L;)t=t.L;return t}kf.prototype={constructor:kf,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Af(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Ff(this,n),n=(t=n).U),n.C=!1,r.C=!0,Cf(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Cf(this,n),n=(t=n).U),n.C=!1,r.C=!0,Ff(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,a=t.R;if(n=o?a?Af(a):o:a,i?i.L===t?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=a,a.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Ff(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Cf(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Ff(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Cf(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Ff(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Cf(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Ef=kf;function Lf(t,e,n,r){var i=[null,null],o=nh.push(i)-1;return i.left=t,i.right=e,n&&Df(i,t,e,n),r&&Df(i,e,t,r),th[t.index].halfedges.push(o),th[e.index].halfedges.push(o),i}function Nf(t,e,n){var r=[e,n];return r.left=t,r}function Df(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function Pf(t,e,n,r,i){var o,a=t[0],l=t[1],s=a[0],u=a[1],c=0,f=1,h=l[0]-s,p=l[1]-u;if(o=e-s,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<f&&(f=o)}else if(h>0){if(o>f)return;o>c&&(c=o)}if(o=r-s,h||!(o<0)){if(o/=h,h<0){if(o>f)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<f&&(f=o)}if(o=n-u,p||!(o>0)){if(o/=p,p<0){if(o<c)return;o<f&&(f=o)}else if(p>0){if(o>f)return;o>c&&(c=o)}if(o=i-u,p||!(o<0)){if(o/=p,p<0){if(o>f)return;o>c&&(c=o)}else if(p>0){if(o<c)return;o<f&&(f=o)}return!(c>0||f<1)||(c>0&&(t[0]=[s+c*h,u+c*p]),f<1&&(t[1]=[s+f*h,u+f*p]),!0)}}}}}function Of(t,e,n,r,i){var o=t[1];if(o)return!0;var a,l,s=t[0],u=t.left,c=t.right,f=u[0],h=u[1],p=c[0],d=c[1],g=(f+p)/2,y=(h+d)/2;if(d===h){if(g<e||g>=r)return;if(f>p){if(s){if(s[1]>=i)return}else s=[g,n];o=[g,i]}else{if(s){if(s[1]<n)return}else s=[g,i];o=[g,n]}}else if(l=y-(a=(f-p)/(d-h))*g,a<-1||a>1)if(f>p){if(s){if(s[1]>=i)return}else s=[(n-l)/a,n];o=[(i-l)/a,i]}else{if(s){if(s[1]<n)return}else s=[(i-l)/a,i];o=[(n-l)/a,n]}else if(h<d){if(s){if(s[0]>=r)return}else s=[e,a*e+l];o=[r,a*r+l]}else{if(s){if(s[0]<e)return}else s=[r,a*r+l];o=[e,a*e+l]}return t[0]=s,t[1]=o,!0}function Rf(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function If(t,e){return e[+(e.left!==t.site)]}function Wf(t,e){return e[+(e.left===t.site)]}var Uf,jf=[];function Hf(){zf(this),this.x=this.y=this.arc=this.site=this.cy=null}function Bf(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i[0],l=i[1],s=r[0]-a,u=r[1]-l,c=o[0]-a,f=o[1]-l,h=2*(s*f-u*c);if(!(h>=-ih)){var p=s*s+u*u,d=c*c+f*f,g=(f*p-u*d)/h,y=(s*d-c*p)/h,_=jf.pop()||new Hf;_.arc=t,_.site=i,_.x=g+a,_.y=(_.cy=y+l)+Math.sqrt(g*g+y*y),t.circle=_;for(var v=null,m=eh._;m;)if(_.y<m.y||_.y===m.y&&_.x<=m.x){if(!m.L){v=m.P;break}m=m.L}else{if(!m.R){v=m;break}m=m.R}eh.insert(v,_),v||(Uf=_)}}}}function Gf(t){var e=t.circle;e&&(e.P||(Uf=e.N),eh.remove(e),jf.push(e),zf(e),t.circle=null)}var Yf=[];function qf(){zf(this),this.edge=this.site=this.circle=null}function Vf(t){var e=Yf.pop()||new qf;return e.site=t,e}function Xf(t){Gf(t),Qf.remove(t),Yf.push(t),zf(t)}function Zf(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],o=t.P,a=t.N,l=[t];Xf(t);for(var s=o;s.circle&&Math.abs(n-s.circle.x)<rh&&Math.abs(r-s.circle.cy)<rh;)o=s.P,l.unshift(s),Xf(s),s=o;l.unshift(s),Gf(s);for(var u=a;u.circle&&Math.abs(n-u.circle.x)<rh&&Math.abs(r-u.circle.cy)<rh;)a=u.N,l.push(u),Xf(u),u=a;l.push(u),Gf(u);var c,f=l.length;for(c=1;c<f;++c)u=l[c],s=l[c-1],Df(u.edge,s.site,u.site,i);s=l[0],(u=l[f-1]).edge=Lf(s.site,u.site,null,i),Bf(s),Bf(u)}function $f(t){for(var e,n,r,i,o=t[0],a=t[1],l=Qf._;l;)if((r=Kf(l,a)-o)>rh)l=l.L;else{if(!((i=o-Jf(l,a))>rh)){r>-rh?(e=l.P,n=l):i>-rh?(e=l,n=l.N):e=n=l;break}if(!l.R){e=l;break}l=l.R}!function(t){th[t.index]={site:t,halfedges:[]}}(t);var s=Vf(t);if(Qf.insert(e,s),e||n){if(e===n)return Gf(e),n=Vf(e.site),Qf.insert(s,n),s.edge=n.edge=Lf(e.site,s.site),Bf(e),void Bf(n);if(n){Gf(e),Gf(n);var u=e.site,c=u[0],f=u[1],h=t[0]-c,p=t[1]-f,d=n.site,g=d[0]-c,y=d[1]-f,_=2*(h*y-p*g),v=h*h+p*p,m=g*g+y*y,x=[(y*v-p*m)/_+c,(h*m-g*v)/_+f];Df(n.edge,u,d,x),s.edge=Lf(u,t,null,x),n.edge=Lf(t,d,null,x),Bf(e),Bf(n)}else s.edge=Lf(e.site,s.site)}}function Kf(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var l=(n=a.site)[0],s=n[1],u=s-e;if(!u)return l;var c=l-r,f=1/o-1/u,h=c/u;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*u)-s+u/2+i-o/2)))/f+r:(r+l)/2}function Jf(t,e){var n=t.N;if(n)return Kf(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Qf,th,eh,nh,rh=1e-6,ih=1e-12;function oh(t,e){return e[1]-t[1]||e[0]-t[0]}function ah(t,e){var n,r,i,o=t.sort(oh).pop();for(nh=[],th=new Array(t.length),Qf=new Ef,eh=new Ef;;)if(i=Uf,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===n&&o[1]===r||($f(o),n=o[0],r=o[1]),o=t.pop();else{if(!i)break;Zf(i.arc)}if(function(){for(var t,e,n,r,i=0,o=th.length;i<o;++i)if((t=th[i])&&(r=(e=t.halfedges).length)){var a=new Array(r),l=new Array(r);for(n=0;n<r;++n)a[n]=n,l[n]=Rf(t,nh[e[n]]);for(a.sort((function(t,e){return l[e]-l[t]})),n=0;n<r;++n)l[n]=e[a[n]];for(n=0;n<r;++n)e[n]=l[n]}}(),e){var a=+e[0][0],l=+e[0][1],s=+e[1][0],u=+e[1][1];!function(t,e,n,r){for(var i,o=nh.length;o--;)Of(i=nh[o],t,e,n,r)&&Pf(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>rh||Math.abs(i[0][1]-i[1][1])>rh)||delete nh[o]}(a,l,s,u),function(t,e,n,r){var i,o,a,l,s,u,c,f,h,p,d,g,y=th.length,_=!0;for(i=0;i<y;++i)if(o=th[i]){for(a=o.site,l=(s=o.halfedges).length;l--;)nh[s[l]]||s.splice(l,1);for(l=0,u=s.length;l<u;)d=(p=Wf(o,nh[s[l]]))[0],g=p[1],f=(c=If(o,nh[s[++l%u]]))[0],h=c[1],(Math.abs(d-f)>rh||Math.abs(g-h)>rh)&&(s.splice(l,0,nh.push(Nf(a,p,Math.abs(d-t)<rh&&r-g>rh?[t,Math.abs(f-t)<rh?h:r]:Math.abs(g-r)<rh&&n-d>rh?[Math.abs(h-r)<rh?f:n,r]:Math.abs(d-n)<rh&&g-e>rh?[n,Math.abs(f-n)<rh?h:e]:Math.abs(g-e)<rh&&d-t>rh?[Math.abs(h-e)<rh?f:t,e]:null))-1),++u);u&&(_=!1)}if(_){var v,m,x,b=1/0;for(i=0,_=null;i<y;++i)(o=th[i])&&(x=(v=(a=o.site)[0]-t)*v+(m=a[1]-e)*m)<b&&(b=x,_=o);if(_){var S=[t,e],w=[t,r],T=[n,r],M=[n,e];_.halfedges.push(nh.push(Nf(a=_.site,S,w))-1,nh.push(Nf(a,w,T))-1,nh.push(Nf(a,T,M))-1,nh.push(Nf(a,M,S))-1)}}for(i=0;i<y;++i)(o=th[i])&&(o.halfedges.length||delete th[i])}(a,l,s,u)}this.edges=nh,this.cells=th,Qf=eh=nh=th=null}ah.prototype={constructor:ah,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return If(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(o=(i=n.halfedges).length)for(var i,o,a,l,s,u,c=n.site,f=-1,h=e[i[o-1]],p=h.left===c?h.right:h.left;++f<o;)a=p,p=(h=e[i[f]]).left===c?h.right:h.left,a&&p&&r<a.index&&r<p.index&&(s=a,u=p,((l=c)[0]-u[0])*(s[1]-l[1])-(l[0]-s[0])*(u[1]-l[1])<0)&&t.push([c.data,a.data,p.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,o=this,a=o._found||0,l=o.cells.length;!(i=o.cells[a]);)if(++a>=l)return null;var s=t-i.site[0],u=e-i.site[1],c=s*s+u*u;do{i=o.cells[r=a],a=null,i.halfedges.forEach((function(n){var r=o.edges[n],l=r.left;if(l!==i.site&&l||(l=r.right)){var s=t-l[0],u=e-l[1],f=s*s+u*u;f<c&&(c=f,a=l.index)}}))}while(null!==a);return o._found=r,null==n||c<=n*n?i.site:null}};function lh(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return sh(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sh(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function sh(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var uh=function(t,e){var n=Ju(0,e);if(n.stat_={default:void 0},n.stat=function(t,e){return arguments.length?2==arguments.length?(n.stat_[t]=e,n):"string"==typeof t||t instanceof String?n.stat_[t]:(n.stat_=t.default?t:{default:t},n):n.stat_.default},n.statData_={default:mc(),color:mc(),size:mc()},n.statData=function(t,e){return arguments.length?1==arguments.length?n.statData_[t]:(n.statData_[t]=e,n):n.statData_.default},n.noDataText_="No data available",n.lg_="en",n.transitionDuration_=500,n.tooltip_.textFunction=fh,n.filtersDefinitionFun_=void 0,n.callback_=void 0,n.legend_=void 0,n.legendObj_=void 0,["legend_","legendObj_","noDataText_","lg_","transitionDuration_","tooltipText_","filtersDefinitionFun_","callback_"].forEach((function(t){n[t.substring(0,t.length-1)]=function(e){return arguments.length?(n[t]=e,n):n[t]}})),t)for(var r in t)n[r]&&null!=t[r]&&n[r](t[r]);n.legend=function(t){return arguments.length?(n.legend_=t,n.legendObj_&&n.legendObj().update(),n):n.legend_},n.build=function(){if(n.buildMapTemplateBase(),n.filtersDefinitionFun_&&n.filtersDefinitionFun_(n.svg(),n.clnb_),n.legend()){n.legendObj(n.getLegendConstructor()(n,n.legend()));var t=n.legendObj();if(0==yt("#"+t.svgId).size()){var e=null==t.x?n.width()-100-t.boxPadding:t.x,r=null==t.y?t.boxPadding:t.y;n.svg().append("g").attr("class","legend").attr("transform","translate("+e+","+r+")").append("svg").attr("id",t.svgId)}t.build()}return n.updateGeoData(),n.updateStatData(),n};var i=function(){for(var t in n.stat_)if(!n.statData(t).isReady())return!1;return!0};return n.updateGeoData=function(){return n.updateGeoMT((function(){i()&&(n.updateStatValues(),n.callback()&&n.callback()())})),n},n.updateStatData=function(){for(var t in n.stat_){if(!n.stat(t)&&n.statData(t).get())return;"default"!=t||n.stat(t)||n.stat(t,{eurostatDatasetCode:"demo_r_d3dens",unitText:"inhab./km²"});var e=mc(n.stat(t));n.statData(t,e);var r=n.nutsLvl_;"mixed"==n.nutsLvl_&&(r=0),e.retrieveFromRemote(r,n.lg(),(function(){n.isGeoReady()&&i()&&(n.updateStatValues(),n.callback()&&n.callback()())}))}return n},n.updateStatValues=function(){return n.updateClassification(),n.updateStyle(),n.legendObj()&&n.legendObj().update(),n},n.updateClassification=function(){return console.log("Map updateClassification function not implemented"),n},n.updateStyle=function(){return console.log("Map updateStyle function not implemented"),n},n.getLegendConstructor=function(){return console.log("Map getLegendConstructor function not implemented"),xc},n.getTime=function(){return n.statData("default").getTime()},n.setFromURL=function(){var t=hh();return t.w&&n.width(t.w),t.h&&n.height(t.h),t.x&&t.y&&n.geoCenter([t.x,t.y]),t.z&&n.pixSize(t.z),t.s&&n.scale(t.s),t.lvl&&n.nutsLvl(t.lvl),t.time&&(n.filters_.time=t.time,delete n.filters_.lastTimePeriod),t.proj&&n.proj(t.proj),t.geo&&n.geo(t.geo),t.ny&&n.nutsYear(t.ny),t.lg&&n.lg(t.lg),t.clnb&&n.clnb(+t.clnb),n},n.exportMapToSVG=function(){var t=ch(n.svg_.node()),e=URL.createObjectURL(t),r=document.createElement("a");return r.href=e,r.download="eurostatmap.svg",document.body.appendChild(r),r.click(),document.body.removeChild(r),n},n.exportMapToPNG=function(){var t,e,r,i,o;return(t=n.svg_.node(),i=new Promise((function(t,n){return e=t,r=n})),(o=new Image).onerror=r,o.onload=function(){var n=t.getBoundingClientRect(),r=document.createElement("canvas");r.width=n.width,r.height=n.height;var i=r.getContext("2d");i.drawImage(o,0,0,n.width,n.height),i.canvas.toBlob(e)},o.src=URL.createObjectURL(ch(t)),i).then((function(t){var e=URL.createObjectURL(t),n=document.createElement("a");n.href=e,n.download="eurostatmap.png",document.body.appendChild(n),n.click(),document.body.removeChild(n)})),n},n};function ch(t){var e="http://www.w3.org/2000/xmlns/";t=t.cloneNode(!0);for(var n=window.location.href+"#",r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,null,!1);r.nextNode();){var i,o=lh(r.currentNode.attributes);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.value.includes(n)&&(a.value=a.value.replace(n,"#"))}}catch(t){o.e(t)}finally{o.f()}}t.setAttributeNS(e,"xmlns","http://www.w3.org/2000/svg"),t.setAttributeNS(e,"xmlns:xlink","http://www.w3.org/1999/xlink");var l=(new window.XMLSerializer).serializeToString(t);return new Blob([l],{type:"image/svg+xml"})}var fh=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData().get(t.properties.id);if(!r||0!==r.value&&!r.value)return n.push(e.noDataText_),n.join("");n.push(Vu(r.value));var i=e.statData("default").unitText();i&&n.push(" "+i);var o=r.status;if(o&&e.tooltip_.showFlags)if("short"===e.tooltip_.showFlags)n.push(" "+o);else{var a=ji[o];n.push(a?" ("+a+")":" "+o)}return n.join("")},hh=function(){for(var t={},e=["w","h","x","y","z","s","lvl","time","proj","geo","ny","lg","sl","clnb"],n=0;n<e.length;n++)t[e[n]]=getURLParameterByName(e[n]);return t},ph=function(t,e){var n=xc(t);if(n.ascending=!0,n.shapeWidth=13,n.shapeHeight=15,n.sepLineLength=17,n.sepLineStroke="black",n.sepLineStrokeWidth=1,n.labelFontSize=12,n.labelDecNb=2,n.labelOffset=3,n.labelFormatter=null,n.noData=!0,n.noDataText="No data",e)for(var r in e)n[r]=e[r];return n.update=function(){var t=n.map,e=t.svg(),r=n.lgg;if(t.legend_)for(var i in t.legend_)n[i]=t.legend_[i];r.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&r.append("text").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),r.style("font-family",t.fontFamily_);for(var o=n.labelFormatter?n.labelFormatter:on("."+n.labelDecNb+"f"),a=function(i){var a=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+i*n.shapeHeight,l=n.ascending?t.clnb()-i-1:i;r.append("rect").attr("x",n.boxPadding).attr("y",a).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.classToFillStyle()(l,t.clnb())).on("mouseover",(function(){var n=e.select("#g_nutsrg").selectAll("[ecl='"+l+"']");n.style("fill",t.nutsrgSelFillSty()),n.attr("fill___",(function(){yt(this).attr("fill")})),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[ecl='"+l+"']").style("fill",(function(){yt(this).attr("fill___")})),yt(this).style("fill",t.classToFillStyle()(l,t.clnb()))})),i>0&&r.append("line").attr("x1",n.boxPadding).attr("y1",a).attr("x2",n.boxPadding+n.sepLineLength).attr("y2",a).attr("stroke",n.sepLineStroke).attr("stroke-width",n.sepLineStrokeWidth),i<t.clnb()-1&&r.append("text").attr("x",n.boxPadding+Math.max(n.shapeWidth,n.sepLineLength)+n.labelOffset).attr("y",a+n.shapeHeight).attr("alignment-baseline","middle").text(o(t.classifier().invertExtent(l)[n.ascending?0:1])).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)},l=0;l<t.clnb();l++)a(l);if(n.noData){var s=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+t.clnb()*n.shapeHeight+n.boxPadding;r.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){var n=e.select("#g_nutsrg").selectAll("[ecl='nd']");n.style("fill",t.nutsrgSelFillSty()),n.attr("fill___",(function(t){yt(this).attr("fill")})),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[ecl='nd']").style("fill",(function(t){yt(this).attr("fill___")})),yt(this).style("fill",t.noDataFillStyle())})),r.append("text").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",s+.5*n.shapeHeight).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)}n.setBoxDimension()},n},dh=function(t,e){return t=t||interpolateOrRd,e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},gh=function(){return function(t){return"url(#pattern_"+t+")"}},yh=Wi(new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Ii)),_h={draw:function(t,e){var n=Math.sqrt(e/rf);t.moveTo(n,0),t.arc(0,0,n,0,af)}},vh={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},mh=Math.sqrt(1/3),xh=2*mh,bh={draw:function(t,e){var n=Math.sqrt(e/xh),r=n*mh;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Sh=Math.sin(rf/10)/Math.sin(7*rf/10),wh=Math.sin(af/10)*Sh,Th=-Math.cos(af/10)*Sh,Mh={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=wh*n,i=Th*n;t.moveTo(0,-n),t.lineTo(r,i);for(var o=1;o<5;++o){var a=af*o/5,l=Math.cos(a),s=Math.sin(a);t.lineTo(s*n,-l*n),t.lineTo(l*r-s*i,s*r+l*i)}t.closePath()}},kh={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},zh=Math.sqrt(3),Fh={draw:function(t,e){var n=-Math.sqrt(e/(3*zh));t.moveTo(0,2*n),t.lineTo(-zh*n,-n),t.lineTo(zh*n,-n),t.closePath()}},Ch=Math.sqrt(3)/2,Ah=1/Math.sqrt(12),Eh=3*(Ah/2+1),Lh={draw:function(t,e){var n=Math.sqrt(e/Eh),r=n/2,i=n*Ah,o=r,a=n*Ah+n,l=-o,s=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(l,s),t.lineTo(-.5*r-Ch*i,Ch*r+-.5*i),t.lineTo(-.5*o-Ch*a,Ch*o+-.5*a),t.lineTo(-.5*l-Ch*s,Ch*l+-.5*s),t.lineTo(-.5*r+Ch*i,-.5*i-Ch*r),t.lineTo(-.5*o+Ch*a,-.5*a-Ch*o),t.lineTo(-.5*l+Ch*s,-.5*s-Ch*l),t.closePath()}},Nh=function(){var t=Zc(_h),e=Zc(64),n=null;function r(){var r;if(n||(n=r=Rc()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:Zc(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:Zc(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r};dn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]});var Dh=function(t,e){var n=xc(t);if(n.ascending=!1,n.legendSpacing=35,n.labelFontSize=12,n.sizeLegend={title:null,titleFontSize:12,titlePadding:5,values:void 0,cellNb:4,shapePadding:10,shapeOffset:{x:0,y:0},shapeFill:"white",labelOffset:{x:25,y:0},labelDecNb:0,labelFormatter:void 0},n.colorLegend={title:null,titleFontSize:12,titlePadding:10,shapeWidth:13,shapeHeight:15,shapePadding:1,labelOffset:{x:25,y:0},labelDecNb:0,labelFormatter:void 0,noData:!0,noDataText:"No data",sepLineLength:17,sepLineStroke:"black",sepLineStrokeWidth:1},e)for(var r in e)if("colorLegend"==r||"sizeLegend"==r)for(var i in n[r])e[r][i]&&(n[r][i]=e[r][i]);else n[r]=e[r];return n.update=function(){var t=n.map,e=n.lgg;if(t.legend_)for(var r in t.legend_)if("colorLegend"==r||"sizeLegend"==r)for(var i in n[r])t.legend_[r][i]&&(n[r][i]=t.legend_[r][i]);else n[r]=t.legend_[r];e.selectAll("*").remove(),n.makeBackgroundBox(),e.style("font-family",t.fontFamily_),t.classifierSize_&&function(t,e,r){var i=r.labelFormatter||Vu;r.title&&e.append("text").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill);var o,a,l,s=function(){var t;if(n.map.psCustomPath_)t=n.map.psCustomPath_;else if(n.map.psCustomShape_)t=n.map.psCustomShape_;else if("bar"==n.map.psShape_){t=Nh().type({draw:function(t,e){var r=Math.sqrt(e);t.moveTo(0,0),t.lineTo(0,r),t.lineTo(n.map.psBarWidth_,r),t.lineTo(n.map.psBarWidth_,0),t.lineTo(0,0),t.closePath()}})}else{var e=Rh[n.map.psShape_]||Rh.circle;t=Nh().type(e)}return t}(),u=t.classifierSize_.domain()[1];n._sizeLegendHeight=0,r.values&&(r.cellNb=r.values.length);for(var c=0,f=function(f){var h=n.ascending?r.cellNb-f+1:f,p=r.values?r.values[h-1]:u/h,d=t.classifierSize_(p),g=n.map.psCustomPath_?n.map.psCustomPath_:s.size(d*d)(),y=void 0,_=void 0;if("bar"==n.map.psShape_)y=n.boxPadding+10,_=n.boxPadding+(r.title?n.titleFontSize+r.titlePadding:0)+n._sizeLegendHeight,n._sizeLegendHeight=n._sizeLegendHeight+d+r.shapePadding;else if("custom"==n.map.psShape_){if(n._xOffset=t.classifierSize_(u),y=n.boxPadding+n._xOffset,o||(_=n.boxPadding+(r.title?n.titleFontSize+r.titlePadding:0)+n._sizeLegendHeight,l=_,a=d,n._sizeLegendHeight=n._sizeLegendHeight+_),o){var v=o.node().getBBox();c+=v.height*a,_=l+c+r.shapePadding*(f-1),n._sizeLegendHeight=n._sizeLegendHeight+v.height+r.shapePadding,a=d}}else n._xOffset=t.classifierSize_(u)/1.5,y=n.boxPadding+n._xOffset,_=n.boxPadding+(r.title?n.titleFontSize+r.titlePadding:0)+n._sizeLegendHeight+d/2+r.shapePadding,n._sizeLegendHeight=n._sizeLegendHeight+d+r.shapePadding;o=e.append("g").attr("transform","translate(".concat(y,",").concat(_,")")).style("fill",(function(e){return t.classifierColor_?r.shapeFill:t.psFill_})).style("fill-opacity",t.psFillOpacity()).style("stroke",t.psStroke()).style("stroke-width",t.psStrokeWidth()).attr("stroke","black").attr("stroke-width",.5).append("path").attr("d",g).attr("transform",(function(){return n.map.psCustomPath_?"translate(".concat(r.shapeOffset.x,",").concat(r.shapeOffset.y,") scale(").concat(d,")"):"translate(".concat(r.shapeOffset.x,",").concat(r.shapeOffset.y,")")}));var m=y+r.labelOffset.x,x=_+r.labelOffset.y;"bar"==n.map.psShape_?x+=d/2:"custom"==n.map.psShape_&&(x+=10*d),e.append("text").attr("x",m).attr("y",x).attr("alignment-baseline","middle").text(i(p)).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)},h=1;h<r.cellNb+1;h++)f(h)}(t,e,n.sizeLegend),t.classifierColor_&&function(t,e,r){var i=r.labelFormatter||Vu,o=t.svg();r.title&&e.append("text").attr("x",n.boxPadding).attr("y",n._sizeLegendHeight+n.boxPadding+n.titleFontSize+n.legendSpacing+r.titlePadding).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill);for(var a=n.boxPadding,l=t.psClasses_,s=function(s){var u=n._sizeLegendHeight+n.boxPadding+(r.title?n.titleFontSize+2*r.titlePadding:0)+s*(r.shapeHeight+r.shapePadding)+n.legendSpacing+r.shapePadding,c=n.ascending?s:l-s-1;e.append("g").attr("transform","translate(".concat(a,",").concat(u,")")).attr("fill",t.psClassToFillStyle()(c,l)).style("fill-opacity",t.psFillOpacity()).style("stroke",t.psStroke()).style("stroke-width",1).attr("stroke","black").attr("stroke-width",.5).append("rect").attr("width",r.shapeWidth).attr("height",r.shapeHeight).on("mouseover",(function(){var e=o.select("#g_ps").selectAll("[ecl='"+c+"']"),n=yt(this.parentNode).attr("fill");yt(this).attr("fill___",n),e.each((function(e,n){yt(this.childNodes[0]).style("fill",t.nutsrgSelFillSty())})),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=o.select("#g_ps").selectAll("[ecl='"+c+"']"),n=yt(this).attr("fill___");e.each((function(t,e){yt(this.childNodes[0]).style("fill",n)})),yt(this).style("fill",t.psClassToFillStyle()(c,l))}));var f=(n.map.psShape_,u);s>0&&e.append("line").attr("x1",a).attr("y1",f).attr("x2",a+r.sepLineLength).attr("y2",f).attr("stroke",r.sepLineStroke).attr("stroke-width",r.sepLineStrokeWidth);var h=u+r.labelOffset.y+1.2*n.labelFontSize;s<l-1&&e.append("text").attr("x",a+r.labelOffset.x).attr("y",h).attr("alignment-baseline","middle").text((function(e){return i(t.classifierColor_.invertExtent(n.ascending?c+1:c-1)[n.ascending?0:1])})).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)},u=0;u<l;u++)s(u);if(r.noData){var c=n._sizeLegendHeight+n.boxPadding+(r.title?n.titleFontSize+n.boxPadding+2*r.titlePadding:0)+t.psClasses_*(r.shapeHeight+r.shapePadding)+n.legendSpacing+r.shapePadding;e.append("g").attr("transform","translate(".concat(a,",").concat(c,")")).attr("fill",t.noDataFillStyle()).style("fill-opacity",t.psFillOpacity()).style("stroke",t.psStroke()).attr("stroke-width",1).append("rect").attr("width",r.shapeWidth).attr("height",r.shapeHeight).on("mouseover",(function(){var e=o.select("#g_ps").selectAll("[ecl='nd']"),n=yt(this.parentNode).attr("fill");yt(this).attr("fill___",n),e.each((function(e,n){yt(this.childNodes[0]).style("fill",t.noDataFillStyle())})),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=o.select("#g_ps").selectAll("[ecl='nd']"),n=yt(this).attr("fill___");e.each((function(t,e){yt(this.childNodes[0]).style("fill",n)})),yt(this).style("fill",t.noDataFillStyle())})),e.append("text").attr("x",a+r.labelOffset.x).attr("y",c+n.boxPadding).attr("alignment-baseline","middle").text(r.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)}}(t,e,n.colorLegend),n.setBoxDimension()},n},Ph=function(t){var e=uh(t,!0);return e.psShape_="circle",e.psCustomShape_,e.psCustomPath_,e.psOffset_={x:0,y:0},e.psMaxSize_=30,e.psMinSize_=5,e.psBarWidth_=10,e.psMaxValue_=void 0,e.psMinValue_=void 0,e.psFill_="#2d50a0",e.psFillOpacity_=.7,e.psStroke_="#000",e.psStrokeWidth_=.3,e.psClasses_=5,e.psColors_=null,e.psColorFun_=yh,e.psClassToFillStyle_=void 0,e.noDataFillStyle_="lightgray",e.psThreshold_=[0],e.psClassifMethod_="quantile",e.makeClassifNice_=!0,e.classifierSize_=void 0,e.classifierColor_=void 0,e.tooltip_.textFunction=Ih,["psMaxSize_","psMinSize_","psMaxValue_","psMinValue_","psFill_","psFillOpacity_","psStroke_","psStrokeWidth_","classifierSize_","classifierColor_","psShape_","psCustomShape_","psBarWidth_","psClassToFillStyle_","psColorFun_","noDataFillStyle_","psThreshold_","psColors_","psCustomPath_","psOffset_","psClassifMethod_","psClasses_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["psMaxSize","psMinSize","psFill","psFillOpacity","psStroke","psStrokeWidth","classifierSize","classifierColor","psShape","psCustomShape","psBarWidth","psClassToFillStyle","psColorFun","noDataFillStyle","psThreshold","psColors","psCustomPath","psOffset","psClassifMethod","psClasses"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.psColorFun=function(t){return arguments.length?(e.psColorFun_=t,e.psClassToFillStyle_=Oh(e.psColorFun_,e.psColors_),e):e.psColorFun_},e.psThreshold=function(t){return arguments.length?(e.psThreshold_=t,e.psClasses(t.length+1),e):e.psThreshold_},e.updateClassification=function(){return function(){var t,n=function(t){return i()(Array(t).keys())},r=e.statData("size").getArray(),o=e.psMinValue_?e.psMinValue_:e.statData("size").getMin(),a=e.psMaxValue_?e.psMaxValue_:e.statData("size").getMax();if(t=r?[o,a]:[e.statData().getMin(),e.statData().getMax()],e.classifierSize(Ln().domain(t).range([e.psMinSize_,e.psMaxSize_])),e.statData("color").getArray())if("quantile"===e.psClassifMethod_){var l=e.statData("color").getArray(),s=n(e.psClasses_);e.classifierColor(Nn().domain(l).range(s))}else if("equinter"===e.psClassifMethod_){var u=e.statData("color").getArray(),c=n(e.psClasses_);e.classifierColor(Dn().domain([o(u),a(u)]).range(c)),e.makeClassifNice_&&e.classifierColor().nice()}else if("threshold"===e.psClassifMethod_){e.psClasses(e.psThreshold().length+1);var f=n(e.psClasses_);e.classifierColor(Pn().domain(e.psThreshold()).range(f))}}(),e.svg()&&e.classifierColor_&&e.svg().selectAll(".symbol").attr("ecl",(function(t){var n=e.statData("color").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0==r||r?+e.classifierColor()(+r):"nd"})),e},e.updateStyle=function(){var t;e.psClassToFillStyle()||e.psClassToFillStyle(Oh(e.psColorFun_,e.psColors_));var n=e.statData("size").getArray()?e.statData("size"):e.statData();if(e.svg()){e.svg_.selectAll("g.symbol > *").remove(),t=e.psCustomPath_?e.svg().select("#g_ps").selectAll("g.symbol").append("path").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("class","ps").attr("d",e.psCustomPath_).attr("transform",(function(t){var r=n.get(t.properties.id),i=e.classifierSize_(+r.value);if(i)return"translate(".concat(e.psOffset_.x*i,",").concat(e.psOffset_.y*i,") scale(").concat(i,")")})):"bar"==e.psShape_?e.svg().select("#g_ps").selectAll("g.symbol").append("rect").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("width",e.psBarWidth_).attr("height",(function(t){var r=n.get(t.properties.id);return r&&r.value?e.classifierSize_(+r.value):0})).attr("transform",(function(){this.getBoundingClientRect();return"translate(".concat(-this.getAttribute("width")/2)+", -".concat(this.getAttribute("height"),")")})).transition().duration(e.transitionDuration()):e.svg().selectAll("g.symbol").append("path").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("class","ps").attr("d",(function(t){var n=e.statData("size")?e.statData("size"):e.statData();if(n){var r=n.get(t.properties.id);if(0==r||r){var i=e.classifierSize_(+r.value)||0;if(e.psCustomShape_)return e.psCustomShape_.size(i*i)();var o=Rh[e.psShape_]||Rh.circle;return Nh().type(o).size(i*i)()}}}));var r="WORLD"==e.geo_?"path.worldrg":"path.nutsrg",i=e.svg().selectAll(r);"WORLD"!==e.geo_?"mixed"==e.nutsLvl_&&(e.svg().selectAll("g.symbol").style("display",(function(t){var r=n.get(t.properties.id);return r&&r.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&":"!=r.value?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])?"block":void 0:"none"})),i.style("display",(function(t){var r=n.get(t.properties.id);return r&&r.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])?"block":void 0:"none"})),i.style("stroke",(function(t){var r=yt(this).attr("lvl"),i=n.get(t.properties.id);if(i&&i.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1]))return e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&"0"!==r?e.nutsbnStroke_[parseInt(r)]||"#777":void 0})).style("stroke-width",(function(t){var r=yt(this).attr("lvl"),i=n.get(t.properties.id);if(i&&i.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1]))return e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&"0"!==r?e.nutsbnStrokeWidth_[parseInt(r)]||"#777":void 0}))):i.attr("fill",(function(t){var r=n.get(t.properties.id);return r&&r.value?e.nutsrgFillStyle_:e.worldFillStyle_})),t.style("fill-opacity",e.psFillOpacity()).style("stroke",e.psStroke()).style("stroke-width",e.psStrokeWidth()).style("fill",(function(){if(e.classifierColor_){var t=yt(this.parentNode).attr("ecl");return t&&"nd"!==t?e.psClassToFillStyle_(t,e.psClasses_):e.noDataFillStyle()||"gray"}return e.psFill()}))}return e},e.getLegendConstructor=function(){return Dh},e},Oh=function(t,e){return t=t||yh,e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},Rh={cross:vh,square:kh,diamond:bh,triangle:Fh,star:Mh,wye:Lh,circle:_h},Ih=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData("size").getArray()?e.statData("size"):e.statData(),i=r.get(t.properties.id);if(!i||0!=i.value&&!i.value)n.push(e.noDataText_);else{n.push(Vu(i.value));var o=r.unitText();o&&n.push(" "+o)}if(n.push("<br>"),e.statData("color").getArray()){var a=e.statData("color").get(t.properties.id);if(!a||0!=a.value&&!a.value)n.push(e.noDataText_);else{n.push(Vu(a.value));var l=e.statData("color").unitText();l&&n.push(" "+l)}}return n.join("")},Wh=Ii("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Uh=function(t,e){var n=xc(t);if(n.shapeWidth=13,n.shapeHeight=15,n.shapePadding=5,n.labelFontSize=12,n.labelOffset=5,n.noData=!0,n.noDataText="No data",e)for(var r in e)n[r]=e[r];return n.update=function(){var t=n.map,e=n.lgg,r=t.svg();e.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&e.append("text").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),e.style("font-family",t.fontFamily_);for(var i=t.classifier().domain(),o=function(o){var a=i[o],l=t.classifier()(a),s=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+o*(n.shapeHeight+n.shapePadding);e.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.classToFillStyle()[a]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']");e.style("fill",t.nutsrgSelFillSty());var n=yt(this);e.attr("fill___",(function(t){n.attr("fill")})),n.style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']"),n=yt(this);e.style("fill",(function(t){n.attr("fill___")})),n.style("fill",t.classToFillStyle()[l])})),e.append("text").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",s+.5*n.shapeHeight).attr("alignment-baseline","middle").text(t.classToText()?t.classToText()[a]:a).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']");e.style("fill",t.nutsrgSelFillSty());var n=yt(this);e.attr("fill___",(function(t){n.attr("fill")}))})).on("mouseout",(function(){var t=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']"),e=yt(this);t.style("fill",(function(t){e.attr("fill___")}))}))},a=0;a<i.length;a++)o(a);if(n.noData){var l=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+i.length*(n.shapeHeight+n.shapePadding);e.append("rect").attr("x",n.boxPadding).attr("y",l).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='nd']");e.style("fill",t.nutsrgSelFillSty()),e.attr("fill___",(function(t){yt(this).attr("fill")})),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){r.select("#g_nutsrg").selectAll("[ecl='nd']").style("fill",(function(t){yt(this).attr("fill___")})),yt(this).style("fill",t.noDataFillStyle())})),e.append("text").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",l+.5*n.shapeHeight).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)}n.setBoxDimension()},n},jh=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData().get(t.properties.id);if(!r||0!=r.value&&!r.value)return n.push(e.noDataText_),n.join("");var i=r.value;if(e.classToText_){var o=e.classToText_[i];return n.push(o||i),n.join("")}return n.push(i),n.join("")},Hh=function(t,e){var n=xc(t);if(n.squareSize=50,n.label1="Variable 1",n.label2="Variable 2",n.labelFontSize=12,n.noData=!0,n.noDataShapeSize=15,n.noDataText="No data",e)for(var r in e)n[r]=e[r];return n.update=function(){var t=n.map,e=t.svg(),r=n.lgg,i=t.clnb(),o=n.squareSize/i,a=.7071*n.squareSize+n.boxPadding;r.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&r.append("text").attr("x",a).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("text-anchor","middle").style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),r.style("font-family",t.fontFamily_);for(var l=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0),s=r.append("g").attr("transform","translate("+n.boxPadding+","+(a+l)+") rotate(-45) translate("+n.boxPadding+",0)"),u=0;u<i;u++)for(var c=function(n){var r=i-u-1,a=i-n-1,l=t.classToFillStyle()(r,a);s.append("rect").attr("x",(i-1-u)*o).attr("y",n*o).attr("width",o).attr("height",o).attr("fill",l).on("mouseover",(function(){var n=e.select("#g_nutsrg").selectAll("[ecl1='"+r+"']").filter("[ecl2='"+a+"']");n.style("fill",t.nutsrgSelFillSty()),n.attr("fill___",(function(){yt(this).attr("fill")})),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[ecl1='"+r+"']").filter("[ecl2='"+a+"']").style("fill",(function(){yt(this).attr("fill___")})),yt(this).style("fill",l)}))},f=0;f<i;f++)c(f);s.append("text").attr("x",0).attr("y",n.squareSize+n.labelFontSize).text(n.label1).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill),s.append("text").attr("x",-n.labelFontSize).attr("y",n.labelFontSize).text(n.label2).attr("transform","rotate(90) translate("+n.labelFontSize+",0)").style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill),s.append("rect").attr("x",0).attr("y",0).attr("width",n.squareSize).attr("height",n.squareSize).attr("fill","none").style("stroke","black").attr("stroke-width",.7),n.noData&&(l=l+1.4142*n.squareSize+2*n.boxPadding+n.labelFontSize,r.append("rect").attr("x",n.boxPadding).attr("y",l).attr("width",n.noDataShapeSize).attr("height",n.noDataShapeSize).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.7).on("mouseover",(function(){var n=e.select("#g_nutsrg").selectAll("[nd='nd']");n.style("fill",t.nutsrgSelFillSty()),n.attr("fill___",(function(t){yt(this).attr("fill")})),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(t){yt(this).attr("fill___")})),yt(this).style("fill",t.noDataFillStyle())})),r.append("text").attr("x",n.boxPadding+n.noDataShapeSize+n.boxPadding).attr("y",l+.5*n.noDataShapeSize).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)),n.setBoxDimension()},n},Bh=function(t,e,n,r,i){for(var o=[],a=Fe(e,n),l=Fe(r,i),s=0;s<t;s++){for(var u=s/(t-1),c=Fe(a(u),l(u)),f=[],h=0;h<t;h++)f.push(c(h/(t-1)));o.push(f)}return function(t,e){return o[t][e]}},Gh=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData("v1").get(t.properties.id);if(!r||0!=r.value&&!r.value)n.push(e.noDataText_);else{n.push(r.value);var i=e.statData("v1").unitText();i&&n.push(" "+i)}n.push("<br>");var o=e.statData("v2").get(t.properties.id);if(!o||0!=o.value&&!o.value)n.push(e.noDataText_);else{n.push(o.value);var a=e.statData("v2").unitText();a&&n.push(" "+a)}return n.join("")},Yh=Ii("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),qh=function(t,e){var n=xc(t);if(n.shapeWidth=13,n.shapeHeight=15,n.shapePadding=5,n.labelFontSize=12,n.labelOffset=5,n.noData=!0,n.noDataText="No data",e)for(var r in e)n[r]=e[r];return n.update=function(){var t=n.map,e=t.svg(),r=n.lgg;r.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&r.append("text").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),r.style("font-family",t.fontFamily_);var i=0,o=t.catColors(),a=function(a){var l=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+i*(n.shapeHeight+n.shapePadding),s=t.catColors()[a]||"lightgray";r.append("rect").attr("x",n.boxPadding).attr("y",l).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",o[a]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){e.selectAll("pattern").selectAll("rect[code='"+a+"']").style("fill",t.nutsrgSelFillSty()),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.selectAll("pattern").selectAll("rect[code='"+a+"']").style("fill",s),yt(this).style("fill",s)})),r.append("text").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",l+.5*n.shapeHeight).attr("alignment-baseline","middle").text(t.catLabels()[a]||a).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){e.selectAll("pattern").selectAll("rect[code='"+a+"']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var n=t.catColors()[a]||"lightgray";e.selectAll("pattern").selectAll("rect[code='"+a+"']").style("fill",n)})),i++};for(var l in o)a(l);if(n.noData){var s=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+i*(n.shapeHeight+n.shapePadding);r.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty()),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}));yt(this).style("fill",t.noDataFillStyle())})),r.append("text").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",s+.5*n.shapeHeight).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}))}))}n.setBoxDimension()},n},Vh=function(t,e){var n=xc(t);if(n.legendSpacing=15,n.labelFontSize=12,n.titleFontSize=12,n.sizeLegend={title:null,titlePadding:15,values:null},n.colorLegend={title:null,labelOffset:5,shapeWidth:13,shapeHeight:15,shapePadding:5,noData:!0,noDataText:"No data"},n._sizeLegendHeight=0,e)for(var r in e)if("colorLegend"==r||"sizeLegend"==r)for(var i in n[r])e[r][i]&&(n[r][i]=e[r][i]);else n[r]=e[r];return n.update=function(){var t=n.map,e=n.lgg;e.selectAll("*").remove(),n.makeBackgroundBox(),e.style("font-family",t.fontFamily_),function(t,e,r){var i=t.sizeClassifier_.domain();r.values||(r.values=[Math.floor(i[1]),Math.floor(i[0])]);!r.title&&n.title&&(r.title=n.title);r.title&&e.append("text").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill);var o=t.sizeClassifier_(Nt(r.values)),a=n.boxPadding+(r.title?n.titleFontSize+n.boxPadding+r.titlePadding:0)+2*o,l=e.append("g").attr("fill","black").attr("transform","translate(".concat(o+n.boxPadding,",").concat(a,")")).attr("text-anchor","right").selectAll("g").data(r.values).join("g");l.append("circle").attr("fill","none").attr("stroke","black").attr("cy",(function(e){return-t.sizeClassifier_(e)})).attr("r",t.sizeClassifier_),l.append("text").style("font-size",n.labelFontSize+"px").attr("y",(function(e,r){return-1-2*t.sizeClassifier_(e)-n.labelFontSize})).attr("x",30).attr("dy","1.2em").attr("xml:space","preserve").text((function(t){return t.toLocaleString("en").replace(/,/gi," ")})),l.append("line").style("stroke-dasharray",2).style("stroke","grey").attr("x1",2).attr("y1",(function(e,n){return-1-2*t.sizeClassifier_(e)})).attr("xml:space","preserve").attr("x2",30).attr("y2",(function(e,n){return-1-2*t.sizeClassifier_(e)})),n._sizeLegendHeight=a}(t,e,n.sizeLegend),function(t,e,r){var i=t.svg();r.title&&e.append("text").attr("x",n.boxPadding).attr("y",n._sizeLegendHeight+n.legendSpacing+n.boxPadding+n.titleFontSize).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill);e.style("font-family",t.fontFamily_);var o=0,a=t.catColors(),l=function(l){var s=n._sizeLegendHeight+n.legendSpacing+n.boxPadding+(r.title?n.titleFontSize+n.boxPadding:0)+o*(r.shapeHeight+r.shapePadding),u=t.catColors()[l]||"lightgray";e.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",r.shapeWidth).attr("height",r.shapeHeight).attr("fill",a[l]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){i.selectAll(".piechart").selectAll("path[code='"+l+"']").style("fill",t.nutsrgSelFillSty()),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){i.selectAll(".piechart").selectAll("path[code='"+l+"']").style("fill",u),yt(this).style("fill",u)})),e.append("text").attr("x",n.boxPadding+r.shapeWidth+r.labelOffset).attr("y",s+.5*r.shapeHeight).attr("alignment-baseline","middle").text(t.catLabels()[l]||l).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){i.selectAll("pattern").selectAll("rect[code='"+l+"']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=t.catColors()[l]||"lightgray";i.selectAll("pattern").selectAll("rect[code='"+l+"']").style("fill",e)})),o++};for(var s in a)l(s);if(r.noData){var u=n._sizeLegendHeight+n.legendSpacing+n.boxPadding+(r.title?n.titleFontSize+n.boxPadding:0)+o*(r.shapeHeight+r.shapePadding);e.append("rect").attr("x",n.boxPadding).attr("y",u).attr("width",r.shapeWidth).attr("height",r.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty()),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}));yt(this).style("fill",t.noDataFillStyle())})),e.append("text").attr("x",n.boxPadding+r.shapeWidth+r.labelOffset).attr("y",u+.5*r.shapeHeight).attr("alignment-baseline","middle").text(r.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}))}))}}(t,e,n.colorLegend),n.setBoxDimension()},n},Xh=function(t){var e=uh(t,!0);e.pieMinRadius_=5,e.pieMaxRadius_=15,e.pieChartInnerRadius_=0,e.pieStrokeFill_="white",e.pieStrokeWidth_=.3,e.tooltipPieRadius_=40,e.tooltipPieInnerRadius_=0,e.catColors_=void 0,e.catLabels_=void 0,e.pieOtherColor_="#FFCC80",e.pieOtherText_="Other",e.showOnlyWhenComplete_=!1,e.noDataFillStyle_="darkgray",e.sizeClassifier_=null,e.statPie_=null,["catColors_","catLabels_","showOnlyWhenComplete_","noDataFillStyle_","pieMaxRadius_","pieMinRadius_","pieChartInnerRadius_","pieOtherColor_","pieOtherText_","pieStrokeFill_","pieStrokeWidth_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["catColors","catLabels","showOnlyWhenComplete","noDataFillStyle","pieMaxRadius","pieMinRadius","pieChartInnerRadius","pieOtherColor","pieOtherText","pieStrokeFill","pieStrokeWidth"].forEach((function(n){null!=t[n]&&e[n](t[n])}));var n=void 0,r=void 0;e.statPie=function(t,i,o,a,l,s){t.filters=t.filters||{};for(var u=0;u<o.length;u++){var c=o[u];t.filters[i]=c;var f={};for(var h in t)f[h]=t[h];for(var p in f.filters={},t.filters)f.filters[p]=t.filters[p];e.stat(c,f),l&&(e.catColors_=e.catColors_||{},e.catColors_[c]=l[u]),a&&(e.catLabels_=e.catLabels_||{},e.catLabels_[c]=a[u])}if(n=o,s){r=s,t.filters[i]=s;var d={};for(var g in t)d[g]=t[g];for(var y in d.filters={},t.filters)d.filters[y]=t.filters[y];e.stat(s,d),e.catColors_.other=e.pieOtherColor_,e.catLabels_.other=e.pieOtherText_}return e};var i=function(t){for(var i={},o=0,a=0;a<n.length;a++){var l=n[a],s=e.statData(l).get(t);if(!s||0!=s.value&&!s.value||isNaN(s.value)){if(e.showOnlyWhenComplete())return}else i[l]=s.value,o+=s.value}if(r){var u=e.statData(r).get(t);u&&(o=u.value)}if(0!=o){for(var c=0;c<n.length;c++)i[n[c]]/=o;if(r){var f=0;for(var h in i)f+=i[h];i.other=1-f}return i}};e.updateClassification=function(){if(!n){var t=(n=Object.keys(e.statData_)).indexOf("default");t>-1&&n.splice(t,1)}var r,i=(r=[],e.svg().selectAll("#g_ps").selectAll("g.symbol").data().forEach((function(t){var e=t.properties.id,n=o(e);n&&r.push(n)})),wt(r));return e.sizeClassifier_=Ln().domain(i).range([e.pieMinRadius_,e.pieMaxRadius_]),e};var o=function(t){var i,o=0;if(r)!(i=e.statData(r).get(t))||0!=i.value&&!i.value||isNaN(i.value)?e.showOnlyWhenComplete()&&(o=void 0):o=i.value;else for(var a=0;a<n.length;a++){var l=n[a];if(!(i=e.statData(l).get(t))||0!=i.value&&!i.value||isNaN(i.value)){if(e.showOnlyWhenComplete())return}else o+=i.value}if(0!=o)return o};return e.updateStyle=function(){if(!e.catColors()){e.catColors({});for(var t=0;t<n.length;t++)e.catColors()[n[t]]=schemeCategory10[t%10]}e.catLabels_=e.catLabels_||{};var r=[];e.svg().selectAll("#g_ps").selectAll("g.symbol").append("g").attr("id",(function(t){return r.push(t.properties.id),"pie_"+t.properties.id}));var a="WORLD"==e.geo_?"path.worldrg":"path.nutsrg";return e.svg().selectAll(a).on("mouseover",(function(t){var n=yt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(){e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=yt(this);t.attr("fill");t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),r.forEach((function(t){var n=[],r=i(t);for(var a in r)n.push({code:a,value:r[a]});if(n&&0!=n.length){var l=e.svg().selectAll("#pie_"+t),s=e.sizeClassifier_(o(t)),u=e.pieChartInnerRadius_,c=Mf().sort(null).value((function(t){return t.value}));l.append("g").attr("stroke",e.pieStrokeFill_).attr("stroke-width",e.pieStrokeWidth_+"px").attr("class","piechart").selectAll("path").data(c(n)).join("path").attr("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("code",(function(t){return t.data.code})).attr("d",yf().innerRadius(u).outerRadius(s))}})),e},e.getLegendConstructor=function(){return Vh},e.tooltip_.textFunction=function(t,r){var a=yt("#tooltip_eurostat");a.html(""),a.selectAll("*").remove(),t.properties.id?a.append("div").html("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):a.append("div").html("<b>"+t.properties.na+"</b><br>");var l=[],s=i(t.properties.id);for(var u in s)l.push({code:u,value:s[u]});if(l&&0!=l.length){var c=Math.min(120,120)/2-30,f=a.append("svg").attr("width",120).attr("height",120).append("g").attr("transform","translate(60,60)"),h=Mf().sort(null).value((function(t){return t.value})),p=yf().innerRadius(0).outerRadius(.8*c),d=yf().innerRadius(.9*c).outerRadius(.9*c),g=h(l);f.selectAll("allSlices").data(g).enter().append("path").attr("d",p).attr("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("stroke","white").style("stroke-width","1px").style("opacity",.7),f.selectAll("allPolylines").data(g).enter().append("polyline").attr("stroke","black").style("fill","none").attr("stroke-width",1).attr("points",(function(t){if(t.data.value>.02){var e=p.centroid(t),n=d.centroid(t),r=d.centroid(t),i=t.startAngle+(t.endAngle-t.startAngle)/2;return r[0]=.95*c*(i<Math.PI?1:-1),[e,n,r]}})),f.selectAll("allLabels").data(g).enter().append("text").text((function(t){if(t.data.value>.02){var e=(100*t.data.value).toFixed();if(!isNaN(e))return e+"%"}})).attr("transform",(function(t){var e=d.centroid(t),n=t.startAngle+(t.endAngle-t.startAngle)/2;return e[0]=.99*c*(n<Math.PI?1:-1),"translate("+e+")"})).style("text-anchor",(function(t){return t.startAngle+(t.endAngle-t.startAngle)/2<Math.PI?"start":"end"})).style("font-size","12px");var y=document.createElement("div");y.style.padding="10px",y.style.paddingTop="0px",y.style.fontSize="13px";for(var _=0;_<n.length;_++){var v=n[_],m=e.statData(v).get(t.properties.id);if(m&&m.value){var x="<strong>"+e.catLabels_[v]+"</strong>: "+m.value.toFixed()+"<br>";y.innerHTML=y.innerHTML+x}}var b=o(t.properties.id);y.innerHTML=y.innerHTML+"<hr><strong>Total</strong>: ".concat(b.toFixed()," <br>"),a.node().appendChild(y)}else a.append("div").html(e.noDataText())},e},Zh=function(t){var e=uh(t,!0);e.sparkLineColor_="black",e.sparkAreaColor_="#41afaa",e.sparkLineWidth_=30,e.sparkLineHeight_=20,e.sparkLineStrokeWidth_=.4,e.sparkLineOpacity_=.6,e.sparkType_="line",e.sparkLineCircleRadius_=0,e.sparkTooltipChart_={width:100,height:50,margin:{left:60,right:40,top:40,bottom:40},circleRadius:1.5},e.showOnlyWhenComplete_=!1,e.statSpark_=null,e.sparkHeightClassifier_=null,["sparkLineColor_","showOnlyWhenComplete_","sparkType_","sparkLineWidth_","sparkLineHeight_","sparkLineStrokeWidth_","sparkLineOpacity_","sparkLineCircleRadius_","sparkLineAreaColor_","sparkTooltipChart_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["sparkLineColor","showOnlyWhenComplete","sparkType","sparkLineWidth","sparkLineHeight","sparkLineStrokeWidth","sparkLineOpacity","sparkLineCircleRadius_","sparkLineAreaColor","sparkTooltipChart_"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statSpark=function(t,r,i){t.filters=t.filters||{};for(var o=0;o<r.length;o++){var a=r[o];t.filters.time=a;var l={};for(var s in t)l[s]=t[s];for(var u in l.filters={},t.filters)l.filters[u]=t.filters[u];e.stat(a,l),i&&(e.catLabels_=e.catLabels_||{},e.catLabels_[a]=i[o])}return n=r,e};var n=void 0,r=function(t){for(var r=[],i=0,o=0;o<n.length;o++){var a=n[o],l=e.statData(a).get(t);if(!l||0!=l.value&&!l.value||isNaN(l.value)){if(e.showOnlyWhenComplete())return}else r.push({date:a,value:l.value}),i+=l.value}if(0!=i)return r};e.updateClassification=function(){if(!n){var t=(n=Object.keys(e.statData_)).indexOf("default");t>-1&&n.splice(t,1)}var r,o=(r=[],e.svg().selectAll("#g_ps").selectAll("g.symbol").data().forEach((function(t){var e=t.properties.id,n=i(e);n&&r.push(n)})),wt(r));return e.widthClassifier_=Ln().domain(o).range([0,e.sparkLineWidth_]),e.heightClassifier_=Ln().domain(o).range([0,e.sparkLineHeight_]),e},e.updateStyle=function(){var t=[],i=(e.svg().selectAll("#g_ps").selectAll("g.symbol").attr("id",(function(e){return t.push(e.properties.id),"spark_"+e.properties.id})),"WORLD"==e.geo_?"path.worldrg":"path.nutsrg");return e.svg().selectAll(i).on("mouseover",(function(t){var n=yt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(){e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=yt(this);t.attr("fill");t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),t.forEach((function(t){!function(t,r){var i,o,a,l,s=wt(r.map((function(t){return t.value})));"area"==e.sparkType_?(l=e.widthClassifier_(s[1]),a=e.heightClassifier_(s[1]),o=kn().domain(s).range([a-.5,0]),i=_n().domain([0,n.length-1]).range([.5,l-.5])):(l=e.sparkLineWidth_,a=e.sparkLineHeight_,o=kn().domain(s).range([e.sparkLineHeight_-.5,0]),i=_n().domain([0,n.length-1]).range([.5,e.sparkLineWidth_-.5])),"area"==e.sparkType_&&t.append("path").datum(r).attr("fill",e.sparkAreaColor_).attr("stroke",e.sparkLineColor_).attr("stroke-width",e.sparkLineStrokeWidth_+"px").attr("opacity",e.sparkLineOpacity_).attr("fill-opacity",.3).attr("stroke","none").attr("d",Sf().x((function(t,e){return i(e)})).y0(a).y1((function(t){return o(t.value)}))).attr("transform",(function(t){return"translate(0,-".concat(a/2,")")})),t.append("path").datum(r).attr("fill","none").attr("stroke",e.sparkLineColor_).attr("stroke-width",e.sparkLineStrokeWidth_+"px").attr("d",bf().x((function(t,e){return i(e)})).y((function(t){return o(t.value)}))).attr("transform",(function(t){return"translate(0,-".concat(a/2,")")})),t.selectAll("myCircles").data(r).enter().append("circle").attr("fill","red").attr("stroke","none").attr("cx",(function(t,e){return i(e)})).attr("cy",(function(t){return o(t.value)})).attr("r",e.sparkLineCircleRadius_).attr("transform",(function(t){return"translate(0,-".concat(a/2,")")}))}(e.svg().select("#spark_"+t),r(t))})),e};var i=function(t){for(var r,i=0,o=0;o<n.length;o++){var a=n[o];if(!(r=e.statData(a).get(t))||0!=r.value&&!r.value||isNaN(r.value)){if(e.showOnlyWhenComplete())return}else r.value>i&&(i=r.value)}if(0!=i)return i};return e.getLegendConstructor=function(){return ph},e.tooltip_.textFunction=function(t,i){var o=yt("#tooltip_eurostat");o.html(""),o.selectAll("*").remove(),t.properties.id?o.append("div").html("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):o.append("div").html("<b>"+t.properties.na+"</b><br>");var a=e.sparkTooltipChart_.height,l=e.sparkTooltipChart_.width,s=e.sparkTooltipChart_.margin,u=r(t.properties.id);!function(t,r,i,o){var a=wt(r.map((function(t){return t.value}))),l=kn().domain(a).range([o-.5,0]),s=_n().domain([n[0],n[n.length-1]]).range([.5,i-.5]);t.append("g").attr("class","axis").attr("transform","translate(0,"+o+")").call((u=s,Fc(3,u)).ticks(n.length).tickFormat(on(".0f"))).selectAll("text").style("text-anchor","end").attr("dx","-.8em").attr("dy",".15em").attr("transform","rotate(-65)");var u;var c=l.domain(),f=[c[0],Math.round((c[0]+c[1])/2),c[1]];t.append("g").attr("class","axis").call(function(t){return Fc(4,t)}(l).tickValues(f).tickFormat(on(",.2r"))),"area"==e.sparkType_&&t.append("path").datum(r).attr("fill",e.sparkAreaColor_).attr("stroke",e.sparkLineColor_).attr("stroke-width",1).attr("opacity",e.sparkLineOpacity_).attr("fill-opacity",.3).attr("stroke","none").attr("stroke","none").attr("d",Sf().x((function(t,e){return s(t.date)})).y0(o).y1((function(t){return l(t.value)})));t.append("path").datum(r).attr("fill","none").attr("stroke",e.sparkLineColor_).attr("stroke-width",1).attr("d",bf().x((function(t,e){return s(t.date)})).y((function(t){return l(t.value)}))),t.selectAll("myCircles").data(r).enter().append("circle").attr("fill","red").attr("stroke","none").attr("cx",(function(t,e){return s(t.date)})).attr("cy",(function(t){return l(t.value)})).attr("r",e.sparkTooltipChart_.circleRadius)}(o.append("svg").attr("width",l+s.left+s.right).attr("height",a+s.top+s.bottom).append("g").attr("transform","translate("+s.left+","+s.top+")"),u,l,a)},e},$h=function(t,e){return"ch"==t?function(t){var e=uh(t);return e.clnb_=7,e.classifMethod_="quantile",e.threshold_=[0],e.colors_=null,e.makeClassifNice_=!0,e.colorFun_=Ui,e.classToFillStyle_=void 0,e.noDataFillStyle_="lightgray",e.classifier_=void 0,["clnb_","classifMethod_","threshold_","makeClassifNice_","colorFun_","classToFillStyle_","noDataFillStyle_","classifier_","colors_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),e.colorFun=function(t){return arguments.length?(e.colorFun_=t,e.filtersDefinitionFun_?e.classToFillStyle(gh()):e.classToFillStyle(dh(e.colorFun(),e.colors_)),e):e.colorFun_},e.threshold=function(t){return arguments.length?(e.threshold_=t,e.clnb(t.length+1),e):e.threshold_},e.filtersDefinitionFun=function(t){return arguments.length?(e.filtersDefinitionFun_=t,e.svg()&&e.filtersDefinitionFun_(e.svg(),e.clnb_),e):e.filtersDefinitionFun_},t&&["clnb","classifMethod","threshold","makeClassifNice","colorFun","classToFillStyle","noDataFillStyle","colors_"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){var t=function(t){return i()(Array(t).keys())};if("quantile"===e.classifMethod_){var n=e.statData().getArray(),r=t(e.clnb());e.classifier(Nn().domain(n).range(r))}else if("equinter"===e.classifMethod_){var o=e.statData().getArray(),a=t(e.clnb());e.classifier(Dn().domain([Pt(o),Nt(o)]).range(a)),e.makeClassifNice_&&e.classifier().nice()}else if("threshold"===e.classifMethod_){e.clnb(e.threshold().length+1);var l=t(e.clnb());e.classifier(Pn().domain(e.threshold()).range(l))}var s="WORLD"==e.geo_?"path.worldrg":"path.nutsrg";e.svg()&&(e.svg().selectAll(s).attr("ecl",(function(t,n,r,i,o){var a=e.statData().get(t.properties.id);if(a){var l=a.value;if(0==l||l)return":"==l?"nd":+e.classifier()(+l)}})),"mixed"==e.nutsLvl_&&e.svg().selectAll("path.nutsrg0").attr("ecl",(function(t){var n=e.statData().get(t.properties.id);if(n){var r=n.value;if(0==r||r)return":"==r?"nd":+e.classifier()(+r)}})));return e},e.updateStyle=function(){if(e.filtersDefinitionFun_?e.classToFillStyle(gh()):e.classToFillStyle(dh(e.colorFun(),e.colors_)),e.svg()){var t="WORLD"==e.geo_?"path.worldrg":"path.nutsrg",n=e.svg().selectAll(t);n.transition().duration(e.transitionDuration()).attr("fill",(function(t){if("WORLD"==e.geo_){var n=yt(this).attr("ecl");return n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle()(n,e.clnb()):e.nutsrgFillStyle_}if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var r=yt(this).attr("ecl");return r?"nd"===r?e.noDataFillStyle()||"gray":e.classToFillStyle()(r,e.clnb()):e.nutsrgFillStyle_}return e.nutsrgFillStyle_})).end().then((function(){n.on("mouseover",(function(t){var n=yt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(){e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=yt(this);t.attr("fill");t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())}))}),(function(t){})),"mixed"==e.nutsLvl_&&e.svg().selectAll("path.nutsrg").style("display",(function(t){var n=yt(this).attr("ecl"),r=yt(this).attr("lvl");return n&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])||"0"==r?"block":"none"})).style("stroke",(function(t){var n=yt(this).attr("lvl");if(yt(this).attr("ecl")&&"0"!==n)return e.nutsbnStroke_[parseInt(n)]||"#777"})).style("stroke-width",(function(t){var n=yt(this).attr("lvl");if(yt(this).attr("ecl")&&"0"!==n)return e.nutsbnStrokeWidth_[parseInt(n)]||.2})),e.labelsToShow_.includes("values")&&e.updateValuesLabels()}return e},e.updateValuesLabels=function(){return e.svg_.selectAll("g.stat-label > *").remove(),e.svg().selectAll("g.stat-label").append("text").text((function(t){var n=e.statData().get(t.properties.id);return n&&n.value?":"!==n.value?n.value:void 0:""})),e.labelShadow_&&e.svg().selectAll("g.stat-label-shadow").append("text").text((function(t){var n=e.statData().get(t.properties.id);return n&&n.value?":"!==n.value?n.value:void 0:""})),e},e.getLegendConstructor=function(){return ph},e}(e):"ct"==t?function(t){var e=uh(t);return e.classToFillStyle_=void 0,e.classToText_=void 0,e.noDataFillStyle_="lightgray",e.tooltip_.textFunction=jh,e.classifier_=void 0,["classToFillStyle_","classToText_","noDataFillStyle_","tooltipText_","classifier_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["classToFillStyle","classToText","noDataFillStyle","tooltipText","classifier"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){var t=e.statData().getUniqueValues(),n=i()(Array(t.length).keys());return e.classifier(Vt().domain(t).range(n)),e.svg().selectAll("path.nutsrg").attr("ecl",(function(t){var n=e.statData().get(t.properties.id);if(!n)return"nd";var r=n.value;return 0==r||r?+e.classifier()(isNaN(r)?r:+r):"nd"})),e},e.updateStyle=function(){if(!e.classToFillStyle()){for(var t={},n=e.classifier().domain(),r=0;r<n.length;r++)t[n[r]]=Wh[r%12];e.classToFillStyle(t)}var i="WORLD"==e.geo_?"path.worldrg":"path.nutsrg",o=e.svg().selectAll(i);return o.transition().duration(e.transitionDuration()).attr("fill",(function(){var t=yt(this).attr("ecl");return t&&"nd"!==t?e.classToFillStyle_[e.classifier().domain()[t]]||e.noDataFillStyle_||"gray":e.noDataFillStyle_||"gray"})).end().then((function(){o.on("mouseover",(function(t){var n=yt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(){e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=yt(this);t.attr("fill");t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())}))}),(function(t){})),e},e.getLegendConstructor=function(){return Uh},e}(e):"ps"==t?Ph(e):"chbi"==t?function(t){var e=uh(t);return e.clnb_=3,e.startColor_="#e8e8e8",e.color1_="#73ae80",e.color2_="#6c83b5",e.endColor_="#2a5a5b",e.classToFillStyle_=void 0,e.noDataFillStyle_="lightgray",e.classifier1_=void 0,e.classifier2_=void 0,e.tooltip_.textFunction=Gh,["clnb_","startColor_","color1_","color2_","endColor_","classToFillStyle_","noDataFillStyle_","classifier1_","classifier2_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["clnb","startColor","color1","color2","endColor","classToFillStyle","noDataFillStyle"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){var t=i()(Array(e.clnb()).keys());if(e.classifier1(Nn().domain(e.statData("v1").getArray()).range(t)),e.classifier2(Nn().domain(e.statData("v2").getArray()).range(t)),e.svg().selectAll("path.nutsrg").attr("ecl1",(function(t){var n=e.statData("v1").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0==r||r?+e.classifier1()(+r):"nd"})).attr("ecl2",(function(t){var n=e.statData("v2").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0==r||r?+e.classifier2()(+r):"nd"})).attr("nd",(function(t){var n=e.statData("v1").get(t.properties.id),r=e.statData("v2").get(t.properties.id);if(!n||!r)return"nd";var i=n.value;return(0==i||i)&&(0==(i=r.value)||i)?"":"nd"})),!e.classToFillStyle()){var n=Bh(e.clnb(),e.startColor(),e.color1(),e.color2(),e.endColor());e.classToFillStyle(n)}return e},e.updateStyle=function(){e.svg().selectAll("path.nutsrg").transition().duration(e.transitionDuration()).attr("fill",(function(){var t=yt(this).attr("ecl1");if(!t||"nd"===t)return e.noDataFillStyle()||"gray";var n=yt(this).attr("ecl2");return n&&"nd"!==n?e.classToFillStyle()(+t,+n):e.noDataFillStyle()||"gray"}));var t="WORLD"==e.geo_?"path.worldrg":"path.nutsrg";return e.svg().selectAll(t).on("mouseover",(function(t){var n=yt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(){e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=yt(this);t.attr("fill");t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),e},e.getLegendConstructor=function(){return Hh},e}(e):"scomp"==t?function(t){var e=uh(t);e.stripeWidth_=50,e.stripeOrientation_=0,e.catColors_=void 0,e.catLabels_=void 0,e.showOnlyWhenComplete_=!1,e.noDataFillStyle_="lightgray",e.pieChartRadius_=40,e.pieChartInnerRadius_=15,["stripeWidth_","stripeOrientation_","catColors_","catLabels_","showOnlyWhenComplete_","noDataFillStyle_","pieChartRadius_","pieChartInnerRadius_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["stripeWidth","stripeOrientation","catColors","catLabels","showOnlyWhenComplete","noDataFillStyle","pieChartRadius","pieChartInnerRadius"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statComp=function(t,r,i,o,a){t.filters=t.filters||{};for(var l=0;l<i.length;l++){var s=i[l];t.filters[r]=s;var u={};for(var c in t)u[c]=t[c];for(var f in u.filters={},t.filters)u.filters[f]=t.filters[f];e.stat(s,u),a&&(e.catColors_=e.catColors_||{},e.catColors_[s]=a[l]),o&&(e.catLabels_=e.catLabels_||{},e.catLabels_[s]=o[l])}return n=i,e};var n=void 0,r=function(t){for(var r={},i=0,o=0;o<n.length;o++){var a=n[o],l=e.statData(a).get(t);if(!l||0!=l.value&&!l.value||isNaN(l.value)){if(e.showOnlyWhenComplete())return}else r[a]=l.value,i+=l.value}if(0!=i){for(var s=0;s<n.length;s++)r[n[s]]/=i;return r}};return e.updateClassification=function(){if(!n){var t=(n=Object.keys(e.statData_)).indexOf("default");t>-1&&n.splice(t,1)}return e},e.updateStyle=function(){if(!e.catColors()){e.catColors({});for(var t=0;t<n.length;t++)e.catColors()[n[t]]=Yh[t%10]}e.catLabels_=e.catLabels_||{},e.svg().selectAll("path.nutsrg").attr("fill",(function(t){var n=t.properties.id,i=r(n);if(!i)return e.noDataFillStyle()||"gray";var o=e.svg().append("pattern").attr("id","pattern_"+n).attr("x","0").attr("y","0").attr("width",e.stripeWidth()).attr("height",1).attr("patternUnits","userSpaceOnUse");e.stripeOrientation()&&o.attr("patternTransform","rotate("+e.stripeOrientation()+")"),o.append("rect").attr("x",0).attr("y",0).attr("width",e.stripeWidth()).attr("height",1).style("stroke","none").style("fill","lightgray");var a=0;for(var l in i){var s=i[l];if(s){s*=e.stripeWidth();var u=e.catColors()[l]||"lightgray";o.append("rect").attr("x",a).attr("y",0).attr("height",1).style("stroke","none").attr("code",l).style("fill",u).transition().duration(e.transitionDuration()).attr("width",s),a+=s}}return"url(#pattern_"+n+")"})).attr("nd",(function(t){return r(t.properties.id)?"":"nd"}));var i="WORLD"==e.geo_?"path.worldrg":"path.nutsrg";return e.svg().selectAll(i).on("mouseover",(function(t){var n=yt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(){e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=yt(this);t.attr("fill");t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),e},e.getLegendConstructor=function(){return qh},e.tooltip_.textFunction=function(t,n){var i=yt("#tooltip_eurostat");i.html(""),i.selectAll("*").remove(),t.properties.id?i.append("div").html("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):i.append("div").html("<b>"+t.properties.na+"</b><br>");var o=[],a=r(t.properties.id);for(var l in a)o.push({code:l,value:a[l]});if(o&&0!=o.length){var s=e.pieChartRadius(),u=e.pieChartInnerRadius(),c=i.append("svg").attr("viewBox",[-s,-s,2*s,2*s]).attr("width",2*s),f=Mf().sort(null).value((function(t){return t.value}));c.append("g").attr("stroke","darkgray").selectAll("path").data(f(o)).join("path").attr("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("d",yf().innerRadius(u).outerRadius(s))}else i.append("div").html(e.noDataText())},e}(e):"pie"==t?Xh(e):"spark"==t?Zh(e):(console.log("Unexpected map type: "+t),uh(e,!0))},Kh=function(t){(t=t||{}).shape=t.shape||"circle";var e=t.patternSize||5,n=t.minSize||1,r=t.maxSize||5.5;return t.bckColor=t.bckColor||"white",t.symbColor=t.symbColor||"black",function(i,o){i.selectAll(".estatmapPattern").remove();for(var a=0;a<o;a++){var l=n+(r-n)*a/(o-1),s=i.append("pattern").attr("class","estatmapPattern").attr("id","pattern_"+a).attr("x","0").attr("y","0").attr("width",e).attr("height",e).attr("patternUnits","userSpaceOnUse");s.append("rect").attr("x",0).attr("y",0).attr("width",e).attr("height",e).style("stroke","none").style("fill",t.bckColor),"square"==t.shape?s.append("rect").attr("x",0).attr("y",0).attr("width",l).attr("height",l).style("stroke","none").style("fill",t.symbColor):s.append("circle").attr("cx",.5*e).attr("cy",.5*e).attr("r",.5*l).style("stroke","none").style("fill",t.symbColor)}}}}})}));
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.eurostatmap=e():t.eurostatmap=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="build/",n(n.s=53)}({0:function(t,e,n){var r=n(54),i=n(55),o=n(56),a=n(57);t.exports=function(t){return r(t)||i(t)||o(t)||a()},t.exports.default=t.exports,t.exports.__esModule=!0},20:function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r},t.exports.default=t.exports,t.exports.__esModule=!0},21:function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t},t.exports.default=t.exports,t.exports.__esModule=!0},22:function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=n=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),n(e)}t.exports=n,t.exports.default=t.exports,t.exports.__esModule=!0},53:function(t,e,n){t.exports=n(58)},54:function(t,e,n){var r=n(20);t.exports=function(t){if(Array.isArray(t))return r(t)},t.exports.default=t.exports,t.exports.__esModule=!0},55:function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.default=t.exports,t.exports.__esModule=!0},56:function(t,e,n){var r=n(20);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}},t.exports.default=t.exports,t.exports.__esModule=!0},57:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.default=t.exports,t.exports.__esModule=!0},58:function(t,e,n){"use strict";n.r(e),n.d(e,"map",(function(){return $h})),n.d(e,"getFillPatternDefinitionFun",(function(){return Kh}));var r=n(0),i=n.n(r);function o(){}var a=function(t){return null==t?o:function(){return this.querySelector(t)}};function l(){return[]}var s=function(t){return null==t?l:function(){return this.querySelectorAll(t)}},u=function(t){return function(){return this.matches(t)}},c=function(t){return new Array(t.length)};function f(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}f.prototype={constructor:f,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function h(t,e,n,r,i,o){for(var a,l=0,s=e.length,u=o.length;l<u;++l)(a=e[l])?(a.__data__=o[l],r[l]=a):n[l]=new f(t,o[l]);for(;l<s;++l)(a=e[l])&&(i[l]=a)}function p(t,e,n,r,i,o,a){var l,s,u,c={},h=e.length,p=o.length,d=new Array(h);for(l=0;l<h;++l)(s=e[l])&&(d[l]=u="$"+a.call(s,s.__data__,l,e),u in c?i[l]=s:c[u]=s);for(l=0;l<p;++l)(s=c[u="$"+a.call(t,o[l],l,o)])?(r[l]=s,s.__data__=o[l],c[u]=null):n[l]=new f(t,o[l]);for(l=0;l<h;++l)(s=e[l])&&c[d[l]]===s&&(i[l]=s)}function d(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var g="http://www.w3.org/1999/xhtml",y={svg:"http://www.w3.org/2000/svg",xhtml:g,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},_=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),y.hasOwnProperty(e)?{space:y[e],local:t}:t};function v(t){return function(){this.removeAttribute(t)}}function m(t){return function(){this.removeAttributeNS(t.space,t.local)}}function x(t,e){return function(){this.setAttribute(t,e)}}function b(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function S(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function w(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var T=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function M(t){return function(){this.style.removeProperty(t)}}function k(t,e,n){return function(){this.style.setProperty(t,e,n)}}function z(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function F(t,e){return t.style.getPropertyValue(e)||T(t).getComputedStyle(t,null).getPropertyValue(e)}function C(t){return function(){delete this[t]}}function A(t,e){return function(){this[t]=e}}function E(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function L(t){return t.trim().split(/^|\s+/)}function N(t){return t.classList||new D(t)}function D(t){this._node=t,this._names=L(t.getAttribute("class")||"")}function P(t,e){for(var n=N(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function O(t,e){for(var n=N(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function R(t){return function(){P(this,t)}}function I(t){return function(){O(this,t)}}function W(t,e){return function(){(e.apply(this,arguments)?P:O)(this,t)}}D.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function U(){this.textContent=""}function j(t){return function(){this.textContent=t}}function H(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function B(){this.innerHTML=""}function G(t){return function(){this.innerHTML=t}}function Y(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function q(){this.nextSibling&&this.parentNode.appendChild(this)}function V(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function X(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===g&&e.documentElement.namespaceURI===g?e.createElement(t):e.createElementNS(n,t)}}function Z(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var $=function(t){var e=_(t);return(e.local?Z:X)(e)};function K(){return null}function J(){var t=this.parentNode;t&&t.removeChild(this)}function Q(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function tt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var et={},nt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(et={mouseenter:"mouseover",mouseleave:"mouseout"}));function rt(t,e,n){return t=it(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function it(t,e,n){return function(r){var i=nt;nt=r;try{t.call(this,this.__data__,e,n)}finally{nt=i}}}function ot(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function at(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function lt(t,e,n){var r=et.hasOwnProperty(t.type)?rt:it;return function(i,o,a){var l,s=this.__on,u=r(e,o,a);if(s)for(var c=0,f=s.length;c<f;++c)if((l=s[c]).type===t.type&&l.name===t.name)return this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=u,l.capture=n),void(l.value=e);this.addEventListener(t.type,u,n),l={type:t.type,name:t.name,value:e,listener:u,capture:n},s?s.push(l):this.__on=[l]}}function st(t,e,n,r){var i=nt;t.sourceEvent=nt,nt=t;try{return e.apply(n,r)}finally{nt=i}}function ut(t,e,n){var r=T(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ct(t,e){return function(){return ut(this,t,e)}}function ft(t,e){return function(){return ut(this,t,e.apply(this,arguments))}}var ht=[null];function pt(t,e){this._groups=t,this._parents=e}function dt(){return new pt([[document.documentElement]],ht)}pt.prototype=dt.prototype={constructor:pt,select:function(t){"function"!=typeof t&&(t=a(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,l,s=e[i],u=s.length,c=r[i]=new Array(u),f=0;f<u;++f)(o=s[f])&&(l=t.call(o,o.__data__,f,s))&&("__data__"in o&&(l.__data__=o.__data__),c[f]=l);return new pt(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=s(t));for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,l=e[o],u=l.length,c=0;c<u;++c)(a=l[c])&&(r.push(t.call(a,a.__data__,c,l)),i.push(a));return new pt(r,i)},filter:function(t){"function"!=typeof t&&(t=u(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],l=a.length,s=r[i]=[],c=0;c<l;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&s.push(o);return new pt(r,this._parents)},data:function(t,e){if(!t)return y=new Array(this.size()),c=-1,this.each((function(t){y[++c]=t})),y;var n,r=e?p:h,i=this._parents,o=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=o.length,l=new Array(a),s=new Array(a),u=new Array(a),c=0;c<a;++c){var f=i[c],d=o[c],g=d.length,y=t.call(f,f&&f.__data__,c,i),_=y.length,v=s[c]=new Array(_),m=l[c]=new Array(_);r(f,d,v,m,u[c]=new Array(g),y,e);for(var x,b,S=0,w=0;S<_;++S)if(x=v[S]){for(S>=w&&(w=S+1);!(b=m[w])&&++w<_;);x._next=b||null}}return(l=new pt(l,i))._enter=s,l._exit=u,l},enter:function(){return new pt(this._enter||this._groups.map(c),this._parents)},exit:function(){return new pt(this._exit||this._groups.map(c),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),l=0;l<o;++l)for(var s,u=e[l],c=n[l],f=u.length,h=a[l]=new Array(f),p=0;p<f;++p)(s=u[p]||c[p])&&(h[p]=s);for(;l<r;++l)a[l]=e[l];return new pt(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=d);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,l=n[o],s=l.length,u=i[o]=new Array(s),c=0;c<s;++c)(a=l[c])&&(u[c]=a);u.sort(e)}return new pt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,l=o.length;a<l;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=_(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?m:v:"function"==typeof e?n.local?w:S:n.local?b:x)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?M:"function"==typeof e?z:k)(t,e,null==n?"":n)):F(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?C:"function"==typeof e?E:A)(t,e)):this.node()[t]},classed:function(t,e){var n=L(t+"");if(arguments.length<2){for(var r=N(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?W:e?R:I)(n,e))},text:function(t){return arguments.length?this.each(null==t?U:("function"==typeof t?H:j)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?B:("function"==typeof t?Y:G)(t)):this.node().innerHTML},raise:function(){return this.each(q)},lower:function(){return this.each(V)},append:function(t){var e="function"==typeof t?t:$(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:$(t),r=null==e?K:"function"==typeof e?e:a(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(J)},clone:function(t){return this.select(t?tt:Q)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=ot(t+""),a=o.length;if(!(arguments.length<2)){for(l=e?lt:at,null==n&&(n=!1),r=0;r<a;++r)this.each(l(o[r],e,n));return this}var l=this.node().__on;if(l)for(var s,u=0,c=l.length;u<c;++u)for(r=0,s=l[u];r<a;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,e){return this.each(("function"==typeof e?ft:ct)(t,e))}};var gt=dt,yt=function(t){return"string"==typeof t?new pt([[document.querySelector(t)]],[document.documentElement]):new pt([[t]],ht)},_t=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},vt=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return _t(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}};var mt=vt(_t),xt=mt.right,bt=(mt.left,xt);var St=function(t){return null===t?NaN:+t},wt=function(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},Tt=Array.prototype,Mt=(Tt.slice,Tt.map,function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}),kt=Math.sqrt(50),zt=Math.sqrt(10),Ft=Math.sqrt(2),Ct=function(t,e,n){var r,i,o,a,l=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=At(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++l<i;)o[l]=(t+l)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++l<i;)o[l]=(t-l)/a;return r&&o.reverse(),o};function At(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=kt?10:o>=zt?5:o>=Ft?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=kt?10:o>=zt?5:o>=Ft?2:1)}function Et(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=kt?i*=10:o>=zt?i*=5:o>=Ft&&(i*=2),e<t?-i:i}var Lt=function(t,e,n){if(null==n&&(n=St),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}},Nt=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r},Dt=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n},Pt=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r};function Ot(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Rt(){}function It(t,e){var n=new Rt;if(t instanceof Rt)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}Rt.prototype=It.prototype={constructor:Rt,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Wt=It;function Ut(){}var jt=Wt.prototype;function Ht(t,e){var n=new Ut;if(t instanceof Ut)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}Ut.prototype=Ht.prototype={constructor:Ut,has:jt.has,add:function(t){return this["$"+(t+="")]=t,this},remove:jt.remove,clear:jt.clear,values:jt.keys,size:jt.size,empty:jt.empty,each:jt.each};var Bt=Array.prototype,Gt=Bt.map,Yt=Bt.slice,qt={name:"implicit"};function Vt(){var t=Wt(),e=[],n=[],r=qt;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==qt)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Wt();for(var r,o,a=-1,l=n.length;++a<l;)t.has(o=(r=n[a])+"")||t.set(o,e.push(r));return i},i.range=function(t){return arguments.length?(n=Yt.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Vt(e,n).unknown(r)},Ot.apply(i,arguments),i}var Xt=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Zt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function $t(){}var Kt="\\s*([+-]?\\d+)\\s*",Jt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",te=/^#([0-9a-f]{3,8})$/,ee=new RegExp("^rgb\\("+[Kt,Kt,Kt]+"\\)$"),ne=new RegExp("^rgb\\("+[Qt,Qt,Qt]+"\\)$"),re=new RegExp("^rgba\\("+[Kt,Kt,Kt,Jt]+"\\)$"),ie=new RegExp("^rgba\\("+[Qt,Qt,Qt,Jt]+"\\)$"),oe=new RegExp("^hsl\\("+[Jt,Qt,Qt]+"\\)$"),ae=new RegExp("^hsla\\("+[Jt,Qt,Qt,Jt]+"\\)$"),le={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function se(){return this.rgb().formatHex()}function ue(){return this.rgb().formatRgb()}function ce(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=te.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?fe(e):3===n?new ge(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?he(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?he(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ee.exec(t))?new ge(e[1],e[2],e[3],1):(e=ne.exec(t))?new ge(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=re.exec(t))?he(e[1],e[2],e[3],e[4]):(e=ie.exec(t))?he(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=oe.exec(t))?me(e[1],e[2]/100,e[3]/100,1):(e=ae.exec(t))?me(e[1],e[2]/100,e[3]/100,e[4]):le.hasOwnProperty(t)?fe(le[t]):"transparent"===t?new ge(NaN,NaN,NaN,0):null}function fe(t){return new ge(t>>16&255,t>>8&255,255&t,1)}function he(t,e,n,r){return r<=0&&(t=e=n=NaN),new ge(t,e,n,r)}function pe(t){return t instanceof $t||(t=ce(t)),t?new ge((t=t.rgb()).r,t.g,t.b,t.opacity):new ge}function de(t,e,n,r){return 1===arguments.length?pe(t):new ge(t,e,n,null==r?1:r)}function ge(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ye(){return"#"+ve(this.r)+ve(this.g)+ve(this.b)}function _e(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function ve(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function me(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new be(t,e,n,r)}function xe(t){if(t instanceof be)return new be(t.h,t.s,t.l,t.opacity);if(t instanceof $t||(t=ce(t)),!t)return new be;if(t instanceof be)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=e===o?(n-r)/l+6*(n<r):n===o?(r-e)/l+2:(e-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new be(a,l,s,t.opacity)}function be(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Se(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function we(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}Xt($t,ce,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:se,formatHex:se,formatHsl:function(){return xe(this).formatHsl()},formatRgb:ue,toString:ue}),Xt(ge,de,Zt($t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ge(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ge(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ye,formatHex:ye,formatRgb:_e,toString:_e})),Xt(be,(function(t,e,n,r){return 1===arguments.length?xe(t):new be(t,e,n,null==r?1:r)}),Zt($t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new be(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new be(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ge(Se(t>=240?t-240:t+120,i,r),Se(t,i,r),Se(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Te=function(t){return function(){return t}};function Me(t,e){return function(n){return t+n*e}}function ke(t){return 1==(t=+t)?ze:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Te(isNaN(e)?n:e)}}function ze(t,e){var n=e-t;return n?Me(t,n):Te(isNaN(t)?e:t)}var Fe=function t(e){var n=ke(e);function r(t,e){var r=n((t=de(t)).r,(e=de(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=ze(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function Ce(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),l=new Array(i);for(n=0;n<i;++n)r=de(e[n]),o[n]=r.r||0,a[n]=r.g||0,l[n]=r.b||0;return o=t(o),a=t(a),l=t(l),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=l(t),r+""}}}var Ae=Ce((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,l=r<e-1?t[r+2]:2*o-i;return we((n-r/e)*e,a,i,o,l)}})),Ee=(Ce((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],l=t[(r+2)%e];return we((n-r/e)*e,i,o,a,l)}})),function(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}});function Le(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Ne(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(n=0;n<i;++n)o[n]=Ue(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}var De=function(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}},Pe=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}},Oe=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Ue(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},Re=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ie=new RegExp(Re.source,"g");var We=function(t,e){var n,r,i,o=Re.lastIndex=Ie.lastIndex=0,a=-1,l=[],s=[];for(t+="",e+="";(n=Re.exec(t))&&(r=Ie.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),l[a]?l[a]+=i:l[++a]=i),(n=n[0])===(r=r[0])?l[a]?l[a]+=r:l[++a]=r:(l[++a]=null,s.push({i:a,x:Pe(n,r)})),o=Ie.lastIndex;return o<e.length&&(i=e.slice(o),l[a]?l[a]+=i:l[++a]=i),l.length<2?s[0]?function(t){return function(e){return t(e)+""}}(s[0].x):function(t){return function(){return t}}(e):(e=s.length,function(t){for(var n,r=0;r<e;++r)l[(n=s[r]).i]=n.x(t);return l.join("")})},Ue=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?Te(e):("number"===r?Pe:"string"===r?(n=ce(e))?(e=n,Fe):We:e instanceof ce?Fe:e instanceof Date?De:Le(e)?Ee:Array.isArray(e)?Ne:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Oe:Pe)(t,e)},je=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}},He=function(t){return+t},Be=[0,1];function Ge(t){return t}function Ye(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function qe(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Ve(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Ye(i,r),o=n(a,o)):(r=Ye(r,i),o=n(o,a)),function(t){return o(r(t))}}function Xe(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Ye(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=bt(t,e,1,r)-1;return o[n](i[n](e))}}function Ze(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function $e(){var t,e,n,r,i,o,a=Be,l=Be,s=Ue,u=Ge;function c(){return r=Math.min(a.length,l.length)>2?Xe:Ve,i=o=null,f}function f(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),l,s)))(t(u(e)))}return f.invert=function(n){return u(e((o||(o=r(l,a.map(t),Pe)))(n)))},f.domain=function(t){return arguments.length?(a=Gt.call(t,He),u===Ge||(u=qe(a)),c()):a.slice()},f.range=function(t){return arguments.length?(l=Yt.call(t),c()):l.slice()},f.rangeRound=function(t){return l=Yt.call(t),s=je,c()},f.clamp=function(t){return arguments.length?(u=t?qe(a):Ge,f):u!==Ge},f.interpolate=function(t){return arguments.length?(s=t,c()):s},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,c()}}function Ke(t,e){return $e()(t,e)}var Je=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Qe(t){if(!(e=Je.exec(t)))throw new Error("invalid format: "+t);var e;return new tn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function tn(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}Qe.prototype=tn.prototype,tn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};function en(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}var nn,rn,on,an,ln=function(t){return(t=en(Math.abs(t)))?t[1]:NaN},sn=function(t,e){var n=en(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},un={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return sn(100*t,e)},r:sn,s:function(t,e){var n=en(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(nn=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+en(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},cn=function(t){return t},fn=Array.prototype.map,hn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],pn=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?cn:(e=fn.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,l=e[0],s=0;i>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),o.push(t.substring(i-=l,i+l)),!((s+=l+1)>r));)l=e[a=(a+1)%e.length];return o.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",l=void 0===t.numerals?cn:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(fn.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=Qe(t)).fill,n=t.align,f=t.sign,h=t.symbol,p=t.zero,d=t.width,g=t.comma,y=t.precision,_=t.trim,v=t.type;"n"===v?(g=!0,v="g"):un[v]||(void 0===y&&(y=12),_=!0,v="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var m="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===h?o:/[%p]/.test(v)?s:"",b=un[v],S=/[defgprs%]/.test(v);function w(t){var i,o,s,h=m,w=x;if("c"===v)w=b(t)+w,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:b(Math.abs(t),y),_&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==f&&(T=!1),h=(T?"("===f?f:u:"-"===f||"("===f?"":f)+h,w=("s"===v?hn[8+nn/3]:"")+w+(T&&"("===f?")":""),S)for(i=-1,o=t.length;++i<o;)if(48>(s=t.charCodeAt(i))||s>57){w=(46===s?a+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}g&&!p&&(t=r(t,1/0));var M=h.length+t.length+w.length,k=M<d?new Array(d-M+1).join(e):"";switch(g&&p&&(t=r(k+t,k.length?d-w.length:1/0),k=""),n){case"<":t=h+t+w+k;break;case"=":t=h+k+t+w;break;case"^":t=k.slice(0,M=k.length>>1)+h+t+w+k.slice(M);break;default:t=k+h+t+w}return l(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),w.toString=function(){return t+""},w}return{format:f,formatPrefix:function(t,e){var n=f(((t=Qe(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(ln(e)/3))),i=Math.pow(10,-r),o=hn[8+r/3];return function(t){return n(i*t)+o}}}};function dn(t){return rn=pn(t),on=rn.format,an=rn.formatPrefix,rn}dn({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var gn=function(t,e,n,r){var i,o=Et(t,e,n);switch((r=Qe(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ln(e)/3)))-ln(Math.abs(t)))}(o,a))||(r.precision=i),an(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ln(e)-ln(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-ln(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return on(r)};function yn(t){var e=t.domain;return t.ticks=function(t){var n=e();return Ct(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return gn(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,l=i[o],s=i[a];return s<l&&(r=l,l=s,s=r,r=o,o=a,a=r),(r=At(l,s,n))>0?r=At(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=At(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[o]=Math.floor(l/r)*r,i[a]=Math.ceil(s/r)*r,e(i)):r<0&&(i[o]=Math.ceil(l*r)/r,i[a]=Math.floor(s*r)/r,e(i)),t},t}function _n(){var t=Ke(Ge,Ge);return t.copy=function(){return Ze(t,_n())},Ot.apply(t,arguments),yn(t)}var vn=function(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t};function mn(t){return Math.log(t)}function xn(t){return Math.exp(t)}function bn(t){return-Math.log(-t)}function Sn(t){return-Math.exp(-t)}function wn(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Tn(t){return function(e){return-t(-e)}}function Mn(t){var e,n,r=t(mn,xn),i=r.domain,o=10;function a(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(o),n=function(t){return 10===t?wn:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=Tn(e),n=Tn(n),t(bn,Sn)):t(mn,xn),r}return r.base=function(t){return arguments.length?(o=+t,a()):o},r.domain=function(t){return arguments.length?(i(t),a()):i()},r.ticks=function(t){var r,a=i(),l=a[0],s=a[a.length-1];(r=s<l)&&(h=l,l=s,s=h);var u,c,f,h=e(l),p=e(s),d=null==t?10:+t,g=[];if(!(o%1)&&p-h<d){if(h=Math.round(h)-1,p=Math.round(p)+1,l>0){for(;h<p;++h)for(c=1,u=n(h);c<o;++c)if(!((f=u*c)<l)){if(f>s)break;g.push(f)}}else for(;h<p;++h)for(c=o-1,u=n(h);c>=1;--c)if(!((f=u*c)<l)){if(f>s)break;g.push(f)}}else g=Ct(h,p,Math.min(p-h,d)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=on(i)),t===1/0)return i;null==t&&(t=10);var a=Math.max(1,o*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*o<o-.5&&(r*=o),r<=a?i(t):""}},r.nice=function(){return i(vn(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function kn(){var t=Mn($e()).domain([1,10]);return t.copy=function(){return Ze(t,kn()).base(t.base())},Ot.apply(t,arguments),t}function zn(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Fn(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Cn(t){return t<0?-t*t:t*t}function An(t){var e=t(Ge,Ge),n=1;function r(){return 1===n?t(Ge,Ge):.5===n?t(Fn,Cn):t(zn(n),zn(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},yn(e)}function En(){var t=An($e());return t.copy=function(){return Ze(t,En()).exponent(t.exponent())},Ot.apply(t,arguments),t}function Ln(){return En.apply(null,arguments).exponent(.5)}function Nn(){var t,e=[],n=[],r=[];function i(){var t=0,i=Math.max(1,n.length);for(r=new Array(i-1);++t<i;)r[t-1]=Lt(e,t/i);return o}function o(e){return isNaN(e=+e)?t:n[bt(r,e)]}return o.invertExtent=function(t){var i=n.indexOf(t);return i<0?[NaN,NaN]:[i>0?r[i-1]:e[0],i<r.length?r[i]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,r=0,o=t.length;r<o;++r)null==(n=t[r])||isNaN(n=+n)||e.push(n);return e.sort(_t),i()},o.range=function(t){return arguments.length?(n=Yt.call(t),i()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return r.slice()},o.copy=function(){return Nn().domain(e).range(n).unknown(t)},Ot.apply(o,arguments)}function Dn(){var t,e=0,n=1,r=1,i=[.5],o=[0,1];function a(e){return e<=e?o[bt(i,e,0,r)]:t}function l(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return a}return a.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],l()):[e,n]},a.range=function(t){return arguments.length?(r=(o=Yt.call(t)).length-1,l()):o.slice()},a.invertExtent=function(t){var a=o.indexOf(t);return a<0?[NaN,NaN]:a<1?[e,i[0]]:a>=r?[i[r-1],n]:[i[a-1],i[a]]},a.unknown=function(e){return arguments.length?(t=e,a):a},a.thresholds=function(){return i.slice()},a.copy=function(){return Dn().domain([e,n]).range(o).unknown(t)},Ot.apply(yn(a),arguments)}function Pn(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[bt(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=Yt.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=Yt.call(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Pn().domain(e).range(n).unknown(t)},Ot.apply(i,arguments)}var On=new Date,Rn=new Date;function In(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var a,l=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r&&o>0))return l;do{l.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<r);return l},i.filter=function(n){return In((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return On.setTime(+e),Rn.setTime(+r),t(On),t(Rn),Math.floor(n(On,Rn))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Wn=In((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Wn.every=function(t){return isFinite(t=Math.floor(t))&&t>0?In((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var Un=Wn,jn=(Wn.range,In((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})));jn.range;function Hn(t){return In((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var Bn=Hn(0),Gn=Hn(1),Yn=Hn(2),qn=Hn(3),Vn=Hn(4),Xn=Hn(5),Zn=Hn(6),$n=(Bn.range,Gn.range,Yn.range,qn.range,Vn.range,Xn.range,Zn.range,In((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}))),Kn=$n,Jn=($n.range,In((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()}))),Qn=(Jn.range,In((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()}))),tr=(Qn.range,In((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()}))),er=(tr.range,In((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t})));er.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?In((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):er:null};er.range;function nr(t){return In((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var rr=nr(0),ir=nr(1),or=nr(2),ar=nr(3),lr=nr(4),sr=nr(5),ur=nr(6),cr=(rr.range,ir.range,or.range,ar.range,lr.range,sr.range,ur.range,In((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1}))),fr=cr,hr=(cr.range,In((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));hr.every=function(t){return isFinite(t=Math.floor(t))&&t>0?In((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var pr=hr;hr.range;function dr(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function gr(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function yr(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var _r,vr={"-":"",_:" ",0:"0"},mr=/^\s*\d+/,xr=/^%/,br=/[\\^$*+?|[\]().{}]/g;function Sr(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function wr(t){return t.replace(br,"\\$&")}function Tr(t){return new RegExp("^(?:"+t.map(wr).join("|")+")","i")}function Mr(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function kr(t,e,n){var r=mr.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=mr.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Cr(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Er(t,e,n){var r=mr.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Lr(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Nr(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Dr(t,e,n){var r=mr.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Pr(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Or(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=mr.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Ir(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Ur(t,e,n){var r=mr.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function jr(t,e,n){var r=mr.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Hr(t,e,n){var r=mr.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Br(t,e,n){var r=xr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Gr(t,e,n){var r=mr.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Yr(t,e,n){var r=mr.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function qr(t,e){return Sr(t.getDate(),e,2)}function Vr(t,e){return Sr(t.getHours(),e,2)}function Xr(t,e){return Sr(t.getHours()%12||12,e,2)}function Zr(t,e){return Sr(1+Kn.count(Un(t),t),e,3)}function $r(t,e){return Sr(t.getMilliseconds(),e,3)}function Kr(t,e){return $r(t,e)+"000"}function Jr(t,e){return Sr(t.getMonth()+1,e,2)}function Qr(t,e){return Sr(t.getMinutes(),e,2)}function ti(t,e){return Sr(t.getSeconds(),e,2)}function ei(t){var e=t.getDay();return 0===e?7:e}function ni(t,e){return Sr(Bn.count(Un(t)-1,t),e,2)}function ri(t){var e=t.getDay();return e>=4||0===e?Vn(t):Vn.ceil(t)}function ii(t,e){return t=ri(t),Sr(Vn.count(Un(t),t)+(4===Un(t).getDay()),e,2)}function oi(t){return t.getDay()}function ai(t,e){return Sr(Gn.count(Un(t)-1,t),e,2)}function li(t,e){return Sr(t.getFullYear()%100,e,2)}function si(t,e){return Sr((t=ri(t)).getFullYear()%100,e,2)}function ui(t,e){return Sr(t.getFullYear()%1e4,e,4)}function ci(t,e){var n=t.getDay();return Sr((t=n>=4||0===n?Vn(t):Vn.ceil(t)).getFullYear()%1e4,e,4)}function fi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Sr(e/60|0,"0",2)+Sr(e%60,"0",2)}function hi(t,e){return Sr(t.getUTCDate(),e,2)}function pi(t,e){return Sr(t.getUTCHours(),e,2)}function di(t,e){return Sr(t.getUTCHours()%12||12,e,2)}function gi(t,e){return Sr(1+fr.count(pr(t),t),e,3)}function yi(t,e){return Sr(t.getUTCMilliseconds(),e,3)}function _i(t,e){return yi(t,e)+"000"}function vi(t,e){return Sr(t.getUTCMonth()+1,e,2)}function mi(t,e){return Sr(t.getUTCMinutes(),e,2)}function xi(t,e){return Sr(t.getUTCSeconds(),e,2)}function bi(t){var e=t.getUTCDay();return 0===e?7:e}function Si(t,e){return Sr(rr.count(pr(t)-1,t),e,2)}function wi(t){var e=t.getUTCDay();return e>=4||0===e?lr(t):lr.ceil(t)}function Ti(t,e){return t=wi(t),Sr(lr.count(pr(t),t)+(4===pr(t).getUTCDay()),e,2)}function Mi(t){return t.getUTCDay()}function ki(t,e){return Sr(ir.count(pr(t)-1,t),e,2)}function zi(t,e){return Sr(t.getUTCFullYear()%100,e,2)}function Fi(t,e){return Sr((t=wi(t)).getUTCFullYear()%100,e,2)}function Ci(t,e){return Sr(t.getUTCFullYear()%1e4,e,4)}function Ai(t,e){var n=t.getUTCDay();return Sr((t=n>=4||0===n?lr(t):lr.ceil(t)).getUTCFullYear()%1e4,e,4)}function Ei(){return"+0000"}function Li(){return"%"}function Ni(t){return+t}function Di(t){return Math.floor(+t/1e3)}_r=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,l=t.months,s=t.shortMonths,u=Tr(i),c=Mr(i),f=Tr(o),h=Mr(o),p=Tr(a),d=Mr(a),g=Tr(l),y=Mr(l),_=Tr(s),v=Mr(s),m={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return s[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:null,d:qr,e:qr,f:Kr,g:si,G:ci,H:Vr,I:Xr,j:Zr,L:$r,m:Jr,M:Qr,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Ni,s:Di,S:ti,u:ei,U:ni,V:ii,w:oi,W:ai,x:null,X:null,y:li,Y:ui,Z:fi,"%":Li},x={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return l[t.getUTCMonth()]},c:null,d:hi,e:hi,f:_i,g:Fi,G:Ai,H:pi,I:di,j:gi,L:yi,m:vi,M:mi,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Ni,s:Di,S:xi,u:bi,U:Si,V:Ti,w:Mi,W:ki,x:null,X:null,y:zi,Y:Ci,Z:Ei,"%":Li},b={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=d[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=_.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:Or,e:Or,f:Hr,g:Lr,G:Er,H:Ir,I:Ir,j:Rr,L:jr,m:Pr,M:Wr,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:Dr,Q:Gr,s:Yr,S:Ur,u:zr,U:Fr,V:Cr,w:kr,W:Ar,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:Lr,Y:Er,Z:Nr,"%":Br};function S(t,e){return function(n){var r,i,o,a=[],l=-1,s=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++l<u;)37===t.charCodeAt(l)&&(a.push(t.slice(s,l)),null!=(i=vr[r=t.charAt(++l)])?r=t.charAt(++l):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),s=l+1);return a.push(t.slice(s,l)),a.join("")}}function w(t,e){return function(n){var r,i,o=yr(1900,void 0,1);if(T(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(e&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=gr(yr(o.y,0,1))).getUTCDay(),r=i>4||0===i?ir.ceil(r):ir(r),r=fr.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=dr(yr(o.y,0,1))).getDay(),r=i>4||0===i?Gn.ceil(r):Gn(r),r=Kn.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?gr(yr(o.y,0,1)).getUTCDay():dr(yr(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,gr(o)):dr(o)}}function T(t,e,n,r){for(var i,o,a=0,l=e.length,s=n.length;a<l;){if(r>=s)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=b[i in vr?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return m.x=S(n,m),m.X=S(r,m),m.c=S(e,m),x.x=S(n,x),x.X=S(r,x),x.c=S(e,x),{format:function(t){var e=S(t+="",m);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=S(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),_r.format,_r.parse,_r.utcFormat,_r.utcParse;var Pi=In((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),Oi=(Pi.range,In((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()}))),Ri=(Oi.range,In((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})));Ri.range;var Ii=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n},Wi=function(t){return Ae(t[t.length-1])},Ui=Wi(new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Ii)),ji={b:"break in time series",c:"confidential",d:"definition differs, see metadata",e:"estimated",f:"forecast",n:"not significant",p:"provisional",r:"revised",s:"Eurostat estimate",u:"low reliability",z:"not applicable"};var Hi=n(21),Bi=n.n(Hi),Gi=n(22),Yi=n.n(Gi);function qi(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}var Vi=function(t,e){return fetch(t,e).then(qi)},Xi={value:function(){}};function Zi(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new $i(r)}function $i(t){this._=t}function Ki(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Ji(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Qi(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Xi,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}$i.prototype=Zi.prototype={constructor:$i,on:function(t,e){var n,r=this._,i=Ki(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=Qi(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Qi(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=Ji(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new $i(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var to=Zi;var eo=function(){nt.preventDefault(),nt.stopImmediatePropagation()},no=function(t){var e=t.document.documentElement,n=yt(t).on("dragstart.drag",eo,!0);"onselectstart"in e?n.on("selectstart.drag",eo,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function ro(t,e){var n=t.document.documentElement,r=yt(t).on("dragstart.drag",null);e&&(r.on("click.drag",eo,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var io=Math.SQRT2;function oo(t){return((t=Math.exp(t))+1/t)/2}var ao,lo,so=function(t,e){var n,r,i=t[0],o=t[1],a=t[2],l=e[0],s=e[1],u=e[2],c=l-i,f=s-o,h=c*c+f*f;if(h<1e-12)r=Math.log(u/a)/io,n=function(t){return[i+t*c,o+t*f,a*Math.exp(io*t*r)]};else{var p=Math.sqrt(h),d=(u*u-a*a+4*h)/(2*a*2*p),g=(u*u-a*a-4*h)/(2*u*2*p),y=Math.log(Math.sqrt(d*d+1)-d),_=Math.log(Math.sqrt(g*g+1)-g);r=(_-y)/io,n=function(t){var e,n=t*r,l=oo(y),s=a/(2*p)*(l*(e=io*n+y,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+s*c,o+s*f,a*l/oo(io*n+y)]}}return n.duration=1e3*r,n},uo=function(){for(var t,e=nt;t=e.sourceEvent;)e=t;return e},co=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]},fo=function(t){var e=uo();return e.changedTouches&&(e=e.changedTouches[0]),co(t,e)},ho=function(t,e,n){arguments.length<3&&(n=e,e=uo().changedTouches);for(var r,i=0,o=e?e.length:0;i<o;++i)if((r=e[i]).identifier===n)return co(t,r);return null},po=0,go=0,yo=0,_o=0,vo=0,mo=0,xo="object"==typeof performance&&performance.now?performance:Date,bo="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function So(){return vo||(bo(wo),vo=xo.now()+mo)}function wo(){vo=0}function To(){this._call=this._time=this._next=null}function Mo(t,e,n){var r=new To;return r.restart(t,e,n),r}function ko(){vo=(_o=xo.now())+mo,po=go=0;try{!function(){So(),++po;for(var t,e=ao;e;)(t=vo-e._time)>=0&&e._call.call(null,t),e=e._next;--po}()}finally{po=0,function(){var t,e,n=ao,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:ao=e);lo=t,Fo(r)}(),vo=0}}function zo(){var t=xo.now(),e=t-_o;e>1e3&&(mo-=e,_o=t)}function Fo(t){po||(go&&(go=clearTimeout(go)),t-vo>24?(t<1/0&&(go=setTimeout(ko,t-xo.now()-mo)),yo&&(yo=clearInterval(yo))):(yo||(_o=xo.now(),yo=setInterval(zo,1e3)),po=1,bo(ko)))}To.prototype=Mo.prototype={constructor:To,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?So():+n)+(null==e?0:+e),this._next||lo===this||(lo?lo._next=this:ao=this,lo=this),this._call=t,this._time=n,Fo()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fo())}};var Co=function(t,e,n){var r=new To;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},Ao=to("start","end","cancel","interrupt"),Eo=[],Lo=function(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(s){var u,c,f,h;if(1!==n.state)return l();for(u in i)if((h=i[u]).name===n.name){if(3===h.state)return Co(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[u]):+u<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[u])}if(Co((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(s))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(f=n.tween.length),u=0,c=-1;u<f;++u)(h=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Mo((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Ao,tween:Eo,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})};function No(t,e){var n=Po(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Do(t,e){var n=Po(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Po(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var Oo,Ro,Io,Wo,Uo=function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}},jo=180/Math.PI,Ho={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Bo=function(t,e,n,r,i,o){var a,l,s;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,s/=l),t*r<e*n&&(t=-t,e=-e,s=-s,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*jo,skewX:Math.atan(s)*jo,scaleX:a,scaleY:l}};function Go(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var l=[],s=[];return o=t(o),a=t(a),function(t,r,i,o,a,l){if(t!==i||r!==o){var s=a.push("translate(",null,e,null,n);l.push({i:s-4,x:Pe(t,i)},{i:s-2,x:Pe(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,l,s),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Pe(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,l,s),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Pe(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,l,s),function(t,e,n,r,o,a){if(t!==n||e!==r){var l=o.push(i(o)+"scale(",null,",",null,")");a.push({i:l-4,x:Pe(t,n)},{i:l-2,x:Pe(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,l,s),o=a=null,function(t){for(var e,n=-1,r=s.length;++n<r;)l[(e=s[n]).i]=e.x(t);return l.join("")}}}var Yo=Go((function(t){return"none"===t?Ho:(Oo||(Oo=document.createElement("DIV"),Ro=document.documentElement,Io=document.defaultView),Oo.style.transform=t,t=Io.getComputedStyle(Ro.appendChild(Oo),null).getPropertyValue("transform"),Ro.removeChild(Oo),t=t.slice(7,-1).split(","),Bo(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),qo=Go((function(t){return null==t?Ho:(Wo||(Wo=document.createElementNS("http://www.w3.org/2000/svg","g")),Wo.setAttribute("transform",t),(t=Wo.transform.baseVal.consolidate())?(t=t.matrix,Bo(t.a,t.b,t.c,t.d,t.e,t.f)):Ho)}),", ",")",")");function Vo(t,e){var n,r;return function(){var i=Do(this,t),o=i.tween;if(o!==n)for(var a=0,l=(r=n=o).length;a<l;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function Xo(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Do(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var l={name:e,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===e){i[s]=l;break}s===u&&i.push(l)}o.tween=i}}function Zo(t,e,n){var r=t._id;return t.each((function(){var t=Do(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Po(t,r).value[e]}}var $o=function(t,e){var n;return("number"==typeof e?Pe:e instanceof ce?Fe:(n=ce(e))?(e=n,Fe):We)(t,e)};function Ko(t){return function(){this.removeAttribute(t)}}function Jo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Qo(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function ta(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function ea(t,e,n){var r,i,o;return function(){var a,l,s=n(this);if(null!=s)return(a=this.getAttribute(t))===(l=s+"")?null:a===r&&l===i?o:(i=l,o=e(r=a,s));this.removeAttribute(t)}}function na(t,e,n){var r,i,o;return function(){var a,l,s=n(this);if(null!=s)return(a=this.getAttributeNS(t.space,t.local))===(l=s+"")?null:a===r&&l===i?o:(i=l,o=e(r=a,s));this.removeAttributeNS(t.space,t.local)}}function ra(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function ia(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function oa(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&ia(t,i)),n}return i._value=e,i}function aa(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&ra(t,i)),n}return i._value=e,i}function la(t,e){return function(){No(this,t).delay=+e.apply(this,arguments)}}function sa(t,e){return e=+e,function(){No(this,t).delay=e}}function ua(t,e){return function(){Do(this,t).duration=+e.apply(this,arguments)}}function ca(t,e){return e=+e,function(){Do(this,t).duration=e}}function fa(t,e){if("function"!=typeof e)throw new Error;return function(){Do(this,t).ease=e}}function ha(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?No:Do;return function(){var a=o(this,t),l=a.on;l!==r&&(i=(r=l).copy()).on(e,n),a.on=i}}var pa=gt.prototype.constructor;function da(t){return function(){this.style.removeProperty(t)}}function ga(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ya(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&ga(t,o,n)),r}return o._value=e,o}function _a(t){return function(e){this.textContent=t.call(this,e)}}function va(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&_a(r)),e}return r._value=t,r}var ma=0;function xa(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ba(){return++ma}var Sa=gt.prototype;xa.prototype=function(t){return gt().transition(t)}.prototype={constructor:xa,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=a(t));for(var r=this._groups,i=r.length,o=new Array(i),l=0;l<i;++l)for(var s,u,c=r[l],f=c.length,h=o[l]=new Array(f),p=0;p<f;++p)(s=c[p])&&(u=t.call(s,s.__data__,p,c))&&("__data__"in s&&(u.__data__=s.__data__),h[p]=u,Lo(h[p],e,n,p,h,Po(s,n)));return new xa(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=s(t));for(var r=this._groups,i=r.length,o=[],a=[],l=0;l<i;++l)for(var u,c=r[l],f=c.length,h=0;h<f;++h)if(u=c[h]){for(var p,d=t.call(u,u.__data__,h,c),g=Po(u,n),y=0,_=d.length;y<_;++y)(p=d[y])&&Lo(p,e,n,y,d,g);o.push(d),a.push(u)}return new xa(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=u(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],l=a.length,s=r[i]=[],c=0;c<l;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&s.push(o);return new xa(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),l=0;l<o;++l)for(var s,u=e[l],c=n[l],f=u.length,h=a[l]=new Array(f),p=0;p<f;++p)(s=u[p]||c[p])&&(h[p]=s);for(;l<r;++l)a[l]=e[l];return new xa(a,this._parents,this._name,this._id)},selection:function(){return new pa(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=ba(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,l=r[o],s=l.length,u=0;u<s;++u)if(a=l[u]){var c=Po(a,e);Lo(a,t,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new xa(r,this._parents,t,n)},call:Sa.call,nodes:Sa.nodes,node:Sa.node,size:Sa.size,empty:Sa.empty,each:Sa.each,on:function(t,e){var n=this._id;return arguments.length<2?Po(this.node(),n).on.on(t):this.each(ha(n,t,e))},attr:function(t,e){var n=_(t),r="transform"===n?qo:$o;return this.attrTween(t,"function"==typeof e?(n.local?na:ea)(n,r,Zo(this,"attr."+t,e)):null==e?(n.local?Jo:Ko)(n):(n.local?ta:Qo)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=_(t);return this.tween(n,(r.local?oa:aa)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Yo:$o;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=F(this,t),a=(this.style.removeProperty(t),F(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,da(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=F(this,t),l=n(this),s=l+"";return null==l&&(this.style.removeProperty(t),s=l=F(this,t)),a===s?null:a===r&&s===i?o:(i=s,o=e(r=a,l))}}(t,r,Zo(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,l="end."+a;return function(){var s=Do(this,t),u=s.on,c=null==s.value[a]?o||(o=da(e)):void 0;u===n&&i===c||(r=(n=u).copy()).on(l,i=c),s.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=F(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,ya(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Zo(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,va(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Po(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?Vo:Xo)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?la:sa)(e,t)):Po(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ua:ca)(e,t)):Po(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(fa(e,t)):Po(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var l={value:a},s={value:function(){0==--i&&o()}};n.each((function(){var n=Do(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(l),e._.interrupt.push(l),e._.end.push(s)),n.on=e}))}))}};var wa={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Ta(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return wa.time=So(),wa;return n}gt.prototype.interrupt=function(t){return this.each((function(){Uo(this,t)}))},gt.prototype.transition=function(t){var e,n;t instanceof xa?(e=t._id,t=t._name):(e=ba(),(n=wa).time=So(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,l=r[o],s=l.length,u=0;u<s;++u)(a=l[u])&&Lo(a,t,e,u,l,n||Ta(a,e));return new xa(r,this._parents,t,e)};var Ma=function(t){return function(){return t}};function ka(t,e,n){this.target=t,this.type=e,this.transform=n}function za(t,e,n){this.k=t,this.x=e,this.y=n}za.prototype={constructor:za,scale:function(t){return 1===t?this:new za(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new za(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Fa=new za(1,0,0);function Ca(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Fa;return t.__zoom}function Aa(){nt.stopImmediatePropagation()}Ca.prototype=za.prototype;var Ea=function(){nt.preventDefault(),nt.stopImmediatePropagation()};function La(){return!nt.ctrlKey&&!nt.button}function Na(){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 Da(){return this.__zoom||Fa}function Pa(){return-nt.deltaY*(1===nt.deltaMode?.05:nt.deltaMode?1:.002)}function Oa(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ra(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}var Ia=function(t){return"string"==typeof t?new pt([document.querySelectorAll(t)],[document.documentElement]):new pt([null==t?[]:t],ht)},Wa=1e-6,Ua=Math.PI,ja=Ua/2,Ha=Ua/4,Ba=2*Ua,Ga=180/Ua,Ya=Ua/180,qa=Math.abs,Va=Math.atan,Xa=Math.atan2,Za=Math.cos,$a=Math.ceil,Ka=(Math.exp,Math.floor,Math.log,Math.pow,Math.sin),Ja=Math.sign||function(t){return t>0?1:t<0?-1:0},Qa=Math.sqrt;Math.tan;function tl(t){return t>1?ja:t<-1?-ja:Math.asin(t)}function el(){}var nl=function(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:el,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},rl=function(t,e){return qa(t[0]-e[0])<Wa&&qa(t[1]-e[1])<Wa};function il(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var ol=function(t,e,n,r,i){var o,a,l=[],s=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(rl(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);return void i.lineEnd()}a[0]+=2*Wa}l.push(n=new il(r,t,null,!0)),s.push(n.o=new il(r,null,n,!1)),l.push(n=new il(a,t,null,!1)),s.push(n.o=new il(a,null,n,!0))}})),l.length){for(s.sort(e),al(l),al(s),o=0,a=s.length;o<a;++o)s[o].e=n=!n;for(var u,c,f=l[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,a=u.length;o<a;++o)i.point((c=u[o])[0],c[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(u=h.p.z,o=u.length-1;o>=0;--o)i.point((c=u[o])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}u=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}};function al(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function ll(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,l,u){var c=0,f=0;if(null==i||(c=a(i,l))!==(f=a(o,l))||s(i,o)<0^l>0)do{u.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+l+4)%4)!==f);else u.point(o[0],o[1])}function a(r,i){return qa(r[0]-t)<Wa?i>0?0:3:qa(r[0]-n)<Wa?i>0?2:1:qa(r[1]-e)<Wa?i>0?1:0:i>0?3:2}function l(t,e){return s(t.x,e.x)}function s(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var s,u,c,f,h,p,d,g,y,_,v,m=a,x=nl(),b={point:S,lineStart:function(){b.point=w,u&&u.push(c=[]);_=!0,y=!1,d=g=NaN},lineEnd:function(){s&&(w(f,h),p&&y&&x.rejoin(),s.push(x.result()));b.point=S,y&&m.lineEnd()},polygonStart:function(){m=x,s=[],u=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var o,a,l=u[n],s=1,c=l.length,f=l[0],h=f[0],p=f[1];s<c;++s)o=h,a=p,f=l[s],h=f[0],p=f[1],a<=r?p>r&&(h-o)*(r-a)>(p-a)*(t-o)&&++e:p<=r&&(h-o)*(r-a)<(p-a)*(t-o)&&--e;return e}(),n=v&&e,i=(s=Dt(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&ol(s,l,e,o,a),a.polygonEnd());m=a,s=u=c=null}};function S(t,e){i(t,e)&&m.point(t,e)}function w(o,a){var l=i(o,a);if(u&&c.push([o,a]),_)f=o,h=a,p=l,_=!1,l&&(m.lineStart(),m.point(o,a));else if(l&&y)m.point(o,a);else{var s=[d=Math.max(-1e9,Math.min(1e9,d)),g=Math.max(-1e9,Math.min(1e9,g))],x=[o=Math.max(-1e9,Math.min(1e9,o)),a=Math.max(-1e9,Math.min(1e9,a))];!function(t,e,n,r,i,o){var a,l=t[0],s=t[1],u=0,c=1,f=e[0]-l,h=e[1]-s;if(a=n-l,f||!(a>0)){if(a/=f,f<0){if(a<u)return;a<c&&(c=a)}else if(f>0){if(a>c)return;a>u&&(u=a)}if(a=i-l,f||!(a<0)){if(a/=f,f<0){if(a>c)return;a>u&&(u=a)}else if(f>0){if(a<u)return;a<c&&(c=a)}if(a=r-s,h||!(a>0)){if(a/=h,h<0){if(a<u)return;a<c&&(c=a)}else if(h>0){if(a>c)return;a>u&&(u=a)}if(a=o-s,h||!(a<0)){if(a/=h,h<0){if(a>c)return;a>u&&(u=a)}else if(h>0){if(a<u)return;a<c&&(c=a)}return u>0&&(t[0]=l+u*f,t[1]=s+u*h),c<1&&(e[0]=l+c*f,e[1]=s+c*h),!0}}}}}(s,x,t,e,n,r)?l&&(m.lineStart(),m.point(o,a),v=!1):(y||(m.lineStart(),m.point(s[0],s[1])),m.point(x[0],x[1]),l||m.lineEnd(),v=!1)}d=o,g=a,y=l}return b}}var sl=function(t){return t};function ul(t){return function(e){var n=new cl;for(var r in t)n[r]=t[r];return n.stream=e,n}}function cl(){}function fl(t,e){t&&pl.hasOwnProperty(t.type)&&pl[t.type](t,e)}cl.prototype={constructor:cl,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var hl={Feature:function(t,e){fl(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)fl(n[r].geometry,e)}},pl={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){dl(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)dl(n[r],e,0)},Polygon:function(t,e){gl(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)gl(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)fl(n[r],e)}};function dl(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function gl(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)dl(t[n],e,1);e.polygonEnd()}var yl=function(t,e){t&&hl.hasOwnProperty(t.type)?hl[t.type](t,e):fl(t,e)},_l=1/0,vl=_l,ml=-_l,xl=ml;var bl={point:function(t,e){t<_l&&(_l=t);t>ml&&(ml=t);e<vl&&(vl=e);e>xl&&(xl=e)},lineStart:el,lineEnd:el,polygonStart:el,polygonEnd:el,result:function(){var t=[[_l,vl],[ml,xl]];return ml=xl=-(vl=_l=1/0),t}};function Sl(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),yl(n,t.stream(bl)),e(bl.result()),null!=r&&t.clipExtent(r),t}function wl(t,e,n){return Sl(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,l])}),n)}function Tl(t,e,n){return wl(t,[[0,0],e],n)}function Ml(t,e,n){return Sl(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}function kl(t,e,n){return Sl(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}var zl=function(){return new Fl};function Fl(){this.reset()}Fl.prototype={constructor:Fl,reset:function(){this.s=this.t=0},add:function(t){Al(Cl,t,this.t),Al(this,Cl.s,this.s),this.s?this.t+=Cl.t:this.s=Cl.t},valueOf:function(){return this.s}};var Cl=new Fl;function Al(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var El,Ll,Nl,Dl,Pl=zl(),Ol=zl(),Rl={point:el,lineStart:el,lineEnd:el,polygonStart:function(){Rl.lineStart=Il,Rl.lineEnd=jl},polygonEnd:function(){Rl.lineStart=Rl.lineEnd=Rl.point=el,Pl.add(qa(Ol)),Ol.reset()},result:function(){var t=Pl/2;return Pl.reset(),t}};function Il(){Rl.point=Wl}function Wl(t,e){Rl.point=Ul,El=Nl=t,Ll=Dl=e}function Ul(t,e){Ol.add(Dl*t-Nl*e),Nl=t,Dl=e}function jl(){Ul(El,Ll)}var Hl,Bl,Gl,Yl,ql=Rl,Vl=0,Xl=0,Zl=0,$l=0,Kl=0,Jl=0,Ql=0,ts=0,es=0,ns={point:rs,lineStart:is,lineEnd:ls,polygonStart:function(){ns.lineStart=ss,ns.lineEnd=us},polygonEnd:function(){ns.point=rs,ns.lineStart=is,ns.lineEnd=ls},result:function(){var t=es?[Ql/es,ts/es]:Jl?[$l/Jl,Kl/Jl]:Zl?[Vl/Zl,Xl/Zl]:[NaN,NaN];return Vl=Xl=Zl=$l=Kl=Jl=Ql=ts=es=0,t}};function rs(t,e){Vl+=t,Xl+=e,++Zl}function is(){ns.point=os}function os(t,e){ns.point=as,rs(Gl=t,Yl=e)}function as(t,e){var n=t-Gl,r=e-Yl,i=Qa(n*n+r*r);$l+=i*(Gl+t)/2,Kl+=i*(Yl+e)/2,Jl+=i,rs(Gl=t,Yl=e)}function ls(){ns.point=rs}function ss(){ns.point=cs}function us(){fs(Hl,Bl)}function cs(t,e){ns.point=fs,rs(Hl=Gl=t,Bl=Yl=e)}function fs(t,e){var n=t-Gl,r=e-Yl,i=Qa(n*n+r*r);$l+=i*(Gl+t)/2,Kl+=i*(Yl+e)/2,Jl+=i,Ql+=(i=Yl*t-Gl*e)*(Gl+t),ts+=i*(Yl+e),es+=3*i,rs(Gl=t,Yl=e)}var hs=ns;function ps(t){this._context=t}ps.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Ba)}},result:el};var ds,gs,ys,_s,vs,ms=zl(),xs={point:el,lineStart:function(){xs.point=bs},lineEnd:function(){ds&&Ss(gs,ys),xs.point=el},polygonStart:function(){ds=!0},polygonEnd:function(){ds=null},result:function(){var t=+ms;return ms.reset(),t}};function bs(t,e){xs.point=Ss,gs=_s=t,ys=vs=e}function Ss(t,e){_s-=t,vs-=e,ms.add(Qa(_s*_s+vs*vs)),_s=t,vs=e}var ws=xs;function Ts(){this._string=[]}function Ms(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Ts.prototype={_radius:4.5,_circle:Ms(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Ms(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var ks,zs,Fs,Cs,As,Es,Ls,Ns,Ds,Ps,Os,Rs,Is,Ws,Us,js;function Hs(t,e,n){var r=Mt(t,e-Wa,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Bs(t,e,n){var r=Mt(t,e-Wa,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function Gs(){var t,e,n,r,i,o,a,l,s,u,c,f,h=10,p=h,d=90,g=360,y=2.5;function _(){return{type:"MultiLineString",coordinates:v()}}function v(){return Mt($a(r/d)*d,n,d).map(c).concat(Mt($a(l/g)*g,a,g).map(f)).concat(Mt($a(e/h)*h,t,h).filter((function(t){return qa(t%d)>Wa})).map(s)).concat(Mt($a(o/p)*p,i,p).filter((function(t){return qa(t%g)>Wa})).map(u))}return _.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},_.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(a).slice(1),c(n).reverse().slice(1),f(l).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],l=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),l>a&&(t=l,l=a,a=t),_.precision(y)):[[r,l],[n,a]]},_.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),_.precision(y)):[[e,o],[t,i]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(d=+t[0],g=+t[1],_):[d,g]},_.stepMinor=function(t){return arguments.length?(h=+t[0],p=+t[1],_):[h,p]},_.precision=function(h){return arguments.length?(y=+h,s=Hs(o,i,90),u=Bs(e,t,y),c=Hs(l,a,90),f=Bs(r,n,y),_):y},_.extentMajor([[-180,-90+Wa],[180,90-Wa]]).extentMinor([[-180,-80-Wa],[180,80+Wa]])}var Ys={sphere:el,point:qs,lineStart:Xs,lineEnd:Ks,polygonStart:function(){Ys.lineStart=Js,Ys.lineEnd=Qs},polygonEnd:function(){Ys.lineStart=Xs,Ys.lineEnd=Ks}};function qs(t,e){t*=Ya;var n=Za(e*=Ya);Vs(n*Za(t),n*Ka(t),Ka(e))}function Vs(t,e,n){++ks,Fs+=(t-Fs)/ks,Cs+=(e-Cs)/ks,As+=(n-As)/ks}function Xs(){Ys.point=Zs}function Zs(t,e){t*=Ya;var n=Za(e*=Ya);Ws=n*Za(t),Us=n*Ka(t),js=Ka(e),Ys.point=$s,Vs(Ws,Us,js)}function $s(t,e){t*=Ya;var n=Za(e*=Ya),r=n*Za(t),i=n*Ka(t),o=Ka(e),a=Xa(Qa((a=Us*o-js*i)*a+(a=js*r-Ws*o)*a+(a=Ws*i-Us*r)*a),Ws*r+Us*i+js*o);zs+=a,Es+=a*(Ws+(Ws=r)),Ls+=a*(Us+(Us=i)),Ns+=a*(js+(js=o)),Vs(Ws,Us,js)}function Ks(){Ys.point=qs}function Js(){Ys.point=tu}function Qs(){eu(Rs,Is),Ys.point=qs}function tu(t,e){Rs=t,Is=e,t*=Ya,e*=Ya,Ys.point=eu;var n=Za(e);Ws=n*Za(t),Us=n*Ka(t),js=Ka(e),Vs(Ws,Us,js)}function eu(t,e){t*=Ya;var n=Za(e*=Ya),r=n*Za(t),i=n*Ka(t),o=Ka(e),a=Us*o-js*i,l=js*r-Ws*o,s=Ws*i-Us*r,u=Qa(a*a+l*l+s*s),c=tl(u),f=u&&-c/u;Ds+=f*a,Ps+=f*l,Os+=f*s,zs+=c,Es+=c*(Ws+(Ws=r)),Ls+=c*(Us+(Us=i)),Ns+=c*(js+(js=o)),Vs(Ws,Us,js)}var nu=function(t){ks=zs=Fs=Cs=As=Es=Ls=Ns=Ds=Ps=Os=0,yl(t,Ys);var e=Ds,n=Ps,r=Os,i=e*e+n*n+r*r;return i<1e-12&&(e=Es,n=Ls,r=Ns,zs<Wa&&(e=Fs,n=Cs,r=As),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[Xa(n,e)*Ga,tl(r/Qa(i))*Ga]};function ru(t){return[Xa(t[1],t[0]),tl(t[2])]}function iu(t){var e=t[0],n=t[1],r=Za(n);return[r*Za(e),r*Ka(e),Ka(n)]}function ou(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function au(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function lu(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function su(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function uu(t){var e=Qa(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var cu=zl();function fu(t){return qa(t[0])<=Ua?t[0]:Ja(t[0])*((qa(t[0])+Ua)%Ba-Ua)}var hu=function(t,e,n,r){return function(i){var o,a,l,s=e(i),u=nl(),c=e(u),f=!1,h={point:p,lineStart:g,lineEnd:y,polygonStart:function(){h.point=_,h.lineStart=v,h.lineEnd=m,a=[],o=[]},polygonEnd:function(){h.point=p,h.lineStart=g,h.lineEnd=y,a=Dt(a);var t=function(t,e){var n=fu(e),r=e[1],i=Ka(r),o=[Ka(n),-Za(n),0],a=0,l=0;cu.reset(),1===i?r=ja+Wa:-1===i&&(r=-ja-Wa);for(var s=0,u=t.length;s<u;++s)if(f=(c=t[s]).length)for(var c,f,h=c[f-1],p=fu(h),d=h[1]/2+Ha,g=Ka(d),y=Za(d),_=0;_<f;++_,p=m,g=b,y=S,h=v){var v=c[_],m=fu(v),x=v[1]/2+Ha,b=Ka(x),S=Za(x),w=m-p,T=w>=0?1:-1,M=T*w,k=M>Ua,z=g*b;if(cu.add(Xa(z*T*Ka(M),y*S+z*Za(M))),a+=k?w+T*Ba:w,k^p>=n^m>=n){var F=au(iu(h),iu(v));uu(F);var C=au(o,F);uu(C);var A=(k^w>=0?-1:1)*tl(C[2]);(r>A||r===A&&(F[0]||F[1]))&&(l+=k^w>=0?1:-1)}}return(a<-Wa||a<Wa&&cu<-Wa)^1&l}(o,r);a.length?(f||(i.polygonStart(),f=!0),ol(a,du,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){s.point(t,e)}function g(){h.point=d,s.lineStart()}function y(){h.point=p,s.lineEnd()}function _(t,e){l.push([t,e]),c.point(t,e)}function v(){c.lineStart(),l=[]}function m(){_(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,s=c.clean(),h=u.result(),p=h.length;if(l.pop(),o.push(l),l=null,p)if(1&s){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else p>1&&2&s&&h.push(h.pop().concat(h.shift())),a.push(h.filter(pu))}return h}};function pu(t){return t.length>1}function du(t,e){return((t=t.x)[0]<0?t[1]-ja-Wa:ja-t[1])-((e=e.x)[0]<0?e[1]-ja-Wa:ja-e[1])}var gu=hu((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var l=o>0?Ua:-Ua,s=qa(o-n);qa(s-Ua)<Wa?(t.point(n,r=(r+a)/2>0?ja:-ja),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(o,r),e=0):i!==l&&s>=Ua&&(qa(n-i)<Wa&&(n-=i*Wa),qa(o-l)<Wa&&(o-=l*Wa),r=function(t,e,n,r){var i,o,a=Ka(t-n);return qa(a)>Wa?Va((Ka(e)*(o=Za(r))*Ka(n)-Ka(r)*(i=Za(e))*Ka(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),e=0),t.point(n=o,r=a),i=l},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*ja,r.point(-Ua,i),r.point(0,i),r.point(Ua,i),r.point(Ua,0),r.point(Ua,-i),r.point(0,-i),r.point(-Ua,-i),r.point(-Ua,0),r.point(-Ua,i);else if(qa(t[0]-e[0])>Wa){var o=t[0]<e[0]?Ua:-Ua;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}),[-Ua,-ja]);var yu=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n};function _u(t,e){return[qa(t)>Ua?t+Math.round(-t/Ba)*Ba:t,e]}function vu(t,e,n){return(t%=Ba)?e||n?yu(xu(t),bu(e,n)):xu(t):e||n?bu(e,n):_u}function mu(t){return function(e,n){return[(e+=t)>Ua?e-Ba:e<-Ua?e+Ba:e,n]}}function xu(t){var e=mu(t);return e.invert=mu(-t),e}function bu(t,e){var n=Za(t),r=Ka(t),i=Za(e),o=Ka(e);function a(t,e){var a=Za(e),l=Za(t)*a,s=Ka(t)*a,u=Ka(e),c=u*n+l*r;return[Xa(s*i-c*o,l*n-u*r),tl(c*i+s*o)]}return a.invert=function(t,e){var a=Za(e),l=Za(t)*a,s=Ka(t)*a,u=Ka(e),c=u*i-s*o;return[Xa(s*i+u*o,l*n+c*r),tl(c*n-l*r)]},a}_u.invert=_u;function Su(t,e,n,r,i,o){if(n){var a=Za(e),l=Ka(e),s=r*n;null==i?(i=e+r*Ba,o=e-s/2):(i=wu(a,i),o=wu(a,o),(r>0?i<o:i>o)&&(i+=r*Ba));for(var u,c=i;r>0?c>o:c<o;c-=s)u=ru([a,-l*Za(c),-l*Ka(c)]),t.point(u[0],u[1])}}function wu(t,e){(e=iu(e))[0]-=t,uu(e);var n,r=(n=-e[1])>1?0:n<-1?Ua:Math.acos(n);return((-e[2]<0?-r:r)+Ba-Wa)%Ba}var Tu=function(t){var e=Za(t),n=6*Ya,r=e>0,i=qa(e)>Wa;function o(t,n){return Za(t)*Za(n)>e}function a(t,n,r){var i=[1,0,0],o=au(iu(t),iu(n)),a=ou(o,o),l=o[0],s=a-l*l;if(!s)return!r&&t;var u=e*a/s,c=-e*l/s,f=au(i,o),h=su(i,u);lu(h,su(o,c));var p=f,d=ou(h,p),g=ou(p,p),y=d*d-g*(ou(h,h)-1);if(!(y<0)){var _=Qa(y),v=su(p,(-d-_)/g);if(lu(v,h),v=ru(v),!r)return v;var m,x=t[0],b=n[0],S=t[1],w=n[1];b<x&&(m=x,x=b,b=m);var T=b-x,M=qa(T-Ua)<Wa;if(!M&&w<S&&(m=S,S=w,w=m),M||T<Wa?M?S+w>0^v[1]<(qa(v[0]-x)<Wa?S:w):S<=v[1]&&v[1]<=w:T>Ua^(x<=v[0]&&v[0]<=b)){var k=su(p,(-d+_)/g);return lu(k,h),[v,ru(k)]}}}function l(e,n){var i=r?t:Ua-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return hu(o,(function(t){var e,n,s,u,c;return{lineStart:function(){u=s=!1,c=1},point:function(f,h){var p,d=[f,h],g=o(f,h),y=r?g?0:l(f,h):g?l(f+(f<0?Ua:-Ua),h):0;if(!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(p=a(e,d))||rl(e,p)||rl(d,p))&&(d[2]=1),g!==s)c=0,g?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(i&&e&&r^g){var _;y&n||!(_=a(d,e,!0))||(c=0,r?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1],3)))}!g||e&&rl(e,d)||t.point(d[0],d[1]),e=d,s=g,n=y},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(u&&s)<<1}}}),(function(e,r,i,o){Su(o,t,n,i,e,r)}),r?[0,-t]:[-Ua,t-Ua])},Mu=Za(30*Ya),ku=function(t,e){return+e?function(t,e){function n(r,i,o,a,l,s,u,c,f,h,p,d,g,y){var _=u-r,v=c-i,m=_*_+v*v;if(m>4*e&&g--){var x=a+h,b=l+p,S=s+d,w=Qa(x*x+b*b+S*S),T=tl(S/=w),M=qa(qa(S)-1)<Wa||qa(o-f)<Wa?(o+f)/2:Xa(b,x),k=t(M,T),z=k[0],F=k[1],C=z-r,A=F-i,E=v*C-_*A;(E*E/m>e||qa((_*C+v*A)/m-.5)>.3||a*h+l*p+s*d<Mu)&&(n(r,i,o,a,l,s,z,F,M,x/=w,b/=w,S,g,y),y.point(z,F),n(z,F,M,x,b,S,u,c,f,h,p,d,g,y))}}return function(e){var r,i,o,a,l,s,u,c,f,h,p,d,g={point:y,lineStart:_,lineEnd:m,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=_}};function y(n,r){n=t(n,r),e.point(n[0],n[1])}function _(){c=NaN,g.point=v,e.lineStart()}function v(r,i){var o=iu([r,i]),a=t(r,i);n(c,f,u,h,p,d,c=a[0],f=a[1],u=r,h=o[0],p=o[1],d=o[2],16,e),e.point(c,f)}function m(){g.point=y,e.lineEnd()}function x(){_(),g.point=b,g.lineEnd=S}function b(t,e){v(r=t,e),i=c,o=f,a=h,l=p,s=d,g.point=v}function S(){n(c,f,u,h,p,d,i,o,r,a,l,s,16,e),g.lineEnd=m,m()}return g}}(t,e):function(t){return ul({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)};var zu=ul({point:function(t,e){this.stream.point(t*Ya,e*Ya)}});function Fu(t,e,n,r,i){function o(o,a){return[e+t*(o*=r),n-t*(a*=i)]}return o.invert=function(o,a){return[(o-e)/t*r,(n-a)/t*i]},o}function Cu(t,e,n,r,i,o){var a=Za(o),l=Ka(o),s=a*t,u=l*t,c=a/t,f=l/t,h=(l*n-a*e)/t,p=(l*e+a*n)/t;function d(t,o){return[s*(t*=r)-u*(o*=i)+e,n-u*t-s*o]}return d.invert=function(t,e){return[r*(c*t-f*e+h),i*(p-f*t-c*e)]},d}function Au(t){return function(t){var e,n,r,i,o,a,l,s,u,c,f=150,h=480,p=250,d=0,g=0,y=0,_=0,v=0,m=0,x=1,b=1,S=null,w=gu,T=null,M=sl,k=.5;function z(t){return s(t[0]*Ya,t[1]*Ya)}function F(t){return(t=s.invert(t[0],t[1]))&&[t[0]*Ga,t[1]*Ga]}function C(){var t=Cu(f,0,0,x,b,m).apply(null,e(d,g)),r=(m?Cu:Fu)(f,h-t[0],p-t[1],x,b,m);return n=vu(y,_,v),l=yu(e,r),s=yu(n,l),a=ku(l,k),A()}function A(){return u=c=null,z}return z.stream=function(t){return u&&c===t?u:u=zu(function(t){return ul({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(w(a(M(c=t)))))},z.preclip=function(t){return arguments.length?(w=t,S=void 0,A()):w},z.postclip=function(t){return arguments.length?(M=t,T=r=i=o=null,A()):M},z.clipAngle=function(t){return arguments.length?(w=+t?Tu(S=t*Ya):(S=null,gu),A()):S*Ga},z.clipExtent=function(t){return arguments.length?(M=null==t?(T=r=i=o=null,sl):ll(T=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),A()):null==T?null:[[T,r],[i,o]]},z.scale=function(t){return arguments.length?(f=+t,C()):f},z.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],C()):[h,p]},z.center=function(t){return arguments.length?(d=t[0]%360*Ya,g=t[1]%360*Ya,C()):[d*Ga,g*Ga]},z.rotate=function(t){return arguments.length?(y=t[0]%360*Ya,_=t[1]%360*Ya,v=t.length>2?t[2]%360*Ya:0,C()):[y*Ga,_*Ga,v*Ga]},z.angle=function(t){return arguments.length?(m=t%360*Ya,C()):m*Ga},z.reflectX=function(t){return arguments.length?(x=t?-1:1,C()):x<0},z.reflectY=function(t){return arguments.length?(b=t?-1:1,C()):b<0},z.precision=function(t){return arguments.length?(a=ku(l,k=t*t),A()):Qa(k)},z.fitExtent=function(t,e){return wl(z,t,e)},z.fitSize=function(t,e){return Tl(z,t,e)},z.fitWidth=function(t,e){return Ml(z,t,e)},z.fitHeight=function(t,e){return kl(z,t,e)},function(){return e=t.apply(this,arguments),z.invert=e.invert&&F,C()}}((function(){return t}))()}var Eu=Math.abs,Lu=(Math.atan,Math.atan2,Math.ceil,Math.cos,Math.exp,Math.floor),Nu=(Math.log,Math.max),Du=Math.min,Pu=(Math.pow,Math.round,Math.sign,Math.sin,Math.tan,Math.PI),Ou=Pu/2,Ru=(Math.SQRT1_2,Wu(2),Wu(Pu),180/Pu),Iu=Pu/180;function Wu(t){return t>0?Math.sqrt(t):0}var Uu=[[.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 ju(t,e){var n,r=Du(18,36*Eu(e)/Pu),i=Lu(r),o=r-i,a=(n=Uu[i])[0],l=n[1],s=(n=Uu[++i])[0],u=n[1],c=(n=Uu[Du(19,++i)])[0],f=n[1];return[t*(s+o*(c-a)/2+o*o*(c-2*s+a)/2),(e>0?Ou:-Ou)*(u+o*(f-l)/2+o*o*(f-2*u+l)/2)]}Uu.forEach((function(t){t[1]*=1.0144})),ju.invert=function(t,e){var n=e/Ou,r=90*n,i=Du(18,Eu(r/5)),o=Nu(0,Lu(i));do{var a=Uu[o][1],l=Uu[o+1][1],s=Uu[Du(19,o+2)][1],u=s-a,c=s-2*l+a,f=2*(Eu(n)-l)/u,h=c/u,p=f*(1-h*f*(1-2*h*f));if(p>=0||1===o){r=(e>=0?5:-5)*(p+i);var d,g=50;do{p=(i=Du(18,Eu(r)/5))-(o=Lu(i)),a=Uu[o][1],l=Uu[o+1][1],s=Uu[Du(19,o+2)][1],r-=(d=(e>=0?Ou:-Ou)*(l+p*(s-a)/2+p*p*(s-2*l+a)/2)-e)*Ru}while(Eu(d)>1e-12&&--g>0);break}}while(--o>=0);var y=Uu[o][0],_=Uu[o+1][0],v=Uu[Du(19,o+2)][0];return[t/(_+p*(v-y)/2+p*p*(v-2*_+y)/2),r*Iu]};var Hu=function(t){return t},Bu=function(t){if(null==t)return Hu;var e,n,r=t.scale[0],i=t.scale[1],o=t.translate[0],a=t.translate[1];return function(t,l){l||(e=n=0);var s=2,u=t.length,c=new Array(u);for(c[0]=(e+=t[0])*r+o,c[1]=(n+=t[1])*i+a;s<u;)c[s]=t[s],++s;return c}},Gu=function(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return Yu(t,e)}))}:Yu(t,e)};function Yu(t,e){var n=e.id,r=e.bbox,i=null==e.properties?{}:e.properties,o=qu(t,e);return null==n&&null==r?{type:"Feature",properties:i,geometry:o}:null==r?{type:"Feature",id:n,properties:i,geometry:o}:{type:"Feature",id:n,bbox:r,properties:i,geometry:o}}function qu(t,e){var n=Bu(t.transform),r=t.arcs;function i(t,e){e.length&&e.pop();for(var i=r[t<0?~t:t],o=0,a=i.length;o<a;++o)e.push(n(i[o],o));t<0&&function(t,e){for(var n,r=t.length,i=r-e;i<--r;)n=t[i],t[i++]=t[r],t[r]=n}(e,a)}function o(t){return n(t)}function a(t){for(var e=[],n=0,r=t.length;n<r;++n)i(t[n],e);return e.length<2&&e.push(e[0]),e}function l(t){for(var e=a(t);e.length<4;)e.push(e[0]);return e}function s(t){return t.map(l)}return function t(e){var n,r=e.type;switch(r){case"GeometryCollection":return{type:r,geometries:e.geometries.map(t)};case"Point":n=o(e.coordinates);break;case"MultiPoint":n=e.coordinates.map(o);break;case"LineString":n=a(e.arcs);break;case"MultiLineString":n=e.arcs.map(a);break;case"Polygon":n=s(e.arcs);break;case"MultiPolygon":n=e.arcs.map(s);break;default:return null}return{type:r,coordinates:n}}(e)}var Vu=function(t){return t.toLocaleString("en").replace(/,/gi," ")},Xu=function(t){var e;function n(){e=yt("#"+t.div),e.empty()&&(e=yt("body").append("div").attr("id",t.div)),e.style("max-width",t.maxWidth),e.style("overflow","hidden"),e.style("font-size",t.fontSize),e.style("background",t.background),e.style("padding",t.padding),e.style("border",t.border),e.style("border-radius",t["border-radius"]),e.style("box-shadow",t["box-shadow"]),e.style("position","absolute"),e.style("font-family",t["font-family"]),e.style("pointer-events","none"),e.style("opacity","0")}return(t=t||{}).containerId=t.containerId||"map",t.div=t.div||"tooltip_eurostat",t.maxWidth=t.maxWidth||"200px",t.fontSize=t.fontSize||"14px",t.background=t.background||"white",t.padding=t.padding||"5px",t.border=t.border||"0px",t["border-radius"]=t["border-radius"]||"5px",t["box-shadow"]=t["box-shadow"]||"5px 5px 5px grey",t["font-family"]=t["font-family"]||"Helvetica, Arial, sans-serif",t.transitionDuration=t.transitionDuration||0,t.xOffset=t.xOffset||30,t.yOffset=t.yOffset||20,n.mouseover=function(t){t&&e.html(t);var r=nt.pageX,i=nt.pageY;n.ensureTooltipOnScreen(r,i)},n.mousemove=function(){var t=nt.pageX,e=nt.pageY;this.ensureTooltipOnScreen(t,e)},n.mouseout=function(){e.style("opacity",0)},n.style=function(t,r){return 1==arguments.length?e.style(t):(e.style(t,r),n)},n.attr=function(t,r){return 1==arguments.length?e.attr(t):(e.attr(t,r),n)},n.ensureTooltipOnScreen=function(n,r){e.style("opacity",1);var i=e.node();i.style.left=n+t.xOffset+"px",i.style.top=r-t.yOffset+"px";var o=document.getElementById(t.containerId).getBoundingClientRect(),a=o.width,l=o.height;if(i.offsetLeft>o.left+a-i.clientWidth){var s=n-i.clientWidth-t.xOffset;if(i.style.left=s+"px",i.offsetLeft+i.clientWidth>n){var u=n-(i.clientWidth+t.xOffset);i.style.left=u+"px"}}i.offsetTop+i.clientHeight>o.top+l&&(i.style.top=i.offsetTop-i.clientHeight+"px")},n(),n},Zu={EUR_3035:{cc:[{text:"AL",x:51e5,y:206e4,class:"cc",size:7},{text:"AT",x:467e4,y:2629e3,class:"cc",size:18},{text:"BE",x:393e4,y:301e4,class:"cc",size:17},{text:"BG",x:5567e3,y:22e5,class:"cc",size:22},{text:"HR",x:4876e3,y:2455e3,class:"cc",size:10},{text:"CY",x:6426e3,y:148e4,class:"cc",size:10},{text:"CZ",x:4707e3,y:2885e3,class:"cc",size:18},{text:"DK",x:4316e3,y:3621e3,class:"cc",size:20},{text:"EE",x:522e4,y:399e4,class:"cc",size:12},{text:"FI",x:515e4,y:4424e3,class:"cc",size:20},{text:"FR",x:3767740,y:2662817,class:"cc",size:22},{text:"DE",x:4347284,y:3093276,class:"cc",size:22},{text:"EL",x:537e4,y:175e4,class:"cc",size:22},{text:"HU",x:502e4,y:263e4,class:"cc",size:17},{text:"IS",x:304e4,y:4833e3,class:"cc",size:10},{text:"IE",x:3136e3,y:3394e3,class:"cc",size:17},{text:"IT",x:4469967,y:2181963,class:"cc",size:22},{text:"LV",x:529e4,y:38e5,class:"cc",size:12},{text:"LT",x:519e4,y:363e4,class:"cc",size:12},{text:"LU",x:412e4,y:294e4,class:"cc",size:12},{text:"MT",x:4731e3,y:13e5,class:"cc",size:10},{text:"ME",x:5073e3,y:2185e3,class:"cc",size:7},{text:"MK",x:53e5,y:208e4,class:"cc",size:10},{text:"NL",x:402e4,y:3208e3,class:"cc",size:17},{text:"NO",x:43e5,y:4147e3,class:"cc",size:20},{text:"PL",x:4964e3,y:32e5,class:"cc",size:22},{text:"PT",x:28e5,y:199e4,class:"cc",size:18},{text:"RO",x:5451e3,y:26e5,class:"cc",size:22},{text:"RS",x:52e5,y:23e5,class:"cc",size:10},{text:"SK",x:504e4,y:2835e3,class:"cc",size:12},{text:"SI",x:4655e3,y:248e4,class:"cc",size:10},{text:"ES",x:3160096,y:19e5,class:"cc",size:22},{text:"SE",x:463e4,y:4e6,class:"cc",size:20},{text:"CH",x:42e5,y:2564e3,class:"cc",size:16},{text:"TR",x:651e4,y:21e5,class:"cc",size:22},{text:"UK",x:3558e3,y:325e4,class:"cc",size:17}],en:[{text:"MEDITERRANEAN SEA",x:5472e3,y:12e5,class:"seas",size:12,letterSpacing:7},{text:"ATLANTIC OCEAN",x:282e4,y:254e4,class:"seas",size:12,letterSpacing:2},{text:"NORTH SEA",x:3915e3,y:37e5,class:"seas",size:12},{text:"BALTIC SEA",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"NORWEGIAN SEA",x:385e4,y:48e5,class:"seas",size:12,letterSpacing:1},{text:"BLACK SEA",x:63e5,y:25e5,class:"seas",size:12,letterSpacing:4},{text:"ALBANIA",cc:"AL",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"AUSTRIA",cc:"AT",x:467e4,y:2629e3,class:"countries",size:10},{text:"BELGIUM",cc:"BE",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIA",cc:"BG",x:5567e3,y:2256e3,class:"countries",size:12},{text:"CROATIA",cc:"HR",x:4876e3,y:2455e3,class:"countries",size:7},{text:"CYPRUS",cc:"CY",x:6426e3,y:148e4,class:"countries",size:10},{text:"CZECHIA",cc:"CZ",x:4707e3,y:2885e3,class:"countries",size:12},{text:"DENMARK",cc:"DK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTONIA",cc:"EE",x:522e4,y:399e4,class:"countries",size:7},{text:"FINLAND",cc:"FI",x:515e4,y:4424e3,class:"countries",size:12},{text:"FRANCE",cc:"FR",x:3767740,y:2662817,class:"countries",size:12},{text:"GERMANY",cc:"DE",x:4347284,y:3093276,class:"countries",size:12},{text:"GREECE",cc:"EL",x:547e4,y:186e4,class:"countries",size:12},{text:"HUNGARY",cc:"HU",x:502e4,y:263e4,class:"countries",size:10},{text:"ICELAND",cc:"IS",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRELAND",cc:"IE",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALY",cc:"IT",x:4469967,y:2181963,class:"countries",size:12},{text:"LATVIA",cc:"LV",x:529e4,y:38e5,class:"countries",size:7},{text:"LITHUANIA",cc:"LT",x:519e4,y:363e4,class:"countries",size:7},{text:"LUX.",cc:"LU",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTA",cc:"MT",x:4731e3,y:133e4,class:"countries",size:7},{text:"MONT.",cc:"ME",x:5073e3,y:2185e3,class:"countries",size:7},{text:"N. MACEDONIA",cc:"MK",x:53e5,y:2082e3,class:"countries",size:7},{text:"NETHERLANDS",cc:"NL",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORWAY",cc:"NO",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLAND",cc:"PL",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",cc:"PT",x:283e4,y:199e4,class:"countries",size:10,rotate:-75},{text:"ROMANIA",cc:"RO",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIA",cc:"RS",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOVAKIA",cc:"SK",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOVENIA",cc:"SI",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-30},{text:"SPAIN",cc:"ES",x:3160096,y:185e4,class:"countries",size:12},{text:"SWEDEN",cc:"SE",x:463e4,y:41e5,class:"countries",size:12,rotate:-75},{text:"SWITZERLAND",cc:"CH",x:42e5,y:2564e3,class:"countries",size:7},{text:"TURKEY",cc:"TR",x:651e4,y:21e5,class:"countries",size:12},{text:"U.K.",cc:"UK",x:3558e3,y:325e4,class:"countries",size:12}],fr:[{text:"MER MÉDITERRANÉE",x:5472e3,y:1242e3,class:"seas",size:12},{text:"OCÈAN ATLANTIQUE",x:282e4,y:254e4,class:"seas",size:12},{text:"MER DU NORD",x:3915e3,y:37e5,class:"seas",size:12},{text:"MER BALTIQUE",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"MER DE NORVÈGE",x:385e4,y:48e5,class:"seas",size:12},{text:"MER NOIRE",x:6265e3,y:2472e3,class:"seas",size:12},{text:"ALBANIE",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"AUTRICHE",x:467e4,y:2629e3,class:"countries",size:10},{text:"BELGIQUE",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIE",x:5567e3,y:2256e3,class:"countries",size:12},{text:"CROATIE",x:4876e3,y:2455e3,class:"countries",size:7},{text:"CHYPRE",x:6426e3,y:148e4,class:"countries",size:10},{text:"TCHÉQUIE",x:4707e3,y:2885e3,class:"countries",size:12},{text:"DANEMARK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTONIE",x:522e4,y:399e4,class:"countries",size:10},{text:"FINLANDE",x:5125e3,y:4424e3,class:"countries",size:12},{text:"FRANCE",x:3767740,y:2662817,class:"countries",size:12},{text:"ALLEMAGNE",x:4347284,y:3093276,class:"countries",size:12},{text:"GRÈCE",x:542e4,y:186e4,class:"countries",size:12},{text:"HONGRIE",x:502e4,y:2654e3,class:"countries",size:10},{text:"ISLANDE",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRLANDE",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALIE",x:45e5,y:2181963,class:"countries",size:12},{text:"LETTONIE",x:529e4,y:3776e3,class:"countries",size:10},{text:"LITUANIE",x:519e4,y:363e4,class:"countries",size:10},{text:"LUX.",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTE",x:4731e3,y:1335e3,class:"countries",size:7},{text:"MONT.",x:5073e3,y:2185e3,class:"countries",size:7},{text:"MAC. DU NORD",x:53e5,y:2082e3,class:"countries",size:7},{text:"PAYS-BAS",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORVEGE",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLOGNE",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",x:2836136,y:1956179,class:"countries",size:10,rotate:-75},{text:"ROUMANIE",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIE",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOVAQUIE",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOVÉNIE",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-35},{text:"ESPAGNE",x:3160096,y:185e4,class:"countries",size:12},{text:"SUÈDE",x:47e5,y:4401e3,class:"countries",size:12,rotate:-75},{text:"SUISSE",x:42e5,y:2564e3,class:"countries",size:7},{text:"TURQUIE",x:651e4,y:21e5,class:"countries",size:12},{text:"ROYAUME-UNI",x:3558e3,y:325e4,class:"countries",size:10}],de:[{text:"MITTELMEER",x:5472e3,y:12e5,class:"seas",size:12,letterSpacing:7},{text:"ATLANTISCHER OZEAN",x:282e4,y:254e4,class:"seas",size:12},{text:"NORDSEE",x:3915e3,y:37e5,class:"seas",size:12},{text:"OSTSEE",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"NORWEGISCHE MEER",x:385e4,y:48e5,class:"seas",size:12},{text:"SCHWARZE MEER",x:63e5,y:25e5,class:"seas",size:12,letterSpacing:1},{text:"ALBANIEN",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"ÖSTERREICH",x:465e4,y:2629e3,class:"countries",size:7},{text:"BELGIEN",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIEN",x:5567e3,y:2256e3,class:"countries",size:10},{text:"KROATIEN",x:4876e3,y:2455e3,class:"countries",size:7},{text:"ZYPERN",x:6426e3,y:148e4,class:"countries",size:10},{text:"TSCHECHIEN",x:4707e3,y:2885e3,class:"countries",size:7},{text:"DÄNEMARK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTLAND",x:522e4,y:399e4,class:"countries",size:7},{text:"FINNLAND",x:515e4,y:4424e3,class:"countries",size:12},{text:"FRANKREICH",x:3767740,y:2662817,class:"countries",size:12},{text:"DEUTSCHLAND",x:4347284,y:3093276,class:"countries",size:10},{text:"GRIECHENLAND",x:555e4,y:15e5,class:"countries",size:10},{text:"UNGARN",x:502e4,y:263e4,class:"countries",size:10},{text:"ISLAND",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRLAND",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALIEN",x:4469967,y:2181963,class:"countries",size:12,rotate:35},{text:"LETTLAND",x:529e4,y:38e5,class:"countries",size:7},{text:"LITAUEN",x:519e4,y:363e4,class:"countries",size:7},{text:"LUX.",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTA",x:4731e3,y:133e4,class:"countries",size:7},{text:"MONT.",x:5073e3,y:2185e3,class:"countries",size:7},{text:"NORDMAZEDONIEN",x:535e4,y:2082e3,class:"countries",size:7},{text:"NIEDERLANDE",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORWEGEN",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLEN",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",x:2836136,y:1956179,class:"countries",size:10,rotate:-75},{text:"RUMÄNIEN",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIEN",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOWAKEI",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOWENIEN",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-30},{text:"SPANIEN",x:3160096,y:185e4,class:"countries",size:12},{text:"SCHWEDEN",x:467e4,y:418e4,class:"countries",size:12,rotate:-75},{text:"SCHWEIZ",x:42e5,y:2564e3,class:"countries",size:7},{text:"TRUTHAHN",x:651e4,y:21e5,class:"countries",size:12},{text:"VEREINIGTES",x:355e4,y:352e4,class:"countries",size:10},{text:"KÖNIGREICH",x:355e4,y:342e4,class:"countries",size:10}]},IC_32628:{cc:[{text:"ES",x:420468,y:3180647,class:"cc",size:12}],en:[{text:"Canary Islands",x:420468,y:3180647,class:"countries",size:12}],fr:[{text:"Les îles Canaries",x:420468,y:3180647,class:"countries",size:12}],de:[{text:"Kanarische Inseln",x:41e4,y:3180647,class:"countries",size:12}]},GP_32620:{cc:[{text:"FR",x:667e3,y:174e4,class:"cc",size:12}],en:[{text:"Guadeloupe",x:7e5,y:181e4,class:"countries",size:12}]},MQ_32620:{cc:[{text:"FR",x:716521,y:1621322,class:"cc",size:12}],en:[{text:"Martinique",x:716521,y:1621322,class:"countries",size:12}]},GF_32622:{cc:[{text:"FR",x:266852,y:444074,class:"cc",size:12}],en:[{text:"Guyane",x:266852,y:444074,class:"countries",size:12}],de:[{text:"Guayana",x:266852,y:444074,class:"countries",size:12}]},RE_32740:{cc:[{text:"FR",x:348011,y:768e4,class:"cc",size:10}],en:[{text:"Réunion",x:348011,y:768e4,class:"countries",size:10}]},YT_32738:{cc:[{text:"FR",x:516549,y:8593920,class:"cc",size:10}],en:[{text:"Mayotte",x:516549,y:8593920,class:"countries",size:10}]},MT_3035:{cc:[{text:"MT",x:4719755,y:1410701,class:"cc",size:10}],en:[{text:"Malta",x:4719755,y:1410701,class:"countries",size:10}]},PT20_32626:{cc:[{text:"PT",x:397418,y:432e4,class:"cc",size:10}],en:[{text:"Azores",x:397418,y:432e4,class:"countries",size:10}],fr:[{text:"Açores",x:397418,y:4271471,class:"countries",size:10}],de:[{text:"Azoren",x:397418,y:4271471,class:"countries",size:10}]},PT30_32628:{cc:[{text:"PT",x:333586,y:3624e3,class:"cc",size:10,rotate:30}],en:[{text:"Madeira",x:333586,y:3624e3,class:"countries",size:10,rotate:30}],fr:[{text:"Madère",x:333586,y:3624e3,class:"countries",size:10,rotate:30}]},LI_3035:{cc:[{text:"LI",x:4287060,y:266e4,class:"cc",size:12}],en:[{text:"Liechtenstein",x:4287060,y:2679e3,class:"countries",size:7}]},IS_3035:{cc:[{text:"IS",x:3011804,y:496e4,class:"cc",size:12}],en:[{text:"Iceland",x:3011804,y:496e4,class:"countries",size:12}],fr:[{text:"Islande",x:3011804,y:496e4,class:"countries",size:12}],de:[{text:"Island",x:3011804,y:496e4,class:"countries",size:12}]},SJ_SV_3035:{cc:[{text:"NO",x:457e4,y:626e4,class:"cc",size:10}],en:[{text:"Svalbard",x:457e4,y:626e4,class:"countries",size:10}],de:[{text:"Spitzbergen",x:457e4,y:626e4,class:"countries",size:7}]},SJ_JM_3035:{cc:[{text:"NO",x:3647762,y:5420300,class:"cc",size:10}],en:[{text:"Jan Mayen",x:3647762,y:5420300,class:"countries",size:7}]},CARIB_32620:{cc:[{text:"FR",x:7e5,y:181e4,class:"cc",size:10},{text:"FR",x:64e4,y:159e4,class:"cc",size:10},{text:"FR",x:54e4,y:1962e3,class:"cc",size:7}],en:[{text:"Guadeloupe",x:7e5,y:181e4,class:"countries",size:10},{text:"Martinique",x:57e4,y:159e4,class:"countries",size:10},{text:"Saint Martin",x:597e3,y:1962e3,class:"countries",size:7}]},WORLD_54030:{en:[{text:"NORTH ATLANTIC",x:-45,y:25,class:"seas",size:10,letterSpacing:1},{text:"SOUTH ATLANTIC",x:-15,y:-25,class:"seas",size:10,letterSpacing:1},{text:"SOUTH PACIFIC",x:-126,y:-25,class:"seas",size:10,letterSpacing:1},{text:"NORTH",x:-136,y:25,class:"seas",size:10,letterSpacing:1},{text:"PACIFIC",x:-134,y:20,class:"seas",size:10,letterSpacing:1},{text:"INDIAN OCEAN",x:80,y:-25,class:"seas",size:10,letterSpacing:1},{text:"SOUTHERN OCEAN",x:-5,y:-67,class:"seas",size:10,letterSpacing:6}]}},$u={"03M":{type:"Topology",arcs:[[[3061,1303],[-152,-59],[-32,-66],[-65,72],[-96,7],[-16,59],[-64,19],[-56,-39],[-120,39],[-184,-19],[-16,26],[32,52],[-16,72],[24,40],[8,183]],[[2885,0],[-8,46],[-65,85],[-40,-7],[-40,40],[0,111],[80,13],[25,46],[72,13],[40,98],[-56,118],[144,196],[-24,79],[88,59],[-24,98],[-8,20],[24,39],[8,52],[48,72],[-88,125]],[[825,2638],[-112,-98],[-72,-7],[-88,-118],[-176,-39],[56,-91],[88,-33],[24,-53],[56,-39],[24,-91],[-56,-46],[24,-105],[-56,-92],[-104,0],[-48,-104],[-16,-40],[-57,7],[-40,-53],[-16,-78],[113,-118],[-97,-65],[-88,-99],[-80,20],[-80,-39],[-24,-13]],[[1098,2304],[-193,66],[24,39],[-16,39],[65,13],[0,33],[-65,79],[-88,65]],[[2308,1689],[-153,-20],[-64,59],[-40,7],[-96,-27],[-104,138],[-8,92],[-32,78],[-64,26],[-32,-59],[-24,0],[-56,86],[-40,137],[-25,65],[-56,0],[-56,46],[-64,-72],[-120,53],[-88,-40],[-88,46]]],transform:{scale:[37.761044752777565,38.54734205626113],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"10M":{type:"Topology",arcs:[[[962,0],[-29,75],[48,131],[21,35],[11,38],[32,117],[-24,44]],[[1021,440],[-64,-29],[-70,36],[-120,2],[3,121]],[[770,570],[-126,16],[-40,91],[-45,4],[-51,93],[-142,4]],[[275,891],[-131,-99],[30,-36],[24,-31],[-6,-86],[-98,-86],[13,-64],[-27,-38],[-80,-31]],[[366,778],[-37,22],[-54,91]]],transform:{scale:[113.2099448513097,114.12782081303801],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}},"20M":{type:"Topology",arcs:[[[536,0],[-24,45],[15,30],[45,92],[-1,44],[-2,37]],[[569,248],[-130,9],[-10,64]],[[429,321],[-64,10],[-78,94],[-83,13]],[[153,502],[-73,-51],[26,-84],[-48,-53],[-3,-52],[-55,-25]],[[204,438],[-51,64]]],transform:{scale:[203.12309601494124,202.56551463031246],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}},"60M":{type:"Topology",arcs:[[[310,138],[-36,-2],[-40,42]],[[234,178],[-123,65]],[[84,278],[-84,-147]],[[111,243],[-27,35]],[[292,0],[18,138]]],transform:{scale:[372.84281730215633,364.87611898580536],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}}};function Ku(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}dn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]});var Ju=function t(e,n){var r={svgId_:"map",svg_:void 0};r.width_=Math.min(800,window.innerWidth),r.height_=0,r.containerId_=void 0,r.nutsLvl_=3,r.nutsYear_=2016,r.geo_="EUR",r.proj_="3035",r.scale_="20M",r.geoCenter_=void 0,r.pixSize_=void 0,r.zoomExtent_=void 0,r.fontFamily_="Helvetica, Arial, sans-serif",r.title_="",r.titleFontSize_=20,r.titleFill_="black",r.titlePosition_=void 0,r.titleFontWeight_="bold",r.titleStroke_="none",r.titleStrokeWidth_="none",r.subtitle_="",r.subtitleFontSize_=12,r.subtitleFill_="grey",r.subtitlePosition_=void 0,r.subtitleFontWeight_="bold",r.subtitleStroke_="none",r.subtitleStrokeWidth_="none",r.frameStroke_="grey",r.frameStrokeWidth_=.5,r.showScalebar_=!1,r.scalebarPosition_=[],r.scalebarFontSize_=9,r.scalebarUnits_=" km",r.scalebarTextOffset_=[0,12],r.scalebarMaxWidth_=150,r.scalebarHeight_=90,r.scalebarStrokeWidth_=1,r.scalebarSegmentHeight_=6,r.scalebarTickHeight_=8,r.tooltip_={maxWidth:"200px",fontSize:"14px",background:"white",padding:"5px",border:"0px",borderRadius:"5px",boxShadow:"5px 5px 5px grey",transitionDuration:200,xOffset:0,yOffset:0,textFunction:null,showFlags:!1},r.tooltipText_=function(t){return t.properties.na},r.tooltipShowFlags_=!1,r.bordersToShow_=["eu","efta","cc","oth","co"],r.countriesToShow_=["AL","AT","BE","BG","CH","CY","CZ","DE","DK","EE","EL","ES","FI","FR","HR","HU","IE","IS","IT","LI","LT","LU","LV","ME","MK","MT","NL","NO","PL","PT","RO","RS","SE","SI","SK","TR","UK"],r.nutsrgFillStyle_="white",r.nutsrgSelFillSty_="#e0bcdf",r.nutsbnStroke_={0:"black",1:"black",2:"black",3:"black",oth:"grey",co:"black"},r.nutsbnStrokeWidth_={0:1,1:.4,2:.4,3:.4,oth:0,co:.3},r.cntrgFillStyle_="#f4f4f4",r.cntbnStroke_={eu:"black",efta:"black",cc:"black",oth:"grey",co:"#7f7f7f"},r.cntbnStrokeWidth_={eu:1,efta:1,cc:1,oth:.5,co:.2},r.worldFillStyle_="#E6E6E6",r.worldStroke_="black",r.worldStrokeWidth_=1,r.worldCoastStroke_="none",r.worldCoastStrokeWidth_=.3,r.seaFillStyle_="white",r.drawCoastalMargin_=!0,r.coastalMarginColor_="#c2daed",r.coastalMarginWidth_=5,r.coastalMarginStdDev_=2,r.drawGraticule_=!1,r.graticuleStroke_="lightgray",r.graticuleStrokeWidth_=1,r.labelling_=!1,r.labelsConfig_=Zu,r.labelsToShow_=["countries","seas"],r.labelFill_={seas:"#003399",countries:"black",cc:"black",values:"black"},r.labelStroke_={seas:"#003399",countries:"black",cc:"black",values:"black"},r.labelStrokeWidth_={seas:.5,countries:.5,cc:.5,values:.5},r.labelOpacity_={seas:1,countries:.8,cc:.8,values:.9},r.labelValuesFontSize_=10,r.labelShadow_=!1,r.labelShadowWidth_={seas:3,countries:3,cc:3,values:1},r.labelShadowColor_={seas:"white",countries:"white",cc:"white",values:"white"},r.showSourceLink_=!0,r.bottomText_="Administrative boundaries: ©EuroGeographics ©UN-FAO ©INSTAT ©Turkstat",r.botTxtFontSize_=10,r.botTxtFill_="black",r.botTxtPadding_=10,r.botTxtTooltipTxt_="The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the European Union concerning the legal status of any country, territory, city or area or of its authorities, or concerning the delimitation of its frontiers or boundaries. Kosovo*: This designation is without prejudice to positions on status, and is in line with UNSCR 1244/1999 and the ICJ Opinion on the Kosovo declaration of independence. Palestine*: This designation shall not be construed as recognition of a State of Palestine and is without prejudice to the individual positions of the Member States on this issue.",r.nuts2jsonBaseURL_="https://raw.githubusercontent.com/eurostat/Nuts2json/master/pub/v2/",r.insets_=[],r.insetTemplates_={},r.insetBoxPosition_=void 0,r.insetBoxPadding_=5,r.insetBoxWidth_=210,r.insetZoomExtent_=null,r.insetScale_="03M",r._geom={mixed:{rg0:void 0,rg1:void 0,rg2:void 0,rg3:void 0},cntbn:void 0,cntrg:void 0,nutsbn:void 0,nutsrg:void 0,gra:void 0,worldrg:void 0,worldbn:void 0,kosovo:void 0,path:void 0};var o=function(t){r[t.substring(0,t.length-1)]=function(e){return arguments.length?(r[t]=e,r):r[t]}};for(var a in r)o(a);["tooltip_"].forEach((function(t){r[t.substring(0,t.length-1)]=function(e){if(!arguments.length)return r[t];if("object"===Yi()(e)&&null!==e)for(var n in e)r[t][n]=e[n];else r[t]=e;return l(t,e),r}}));var l=function(t,e){if(r.insetTemplates_)for(var n in r.insetTemplates_)if(Array.isArray(r.insetTemplates_[n]))for(var i=0;i<r.insetTemplates_[n].length;i++)if(Array.isArray(r.insetTemplates_[n][i]))for(var o=0;o<r.insetTemplates_[n][i].length;o++)r.insetTemplates_[n][i][o][t](e);else r.insetTemplates_[n][i][t](e);else r.insetTemplates_[n][t](e)};r.tooltipText=function(t){return console.log("map.tooltipText() is now deprecated. Please use map.tooltip(config.textFunction) instead. See API reference for details."),r.tooltip_.textFunction=t,r},r.title=function(t){return arguments.length?(r.title_=t,r.svg()&&r.svg().select("#title"+r.geo()).text(t),r):r.title_},r.subtitle=function(t){return arguments.length?(r.subtitle_=t,r.svg()&&r.svg().select("#subtitle"+r.geo()).text(t),r):r.subtitle_},r.insets=function(){return arguments.length?(1==arguments.length&&"default"===arguments[0]?r.insets_="default":1==arguments.length&&Array.isArray(arguments[0])?r.insets_=arguments[0]:r.insets_=arguments,r):r.insets_},r.drawGraticule=function(t){if(!arguments.length)return r.drawGraticule_;r.drawGraticule_=t;var e=yt("#g_gra"),n=r.svg_?r.svg_.select("#zoomgroup"+r.svgId_):null;return e._groups[0][0]&&0==t?e.remove():r._geom.gra&&r._geom.path&&n&&1==t&&(e.remove(),n.append("g").attr("id","g_gra").style("fill","none").style("stroke",r.graticuleStroke()).style("stroke-width",r.graticuleStrokeWidth()).selectAll("path").data(r._geom.gra).enter().append("path").attr("d",r._geom.path).attr("class","gra"),yt("#g_gra").each((function(){"WORLD"==r.geo_?this.parentNode.insertBefore(this,this.parentNode.childNodes[3]):this.parentNode.insertBefore(this,this.parentNode.childNodes[1])}))),r},r.seaFillStyle=function(t){if(!arguments.length)return r.seaFillStyle_;if(r.seaFillStyle_=t,"WORLD"==r.geo_){var e=yt("#sphere");e&&e.style("fill",r.seaFillStyle_)}else{var n=Ia("#sea");n&&n.style("fill",r.seaFillStyle_)}for(var i in r.insetTemplates_)if(Array.isArray(r.insetTemplates_[i]))for(var o=0;o<r.insetTemplates_[i].length;o++)if(Array.isArray(r.insetTemplates_[i][o]))for(var a=0;a<r.insetTemplates_[i][o].length;a++){var l=r.insetTemplates_[i][o][a];l.seaFillStyle_=r.seaFillStyle_}else{var s=r.insetTemplates_[i][o];s.seaFillStyle_=r.seaFillStyle_}else{var u=r.insetTemplates_[i];u.seaFillStyle_=r.seaFillStyle_}return r},r.cntrgFillStyle=function(t){if(!arguments.length)return r.cntrgFillStyle_;if(r.cntrgFillStyle_=t,"WORLD"==r.geo_){var e=Ia(".worldrg");e&&e.style("fill",r.cntrgFillStyle_)}else{var n=Ia(".cntrg");n&&n.style("fill",r.cntrgFillStyle_)}for(var i in r.insetTemplates_)if(Array.isArray(r.insetTemplates_[i]))for(var o=0;o<r.insetTemplates_[i].length;o++)if(Array.isArray(r.insetTemplates_[i][o]))for(var a=0;a<r.insetTemplates_[i][o].length;a++){var l=r.insetTemplates_[i][o][a];l.cntrgFillStyle_=r.cntrgFillStyle_}else{var s=r.insetTemplates_[i][o];s.cntrgFillStyle_=r.cntrgFillStyle_}else{var u=r.insetTemplates_[i];u.cntrgFillStyle_=r.cntrgFillStyle_}return r},r.drawCoastalMargin=function(t){if(!arguments.length)return r.drawCoastalMargin_;r.drawCoastalMargin_=t;var e=Ia("#g_coast_margin"),n=yt("#coastal_blur"),i=r.svg_?r.svg_.select("#zoomgroup"+r.svgId_):null;if(e._groups[0][0]&&0==t)e.remove();else if(1==t&&r._geom.path&&i){e.remove(),n.remove(),r.svg_.append("filter").attr("id","coastal_blur").attr("x","-200%").attr("y","-200%").attr("width","400%").attr("height","400%").append("feGaussianBlur").attr("in","SourceGraphic").attr("stdDeviation",r.coastalMarginStdDev_);var o=function(t){var e=r.svg().select("#zoomgroup"+t.svgId_).append("g").attr("id","g_coast_margin").style("fill","none").style("stroke-width",t.coastalMarginWidth_).style("stroke",t.coastalMarginColor_).style("filter","url(#coastal_blur)").style("stroke-linejoin","round").style("stroke-linecap","round");t._geom.cntbn&&e.append("g").attr("id","g_coast_margin_cnt").selectAll("path").data(t._geom.cntbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",t._geom.path),t._geom.nutsbn&&e.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(t._geom.nutsbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",t._geom.path),t._geom.worldbn&&e.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(t._geom.worldbn).enter().filter((function(t){return"T"===t.properties.COAS_FLAG})).append("path").attr("d",t._geom.path)};for(var a in r.insetTemplates_)if(Array.isArray(r.insetTemplates_[a]))for(var l=0;l<r.insetTemplates_[a].length;l++)if(Array.isArray(r.insetTemplates_[a][l]))for(var s=0;s<r.insetTemplates_[a][l].length;s++){var u=r.insetTemplates_[a][l][s];u.drawCoastalMargin_=r.drawCoastalMargin_;r.svg().select("#zoomgroup"+u.svgId_);r.drawCoastalMargin_&&o(u)}else{var c=r.insetTemplates_[a][l];c.drawCoastalMargin_=r.drawCoastalMargin_;r.svg().select("#zoomgroup"+c.svgId_);r.drawCoastalMargin_&&o(c)}else{var f=r.insetTemplates_[a];f.drawCoastalMargin_=r.drawCoastalMargin_;r.svg().select("#zoomgroup"+f.svgId_);r.drawCoastalMargin_&&o(f)}r.drawCoastalMargin_&&o(r),Ia("#g_coast_margin").each((function(){"WORLD"==r.geo_?this.parentNode.insertBefore(this,this.parentNode.childNodes[3]):this.parentNode.insertBefore(this,this.parentNode.childNodes[1])}))}return r},r.coastalMarginWidth=function(t){if(!arguments.length)return r.coastalMarginWidth_;for(var e in r.coastalMarginWidth_=t,r.insetTemplates_)if(Array.isArray(r.insetTemplates_[e]))for(var n=0;n<r.insetTemplates_[e].length;n++)if(Array.isArray(r.insetTemplates_[e][n]))for(var i=0;i<r.insetTemplates_[e][n].length;i++){var o=r.insetTemplates_[e][n][i];o.coastalMarginWidth_=r.coastalMarginWidth_,o.drawCoastalMargin(!0)}else{var a=r.insetTemplates_[e][n];a.coastalMarginWidth_=r.coastalMarginWidth_,a.drawCoastalMargin(!0)}else{var l=r.insetTemplates_[e];l.coastalMarginWidth_=r.coastalMarginWidth_,l.drawCoastalMargin(!0)}return r.drawCoastalMargin(!0),r},r.coastalMarginColor=function(t){if(!arguments.length)return r.coastalMarginColor_;for(var e in r.coastalMarginColor_=t,r.insetTemplates_)if(Array.isArray(r.insetTemplates_[e]))for(var n=0;n<r.insetTemplates_[e].length;n++)if(Array.isArray(r.insetTemplates_[e][n]))for(var i=0;i<r.insetTemplates_[e][n].length;i++){var o=r.insetTemplates_[e][n][i];o.coastalMarginColor_=r.coastalMarginColor_,o.drawCoastalMargin(!0)}else{var a=r.insetTemplates_[e][n];a.coastalMarginColor_=r.coastalMarginColor_,a.drawCoastalMargin(!0)}else{var l=r.insetTemplates_[e];l.coastalMarginColor_=r.coastalMarginColor_,l.drawCoastalMargin(!0)}return r.drawCoastalMargin(!0),r};var s=void 0,u=void 0,c=void 0;function f(t,e){var n=t.labelsConfig_,r=t.lg_,i=[],o=e.append("g").attr("class","labels-container");if((t.labelsToShow_.includes("countries")||t.labelsToShow_.includes("seas"))&&(i=n[t.geo_+"_"+t.proj_][r]?n[t.geo_+"_"+t.proj_][r]:n[t.geo_+"_"+t.proj_].en),t.labelsToShow_.includes("cc")&&(i=i.concat(n[t.geo_+"_"+t.proj_].cc)),t.labelsToShow_.includes("values")&&t._geom.nutsrg){var a,l=o.append("g").attr("class","g_stat_label_shadows").style("font-size",t.labelValuesFontSize_+"px").attr("text-anchor","middle").style("opacity",(function(e){return t.labelOpacity_.values})).style("fill",(function(e){return t.labelShadowColor_.values})).attr("stroke",(function(e){return t.labelShadowColor_.values})).attr("stroke-width",(function(e){return t.labelStrokeWidth_.values+t.labelShadowWidth_.values})).style("font-family",t.fontFamily_),s=o.append("g").attr("class","g_stat_labels").style("font-size",t.labelValuesFontSize_+"px").attr("text-anchor","middle").style("opacity",(function(e){return t.labelOpacity_.values})).style("fill",(function(e){return t.labelFill_.values})).attr("stroke",(function(e){return t.labelStroke_.values})).attr("stroke-width",(function(e){return t.labelStrokeWidth_.values})).style("font-family",t.fontFamily_);"mixed"==t.nutsLvl_?(t._geom.mixed.rg0=t._geom.nutsrg,t._geom.mixed.rg1=Gu(u[1],u[1].objects.nutsrg).features,t._geom.mixed.rg2=Gu(u[2],u[2].objects.nutsrg).features,t._geom.mixed.rg3=Gu(u[3],u[3].objects.nutsrg).features,a=t._geom.mixed.rg0.concat(t._geom.mixed.rg1,t._geom.mixed.rg2,t._geom.mixed.rg3)):a=t._geom.nutsrg,s.selectAll("g").data(a).enter().append("g").attr("transform",(function(e){return"translate("+t._geom.path.centroid(e)+")"})).attr("class","stat-label"),t.labelShadow_&&l.selectAll("g").data(a).enter().append("g").attr("transform",(function(e){return"translate("+t._geom.path.centroid(e)+")"})).attr("class","stat-label-shadow")}if(i){var c=i.filter((function(e){return"countries"==e.class&&t.labelsToShow_.includes("countries")||"seas"==e.class&&t.labelsToShow_.includes("seas")||"cc"==e.class&&t.labelsToShow_.includes("cc")?e:void 0})),f=o.append("g").attr("class","g_labelShadows").style("pointer-events","none").style("font-family",t.fontFamily_).attr("text-anchor","middle"),h=o.append("g").attr("class","g_geolabels").style("pointer-events","none").style("font-family",t.fontFamily_).attr("text-anchor","middle");if(t.labelShadow_)f.selectAll("text").data(c).enter().append("text").attr("class",(function(t){return"labelShadow_"+t.class})).attr("x",(function(e){return e.rotate?0:t._projection([e.x,e.y])[0]})).attr("y",(function(e){return e.rotate?0:t._projection([e.x,e.y])[1]})).attr("dy",-7).style("opacity",(function(e){return t.labelOpacity_[e.class]})).style("letter-spacing",(function(t){return t.letterSpacing?t.letterSpacing:0})).style("fill",(function(e){return t.labelShadowColor_[e.class]})).attr("stroke",(function(e){return t.labelShadowColor_[e.class]})).attr("stroke-width",(function(e){return t.labelStrokeWidth_[e.class]+t.labelShadowWidth_[e.class]})).style("font-size",(function(t){return t.size+"px"})).style("font-style",(function(t){return"seas"==t.class?"italic":"normal"})).attr("transform",(function(e){if(e.rotate){var n=t._projection([e.x,e.y]),r=n[0],i=n[1];return"translate(".concat(r,",").concat(i,") rotate(").concat(e.rotate,")")}return"rotate(0)"})).style("font-style",(function(t){return"seas"==t.class?"italic":"normal"})).text((function(t){return t.text}));h.selectAll("text").data(c).enter().append("text").attr("class",(function(t){return"geolabel_"+t.class})).attr("x",(function(e){return e.rotate?0:t._projection([e.x,e.y])[0]})).attr("y",(function(e){return e.rotate?0:t._projection([e.x,e.y])[1]})).attr("dy",-7).style("opacity",(function(e){return t.labelOpacity_[e.class]})).style("letter-spacing",(function(t){return t.letterSpacing?t.letterSpacing:0})).style("fill",(function(e){return t.labelFill_[e.class]})).attr("stroke",(function(e){return t.labelStroke_[e.class]})).attr("stroke-width",(function(e){return t.labelStrokeWidth_[e.class]})).style("font-size",(function(t){return t.size+"px"})).attr("transform",(function(e){if(e.rotate){var n=t._projection([e.x,e.y]),r=n[0],i=n[1];return"translate(".concat(r,",").concat(i,") rotate(").concat(e.rotate,")")}return"rotate(0)"})).text((function(t){return t.text}))}}function h(t){return t<.01?1e3*t+"mm":t<1?100*t+"cm":t<1e3?1*t+"m":t/1e3}r.isGeoReady=function(){if(!s)return!1;for(var t in r.insetTemplates_)if(Array.isArray(r.insetTemplates_[t])){for(var e=0;e<r.insetTemplates_[t].length;e++)if(Array.isArray(r.insetTemplates_[t][e])){for(var n=0;n<r.insetTemplates_[t][e].length;n++)if(!r.insetTemplates_[t][e][n].isGeoReady())return!1}else if(!r.insetTemplates_[t][e].isGeoReady())return!1}else if(!r.insetTemplates_[t].isGeoReady())return!1;return!0},r.getGeoDataPromise=function(){var t=this;if("mixed"==r.nutsLvl_&&"WORLD"!==r.geo_){var e=[];return[0,1,2,3].forEach((function(n){var i=[];i.push(r.nuts2jsonBaseURL_),i.push(r.nutsYear_),"EUR"!=r.geo_&&i.push("/"+t.geo_),i.push("/"),i.push(r.proj_),i.push("/"),i.push(r.scale_),i.push("/"),i.push(n),i.push(".json"),e.push(Vi(i.join("")))})),n&&[0,1,2,3].forEach((function(n){var i=[];i.push(r.nuts2jsonBaseURL_),i.push(r.nutsYear_),"EUR"!=r.geo_&&i.push("/"+t.geo_),i.push("/"),i.push(r.proj_),i.push("/nutspt_"),i.push(n),i.push(".json"),e.push(Vi(i.join("")))})),e}if("WORLD"==r.geo_)return[Vi("https://raw.githubusercontent.com/eurostat/eurostat-map.js/master/src/assets/topojson/WORLD_4326.json")];var i=[],o=[];if(o.push(r.nuts2jsonBaseURL_),o.push(r.nutsYear_),"EUR"!=r.geo_&&o.push("/"+this.geo_),o.push("/"),o.push(r.proj_),o.push("/"),o.push(r.scale_),o.push("/"),o.push(r.nutsLvl_),o.push(".json"),i.push(Vi(o.join(""))),n){var a=[];a.push(r.nuts2jsonBaseURL_),a.push(r.nutsYear_),"EUR"!=r.geo_&&a.push("/"+this.geo_),a.push("/"),a.push(r.proj_),a.push("/nutspt_"),a.push(r.nutsLvl_),a.push(".json"),i.push(Vi(a.join("")))}return i},r.updateGeoMT=function(t){if(s=null,u=null,c=null,"mixed"==r.nutsLvl_&&"WORLD"!==r.geo_){var e=r.getGeoDataPromise();Promise.all(e).then((function(e){u=e,s=e[0],n&&(c=[e[4],e[5],e[6],e[7]]),r.buildMapTemplate(),t&&t()}),(function(t){console.error(t)}))}else{var i=r.getGeoDataPromise();Promise.all(i).then((function(e){s=e[0],n&&(c=e[1]),r.buildMapTemplate(),t&&t()}),(function(t){console.error(t)}))}for(var o in r.insetTemplates_)if(Array.isArray(r.insetTemplates_[o]))for(var a=0;a<r.insetTemplates_[o].length;a++)if(Array.isArray(r.insetTemplates_[o][a]))for(var l=0;l<r.insetTemplates_[o][a].length;l++)r.insetTemplates_[o][a][l].updateGeoMT(t);else r.insetTemplates_[o][a].updateGeoMT(t);else r.insetTemplates_[o].updateGeoMT(t);return r},r.buildMapTemplateBase=function(){r.insetTemplates_={};var t=yt("#"+r.svgId());0==t.size()&&(t=yt("body").append("svg").attr("id",r.svgId())),r.svg(t),r.containerId_||(r.containerId_=r.svgId_),r.tooltip_.containerId||(r.tooltip_.containerId=r.containerId_),Ia("#"+r.svgId()+" > *").remove(),"WORLD"==r.geo_.toUpperCase()&&(r.height()||r.height(.55*r.width()),t.attr("width",r.width()).attr("height",r.height()),r.proj_=54030),r.height()||r.height(.85*r.width()),t.attr("width",r.width()).attr("height",r.height()),t.append("defs").append("clipPath").attr("id",r.svgId_+"_clipP").append("path").attr("d",function(t,e,n,r){t=parseFloat(t,10),e=parseFloat(e,10),n=parseFloat(n,10),r=parseFloat(r,10);if(t<0||e<0||n<0||r<0)return"";return"M"+t+","+e+"L"+(t+n)+","+e+" "+(t+n)+","+(e+r)+" "+t+","+(e+r)+"z"}(0,0,r.width_,r.height_)),r.drawCoastalMargin_&&t.append("filter").attr("id","coastal_blur").attr("x","-200%").attr("y","-200%").attr("width","400%").attr("height","400%").append("feGaussianBlur").attr("in","SourceGraphic").attr("stdDeviation",r.coastalMarginStdDev_);var e=t.insert("g",":first-child").attr("id","drawing"+r.svgId_).attr("clip-path","url(#"+r.svgId_+"_clipP)"),n=e.append("g").attr("id","zoomgroup"+r.svgId_);r.insetBoxPosition_||(r.insetBoxPosition_=[r.width()-r.insetBoxWidth()-2*r.insetBoxPadding(),2*r.insetBoxPadding()]);var i=e.append("g").attr("id","insetsgroup").attr("transform","translate("+r.insetBoxPosition()[0]+","+r.insetBoxPosition()[1]+")");"default"===r.insets_&&(r.insets_=tc(r.insetBoxWidth(),r.insetBoxPadding()));for(var o=0;o<r.insets_.length;o++){var a=r.insets_[o];if(a.svgId=a.svgId||"inset"+a.geo+Math.random().toString(36).substring(7),0==yt("#"+a.svgId).size()){var l=null==a.x?r.insetBoxPadding_:a.x,s=null==a.y?r.insetBoxPadding_+o*(r.insetBoxPadding_+r.insetBoxWidth_):a.y;i.append("g").attr("id","insetzg"+a.svgId).attr("transform","translate("+l+","+s+")").append("svg").attr("id",a.svgId)}r.insetTemplates_[a.geo]?r.insetTemplates_[a.geo]=[r.insetTemplates_[a.geo],p(a,r).buildMapTemplateBase()]:r.insetTemplates_[a.geo]=p(a,r).buildMapTemplateBase()}if(e.append("rect").attr("id","frame"+r.geo_).attr("x",0).attr("y",0).attr("width",r.width_).attr("height",r.height_).style("stroke-width",r.frameStrokeWidth_).style("stroke",r.frameStroke_).style("fill","none"),r.zoomExtent()){var u=function(){var t,e,n=La,r=Na,i=Ra,o=Pa,a=Oa,l=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,c=so,f=to("start","zoom","end"),h=0;function p(t){t.property("__zoom",Da).on("wheel.zoom",x).on("mousedown.zoom",b).on("dblclick.zoom",S).filter(a).on("touchstart.zoom",w).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",M).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new za(e,t.x,t.y)}function g(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new za(t.k,r,i)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function _(t,e,n){t.on("start.zoom",(function(){v(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){v(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,o=v(t,i),a=r.apply(t,i),l=null==n?y(a):"function"==typeof n?n.apply(t,i):n,s=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),u=t.__zoom,f="function"==typeof e?e.apply(t,i):e,h=c(u.invert(l).concat(s/u.k),f.invert(l).concat(s/f.k));return function(t){if(1===t)t=f;else{var e=h(t),n=s/e[2];t=new za(n,l[0]-e[0]*n,l[1]-e[1]*n)}o.zoom(null,t)}}))}function v(t,e,n){return!n&&t.__zooming||new m(t,e)}function m(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function x(){if(n.apply(this,arguments)){var t=v(this,arguments),e=this.__zoom,r=Math.max(l[0],Math.min(l[1],e.k*Math.pow(2,o.apply(this,arguments)))),a=fo(this);if(t.wheel)t.mouse[0][0]===a[0]&&t.mouse[0][1]===a[1]||(t.mouse[1]=e.invert(t.mouse[0]=a)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[a,e.invert(a)],Uo(this),t.start()}Ea(),t.wheel=setTimeout(u,150),t.zoom("mouse",i(g(d(e,r),t.mouse[0],t.mouse[1]),t.extent,s))}function u(){t.wheel=null,t.end()}}function b(){if(!e&&n.apply(this,arguments)){var t=v(this,arguments,!0),r=yt(nt.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",c,!0),o=fo(this),a=nt.clientX,l=nt.clientY;no(nt.view),Aa(),t.mouse=[o,this.__zoom.invert(o)],Uo(this),t.start()}function u(){if(Ea(),!t.moved){var e=nt.clientX-a,n=nt.clientY-l;t.moved=e*e+n*n>h}t.zoom("mouse",i(g(t.that.__zoom,t.mouse[0]=fo(t.that),t.mouse[1]),t.extent,s))}function c(){r.on("mousemove.zoom mouseup.zoom",null),ro(nt.view,t.moved),Ea(),t.end()}}function S(){if(n.apply(this,arguments)){var t=this.__zoom,e=fo(this),o=t.invert(e),a=t.k*(nt.shiftKey?.5:2),l=i(g(d(t,a),e,o),r.apply(this,arguments),s);Ea(),u>0?yt(this).transition().duration(u).call(_,l,e):yt(this).call(p.transform,l)}}function w(){if(n.apply(this,arguments)){var e,r,i,o,a=nt.touches,l=a.length,s=v(this,arguments,nt.changedTouches.length===l);for(Aa(),r=0;r<l;++r)i=a[r],o=[o=ho(this,a,i.identifier),this.__zoom.invert(o),i.identifier],s.touch0?s.touch1||s.touch0[2]===o[2]||(s.touch1=o,s.taps=0):(s.touch0=o,e=!0,s.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(s.taps<2&&(t=setTimeout((function(){t=null}),500)),Uo(this),s.start())}}function T(){if(this.__zooming){var e,n,r,o,a=v(this,arguments),l=nt.changedTouches,u=l.length;for(Ea(),t&&(t=clearTimeout(t)),a.taps=0,e=0;e<u;++e)n=l[e],r=ho(this,l,n.identifier),a.touch0&&a.touch0[2]===n.identifier?a.touch0[0]=r:a.touch1&&a.touch1[2]===n.identifier&&(a.touch1[0]=r);if(n=a.that.__zoom,a.touch1){var c=a.touch0[0],f=a.touch0[1],h=a.touch1[0],p=a.touch1[1],y=(y=h[0]-c[0])*y+(y=h[1]-c[1])*y,_=(_=p[0]-f[0])*_+(_=p[1]-f[1])*_;n=d(n,Math.sqrt(y/_)),r=[(c[0]+h[0])/2,(c[1]+h[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!a.touch0)return;r=a.touch0[0],o=a.touch0[1]}a.zoom("touch",i(g(n,r,o),a.extent,s))}}function M(){if(this.__zooming){var t,n,r=v(this,arguments),i=nt.changedTouches,o=i.length;for(Aa(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),500),t=0;t<o;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var a=yt(this).on("dblclick.zoom");a&&a.apply(this,arguments)}}}return p.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",Da),t!==r?_(t,e,n):r.interrupt().each((function(){v(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},p.scaleBy=function(t,e,n){p.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},p.scaleTo=function(t,e,n){p.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,a=null==n?y(t):"function"==typeof n?n.apply(this,arguments):n,l=o.invert(a),u="function"==typeof e?e.apply(this,arguments):e;return i(g(d(o,u),a,l),t,s)}),n)},p.translateBy=function(t,e,n){p.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),s)}))},p.translateTo=function(t,e,n,o){p.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,l=null==o?y(t):"function"==typeof o?o.apply(this,arguments):o;return i(Fa.translate(l[0],l[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,s)}),o)},m.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){st(new ka(p,t,this.that.__zoom),f.apply,f,[t,this.that,this.args])}},p.wheelDelta=function(t){return arguments.length?(o="function"==typeof t?t:Ma(+t),p):o},p.filter=function(t){return arguments.length?(n="function"==typeof t?t:Ma(!!t),p):n},p.touchable=function(t){return arguments.length?(a="function"==typeof t?t:Ma(!!t),p):a},p.extent=function(t){return arguments.length?(r="function"==typeof t?t:Ma([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),p):r},p.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],p):[l[0],l[1]]},p.translateExtent=function(t){return arguments.length?(s[0][0]=+t[0][0],s[1][0]=+t[1][0],s[0][1]=+t[0][1],s[1][1]=+t[1][1],p):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},p.constrain=function(t){return arguments.length?(i=t,p):i},p.duration=function(t){return arguments.length?(u=+t,p):u},p.interpolate=function(t){return arguments.length?(c=t,p):c},p.on=function(){var t=f.on.apply(f,arguments);return t===f?p:t},p.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,p):Math.sqrt(h)},p}().scaleExtent(r.zoomExtent()).on("zoom",(function(){for(var t=nt.transform.k,e=["gra","bn_0","bn_co","cntbn","symbol"],i=0;i<e.length;i++)r.svg().selectAll("."+e[i]).style("stroke-width",(function(e){return 1/t+"px"}));n.attr("transform",nt.transform)})).on("end",(function(){var e=Ca(t.node()),n=(fo(this),e.invert([r.width_/2,r.height_/2])),i=r._projection.invert(n);console.log("geoCenter: ",[parseInt(i[0]),parseInt(i[1])]),console.log("pixSize:",parseInt(r.pixSize_/e.k))}));t.call(u)}return r},r.buildMapTemplate=function(){r.tooltip_?r._tooltip=Xu(r.tooltip_):r._tooltip=Xu();var t=Qu[r.geo()+"_"+r.proj()];r.geoCenter()||(t?r.geoCenter(t.geoCenter):r.geoCenter([.5*(s.bbox[0]+s.bbox[2]),.5*(s.bbox[1]+s.bbox[3])])),r.pixSize()||(t?r.pixSize(800*t.pixSize/r.width()):r.pixSize(Math.min((s.bbox[2]-s.bbox[0])/r.width_,(s.bbox[3]-s.bbox[1])/r.height_)));var e,o=[r.geoCenter_[0]-.5*r.pixSize_*r.width_,r.geoCenter_[1]-.5*r.pixSize_*r.height_,r.geoCenter_[0]+.5*r.pixSize_*r.width_,r.geoCenter_[1]+.5*r.pixSize_*r.height_];"WORLD"==r.geo_?"54030"==r.proj_?r._projection=Au(ju).scale(152.63).translate([r.width_/2,r.height_/2]).scale((r.width_-20)/2/Math.PI):console.error("unsupported projection"):r._projection=function(){var t,e,n,r,i,o,a,l=1,s=0,u=0,c=1,f=1,h=0,p=null,d=1,g=1,y=ul({point:function(t,e){var n=m([t,e]);this.stream.point(n[0],n[1])}}),_=sl;function v(){return d=l*c,g=l*f,o=a=null,m}function m(n){var r=n[0]*d,i=n[1]*g;if(h){var o=i*t-r*e;r=r*t+i*e,i=o}return[r+s,i+u]}return m.invert=function(n){var r=n[0]-s,i=n[1]-u;if(h){var o=i*t+r*e;r=r*t-i*e,i=o}return[r/d,i/g]},m.stream=function(t){return o&&a===t?o:o=y(_(a=t))},m.postclip=function(t){return arguments.length?(_=t,p=n=r=i=null,v()):_},m.clipExtent=function(t){return arguments.length?(_=null==t?(p=n=r=i=null,sl):ll(p=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),v()):null==p?null:[[p,n],[r,i]]},m.scale=function(t){return arguments.length?(l=+t,v()):l},m.translate=function(t){return arguments.length?(s=+t[0],u=+t[1],v()):[s,u]},m.angle=function(n){return arguments.length?(e=Ka(h=n%360*Ya),t=Za(h),v()):h*Ga},m.reflectX=function(t){return arguments.length?(c=t?-1:1,v()):c<0},m.reflectY=function(t){return arguments.length?(f=t?-1:1,v()):f<0},m.fitExtent=function(t,e){return wl(m,t,e)},m.fitSize=function(t,e){return Tl(m,t,e)},m.fitWidth=function(t,e){return Ml(m,t,e)},m.fitHeight=function(t,e){return kl(m,t,e)},m}().reflectY(!0).fitSize([r.width_,r.height_],{type:"Feature",geometry:{type:"MultiPoint",coordinates:[[(e=o)[0],e[1]],[e[2],e[3]]]}}),r._geom.path=function(t,e){var n,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),yl(t,n(r))),r.result()}return o.area=function(t){return yl(t,n(ql)),ql.result()},o.measure=function(t){return yl(t,n(ws)),ws.result()},o.bounds=function(t){return yl(t,n(bl)),bl.result()},o.centroid=function(t){return yl(t,n(hs)),hs.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,sl):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new Ts):new ps(e=t),"function"!=typeof i&&r.pointRadius(i),o):e},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(e)}().projection(r._projection),"WORLD"==r.geo_?(r._geom.worldrg=Gu(s,s.objects.CNTR_RG_20M_2020_4326).features,r._geom.worldbn=Gu(s,s.objects.CNTR_BN_20M_2020_4326).features,r._geom.kosovo=Gu(s,s.objects.NUTS_BN_20M_2021_RS_XK_border).features,r._geom.gra=[Gs().step([30,30])()]):(r._geom.gra=Gu(s,s.objects.gra).features,r._geom.nutsrg=Gu(s,s.objects.nutsrg).features,r._geom.nutsbn=Gu(s,s.objects.nutsbn).features,r._geom.cntrg=Gu(s,s.objects.cntrg).features,r._geom.cntbn=Gu(s,s.objects.cntbn).features);var a,l=r.svg().select("#zoomgroup"+r.svgId_);if(l.selectAll("*").remove(),l.append("rect").attr("id","sea").attr("x",-5*r.width_).attr("y",-5*r.height_).attr("width",11*r.width_).attr("height",11*r.height_).style("fill",(function(){return"WORLD"==r.geo_?"white":r.seaFillStyle_})),"WORLD"==r.geo_&&l.append("path").datum({type:"Sphere"}).attr("id","sphere").attr("d",r._geom.path).attr("stroke",r.graticuleStroke()).attr("stroke-width",r.graticuleStrokeWidth()).attr("fill",r.seaFillStyle_),r.drawCoastalMargin_){var p=l.append("g").attr("id","g_coast_margin").style("fill","none").style("stroke-width",r.coastalMarginWidth_).style("stroke",r.coastalMarginColor_).style("filter","url(#coastal_blur)").style("stroke-linejoin","round").style("stroke-linecap","round");r._geom.cntbn&&p.append("g").attr("id","g_coast_margin_cnt").selectAll("path").data(r._geom.cntbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",r._geom.path),r._geom.nutsbn&&p.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(r._geom.nutsbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",r._geom.path),r._geom.worldbn&&p.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(r._geom.worldbn).enter().filter((function(t){return"T"===t.properties.COAS_FLAG})).append("path").attr("d",r._geom.path)}if(r._geom.gra&&r.drawGraticule_&&l.append("g").attr("id","g_gra").style("fill","none").style("stroke",r.graticuleStroke()).style("stroke-width",r.graticuleStrokeWidth()).selectAll("path").data(r._geom.gra).enter().append("path").attr("d",r._geom.path).attr("class","gra"),r._geom.cntrg&&l.append("g").attr("id","g_cntrg").selectAll("path").data(r._geom.cntrg).enter().append("path").attr("d",r._geom.path).attr("class","cntrg").style("fill",r.cntrgFillStyle()),r._geom.worldrg&&l.append("g").attr("id","g_worldrg").selectAll("path").data(r._geom.worldrg).enter().append("path").attr("d",r._geom.path).attr("class","worldrg").attr("fill",r.worldFillStyle_),r._geom.nutsrg)if("mixed"==r.nutsLvl_){if(r._geom.mixed.rg0=r._geom.nutsrg,r._geom.mixed.rg1=Gu(u[1],u[1].objects.nutsrg).features,r._geom.mixed.rg2=Gu(u[2],u[2].objects.nutsrg).features,r._geom.mixed.rg3=Gu(u[3],u[3].objects.nutsrg).features,[r._geom.mixed.rg0,r._geom.mixed.rg1,r._geom.mixed.rg2,r._geom.mixed.rg3].forEach((function(t,e){l.append("g").attr("id","g_nutsrg").selectAll("path").data(t).enter().append("path").attr("d",r._geom.path).attr("class","nutsrg").attr("lvl",e).attr("fill",r.nutsrgFillStyle_)})),"EUR"==r.geo_){var d=Gu($u[r.scale_],"nutsbn_1").features;r.bordersToShow_.includes("cc")&&l.append("g").attr("id","g_kosovo").style("fill","none").selectAll("path").data(d).enter().append("path").attr("d",r._geom.path).style("stroke","grey").style("stroke-width",.3)}}else l.append("g").attr("id","g_nutsrg").selectAll("path").data(r._geom.nutsrg).enter().append("path").attr("d",r._geom.path).attr("class","nutsrg").attr("fill",r.nutsrgFillStyle_);if(r._geom.cntbn&&l.append("g").attr("id","g_cntbn").style("fill","none").selectAll("path").data(r._geom.cntbn).enter().append("path").filter((function(t){return r.bordersToShow_.includes("eu")&&"T"==t.properties.eu||r.bordersToShow_.includes("efta")&&"T"==t.properties.efta||r.bordersToShow_.includes("cc")&&"T"==t.properties.cc||r.bordersToShow_.includes("oth")&&"T"==t.properties.oth||r.bordersToShow_.includes("co")&&"T"==t.properties.co?t:void 0})).attr("d",r._geom.path).attr("class",(function(t){return"T"===t.properties.co?"bn_co":"cntbn"})).style("stroke",(function(t){return"T"===t.properties.co?r.cntbnStroke_.co:"T"===t.properties.eu?r.cntbnStroke_.eu:"T"===t.properties.efta?r.cntbnStroke_.efta:"T"===t.properties.cc?r.cntbnStroke_.cc:"T"===t.properties.oth?r.cntbnStroke_.oth:void 0})).style("stroke-width",(function(t){return"T"===t.properties.co?r.cntbnStrokeWidth_.co+"px":"T"===t.properties.eu?r.cntbnStrokeWidth_.eu+"px":"T"===t.properties.efta?r.cntbnStrokeWidth_.efta+"px":"T"===t.properties.cc?r.cntbnStrokeWidth_.cc+"px":"T"===t.properties.oth?r.cntbnStrokeWidth_.oth+"px":void 0})),r._geom.nutsbn&&(r._geom.nutsbn.sort((function(t,e){return e.properties.lvl-t.properties.lvl})),l.append("g").attr("id","g_nutsbn").style("fill","none").selectAll("path").data(r._geom.nutsbn).enter().filter((function(t){return r.bordersToShow_.includes("eu")&&"T"==t.properties.eu||r.bordersToShow_.includes("efta")&&"T"==t.properties.efta||r.bordersToShow_.includes("cc")&&"T"==t.properties.cc||r.bordersToShow_.includes("oth")&&"T"==t.properties.oth||r.bordersToShow_.includes("co")&&"T"==t.properties.co?t:void 0})).append("path").attr("d",r._geom.path).attr("class",(function(t){return"T"===(t=t.properties).co?"bn_co":["bn_"+t.lvl].join(" ")})).style("stroke",(function(t){return"T"===(t=t.properties).co?r.nutsbnStroke_.co||"#1f78b4":r.nutsbnStroke_[t.lvl]||"#777"})).style("stroke-width",(function(t){return"T"===(t=t.properties).co?r.nutsbnStrokeWidth_.co:t.lvl>0?r.nutsbnStrokeWidth_[t.lvl]:r.nutsbnStrokeWidth_[t.lvl]||.2})),"EUR"==r.geo_)){var g=Gu($u[r.scale_],"nutsbn_1").features;r.bordersToShow_.includes("cc")&&l.append("g").attr("id","g_kosovo").style("fill","none").selectAll("path").data(g).enter().append("path").attr("d",r._geom.path).style("stroke","grey").style("stroke-width",.3)}(r._geom.worldbn&&l.append("g").attr("id","g_worldbn").style("fill","none").selectAll("path").data(r._geom.worldbn).enter().append("path").attr("d",r._geom.path).style("stroke",(function(t){return t.properties.POL_STAT>0?"#b2b2b2":"F"==t.properties.COAS_FLAG?r.worldStroke_:"T"==t.properties.COAS_FLAG?r.worldCoastStroke_:void 0})).style("stroke-width",(function(t){return"F"==t.properties.COAS_FLAG?r.worldStrokeWidth_:"T"==t.properties.COAS_FLAG?r.worldCoastStrokeWidth_:void 0})),r._geom.kosovo&&l.append("g").attr("id","g_worldbn").style("fill","none").selectAll("path").data(r._geom.kosovo).enter().append("path").attr("d",r._geom.path).style("stroke","#4f4f4f").style("stroke-width",(function(t){return"0.3px"})),n)&&(c?a="mixed"==r.nutsLvl_?[].concat(i()(c[0].features),i()(c[1].features),i()(c[2].features),i()(c[3].features)):c.features:"WORLD"==r.geo_&&(a=[],r._geom.worldrg.forEach((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ku(Object(n),!0).forEach((function(e){Bi()(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ku(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);e.geometry={coordinates:nu(t),type:"Point"},a.push(e)}))),l.append("g").attr("id","g_ps").selectAll("g").data(a).enter().append("g").attr("transform",(function(t){return"translate("+r._projection(t.geometry.coordinates)+")"})).attr("class","symbol").style("fill","gray").attr("id",(function(t){return"ps"+t.properties.id})).on("mouseover",(function(t){var e=yt(this.childNodes[0]);e.attr("fill___",e.style("fill")),e.style("fill",r.nutsrgSelFillSty_),r._tooltip&&r._tooltip.mouseover(r.tooltip_.textFunction(t,r))})).on("mousemove",(function(){r._tooltip&&r._tooltip.mousemove()})).on("mouseout",(function(){var t=yt(this.childNodes[0]);t.style("fill",t.attr("fill___")),r._tooltip&&r._tooltip.mouseout()})));if(r.labelling_&&f(r,l),r.title()&&(r.titlePosition()||r.titlePosition([10,5+r.titleFontSize()]),r.svg().append("text").attr("id","title"+r.geo_).attr("x",r.titlePosition()[0]).attr("y",r.titlePosition()[1]).text(r.title()).style("font-family",r.fontFamily_).style("font-size",r.titleFontSize()+"px").style("font-weight",r.titleFontWeight()).style("fill",r.titleFill()).style("stroke",r.titleStroke()).style("stroke-width",r.titleStrokeWidth()).style("stroke-linejoin","round").style("paint-order","stroke")),r.subtitle()&&(r.subtitlePosition()||r.subtitlePosition([10,8+r.titleFontSize()+5+r.subtitleFontSize()]),r.svg().append("text").attr("id","subtitle"+r.geo_).attr("x",r.subtitlePosition()[0]).attr("y",r.subtitlePosition()[1]).text(r.subtitle()).style("font-family",r.fontFamily_).style("font-size",r.subtitleFontSize()+"px").style("font-weight",r.subtitleFontWeight()).style("fill",r.subtitleFill()).style("stroke",r.subtitleStroke()).style("stroke-width",r.subtitleStrokeWidth()).style("stroke-linejoin","round").style("paint-order","stroke")),r.bottomText()&&r.svg().append("text").attr("id","bottomtext").attr("x",r.botTxtPadding_).attr("y",r.height_-r.botTxtPadding_).text(r.bottomText()).style("font-family",r.fontFamily_).style("font-size",r.botTxtFontSize_+"px").style("fill",r.botTxtFill_).on("mouseover",(function(){r._tooltip.mw___=r._tooltip.style("max-width"),r._tooltip.style("max-width","400px"),r._tooltip.style("font-size",r.botTxtFontSize_),r.botTxtTooltipTxt_&&r._tooltip.mouseover(r.botTxtTooltipTxt_)})).on("mousemove",(function(){r.botTxtTooltipTxt_&&r._tooltip.mousemove()})).on("mouseout",(function(){r.botTxtTooltipTxt_&&r._tooltip.mouseout(),r._tooltip.style("max-width",r._tooltip.mw___)})),r.showSourceLink_&&r.stat()&&r.stat().eurostatDatasetCode){var y=r.stat().eurostatDatasetCode,_="https://ec.europa.eu/eurostat/databrowser/view/".concat(y,"/default/table?lang=en"),v=r.svg().append("a").attr("href",_).attr("target","_blank").append("text").attr("id","source-dataset-link").attr("x",r.width_-r.botTxtPadding_).attr("y",r.height_-r.botTxtPadding_).text("EUROSTAT").style("font-family",r.fontFamily_).style("font-size",r.botTxtFontSize_+"px").style("font-weight","bold").attr("text-anchor","end").on("mouseover",(function(){var t=yt(this);t.attr("fill","lightblue"),t.style("cursor","pointer"),t.style("text-decoration","underline")})).on("mouseout",(function(){var t=yt(this);t.attr("fill","black"),t.style("cursor","default"),t.style("text-decoration","none")})).node().getComputedTextLength();r.svg().append("text").attr("x",r.width_-r.botTxtPadding_-v-2).attr("y",r.height_-r.botTxtPadding_).text("Source:").style("font-family",r.fontFamily_).style("font-size",r.botTxtFontSize_+"px").style("stroke-width","0.3px").attr("text-anchor","end")}return r.showScalebar_&&(2!==r.scalebarPosition_.length&&(r.scalebarPosition_[0]=15,r.scalebarPosition_[1]=r.height_-50),function(){var t=r.svg().append("svg").attr("id","scalebar").attr("x",r.scalebarPosition_[0]).attr("y",r.scalebarPosition_[1]),e=(r.scalebarSegmentHeight_,r.scalebarMaxWidth_),n=r.scalebarTextOffset_[0],i=r.scalebarTextOffset_[1],o=r.pixSize_,a=function(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10)));return 5*e<=t?[5*e,5]:2*e<=t?[2*e,2]:[e,1]}(e*o),l=a[0]/o,s=a[1],u=r.svg().append("svg").attr("id","scalebar").attr("x",r.scalebarPosition_[0]).attr("y",r.scalebarPosition_[1]).attr("width",e+20).attr("height",r.scalebarHeight_);u.append("line").attr("x1",5).attr("y1",1).attr("x2",l+5).attr("y2",1).style("stroke","#000").style("stroke-width","0.8px"),u.append("line").attr("x1",5).attr("y1",r.scalebarSegmentHeight_).attr("x2",l+5).attr("y2",r.scalebarSegmentHeight_).style("stroke","#000").style("stroke-width","0.8px"),u.append("line").attr("x1",5).attr("y1",1).attr("x2",5).attr("y2",r.scalebarTickHeight_).style("stroke","#000").style("stroke-width",r.scalebarStrokeWidth_+"px"),u.append("text").attr("x",5+n).attr("y",r.scalebarTickHeight_+i).text("0").style("font-size",r.scalebarFontSize_+"px").style("font-family",r.fontFamily_).attr("text-anchor","middle");var c={1:4,2:2,5:5}[s],f=l/c;if(f>=15){for(var p=1;p<c;p++)u.append("line").attr("x1",5+r.scalebarStrokeWidth_/2+p*f).attr("y1",1).attr("x2",5+r.scalebarStrokeWidth_/2+p*f).attr("y2",r.scalebarTickHeight_).style("stroke","#000").style("stroke-width","0.8px").style("stroke","black").style("stroke-width",r.scalebarStrokeWidth_),u.append("text").attr("x",5+n+p*f).attr("y",r.scalebarTickHeight_+i).text(h(a[0]/c*p)).style("font-size",r.scalebarFontSize_+"px").style("font-family",r.fontFamily_).attr("text-anchor","middle");for(var d=-1;d<c;d+=2)if(1==d)t.append("line").attr("x1",5+r.scalebarStrokeWidth_-1).attr("y1",r.scalebarSegmentHeight_/2).attr("x2",5+r.scalebarStrokeWidth_/2+d*f).attr("y2",r.scalebarSegmentHeight_/2).style("stroke","#000").style("stroke-width",r.scalebarStrokeWidth_+"px");else{var g=5+r.scalebarStrokeWidth_/2+(d-1)*f;g>0&&t.append("line").attr("x1",g).attr("y1",r.scalebarSegmentHeight_/2).attr("x2",5+r.scalebarStrokeWidth_/2+d*f).attr("y2",r.scalebarSegmentHeight_/2).style("stroke","#000").style("stroke-width","0.8px")}}else t.append("line").attr("x1",5+r.scalebarStrokeWidth_-1).attr("y1",r.scalebarSegmentHeight_/2).attr("x2",5+r.scalebarStrokeWidth_/2+f*c).attr("y2",r.scalebarSegmentHeight_/2).style("stroke","#000").style("stroke-width",r.scalebarStrokeWidth_+"px");u.append("line").attr("x1",l+5).attr("y1",1).attr("x2",l+5).attr("y2",r.scalebarTickHeight_).style("stroke","#000").style("stroke-width",r.scalebarStrokeWidth_+"px"),u.append("text").attr("x",l+5+n).attr("y",r.scalebarTickHeight_+i).text(h(a[0])+r.scalebarUnits_).style("text-anchor","middle").style("font-size",r.scalebarFontSize_+"px").style("font-family",r.fontFamily_)}()),r},r.updateLabels=function(){var t=r.svg_.selectAll("g.labels-container > *");if(t&&t.remove(),r.labelling_){var e=r.svg_.select("#zoomgroup"+r.svgId_);f(r,e),r.labelsToShow_.includes("values")&&r.updateValuesLabels()}};var p=function(e,i){var o=t(e,n);for(var a in(e=e||{}).proj=e.proj||ec[e.geo],e.scale=e.scale||r.insetScale_,e.bottomText=e.bottomText||"",e.showSourceLink=e.showSourceLink||!1,e.botTxtTooltipTxt=e.botTxtTooltipTxt||"",e.zoomExtent=e.zoomExtent||r.insetZoomExtent_,e.width=e.width||r.insetBoxWidth_,e.height=e.height||r.insetBoxWidth_,e.insets=e.insets||[],e.insetTemplates=e.insetTemplates||{},e.callback=e.callback||void 0,["nutsLvl_","nutsYear_","nutsrgFillStyle_","nutsrgSelFillSty_","nutsbnStroke_","nutsbnStrokeWidth_","cntrgFillStyle_","cntbnStroke_","cntbnStrokeWidth_","seaFillStyle_","drawCoastalMargin_","coastalMarginColor_","coastalMarginWidth_","coastalMarginStdDev_","graticuleStroke_","graticuleStrokeWidth_","labelling_","labelFill_","labelValuesFontSize_","labelOpacity_","labelStroke_","labelStrokeWidth_","labelShadowWidth_","labelShadow_","labelShadowColor_","labelsToShow_","fontFamily_","lg_"].forEach((function(t){o[t]=r[t]})),["stat","statData","legend","legendObj","noDataText","lg","transitionDuration","tooltip_","classToText_"].forEach((function(t){o[t]=r[t]})),e)o[a+"_"]=e[a];return o};return r},Qu={EUR_3035:{geoCenter:[497e4,335e4],pixSize:6800},IC_32628:{geoCenter:[443468,3145647],pixSize:1e3},GP_32620:{geoCenter:[669498,1784552],pixSize:130},MQ_32620:{geoCenter:[716521,1621322],pixSize:130},GF_32622:{geoCenter:[266852,444074],pixSize:500},RE_32740:{geoCenter:[348011,7661627],pixSize:130},YT_32738:{geoCenter:[516549,8583920],pixSize:70},MT_3035:{geoCenter:[4719755,1441701],pixSize:70},PT20_32626:{geoCenter:[397418,4271471],pixSize:1500},PT30_32628:{geoCenter:[333586,3622706],pixSize:150},LI_3035:{geoCenter:[4287060,2672e3],pixSize:40},IS_3035:{geoCenter:[3011804,496e4],pixSize:700},SJ_SV_3035:{geoCenter:[457e4,6160156],pixSize:800},SJ_JM_3035:{geoCenter:[3647762,5408300],pixSize:100},CARIB_32620:{geoCenter:[636345,1669439],pixSize:500},WORLD_54030:{geoCenter:[14,17],pixSize:9e3}},tc=function(t,e){for(var n=[{geo:"IC",x:0,y:0,width:t,height:.3*t},{geo:"CARIB",x:0,y:.3*t+e,width:.5*t,height:t},{geo:"GF",x:.5*t,y:.3*t+e,width:.5*t,height:.75*t},{geo:"YT",x:.5*t,y:1.05*t+e,width:.25*t,height:.25*t},{geo:"RE",x:.75*t,y:1.05*t+e,width:.25*t,height:.25*t},{geo:"PT20",x:0,y:1.3*t+2*e,width:.75*t,height:.25*t},{geo:"PT30",x:.75*t,y:1.3*t+2*e,width:.25*t,height:.25*t},{geo:"MT",x:0,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"LI",x:.25*t,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"SJ_SV",x:.5*t,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"SJ_JM",x:.75*t,y:1.55*t+3*e,width:.25*t,height:.25*t}],r=0;r<n.length;r++)n[r].drawGraticule=!1;return n},ec={EUR:"3035",IC:"32628",GP:"32620",MQ:"32620",GF:"32622",RE:"32740",YT:"32738",MT:"3035",PT20:"32626",PT30:"32628",LI:"3035",IS:"3035",SJ_SV:"3035",SJ_JM:"3035",CARIB:"32620",WORLD:"54030"};var nc={},rc={};function ic(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function oc(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function ac(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function lc(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+ac(-e,6):e>9999?"+"+ac(e,6):ac(e,4))+"-"+ac(t.getUTCMonth()+1,2)+"-"+ac(t.getUTCDate(),2)+(o?"T"+ac(n,2)+":"+ac(r,2)+":"+ac(i,2)+"."+ac(o,3)+"Z":i?"T"+ac(n,2)+":"+ac(r,2)+":"+ac(i,2)+"Z":r||n?"T"+ac(n,2)+":"+ac(r,2)+"Z":"")}var sc=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],o=t.length,a=0,l=0,s=o<=0,u=!1;function c(){if(s)return rc;if(u)return u=!1,nc;var e,r,i=a;if(34===t.charCodeAt(i)){for(;a++<o&&34!==t.charCodeAt(a)||34===t.charCodeAt(++a););return(e=a)>=o?s=!0:10===(r=t.charCodeAt(a++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,e-1).replace(/""/g,'"')}for(;a<o;){if(10===(r=t.charCodeAt(e=a++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(a)&&++a;else if(r!==n)continue;return t.slice(i,e)}return s=!0,t.slice(i,o)}for(10===t.charCodeAt(o-1)&&--o,13===t.charCodeAt(o-1)&&--o;(r=c())!==rc;){for(var f=[];r!==nc&&r!==rc;)f.push(r),r=c();e&&null==(f=e(f,l++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return a(e[t])})).join(t)}))}function o(e){return e.map(a).join(t)}function a(t){return null==t?"":t instanceof Date?lc(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,o=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=ic(t);return function(r,i){return e(n(r),i,t)}}(t,e):ic(t)}));return o.columns=i||[],o},parseRows:r,format:function(e,n){return null==n&&(n=oc(e)),[n.map(a).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=oc(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}},uc=sc(","),cc=uc.parse,fc=(uc.parseRows,uc.format,uc.formatBody,uc.formatRows,uc.formatRow,uc.formatValue,sc("\t")),hc=fc.parse;fc.parseRows,fc.format,fc.formatBody,fc.formatRows,fc.formatRow,fc.formatValue;function pc(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var dc=function(t,e){return fetch(t,e).then(pc)};function gc(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),dc(e,n).then((function(e){return t(e,r)}))}}var yc=gc(cc);gc(hc);function _c(t){var e,n,r,i,o=function(t,e){var n,r=[];if("string"==typeof t&&(t=[t]),Array.isArray(t)){if(t.length===e)return t;if(1===t.length){for(n=0;n<e;n++)r.push(t[0]);return r}}for(n=0;n<e;n++){var i=void 0===t[n]?null:t[n];r.push(i)}return r};if(this.length=0,this.id=[],null!=t)switch(this.class=t.class||"bundle",this.class){case"bundle":var a=[],l=0;if(this.error=null,this.length=0,null===t||"object"!=typeof t)return void(this.class=null);if(t.hasOwnProperty("error"))return void(this.error=t.error);if("dataset"===t.class||"collection"===t.class||"dimension"===t.class)return new _c(t);for(n in t)l++,a.push(n);this.__tree__=t,this.length=l,this.id=a;break;case"dataset":t.hasOwnProperty("__tree__")?this.__tree__=e=t.__tree__:this.__tree__=e=t,this.label=e.label||null,this.note=e.note||null,this.link=e.link||null,this.href=e.href||null,this.updated=e.updated||null,this.source=e.source||null,this.extension=e.extension||null;var s,u=0,c=e.size||e.dimension&&e.dimension.size;if(this.size=c,this.value=e.hasOwnProperty("value")&&null!==e.value&&0!==e.value.length?e.value:{},Array.isArray(this.value))u=this.value.length;else{var f=1;for(s=c.length;s--;)f*=c[s];u=f}if(this.value=o(this.value,u),this.status=e.hasOwnProperty("status")?o(e.status,u):null,e.hasOwnProperty("dimension")){var h=e.dimension,p=e.role||!e.version&&h.role||null,d=e.id||h.id,g=c.length,y=function(t){p.hasOwnProperty(t)||(p[t]=null)};if(!Array.isArray(d)||!Array.isArray(c)||d.length!=g)return;if(this.length=g,this.id=d,p&&(y("time"),y("geo"),y("metric"),y("classification")),p&&null===p.classification){var _=[],v=["time","geo","metric"],m=function(t,e){for(var n=e.length;n--;)if(t===e[n])return!0;return!1};for(s=0;s<3;s++){var x=p[v[s]];null!==x&&(_=_.concat(x))}for(p.classification=[],s=0;s<g;s++)m(d[s],_)||p.classification.push(d[s]);0===p.classification.length&&(p.classification=null)}this.role=p,this.n=u;for(var b=0,S=this.length;b<S;b++)if(h[d[b]].category.hasOwnProperty("index")){if(Array.isArray(h[d[b]].category.index)){var w={},T=h[d[b]].category.index;for(r=T.length,i=0;i<r;i++)w[T[i]]=i;h[d[b]].category.index=w}}else{var M=0;for(n in h[d[b]].category.index={},h[d[b]].category.label)h[d[b]].category.index[n]=M++}}else this.length=0;break;case"dimension":if(!t.hasOwnProperty("__tree__"))return new _c({version:"2.0",class:"dataset",dimension:{d:t},id:["d"],size:[function(t){var e=void 0===t.index?t.label:t.index;return Array.isArray(e)?e.length:Object.keys(e).length}(t.category)],value:[null]}).Dimension(0);var k=[],z=(e=t.__tree__).category;if(!e.hasOwnProperty("category"))return;if(!z.hasOwnProperty("label"))for(n in z.label={},z.index)z.label[n]=n;for(n in z.index)k[z.index[n]]=n;this.__tree__=e,this.label=e.label||null,this.note=e.note||null,this.link=e.link||null,this.href=e.href||null,this.id=k,this.length=k.length,this.role=t.role,this.hierarchy=z.hasOwnProperty("child"),this.extension=e.extension||null;break;case"category":var F=t.child;this.id=F,this.length=null===F?0:F.length,this.index=t.index,this.label=t.label,this.note=t.note||null,this.unit=t.unit,this.coordinates=t.coord;break;case"collection":if(this.length=0,this.label=t.label||null,this.note=t.note||null,this.link=t.link||null,this.href=t.href||null,this.updated=t.updated||null,this.source=t.source||null,this.extension=t.extension||null,null!==this.link&&t.link.item){var C=t.link.item;if(this.length=Array.isArray(C)?C.length:0,this.length)for(i=0;i<this.length;i++)this.id[i]=C[i].href}}}function vc(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}_c.prototype.Item=function(t){if(null===this||"collection"!==this.class||!this.length)return null;if("number"==typeof t)return t>this.length||t<0?null:this.link.item[t];var e,n=[];if("object"==typeof t){if(!t.class&&!t.follow)return null;t.class&&(e="dataset"===t.class&&"boolean"==typeof t.embedded?!0===t.embedded?function(t,e,r){var i=t.link.item[e];r.class===i.class&&i.id&&i.size&&i.dimension&&n.push(i)}:function(t,e,r){var i=t.link.item[e];r.class!==i.class||i.id&&i.size&&i.dimension||n.push(i)}:function(t,e,r){r.class===t.link.item[e].class&&n.push(t.link.item[e])})}else e=function(t,e){n.push(t.link.item[e])};for(var r=0;r<this.length;r++)e(this,r,t);return n},_c.prototype.Dataset=function(t){if(null===this)return null;if("dataset"===this.class)return void 0!==t?this:[this];var e,n=[],r=0;if("collection"===this.class){var i=this.Item({class:"dataset",embedded:!0});if(void 0===t){for(e=i.length;r<e;r++)n.push(new _c(i[r]));return n}if("number"==typeof t&&t>=0&&t<i.length)return new _c(i[t]);if("string"==typeof t)for(e=i.length;r<e;r++)if(i[r].href===t)return new _c(i[r]);return null}if("bundle"!==this.class)return null;if(void 0===t){for(e=this.id.length;r<e;r++)n.push(this.Dataset(this.id[r]));return n}if("number"==typeof t){var o=this.id[t];return void 0!==o?this.Dataset(o):null}var a=this.__tree__[t];return void 0===a?null:new _c({class:"dataset",__tree__:a})},_c.prototype.Dimension=function(t,e){e="boolean"!=typeof e||e;var n,r=[],i=this.id.length,o=function(t,e){if(null!==t)for(var n in t)for(var r=null!==t[n]?t[n].length:0;r--;)if(t[n][r]===e)return n;return null};if(null===this||"dataset"!==this.class)return null;if(void 0===t){for(n=0;n<i;n++)r.push(this.Dimension(this.id[n]));return r}if("number"==typeof t){var a=this.id[t];return void 0!==a?this.Dimension(a,e):null}var l=this.role;if("object"==typeof t){if(t.hasOwnProperty("role")){for(n=0;n<i;n++){var s=this.id[n];o(l,s)===t.role&&r.push(this.Dimension(s,e))}return void 0===r[0]?null:r}return null}var u=this.__tree__.dimension;if(void 0===u)return null;var c=u[t];return void 0===c?null:e?new _c({class:"dimension",__tree__:c,role:o(l,t)}):function(t,e){var n=[];for(var r in t)n[t[r]]=e[r];return n}(c.category.index,c.category.label)},_c.prototype.Category=function(t){if(null===this||"dimension"!==this.class)return null;if(void 0===t){for(var e=[],n=0,r=this.id.length;n<r;n++)e.push(this.Category(this.id[n]));return e}if("number"==typeof t){var i=this.id[t];return void 0!==i?this.Category(i):null}var o=this.__tree__.category;if(void 0===o)return null;var a=o.index[t];if(void 0===a)return null;var l=o.unit&&o.unit[t]||null,s=o.coordinates&&o.coordinates[t]||null,u=o.child&&o.child[t]||null,c=o.note&&o.note[t]||null;return new _c({class:"category",index:a,label:o.label[t],note:c,child:u,unit:l,coord:s})},_c.prototype.Dice=function(t,e,n){var r,i,o,a,l=function(t,e){return t.hasOwnProperty(e)&&!!t[e]};if(null===this||"dataset"!==this.class)return null;if("object"!=typeof t)return this;"object"!=typeof e?("boolean"==typeof e&&!0===e&&(r=!0),"boolean"==typeof n&&!0===n||(n=!1)):(r=l(e,"clone"),n=l(e,"drop"),i=l(e,"stringify"),o=l(e,"ovalue"),a=l(e,"ostatus"));var s,u=r?new _c(JSON.parse(JSON.stringify(this))):this,c=u.status,f=[],h=[],p=function(t,e){var n,r,i,o=(n=t,r=e,i={},"[object Array]"===Object.prototype.toString.call(n[r])?(n[r].forEach((function(t,e){null!==t&&(i[String(e)]=t)})),i):n[r]);delete t[e],t[e]=o};Array.isArray(t)&&(t=function(t){var e={};return t.forEach((function(t){e[t[0]]=t[1]})),e}(t)),null===t&&(t={});var d=Object.keys(t);return d.length>0&&(d.forEach((function(e){var n=t[e];Array.isArray(n)||(t[e]=[n]),0===t[e].length&&delete t[e]})),n&&(t=function(t){var e={};return Object.keys(t).forEach(n=>e[n]=u.Dimension(n).id.filter(e=>-1===t[n].indexOf(e))),e}(t)),u.toTable({type:"arrobj",content:"id",status:!0}).forEach((function(e,n){var r=[];d.forEach((function(n){var i=t[n],o=[];i.forEach((function(t){o.push(e[n]===t)})),r.push(-1!==o.indexOf(!0))})),-1===r.indexOf(!1)&&(f.push(e.value),h.push(e.status))})),d.forEach((function(e){var n=u.Dimension(e).id,r=0,i={};u.size[u.id.indexOf(e)]=t[e].length,n.forEach((function(n){-1!==t[e].indexOf(n)&&(i[n]=r,r++)})),u.__tree__.dimension[e].category.index=i})),u.n=f.length,u.value=u.__tree__.value=f,u.status=u.__tree__.status=null!==c?h:null),i?((s=u.__tree__).hasOwnProperty("id")||(s.version="2.0",s.hasOwnProperty("class")||(s.class="dataset"),s.id=s.dimension.id,s.size=s.dimension.size,delete s.dimension.id,delete s.dimension.size,s.dimension.hasOwnProperty("role")&&(s.role=s.dimension.role,delete s.dimension.role)),s.hasOwnProperty("status")&&-1!==["null","{}","[]"].indexOf(JSON.stringify(s.status))&&delete s.status,s.hasOwnProperty("role")&&(delete s.role.classification,["geo","time","metric"].forEach((function(t){null===s.role[t]&&delete s.role[t]}))),o&&p(s,"value"),a&&s.hasOwnProperty("status")&&p(s,"status"),JSON.stringify(s)):u},_c.prototype.Slice=function(t){if(null===this||"dataset"!==this.class)return null;if(void 0===t)return this;if(!Array.isArray(t)){var e,n=[];for(e in t)n.push([e,t[e]]);t=n}return this.Dice(t.map((function(t){return[t[0],[t[1]]]})))},_c.prototype.Data=function(t,e){var n,r,i=[],o=function(t){for(var e in t)if(t.hasOwnProperty(e))return e};if(null===this||"dataset"!==this.class)return null;if(void 0===t){for(r=this.value.length,n=0;n<r;n++)i.push(this.Data(n));return i}if("boolean"!=typeof e&&(e=!0),"number"==typeof t){var a=this.value[t];return void 0===a?null:e?{value:a,status:this.status?this.status[t]:null}:a}var l="object",s=this.__tree__,u=s.size||s.dimension&&s.dimension.size,c=u.length;if(Array.isArray(t)){if(!Array.isArray(t[0])){if(this.length!==t.length)return null;var f=1,h=0,p=[],d=[];for(n=0;n<c;n++)if(void 0!==t[n]){if("number"!=typeof t[n]||t[n]>=u[n])return null;h+=(f*=n>0?u[c-n]:1)*t[c-n-1]}else p.push(n),d.push(u[n]);if(p.length>1)return null;if(1===p.length){for(var g=0,y=d[0];g<y;g++){var _=[];for(n=0;n<c;n++)n!==p[0]?_.push(t[n]):_.push(g);i.push(this.Data(_,e))}return i}return e?{value:this.value[h],status:this.status?this.status[h]:null}:this.value[h]}l="array"}var v=function(t,e,n){var r,i=[],a={},l=t.dimension,s=t.id||l.id,u=t.size||l&&l.size;if("array"===n){for(r=e.length;r--;)a[e[r][0]]=e[r][1];e=a}for(var c=0,f=s.length;c<f;c++){var h=s[c],p=e[h];i.push("string"==typeof p?p:1===u[c]?o(l[h].category.index):null)}return i}(s,t,l),m=[],x=s.dimension,b=s.id||x.id;for(n=0,r=v.length;n<r;n++)m.push(x[b[n]].category.index[v[n]]);return this.Data(m,e)},_c.prototype.toTable=function(t,e){if(null===this||"dataset"!==this.class)return null;1==arguments.length&&"function"==typeof t&&(e=t,t=null),"arrobj"===(t=t||{field:"label",content:"label",vlabel:"Value",slabel:"Status",type:"array",status:!1,unit:!1,by:null,prefix:"",drop:[],meta:!1,comma:!1,bylabel:!1}).type&&void 0===t.field&&(t.field="id");var n,r,i,o,a,l=this.__tree__,s=!0===t.status;if("function"==typeof e){n=this.toTable(t);var u=[],c="array"!==t.type?0:1;for(a=(E="object"!==t.type?n.slice(c):n.rows.slice(0)).length,r=0;r<a;r++){var f=e.call(this,E[r],r);void 0!==f&&u.push(f)}return"object"===t.type?{cols:n.cols,rows:u}:("array"===t.type&&u.unshift(n[0]),u)}if("arrobj"===t.type){var h=[],p=l.role&&l.role.metric,d=function(){},g={},y=this,_=y.id,v=t.by&&-1!==_.indexOf(t.by)?t.by:null,m=!0===t.meta,x=void 0!==t.drop&&Array.isArray(t.drop)?t.drop:[],b=!0===t.comma,S=!0===t.bylabel,w=function(e){if(m){var n={};return _.forEach((function(t){var e=y.Dimension(t);n[t]={label:e.label,role:e.role,categories:{id:e.id,label:y.Dimension(t,!1)}}})),{meta:{label:y.label,source:y.source,updated:y.updated,id:_,status:s,unit:t.unit,by:v,bylabel:S,drop:null!==v&&x.length>0?x:null,prefix:null!==v?N||"":null,comma:b,dimensions:n},data:e}}return e};v&&(t.field="id");var T=(n=this.toTable({field:t.field,vlabel:t.vlabel,slabel:t.slabel,content:t.content,status:s})).shift();if(null===v&&t.unit&&p){if("id"!==t.content)for(var M=p.length;M--;){var k=this.Dimension(p[M]);g[p[M]]={};for(var z=k.length;z--;)g[p[M]][k.Category(z).label]=k.id[z]}d=function(e,n){if(-1!==p.indexOf(e)){var r=l.dimension[e].category;r.unit?F.unit=r.unit["id"!==t.content?g[e][n]:n]:F.unit=null}},t.unit=!0}else t.unit=!1;for(a=n.length,r=0;r<a;r++){var F={};for(i=n[r].length;i--;)F[T[i]]=n[r][i],d(T[i],n[r][i]);h.push(F)}if(b&&h.forEach((function(t){null!==t.value&&(t.value=(""+t.value).replace(".",","))})),null!==v){var C,A={},E=[],L={},N=void 0!==t.prefix?t.prefix:"";x.forEach((function(t,e){(!y.Dimension(t)||y.Dimension(t).length>1)&&(x[e]="")}));var D=_.filter((function(t){return t!==v&&-1===x.indexOf(t)})),P=y.Dimension(v),O=function(t,e){var n=[];return e.forEach((function(e){n.push(t[e])})),n.join("\t")},R=function(t,e){var n={};return e.forEach((function(e){n[e]=t[e]})),n};for(var I in"id"!==t.content?S?C=function(t,e,n){t[e][N+n[v]]=n.value}:(P.Category().forEach((function(t,e){L[t.label]=P.id[e]})),C=function(t,e,n){t[e][N+L[n[v]]]=n.value}):C=function(t,e,n){t[e][N+n[v]]=n.value},h.forEach((function(t){var e=O(t,D);void 0===A[e]&&(A[e]=R(t,D)),C(A,e,t,v)})),A)E.push(A[I]);return s=!1,w(E)}return w(h)}var W,U,j,H,B="id"===t.field;if("object"===t.type){var G="number"==typeof this.value[0]||null===this.value[0]?"number":"string";W=function(t,e){var n=B&&t||e||t;et.push({id:t,label:n,type:"string"})},U=function(t,e,n){var r=(B?"value":t)||"Value",i=(B?"status":e)||"Status";n&&et.push({id:"status",label:i,type:"string"}),et.push({id:"value",label:r,type:G})},j=function(t){dt.push({v:t})},H=function(t){dt.push({v:t}),nt.push({c:dt})}}else W=function(t,e){var n=B&&t||e||t;et.push(n)},U=function(t,e,n){var r=(B?"value":t)||"Value",i=(B?"status":e)||"Status";n&&et.push(i),et.push(r),tt.push(et)},j=function(t){dt.push(t)},H=function(t){dt.push(t),tt.push(dt)};var Y=l.dimension,q=l.id||Y.id,V=l.size||Y.size,X=q.length;if(X!=V.length)return!1;var Z=[],$=1,K=(M=1,[]),J=[],Q=[],tt=[],et=[],nt=[];for(r=0;r<X;r++){var rt=q[r],it=Y[rt].label;W(rt,it),$*=V[r],M*=V[r];var ot=[];for(i=0;i<V[r];i++)for(var at in Y[q[r]].category.index)if(Y[q[r]].category.index[at]===i){var lt="id"!==t.content&&Y[q[r]].category.label?Y[q[r]].category.label[at]:at;ot.push(lt)}Z.push(ot),K.push(M)}for(U(t.vlabel,t.slabel,s),a=Z.length,r=0;r<a;r++){for(var st=[],ut=0,ct=Z[r].length;ut<ct;ut++)for(var ft=0;ft<$/K[r];ft++)st.push(Z[r][ut]);J.push(st)}for(a=J.length,r=0;r<a;r++){var ht=[],pt=0;for(o=0;o<$;o++)ht.push(J[r][pt]),++pt===J[r].length&&(pt=0);Q.push(ht)}for(o=0;o<$;o++){var dt=[];a=J.length;for(var gt=0;gt<a;gt++)j(Q[gt][o]);s&&j(this.status?this.status[o]:null),H(this.value[o])}return"object"===t.type?{cols:et,rows:nt}:tt},_c.prototype.node=function(){return this.__tree__},_c.prototype.toString=function(){return this.class};var mc=function(t){var e={__data:void 0},n=void 0;e.get=function(t){return t?n?n[t]:void 0:n},e.getValue=function(t){var n=e.get(t);return n?n.value:void 0},e.set=function(t,r){var i=(n=n||{})[t];return i?r.value?(i.value=r.value,i.status=r.status):i.value=isNaN(+r)?r:+r:n[t]=r.value?r:{value:isNaN(+r)?r:+r},e},e.setData=function(t){return e.__data=t,n={},Object.keys(t).forEach((function(n){return e.set(n,t[n])})),e},e.getArray=function(){if(n)return Object.values(n).map((function(t){return t.value})).filter((function(t){return 0==t||t}))},e.getUniqueValues=function(){return Object.values(n).map((function(t){return t.value})).filter((function(t,e,n){return n.indexOf(t)===e}))},e.getMin=function(){if(n)return Object.values(n).map((function(t){return t.value})).filter((function(t){return 0==t||t&&":"!==t})).reduce((function(t,e){return Math.min(t,e)}),0)},e.getMax=function(){if(n)return Object.values(n).map((function(t){return t.value})).filter((function(t){return 0==t||t&&":"!==t})).reduce((function(t,e){return Math.max(t,e)}),0)},e.isReady=function(){return null!=n},e.metadata=void 0,e.unitText_=void 0,e.retrieveFromRemote=function(t,n,r){return e.eurostatDatasetCode_?i(t,n,r):e.csvURL_&&o(r),e},e.eurostatDatasetCode_=void 0,e.filters_={lastTimePeriod:1},e.precision_=2;var r=function(t,n){return e.filters_.geo||(e.filters_.geoLevel=t+""=="0"?"country":"nuts"+t),Vi(function(t,e,n,r){n=n||"en",r=r||"json";var i=[];if(i.push("https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/",t,"?","format=",r,"&lang=",n),e)for(var o in e){var a=e[o];if(Array.isArray(a))for(var l=0;l<a.length;l++)i.push("&",o,"=",a[l]);else i.push("&",o,"=",a)}return i.join("")}(e.eurostatDatasetCode_,e.filters_,n))},i=function(t,i,o){n=null,r(t,i).then((function(t){var r,i,a="object"==typeof(r=t)?new _c(r):"version"===r?"1.3.1":fetch?fetch(r,i).then(vc).then((function(t){return new _c(t)})):void 0;e.metadata={label:a.label,href:a.href,source:a.source,updated:a.updated,extension:a.extension},e.metadata.time=a.Dimension("time").id[0],n=function(t){for(var e={},n=t.Dimension("geo").id,r=0;r<n.length;r++)e[n[r]]=t.Data(r);return e}(a),o&&o()}))};e.getTime=function(){var t=e.filters_.time;return t||(n?e.metadata.time:void 0)},e.csvURL_=void 0,e.geoCol_="geo",e.valueCol_="value";var o=function(t){n=null,yc(e.csvURL_).then((function(r){n=function(t,e,n){for(var r={},i=0;i<t.length;i++){var o=t[i],a=o[n];r[o[e]]={value:isNaN(+a)?a:+a,status:""}}return r}(r,e.geoCol_,e.valueCol_),e.metadata={href:e.csvURL_},t&&t()}))};if(["unitText_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t)for(var a in t)e[a+"_"]=t[a];return e},xc=function(t){var e={};return e.map=t,e.svgId="legend_"+Math.round(1e16*Math.random()),e.svg=void 0,e.lgg=void 0,e.x=void 0,e.y=void 0,e.boxMargin=10,e.boxPadding=7,e.boxCornerRad=7,e.boxFill="white",e.boxOpacity=.7,e.fontFill="black",e.title="",e.titleFontSize=15,e.titleFontWeight="normal",e.build=function(){e.svg=yt("#"+e.svgId),e.svg.selectAll("#g_"+e.svgId).remove(),e.lgg=e.svg.append("g").attr("id","g_"+e.svgId)},e.update=function(){return console.log("Legend update function not implemented"),e},e.makeBackgroundBox=function(){e.lgg.append("rect").attr("id","legendBR").attr("rx",e.boxCornerRad).attr("ry",e.boxCornerRad).style("fill",e.boxFill).style("opacity",e.boxOpacity)},e.setBoxDimension=function(){var t=e.lgg.node().getBBox({stroke:!0}),n=e.boxPadding;e.svg.select("#legendBR").attr("x",t.x-n).attr("y",t.y-n).attr("width",t.width+2*n).attr("height",t.height+2*n)},e},bc=Array.prototype.slice,Sc=function(t){return t};function wc(t){return"translate("+(t+.5)+",0)"}function Tc(t){return"translate(0,"+(t+.5)+")"}function Mc(t){return function(e){return+t(e)}}function kc(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function zc(){return!this.__axis}function Fc(t,e){var n=[],r=null,i=null,o=6,a=6,l=3,s=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",c=1===t||3===t?wc:Tc;function f(f){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):Sc:i,d=Math.max(o,0)+l,g=e.range(),y=+g[0]+.5,_=+g[g.length-1]+.5,v=(e.bandwidth?kc:Mc)(e.copy()),m=f.selection?f.selection():f,x=m.selectAll(".domain").data([null]),b=m.selectAll(".tick").data(h,e).order(),S=b.exit(),w=b.enter().append("g").attr("class","tick"),T=b.select("line"),M=b.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(w),T=T.merge(w.append("line").attr("stroke","currentColor").attr(u+"2",s*o)),M=M.merge(w.append("text").attr("fill","currentColor").attr(u,s*d).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==m&&(x=x.transition(f),b=b.transition(f),T=T.transition(f),M=M.transition(f),S=S.transition(f).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=v(t))?c(t):this.getAttribute("transform")})),w.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:v(t))}))),S.remove(),x.attr("d",4===t||2==t?a?"M"+s*a+","+y+"H0.5V"+_+"H"+s*a:"M0.5,"+y+"V"+_:a?"M"+y+","+s*a+"V0.5H"+_+"V"+s*a:"M"+y+",0.5H"+_),b.attr("opacity",1).attr("transform",(function(t){return c(v(t))})),T.attr(u+"2",s*o),M.attr(u,s*d).text(p),m.filter(zc).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),m.each((function(){this.__axis=v}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=bc.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:bc.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:bc.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=a=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(a=+t,f):a},f.tickPadding=function(t){return arguments.length?(l=+t,f):l},f}function Cc(t){return[+t[0],+t[1]]}function Ac(t){return[Cc(t[0]),Cc(t[1])]}["w","e"].map(Ec),["n","s"].map(Ec),["n","w","e","s","nw","ne","sw","se"].map(Ec);function Ec(t){return{type:t}}Math.cos,Math.sin,Math.PI,Math.max;Array.prototype.slice;var Lc=Math.PI,Nc=2*Lc,Dc=Nc-1e-6;function Pc(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Oc(){return new Pc}Pc.prototype=Oc.prototype={constructor:Pc,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,l=n-t,s=r-e,u=o-t,c=a-e,f=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(c*l-s*u)>1e-6&&i){var h=n-o,p=r-a,d=l*l+s*s,g=h*h+p*p,y=Math.sqrt(d),_=Math.sqrt(f),v=i*Math.tan((Lc-Math.acos((d+f-g)/(2*y*_)))/2),m=v/_,x=v/y;Math.abs(m-1)>1e-6&&(this._+="L"+(t+m*u)+","+(e+m*c)),this._+="A"+i+","+i+",0,0,"+ +(c*h>u*p)+","+(this._x1=t+x*l)+","+(this._y1=e+x*s)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),l=n*Math.sin(r),s=t+a,u=e+l,c=1^o,f=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+s+","+u:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-u)>1e-6)&&(this._+="L"+s+","+u),n&&(f<0&&(f=f%Nc+Nc),f>Dc?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-l)+"A"+n+","+n+",0,1,"+c+","+(this._x1=s)+","+(this._y1=u):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=Lc)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Rc=Oc;Array.prototype.slice;function Ic(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,l,s,u,c,f,h,p=t._root,d={data:r},g=t._x0,y=t._y0,_=t._x1,v=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((u=e>=(o=(g+_)/2))?g=o:_=o,(c=n>=(a=(y+v)/2))?y=a:v=a,i=p,!(p=p[f=c<<1|u]))return i[f]=d,t;if(l=+t._x.call(null,p.data),s=+t._y.call(null,p.data),e===l&&n===s)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(u=e>=(o=(g+_)/2))?g=o:_=o,(c=n>=(a=(y+v)/2))?y=a:v=a}while((f=c<<1|u)==(h=(s>=a)<<1|l>=o));return i[h]=p,i[f]=d,t}var Wc=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function Uc(t){return t[0]}function jc(t){return t[1]}function Hc(t,e,n){var r=new Bc(null==e?Uc:e,null==n?jc:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Bc(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Gc(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Yc=Hc.prototype=Bc.prototype;Yc.copy=function(){var t,e,n=new Bc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Gc(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Gc(e));return n},Yc.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Ic(this.cover(e,n),e,n,t)},Yc.addAll=function(t){var e,n,r,i,o=t.length,a=new Array(o),l=new Array(o),s=1/0,u=1/0,c=-1/0,f=-1/0;for(n=0;n<o;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(a[n]=r,l[n]=i,r<s&&(s=r),r>c&&(c=r),i<u&&(u=i),i>f&&(f=i));if(s>c||u>f)return this;for(this.cover(s,u).cover(c,f),n=0;n<o;++n)Ic(this,a[n],l[n],t[n]);return this},Yc.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,l,s=i-n,u=this._root;n>t||t>=i||r>e||e>=o;)switch(l=(e<r)<<1|t<n,(a=new Array(4))[l]=u,u=a,s*=2,l){case 0:i=n+s,o=r+s;break;case 1:n=i-s,o=r+s;break;case 2:i=n+s,r=o-s;break;case 3:n=i-s,r=o-s}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},Yc.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Yc.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]]},Yc.find=function(t,e,n){var r,i,o,a,l,s,u,c=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],g=this._root;for(g&&d.push(new Wc(g,c,f,h,p)),null==n?n=1/0:(c=t-n,f=e-n,h=t+n,p=e+n,n*=n);s=d.pop();)if(!(!(g=s.node)||(i=s.x0)>h||(o=s.y0)>p||(a=s.x1)<c||(l=s.y1)<f))if(g.length){var y=(i+a)/2,_=(o+l)/2;d.push(new Wc(g[3],y,_,a,l),new Wc(g[2],i,_,y,l),new Wc(g[1],y,o,a,_),new Wc(g[0],i,o,y,_)),(u=(e>=_)<<1|t>=y)&&(s=d[d.length-1],d[d.length-1]=d[d.length-1-u],d[d.length-1-u]=s)}else{var v=t-+this._x.call(null,g.data),m=e-+this._y.call(null,g.data),x=v*v+m*m;if(x<n){var b=Math.sqrt(n=x);c=t-b,f=e-b,h=t+b,p=e+b,r=g.data}}return r},Yc.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,l,s,u,c,f,h,p=this._root,d=this._x0,g=this._y0,y=this._x1,_=this._y1;if(!p)return this;if(p.length)for(;;){if((u=o>=(l=(d+y)/2))?d=l:y=l,(c=a>=(s=(g+_)/2))?g=s:_=s,e=p,!(p=p[f=c<<1|u]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(n?n[h]=p:this._root=p),this):(this._root=i,this)},Yc.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Yc.root=function(){return this._root},Yc.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Yc.visit=function(t){var e,n,r,i,o,a,l=[],s=this._root;for(s&&l.push(new Wc(s,this._x0,this._y0,this._x1,this._y1));e=l.pop();)if(!t(s=e.node,r=e.x0,i=e.y0,o=e.x1,a=e.y1)&&s.length){var u=(r+o)/2,c=(i+a)/2;(n=s[3])&&l.push(new Wc(n,u,c,o,a)),(n=s[2])&&l.push(new Wc(n,r,c,u,a)),(n=s[1])&&l.push(new Wc(n,u,i,o,c)),(n=s[0])&&l.push(new Wc(n,r,i,u,c))}return this},Yc.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Wc(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var o,a=e.x0,l=e.y0,s=e.x1,u=e.y1,c=(a+s)/2,f=(l+u)/2;(o=i[0])&&n.push(new Wc(o,a,l,c,f)),(o=i[1])&&n.push(new Wc(o,c,l,s,f)),(o=i[2])&&n.push(new Wc(o,a,f,c,u)),(o=i[3])&&n.push(new Wc(o,c,f,s,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Yc.x=function(t){return arguments.length?(this._x=t,this):this._x},Yc.y=function(t){return arguments.length?(this._y=t,this):this._y};Math.PI,Math.sqrt(5);var qc=function(){return Math.random()},Vc=(function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(qc),function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var o;if(null!=r)o=r,r=null;else do{r=2*e()-1,o=2*e()-1,i=r*r+o*o}while(!i||i>1);return t+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(qc)),Xc=(function t(e){function n(){var t=Vc.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(qc),function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(qc)),Zc=(function t(e){function n(t){var n=Xc.source(e)(t);return function(){return n()/t}}return n.source=t,n}(qc),function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(qc),function(t){return function(){return t}}),$c=Math.abs,Kc=Math.atan2,Jc=Math.cos,Qc=Math.max,tf=Math.min,ef=Math.sin,nf=Math.sqrt,rf=Math.PI,of=rf/2,af=2*rf;function lf(t){return t>1?0:t<-1?rf:Math.acos(t)}function sf(t){return t>=1?of:t<=-1?-of:Math.asin(t)}function uf(t){return t.innerRadius}function cf(t){return t.outerRadius}function ff(t){return t.startAngle}function hf(t){return t.endAngle}function pf(t){return t&&t.padAngle}function df(t,e,n,r,i,o,a,l){var s=n-t,u=r-e,c=a-i,f=l-o,h=f*s-c*u;if(!(h*h<1e-12))return[t+(h=(c*(e-o)-f*(t-i))/h)*s,e+h*u]}function gf(t,e,n,r,i,o,a){var l=t-n,s=e-r,u=(a?o:-o)/nf(l*l+s*s),c=u*s,f=-u*l,h=t+c,p=e+f,d=n+c,g=r+f,y=(h+d)/2,_=(p+g)/2,v=d-h,m=g-p,x=v*v+m*m,b=i-o,S=h*g-d*p,w=(m<0?-1:1)*nf(Qc(0,b*b*x-S*S)),T=(S*m-v*w)/x,M=(-S*v-m*w)/x,k=(S*m+v*w)/x,z=(-S*v+m*w)/x,F=T-y,C=M-_,A=k-y,E=z-_;return F*F+C*C>A*A+E*E&&(T=k,M=z),{cx:T,cy:M,x01:-c,y01:-f,x11:T*(i/b-1),y11:M*(i/b-1)}}var yf=function(){var t=uf,e=cf,n=Zc(0),r=null,i=ff,o=hf,a=pf,l=null;function s(){var s,u,c=+t.apply(this,arguments),f=+e.apply(this,arguments),h=i.apply(this,arguments)-of,p=o.apply(this,arguments)-of,d=$c(p-h),g=p>h;if(l||(l=s=Rc()),f<c&&(u=f,f=c,c=u),f>1e-12)if(d>af-1e-12)l.moveTo(f*Jc(h),f*ef(h)),l.arc(0,0,f,h,p,!g),c>1e-12&&(l.moveTo(c*Jc(p),c*ef(p)),l.arc(0,0,c,p,h,g));else{var y,_,v=h,m=p,x=h,b=p,S=d,w=d,T=a.apply(this,arguments)/2,M=T>1e-12&&(r?+r.apply(this,arguments):nf(c*c+f*f)),k=tf($c(f-c)/2,+n.apply(this,arguments)),z=k,F=k;if(M>1e-12){var C=sf(M/c*ef(T)),A=sf(M/f*ef(T));(S-=2*C)>1e-12?(x+=C*=g?1:-1,b-=C):(S=0,x=b=(h+p)/2),(w-=2*A)>1e-12?(v+=A*=g?1:-1,m-=A):(w=0,v=m=(h+p)/2)}var E=f*Jc(v),L=f*ef(v),N=c*Jc(b),D=c*ef(b);if(k>1e-12){var P,O=f*Jc(m),R=f*ef(m),I=c*Jc(x),W=c*ef(x);if(d<rf&&(P=df(E,L,I,W,O,R,N,D))){var U=E-P[0],j=L-P[1],H=O-P[0],B=R-P[1],G=1/ef(lf((U*H+j*B)/(nf(U*U+j*j)*nf(H*H+B*B)))/2),Y=nf(P[0]*P[0]+P[1]*P[1]);z=tf(k,(c-Y)/(G-1)),F=tf(k,(f-Y)/(G+1))}}w>1e-12?F>1e-12?(y=gf(I,W,E,L,f,F,g),_=gf(O,R,N,D,f,F,g),l.moveTo(y.cx+y.x01,y.cy+y.y01),F<k?l.arc(y.cx,y.cy,F,Kc(y.y01,y.x01),Kc(_.y01,_.x01),!g):(l.arc(y.cx,y.cy,F,Kc(y.y01,y.x01),Kc(y.y11,y.x11),!g),l.arc(0,0,f,Kc(y.cy+y.y11,y.cx+y.x11),Kc(_.cy+_.y11,_.cx+_.x11),!g),l.arc(_.cx,_.cy,F,Kc(_.y11,_.x11),Kc(_.y01,_.x01),!g))):(l.moveTo(E,L),l.arc(0,0,f,v,m,!g)):l.moveTo(E,L),c>1e-12&&S>1e-12?z>1e-12?(y=gf(N,D,O,R,c,-z,g),_=gf(E,L,I,W,c,-z,g),l.lineTo(y.cx+y.x01,y.cy+y.y01),z<k?l.arc(y.cx,y.cy,z,Kc(y.y01,y.x01),Kc(_.y01,_.x01),!g):(l.arc(y.cx,y.cy,z,Kc(y.y01,y.x01),Kc(y.y11,y.x11),!g),l.arc(0,0,c,Kc(y.cy+y.y11,y.cx+y.x11),Kc(_.cy+_.y11,_.cx+_.x11),g),l.arc(_.cx,_.cy,z,Kc(_.y11,_.x11),Kc(_.y01,_.x01),!g))):l.arc(0,0,c,b,x,g):l.lineTo(N,D)}else l.moveTo(0,0);if(l.closePath(),s)return l=null,s+""||null}return s.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-rf/2;return[Jc(r)*n,ef(r)*n]},s.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Zc(+e),s):t},s.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Zc(+t),s):e},s.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Zc(+t),s):n},s.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Zc(+t),s):r},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Zc(+t),s):i},s.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Zc(+t),s):o},s.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Zc(+t),s):a},s.context=function(t){return arguments.length?(l=null==t?null:t,s):l},s};function _f(t){this._context=t}_f.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var vf=function(t){return new _f(t)};function mf(t){return t[0]}function xf(t){return t[1]}var bf=function(){var t=mf,e=xf,n=Zc(!0),r=null,i=vf,o=null;function a(a){var l,s,u,c=a.length,f=!1;for(null==r&&(o=i(u=Rc())),l=0;l<=c;++l)!(l<c&&n(s=a[l],l,a))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(s,l,a),+e(s,l,a));if(u)return o=null,u+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:Zc(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Zc(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Zc(!!t),a):n},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a},Sf=function(){var t=mf,e=null,n=Zc(0),r=xf,i=Zc(!0),o=null,a=vf,l=null;function s(s){var u,c,f,h,p,d=s.length,g=!1,y=new Array(d),_=new Array(d);for(null==o&&(l=a(p=Rc())),u=0;u<=d;++u){if(!(u<d&&i(h=s[u],u,s))===g)if(g=!g)c=u,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),f=u-1;f>=c;--f)l.point(y[f],_[f]);l.lineEnd(),l.areaEnd()}g&&(y[u]=+t(h,u,s),_[u]=+n(h,u,s),l.point(e?+e(h,u,s):y[u],r?+r(h,u,s):_[u]))}if(p)return l=null,p+""||null}function u(){return bf().defined(i).curve(a).context(o)}return s.x=function(n){return arguments.length?(t="function"==typeof n?n:Zc(+n),e=null,s):t},s.x0=function(e){return arguments.length?(t="function"==typeof e?e:Zc(+e),s):t},s.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:Zc(+t),s):e},s.y=function(t){return arguments.length?(n="function"==typeof t?t:Zc(+t),r=null,s):n},s.y0=function(t){return arguments.length?(n="function"==typeof t?t:Zc(+t),s):n},s.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Zc(+t),s):r},s.lineX0=s.lineY0=function(){return u().x(t).y(n)},s.lineY1=function(){return u().x(t).y(r)},s.lineX1=function(){return u().x(e).y(n)},s.defined=function(t){return arguments.length?(i="function"==typeof t?t:Zc(!!t),s):i},s.curve=function(t){return arguments.length?(a=t,null!=o&&(l=a(o)),s):a},s.context=function(t){return arguments.length?(null==t?o=l=null:l=a(o=t),s):o},s},wf=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},Tf=function(t){return t},Mf=function(){var t=Tf,e=wf,n=null,r=Zc(0),i=Zc(af),o=Zc(0);function a(a){var l,s,u,c,f,h=a.length,p=0,d=new Array(h),g=new Array(h),y=+r.apply(this,arguments),_=Math.min(af,Math.max(-af,i.apply(this,arguments)-y)),v=Math.min(Math.abs(_)/h,o.apply(this,arguments)),m=v*(_<0?-1:1);for(l=0;l<h;++l)(f=g[d[l]=l]=+t(a[l],l,a))>0&&(p+=f);for(null!=e?d.sort((function(t,n){return e(g[t],g[n])})):null!=n&&d.sort((function(t,e){return n(a[t],a[e])})),l=0,u=p?(_-h*m)/p:0;l<h;++l,y=c)s=d[l],c=y+((f=g[s])>0?f*u:0)+m,g[s]={data:a[s],index:l,value:f,startAngle:y,endAngle:c,padAngle:v};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:Zc(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,n=null,a):e},a.sort=function(t){return arguments.length?(n=t,e=null,a):n},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Zc(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Zc(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Zc(+t),a):o},a};function kf(){this._=null}function zf(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Ff(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Cf(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Af(t){for(;t.L;)t=t.L;return t}kf.prototype={constructor:kf,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Af(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Ff(this,n),n=(t=n).U),n.C=!1,r.C=!0,Cf(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Cf(this,n),n=(t=n).U),n.C=!1,r.C=!0,Ff(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,a=t.R;if(n=o?a?Af(a):o:a,i?i.L===t?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=a,a.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Ff(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Cf(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Ff(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Cf(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Ff(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Cf(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Ef=kf;function Lf(t,e,n,r){var i=[null,null],o=nh.push(i)-1;return i.left=t,i.right=e,n&&Df(i,t,e,n),r&&Df(i,e,t,r),th[t.index].halfedges.push(o),th[e.index].halfedges.push(o),i}function Nf(t,e,n){var r=[e,n];return r.left=t,r}function Df(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function Pf(t,e,n,r,i){var o,a=t[0],l=t[1],s=a[0],u=a[1],c=0,f=1,h=l[0]-s,p=l[1]-u;if(o=e-s,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<f&&(f=o)}else if(h>0){if(o>f)return;o>c&&(c=o)}if(o=r-s,h||!(o<0)){if(o/=h,h<0){if(o>f)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<f&&(f=o)}if(o=n-u,p||!(o>0)){if(o/=p,p<0){if(o<c)return;o<f&&(f=o)}else if(p>0){if(o>f)return;o>c&&(c=o)}if(o=i-u,p||!(o<0)){if(o/=p,p<0){if(o>f)return;o>c&&(c=o)}else if(p>0){if(o<c)return;o<f&&(f=o)}return!(c>0||f<1)||(c>0&&(t[0]=[s+c*h,u+c*p]),f<1&&(t[1]=[s+f*h,u+f*p]),!0)}}}}}function Of(t,e,n,r,i){var o=t[1];if(o)return!0;var a,l,s=t[0],u=t.left,c=t.right,f=u[0],h=u[1],p=c[0],d=c[1],g=(f+p)/2,y=(h+d)/2;if(d===h){if(g<e||g>=r)return;if(f>p){if(s){if(s[1]>=i)return}else s=[g,n];o=[g,i]}else{if(s){if(s[1]<n)return}else s=[g,i];o=[g,n]}}else if(l=y-(a=(f-p)/(d-h))*g,a<-1||a>1)if(f>p){if(s){if(s[1]>=i)return}else s=[(n-l)/a,n];o=[(i-l)/a,i]}else{if(s){if(s[1]<n)return}else s=[(i-l)/a,i];o=[(n-l)/a,n]}else if(h<d){if(s){if(s[0]>=r)return}else s=[e,a*e+l];o=[r,a*r+l]}else{if(s){if(s[0]<e)return}else s=[r,a*r+l];o=[e,a*e+l]}return t[0]=s,t[1]=o,!0}function Rf(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function If(t,e){return e[+(e.left!==t.site)]}function Wf(t,e){return e[+(e.left===t.site)]}var Uf,jf=[];function Hf(){zf(this),this.x=this.y=this.arc=this.site=this.cy=null}function Bf(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i[0],l=i[1],s=r[0]-a,u=r[1]-l,c=o[0]-a,f=o[1]-l,h=2*(s*f-u*c);if(!(h>=-ih)){var p=s*s+u*u,d=c*c+f*f,g=(f*p-u*d)/h,y=(s*d-c*p)/h,_=jf.pop()||new Hf;_.arc=t,_.site=i,_.x=g+a,_.y=(_.cy=y+l)+Math.sqrt(g*g+y*y),t.circle=_;for(var v=null,m=eh._;m;)if(_.y<m.y||_.y===m.y&&_.x<=m.x){if(!m.L){v=m.P;break}m=m.L}else{if(!m.R){v=m;break}m=m.R}eh.insert(v,_),v||(Uf=_)}}}}function Gf(t){var e=t.circle;e&&(e.P||(Uf=e.N),eh.remove(e),jf.push(e),zf(e),t.circle=null)}var Yf=[];function qf(){zf(this),this.edge=this.site=this.circle=null}function Vf(t){var e=Yf.pop()||new qf;return e.site=t,e}function Xf(t){Gf(t),Qf.remove(t),Yf.push(t),zf(t)}function Zf(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],o=t.P,a=t.N,l=[t];Xf(t);for(var s=o;s.circle&&Math.abs(n-s.circle.x)<rh&&Math.abs(r-s.circle.cy)<rh;)o=s.P,l.unshift(s),Xf(s),s=o;l.unshift(s),Gf(s);for(var u=a;u.circle&&Math.abs(n-u.circle.x)<rh&&Math.abs(r-u.circle.cy)<rh;)a=u.N,l.push(u),Xf(u),u=a;l.push(u),Gf(u);var c,f=l.length;for(c=1;c<f;++c)u=l[c],s=l[c-1],Df(u.edge,s.site,u.site,i);s=l[0],(u=l[f-1]).edge=Lf(s.site,u.site,null,i),Bf(s),Bf(u)}function $f(t){for(var e,n,r,i,o=t[0],a=t[1],l=Qf._;l;)if((r=Kf(l,a)-o)>rh)l=l.L;else{if(!((i=o-Jf(l,a))>rh)){r>-rh?(e=l.P,n=l):i>-rh?(e=l,n=l.N):e=n=l;break}if(!l.R){e=l;break}l=l.R}!function(t){th[t.index]={site:t,halfedges:[]}}(t);var s=Vf(t);if(Qf.insert(e,s),e||n){if(e===n)return Gf(e),n=Vf(e.site),Qf.insert(s,n),s.edge=n.edge=Lf(e.site,s.site),Bf(e),void Bf(n);if(n){Gf(e),Gf(n);var u=e.site,c=u[0],f=u[1],h=t[0]-c,p=t[1]-f,d=n.site,g=d[0]-c,y=d[1]-f,_=2*(h*y-p*g),v=h*h+p*p,m=g*g+y*y,x=[(y*v-p*m)/_+c,(h*m-g*v)/_+f];Df(n.edge,u,d,x),s.edge=Lf(u,t,null,x),n.edge=Lf(t,d,null,x),Bf(e),Bf(n)}else s.edge=Lf(e.site,s.site)}}function Kf(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var l=(n=a.site)[0],s=n[1],u=s-e;if(!u)return l;var c=l-r,f=1/o-1/u,h=c/u;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*u)-s+u/2+i-o/2)))/f+r:(r+l)/2}function Jf(t,e){var n=t.N;if(n)return Kf(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Qf,th,eh,nh,rh=1e-6,ih=1e-12;function oh(t,e){return e[1]-t[1]||e[0]-t[0]}function ah(t,e){var n,r,i,o=t.sort(oh).pop();for(nh=[],th=new Array(t.length),Qf=new Ef,eh=new Ef;;)if(i=Uf,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===n&&o[1]===r||($f(o),n=o[0],r=o[1]),o=t.pop();else{if(!i)break;Zf(i.arc)}if(function(){for(var t,e,n,r,i=0,o=th.length;i<o;++i)if((t=th[i])&&(r=(e=t.halfedges).length)){var a=new Array(r),l=new Array(r);for(n=0;n<r;++n)a[n]=n,l[n]=Rf(t,nh[e[n]]);for(a.sort((function(t,e){return l[e]-l[t]})),n=0;n<r;++n)l[n]=e[a[n]];for(n=0;n<r;++n)e[n]=l[n]}}(),e){var a=+e[0][0],l=+e[0][1],s=+e[1][0],u=+e[1][1];!function(t,e,n,r){for(var i,o=nh.length;o--;)Of(i=nh[o],t,e,n,r)&&Pf(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>rh||Math.abs(i[0][1]-i[1][1])>rh)||delete nh[o]}(a,l,s,u),function(t,e,n,r){var i,o,a,l,s,u,c,f,h,p,d,g,y=th.length,_=!0;for(i=0;i<y;++i)if(o=th[i]){for(a=o.site,l=(s=o.halfedges).length;l--;)nh[s[l]]||s.splice(l,1);for(l=0,u=s.length;l<u;)d=(p=Wf(o,nh[s[l]]))[0],g=p[1],f=(c=If(o,nh[s[++l%u]]))[0],h=c[1],(Math.abs(d-f)>rh||Math.abs(g-h)>rh)&&(s.splice(l,0,nh.push(Nf(a,p,Math.abs(d-t)<rh&&r-g>rh?[t,Math.abs(f-t)<rh?h:r]:Math.abs(g-r)<rh&&n-d>rh?[Math.abs(h-r)<rh?f:n,r]:Math.abs(d-n)<rh&&g-e>rh?[n,Math.abs(f-n)<rh?h:e]:Math.abs(g-e)<rh&&d-t>rh?[Math.abs(h-e)<rh?f:t,e]:null))-1),++u);u&&(_=!1)}if(_){var v,m,x,b=1/0;for(i=0,_=null;i<y;++i)(o=th[i])&&(x=(v=(a=o.site)[0]-t)*v+(m=a[1]-e)*m)<b&&(b=x,_=o);if(_){var S=[t,e],w=[t,r],T=[n,r],M=[n,e];_.halfedges.push(nh.push(Nf(a=_.site,S,w))-1,nh.push(Nf(a,w,T))-1,nh.push(Nf(a,T,M))-1,nh.push(Nf(a,M,S))-1)}}for(i=0;i<y;++i)(o=th[i])&&(o.halfedges.length||delete th[i])}(a,l,s,u)}this.edges=nh,this.cells=th,Qf=eh=nh=th=null}ah.prototype={constructor:ah,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return If(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(o=(i=n.halfedges).length)for(var i,o,a,l,s,u,c=n.site,f=-1,h=e[i[o-1]],p=h.left===c?h.right:h.left;++f<o;)a=p,p=(h=e[i[f]]).left===c?h.right:h.left,a&&p&&r<a.index&&r<p.index&&(s=a,u=p,((l=c)[0]-u[0])*(s[1]-l[1])-(l[0]-s[0])*(u[1]-l[1])<0)&&t.push([c.data,a.data,p.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,o=this,a=o._found||0,l=o.cells.length;!(i=o.cells[a]);)if(++a>=l)return null;var s=t-i.site[0],u=e-i.site[1],c=s*s+u*u;do{i=o.cells[r=a],a=null,i.halfedges.forEach((function(n){var r=o.edges[n],l=r.left;if(l!==i.site&&l||(l=r.right)){var s=t-l[0],u=e-l[1],f=s*s+u*u;f<c&&(c=f,a=l.index)}}))}while(null!==a);return o._found=r,null==n||c<=n*n?i.site:null}};function lh(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return sh(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sh(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function sh(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var uh=function(t,e){var n=Ju(0,e);if(n.stat_={default:void 0},n.stat=function(t,e){return arguments.length?2==arguments.length?(n.stat_[t]=e,n):"string"==typeof t||t instanceof String?n.stat_[t]:(n.stat_=t.default?t:{default:t},n):n.stat_.default},n.statData_={default:mc(),color:mc(),size:mc()},n.statData=function(t,e){return arguments.length?1==arguments.length?n.statData_[t]:(n.statData_[t]=e,n):n.statData_.default},n.noDataText_="No data available",n.lg_="en",n.transitionDuration_=500,n.tooltip_.textFunction=fh,n.filtersDefinitionFun_=void 0,n.callback_=void 0,n.legend_=void 0,n.legendObj_=void 0,["legend_","legendObj_","noDataText_","lg_","transitionDuration_","tooltipText_","filtersDefinitionFun_","callback_"].forEach((function(t){n[t.substring(0,t.length-1)]=function(e){return arguments.length?(n[t]=e,n):n[t]}})),t)for(var r in t)n[r]&&null!=t[r]&&n[r](t[r]);n.legend=function(t){return arguments.length?(n.legend_=t,n.legendObj_&&n.legendObj().update(),n):n.legend_},n.build=function(){if(n.buildMapTemplateBase(),n.filtersDefinitionFun_&&n.filtersDefinitionFun_(n.svg(),n.clnb_),n.legend()){n.legendObj(n.getLegendConstructor()(n,n.legend()));var t=n.legendObj();if(0==yt("#"+t.svgId).size()){var e=null==t.x?n.width()-100-t.boxPadding:t.x,r=null==t.y?t.boxPadding:t.y;n.svg().append("g").attr("class","legend").attr("transform","translate("+e+","+r+")").append("svg").attr("id",t.svgId)}t.build()}return n.updateGeoData(),n.updateStatData(),n};var i=function(){for(var t in n.stat_)if(!n.statData(t).isReady())return!1;return!0};return n.updateGeoData=function(){return n.updateGeoMT((function(){i()&&(n.updateStatValues(),n.callback()&&n.callback()())})),n},n.updateStatData=function(){for(var t in n.stat_){if(!n.stat(t)&&n.statData(t).get())return;"default"!=t||n.stat(t)||n.stat(t,{eurostatDatasetCode:"demo_r_d3dens",unitText:"inhab./km²"});var e=mc(n.stat(t));n.statData(t,e);var r=n.nutsLvl_;"mixed"==n.nutsLvl_&&(r=0),e.retrieveFromRemote(r,n.lg(),(function(){n.isGeoReady()&&i()&&(n.updateStatValues(),n.callback()&&n.callback()())}))}return n},n.updateStatValues=function(){return n.updateClassification(),n.updateStyle(),n.legendObj()&&n.legendObj().update(),n},n.updateClassification=function(){return console.log("Map updateClassification function not implemented"),n},n.updateStyle=function(){return console.log("Map updateStyle function not implemented"),n},n.getLegendConstructor=function(){return console.log("Map getLegendConstructor function not implemented"),xc},n.getTime=function(){return n.statData("default").getTime()},n.setFromURL=function(){var t=hh();return t.w&&n.width(t.w),t.h&&n.height(t.h),t.x&&t.y&&n.geoCenter([t.x,t.y]),t.z&&n.pixSize(t.z),t.s&&n.scale(t.s),t.lvl&&n.nutsLvl(t.lvl),t.time&&(n.filters_.time=t.time,delete n.filters_.lastTimePeriod),t.proj&&n.proj(t.proj),t.geo&&n.geo(t.geo),t.ny&&n.nutsYear(t.ny),t.lg&&n.lg(t.lg),t.clnb&&n.clnb(+t.clnb),n},n.exportMapToSVG=function(){var t=ch(n.svg_.node()),e=URL.createObjectURL(t),r=document.createElement("a");return r.href=e,r.download="eurostatmap.svg",document.body.appendChild(r),r.click(),document.body.removeChild(r),n},n.exportMapToPNG=function(){var t,e,r,i,o;return(t=n.svg_.node(),i=new Promise((function(t,n){return e=t,r=n})),(o=new Image).onerror=r,o.onload=function(){var n=t.getBoundingClientRect(),r=document.createElement("canvas");r.width=n.width,r.height=n.height;var i=r.getContext("2d");i.drawImage(o,0,0,n.width,n.height),i.canvas.toBlob(e)},o.src=URL.createObjectURL(ch(t)),i).then((function(t){var e=URL.createObjectURL(t),n=document.createElement("a");n.href=e,n.download="eurostatmap.png",document.body.appendChild(n),n.click(),document.body.removeChild(n)})),n},n};function ch(t){var e="http://www.w3.org/2000/xmlns/";t=t.cloneNode(!0);for(var n=window.location.href+"#",r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,null,!1);r.nextNode();){var i,o=lh(r.currentNode.attributes);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.value.includes(n)&&(a.value=a.value.replace(n,"#"))}}catch(t){o.e(t)}finally{o.f()}}t.setAttributeNS(e,"xmlns","http://www.w3.org/2000/svg"),t.setAttributeNS(e,"xmlns:xlink","http://www.w3.org/1999/xlink");var l=(new window.XMLSerializer).serializeToString(t);return new Blob([l],{type:"image/svg+xml"})}var fh=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData().get(t.properties.id);if(!r||0!==r.value&&!r.value)return n.push(e.noDataText_),n.join("");n.push(Vu(r.value));var i=e.statData("default").unitText();i&&n.push(" "+i);var o=r.status;if(o&&e.tooltip_.showFlags)if("short"===e.tooltip_.showFlags)n.push(" "+o);else{var a=ji[o];n.push(a?" ("+a+")":" "+o)}return n.join("")},hh=function(){for(var t={},e=["w","h","x","y","z","s","lvl","time","proj","geo","ny","lg","sl","clnb"],n=0;n<e.length;n++)t[e[n]]=getURLParameterByName(e[n]);return t},ph=function(t,e){var n=xc(t);if(n.ascending=!0,n.shapeWidth=13,n.shapeHeight=15,n.sepLineLength=17,n.sepLineStroke="black",n.sepLineStrokeWidth=1,n.labelFontSize=12,n.labelDecNb=2,n.labelOffset=3,n.labelFormatter=null,n.noData=!0,n.noDataText="No data",e)for(var r in e)n[r]=e[r];return n.update=function(){var t=n.map,e=t.svg(),r=n.lgg;if(t.legend_)for(var i in t.legend_)n[i]=t.legend_[i];r.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&r.append("text").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),r.style("font-family",t.fontFamily_);for(var o=n.labelFormatter?n.labelFormatter:on("."+n.labelDecNb+"f"),a=function(i){var a=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+i*n.shapeHeight,l=n.ascending?t.clnb()-i-1:i;r.append("rect").attr("x",n.boxPadding).attr("y",a).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.classToFillStyle()(l,t.clnb())).on("mouseover",(function(){var n=e.select("#g_nutsrg").selectAll("[ecl='"+l+"']");n.style("fill",t.nutsrgSelFillSty()),n.attr("fill___",(function(){yt(this).attr("fill")})),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[ecl='"+l+"']").style("fill",(function(){yt(this).attr("fill___")})),yt(this).style("fill",t.classToFillStyle()(l,t.clnb()))})),i>0&&r.append("line").attr("x1",n.boxPadding).attr("y1",a).attr("x2",n.boxPadding+n.sepLineLength).attr("y2",a).attr("stroke",n.sepLineStroke).attr("stroke-width",n.sepLineStrokeWidth),i<t.clnb()-1&&r.append("text").attr("x",n.boxPadding+Math.max(n.shapeWidth,n.sepLineLength)+n.labelOffset).attr("y",a+n.shapeHeight).attr("alignment-baseline","middle").text(o(t.classifier().invertExtent(l)[n.ascending?0:1])).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)},l=0;l<t.clnb();l++)a(l);if(n.noData){var s=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+t.clnb()*n.shapeHeight+n.boxPadding;r.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){var n=e.select("#g_nutsrg").selectAll("[ecl='nd']");n.style("fill",t.nutsrgSelFillSty()),n.attr("fill___",(function(t){yt(this).attr("fill")})),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[ecl='nd']").style("fill",(function(t){yt(this).attr("fill___")})),yt(this).style("fill",t.noDataFillStyle())})),r.append("text").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",s+.5*n.shapeHeight).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)}n.setBoxDimension()},n},dh=function(t,e){return t=t||interpolateOrRd,e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},gh=function(){return function(t){return"url(#pattern_"+t+")"}},yh=Wi(new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Ii)),_h={draw:function(t,e){var n=Math.sqrt(e/rf);t.moveTo(n,0),t.arc(0,0,n,0,af)}},vh={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},mh=Math.sqrt(1/3),xh=2*mh,bh={draw:function(t,e){var n=Math.sqrt(e/xh),r=n*mh;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Sh=Math.sin(rf/10)/Math.sin(7*rf/10),wh=Math.sin(af/10)*Sh,Th=-Math.cos(af/10)*Sh,Mh={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=wh*n,i=Th*n;t.moveTo(0,-n),t.lineTo(r,i);for(var o=1;o<5;++o){var a=af*o/5,l=Math.cos(a),s=Math.sin(a);t.lineTo(s*n,-l*n),t.lineTo(l*r-s*i,s*r+l*i)}t.closePath()}},kh={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},zh=Math.sqrt(3),Fh={draw:function(t,e){var n=-Math.sqrt(e/(3*zh));t.moveTo(0,2*n),t.lineTo(-zh*n,-n),t.lineTo(zh*n,-n),t.closePath()}},Ch=Math.sqrt(3)/2,Ah=1/Math.sqrt(12),Eh=3*(Ah/2+1),Lh={draw:function(t,e){var n=Math.sqrt(e/Eh),r=n/2,i=n*Ah,o=r,a=n*Ah+n,l=-o,s=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(l,s),t.lineTo(-.5*r-Ch*i,Ch*r+-.5*i),t.lineTo(-.5*o-Ch*a,Ch*o+-.5*a),t.lineTo(-.5*l-Ch*s,Ch*l+-.5*s),t.lineTo(-.5*r+Ch*i,-.5*i-Ch*r),t.lineTo(-.5*o+Ch*a,-.5*a-Ch*o),t.lineTo(-.5*l+Ch*s,-.5*s-Ch*l),t.closePath()}},Nh=function(){var t=Zc(_h),e=Zc(64),n=null;function r(){var r;if(n||(n=r=Rc()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:Zc(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:Zc(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r};dn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]});var Dh=function(t,e){var n=xc(t);if(n.ascending=!1,n.legendSpacing=35,n.labelFontSize=12,n.sizeLegend={title:null,titleFontSize:12,titlePadding:5,values:void 0,cellNb:4,shapePadding:10,shapeOffset:{x:0,y:0},shapeFill:"white",labelOffset:{x:25,y:0},labelDecNb:0,labelFormatter:void 0},n.colorLegend={title:null,titleFontSize:12,titlePadding:10,shapeWidth:13,shapeHeight:15,shapePadding:1,labelOffset:{x:25,y:0},labelDecNb:0,labelFormatter:void 0,noData:!0,noDataText:"No data",sepLineLength:17,sepLineStroke:"black",sepLineStrokeWidth:1},e)for(var r in e)if("colorLegend"==r||"sizeLegend"==r)for(var i in n[r])e[r][i]&&(n[r][i]=e[r][i]);else n[r]=e[r];return n.update=function(){var t=n.map,e=n.lgg;if(t.legend_)for(var r in t.legend_)if("colorLegend"==r||"sizeLegend"==r)for(var i in n[r])t.legend_[r][i]&&(n[r][i]=t.legend_[r][i]);else n[r]=t.legend_[r];e.selectAll("*").remove(),n.makeBackgroundBox(),e.style("font-family",t.fontFamily_),t.classifierSize_&&function(t,e,r){var i=r.labelFormatter||Vu;r.title&&e.append("text").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill);var o,a,l,s=function(){var t;if(n.map.psCustomPath_)t=n.map.psCustomPath_;else if(n.map.psCustomShape_)t=n.map.psCustomShape_;else if("bar"==n.map.psShape_){t=Nh().type({draw:function(t,e){var r=Math.sqrt(e);t.moveTo(0,0),t.lineTo(0,r),t.lineTo(n.map.psBarWidth_,r),t.lineTo(n.map.psBarWidth_,0),t.lineTo(0,0),t.closePath()}})}else{var e=Rh[n.map.psShape_]||Rh.circle;t=Nh().type(e)}return t}(),u=t.classifierSize_.domain()[1];n._sizeLegendHeight=0,r.values&&(r.cellNb=r.values.length);for(var c=0,f=function(f){var h=n.ascending?r.cellNb-f+1:f,p=r.values?r.values[h-1]:u/h,d=t.classifierSize_(p),g=n.map.psCustomPath_?n.map.psCustomPath_:s.size(d*d)(),y=void 0,_=void 0;if("bar"==n.map.psShape_)y=n.boxPadding+10,_=n.boxPadding+(r.title?n.titleFontSize+r.titlePadding:0)+n._sizeLegendHeight,n._sizeLegendHeight=n._sizeLegendHeight+d+r.shapePadding;else if("custom"==n.map.psShape_){if(n._xOffset=t.classifierSize_(u),y=n.boxPadding+n._xOffset,o||(_=n.boxPadding+(r.title?n.titleFontSize+r.titlePadding:0)+n._sizeLegendHeight,l=_,a=d,n._sizeLegendHeight=n._sizeLegendHeight+_),o){var v=o.node().getBBox();c+=v.height*a,_=l+c+r.shapePadding*(f-1),n._sizeLegendHeight=n._sizeLegendHeight+v.height+r.shapePadding,a=d}}else n._xOffset=t.classifierSize_(u)/1.5,y=n.boxPadding+n._xOffset,_=n.boxPadding+(r.title?n.titleFontSize+r.titlePadding:0)+n._sizeLegendHeight+d/2+r.shapePadding,n._sizeLegendHeight=n._sizeLegendHeight+d+r.shapePadding;o=e.append("g").attr("transform","translate(".concat(y,",").concat(_,")")).style("fill",(function(e){return t.classifierColor_?r.shapeFill:t.psFill_})).style("fill-opacity",t.psFillOpacity()).style("stroke",t.psStroke()).style("stroke-width",t.psStrokeWidth()).attr("stroke","black").attr("stroke-width",.5).append("path").attr("d",g).attr("transform",(function(){return n.map.psCustomPath_?"translate(".concat(r.shapeOffset.x,",").concat(r.shapeOffset.y,") scale(").concat(d,")"):"translate(".concat(r.shapeOffset.x,",").concat(r.shapeOffset.y,")")}));var m=y+r.labelOffset.x,x=_+r.labelOffset.y;"bar"==n.map.psShape_?x+=d/2:"custom"==n.map.psShape_&&(x+=10*d),e.append("text").attr("x",m).attr("y",x).attr("alignment-baseline","middle").text(i(p)).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)},h=1;h<r.cellNb+1;h++)f(h)}(t,e,n.sizeLegend),t.classifierColor_&&function(t,e,r){var i=r.labelFormatter||Vu,o=t.svg();r.title&&e.append("text").attr("x",n.boxPadding).attr("y",n._sizeLegendHeight+n.boxPadding+n.titleFontSize+n.legendSpacing+r.titlePadding).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill);for(var a=n.boxPadding,l=t.psClasses_,s=function(s){var u=n._sizeLegendHeight+n.boxPadding+(r.title?n.titleFontSize+2*r.titlePadding:0)+s*(r.shapeHeight+r.shapePadding)+n.legendSpacing+r.shapePadding,c=n.ascending?s:l-s-1;e.append("g").attr("transform","translate(".concat(a,",").concat(u,")")).attr("fill",t.psClassToFillStyle()(c,l)).style("fill-opacity",t.psFillOpacity()).style("stroke",t.psStroke()).style("stroke-width",1).attr("stroke","black").attr("stroke-width",.5).append("rect").attr("width",r.shapeWidth).attr("height",r.shapeHeight).on("mouseover",(function(){var e=o.select("#g_ps").selectAll("[ecl='"+c+"']"),n=yt(this.parentNode).attr("fill");yt(this).attr("fill___",n),e.each((function(e,n){yt(this.childNodes[0]).style("fill",t.nutsrgSelFillSty())})),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=o.select("#g_ps").selectAll("[ecl='"+c+"']"),n=yt(this).attr("fill___");e.each((function(t,e){yt(this.childNodes[0]).style("fill",n)})),yt(this).style("fill",t.psClassToFillStyle()(c,l))}));var f=(n.map.psShape_,u);s>0&&e.append("line").attr("x1",a).attr("y1",f).attr("x2",a+r.sepLineLength).attr("y2",f).attr("stroke",r.sepLineStroke).attr("stroke-width",r.sepLineStrokeWidth);var h=u+r.labelOffset.y+1.2*n.labelFontSize;s<l-1&&e.append("text").attr("x",a+r.labelOffset.x).attr("y",h).attr("alignment-baseline","middle").text((function(e){return i(t.classifierColor_.invertExtent(n.ascending?c+1:c-1)[n.ascending?0:1])})).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)},u=0;u<l;u++)s(u);if(r.noData){var c=n._sizeLegendHeight+n.boxPadding+(r.title?n.titleFontSize+n.boxPadding+2*r.titlePadding:0)+t.psClasses_*(r.shapeHeight+r.shapePadding)+n.legendSpacing+r.shapePadding;e.append("g").attr("transform","translate(".concat(a,",").concat(c,")")).attr("fill",t.noDataFillStyle()).style("fill-opacity",t.psFillOpacity()).style("stroke",t.psStroke()).attr("stroke-width",1).append("rect").attr("width",r.shapeWidth).attr("height",r.shapeHeight).on("mouseover",(function(){var e=o.select("#g_ps").selectAll("[ecl='nd']"),n=yt(this.parentNode).attr("fill");yt(this).attr("fill___",n),e.each((function(e,n){yt(this.childNodes[0]).style("fill",t.noDataFillStyle())})),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=o.select("#g_ps").selectAll("[ecl='nd']"),n=yt(this).attr("fill___");e.each((function(t,e){yt(this.childNodes[0]).style("fill",n)})),yt(this).style("fill",t.noDataFillStyle())})),e.append("text").attr("x",a+r.labelOffset.x).attr("y",c+n.boxPadding).attr("alignment-baseline","middle").text(r.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)}}(t,e,n.colorLegend),n.setBoxDimension()},n},Ph=function(t){var e=uh(t,!0);return e.psShape_="circle",e.psCustomShape_,e.psCustomPath_,e.psOffset_={x:0,y:0},e.psMaxSize_=30,e.psMinSize_=5,e.psBarWidth_=10,e.psMaxValue_=void 0,e.psMinValue_=void 0,e.psFill_="#2d50a0",e.psFillOpacity_=.7,e.psStroke_="#000",e.psStrokeWidth_=.3,e.psClasses_=5,e.psColors_=null,e.psColorFun_=yh,e.psClassToFillStyle_=void 0,e.noDataFillStyle_="lightgray",e.psThreshold_=[0],e.psClassifMethod_="quantile",e.makeClassifNice_=!0,e.classifierSize_=void 0,e.classifierColor_=void 0,e.tooltip_.textFunction=Ih,["psMaxSize_","psMinSize_","psMaxValue_","psMinValue_","psFill_","psFillOpacity_","psStroke_","psStrokeWidth_","classifierSize_","classifierColor_","psShape_","psCustomShape_","psBarWidth_","psClassToFillStyle_","psColorFun_","noDataFillStyle_","psThreshold_","psColors_","psCustomPath_","psOffset_","psClassifMethod_","psClasses_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["psMaxSize","psMinSize","psFill","psFillOpacity","psStroke","psStrokeWidth","classifierSize","classifierColor","psShape","psCustomShape","psBarWidth","psClassToFillStyle","psColorFun","noDataFillStyle","psThreshold","psColors","psCustomPath","psOffset","psClassifMethod","psClasses"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.psColorFun=function(t){return arguments.length?(e.psColorFun_=t,e.psClassToFillStyle_=Oh(e.psColorFun_,e.psColors_),e):e.psColorFun_},e.psThreshold=function(t){return arguments.length?(e.psThreshold_=t,e.psClasses(t.length+1),e):e.psThreshold_},e.updateClassification=function(){return function(){var t,n=function(t){return i()(Array(t).keys())},r=e.statData("size").getArray(),o=e.psMinValue_?e.psMinValue_:e.statData("size").getMin(),a=e.psMaxValue_?e.psMaxValue_:e.statData("size").getMax();if(t=r?[o,a]:[e.statData().getMin(),e.statData().getMax()],e.classifierSize(Ln().domain(t).range([e.psMinSize_,e.psMaxSize_])),e.statData("color").getArray())if("quantile"===e.psClassifMethod_){var l=e.statData("color").getArray(),s=n(e.psClasses_);e.classifierColor(Nn().domain(l).range(s))}else if("equinter"===e.psClassifMethod_){var u=e.statData("color").getArray(),c=n(e.psClasses_);e.classifierColor(Dn().domain([o(u),a(u)]).range(c)),e.makeClassifNice_&&e.classifierColor().nice()}else if("threshold"===e.psClassifMethod_){e.psClasses(e.psThreshold().length+1);var f=n(e.psClasses_);e.classifierColor(Pn().domain(e.psThreshold()).range(f))}}(),e.svg()&&e.classifierColor_&&e.svg().selectAll(".symbol").attr("ecl",(function(t){var n=e.statData("color").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0==r||r?+e.classifierColor()(+r):"nd"})),e},e.updateStyle=function(){var t;e.psClassToFillStyle()||e.psClassToFillStyle(Oh(e.psColorFun_,e.psColors_));var n=e.statData("size").getArray()?e.statData("size"):e.statData();if(e.svg()){e.svg_.selectAll("g.symbol > *").remove(),t=e.psCustomPath_?e.svg().select("#g_ps").selectAll("g.symbol").append("path").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("class","ps").attr("d",e.psCustomPath_).attr("transform",(function(t){var r=n.get(t.properties.id),i=e.classifierSize_(+r.value);if(i)return"translate(".concat(e.psOffset_.x*i,",").concat(e.psOffset_.y*i,") scale(").concat(i,")")})):"bar"==e.psShape_?e.svg().select("#g_ps").selectAll("g.symbol").append("rect").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("width",e.psBarWidth_).attr("height",(function(t){var r=n.get(t.properties.id);return r&&r.value?e.classifierSize_(+r.value):0})).attr("transform",(function(){this.getBoundingClientRect();return"translate(".concat(-this.getAttribute("width")/2)+", -".concat(this.getAttribute("height"),")")})).transition().duration(e.transitionDuration()):e.svg().selectAll("g.symbol").append("path").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("class","ps").attr("d",(function(t){var n=e.statData("size")?e.statData("size"):e.statData();if(n){var r=n.get(t.properties.id);if(0==r||r){var i=e.classifierSize_(+r.value)||0;if(e.psCustomShape_)return e.psCustomShape_.size(i*i)();var o=Rh[e.psShape_]||Rh.circle;return Nh().type(o).size(i*i)()}}}));var r="WORLD"==e.geo_?"path.worldrg":"path.nutsrg",i=e.svg().selectAll(r);"WORLD"!==e.geo_?"mixed"==e.nutsLvl_&&(e.svg().selectAll("g.symbol").style("display",(function(t){var r=n.get(t.properties.id);return r&&r.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&":"!=r.value?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])?"block":void 0:"none"})),i.style("display",(function(t){var r=n.get(t.properties.id);return r&&r.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])?"block":void 0:"none"})),i.style("stroke",(function(t){var r=yt(this).attr("lvl"),i=n.get(t.properties.id);if(i&&i.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1]))return e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&"0"!==r?e.nutsbnStroke_[parseInt(r)]||"#777":void 0})).style("stroke-width",(function(t){var r=yt(this).attr("lvl"),i=n.get(t.properties.id);if(i&&i.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1]))return e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&"0"!==r?e.nutsbnStrokeWidth_[parseInt(r)]||"#777":void 0}))):i.attr("fill",(function(t){var r=n.get(t.properties.id);return r&&r.value?e.nutsrgFillStyle_:e.worldFillStyle_})),t.style("fill-opacity",e.psFillOpacity()).style("stroke",e.psStroke()).style("stroke-width",e.psStrokeWidth()).style("fill",(function(){if(e.classifierColor_){var t=yt(this.parentNode).attr("ecl");return t&&"nd"!==t?e.psClassToFillStyle_(t,e.psClasses_):e.noDataFillStyle()||"gray"}return e.psFill()}))}return e},e.getLegendConstructor=function(){return Dh},e},Oh=function(t,e){return t=t||yh,e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},Rh={cross:vh,square:kh,diamond:bh,triangle:Fh,star:Mh,wye:Lh,circle:_h},Ih=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData("size").getArray()?e.statData("size"):e.statData(),i=r.get(t.properties.id);if(!i||0!=i.value&&!i.value)n.push(e.noDataText_);else{n.push(Vu(i.value));var o=r.unitText();o&&n.push(" "+o)}if(n.push("<br>"),e.statData("color").getArray()){var a=e.statData("color").get(t.properties.id);if(!a||0!=a.value&&!a.value)n.push(e.noDataText_);else{n.push(Vu(a.value));var l=e.statData("color").unitText();l&&n.push(" "+l)}}return n.join("")},Wh=Ii("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Uh=function(t,e){var n=xc(t);if(n.shapeWidth=13,n.shapeHeight=15,n.shapePadding=5,n.labelFontSize=12,n.labelOffset=5,n.noData=!0,n.noDataText="No data",e)for(var r in e)n[r]=e[r];return n.update=function(){var t=n.map,e=n.lgg,r=t.svg();e.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&e.append("text").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),e.style("font-family",t.fontFamily_);for(var i=t.classifier().domain(),o=function(o){var a=i[o],l=t.classifier()(a),s=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+o*(n.shapeHeight+n.shapePadding);e.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.classToFillStyle()[a]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']");e.style("fill",t.nutsrgSelFillSty());var n=yt(this);e.attr("fill___",(function(t){n.attr("fill")})),n.style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']"),n=yt(this);e.style("fill",(function(t){n.attr("fill___")})),n.style("fill",t.classToFillStyle()[l])})),e.append("text").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",s+.5*n.shapeHeight).attr("alignment-baseline","middle").text(t.classToText()?t.classToText()[a]:a).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']");e.style("fill",t.nutsrgSelFillSty());var n=yt(this);e.attr("fill___",(function(t){n.attr("fill")}))})).on("mouseout",(function(){var t=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']"),e=yt(this);t.style("fill",(function(t){e.attr("fill___")}))}))},a=0;a<i.length;a++)o(a);if(n.noData){var l=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+i.length*(n.shapeHeight+n.shapePadding);e.append("rect").attr("x",n.boxPadding).attr("y",l).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='nd']");e.style("fill",t.nutsrgSelFillSty()),e.attr("fill___",(function(t){yt(this).attr("fill")})),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){r.select("#g_nutsrg").selectAll("[ecl='nd']").style("fill",(function(t){yt(this).attr("fill___")})),yt(this).style("fill",t.noDataFillStyle())})),e.append("text").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",l+.5*n.shapeHeight).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)}n.setBoxDimension()},n},jh=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData().get(t.properties.id);if(!r||0!=r.value&&!r.value)return n.push(e.noDataText_),n.join("");var i=r.value;if(e.classToText_){var o=e.classToText_[i];return n.push(o||i),n.join("")}return n.push(i),n.join("")},Hh=function(t,e){var n=xc(t);if(n.squareSize=50,n.label1="Variable 1",n.label2="Variable 2",n.labelFontSize=12,n.noData=!0,n.noDataShapeSize=15,n.noDataText="No data",e)for(var r in e)n[r]=e[r];return n.update=function(){var t=n.map,e=t.svg(),r=n.lgg,i=t.clnb(),o=n.squareSize/i,a=.7071*n.squareSize+n.boxPadding;r.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&r.append("text").attr("x",a).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("text-anchor","middle").style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),r.style("font-family",t.fontFamily_);for(var l=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0),s=r.append("g").attr("transform","translate("+n.boxPadding+","+(a+l)+") rotate(-45) translate("+n.boxPadding+",0)"),u=0;u<i;u++)for(var c=function(n){var r=i-u-1,a=i-n-1,l=t.classToFillStyle()(r,a);s.append("rect").attr("x",(i-1-u)*o).attr("y",n*o).attr("width",o).attr("height",o).attr("fill",l).on("mouseover",(function(){var n=e.select("#g_nutsrg").selectAll("[ecl1='"+r+"']").filter("[ecl2='"+a+"']");n.style("fill",t.nutsrgSelFillSty()),n.attr("fill___",(function(){yt(this).attr("fill")})),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[ecl1='"+r+"']").filter("[ecl2='"+a+"']").style("fill",(function(){yt(this).attr("fill___")})),yt(this).style("fill",l)}))},f=0;f<i;f++)c(f);s.append("text").attr("x",0).attr("y",n.squareSize+n.labelFontSize).text(n.label1).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill),s.append("text").attr("x",-n.labelFontSize).attr("y",n.labelFontSize).text(n.label2).attr("transform","rotate(90) translate("+n.labelFontSize+",0)").style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill),s.append("rect").attr("x",0).attr("y",0).attr("width",n.squareSize).attr("height",n.squareSize).attr("fill","none").style("stroke","black").attr("stroke-width",.7),n.noData&&(l=l+1.4142*n.squareSize+2*n.boxPadding+n.labelFontSize,r.append("rect").attr("x",n.boxPadding).attr("y",l).attr("width",n.noDataShapeSize).attr("height",n.noDataShapeSize).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.7).on("mouseover",(function(){var n=e.select("#g_nutsrg").selectAll("[nd='nd']");n.style("fill",t.nutsrgSelFillSty()),n.attr("fill___",(function(t){yt(this).attr("fill")})),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(t){yt(this).attr("fill___")})),yt(this).style("fill",t.noDataFillStyle())})),r.append("text").attr("x",n.boxPadding+n.noDataShapeSize+n.boxPadding).attr("y",l+.5*n.noDataShapeSize).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)),n.setBoxDimension()},n},Bh=function(t,e,n,r,i){for(var o=[],a=Fe(e,n),l=Fe(r,i),s=0;s<t;s++){for(var u=s/(t-1),c=Fe(a(u),l(u)),f=[],h=0;h<t;h++)f.push(c(h/(t-1)));o.push(f)}return function(t,e){return o[t][e]}},Gh=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData("v1").get(t.properties.id);if(!r||0!=r.value&&!r.value)n.push(e.noDataText_);else{n.push(r.value);var i=e.statData("v1").unitText();i&&n.push(" "+i)}n.push("<br>");var o=e.statData("v2").get(t.properties.id);if(!o||0!=o.value&&!o.value)n.push(e.noDataText_);else{n.push(o.value);var a=e.statData("v2").unitText();a&&n.push(" "+a)}return n.join("")},Yh=Ii("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),qh=function(t,e){var n=xc(t);if(n.shapeWidth=13,n.shapeHeight=15,n.shapePadding=5,n.labelFontSize=12,n.labelOffset=5,n.noData=!0,n.noDataText="No data",e)for(var r in e)n[r]=e[r];return n.update=function(){var t=n.map,e=t.svg(),r=n.lgg;r.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&r.append("text").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),r.style("font-family",t.fontFamily_);var i=0,o=t.catColors(),a=function(a){var l=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+i*(n.shapeHeight+n.shapePadding),s=t.catColors()[a]||"lightgray";r.append("rect").attr("x",n.boxPadding).attr("y",l).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",o[a]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){e.selectAll("pattern").selectAll("rect[code='"+a+"']").style("fill",t.nutsrgSelFillSty()),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.selectAll("pattern").selectAll("rect[code='"+a+"']").style("fill",s),yt(this).style("fill",s)})),r.append("text").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",l+.5*n.shapeHeight).attr("alignment-baseline","middle").text(t.catLabels()[a]||a).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){e.selectAll("pattern").selectAll("rect[code='"+a+"']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var n=t.catColors()[a]||"lightgray";e.selectAll("pattern").selectAll("rect[code='"+a+"']").style("fill",n)})),i++};for(var l in o)a(l);if(n.noData){var s=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+i*(n.shapeHeight+n.shapePadding);r.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty()),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}));yt(this).style("fill",t.noDataFillStyle())})),r.append("text").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",s+.5*n.shapeHeight).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}))}))}n.setBoxDimension()},n},Vh=function(t,e){var n=xc(t);if(n.legendSpacing=15,n.labelFontSize=12,n.titleFontSize=12,n.sizeLegend={title:null,titlePadding:15,values:null},n.colorLegend={title:null,labelOffset:5,shapeWidth:13,shapeHeight:15,shapePadding:5,noData:!0,noDataText:"No data"},n._sizeLegendHeight=0,e)for(var r in e)if("colorLegend"==r||"sizeLegend"==r)for(var i in n[r])e[r][i]&&(n[r][i]=e[r][i]);else n[r]=e[r];return n.update=function(){var t=n.map,e=n.lgg;e.selectAll("*").remove(),n.makeBackgroundBox(),e.style("font-family",t.fontFamily_),function(t,e,r){var i=t.sizeClassifier_.domain();r.values||(r.values=[Math.floor(i[1]),Math.floor(i[0])]);!r.title&&n.title&&(r.title=n.title);r.title&&e.append("text").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill);var o=t.sizeClassifier_(Nt(r.values)),a=n.boxPadding+(r.title?n.titleFontSize+n.boxPadding+r.titlePadding:0)+2*o,l=e.append("g").attr("fill","black").attr("transform","translate(".concat(o+n.boxPadding,",").concat(a,")")).attr("text-anchor","right").selectAll("g").data(r.values).join("g");l.append("circle").attr("fill","none").attr("stroke","black").attr("cy",(function(e){return-t.sizeClassifier_(e)})).attr("r",t.sizeClassifier_),l.append("text").style("font-size",n.labelFontSize+"px").attr("y",(function(e,r){return-1-2*t.sizeClassifier_(e)-n.labelFontSize})).attr("x",30).attr("dy","1.2em").attr("xml:space","preserve").text((function(t){return t.toLocaleString("en").replace(/,/gi," ")})),l.append("line").style("stroke-dasharray",2).style("stroke","grey").attr("x1",2).attr("y1",(function(e,n){return-1-2*t.sizeClassifier_(e)})).attr("xml:space","preserve").attr("x2",30).attr("y2",(function(e,n){return-1-2*t.sizeClassifier_(e)})),n._sizeLegendHeight=a}(t,e,n.sizeLegend),function(t,e,r){var i=t.svg();r.title&&e.append("text").attr("x",n.boxPadding).attr("y",n._sizeLegendHeight+n.legendSpacing+n.boxPadding+n.titleFontSize).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill);e.style("font-family",t.fontFamily_);var o=0,a=t.catColors(),l=function(l){var s=n._sizeLegendHeight+n.legendSpacing+n.boxPadding+(r.title?n.titleFontSize+n.boxPadding:0)+o*(r.shapeHeight+r.shapePadding),u=t.catColors()[l]||"lightgray";e.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",r.shapeWidth).attr("height",r.shapeHeight).attr("fill",a[l]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){i.selectAll(".piechart").selectAll("path[code='"+l+"']").style("fill",t.nutsrgSelFillSty()),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){i.selectAll(".piechart").selectAll("path[code='"+l+"']").style("fill",u),yt(this).style("fill",u)})),e.append("text").attr("x",n.boxPadding+r.shapeWidth+r.labelOffset).attr("y",s+.5*r.shapeHeight).attr("alignment-baseline","middle").text(t.catLabels()[l]||l).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){i.selectAll("pattern").selectAll("rect[code='"+l+"']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=t.catColors()[l]||"lightgray";i.selectAll("pattern").selectAll("rect[code='"+l+"']").style("fill",e)})),o++};for(var s in a)l(s);if(r.noData){var u=n._sizeLegendHeight+n.legendSpacing+n.boxPadding+(r.title?n.titleFontSize+n.boxPadding:0)+o*(r.shapeHeight+r.shapePadding);e.append("rect").attr("x",n.boxPadding).attr("y",u).attr("width",r.shapeWidth).attr("height",r.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty()),yt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}));yt(this).style("fill",t.noDataFillStyle())})),e.append("text").attr("x",n.boxPadding+r.shapeWidth+r.labelOffset).attr("y",u+.5*r.shapeHeight).attr("alignment-baseline","middle").text(r.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}))}))}}(t,e,n.colorLegend),n.setBoxDimension()},n},Xh=function(t){var e=uh(t,!0);e.pieMinRadius_=5,e.pieMaxRadius_=15,e.pieChartInnerRadius_=0,e.pieStrokeFill_="white",e.pieStrokeWidth_=.3,e.tooltipPieRadius_=40,e.tooltipPieInnerRadius_=0,e.catColors_=void 0,e.catLabels_=void 0,e.pieOtherColor_="#FFCC80",e.pieOtherText_="Other",e.showOnlyWhenComplete_=!1,e.noDataFillStyle_="darkgray",e.sizeClassifier_=null,e.statPie_=null,["catColors_","catLabels_","showOnlyWhenComplete_","noDataFillStyle_","pieMaxRadius_","pieMinRadius_","pieChartInnerRadius_","pieOtherColor_","pieOtherText_","pieStrokeFill_","pieStrokeWidth_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["catColors","catLabels","showOnlyWhenComplete","noDataFillStyle","pieMaxRadius","pieMinRadius","pieChartInnerRadius","pieOtherColor","pieOtherText","pieStrokeFill","pieStrokeWidth"].forEach((function(n){null!=t[n]&&e[n](t[n])}));var n=void 0,r=void 0;e.statPie=function(t,i,o,a,l,s){t.filters=t.filters||{};for(var u=0;u<o.length;u++){var c=o[u];t.filters[i]=c;var f={};for(var h in t)f[h]=t[h];for(var p in f.filters={},t.filters)f.filters[p]=t.filters[p];e.stat(c,f),l&&(e.catColors_=e.catColors_||{},e.catColors_[c]=l[u]),a&&(e.catLabels_=e.catLabels_||{},e.catLabels_[c]=a[u])}if(n=o,s){r=s,t.filters[i]=s;var d={};for(var g in t)d[g]=t[g];for(var y in d.filters={},t.filters)d.filters[y]=t.filters[y];e.stat(s,d),e.catColors_.other=e.pieOtherColor_,e.catLabels_.other=e.pieOtherText_}return e};var i=function(t){for(var i={},o=0,a=0;a<n.length;a++){var l=n[a],s=e.statData(l).get(t);if(!s||0!=s.value&&!s.value||isNaN(s.value)){if(e.showOnlyWhenComplete())return}else i[l]=s.value,o+=s.value}if(r){var u=e.statData(r).get(t);u&&(o=u.value)}if(0!=o){for(var c=0;c<n.length;c++)i[n[c]]/=o;if(r){var f=0;for(var h in i)f+=i[h];i.other=1-f}return i}};e.updateClassification=function(){if(!n){var t=(n=Object.keys(e.statData_)).indexOf("default");t>-1&&n.splice(t,1)}var r,i=(r=[],e.svg().selectAll("#g_ps").selectAll("g.symbol").data().forEach((function(t){var e=t.properties.id,n=o(e);n&&r.push(n)})),wt(r));return e.sizeClassifier_=Ln().domain(i).range([e.pieMinRadius_,e.pieMaxRadius_]),e};var o=function(t){var i,o=0;if(r)!(i=e.statData(r).get(t))||0!=i.value&&!i.value||isNaN(i.value)?e.showOnlyWhenComplete()&&(o=void 0):o=i.value;else for(var a=0;a<n.length;a++){var l=n[a];if(!(i=e.statData(l).get(t))||0!=i.value&&!i.value||isNaN(i.value)){if(e.showOnlyWhenComplete())return}else o+=i.value}if(0!=o)return o};return e.updateStyle=function(){if(!e.catColors()){e.catColors({});for(var t=0;t<n.length;t++)e.catColors()[n[t]]=schemeCategory10[t%10]}e.catLabels_=e.catLabels_||{};var r=[];e.svg().selectAll("#g_ps").selectAll("g.symbol").append("g").attr("id",(function(t){return r.push(t.properties.id),"pie_"+t.properties.id}));var a="WORLD"==e.geo_?"path.worldrg":"path.nutsrg";return e.svg().selectAll(a).on("mouseover",(function(t){var n=yt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(){e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=yt(this);t.attr("fill");t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),r.forEach((function(t){var n=[],r=i(t);for(var a in r)n.push({code:a,value:r[a]});if(n&&0!=n.length){var l=e.svg().selectAll("#pie_"+t),s=e.sizeClassifier_(o(t)),u=e.pieChartInnerRadius_,c=Mf().sort(null).value((function(t){return t.value}));l.append("g").attr("stroke",e.pieStrokeFill_).attr("stroke-width",e.pieStrokeWidth_+"px").attr("class","piechart").selectAll("path").data(c(n)).join("path").attr("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("code",(function(t){return t.data.code})).attr("d",yf().innerRadius(u).outerRadius(s))}})),e},e.getLegendConstructor=function(){return Vh},e.tooltip_.textFunction=function(t,r){var a=yt("#tooltip_eurostat");a.html(""),a.selectAll("*").remove(),t.properties.id?a.append("div").html("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):a.append("div").html("<b>"+t.properties.na+"</b><br>");var l=[],s=i(t.properties.id);for(var u in s)l.push({code:u,value:s[u]});if(l&&0!=l.length){var c=Math.min(120,120)/2-30,f=a.append("svg").attr("width",120).attr("height",120).append("g").attr("transform","translate(60,60)"),h=Mf().sort(null).value((function(t){return t.value})),p=yf().innerRadius(0).outerRadius(.8*c),d=yf().innerRadius(.9*c).outerRadius(.9*c),g=h(l);f.selectAll("allSlices").data(g).enter().append("path").attr("d",p).attr("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("stroke","white").style("stroke-width","1px").style("opacity",.7),f.selectAll("allPolylines").data(g).enter().append("polyline").attr("stroke","black").style("fill","none").attr("stroke-width",1).attr("points",(function(t){if(t.data.value>.02){var e=p.centroid(t),n=d.centroid(t),r=d.centroid(t),i=t.startAngle+(t.endAngle-t.startAngle)/2;return r[0]=.95*c*(i<Math.PI?1:-1),[e,n,r]}})),f.selectAll("allLabels").data(g).enter().append("text").text((function(t){if(t.data.value>.02){var e=(100*t.data.value).toFixed();if(!isNaN(e))return e+"%"}})).attr("transform",(function(t){var e=d.centroid(t),n=t.startAngle+(t.endAngle-t.startAngle)/2;return e[0]=.99*c*(n<Math.PI?1:-1),"translate("+e+")"})).style("text-anchor",(function(t){return t.startAngle+(t.endAngle-t.startAngle)/2<Math.PI?"start":"end"})).style("font-size","12px");var y=document.createElement("div");y.style.padding="10px",y.style.paddingTop="0px",y.style.fontSize="13px";for(var _=0;_<n.length;_++){var v=n[_],m=e.statData(v).get(t.properties.id);if(m&&m.value){var x="<strong>"+e.catLabels_[v]+"</strong>: "+m.value.toFixed()+"<br>";y.innerHTML=y.innerHTML+x}}var b=o(t.properties.id);y.innerHTML=y.innerHTML+"<hr><strong>Total</strong>: ".concat(b.toFixed()," <br>"),a.node().appendChild(y)}else a.append("div").html(e.noDataText())},e},Zh=function(t){var e=uh(t,!0);e.sparkLineColor_="black",e.sparkAreaColor_="#41afaa",e.sparkLineWidth_=30,e.sparkLineHeight_=20,e.sparkLineStrokeWidth_=.4,e.sparkLineOpacity_=.6,e.sparkType_="line",e.sparkLineCircleRadius_=0,e.sparkTooltipChart_={width:100,height:50,margin:{left:60,right:40,top:40,bottom:40},circleRadius:1.5},e.showOnlyWhenComplete_=!1,e.statSpark_=null,e.sparkHeightClassifier_=null,["sparkLineColor_","showOnlyWhenComplete_","sparkType_","sparkLineWidth_","sparkLineHeight_","sparkLineStrokeWidth_","sparkLineOpacity_","sparkLineCircleRadius_","sparkLineAreaColor_","sparkTooltipChart_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["sparkLineColor","showOnlyWhenComplete","sparkType","sparkLineWidth","sparkLineHeight","sparkLineStrokeWidth","sparkLineOpacity","sparkLineCircleRadius_","sparkLineAreaColor","sparkTooltipChart_"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statSpark=function(t,r,i){t.filters=t.filters||{};for(var o=0;o<r.length;o++){var a=r[o];t.filters.time=a;var l={};for(var s in t)l[s]=t[s];for(var u in l.filters={},t.filters)l.filters[u]=t.filters[u];e.stat(a,l),i&&(e.catLabels_=e.catLabels_||{},e.catLabels_[a]=i[o])}return n=r,e};var n=void 0,r=function(t){for(var r=[],i=0,o=0;o<n.length;o++){var a=n[o],l=e.statData(a).get(t);if(!l||0!=l.value&&!l.value||isNaN(l.value)){if(e.showOnlyWhenComplete())return}else r.push({date:a,value:l.value}),i+=l.value}if(0!=i)return r};e.updateClassification=function(){if(!n){var t=(n=Object.keys(e.statData_)).indexOf("default");t>-1&&n.splice(t,1)}var r,o=(r=[],e.svg().selectAll("#g_ps").selectAll("g.symbol").data().forEach((function(t){var e=t.properties.id,n=i(e);n&&r.push(n)})),wt(r));return e.widthClassifier_=Ln().domain(o).range([0,e.sparkLineWidth_]),e.heightClassifier_=Ln().domain(o).range([0,e.sparkLineHeight_]),e},e.updateStyle=function(){var t=[],i=(e.svg().selectAll("#g_ps").selectAll("g.symbol").attr("id",(function(e){return t.push(e.properties.id),"spark_"+e.properties.id})),"WORLD"==e.geo_?"path.worldrg":"path.nutsrg");return e.svg().selectAll(i).on("mouseover",(function(t){var n=yt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(){e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=yt(this);t.attr("fill");t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),t.forEach((function(t){!function(t,r){var i,o,a,l,s=wt(r.map((function(t){return t.value})));"area"==e.sparkType_?(l=e.widthClassifier_(s[1]),a=e.heightClassifier_(s[1]),o=kn().domain(s).range([a-.5,0]),i=_n().domain([0,n.length-1]).range([.5,l-.5])):(l=e.sparkLineWidth_,a=e.sparkLineHeight_,o=kn().domain(s).range([e.sparkLineHeight_-.5,0]),i=_n().domain([0,n.length-1]).range([.5,e.sparkLineWidth_-.5])),"area"==e.sparkType_&&t.append("path").datum(r).attr("fill",e.sparkAreaColor_).attr("stroke",e.sparkLineColor_).attr("stroke-width",e.sparkLineStrokeWidth_+"px").attr("opacity",e.sparkLineOpacity_).attr("fill-opacity",.3).attr("stroke","none").attr("d",Sf().x((function(t,e){return i(e)})).y0(a).y1((function(t){return o(t.value)}))).attr("transform",(function(t){return"translate(0,-".concat(a/2,")")})),t.append("path").datum(r).attr("fill","none").attr("stroke",e.sparkLineColor_).attr("stroke-width",e.sparkLineStrokeWidth_+"px").attr("d",bf().x((function(t,e){return i(e)})).y((function(t){return o(t.value)}))).attr("transform",(function(t){return"translate(0,-".concat(a/2,")")})),t.selectAll("myCircles").data(r).enter().append("circle").attr("fill","red").attr("stroke","none").attr("cx",(function(t,e){return i(e)})).attr("cy",(function(t){return o(t.value)})).attr("r",e.sparkLineCircleRadius_).attr("transform",(function(t){return"translate(0,-".concat(a/2,")")}))}(e.svg().select("#spark_"+t),r(t))})),e};var i=function(t){for(var r,i=0,o=0;o<n.length;o++){var a=n[o];if(!(r=e.statData(a).get(t))||0!=r.value&&!r.value||isNaN(r.value)){if(e.showOnlyWhenComplete())return}else r.value>i&&(i=r.value)}if(0!=i)return i};return e.getLegendConstructor=function(){return ph},e.tooltip_.textFunction=function(t,i){var o=yt("#tooltip_eurostat");o.html(""),o.selectAll("*").remove(),t.properties.id?o.append("div").html("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):o.append("div").html("<b>"+t.properties.na+"</b><br>");var a=e.sparkTooltipChart_.height,l=e.sparkTooltipChart_.width,s=e.sparkTooltipChart_.margin,u=r(t.properties.id);!function(t,r,i,o){var a=wt(r.map((function(t){return t.value}))),l=kn().domain(a).range([o-.5,0]),s=_n().domain([n[0],n[n.length-1]]).range([.5,i-.5]);t.append("g").attr("class","axis").attr("transform","translate(0,"+o+")").call((u=s,Fc(3,u)).ticks(n.length).tickFormat(on(".0f"))).selectAll("text").style("text-anchor","end").attr("dx","-.8em").attr("dy",".15em").attr("transform","rotate(-65)");var u;var c=l.domain(),f=[c[0],Math.round((c[0]+c[1])/2),c[1]];t.append("g").attr("class","axis").call(function(t){return Fc(4,t)}(l).tickValues(f).tickFormat(on(",.2r"))),"area"==e.sparkType_&&t.append("path").datum(r).attr("fill",e.sparkAreaColor_).attr("stroke",e.sparkLineColor_).attr("stroke-width",1).attr("opacity",e.sparkLineOpacity_).attr("fill-opacity",.3).attr("stroke","none").attr("stroke","none").attr("d",Sf().x((function(t,e){return s(t.date)})).y0(o).y1((function(t){return l(t.value)})));t.append("path").datum(r).attr("fill","none").attr("stroke",e.sparkLineColor_).attr("stroke-width",1).attr("d",bf().x((function(t,e){return s(t.date)})).y((function(t){return l(t.value)}))),t.selectAll("myCircles").data(r).enter().append("circle").attr("fill","red").attr("stroke","none").attr("cx",(function(t,e){return s(t.date)})).attr("cy",(function(t){return l(t.value)})).attr("r",e.sparkTooltipChart_.circleRadius)}(o.append("svg").attr("width",l+s.left+s.right).attr("height",a+s.top+s.bottom).append("g").attr("transform","translate("+s.left+","+s.top+")"),u,l,a)},e},$h=function(t,e){return"ch"==t?function(t){var e=uh(t);return e.clnb_=7,e.classifMethod_="quantile",e.threshold_=[0],e.colors_=null,e.makeClassifNice_=!0,e.colorFun_=Ui,e.classToFillStyle_=void 0,e.noDataFillStyle_="lightgray",e.classifier_=void 0,["clnb_","classifMethod_","threshold_","makeClassifNice_","colorFun_","classToFillStyle_","noDataFillStyle_","classifier_","colors_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),e.colorFun=function(t){return arguments.length?(e.colorFun_=t,e.filtersDefinitionFun_?e.classToFillStyle(gh()):e.classToFillStyle(dh(e.colorFun(),e.colors_)),e):e.colorFun_},e.threshold=function(t){return arguments.length?(e.threshold_=t,e.clnb(t.length+1),e):e.threshold_},e.filtersDefinitionFun=function(t){return arguments.length?(e.filtersDefinitionFun_=t,e.svg()&&e.filtersDefinitionFun_(e.svg(),e.clnb_),e):e.filtersDefinitionFun_},t&&["clnb","classifMethod","threshold","makeClassifNice","colorFun","classToFillStyle","noDataFillStyle","colors_"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){var t=function(t){return i()(Array(t).keys())};if("quantile"===e.classifMethod_){var n=e.statData().getArray(),r=t(e.clnb());e.classifier(Nn().domain(n).range(r))}else if("equinter"===e.classifMethod_){var o=e.statData().getArray(),a=t(e.clnb());e.classifier(Dn().domain([Pt(o),Nt(o)]).range(a)),e.makeClassifNice_&&e.classifier().nice()}else if("threshold"===e.classifMethod_){e.clnb(e.threshold().length+1);var l=t(e.clnb());e.classifier(Pn().domain(e.threshold()).range(l))}var s="WORLD"==e.geo_?"path.worldrg":"path.nutsrg";e.svg()&&(e.svg().selectAll(s).attr("ecl",(function(t,n,r,i,o){var a=e.statData().get(t.properties.id);if(a){var l=a.value;if(0==l||l)return":"==l?"nd":+e.classifier()(+l)}})),"mixed"==e.nutsLvl_&&e.svg().selectAll("path.nutsrg0").attr("ecl",(function(t){var n=e.statData().get(t.properties.id);if(n){var r=n.value;if(0==r||r)return":"==r?"nd":+e.classifier()(+r)}})));return e},e.updateStyle=function(){if(e.filtersDefinitionFun_?e.classToFillStyle(gh()):e.classToFillStyle(dh(e.colorFun(),e.colors_)),e.svg()){var t="WORLD"==e.geo_?"path.worldrg":"path.nutsrg",n=e.svg().selectAll(t);n.transition().duration(e.transitionDuration()).attr("fill",(function(t){if("WORLD"==e.geo_){var n=yt(this).attr("ecl");return n?"nd"===n?e.noDataFillStyle()||"gray":e.classToFillStyle()(n,e.clnb()):e.nutsrgFillStyle_}if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var r=yt(this).attr("ecl");return r?"nd"===r?e.noDataFillStyle()||"gray":e.classToFillStyle()(r,e.clnb()):e.nutsrgFillStyle_}return e.nutsrgFillStyle_})).end().then((function(){n.on("mouseover",(function(t){var n=yt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(){e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=yt(this);t.attr("fill");t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())}))}),(function(t){})),"mixed"==e.nutsLvl_&&e.svg().selectAll("path.nutsrg").style("display",(function(t){var n=yt(this).attr("ecl"),r=yt(this).attr("lvl");return n&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])||"0"==r?"block":"none"})).style("stroke",(function(t){var n=yt(this).attr("lvl");if(yt(this).attr("ecl")&&"0"!==n)return e.nutsbnStroke_[parseInt(n)]||"#777"})).style("stroke-width",(function(t){var n=yt(this).attr("lvl");if(yt(this).attr("ecl")&&"0"!==n)return e.nutsbnStrokeWidth_[parseInt(n)]||.2})),e.labelsToShow_.includes("values")&&e.updateValuesLabels()}return e},e.updateValuesLabels=function(){return e.svg_.selectAll("g.stat-label > *").remove(),e.svg().selectAll("g.stat-label").append("text").text((function(t){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=e.statData().get(t.properties.id);if(!n||!n.value)return"";if(":"!==n.value)return n.value}})),e.labelShadow_&&e.svg().selectAll("g.stat-label-shadow").append("text").text((function(t){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=e.statData().get(t.properties.id);if(!n||!n.value)return"";if(":"!==n.value)return n.value}})),e},e.getLegendConstructor=function(){return ph},e}(e):"ct"==t?function(t){var e=uh(t);return e.classToFillStyle_=void 0,e.classToText_=void 0,e.noDataFillStyle_="lightgray",e.tooltip_.textFunction=jh,e.classifier_=void 0,["classToFillStyle_","classToText_","noDataFillStyle_","tooltipText_","classifier_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["classToFillStyle","classToText","noDataFillStyle","tooltipText","classifier"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){var t=e.statData().getUniqueValues(),n=i()(Array(t.length).keys());return e.classifier(Vt().domain(t).range(n)),e.svg().selectAll("path.nutsrg").attr("ecl",(function(t){var n=e.statData().get(t.properties.id);if(!n)return"nd";var r=n.value;return 0==r||r?+e.classifier()(isNaN(r)?r:+r):"nd"})),e},e.updateStyle=function(){if(!e.classToFillStyle()){for(var t={},n=e.classifier().domain(),r=0;r<n.length;r++)t[n[r]]=Wh[r%12];e.classToFillStyle(t)}var i="WORLD"==e.geo_?"path.worldrg":"path.nutsrg",o=e.svg().selectAll(i);return o.transition().duration(e.transitionDuration()).attr("fill",(function(){var t=yt(this).attr("ecl");return t&&"nd"!==t?e.classToFillStyle_[e.classifier().domain()[t]]||e.noDataFillStyle_||"gray":e.noDataFillStyle_||"gray"})).end().then((function(){o.on("mouseover",(function(t){var n=yt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(){e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=yt(this);t.attr("fill");t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())}))}),(function(t){})),e},e.getLegendConstructor=function(){return Uh},e}(e):"ps"==t?Ph(e):"chbi"==t?function(t){var e=uh(t);return e.clnb_=3,e.startColor_="#e8e8e8",e.color1_="#73ae80",e.color2_="#6c83b5",e.endColor_="#2a5a5b",e.classToFillStyle_=void 0,e.noDataFillStyle_="lightgray",e.classifier1_=void 0,e.classifier2_=void 0,e.tooltip_.textFunction=Gh,["clnb_","startColor_","color1_","color2_","endColor_","classToFillStyle_","noDataFillStyle_","classifier1_","classifier2_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["clnb","startColor","color1","color2","endColor","classToFillStyle","noDataFillStyle"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){var t=i()(Array(e.clnb()).keys());if(e.classifier1(Nn().domain(e.statData("v1").getArray()).range(t)),e.classifier2(Nn().domain(e.statData("v2").getArray()).range(t)),e.svg().selectAll("path.nutsrg").attr("ecl1",(function(t){var n=e.statData("v1").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0==r||r?+e.classifier1()(+r):"nd"})).attr("ecl2",(function(t){var n=e.statData("v2").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0==r||r?+e.classifier2()(+r):"nd"})).attr("nd",(function(t){var n=e.statData("v1").get(t.properties.id),r=e.statData("v2").get(t.properties.id);if(!n||!r)return"nd";var i=n.value;return(0==i||i)&&(0==(i=r.value)||i)?"":"nd"})),!e.classToFillStyle()){var n=Bh(e.clnb(),e.startColor(),e.color1(),e.color2(),e.endColor());e.classToFillStyle(n)}return e},e.updateStyle=function(){e.svg().selectAll("path.nutsrg").transition().duration(e.transitionDuration()).attr("fill",(function(){var t=yt(this).attr("ecl1");if(!t||"nd"===t)return e.noDataFillStyle()||"gray";var n=yt(this).attr("ecl2");return n&&"nd"!==n?e.classToFillStyle()(+t,+n):e.noDataFillStyle()||"gray"}));var t="WORLD"==e.geo_?"path.worldrg":"path.nutsrg";return e.svg().selectAll(t).on("mouseover",(function(t){var n=yt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(){e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=yt(this);t.attr("fill");t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),e},e.getLegendConstructor=function(){return Hh},e}(e):"scomp"==t?function(t){var e=uh(t);e.stripeWidth_=50,e.stripeOrientation_=0,e.catColors_=void 0,e.catLabels_=void 0,e.showOnlyWhenComplete_=!1,e.noDataFillStyle_="lightgray",e.pieChartRadius_=40,e.pieChartInnerRadius_=15,["stripeWidth_","stripeOrientation_","catColors_","catLabels_","showOnlyWhenComplete_","noDataFillStyle_","pieChartRadius_","pieChartInnerRadius_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["stripeWidth","stripeOrientation","catColors","catLabels","showOnlyWhenComplete","noDataFillStyle","pieChartRadius","pieChartInnerRadius"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statComp=function(t,r,i,o,a){t.filters=t.filters||{};for(var l=0;l<i.length;l++){var s=i[l];t.filters[r]=s;var u={};for(var c in t)u[c]=t[c];for(var f in u.filters={},t.filters)u.filters[f]=t.filters[f];e.stat(s,u),a&&(e.catColors_=e.catColors_||{},e.catColors_[s]=a[l]),o&&(e.catLabels_=e.catLabels_||{},e.catLabels_[s]=o[l])}return n=i,e};var n=void 0,r=function(t){for(var r={},i=0,o=0;o<n.length;o++){var a=n[o],l=e.statData(a).get(t);if(!l||0!=l.value&&!l.value||isNaN(l.value)){if(e.showOnlyWhenComplete())return}else r[a]=l.value,i+=l.value}if(0!=i){for(var s=0;s<n.length;s++)r[n[s]]/=i;return r}};return e.updateClassification=function(){if(!n){var t=(n=Object.keys(e.statData_)).indexOf("default");t>-1&&n.splice(t,1)}return e},e.updateStyle=function(){if(!e.catColors()){e.catColors({});for(var t=0;t<n.length;t++)e.catColors()[n[t]]=Yh[t%10]}e.catLabels_=e.catLabels_||{},e.svg().selectAll("path.nutsrg").attr("fill",(function(t){var n=t.properties.id,i=r(n);if(!i)return e.noDataFillStyle()||"gray";var o=e.svg().append("pattern").attr("id","pattern_"+n).attr("x","0").attr("y","0").attr("width",e.stripeWidth()).attr("height",1).attr("patternUnits","userSpaceOnUse");e.stripeOrientation()&&o.attr("patternTransform","rotate("+e.stripeOrientation()+")"),o.append("rect").attr("x",0).attr("y",0).attr("width",e.stripeWidth()).attr("height",1).style("stroke","none").style("fill","lightgray");var a=0;for(var l in i){var s=i[l];if(s){s*=e.stripeWidth();var u=e.catColors()[l]||"lightgray";o.append("rect").attr("x",a).attr("y",0).attr("height",1).style("stroke","none").attr("code",l).style("fill",u).transition().duration(e.transitionDuration()).attr("width",s),a+=s}}return"url(#pattern_"+n+")"})).attr("nd",(function(t){return r(t.properties.id)?"":"nd"}));var i="WORLD"==e.geo_?"path.worldrg":"path.nutsrg";return e.svg().selectAll(i).on("mouseover",(function(t){var n=yt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(){e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=yt(this);t.attr("fill");t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),e},e.getLegendConstructor=function(){return qh},e.tooltip_.textFunction=function(t,n){var i=yt("#tooltip_eurostat");i.html(""),i.selectAll("*").remove(),t.properties.id?i.append("div").html("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):i.append("div").html("<b>"+t.properties.na+"</b><br>");var o=[],a=r(t.properties.id);for(var l in a)o.push({code:l,value:a[l]});if(o&&0!=o.length){var s=e.pieChartRadius(),u=e.pieChartInnerRadius(),c=i.append("svg").attr("viewBox",[-s,-s,2*s,2*s]).attr("width",2*s),f=Mf().sort(null).value((function(t){return t.value}));c.append("g").attr("stroke","darkgray").selectAll("path").data(f(o)).join("path").attr("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("d",yf().innerRadius(u).outerRadius(s))}else i.append("div").html(e.noDataText())},e}(e):"pie"==t?Xh(e):"spark"==t?Zh(e):(console.log("Unexpected map type: "+t),uh(e,!0))},Kh=function(t){(t=t||{}).shape=t.shape||"circle";var e=t.patternSize||5,n=t.minSize||1,r=t.maxSize||5.5;return t.bckColor=t.bckColor||"white",t.symbColor=t.symbColor||"black",function(i,o){i.selectAll(".estatmapPattern").remove();for(var a=0;a<o;a++){var l=n+(r-n)*a/(o-1),s=i.append("pattern").attr("class","estatmapPattern").attr("id","pattern_"+a).attr("x","0").attr("y","0").attr("width",e).attr("height",e).attr("patternUnits","userSpaceOnUse");s.append("rect").attr("x",0).attr("y",0).attr("width",e).attr("height",e).style("stroke","none").style("fill",t.bckColor),"square"==t.shape?s.append("rect").attr("x",0).attr("y",0).attr("width",l).attr("height",l).style("stroke","none").style("fill",t.symbColor):s.append("circle").attr("cx",.5*e).attr("cy",.5*e).attr("r",.5*l).style("stroke","none").style("fill",t.symbColor)}}}}})}));
|