@feedmepos/mf-report 5.31.2 → 5.31.3-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/{App-DoZB9B38.js → App-j08Hk0tX.js} +48 -48
  2. package/dist/{DateRangeSelect-B-OUPLDB.js → DateRangeSelect-AJd7gYva.js} +1 -1
  3. package/dist/{Default.vue_vue_type_script_setup_true_lang-BuTwhR1W.js → Default.vue_vue_type_script_setup_true_lang-CIVlgjSX.js} +1 -1
  4. package/dist/{DynamicWidget.vue_vue_type_script_setup_true_lang-DVqKtAYR.js → DynamicWidget.vue_vue_type_script_setup_true_lang-BKHx9p3R.js} +7 -7
  5. package/dist/{GlobalFilterSelect.vue_vue_type_script_setup_true_lang-CG8fCQW1.js → GlobalFilterSelect.vue_vue_type_script_setup_true_lang-qQi-7kuX.js} +63 -63
  6. package/dist/{InsightView-ChQ0BSqE.js → InsightView-noFPHcRY.js} +5 -5
  7. package/dist/{Integration-B0kp5Ip2.js → Integration-UwZP3vYt.js} +3 -3
  8. package/dist/{Integrations-Co3m2GbW.js → Integrations-BMhJuw20.js} +2 -2
  9. package/dist/{Layout-D1rSBMaa.js → Layout-CofH0rzo.js} +1 -1
  10. package/dist/{LocationSelect.vue_vue_type_script_setup_true_lang-mGjvhC5F.js → LocationSelect.vue_vue_type_script_setup_true_lang-BsdJx7gt.js} +2 -2
  11. package/dist/{MenuTab.vue_vue_type_script_setup_true_lang-DSYywVnI.js → MenuTab.vue_vue_type_script_setup_true_lang-BMJHW2E2.js} +5 -5
  12. package/dist/{NavigationTab.vue_vue_type_script_setup_true_lang-DCkznynv.js → NavigationTab.vue_vue_type_script_setup_true_lang-b6hgoVnw.js} +5 -5
  13. package/dist/{OverviewView-CzfPmLL6.js → OverviewView-V-KcUYld.js} +5 -5
  14. package/dist/{Report-8pOJt9j7.js → Report-Cxfxa7EK.js} +3 -3
  15. package/dist/{ReportCanvasView-DGMnwS9i.js → ReportCanvasView-DDNkVmlA.js} +435 -347
  16. package/dist/{ReportEditor-DfI8f6n5.js → ReportEditor-syPuiUDA.js} +7 -7
  17. package/dist/{ReportView-CjuoUhur.js → ReportView-Dqc89voW.js} +6 -6
  18. package/dist/{ReportViewRoute-DWQlfv7Y.js → ReportViewRoute-BE4Olg2t.js} +2 -2
  19. package/dist/{Setting-BM4J1bGC.js → Setting-CSZG2_pc.js} +3 -3
  20. package/dist/{Template-Cm9n0DNY.js → Template-DE8y5xA7.js} +3 -3
  21. package/dist/{TileEditor-BwuehIJP.js → TileEditor-DCLCIQqG.js} +6 -6
  22. package/dist/{TilePageStack.vue_vue_type_script_setup_true_lang-cAHeLbGq.js → TilePageStack.vue_vue_type_script_setup_true_lang-BKM30woJ.js} +2 -2
  23. package/dist/{TransitionFade-BRxnhaJy.js → TransitionFade-DSKakW7L.js} +5 -5
  24. package/dist/{app-0yX5NkWR.js → app-BxEbZEnS.js} +78 -14
  25. package/dist/app.js +1 -1
  26. package/dist/assets/formatChartData.worker-R9EGYsk6.js +544 -0
  27. package/dist/assets/processTableData.worker-CxpDa0tB.js +544 -0
  28. package/dist/{currency-C0VJTl19.js → currency-lmnrd1Gz.js} +1 -1
  29. package/dist/{index-DJ3gCuhy.js → index-Co3j0l3d.js} +2906 -2802
  30. package/dist/{report-DWa0N3Ys.js → report-Dsp2krIZ.js} +1 -1
  31. package/dist/report-canvas-libs/chartjs-chart-geo-4.js +2 -0
  32. package/dist/report-canvas-libs/chartjs-chart-sankey-0.js +7 -0
  33. package/dist/report-canvas-libs/components-1.js +1293 -50
  34. package/dist/report-canvas-libs/geo-outlines-1.js +5 -0
  35. package/dist/{useRestaurantPermission-BEaHLbHH.js → useRestaurantPermission-D8xwhBHn.js} +1 -1
  36. package/package.json +3 -1
  37. package/dist/assets/formatChartData.worker-UoGYoYc3.js +0 -495
  38. package/dist/assets/processTableData.worker-DxE4bjxG.js +0 -495
@@ -1,4 +1,4 @@
1
- import { u as p, F as m, r as v, p as be, a as ye, b as we, o as Se, i as Ie } from "./app-0yX5NkWR.js";
1
+ import { u as p, F as m, r as v, p as be, a as ye, b as we, o as Se, i as Ie } from "./app-BxEbZEnS.js";
2
2
  import { storeToRefs as l, defineStore as j } from "pinia";
3
3
  import { ref as i, computed as $, watch as Ae } from "vue";
4
4
  import { useSnackbar as W } from "@feedmepos/ui-library";
@@ -0,0 +1,2 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("chart.js"),require("chart.js/helpers")):"function"==typeof define&&define.amd?define(["exports","chart.js","chart.js/helpers"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ChartGeo={},e.Chart,e.Chart.helpers)}(this,function(e,t,n){"use strict";class a{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let a=0;a<this._n&&a<32;a++){const r=t[a],i=e+r,f=Math.abs(e)<Math.abs(r)?e-(i-r):r-(i-e);f&&(t[n++]=f),e=i}return t[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let t,n,a,r=this._n,i=0;if(r>0){for(i=e[--r];r>0&&(t=i,n=e[--r],i=t+n,a=n-(i-t),!a););r>0&&(a<0&&e[r-1]<0||a>0&&e[r-1]>0)&&(n=2*a,t=i+n,n==t-i&&(i=t))}return i}}function r(e){return Array.from(function*(e){for(const t of e)yield*t}(e))}function i(e,t,n){e=+e,t=+t,n=(r=arguments.length)<2?(t=e,e=0,1):r<3?1:+n;for(var a=-1,r=0|Math.max(0,Math.ceil((t-e)/n)),i=new Array(r);++a<r;)i[a]=e+a*n;return i}var f=1e-6,c=1e-12,o=Math.PI,d=o/2,s=o/4,l=2*o,u=180/o,h=o/180,b=Math.abs,p=Math.atan,g=Math.atan2,m=Math.cos,v=Math.ceil,y=Math.exp,x=Math.log,w=Math.pow,M=Math.sin,S=Math.sign||function(e){return e>0?1:e<0?-1:0},E=Math.sqrt,_=Math.tan;function N(e){return e>1?0:e<-1?o:Math.acos(e)}function A(e){return e>1?d:e<-1?-d:Math.asin(e)}function k(){}function C(e,t){e&&I.hasOwnProperty(e.type)&&I[e.type](e,t)}var P={Feature:function(e,t){C(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,a=-1,r=n.length;++a<r;)C(n[a].geometry,t)}},I={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,a=-1,r=n.length;++a<r;)e=n[a],t.point(e[0],e[1],e[2])},LineString:function(e,t){$(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,a=-1,r=n.length;++a<r;)$(n[a],t,0)},Polygon:function(e,t){j(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,a=-1,r=n.length;++a<r;)j(n[a],t)},GeometryCollection:function(e,t){for(var n=e.geometries,a=-1,r=n.length;++a<r;)C(n[a],t)}};function $(e,t,n){var a,r=-1,i=e.length-n;for(t.lineStart();++r<i;)a=e[r],t.point(a[0],a[1],a[2]);t.lineEnd()}function j(e,t){var n=-1,a=e.length;for(t.polygonStart();++n<a;)$(e[n],t,1);t.polygonEnd()}function z(e,t){e&&P.hasOwnProperty(e.type)?P[e.type](e,t):C(e,t)}function O(e){return[g(e[1],e[0]),A(e[2])]}function R(e){var t=e[0],n=e[1],a=m(n);return[a*m(t),a*M(t),M(n)]}function D(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function G(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function B(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function q(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function L(e){var t=E(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function T(e,t){function n(n,a){return n=e(n,a),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,a){return(n=t.invert(n,a))&&e.invert(n[0],n[1])}),n}function F(e,t){return b(e)>o&&(e-=Math.round(e/l)*l),[e,t]}function W(e,t,n){return(e%=l)?t||n?T(H(e),Y(t,n)):H(e):t||n?Y(t,n):F}function V(e){return function(t,n){return b(t+=e)>o&&(t-=Math.round(t/l)*l),[t,n]}}function H(e){var t=V(e);return t.invert=V(-e),t}function Y(e,t){var n=m(e),a=M(e),r=m(t),i=M(t);function f(e,t){var f=m(t),c=m(e)*f,o=M(e)*f,d=M(t),s=d*n+c*a;return[g(o*r-s*i,c*n-d*a),A(s*r+o*i)]}return f.invert=function(e,t){var f=m(t),c=m(e)*f,o=M(e)*f,d=M(t),s=d*r-o*i;return[g(o*r+d*i,c*n+s*a),A(s*n-c*a)]},f}function K(e,t){(t=R(t))[0]-=e,L(t);var n=N(-t[1]);return((-t[2]<0?-n:n)+l-f)%l}function U(){var e,t=[];return{point:function(t,n,a){e.push([t,n,a])},lineStart:function(){t.push(e=[])},lineEnd:k,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function X(e,t){return b(e[0]-t[0])<f&&b(e[1]-t[1])<f}function Z(e,t,n,a){this.x=e,this.z=t,this.o=n,this.e=a,this.v=!1,this.n=this.p=null}function J(e,t,n,a,r){var i,f,c=[],o=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,n,a=e[0],f=e[t];if(X(a,f)){if(!a[2]&&!f[2]){for(r.lineStart(),i=0;i<t;++i)r.point((a=e[i])[0],a[1]);return void r.lineEnd()}f[0]+=2e-6}c.push(n=new Z(a,e,null,!0)),o.push(n.o=new Z(a,null,n,!1)),c.push(n=new Z(f,e,null,!1)),o.push(n.o=new Z(f,null,n,!0))}}),c.length){for(o.sort(t),Q(c),Q(o),i=0,f=o.length;i<f;++i)o[i].e=n=!n;for(var d,s,l=c[0];;){for(var u=l,h=!0;u.v;)if((u=u.n)===l)return;d=u.z,r.lineStart();do{if(u.v=u.o.v=!0,u.e){if(h)for(i=0,f=d.length;i<f;++i)r.point((s=d[i])[0],s[1]);else a(u.x,u.n.x,1,r);u=u.n}else{if(h)for(d=u.p.z,i=d.length-1;i>=0;--i)r.point((s=d[i])[0],s[1]);else a(u.x,u.p.x,-1,r);u=u.p}d=(u=u.o).z,h=!h}while(!u.v);r.lineEnd()}}}function Q(e){if(t=e.length){for(var t,n,a=0,r=e[0];++a<t;)r.n=n=e[a],n.p=r,r=n;r.n=n=e[0],n.p=r}}function ee(e){return b(e[0])<=o?e[0]:S(e[0])*((b(e[0])+o)%l-o)}function te(e,t){var n=ee(t),r=t[1],i=M(r),c=[M(n),-m(n),0],u=0,h=0,b=new a;1===i?r=d+f:-1===i&&(r=-d-f);for(var p=0,v=e.length;p<v;++p)if(x=(y=e[p]).length)for(var y,x,w=y[x-1],S=ee(w),E=w[1]/2+s,_=M(E),N=m(E),k=0;k<x;++k,S=P,_=$,N=j,w=C){var C=y[k],P=ee(C),I=C[1]/2+s,$=M(I),j=m(I),z=P-S,O=z>=0?1:-1,D=O*z,B=D>o,q=_*$;if(b.add(g(q*O*M(D),N*j+q*m(D))),u+=B?z+O*l:z,B^S>=n^P>=n){var T=G(R(w),R(C));L(T);var F=G(c,T);L(F);var W=(B^z>=0?-1:1)*A(F[2]);(r>W||r===W&&(T[0]||T[1]))&&(h+=B^z>=0?1:-1)}}return(u<-f||u<f&&b<-1e-12)^1&h}function ne(e,t,n,a){return function(i){var f,c,o,d=t(i),s=U(),l=t(s),u=!1,h={point:b,lineStart:g,lineEnd:m,polygonStart:function(){h.point=v,h.lineStart=y,h.lineEnd=x,c=[],f=[]},polygonEnd:function(){h.point=b,h.lineStart=g,h.lineEnd=m,c=r(c);var e=te(f,a);c.length?(u||(i.polygonStart(),u=!0),J(c,re,e,n,i)):e&&(u||(i.polygonStart(),u=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),u&&(i.polygonEnd(),u=!1),c=f=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function b(t,n){e(t,n)&&i.point(t,n)}function p(e,t){d.point(e,t)}function g(){h.point=p,d.lineStart()}function m(){h.point=b,d.lineEnd()}function v(e,t){o.push([e,t]),l.point(e,t)}function y(){l.lineStart(),o=[]}function x(){v(o[0][0],o[0][1]),l.lineEnd();var e,t,n,a,r=l.clean(),d=s.result(),h=d.length;if(o.pop(),f.push(o),o=null,h)if(1&r){if((t=(n=d[0]).length-1)>0){for(u||(i.polygonStart(),u=!0),i.lineStart(),e=0;e<t;++e)i.point((a=n[e])[0],a[1]);i.lineEnd()}}else h>1&&2&r&&d.push(d.pop().concat(d.shift())),c.push(d.filter(ae))}return h}}function ae(e){return e.length>1}function re(e,t){return((e=e.x)[0]<0?e[1]-d-f:d-e[1])-((t=t.x)[0]<0?t[1]-d-f:d-t[1])}F.invert=F;var ie=ne(function(){return!0},function(e){var t,n=NaN,a=NaN,r=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(i,c){var s=i>0?o:-o,l=b(i-n);b(l-o)<f?(e.point(n,a=(a+c)/2>0?d:-d),e.point(r,a),e.lineEnd(),e.lineStart(),e.point(s,a),e.point(i,a),t=0):r!==s&&l>=o&&(b(n-r)<f&&(n-=r*f),b(i-s)<f&&(i-=s*f),a=function(e,t,n,a){var r,i,c=M(e-n);return b(c)>f?p((M(t)*(i=m(a))*M(n)-M(a)*(r=m(t))*M(e))/(r*i*c)):(t+a)/2}(n,a,i,c),e.point(r,a),e.lineEnd(),e.lineStart(),e.point(s,a),t=0),e.point(n=i,a=c),r=s},lineEnd:function(){e.lineEnd(),n=a=NaN},clean:function(){return 2-t}}},function(e,t,n,a){var r;if(null==e)r=n*d,a.point(-o,r),a.point(0,r),a.point(o,r),a.point(o,0),a.point(o,-r),a.point(0,-r),a.point(-o,-r),a.point(-o,0),a.point(-o,r);else if(b(e[0]-t[0])>f){var i=e[0]<t[0]?o:-o;r=n*i/2,a.point(-i,r),a.point(0,r),a.point(i,r)}else a.point(t[0],t[1])},[-o,-d]);function fe(e){var t=m(e),n=2*h,a=t>0,r=b(t)>f;function i(e,n){return m(e)*m(n)>t}function c(e,n,a){var r=[1,0,0],i=G(R(e),R(n)),c=D(i,i),d=i[0],s=c-d*d;if(!s)return!a&&e;var l=t*c/s,u=-t*d/s,h=G(r,i),p=q(r,l);B(p,q(i,u));var g=h,m=D(p,g),v=D(g,g),y=m*m-v*(D(p,p)-1);if(!(y<0)){var x=E(y),w=q(g,(-m-x)/v);if(B(w,p),w=O(w),!a)return w;var M,S=e[0],_=n[0],N=e[1],A=n[1];_<S&&(M=S,S=_,_=M);var k=_-S,C=b(k-o)<f;if(!C&&A<N&&(M=N,N=A,A=M),C||k<f?C?N+A>0^w[1]<(b(w[0]-S)<f?N:A):N<=w[1]&&w[1]<=A:k>o^(S<=w[0]&&w[0]<=_)){var P=q(g,(-m+x)/v);return B(P,p),[w,O(P)]}}}function d(t,n){var r=a?e:o-e,i=0;return t<-r?i|=1:t>r&&(i|=2),n<-r?i|=4:n>r&&(i|=8),i}return ne(i,function(e){var t,n,f,s,l;return{lineStart:function(){s=f=!1,l=1},point:function(u,h){var b,p=[u,h],g=i(u,h),m=a?g?0:d(u,h):g?d(u+(u<0?o:-o),h):0;if(!t&&(s=f=g)&&e.lineStart(),g!==f&&(!(b=c(t,p))||X(t,b)||X(p,b))&&(p[2]=1),g!==f)l=0,g?(e.lineStart(),b=c(p,t),e.point(b[0],b[1])):(b=c(t,p),e.point(b[0],b[1],2),e.lineEnd()),t=b;else if(r&&t&&a^g){var v;m&n||!(v=c(p,t,!0))||(l=0,a?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1],3)))}!g||t&&X(t,p)||e.point(p[0],p[1]),t=p,f=g,n=m},lineEnd:function(){f&&e.lineEnd(),t=null},clean:function(){return l|(s&&f)<<1}}},function(t,a,r,i){!function(e,t,n,a,r,i){if(n){var f=m(t),c=M(t),o=a*n;null==r?(r=t+a*l,i=t-o/2):(r=K(f,r),i=K(f,i),(a>0?r<i:r>i)&&(r+=a*l));for(var d,s=r;a>0?s>i:s<i;s-=o)d=O([f,-c*m(s),-c*M(s)]),e.point(d[0],d[1])}}(i,e,n,r,t,a)},a?[0,-e]:[-o,e-o])}var ce,oe,de,se,le=1e9,ue=-le;function he(e,t,n,a){function i(r,i){return e<=r&&r<=n&&t<=i&&i<=a}function c(r,i,f,c){var d=0,l=0;if(null==r||(d=o(r,f))!==(l=o(i,f))||s(r,i)<0^f>0)do{c.point(0===d||3===d?e:n,d>1?a:t)}while((d=(d+f+4)%4)!==l);else c.point(i[0],i[1])}function o(a,r){return b(a[0]-e)<f?r>0?0:3:b(a[0]-n)<f?r>0?2:1:b(a[1]-t)<f?r>0?1:0:r>0?3:2}function d(e,t){return s(e.x,t.x)}function s(e,t){var n=o(e,1),a=o(t,1);return n!==a?n-a:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(f){var o,s,l,u,h,b,p,g,m,v,y,x=f,w=U(),M={point:S,lineStart:function(){M.point=E,s&&s.push(l=[]);v=!0,m=!1,p=g=NaN},lineEnd:function(){o&&(E(u,h),b&&m&&w.rejoin(),o.push(w.result()));M.point=S,m&&x.lineEnd()},polygonStart:function(){x=w,o=[],s=[],y=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,r=s.length;n<r;++n)for(var i,f,c=s[n],o=1,d=c.length,l=c[0],u=l[0],h=l[1];o<d;++o)i=u,f=h,u=(l=c[o])[0],h=l[1],f<=a?h>a&&(u-i)*(a-f)>(h-f)*(e-i)&&++t:h<=a&&(u-i)*(a-f)<(h-f)*(e-i)&&--t;return t}(),n=y&&t,i=(o=r(o)).length;(n||i)&&(f.polygonStart(),n&&(f.lineStart(),c(null,null,1,f),f.lineEnd()),i&&J(o,d,t,c,f),f.polygonEnd());x=f,o=s=l=null}};function S(e,t){i(e,t)&&x.point(e,t)}function E(r,f){var c=i(r,f);if(s&&l.push([r,f]),v)u=r,h=f,b=c,v=!1,c&&(x.lineStart(),x.point(r,f));else if(c&&m)x.point(r,f);else{var o=[p=Math.max(ue,Math.min(le,p)),g=Math.max(ue,Math.min(le,g))],d=[r=Math.max(ue,Math.min(le,r)),f=Math.max(ue,Math.min(le,f))];!function(e,t,n,a,r,i){var f,c=e[0],o=e[1],d=0,s=1,l=t[0]-c,u=t[1]-o;if(f=n-c,l||!(f>0)){if(f/=l,l<0){if(f<d)return;f<s&&(s=f)}else if(l>0){if(f>s)return;f>d&&(d=f)}if(f=r-c,l||!(f<0)){if(f/=l,l<0){if(f>s)return;f>d&&(d=f)}else if(l>0){if(f<d)return;f<s&&(s=f)}if(f=a-o,u||!(f>0)){if(f/=u,u<0){if(f<d)return;f<s&&(s=f)}else if(u>0){if(f>s)return;f>d&&(d=f)}if(f=i-o,u||!(f<0)){if(f/=u,u<0){if(f>s)return;f>d&&(d=f)}else if(u>0){if(f<d)return;f<s&&(s=f)}return d>0&&(e[0]=c+d*l,e[1]=o+d*u),s<1&&(t[0]=c+s*l,t[1]=o+s*u),!0}}}}}(o,d,e,t,n,a)?c&&(x.lineStart(),x.point(r,f),y=!1):(m||(x.lineStart(),x.point(o[0],o[1])),x.point(d[0],d[1]),c||x.lineEnd(),y=!1)}p=r,g=f,m=c}return M}}var be={sphere:k,point:k,lineStart:function(){be.point=ge,be.lineEnd=pe},lineEnd:k,polygonStart:k,polygonEnd:k};function pe(){be.point=be.lineEnd=k}function ge(e,t){oe=e*=h,de=M(t*=h),se=m(t),be.point=me}function me(e,t){e*=h;var n=M(t*=h),a=m(t),r=b(e-oe),i=m(r),f=a*M(r),c=se*n-de*a*i,o=de*n+se*a*i;ce.add(g(E(f*f+c*c),o)),oe=e,de=n,se=a}var ve=[null,null],ye={type:"LineString",coordinates:ve};function xe(e,t){return ve[0]=e,ve[1]=t,function(e){return ce=new a,z(e,be),+ce}(ye)}var we={Feature:function(e,t){return Se(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,a=-1,r=n.length;++a<r;)if(Se(n[a].geometry,t))return!0;return!1}},Me={Sphere:function(){return!0},Point:function(e,t){return Ee(e.coordinates,t)},MultiPoint:function(e,t){for(var n=e.coordinates,a=-1,r=n.length;++a<r;)if(Ee(n[a],t))return!0;return!1},LineString:function(e,t){return _e(e.coordinates,t)},MultiLineString:function(e,t){for(var n=e.coordinates,a=-1,r=n.length;++a<r;)if(_e(n[a],t))return!0;return!1},Polygon:function(e,t){return Ne(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,a=-1,r=n.length;++a<r;)if(Ne(n[a],t))return!0;return!1},GeometryCollection:function(e,t){for(var n=e.geometries,a=-1,r=n.length;++a<r;)if(Se(n[a],t))return!0;return!1}};function Se(e,t){return!(!e||!Me.hasOwnProperty(e.type))&&Me[e.type](e,t)}function Ee(e,t){return 0===xe(e,t)}function _e(e,t){for(var n,a,r,i=0,f=e.length;i<f;i++){if(0===(a=xe(e[i],t)))return!0;if(i>0&&(r=xe(e[i],e[i-1]))>0&&n<=r&&a<=r&&(n+a-r)*(1-Math.pow((n-a)/r,2))<c*r)return!0;n=a}return!1}function Ne(e,t){return!!te(e.map(Ae),ke(t))}function Ae(e){return(e=e.map(ke)).pop(),e}function ke(e){return[e[0]*h,e[1]*h]}function Ce(e,t,n){var a=i(e,t-f,n).concat(t);return function(e){return a.map(function(t){return[e,t]})}}function Pe(e,t,n){var a=i(e,t-f,n).concat(t);return function(e){return a.map(function(t){return[t,e]})}}function Ie(){var e,t,n,a,r,c,o,d,s,l,u,h,p=10,g=p,m=90,y=360,x=2.5;function w(){return{type:"MultiLineString",coordinates:M()}}function M(){return i(v(a/m)*m,n,m).map(u).concat(i(v(d/y)*y,o,y).map(h)).concat(i(v(t/p)*p,e,p).filter(function(e){return b(e%m)>f}).map(s)).concat(i(v(c/g)*g,r,g).filter(function(e){return b(e%y)>f}).map(l))}return w.lines=function(){return M().map(function(e){return{type:"LineString",coordinates:e}})},w.outline=function(){return{type:"Polygon",coordinates:[u(a).concat(h(o).slice(1),u(n).reverse().slice(1),h(d).reverse().slice(1))]}},w.extent=function(e){return arguments.length?w.extentMajor(e).extentMinor(e):w.extentMinor()},w.extentMajor=function(e){return arguments.length?(a=+e[0][0],n=+e[1][0],d=+e[0][1],o=+e[1][1],a>n&&(e=a,a=n,n=e),d>o&&(e=d,d=o,o=e),w.precision(x)):[[a,d],[n,o]]},w.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],c=+n[0][1],r=+n[1][1],t>e&&(n=t,t=e,e=n),c>r&&(n=c,c=r,r=n),w.precision(x)):[[t,c],[e,r]]},w.step=function(e){return arguments.length?w.stepMajor(e).stepMinor(e):w.stepMinor()},w.stepMajor=function(e){return arguments.length?(m=+e[0],y=+e[1],w):[m,y]},w.stepMinor=function(e){return arguments.length?(p=+e[0],g=+e[1],w):[p,g]},w.precision=function(i){return arguments.length?(x=+i,s=Ce(c,r,90),l=Pe(t,e,x),u=Ce(d,o,90),h=Pe(a,n,x),w):x},w.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}var $e,je,ze,Oe,Re=e=>e,De=new a,Ge=new a,Be={point:k,lineStart:k,lineEnd:k,polygonStart:function(){Be.lineStart=qe,Be.lineEnd=Fe},polygonEnd:function(){Be.lineStart=Be.lineEnd=Be.point=k,De.add(b(Ge)),Ge=new a},result:function(){var e=De/2;return De=new a,e}};function qe(){Be.point=Le}function Le(e,t){Be.point=Te,$e=ze=e,je=Oe=t}function Te(e,t){Ge.add(Oe*e-ze*t),ze=e,Oe=t}function Fe(){Te($e,je)}var We=1/0,Ve=We,He=-We,Ye=He,Ke={point:function(e,t){e<We&&(We=e);e>He&&(He=e);t<Ve&&(Ve=t);t>Ye&&(Ye=t)},lineStart:k,lineEnd:k,polygonStart:k,polygonEnd:k,result:function(){var e=[[We,Ve],[He,Ye]];return He=Ye=-(Ve=We=1/0),e}};var Ue,Xe,Ze,Je,Qe=0,et=0,tt=0,nt=0,at=0,rt=0,it=0,ft=0,ct=0,ot={point:dt,lineStart:st,lineEnd:ht,polygonStart:function(){ot.lineStart=bt,ot.lineEnd=pt},polygonEnd:function(){ot.point=dt,ot.lineStart=st,ot.lineEnd=ht},result:function(){var e=ct?[it/ct,ft/ct]:rt?[nt/rt,at/rt]:tt?[Qe/tt,et/tt]:[NaN,NaN];return Qe=et=tt=nt=at=rt=it=ft=ct=0,e}};function dt(e,t){Qe+=e,et+=t,++tt}function st(){ot.point=lt}function lt(e,t){ot.point=ut,dt(Ze=e,Je=t)}function ut(e,t){var n=e-Ze,a=t-Je,r=E(n*n+a*a);nt+=r*(Ze+e)/2,at+=r*(Je+t)/2,rt+=r,dt(Ze=e,Je=t)}function ht(){ot.point=dt}function bt(){ot.point=gt}function pt(){mt(Ue,Xe)}function gt(e,t){ot.point=mt,dt(Ue=Ze=e,Xe=Je=t)}function mt(e,t){var n=e-Ze,a=t-Je,r=E(n*n+a*a);nt+=r*(Ze+e)/2,at+=r*(Je+t)/2,rt+=r,it+=(r=Je*e-Ze*t)*(Ze+e),ft+=r*(Je+t),ct+=3*r,dt(Ze=e,Je=t)}function vt(e){this._context=e}vt.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,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(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,l)}},result:k};var yt,xt,wt,Mt,St,Et=new a,_t={point:k,lineStart:function(){_t.point=Nt},lineEnd:function(){yt&&At(xt,wt),_t.point=k},polygonStart:function(){yt=!0},polygonEnd:function(){yt=null},result:function(){var e=+Et;return Et=new a,e}};function Nt(e,t){_t.point=At,xt=Mt=e,wt=St=t}function At(e,t){Mt-=e,St-=t,Et.add(E(Mt*Mt+St*St)),Mt=e,St=t}let kt,Ct,Pt,It;class $t{constructor(e){this._append=null==e?jt:function(e){const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);if(t>15)return jt;if(t!==kt){const e=10**t;kt=t,Ct=function(t){let n=1;this._+=t[0];for(const a=t.length;n<a;++n)this._+=Math.round(arguments[n]*e)/e+t[n]}}return Ct}(e),this._radius=4.5,this._=""}pointRadius(e){return this._radius=+e,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(e,t){switch(this._point){case 0:this._append`M${e},${t}`,this._point=1;break;case 1:this._append`L${e},${t}`;break;default:if(this._append`M${e},${t}`,this._radius!==Pt||this._append!==Ct){const e=this._radius,t=this._;this._="",this._append`m0,${e}a${e},${e} 0 1,1 0,${-2*e}a${e},${e} 0 1,1 0,${2*e}z`,Pt=e,Ct=this._append,It=this._,this._=t}this._+=It}}result(){const e=this._;return this._="",e.length?e:null}}function jt(e){let t=1;this._+=e[0];for(const n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function zt(e,t){let n,a,r=3,i=4.5;function f(e){return e&&("function"==typeof i&&a.pointRadius(+i.apply(this,arguments)),z(e,n(a))),a.result()}return f.area=function(e){return z(e,n(Be)),Be.result()},f.measure=function(e){return z(e,n(_t)),_t.result()},f.bounds=function(e){return z(e,n(Ke)),Ke.result()},f.centroid=function(e){return z(e,n(ot)),ot.result()},f.projection=function(t){return arguments.length?(n=null==t?(e=null,Re):(e=t).stream,f):e},f.context=function(e){return arguments.length?(a=null==e?(t=null,new $t(r)):new vt(t=e),"function"!=typeof i&&a.pointRadius(i),f):t},f.pointRadius=function(e){return arguments.length?(i="function"==typeof e?e:(a.pointRadius(+e),+e),f):i},f.digits=function(e){if(!arguments.length)return r;if(null==e)r=null;else{const t=Math.floor(e);if(!(t>=0))throw new RangeError(`invalid digits: ${e}`);r=t}return null===t&&(a=new $t(r)),f},f.projection(e).digits(r).context(t)}function Ot(e){return function(t){var n=new Rt;for(var a in e)n[a]=e[a];return n.stream=t,n}}function Rt(){}function Dt(e,t,n){var a=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=a&&e.clipExtent(null),z(n,e.stream(Ke)),t(Ke.result()),null!=a&&e.clipExtent(a),e}function Gt(e,t,n){return Dt(e,function(n){var a=t[1][0]-t[0][0],r=t[1][1]-t[0][1],i=Math.min(a/(n[1][0]-n[0][0]),r/(n[1][1]-n[0][1])),f=+t[0][0]+(a-i*(n[1][0]+n[0][0]))/2,c=+t[0][1]+(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([f,c])},n)}function Bt(e,t,n){return Gt(e,[[0,0],t],n)}function qt(e,t,n){return Dt(e,function(n){var a=+t,r=a/(n[1][0]-n[0][0]),i=(a-r*(n[1][0]+n[0][0]))/2,f=-r*n[0][1];e.scale(150*r).translate([i,f])},n)}function Lt(e,t,n){return Dt(e,function(n){var a=+t,r=a/(n[1][1]-n[0][1]),i=-r*n[0][0],f=(a-r*(n[1][1]+n[0][1]))/2;e.scale(150*r).translate([i,f])},n)}Rt.prototype={constructor:Rt,point:function(e,t){this.stream.point(e,t)},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 Tt=m(30*h);function Ft(e,t){return+t?function(e,t){function n(a,r,i,c,o,d,s,l,u,h,p,m,v,y){var x=s-a,w=l-r,M=x*x+w*w;if(M>4*t&&v--){var S=c+h,_=o+p,N=d+m,k=E(S*S+_*_+N*N),C=A(N/=k),P=b(b(N)-1)<f||b(i-u)<f?(i+u)/2:g(_,S),I=e(P,C),$=I[0],j=I[1],z=$-a,O=j-r,R=w*z-x*O;(R*R/M>t||b((x*z+w*O)/M-.5)>.3||c*h+o*p+d*m<Tt)&&(n(a,r,i,c,o,d,$,j,P,S/=k,_/=k,N,v,y),y.point($,j),n($,j,P,S,_,N,s,l,u,h,p,m,v,y))}}return function(t){var a,r,i,f,c,o,d,s,l,u,h,b,p={point:g,lineStart:m,lineEnd:y,polygonStart:function(){t.polygonStart(),p.lineStart=x},polygonEnd:function(){t.polygonEnd(),p.lineStart=m}};function g(n,a){n=e(n,a),t.point(n[0],n[1])}function m(){s=NaN,p.point=v,t.lineStart()}function v(a,r){var i=R([a,r]),f=e(a,r);n(s,l,d,u,h,b,s=f[0],l=f[1],d=a,u=i[0],h=i[1],b=i[2],16,t),t.point(s,l)}function y(){p.point=g,t.lineEnd()}function x(){m(),p.point=w,p.lineEnd=M}function w(e,t){v(a=e,t),r=s,i=l,f=u,c=h,o=b,p.point=v}function M(){n(s,l,d,u,h,b,r,i,a,f,c,o,16,t),p.lineEnd=y,y()}return p}}(e,t):function(e){return Ot({point:function(t,n){t=e(t,n),this.stream.point(t[0],t[1])}})}(e)}var Wt=Ot({point:function(e,t){this.stream.point(e*h,t*h)}});function Vt(e,t,n,a,r,i){if(!i)return function(e,t,n,a,r){function i(i,f){return[t+e*(i*=a),n-e*(f*=r)]}return i.invert=function(i,f){return[(i-t)/e*a,(n-f)/e*r]},i}(e,t,n,a,r);var f=m(i),c=M(i),o=f*e,d=c*e,s=f/e,l=c/e,u=(c*n-f*t)/e,h=(c*t+f*n)/e;function b(e,i){return[o*(e*=a)-d*(i*=r)+t,n-d*e-o*i]}return b.invert=function(e,t){return[a*(s*e-l*t+u),r*(h-l*e-s*t)]},b}function Ht(e){return Yt(function(){return e})()}function Yt(e){var t,n,a,r,i,f,c,o,d,s,l=150,b=480,p=250,g=0,m=0,v=0,y=0,x=0,w=0,M=1,S=1,_=null,N=ie,A=null,k=Re,C=.5;function P(e){return o(e[0]*h,e[1]*h)}function I(e){return(e=o.invert(e[0],e[1]))&&[e[0]*u,e[1]*u]}function $(){var e=Vt(l,0,0,M,S,w).apply(null,t(g,m)),a=Vt(l,b-e[0],p-e[1],M,S,w);return n=W(v,y,x),c=T(t,a),o=T(n,c),f=Ft(c,C),j()}function j(){return d=s=null,P}return P.stream=function(e){return d&&s===e?d:d=Wt(function(e){return Ot({point:function(t,n){var a=e(t,n);return this.stream.point(a[0],a[1])}})}(n)(N(f(k(s=e)))))},P.preclip=function(e){return arguments.length?(N=e,_=void 0,j()):N},P.postclip=function(e){return arguments.length?(k=e,A=a=r=i=null,j()):k},P.clipAngle=function(e){return arguments.length?(N=+e?fe(_=e*h):(_=null,ie),j()):_*u},P.clipExtent=function(e){return arguments.length?(k=null==e?(A=a=r=i=null,Re):he(A=+e[0][0],a=+e[0][1],r=+e[1][0],i=+e[1][1]),j()):null==A?null:[[A,a],[r,i]]},P.scale=function(e){return arguments.length?(l=+e,$()):l},P.translate=function(e){return arguments.length?(b=+e[0],p=+e[1],$()):[b,p]},P.center=function(e){return arguments.length?(g=e[0]%360*h,m=e[1]%360*h,$()):[g*u,m*u]},P.rotate=function(e){return arguments.length?(v=e[0]%360*h,y=e[1]%360*h,x=e.length>2?e[2]%360*h:0,$()):[v*u,y*u,x*u]},P.angle=function(e){return arguments.length?(w=e%360*h,$()):w*u},P.reflectX=function(e){return arguments.length?(M=e?-1:1,$()):M<0},P.reflectY=function(e){return arguments.length?(S=e?-1:1,$()):S<0},P.precision=function(e){return arguments.length?(f=Ft(c,C=e*e),j()):E(C)},P.fitExtent=function(e,t){return Gt(P,e,t)},P.fitSize=function(e,t){return Bt(P,e,t)},P.fitWidth=function(e,t){return qt(P,e,t)},P.fitHeight=function(e,t){return Lt(P,e,t)},function(){return t=e.apply(this,arguments),P.invert=t.invert&&I,$()}}function Kt(e){var t=0,n=o/3,a=Yt(e),r=a(t,n);return r.parallels=function(e){return arguments.length?a(t=e[0]*h,n=e[1]*h):[t*u,n*u]},r}function Ut(e,t){var n=M(e),a=(n+M(t))/2;if(b(a)<f)return function(e){var t=m(e);function n(e,n){return[e*t,M(n)/t]}return n.invert=function(e,n){return[e/t,A(n*t)]},n}(e);var r=1+n*(2*a-n),i=E(r)/a;function c(e,t){var n=E(r-2*a*M(t))/a;return[n*M(e*=a),i-n*m(e)]}return c.invert=function(e,t){var n=i-t,f=g(e,b(n))*S(n);return n*a<0&&(f-=o*S(e)*S(n)),[f/a,A((r-(e*e+n*n)*a*a)/(2*a))]},c}function Xt(){return Kt(Ut).scale(155.424).center([0,33.6442])}function Zt(){return Xt().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Jt(){var e,t,n,a,r,i,c=Zt(),o=Xt().rotate([154,0]).center([-2,58.5]).parallels([55,65]),d=Xt().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(e,t){i=[e,t]}};function l(e){var t=e[0],f=e[1];return i=null,n.point(t,f),i||(a.point(t,f),i)||(r.point(t,f),i)}function u(){return e=t=null,l}return l.invert=function(e){var t=c.scale(),n=c.translate(),a=(e[0]-n[0])/t,r=(e[1]-n[1])/t;return(r>=.12&&r<.234&&a>=-.425&&a<-.214?o:r>=.166&&r<.234&&a>=-.214&&a<-.115?d:c).invert(e)},l.stream=function(n){return e&&t===n?e:(a=[c.stream(t=n),o.stream(n),d.stream(n)],r=a.length,e={point:function(e,t){for(var n=-1;++n<r;)a[n].point(e,t)},sphere:function(){for(var e=-1;++e<r;)a[e].sphere()},lineStart:function(){for(var e=-1;++e<r;)a[e].lineStart()},lineEnd:function(){for(var e=-1;++e<r;)a[e].lineEnd()},polygonStart:function(){for(var e=-1;++e<r;)a[e].polygonStart()},polygonEnd:function(){for(var e=-1;++e<r;)a[e].polygonEnd()}});var a,r},l.precision=function(e){return arguments.length?(c.precision(e),o.precision(e),d.precision(e),u()):c.precision()},l.scale=function(e){return arguments.length?(c.scale(e),o.scale(.35*e),d.scale(e),l.translate(c.translate())):c.scale()},l.translate=function(e){if(!arguments.length)return c.translate();var t=c.scale(),i=+e[0],l=+e[1];return n=c.translate(e).clipExtent([[i-.455*t,l-.238*t],[i+.455*t,l+.238*t]]).stream(s),a=o.translate([i-.307*t,l+.201*t]).clipExtent([[i-.425*t+f,l+.12*t+f],[i-.214*t-f,l+.234*t-f]]).stream(s),r=d.translate([i-.205*t,l+.212*t]).clipExtent([[i-.214*t+f,l+.166*t+f],[i-.115*t-f,l+.234*t-f]]).stream(s),u()},l.fitExtent=function(e,t){return Gt(l,e,t)},l.fitSize=function(e,t){return Bt(l,e,t)},l.fitWidth=function(e,t){return qt(l,e,t)},l.fitHeight=function(e,t){return Lt(l,e,t)},l.scale(1070)}function Qt(e){return function(t,n){var a=m(t),r=m(n),i=e(a*r);return i===1/0?[2,0]:[i*r*M(t),i*M(n)]}}function en(e){return function(t,n){var a=E(t*t+n*n),r=e(a),i=M(r),f=m(r);return[g(t*i,a*f),A(a&&n*i/a)]}}var tn=Qt(function(e){return E(2/(1+e))});function nn(){return Ht(tn).scale(124.75).clipAngle(179.999)}tn.invert=en(function(e){return 2*A(e/2)});var an=Qt(function(e){return(e=N(e))&&e/M(e)});function rn(){return Ht(an).scale(79.4188).clipAngle(179.999)}function fn(e,t){return[e,x(_((d+t)/2))]}function cn(){return on(fn).scale(961/l)}function on(e){var t,n,a,r=Ht(e),i=r.center,f=r.scale,c=r.translate,d=r.clipExtent,s=null;function l(){var i=o*f(),c=r(function(e){function t(t){return(t=e(t[0]*h,t[1]*h))[0]*=u,t[1]*=u,t}return e=W(e[0]*h,e[1]*h,e.length>2?e[2]*h:0),t.invert=function(t){return(t=e.invert(t[0]*h,t[1]*h))[0]*=u,t[1]*=u,t},t}(r.rotate()).invert([0,0]));return d(null==s?[[c[0]-i,c[1]-i],[c[0]+i,c[1]+i]]:e===fn?[[Math.max(c[0]-i,s),t],[Math.min(c[0]+i,n),a]]:[[s,Math.max(c[1]-i,t)],[n,Math.min(c[1]+i,a)]])}return r.scale=function(e){return arguments.length?(f(e),l()):f()},r.translate=function(e){return arguments.length?(c(e),l()):c()},r.center=function(e){return arguments.length?(i(e),l()):i()},r.clipExtent=function(e){return arguments.length?(null==e?s=t=n=a=null:(s=+e[0][0],t=+e[0][1],n=+e[1][0],a=+e[1][1]),l()):null==s?null:[[s,t],[n,a]]},l()}function dn(e){return _((d+e)/2)}function sn(e,t){var n=m(e),a=e===t?M(e):x(n/m(t))/x(dn(t)/dn(e)),r=n*w(dn(e),a)/a;if(!a)return fn;function i(e,t){r>0?t<-d+f&&(t=-d+f):t>d-f&&(t=d-f);var n=r/w(dn(t),a);return[n*M(a*e),r-n*m(a*e)]}return i.invert=function(e,t){var n=r-t,i=S(a)*E(e*e+n*n),f=g(e,b(n))*S(n);return n*a<0&&(f-=o*S(e)*S(n)),[f/a,2*p(w(r/i,1/a))-d]},i}function ln(){return Kt(sn).scale(109.5).parallels([30,30])}function un(e,t){return[e,t]}function hn(){return Ht(un).scale(152.63)}function bn(e,t){var n=m(e),a=e===t?M(e):(n-m(t))/(t-e),r=n/a+e;if(b(a)<f)return un;function i(e,t){var n=r-t,i=a*e;return[n*M(i),r-n*m(i)]}return i.invert=function(e,t){var n=r-t,i=g(e,b(n))*S(n);return n*a<0&&(i-=o*S(e)*S(n)),[i/a,r-S(a)*E(e*e+n*n)]},i}function pn(){return Kt(bn).scale(131.154).center([0,13.9389])}an.invert=en(function(e){return e}),fn.invert=function(e,t){return[e,2*p(y(t))-d]},un.invert=un;var gn=1.340264,mn=-.081106,vn=893e-6,yn=.003796,xn=E(3)/2;function wn(e,t){var n=A(xn*M(t)),a=n*n,r=a*a*a;return[e*m(n)/(xn*(gn+3*mn*a+r*(7*vn+9*yn*a))),n*(gn+mn*a+r*(vn+yn*a))]}function Mn(){return Ht(wn).scale(177.158)}function Sn(e,t){var n=m(t),a=m(e)*n;return[n*M(e)/a,M(t)/a]}function En(){return Ht(Sn).scale(144.049).clipAngle(60)}function _n(e,t){var n=t*t,a=n*n;return[e*(.8707-.131979*n+a*(a*(.003971*n-.001529*a)-.013791)),t*(1.007226+n*(.015085+a*(.028874*n-.044475-.005916*a)))]}function Nn(){return Ht(_n).scale(175.295)}function An(e,t){return[m(t)*M(e),M(t)]}function kn(){return Ht(An).scale(249.5).clipAngle(90.000001)}function Cn(e,t){var n=m(t),a=1+m(e)*n;return[n*M(e)/a,M(t)/a]}function Pn(){return Ht(Cn).scale(250).clipAngle(142)}function In(e,t){return[x(_((d+t)/2)),-e]}function $n(){var e=on(In),t=e.center,n=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return arguments.length?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)}wn.invert=function(e,t){for(var n,a=t,r=a*a,i=r*r*r,f=0;f<12&&(i=(r=(a-=n=(a*(gn+mn*r+i*(vn+yn*r))-t)/(gn+3*mn*r+i*(7*vn+9*yn*r)))*a)*r*r,!(b(n)<c));++f);return[xn*e*(gn+3*mn*r+i*(7*vn+9*yn*r))/m(a),A(M(a)/xn)]},Sn.invert=en(p),_n.invert=function(e,t){var n,a=t,r=25;do{var i=a*a,c=i*i;a-=n=(a*(1.007226+i*(.015085+c*(.028874*i-.044475-.005916*c)))-t)/(1.007226+i*(.045255+c*(.259866*i-.311325-.005916*11*c)))}while(b(n)>f&&--r>0);return[e/(.8707+(i=a*a)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),a]},An.invert=en(A),Cn.invert=en(function(e){return 2*p(e)}),In.invert=function(e,t){return[-t,2*p(y(e))-d]};const jn={geoAzimuthalEqualArea:nn,geoAzimuthalEquidistant:rn,geoGnomonic:En,geoOrthographic:kn,geoStereographic:Pn,geoEqualEarth:Mn,geoAlbers:Zt,geoAlbersUsa:Jt,geoConicConformal:ln,geoConicEqualArea:Xt,geoConicEquidistant:pn,geoEquirectangular:hn,geoMercator:cn,geoTransverseMercator:$n,geoNaturalEarth1:Nn};Object.keys(jn).forEach(e=>{jn[`${e.charAt(3).toLowerCase()}${e.slice(4)}`]=jn[e]});class zn extends t.Scale{constructor(e){super(e),this.outlineBounds=null,this.oldChartBounds=null,this.geoPath=zt()}init(e){e.position="chartArea",super.init(e),"function"==typeof e.projection?this.projection=e.projection:this.projection=(jn[e.projection]||jn.albersUsa)(),this.geoPath.projection(this.projection),this.outlineBounds=null,this.oldChartBounds=null}computeBounds(e){const t=zt(this.projection.fitWidth(1e3,e)).bounds(e),n=Math.ceil(t[1][1]-t[0][1]),a=Math.ceil(t[1][0]-t[0][0]),r=this.projection.translate();this.outlineBounds={width:a,height:n,aspectRatio:a/n,refScale:this.projection.scale(),refX:r[0],refY:r[1]}}updateBounds(){const e=this.chart.chartArea,t=this.outlineBounds;if(!t)return!1;const n=this.options.padding,a="number"==typeof n?n:n.top,r="number"==typeof n?n:n.left,i="number"==typeof n?n:n.bottom,f="number"==typeof n?n:n.right,c=e.right-e.left-r-f,o=e.bottom-e.top-a-i,d=this.oldChartBounds;this.oldChartBounds={chartWidth:c,chartHeight:o};const s=Math.min(c/t.width,o/t.height),l=t.width*s,u=t.height*s,h=.5*(c-l)+e.left+r,b=.5*(o-u)+e.top+a,p=this.options;return this.projection.scale(t.refScale*s*p.projectionScale).translate([s*t.refX+h+p.projectionOffset[0],s*t.refY+b+p.projectionOffset[1]]),!d||d.chartWidth!==this.oldChartBounds.chartWidth||d.chartHeight!==this.oldChartBounds.chartHeight}}function On(e){for(var t=e.length/6|0,n=new Array(t),a=0;a<t;)n[a]="#"+e.slice(6*a,6*++a);return n}function Rn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Dn(e,t){var n=Object.create(e.prototype);for(var a in t)n[a]=t[a];return n}function Gn(){}zn.id="projection",zn.defaults={projection:"albersUsa",projectionScale:1,projectionOffset:[0,0],padding:0},zn.descriptors={_scriptable:e=>"projection"!==e,_indexable:e=>"projectionOffset"!==e};var Bn=.7,qn=1/Bn,Ln="\\s*([+-]?\\d+)\\s*",Tn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Fn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Wn=/^#([0-9a-f]{3,8})$/,Vn=new RegExp(`^rgb\\(${Ln},${Ln},${Ln}\\)$`),Hn=new RegExp(`^rgb\\(${Fn},${Fn},${Fn}\\)$`),Yn=new RegExp(`^rgba\\(${Ln},${Ln},${Ln},${Tn}\\)$`),Kn=new RegExp(`^rgba\\(${Fn},${Fn},${Fn},${Tn}\\)$`),Un=new RegExp(`^hsl\\(${Tn},${Fn},${Fn}\\)$`),Xn=new RegExp(`^hsla\\(${Tn},${Fn},${Fn},${Tn}\\)$`),Zn={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 Jn(){return this.rgb().formatHex()}function Qn(){return this.rgb().formatRgb()}function ea(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Wn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?ta(t):3===n?new ia(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?na(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?na(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Vn.exec(e))?new ia(t[1],t[2],t[3],1):(t=Hn.exec(e))?new ia(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Yn.exec(e))?na(t[1],t[2],t[3],t[4]):(t=Kn.exec(e))?na(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Un.exec(e))?la(t[1],t[2]/100,t[3]/100,1):(t=Xn.exec(e))?la(t[1],t[2]/100,t[3]/100,t[4]):Zn.hasOwnProperty(e)?ta(Zn[e]):"transparent"===e?new ia(NaN,NaN,NaN,0):null}function ta(e){return new ia(e>>16&255,e>>8&255,255&e,1)}function na(e,t,n,a){return a<=0&&(e=t=n=NaN),new ia(e,t,n,a)}function aa(e){return e instanceof Gn||(e=ea(e)),e?new ia((e=e.rgb()).r,e.g,e.b,e.opacity):new ia}function ra(e,t,n,a){return 1===arguments.length?aa(e):new ia(e,t,n,null==a?1:a)}function ia(e,t,n,a){this.r=+e,this.g=+t,this.b=+n,this.opacity=+a}function fa(){return`#${sa(this.r)}${sa(this.g)}${sa(this.b)}`}function ca(){const e=oa(this.opacity);return`${1===e?"rgb(":"rgba("}${da(this.r)}, ${da(this.g)}, ${da(this.b)}${1===e?")":`, ${e})`}`}function oa(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function da(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function sa(e){return((e=da(e))<16?"0":"")+e.toString(16)}function la(e,t,n,a){return a<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new ha(e,t,n,a)}function ua(e){if(e instanceof ha)return new ha(e.h,e.s,e.l,e.opacity);if(e instanceof Gn||(e=ea(e)),!e)return new ha;if(e instanceof ha)return e;var t=(e=e.rgb()).r/255,n=e.g/255,a=e.b/255,r=Math.min(t,n,a),i=Math.max(t,n,a),f=NaN,c=i-r,o=(i+r)/2;return c?(f=t===i?(n-a)/c+6*(n<a):n===i?(a-t)/c+2:(t-n)/c+4,c/=o<.5?i+r:2-i-r,f*=60):c=o>0&&o<1?0:f,new ha(f,c,o,e.opacity)}function ha(e,t,n,a){this.h=+e,this.s=+t,this.l=+n,this.opacity=+a}function ba(e){return(e=(e||0)%360)<0?e+360:e}function pa(e){return Math.max(0,Math.min(1,e||0))}function ga(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Rn(Gn,ea,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Jn,formatHex:Jn,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ua(this).formatHsl()},formatRgb:Qn,toString:Qn}),Rn(ia,ra,Dn(Gn,{brighter(e){return e=null==e?qn:Math.pow(qn,e),new ia(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Bn:Math.pow(Bn,e),new ia(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ia(da(this.r),da(this.g),da(this.b),oa(this.opacity))},displayable(){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:fa,formatHex:fa,formatHex8:function(){return`#${sa(this.r)}${sa(this.g)}${sa(this.b)}${sa(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ca,toString:ca})),Rn(ha,function(e,t,n,a){return 1===arguments.length?ua(e):new ha(e,t,n,null==a?1:a)},Dn(Gn,{brighter(e){return e=null==e?qn:Math.pow(qn,e),new ha(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Bn:Math.pow(Bn,e),new ha(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,a=n+(n<.5?n:1-n)*t,r=2*n-a;return new ia(ga(e>=240?e-240:e+120,r,a),ga(e,r,a),ga(e<120?e+240:e-120,r,a),this.opacity)},clamp(){return new ha(ba(this.h),pa(this.s),pa(this.l),oa(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=oa(this.opacity);return`${1===e?"hsl(":"hsla("}${ba(this.h)}, ${100*pa(this.s)}%, ${100*pa(this.l)}%${1===e?")":`, ${e})`}`}}));const ma=Math.PI/180,va=180/Math.PI;var ya=-.14861,xa=1.78277,wa=-.29227,Ma=-.90649,Sa=1.97294,Ea=Sa*Ma,_a=Sa*xa,Na=xa*wa-Ma*ya;function Aa(e,t,n,a){return 1===arguments.length?function(e){if(e instanceof ka)return new ka(e.h,e.s,e.l,e.opacity);e instanceof ia||(e=aa(e));var t=e.r/255,n=e.g/255,a=e.b/255,r=(Na*a+Ea*t-_a*n)/(Na+Ea-_a),i=a-r,f=(Sa*(n-r)-wa*i)/Ma,c=Math.sqrt(f*f+i*i)/(Sa*r*(1-r)),o=c?Math.atan2(f,i)*va-120:NaN;return new ka(o<0?o+360:o,c,r,e.opacity)}(e):new ka(e,t,n,null==a?1:a)}function ka(e,t,n,a){this.h=+e,this.s=+t,this.l=+n,this.opacity=+a}Rn(ka,Aa,Dn(Gn,{brighter(e){return e=null==e?qn:Math.pow(qn,e),new ka(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Bn:Math.pow(Bn,e),new ka(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*ma,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),a=Math.cos(e),r=Math.sin(e);return new ia(255*(t+n*(ya*a+xa*r)),255*(t+n*(wa*a+Ma*r)),255*(t+n*(Sa*a)),this.opacity)}}));var Ca=e=>()=>e;function Pa(e,t){return function(n){return e+n*t}}function Ia(e){return 1===(e=+e)?$a:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(a){return Math.pow(e+a*t,n)}}(t,n,e):Ca(isNaN(t)?n:t)}}function $a(e,t){var n=t-e;return n?Pa(e,n):Ca(isNaN(e)?t:e)}!function e(t){var n=Ia(t);function a(e,t){var a=n((e=ra(e)).r,(t=ra(t)).r),r=n(e.g,t.g),i=n(e.b,t.b),f=$a(e.opacity,t.opacity);return function(t){return e.r=a(t),e.g=r(t),e.b=i(t),e.opacity=f(t),e+""}}return a.gamma=e,a}(1);var ja,za=(ja=function(e){var t=e.length-1;return function(n){var a=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),r=e[a],i=e[a+1],f=a>0?e[a-1]:2*r-i,c=a<t-1?e[a+2]:2*i-r;return function(e,t,n,a,r){var i=e*e,f=i*e;return((1-3*e+3*i-f)*t+(4-6*i+3*f)*n+(1+3*e+3*i-3*f)*a+f*r)/6}((n-a/t)*t,f,r,i,c)}},function(e){var t,n,a=e.length,r=new Array(a),i=new Array(a),f=new Array(a);for(t=0;t<a;++t)n=ra(e[t]),r[t]=n.r||0,i[t]=n.g||0,f[t]=n.b||0;return r=ja(r),i=ja(i),f=ja(f),n.opacity=1,function(e){return n.r=r(e),n.g=i(e),n.b=f(e),n+""}});function Oa(e){return function t(n){function a(t,a){var r=e((t=Aa(t)).h,(a=Aa(a)).h),i=$a(t.s,a.s),f=$a(t.l,a.l),c=$a(t.opacity,a.opacity);return function(e){return t.h=r(e),t.s=i(e),t.l=f(Math.pow(e,n)),t.opacity=c(e),t+""}}return n=+n,a.gamma=t,a}(1)}Oa(function(e,t){var n=t-e;return n?Pa(e,n>180||n<-180?n-360*Math.round(n/360):n):Ca(isNaN(e)?t:e)});var Ra=Oa($a),Da=e=>za(e[e.length-1]),Ga=Da(new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(On)),Ba=Da(new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(On)),qa=Da(new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(On)),La=Da(new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(On)),Ta=Da(new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(On)),Fa=Da(new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(On)),Wa=Da(new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(On)),Va=Da(new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(On)),Ha=Da(new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(On)),Ya=Da(new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(On)),Ka=Da(new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(On)),Ua=Da(new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(On)),Xa=Da(new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(On)),Za=Da(new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(On)),Ja=Da(new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(On)),Qa=Da(new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(On)),er=Da(new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(On)),tr=Da(new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(On)),nr=Da(new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(On)),ar=Da(new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(On)),rr=Da(new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(On)),ir=Da(new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(On)),fr=Da(new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(On)),cr=Da(new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(On)),or=Da(new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(On)),dr=Da(new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(On)),sr=Da(new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(On));var lr=Ra(Aa(300,.5,0),Aa(-240,.5,1)),ur=Ra(Aa(-100,.75,.35),Aa(80,1.5,.8)),hr=Ra(Aa(260,.75,.35),Aa(80,1.5,.8)),br=Aa();var pr=ra(),gr=Math.PI/3,mr=2*Math.PI/3;function vr(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}var yr=vr(On("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),xr=vr(On("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),wr=vr(On("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Mr=vr(On("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));const Sr={position:"chartArea",property:"value",grid:{z:1,drawOnChartArea:!1},ticks:{z:1},legend:{align:"right",position:"bottom-right",length:100,width:50,margin:8,indicatorWidth:10}};class Er extends t.LinearScale{constructor(){super(...arguments),this.legendSize={w:0,h:0}}init(e){e.position="chartArea",super.init(e),this.axis="r"}parse(e,t){return e&&"number"==typeof e[this.options.property]?e[this.options.property]:super.parse(e,t)}isHorizontal(){return"top"===this.options.legend.align||"bottom"===this.options.legend.align}_getNormalizedValue(e){return null==e||Number.isNaN(e)?null:(e-this._startValue)/this._valueRange}update(e,t,n){const a=Math.min(t,null==this.bottom?Number.POSITIVE_INFINITY:this.bottom),r=Math.min(e,null==this.right?Number.POSITIVE_INFINITY:this.right),i=this.options.legend,f=this.isHorizontal(),c=(e,t)=>e<1?t*e:e,o=Math.min(r,c(f?i.length:i.width,r))-(f?0:i.indicatorWidth),d=Math.min(a,c(f?i.width:i.length,a))-(f?i.indicatorWidth:0);this.legendSize={w:o,h:d},this.bottom=d,this.height=d,this.right=o,this.width=o;const s=this.options.position;this.options.position=this.options.legend.align;const l=super.update(o,d,n);return this.options.position=s,this.height=Math.min(d,this.height),this.width=Math.min(o,this.width),l}_computeLabelArea(){}draw(e){if(!this._isVisible())return;const t=function(e,t,n,a,r){const{indicatorWidth:i,align:f,position:c}=t,o="top"===f||"bottom"===f,d=("left"===f?r.w:n)+(o?i:0),s=("top"===f?r.h:a)+(o?0:i),l=function(e){const{indicatorWidth:t,align:n,margin:a}=e;return{left:("number"==typeof a?a:a.left)+("right"===n?t:0),top:("number"==typeof a?a:a.top)+("bottom"===n?t:0),right:("number"==typeof a?a:a.right)+("left"===n?t:0),bottom:("number"==typeof a?a:a.bottom)+("top"===n?t:0)}}(t);if("string"==typeof c)switch(c){case"top-left":return[l.left,l.top];case"top":return[(e.right-d)/2,l.top];case"left":return[l.left,(e.bottom-s)/2];case"top-right":return[e.right-d-l.right,l.top];case"bottom-right":return[e.right-d-l.right,e.bottom-s-l.bottom];case"bottom":return[(e.right-d)/2,e.bottom-s-l.bottom];case"bottom-left":return[l.left,e.bottom-s-l.bottom];default:return[e.right-d-l.right,(e.bottom-s)/2]}return[c.x,c.y]}(e,this.options.legend,this.width,this.height,this.legendSize),{ctx:n}=this;n.save(),n.translate(t[0],t[1]);const a=this.options.position;this.options.position=this.options.legend.align,super.draw({...e,bottom:this.height+10,right:this.width}),this.options.position=a;const{indicatorWidth:r}=this.options.legend;switch(this.options.legend.align){case"left":n.translate(this.legendSize.w,0);break;case"top":n.translate(0,this.legendSize.h);break;case"bottom":n.translate(0,-r);break;default:n.translate(-r,0)}this._drawIndicator(),n.restore()}_drawIndicator(){}}class _r extends t.LogarithmicScale{constructor(){super(...arguments),this.legendSize={w:0,h:0}}init(e){Er.prototype.init.call(this,e)}parse(e,t){return Er.prototype.parse.call(this,e,t)}isHorizontal(){return"top"===this.options.legend.align||"bottom"===this.options.legend.align}_getNormalizedValue(e){return null==e||Number.isNaN(e)?null:(Math.log10(e)-this._startValue)/this._valueRange}update(e,t,n){return Er.prototype.update.call(this,e,t,n)}_computeLabelArea(){}draw(e){return Er.prototype.draw.call(this,e)}_drawIndicator(){}}const Nr={interpolateBlues:ir,interpolateBrBG:Ga,interpolateBuGn:Ya,interpolateBuPu:Ka,interpolateCividis:function(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-2710.57*e)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-67.37*e)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-2475.67*e)))))))+")"},interpolateCool:hr,interpolateCubehelixDefault:lr,interpolateGnBu:Ua,interpolateGreens:fr,interpolateGreys:cr,interpolateInferno:wr,interpolateMagma:xr,interpolateOrRd:Xa,interpolateOranges:sr,interpolatePRGn:Ba,interpolatePiYG:qa,interpolatePlasma:Mr,interpolatePuBu:Ja,interpolatePuBuGn:Za,interpolatePuOr:La,interpolatePuRd:Qa,interpolatePurples:or,interpolateRainbow:function(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return br.h=360*e-100,br.s=1.5-1.5*t,br.l=.8-.9*t,br+""},interpolateRdBu:Ta,interpolateRdGy:Fa,interpolateRdPu:er,interpolateRdYlBu:Wa,interpolateRdYlGn:Va,interpolateReds:dr,interpolateSinebow:function(e){var t;return e=(.5-e)*Math.PI,pr.r=255*(t=Math.sin(e))*t,pr.g=255*(t=Math.sin(e+gr))*t,pr.b=255*(t=Math.sin(e+mr))*t,pr+""},interpolateSpectral:Ha,interpolateTurbo:function(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-14825.05*e)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+707.56*e)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-6838.66*e)))))))+")"},interpolateViridis:yr,interpolateWarm:ur,interpolateYlGn:nr,interpolateYlGnBu:tr,interpolateYlOrBr:ar,interpolateYlOrRd:rr};function Ar(e,t){const n=1/t;if(e<=n)return 0;if(e>=1-n)return 1;for(let t=0;t<1;t+=n)if(e<t)return t-n/2;return e}Object.keys(Nr).forEach(e=>{Nr[`${e.charAt(11).toLowerCase()}${e.slice(12)}`]=Nr[e],Nr[e.slice(11)]=Nr[e]});const kr={interpolate:"blues",missing:"transparent",quantize:0};class Cr extends Er{get interpolate(){const e=this.options;return e?"function"==typeof e.interpolate?e.interpolate:Nr[e.interpolate]||Nr.blues:e=>`rgb(${e},${e},${e})`}getColorForValue(e){const t=this._getNormalizedValue(e);return null==t||Number.isNaN(t)?this.options.missing:this.getColor(t)}getColor(e){let t=e;return this.options.quantize>0&&(t=Ar(t,this.options.quantize)),this.interpolate(t)}_drawIndicator(){const{indicatorWidth:e}=this.options.legend,t=this._reversePixels;if(this.isHorizontal()){const n=this.width;if(this.options.quantize>0){const a=n/this.options.quantize,r=t?e=>n-a-e:e=>e;for(let t=0;t<n;t+=a){const i=(t+a/2)/n;this.ctx.fillStyle=this.getColor(i),this.ctx.fillRect(r(t),0,a,e)}}else{const a=t?e=>n-1-e:e=>e;for(let t=0;t<n;t+=1)this.ctx.fillStyle=this.getColor((t+.5)/n),this.ctx.fillRect(a(t),0,1,e)}}else{const n=this.height;if(this.options.quantize>0){const a=n/this.options.quantize,r=t?e=>n-a-e:e=>e;for(let t=0;t<n;t+=a){const i=(t+a/2)/n;this.ctx.fillStyle=this.getColor(i),this.ctx.fillRect(0,r(t),e,a)}}else{const a=t?e=>n-1-e:e=>e;for(let t=0;t<n;t+=1)this.ctx.fillStyle=this.getColor((t+.5)/n),this.ctx.fillRect(0,a(t),e,1)}}}}Cr.id="color",Cr.defaults=n.merge({},[t.LinearScale.defaults,Sr,kr]),Cr.descriptors={_scriptable:e=>"interpolate"!==e,_indexable:!1};class Pr extends _r{constructor(){super(...arguments),this.interpolate=e=>`rgb(${e},${e},${e})`}init(e){super.init(e),"function"==typeof e.interpolate?this.interpolate=e.interpolate:this.interpolate=Nr[e.interpolate]||Nr.blues}getColorForValue(e){return Cr.prototype.getColorForValue.call(this,e)}getColor(e){let t=e;return this.options.quantize>0&&(t=Ar(t,this.options.quantize)),this.interpolate(t)}_drawIndicator(){return Cr.prototype._drawIndicator.call(this)}}Pr.id="colorLogarithmic",Pr.defaults=n.merge({},[t.LogarithmicScale.defaults,Sr,kr]),Pr.descriptors={_scriptable:e=>"interpolate"!==e,_indexable:!1};const Ir={missing:1,mode:"area",range:[2,20],legend:{align:"bottom",length:90,width:70,indicatorWidth:42}};class $r extends Er{constructor(){super(...arguments),this._model=null}getSizeForValue(e){const t=this._getNormalizedValue(e);return null==t||Number.isNaN(t)?this.options.missing:this.getSizeImpl(t)}getSizeImpl(e){const[t,n]=this.options.range;if("area"===this.options.mode){const a=n*n*Math.PI,r=t*t*Math.PI,i=e*(a-r)+r;return Math.sqrt(i/Math.PI)}return e*(n-t)+t}_drawIndicator(){const{ctx:e}=this,t=this.options.legend.indicatorWidth/2,a=this.isHorizontal(),r=this.ticks,i=this.getLabelItems(),f=i?i.map(e=>({[a?"x":"y"]:e.options.translation[a?0:1]})):r.map((e,t)=>({[a?"x":"y"]:this.getPixelForTick(t)}));if((this._gridLineItems||[]).forEach(n=>{if(e.save(),e.strokeStyle=n.color,e.lineWidth=n.width,e.setLineDash&&(e.setLineDash(n.borderDash),e.lineDashOffset=n.borderDashOffset),e.beginPath(),this.options.grid.drawTicks)switch(this.options.legend.align){case"left":e.moveTo(0,n.ty1),e.lineTo(t,n.ty2);break;case"top":e.moveTo(n.tx1,0),e.lineTo(n.tx2,t);break;case"bottom":e.moveTo(n.tx1,t),e.lineTo(n.tx2,2*t);break;default:e.moveTo(t,n.ty1),e.lineTo(2*t,n.ty2)}e.stroke(),e.restore()}),this._model){const t=this._model;e.strokeStyle=t.borderColor,e.lineWidth=t.borderWidth||0,e.fillStyle=t.backgroundColor}else e.fillStyle="blue";r.forEach((r,i)=>{const c=f[i],o=this.getSizeForValue(r.value),d=a?c.x:t,s=a?t:c.y,l={pointStyle:"circle",borderWidth:0,...this._model||{},radius:o};n.drawPoint(e,l,d,s)})}}$r.id="size",$r.defaults=n.merge({},[t.LinearScale.defaults,Sr,Ir]),$r.descriptors={_scriptable:!0,_indexable:e=>"range"!==e};class jr extends _r{constructor(){super(...arguments),this._model=null}getSizeForValue(e){const t=this._getNormalizedValue(e);return null==t||Number.isNaN(t)?this.options.missing:this.getSizeImpl(t)}getSizeImpl(e){return $r.prototype.getSizeImpl.call(this,e)}_drawIndicator(){$r.prototype._drawIndicator.call(this)}}jr.id="sizeLogarithmic",jr.defaults=n.merge({},[t.LogarithmicScale.defaults,Sr,Ir]);class zr extends t.Element{constructor(){super(...arguments),this.cache=void 0}updateExtras({scale:e,feature:t,center:n,pixelRatio:a,mode:r}){var i,f;const c="resize"===r||"reset"===r||this.projectionScale!==e||this.feature!==t||(null===(i=this.center)||void 0===i?void 0:i.longitude)!==(null==n?void 0:n.longitude)||(null===(f=this.center)||void 0===f?void 0:f.latitude)!==(null==n?void 0:n.latitude)||this.pixelRatio!==a;return this.projectionScale=e,this.feature=t,this.center=n,this.pixelRatio=a,c&&(this.cache=void 0),this.getCenterPoint()}inRange(e,t){const n=this.getBounds(),a=(Number.isNaN(e)||e>=n.x&&e<=n.x2)&&(Number.isNaN(t)||t>=n.y&&t<=n.y2),r=this.projectionScale.geoPath.projection();if(a&&!Number.isNaN(e)&&!Number.isNaN(t)&&"function"==typeof r.invert){const n=r.invert([e,t]);return null!=n&&function(e,t){return(e&&we.hasOwnProperty(e.type)?we[e.type]:Se)(e,t)}(this.feature,n)}return a}inXRange(e){return this.inRange(e,Number.NaN)}inYRange(e){return this.inRange(Number.NaN,e)}getCenterPoint(){if(this.cache&&this.cache.center)return this.cache.center;let e;if(this.center){const t=this.projectionScale.projection([this.center.longitude,this.center.latitude]);e={x:t[0],y:t[1]}}else{const t=this.projectionScale.geoPath.centroid(this.feature);e={x:t[0],y:t[1]}}return this.cache={...this.cache||{},center:e},e}getBounds(){if(this.cache&&this.cache.bounds)return this.cache.bounds;const e=function(e,t){return[[e[0][0]-t,e[0][1]-t],[e[1][0]+t,e[1][1]+t]]}(this.projectionScale.geoPath.bounds(this.feature),this.options.borderWidth/2),t={x:e[0][0],x2:e[1][0],y:e[0][1],y2:e[1][1],width:e[1][0]-e[0][0],height:e[1][1]-e[0][1]};return this.cache={...this.cache||{},bounds:t},t}_drawInCache(e){const t=this.getBounds();if(!Number.isFinite(t.x))return;const n=this.cache&&this.cache.canvas?this.cache.canvas:e.createElement("canvas"),a=Math.floor(t.x),r=Math.floor(t.y),i=Math.ceil(t.x+t.width),f=Math.ceil(t.y+t.height),c=this.pixelRatio||1,o=Math.ceil(Math.max(i-a,1)*c),d=Math.ceil(Math.max(f-r,1)*c);if(o<=0||d<=0)return;n.width=o,n.height=d;const s=n.getContext("2d");s&&(s.clearRect(0,0,n.width,n.height),s.save(),s.scale(c,c),s.translate(-a,-r),this._drawImpl(s),s.restore(),this.cache={...this.cache||{},canvas:n,canvasKey:this._optionsToKey()})}_optionsToKey(){const{options:e}=this;return`${e.backgroundColor};${e.borderColor};${e.borderWidth};${this.pixelRatio}`}_drawImpl(e){const{feature:t}=this,{options:n}=this;e.beginPath(),this.projectionScale.geoPath.context(e)(t),n.backgroundColor&&(e.fillStyle=n.backgroundColor,e.fill()),n.borderColor&&(e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.stroke())}draw(e){const{feature:t}=this;if(!t)return;this.cache&&this.cache.canvasKey===this._optionsToKey()||null==e.canvas.ownerDocument||this._drawInCache(e.canvas.ownerDocument);const n=this.getBounds();if(this.cache&&this.cache.canvas&&this.cache.canvas.width>0&&this.cache.canvas.height>0){const t=Math.floor(n.x),a=Math.floor(n.y),r=Math.ceil(n.x+n.width),i=Math.ceil(n.y+n.height);r-t>0&&i-a>0&&e.drawImage(this.cache.canvas,t,a,r-t,i-a)}else Number.isFinite(n.x)&&(e.save(),this._drawImpl(e),e.restore())}}zr.id="geoFeature",zr.defaults={...t.BarElement.defaults,outlineBackgroundColor:null,outlineBorderWidth:0,graticuleBorderColor:"#CCCCCC",graticuleBorderWidth:0},zr.defaultRoutes={outlineBorderColor:"borderColor",...t.BarElement.defaultRoutes||{}};const Or={showOutline:!1,showGraticule:!1,clipMap:!0},Rr={scales:{projection:{axis:"x",type:zn.id,position:"chartArea",display:!1}}};function Dr(e){const t={...e};return Object.keys(e).forEach(n=>{let a=n;if(n.startsWith("outline")){const e=n.slice(7);a=e[0].toLowerCase()+e.slice(1)}else{if(!n.startsWith("hoverOutline"))return;a=`hover${n.slice(12)}`}delete t[n],t[a]=e[n]}),t}class Gr extends t.DatasetController{getGeoDataset(){return super.getDataset()}getGeoOptions(){return this.chart.options}getProjectionScale(){return this.getScaleForId("projection")}linkScales(){const e=this.getGeoDataset(),t=this.getMeta();t.xAxisID="projection",e.xAxisID="projection",t.yAxisID="projection",e.yAxisID="projection",t.xScale=this.getScaleForId("projection"),t.yScale=this.getScaleForId("projection"),this.getProjectionScale().computeBounds(this.resolveOutline())}showOutline(){return n.valueOrDefault(this.getGeoDataset().showOutline,this.getGeoOptions().showOutline)}clipMap(){return n.valueOrDefault(this.getGeoDataset().clipMap,this.getGeoOptions().clipMap)}getGraticule(){return n.valueOrDefault(this.getGeoDataset().showGraticule,this.getGeoOptions().showGraticule)}update(e){super.update(e);const t=this.getMeta(),n=this.getProjectionScale(),a=n.updateBounds()||"resize"===e||"reset"===e;if(this.showOutline()){const r=t.dataset;if(a&&delete r.cache,r.projectionScale=n,r.pixelRatio=this.chart.currentDevicePixelRatio,"resize"!==e){const n=Dr(this.resolveDatasetElementOptions(e)),a={feature:this.resolveOutline(),options:n};this.updateElement(r,void 0,a,e),this.getGraticule()&&(t.graticule=n)}}else this.getGraticule()&&"resize"!==e&&(t.graticule=Dr(this.resolveDatasetElementOptions(e)));a&&t.data.forEach(e=>delete e.cache),this.updateElements(t.data,0,t.data.length,e)}resolveOutline(){const e=this.getGeoDataset().outline||{type:"Sphere"};return Array.isArray(e)?{type:"FeatureCollection",features:e}:e}showGraticule(){const e=this.getGraticule(),t=this.getMeta().graticule;if(!e||!t)return;const{ctx:n}=this.chart,a=this.getProjectionScale().geoPath.context(n);if(n.save(),n.beginPath(),"boolean"==typeof e)e&&a(Ie()());else{const t=Ie();e.stepMajor&&t.stepMajor(e.stepMajor),e.stepMinor&&t.stepMinor(e.stepMinor),a(t())}n.strokeStyle=t.graticuleBorderColor,n.lineWidth=t.graticuleBorderWidth,n.stroke(),n.restore()}draw(){const{chart:e}=this,t=this.clipMap();let a=!1;!0!==t&&"outline"!==t&&"outline+graticule"!==t||(a=!0,n.clipArea(e.ctx,e.chartArea)),this.showOutline()&&this.getMeta().dataset&&this.getMeta().dataset.draw.call(this.getMeta().dataset,e.ctx,e.chartArea),!0===t||"graticule"===t||"outline+graticule"===t?a||n.clipArea(e.ctx,e.chartArea):a&&(a=!1,n.unclipArea(e.ctx)),this.showGraticule(),!0===t||"items"===t?a||n.clipArea(e.ctx,e.chartArea):a&&(a=!1,n.unclipArea(e.ctx)),this.getMeta().data.forEach(t=>t.draw.call(t,e.ctx,e.chartArea)),a&&(a=!1,n.unclipArea(e.ctx))}}function Br(e,n,a,r=[],i=[]){t.registry.addControllers(a),Array.isArray(r)?t.registry.addElements(...r):t.registry.addElements(r),Array.isArray(i)?t.registry.addScales(...i):t.registry.addScales(i);const f=n;return f.type=e,f}class qr extends Gr{initialize(){super.initialize(),this.enableOptionSharing=!0}linkScales(){super.linkScales();const e=this.getGeoDataset(),t=this.getMeta();t.vAxisID="color",t.rAxisID="color",e.vAxisID="color",e.rAxisID="color",t.rScale=this.getScaleForId("color"),t.vScale=t.rScale,t.iScale=t.xScale,t.iAxisID=t.xAxisID,e.iAxisID=t.xAxisID}_getOtherScale(e){return e}parse(e,t){const n=this.getMeta().rScale,{data:a}=this.getDataset(),r=this._cachedMeta;for(let i=e;i<e+t;i+=1)r._parsed[i]={[n.axis]:n.parse(a[i],i)}}updateElements(e,t,n,a){const r=this.resolveDataElementOptions(t,a),i=this.getSharedOptions(r),f=this.includeOptions(a,i),c=this.getProjectionScale();this.updateSharedOptions(i,a,r);for(let r=t;r<t+n;r+=1){const t=e[r];t.projectionScale=c;const n=t.updateExtras({scale:c,feature:this._data[r].feature,center:this._data[r].center,pixelRatio:this.chart.currentDevicePixelRatio,mode:a}),o={x:n.x,y:n.y};f&&(o.options=i||this.resolveDataElementOptions(r,a)),this.updateElement(t,r,o,a)}}indexToColor(e){const t=this.getMeta().rScale;return t.getColorForValue(this.getParsed(e)[t.axis])}}qr.id="choropleth",qr.defaults=n.merge({},[Or,{datasetElementType:zr.id,dataElementType:zr.id}]),qr.overrides=n.merge({},[Rr,{plugins:{tooltip:{callbacks:{title:()=>"",label(e){var t,n,a,r;return null==e.formattedValue?null===(n=null===(t=e.chart.data)||void 0===t?void 0:t.labels)||void 0===n?void 0:n[e.dataIndex]:`${null===(r=null===(a=e.chart.data)||void 0===a?void 0:a.labels)||void 0===r?void 0:r[e.dataIndex]}: ${e.formattedValue}`}}},colors:{enabled:!1}},scales:{color:{type:Cr.id,axis:"x"}},elements:{geoFeature:{backgroundColor(e){if(null==e.dataIndex)return null;return e.chart.getDatasetMeta(e.datasetIndex).controller.indexToColor(e.dataIndex)}}}}]);class Lr extends t.Chart{constructor(e,t){super(e,Br("choropleth",t,qr,zr,[Cr,zn]))}}Lr.id=qr.id;class Tr extends Gr{initialize(){super.initialize(),this.enableOptionSharing=!0}linkScales(){super.linkScales();const e=this.getGeoDataset(),t=this.getMeta();t.vAxisID="size",t.rAxisID="size",e.vAxisID="size",e.rAxisID="size",t.rScale=this.getScaleForId("size"),t.vScale=t.rScale,t.iScale=t.xScale,t.iAxisID=t.xAxisID,e.iAxisID=t.xAxisID}_getOtherScale(e){return e}parse(e,t){const n=this.getMeta().rScale,a=this.getDataset().data,r=this._cachedMeta;for(let i=e;i<e+t;i+=1){const e=a[i];r._parsed[i]={x:null==e.longitude?e.x:e.longitude,y:null==e.latitude?e.y:e.latitude,[n.axis]:n.parse(e,i)}}}updateElements(e,t,n,a){const r="reset"===a,i=this.resolveDataElementOptions(t,a),f=this.getSharedOptions(i),c=this.includeOptions(a,f),o=this.getProjectionScale();this.getMeta().rScale._model=i,this.updateSharedOptions(f,a,i);for(let i=t;i<t+n;i+=1){const t=e[i],n=this.getParsed(i),d=o.projection([n.x,n.y]),s={x:d?d[0]:0,y:d?d[1]:0,skip:Number.isNaN(n.x)||Number.isNaN(n.y)};c&&(s.options=f||this.resolveDataElementOptions(i,a),r&&(s.options.radius=0)),this.updateElement(t,i,s,a)}}indexToRadius(e){const t=this.getMeta().rScale;return t.getSizeForValue(this.getParsed(e)[t.axis])}}Tr.id="bubbleMap",Tr.defaults=n.merge({},[Or,{dataElementType:t.PointElement.id,datasetElementType:zr.id,showOutline:!0,clipMap:"outline+graticule"}]),Tr.overrides=n.merge({},[Rr,{plugins:{tooltip:{callbacks:{title:()=>"",label(e){var t,n,a,r;return null==e.formattedValue?null===(n=null===(t=e.chart.data)||void 0===t?void 0:t.labels)||void 0===n?void 0:n[e.dataIndex]:`${null===(r=null===(a=e.chart.data)||void 0===a?void 0:a.labels)||void 0===r?void 0:r[e.dataIndex]}: ${e.formattedValue}`}}}},scales:{size:{axis:"x",type:$r.id}},elements:{point:{radius(e){if(null==e.dataIndex)return null;return e.chart.getDatasetMeta(e.datasetIndex).controller.indexToRadius(e.dataIndex)},hoverRadius(e){if(null==e.dataIndex)return null;return e.chart.getDatasetMeta(e.datasetIndex).controller.indexToRadius(e.dataIndex)+1}}}}]);class Fr extends t.Chart{constructor(e,t){super(e,Br("bubbleMap",t,Tr,zr,[$r,zn]))}}function Wr(e){return e}function Vr(e){if(null==e)return Wr;var t,n,a=e.scale[0],r=e.scale[1],i=e.translate[0],f=e.translate[1];return function(e,c){c||(t=n=0);var o=2,d=e.length,s=new Array(d);for(s[0]=(t+=e[0])*a+i,s[1]=(n+=e[1])*r+f;o<d;)s[o]=e[o],++o;return s}}function Hr(e){var t,n=Vr(e.transform),a=1/0,r=a,i=-a,f=-a;function c(e){(e=n(e))[0]<a&&(a=e[0]),e[0]>i&&(i=e[0]),e[1]<r&&(r=e[1]),e[1]>f&&(f=e[1])}function o(e){switch(e.type){case"GeometryCollection":e.geometries.forEach(o);break;case"Point":c(e.coordinates);break;case"MultiPoint":e.coordinates.forEach(c)}}for(t in e.arcs.forEach(function(e){for(var t,c=-1,o=e.length;++c<o;)(t=n(e[c],c))[0]<a&&(a=t[0]),t[0]>i&&(i=t[0]),t[1]<r&&(r=t[1]),t[1]>f&&(f=t[1])}),e.objects)o(e.objects[t]);return[a,r,i,f]}function Yr(e,t){var n=t.id,a=t.bbox,r=null==t.properties?{}:t.properties,i=Kr(e,t);return null==n&&null==a?{type:"Feature",properties:r,geometry:i}:null==a?{type:"Feature",id:n,properties:r,geometry:i}:{type:"Feature",id:n,bbox:a,properties:r,geometry:i}}function Kr(e,t){var n=Vr(e.transform),a=e.arcs;function r(e,t){t.length&&t.pop();for(var r=a[e<0?~e:e],i=0,f=r.length;i<f;++i)t.push(n(r[i],i));e<0&&function(e,t){for(var n,a=e.length,r=a-t;r<--a;)n=e[r],e[r++]=e[a],e[a]=n}(t,f)}function i(e){return n(e)}function f(e){for(var t=[],n=0,a=e.length;n<a;++n)r(e[n],t);return t.length<2&&t.push(t[0]),t}function c(e){for(var t=f(e);t.length<4;)t.push(t[0]);return t}function o(e){return e.map(c)}return function e(t){var n,a=t.type;switch(a){case"GeometryCollection":return{type:a,geometries:t.geometries.map(e)};case"Point":n=i(t.coordinates);break;case"MultiPoint":n=t.coordinates.map(i);break;case"LineString":n=f(t.arcs);break;case"MultiLineString":n=t.arcs.map(f);break;case"Polygon":n=o(t.arcs);break;case"MultiPolygon":n=t.arcs.map(o);break;default:return null}return{type:a,coordinates:n}}(t)}function Ur(e,t){var n={},a={},r={},i=[],f=-1;function c(e,t){for(var a in e){var r=e[a];delete t[r.start],delete r.start,delete r.end,r.forEach(function(e){n[e<0?~e:e]=1}),i.push(r)}}return t.forEach(function(n,a){var r,i=e.arcs[n<0?~n:n];i.length<3&&!i[1][0]&&!i[1][1]&&(r=t[++f],t[f]=n,t[a]=r)}),t.forEach(function(t){var n,i,f=function(t){var n,a=e.arcs[t<0?~t:t],r=a[0];e.transform?(n=[0,0],a.forEach(function(e){n[0]+=e[0],n[1]+=e[1]})):n=a[a.length-1];return t<0?[n,r]:[r,n]}(t),c=f[0],o=f[1];if(n=r[c])if(delete r[n.end],n.push(t),n.end=o,i=a[o]){delete a[i.start];var d=i===n?n:n.concat(i);a[d.start=n.start]=r[d.end=i.end]=d}else a[n.start]=r[n.end]=n;else if(n=a[o])if(delete a[n.start],n.unshift(t),n.start=c,i=r[c]){delete r[i.end];var s=i===n?n:i.concat(n);a[s.start=i.start]=r[s.end=n.end]=s}else a[n.start]=r[n.end]=n;else a[(n=[t]).start=c]=r[n.end=o]=n}),c(r,a),c(a,r),t.forEach(function(e){n[e<0?~e:e]||i.push([e])}),i}function Xr(e,t,n){var a,r,i;if(arguments.length>1)a=function(e,t,n){var a,r=[],i=[];function f(e){var t=e<0?~e:e;(i[t]||(i[t]=[])).push({i:e,g:a})}function c(e){e.forEach(f)}function o(e){e.forEach(c)}function d(e){e.forEach(o)}function s(e){switch(a=e,e.type){case"GeometryCollection":e.geometries.forEach(s);break;case"LineString":c(e.arcs);break;case"MultiLineString":case"Polygon":o(e.arcs);break;case"MultiPolygon":d(e.arcs)}}return s(t),i.forEach(null==n?function(e){r.push(e[0].i)}:function(e){n(e[0].g,e[e.length-1].g)&&r.push(e[0].i)}),r}(0,t,n);else for(r=0,a=new Array(i=e.arcs.length);r<i;++r)a[r]=r;return{type:"MultiLineString",arcs:Ur(e,a)}}function Zr(e,t){var n={},a=[],r=[];function i(e){e.forEach(function(t){t.forEach(function(t){(n[t=t<0?~t:t]||(n[t]=[])).push(e)})}),a.push(e)}function f(t){return function(e){for(var t,n=-1,a=e.length,r=e[a-1],i=0;++n<a;)t=r,r=e[n],i+=t[0]*r[1]-t[1]*r[0];return Math.abs(i)}(Kr(e,{type:"Polygon",arcs:[t]}).coordinates[0])}return t.forEach(function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Polygon":i(t.arcs);break;case"MultiPolygon":t.arcs.forEach(i)}}),a.forEach(function(e){if(!e._){var t=[],a=[e];for(e._=1,r.push(t);e=a.pop();)t.push(e),e.forEach(function(e){e.forEach(function(e){n[e<0?~e:e].forEach(function(e){e._||(e._=1,a.push(e))})})})}}),a.forEach(function(e){delete e._}),{type:"MultiPolygon",arcs:r.map(function(t){var a,r=[];if(t.forEach(function(e){e.forEach(function(e){e.forEach(function(e){n[e<0?~e:e].length<2&&r.push(e)})})}),(a=(r=Ur(e,r)).length)>1)for(var i,c,o=1,d=f(r[0]);o<a;++o)(i=f(r[o]))>d&&(c=r[0],r[0]=r[o],r[o]=c,d=i);return r}).filter(function(e){return e.length>0})}}function Jr(e,t){for(var n=0,a=e.length;n<a;){var r=n+a>>>1;e[r]<t?n=r+1:a=r}return n}function Qr(e){if(null==e)return Wr;var t,n,a=e.scale[0],r=e.scale[1],i=e.translate[0],f=e.translate[1];return function(e,c){c||(t=n=0);var o=2,d=e.length,s=new Array(d),l=Math.round((e[0]-i)/a),u=Math.round((e[1]-f)/r);for(s[0]=l-t,t=l,s[1]=u-n,n=u;o<d;)s[o]=e[o],++o;return s}}Fr.id=Tr.id;var ei=Object.freeze({__proto__:null,bbox:Hr,feature:function(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map(function(t){return Yr(e,t)})}:Yr(e,t)},merge:function(e){return Kr(e,Zr.apply(this,arguments))},mergeArcs:Zr,mesh:function(e){return Kr(e,Xr.apply(this,arguments))},meshArcs:Xr,neighbors:function(e){var t={},n=e.map(function(){return[]});function a(e,n){e.forEach(function(e){e<0&&(e=~e);var a=t[e];a?a.push(n):t[e]=[n]})}function r(e,t){e.forEach(function(e){a(e,t)})}var i={LineString:a,MultiLineString:r,Polygon:r,MultiPolygon:function(e,t){e.forEach(function(e){r(e,t)})}};for(var f in e.forEach(function e(t,n){"GeometryCollection"===t.type?t.geometries.forEach(function(t){e(t,n)}):t.type in i&&i[t.type](t.arcs,n)}),t)for(var c=t[f],o=c.length,d=0;d<o;++d)for(var s=d+1;s<o;++s){var l,u=c[d],h=c[s];(l=n[u])[f=Jr(l,h)]!==h&&l.splice(f,0,h),(l=n[h])[f=Jr(l,u)]!==u&&l.splice(f,0,u)}return n},quantize:function(e,t){if(e.transform)throw new Error("already quantized");if(t&&t.scale)c=e.bbox;else{if(!((n=Math.floor(t))>=2))throw new Error("n must be ≥2");var n,a=(c=e.bbox||Hr(e))[0],r=c[1],i=c[2],f=c[3];t={scale:[i-a?(i-a)/(n-1):1,f-r?(f-r)/(n-1):1],translate:[a,r]}}var c,o,d=Qr(t),s=e.objects,l={};function u(e){return d(e)}function h(e){var t;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(h)};break;case"Point":t={type:"Point",coordinates:u(e.coordinates)};break;case"MultiPoint":t={type:"MultiPoint",coordinates:e.coordinates.map(u)};break;default:return e}return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),null!=e.properties&&(t.properties=e.properties),t}for(o in s)l[o]=h(s[o]);return{type:"Topology",bbox:c,transform:t,objects:l,arcs:e.arcs.map(function(e){var t,n=0,a=1,r=e.length,i=new Array(r);for(i[0]=d(e[0],0);++n<r;)((t=d(e[n],n))[0]||t[1])&&(i[a++]=t);return 1===a&&(i[a++]=[0,0]),i.length=a,i})}},transform:Vr,untransform:Qr});t.registry.addScales(Pr,jr,zn,Cr,$r),t.registry.addElements(zr),t.registry.addControllers(qr,Tr),e.BubbleMapChart=Fr,e.BubbleMapController=Tr,e.ChoroplethChart=Lr,e.ChoroplethController=qr,e.ColorLogarithmicScale=Pr,e.ColorScale=Cr,e.GeoController=Gr,e.GeoFeature=zr,e.ProjectionScale=zn,e.SizeLogarithmicScale=jr,e.SizeScale=$r,e.geoAlbers=Zt,e.geoAlbersUsa=Jt,e.geoAzimuthalEqualArea=nn,e.geoAzimuthalEquidistant=rn,e.geoConicConformal=ln,e.geoConicEqualArea=Xt,e.geoConicEquidistant=pn,e.geoEqualEarth=Mn,e.geoEquirectangular=hn,e.geoGnomonic=En,e.geoMercator=cn,e.geoNaturalEarth1=Nn,e.geoOrthographic=kn,e.geoStereographic=Pn,e.geoTransverseMercator=$n,e.topojson=ei});
2
+ //# sourceMappingURL=index.umd.min.js.map
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * chartjs-chart-sankey v0.19.1
3
+ * https://chartjs-chart-sankey.pages.dev/
4
+ * (c) 2026 Jukka Kurkela
5
+ * Released under the MIT license
6
+ */
7
+ !function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("chart.js"),require("chart.js/helpers")):"function"==typeof define&&define.amd?define(["exports","chart.js","chart.js/helpers"],o):o((t="undefined"!=typeof globalThis?globalThis:t||self)["chartjs-chart-sankey"]={},t.Chart,t.Chart.helpers)}(this,function(t,o,e){"use strict";const r=t=>void 0!==t;function n(t){return t&&-1!==["min","max"].indexOf(t)?t:"max"}function i(t,o){return"function"==typeof t?t(o):t&&"object"==typeof t&&!function(t){const o=Object.prototype.toString.call(t);return"[object CanvasPattern]"===o||"[object CanvasGradient]"===o}(t)?t[o.key]:t}function a(t,o,e,r,n,i,a){t.save(),t.fillStyle=o,a>0?(!function(t,o,e,r,n,i){const a=Math.max(0,Math.min(i,r/2,n/2));t.beginPath(),t.moveTo(o+a,e),t.lineTo(o+r-a,e),t.quadraticCurveTo(o+r,e,o+r,e+a),t.lineTo(o+r,e+n-a),t.quadraticCurveTo(o+r,e+n,o+r-a,e+n),t.lineTo(o+a,e+n),t.quadraticCurveTo(o,e+n,o,e+n-a),t.lineTo(o,e+a),t.quadraticCurveTo(o,e,o+a,e),t.closePath()}(t,e,r,n,i,a),t.fill()):t.fillRect(e,r,n,i),t.restore()}function s(t,o,e){const r=function(t){if(!t)return[];const o=[],e=Array.isArray(t)?t:[t];for(;e.length;){const t=e.pop();"string"==typeof t?o.unshift(...t.split("\n")):Array.isArray(t)?e.push(...t):t&&o.unshift(`${t}`)}return o}(o);if(!r.length)return;const{backgroundColor:n,borderRadius:i,color:s,font:l,lineOffset:h,padding:c}=e,f=function(t,o){return"auto"===t?o:t}(e.position,e.autoPosition),d=Number(l.lineHeight);t.font=l.string;const u=Math.max(...r.map(o=>t.measureText(o).width)),p=d*r.length,y=function(t,o,e){const{borderWidth:r,height:n,padding:i,width:a,x:s,y:l}=o,h={align:"center",x:s+a/2,y:l+n/2};return"left"===t?(h.align="right",h.x=s-r-i):"right"===t?(h.align="left",h.x=s+a+r+i):"top"===t?h.y=l-i-e/2:"bottom"===t&&(h.y=l+n+i+e/2),h}(f,e,p);t.textAlign=y.align,t.textBaseline="middle";const x=u+2*c,g=p+2*c,m=function(t,o,e,r,n){return"left"===t?o-n:"right"===t?o-e-n:o-r/2}(y.align,y.x,u,x,c),w=1===r.length?y.y:y.y-p/2+h,b=w+(r.length-1)*d/2;void 0!==n&&a(t,n,m,b-g/2,x,g,i),t.fillStyle=s;for(let o=0;o<r.length;o++)t.fillText(r[o],y.x,w+o*d)}const l=(t,o)=>o.flow===t.flow?t.index-o.index:o.flow-t.flow;function h(t,{size:o,priority:e,column:r}){const i=new Map;for(let o=0;o<t.length;o++){const{from:e,to:r,flow:n}=t[o],a=i.get(e)??{from:[],in:0,key:e,out:0,size:0,to:[]},s=(e===r?a:i.get(r))??{from:[],in:0,key:r,out:0,size:0,to:[]};a.out+=n,a.to.push({addY:0,flow:n,index:o,key:r,node:s}),1===a.to.length&&i.set(e,a),s.in+=n,s.from.push({addY:0,flow:n,index:o,key:e,node:a}),1===s.from.length&&i.set(r,s)}return((t,o)=>{const e=n(o);for(const o of t.values())o.from.sort(l),o.to.sort(l),o.size=Math[e](o.in||o.out,o.out||o.in)})(i,o),((t,o)=>{if(o)for(const e of t.values())e.key in o&&(e.priority=o[e.key])})(i,e),((t,o)=>{if(o)for(const e of t.values())e.key in o&&(e.column=!0,e.x=o[e.key])})(i,r),i}const c=1e-6;function f(t){return t.x??0}function d(t){return t.y??0}const u=(t,o=new Set)=>{const e=[];for(const r of t)o.has(r.key)||(o.add(r.key),e.push(r.key,...u(r.to.map(t=>t.node),o)));return e},p=(t,o)=>{const e=o.filter(t=>0===t.from.length),r=e.map(t=>t.key),n=u(e),i=new Set(n);for(const o of t)i.has(o.from)||i.has(o.to)||(r.push(o.from),i.add(o.from)),i.add(o.to);return r},y=(t,o)=>{const e=new Set(t.filter(t=>o.has(t.from)).map(t=>t.to)),r=[...o],n=r.filter(t=>!e.has(t));return n.length?n:r.slice(0,1)};function x(t,o,e=new Set){let r=0;for(const n of t)e.has(n.node)||(e.add(n.node),r+=n.node[o].length+x(n.node[o],o,e));return r}const g=t=>(o,e)=>x(o.node[t],t)-x(e.node[t],t)||o.node[t].length-e.node[t].length;function m(t,o){if(!t.from.length)return o;t.from.sort(g("from"));for(const e of t.from){const t=e.node;r(t.y)||(t.y=o,m(t,o?o+c:0)),o=Math.max(t.y+t.out,o)}return d(t)+t.size}const w=(t,o)=>Boolean(o&&f(o)<f(t));function b(t,o){if(!t.to.length)return o;t.to.sort(g("to"));for(let e=0;e<t.to.length;e++){const n=t.to[e],i=n.node;r(i.y)||(i.y=o,b(i,o?o+c:0)),w(i,t.to[e+1]?.node)?o+=n.flow:o=Math.max(i.y+Math.max(i.in,i.out),o)}return d(t)+t.size}function M(t,o){return r(t.y)?t.y:(t.y=o,o)}function v(t,o){if(!t.length)return 0;const e=((t,o)=>{const e=[...t].sort((t,o)=>t.size-o.size),r=e[e.length-1].size,n=t.filter(t=>t.size===r),i=n[0];if(1===n.length)return i;if(n.sort((t,o)=>f(t)-f(o)),0===f(i))return i;const a=n[n.length-1];return f(a)===o?a:n[Math.floor(n.length/2)]})(t,o);return e.y=0,m(e,0),b(e,0),function(t,o){const e=t.filter(t=>0===t.x),n=t.filter(t=>t.x===o),i=e.filter(t=>!r(t.y)),a=n.filter(t=>!r(t.y)),s=t.filter(t=>f(t)>0&&f(t)<o&&!r(t.y));let l=e.reduce((t,o)=>Math.max(t,d(o)+o.out||0),0)+c,h=n.reduce((t,o)=>Math.max(t,d(o)+o.in||0),0)+c,u=0;l>=h?(i.forEach(t=>{l=M(t,l),l=Math.max(l+t.out,b(t,l))}),a.forEach(t=>{h=M(t,h),h=Math.max(h+t.in,m(t,h))})):(i.forEach(t=>{l=M(t,l)}),a.forEach(t=>{h=M(t,h),h=Math.max(h+t.in,m(t,h))})),s.forEach(o=>{let e=t.filter(t=>f(t)===f(o)&&r(t.y)).reduce((t,o)=>Math.max(t,d(o)+Math.max(o.in,o.out)),0);e=M(o,e),e=Math.max(e+o.in,m(o,e)),e=Math.max(e+o.out,b(o,e)),u=Math.max(u,e)}),Math.max(l,h,u)}(t,o),((t,o)=>{let e=0;for(let r=0;r<=o;r++){const o=t.filter(t=>f(t)===r).sort((t,o)=>d(t)-d(o));let n=0;for(const t of o)d(t)<n&&(t.y=n),n=d(t)+t.size;e=Math.max(e,n)}return e})(t,o)}const k=(t,o)=>f(t)!==f(o)?f(t)-f(o):d(t)===d(o)?t.size-o.size:d(t)-d(o);function C(t,o,e){const r=(o.get(t.key)??0)*e;return Math.max(0,r-t.size)/2}function z(t,o,e){const r=(o.get(t.key)??0)*e;return Math.max(t.size,r)}function P(t,o,e,r){let n=r;for(let r=0;r<o;r++){const o=t[r].yHistory;for(let t=0;t<o.length&&!(o[t]>e);t++)n=Math.max(t+1,n)}return n}function S(t,o,e,r,n){const i=t.realCount,a=o.before*r,s=o.after*r,l=i>0?Math.max(t.lastAfter,a)+t.lastExtraHalf+n:0,h=t.realCumOffset+l,c=e-i;return t.realCount=i+1,t.realCumOffset=h,t.lastAfter=s,t.lastExtraHalf=n,h+c*a}function _(t,o,e=1,r="auto",n=new Map){if(t.sort(k),"even"===r)return function(t,o,e,r){let n,i,a,s=0,l=0;for(const h of t){const t=f(h),c=o.get(h.key)??{after:0,before:0},u=C(h,r,e);t!==n?n=t:i&&a&&(h.y=d(i)+i.size+Math.max(a.after,c.before)*e+l+u),i=h,a=c,l=u;const p=z(h,r,e);s=Math.max(s,d(h)+Math.max(h.in,h.out),d(h)+(h.size+p)/2)}return s}(t,o,e,n);let i=0;const a=new Map,s=[],l=t=>{if(!a.has(t)){const o=s.length;return a.set(t,o),s.push({lastAfter:0,lastExtraHalf:0,realCount:0,realCumOffset:0,yHistory:[]}),o}return a.get(t)??0};for(const r of t){const t=l(f(r)),a=s[t],h=o.get(r.key)??{after:0,before:0},c=d(r),u=C(r,n,e);if(c){a.yHistory.push(c);let o=a.yHistory.length;if(r.in)for(o=P(s,t,c,o);a.yHistory.length<o;)a.yHistory.push(c);r.y=c+S(a,h,o,e,u)}else a.realCount+=1,a.lastAfter=h.after*e,a.lastExtraHalf=u;const p=z(r,n,e);i=Math.max(i,d(r)+Math.max(r.in,r.out),d(r)+(r.size+p)/2)}return i}function T(t,o,{priority:e,height:n,nodePadding:i,nodePaddingMode:a,nodeMinSize:s,modeX:l}){const h=[...t.values()],c=function(t,o,e){const n=o.filter(t=>t.from!==t.to),i=[...t.keys()],a=[...t.values()],s=new Set(i);let l=0;for(;s.size;){const e=0===l?p(o,a):y(n,s);if(!e.length)throw new Error("Fatal error: Unable to place nodes to columns. Please report this issue.");for(const o of e){const e=t.get(o);e&&!r(e.x)&&(e.x=l),s.delete(o)}s.size&&l++}const h=a.reduce((t,o)=>Math.max(t,f(o)),0);if("edge"===e){const e=new Set(o.map(t=>t.from));i.filter(t=>!e.has(t)).forEach(o=>{const e=t.get(o);e&&!e.column&&(e.x=h)})}return h}(t,o,l??"edge"),u=e?function(t,o){let e=0,r=0;for(let n=0;n<=o;n++){let o=r;const i=t.filter(t=>f(t)===n).sort((t,o)=>(t.priority??0)-(o.priority??0));if(i.length){const o=t.reduce((t,o)=>f(o)>n?Math.min(t,f(o)):t,1/0);r=i[0].to.filter(t=>f(t.node)>o).reduce((t,o)=>t+o.flow,0)||0}for(const t of i)t.y=o,o+=Math.max(t.out,t.in);e=Math.max(o,e)}return e}(h,c):v(h,c),x=_(h,i,u/n,a??"auto",s??new Map);return function(t){t.forEach(t=>{const o=t.size,e=o<t.in,r=o<t.out;let n=0,i=t.from.length;t.from.sort((t,o)=>d(t.node)+t.node.out/2-(d(o.node)+o.node.out/2)).forEach((t,r)=>{e?t.addY=r*(o-t.flow)/(i-1):(t.addY=n,n+=t.flow)}),n=0,i=t.to.length,t.to.sort((t,o)=>d(t.node)+t.node.in/2-(d(o.node)+o.node.in/2)).forEach((t,e)=>{r?t.addY=e*(o-t.flow)/(i-1):(t.addY=n,n+=t.flow)})})}(h),{maxX:c,maxY:x}}function F(t){return t.x??0}function E(t){return t.y??0}function O(t,o){return Math[o](t.in||t.out,t.out||t.in)}function R(t,o,e,r){return"vertical"===r?o<(e.top+e.bottom)/2?"bottom":"top":t<(e.left+e.right)/2?"right":"left"}function H(t,o,e){for(const r of t)if(r.key===o&&r.index===e)return r.addY;return 0}function W(t,o,e,r,n,i,a,s,l){return"vertical"===l?{_custom:{flow:n,from:t,height:a.parse(n,i),to:o,x:a.parse(r,i),y:s.parse(F(o),i)},x:a.parse(e,i),y:s.parse(F(t),i)}:{_custom:{flow:n,from:t,height:s.parse(n,i),to:o,x:a.parse(F(o),i),y:s.parse(r,i)},x:a.parse(F(t),i),y:s.parse(e,i)}}function X(t,o,e,r,n,i,a,s){const l=t._custom,h=o.getPixelForValue(t.x),c=e.getPixelForValue(t.y);return"vertical"===s?{flow:l.flow,from:l.from,height:0,to:l.to,width:Math.abs(o.getPixelForValue(t.x+l.height)-h),x:h,x2:o.getPixelForValue(l.x),y:Y(e,t.y,r,i)+n+a,y2:Y(e,l.y,r,i)-a}:{flow:l.flow,from:l.from,height:Math.abs(e.getPixelForValue(t.y+l.height)-c),to:l.to,width:0,x:Y(o,t.x,r,i)+n+a,x2:Y(o,l.x,r,i)-a,y:c,y2:e.getPixelForValue(l.y)}}function Y(t,o,e,r){const n=t.getPixelForValue(o);return e?n-o/e*r:n}function j(t,o,e){const r="vertical"===o?e.height-e.chartArea.bottom:e.width-e.chartArea.right;return Math.max(0,t+3-r)}function A(t,o,e,r,n,i,a,s,l){if("vertical"===s){const s=e.getPixelForValue(E(t)),h=e.getPixelForValue(E(t)+o),c=Math.min(s,h),f=Math.abs(h-s),d=Math.max(f,l);return{height:i,width:d,x:c-(d-f)/2,y:Y(r,F(t),n,a)}}const h=r.getPixelForValue(E(t)),c=r.getPixelForValue(E(t)+o),f=Math.min(h,c),d=Math.abs(c-h),u=Math.max(d,l);return{height:u,width:i,x:Y(e,F(t),n,a),y:f-(u-d)/2}}function V(t,o){const e=i(t??10,o)??10;return"number"==typeof e?{after:e,before:e}:{after:e.after??10,before:e.before??10}}function L(t,o){return i(t??0,o)??0}function q(t,o){const{backgroundColor:e,borderRadius:r=0,color:n,display:a,font:s,padding:l=4,position:h}=t.nodeLabels??{};return{backgroundColor:i(e,o),borderRadius:r,color:i(n,o)??t.color??"black",display:i(a,o)??!0,font:s,padding:l,position:i(h,o)??"auto"}}const D=new Set(["nodeMinSize","nodePadding"]);class $ extends o.DatasetController{parseObjectData(t,o,e,r){const n=((t,o)=>{const{from:e="from",to:r="to",flow:n="flow"}=o;return t.map(({[e]:t,[r]:o,[n]:i})=>({flow:i,from:t,to:o}))})(o,this.options.parsing),{xScale:i,yScale:a}=t,s=[],l=h(n,this.options),c=this.options.orientation??"horizontal";this._nodes=l;const f=new Map,d=new Map;for(const t of l.values())f.set(t.key,V(this.options.nodePadding,t)),d.set(t.key,L(this.options.nodeMinSize,t));const{maxX:u,maxY:p}=T(l,n,{height:"vertical"===c?this.chart.width:this.chart.height,modeX:this.options.modeX,nodeMinSize:d,nodePadding:f,nodePaddingMode:this.options.nodePaddingMode,priority:!!this.options.priority});if(this._maxX=u,this._maxY=p,!i||!a)return[];for(let t=0,o=n.length;t<o;++t){const o=n[t],e=l.get(o.from),r=l.get(o.to);if(!e||!r)continue;const h=E(e)+H(e.to,o.to,t),f=E(r)+H(r.from,o.from,t);s.push(W(e,r,h,f,o.flow,t,i,a,c))}return s.slice(e,e+r)}buildOrUpdateElements(t){this.configure(),super.buildOrUpdateElements(t)}getMinMax(t){return{max:t===("vertical"===this.options.orientation?this._cachedMeta.yScale:this._cachedMeta.xScale)?this._maxX:this._maxY,min:0}}update(t){const{data:o}=this._cachedMeta;this.updateElements(o,0,o.length,t)}updateElements(t,o,e,r){const{xScale:n,yScale:i}=this._cachedMeta;if(!n||!i)return;const a=this.resolveDataElementOptions(o,r),s=this.getSharedOptions(a),{borderWidth:l,nodeWidth:h=10,orientation:c="horizontal"}=this.options,f=j(h,c,this.chart),d=l?l/2+.5:0;for(let a=o;a<o+e;a++){const o=this.getParsed(a);this.updateElement(t[a],a,{options:this.resolveDataElementOptions(a,r),progress:"reset"===r?0:1,...X(o,n,i,this._maxX,h,f,d,c)},r)}s&&this.updateSharedOptions(s,r,a)}_drawLabels(){const t=this.chart.ctx,r=this.options,i=this._nodes||new Map,a=n(r.size),l=r.labels,{borderWidth:h=1,nodeWidth:c=10,orientation:f="horizontal"}=r,d=j(c,f,this.chart),u=r.font??this.chart.options.font??o.Chart.defaults.font,{xScale:p,yScale:y}=this._cachedMeta;if(!p||!y)return;t.save();const x=this.chart.chartArea;for(const o of i.values()){const n=O(o,a),i=L(r.nodeMinSize,o),{height:g,width:m,x:w,y:b}=A(o,n,p,y,this._maxX,c,d,f,i),M=l?.[o.key]??o.key,v=q(r,o);if(v.display){const o=e.toFont(v.font??u);s(t,M,{autoPosition:R(w,b,x,f),backgroundColor:v.backgroundColor,borderRadius:v.borderRadius,borderWidth:h,color:v.color,font:o,height:g,lineOffset:e.valueOrDefault(r.padding,o.lineHeight/2),padding:v.padding,position:v.position,width:m,x:w,y:b})}}t.restore()}_drawNodes(){const t=this.chart.ctx,o=this._nodes||new Map,{borderColor:e,borderWidth:r=0,nodeWidth:i=10,orientation:a="horizontal",size:s}=this.options,l=j(i,a,this.chart),h=n(s),{xScale:c,yScale:f}=this._cachedMeta;t.save(),e&&r&&(t.strokeStyle=e,t.lineWidth=r);for(const e of o.values()){if(t.fillStyle=e.color??"black",!c||!f)return;const o=Math[h](e.in||e.out,e.out||e.in),n=L(this.options.nodeMinSize,e),{height:s,width:d,x:u,y:p}=A(e,o,c,f,this._maxX,i,l,a,n);r&&t.strokeRect(u,p,d,s),t.fillRect(u,p,d,s)}t.restore()}draw(){const t=this.chart.ctx,o=this.getMeta().data??[],e=[];for(let t=0,r=o.length;t<r;++t){const r=o[t];r.from&&r.to&&(r.from.color=r.options.colorFrom,r.to.color=r.options.colorTo,r.active&&e.push(r))}for(const t of e)t.from&&t.to&&(t.from.color=t.options.colorFrom,t.to.color=t.options.colorTo);this._drawNodes();for(let e=0,r=o.length;e<r;++e)o[e].draw(t);this._drawLabels()}constructor(...t){super(...t),this._nodes=new Map,this._maxX=0,this._maxY=0}}$.id="sankey",$.descriptors={_indexable:!1,_scriptable:t=>!D.has(t),nodeLabels:{_indexable:!1,_scriptable:!1}},$.defaults={animations:{colors:{properties:["colorFrom","colorTo"],type:"color"},numbers:{properties:["x","y","x2","y2","height","width"],type:"number"},progress:{delay:t=>"data"===t.type?500*t.parsed["vertical"===t.dataset.orientation?"y":"x"]+20*t.dataIndex:void 0,duration:t=>"data"===t.type?200*(t.parsed._custom["vertical"===t.dataset.orientation?"y":"x"]-t.parsed["vertical"===t.dataset.orientation?"y":"x"]):void 0,easing:"linear"}},borderColor:"black",borderWidth:1,color:"black",dataElementType:"flow",modeX:"edge",nodeMinSize:0,nodePadding:10,nodePaddingMode:"auto",nodeWidth:10,orientation:"horizontal",transitions:{hide:{animations:{colors:{properties:["colorFrom","colorTo"],to:"transparent",type:"color"}}},resize:{animations:{progress:{delay:0,duration:0}}},show:{animations:{colors:{from:"transparent",properties:["colorFrom","colorTo"],type:"color"}}}}},$.overrides={datasets:{clip:!1,parsing:{flow:"flow",from:"from",to:"to"}},interaction:{intersect:!0,mode:"nearest"},layout:{padding:{bottom:3,left:3,right:13,top:3}},plugins:{legend:{display:!1},tooltip:{callbacks:{label(t){const o=t.parsed._custom;return`${o.from.key} -> ${o.to.key}: ${o.flow}`},title:()=>""}}},scales:{x:{bounds:"data",display:!1,min:0,offset:!1,type:"linear"},y:{bounds:"data",display:!1,min:0,offset:!1,reverse:!0,type:"linear"}}};const G=(t,o,e,r,n)=>"vertical"===n?o<r?{cp1:{x:t,y:o+(r-o)/3*2},cp2:{x:e,y:o+(r-o)/3}}:{cp1:{x:0,y:o-(o-r)/3},cp2:{x:0,y:r+(o-r)/3}}:t<e?{cp1:{x:t+(e-t)/3*2,y:o},cp2:{x:t+(e-t)/3,y:r}}:{cp1:{x:t-(t-e)/3,y:0},cp2:{x:e+(t-e)/3,y:0}},N=(t,o,e)=>({x:t.x+e*(o.x-t.x),y:t.y+e*(o.y-t.y)}),U=(t,o)=>e.color(t).alpha(o).rgbString(),B=(t,o)=>"string"==typeof t?U(t,o):t,I=t=>"string"==typeof t?e.getHoverColor(t):t;class J extends o.Element{draw(t){const{x:r,x2:n,y:i,y2:a,height:l,progress:h,width:c}=this,f=this.options.orientation,d=G(r,i,n,a,f),u={height:l,width:c,x:r,x2:n,y:i,y2:a};if(0===h)return;t.save(),h<1&&function(t,{height:o,width:e,x:r,x2:n,y:i,y2:a},s,l){t.beginPath(),"vertical"===l?t.rect(Math.min(r,n),i,Math.abs(n-r)+e+1,(a-i)*s+1):t.rect(r,Math.min(i,a),(n-r)*s+1,Math.abs(a-i)+o+1),t.clip()}(t,u,h,f),function(t,{x:o,x2:e,y:r,y2:n,options:i}){let a="black";null!==i.flowColor?a=i.flowColor:"from"===i.colorMode?a=B(i.colorFrom,i.alpha):"to"===i.colorMode?a=B(i.colorTo,i.alpha):"string"==typeof i.colorFrom&&"string"==typeof i.colorTo&&(a="vertical"===i.orientation?t.createLinearGradient(0,r,0,n):t.createLinearGradient(o,0,e,0),a.addColorStop(0,U(i.colorFrom,i.alpha)),a.addColorStop(1,U(i.colorTo,i.alpha))),t.fillStyle=a,t.strokeStyle=a,t.lineWidth=.5}(t,this),function(t,{height:o,width:e,x:r,x2:n,y:i,y2:a},{cp1:s,cp2:l},h){t.beginPath(),t.moveTo(r,i),t.bezierCurveTo(s.x,s.y,l.x,l.y,n,a),"vertical"===h?(t.lineTo(n+e,a),t.bezierCurveTo(l.x+e,l.y,s.x+e,s.y,r+e,i)):(t.lineTo(n,a+o),t.bezierCurveTo(l.x,l.y+o,s.x,s.y+o,r,i+o)),t.lineTo(r,i),t.stroke(),t.closePath(),t.fill()}(t,u,d,f);const p=this.options.flowLabels;if(p.display){const r=e.toFont(p.font??o.Chart.defaults.font),n=function({height:t,width:o,x:e,x2:r,y:n,y2:i},a){return"vertical"===a?{height:i-n,width:Math.abs(r-e)+o,x:Math.min(e,r),y:n}:{height:Math.abs(i-n)+t,width:r-e,x:e,y:Math.min(n,i)}}(u,f);s(t,`${this.flow}`,{autoPosition:"center",backgroundColor:p.backgroundColor,borderRadius:p.borderRadius,borderWidth:0,color:p.color,font:r,height:n.height,lineOffset:r.lineHeight/2,padding:p.padding,position:p.position,width:n.width,x:n.x,y:n.y})}t.restore()}inRange(t,o,e){const{x:r,y:n,x2:i,y2:a,height:s,width:l}=this.getProps(["x","y","x2","y2","height","width"],e),h="vertical"===this.options.orientation;if(h?o<n||o>a:t<r||t>i)return!1;const{cp1:c,cp2:f}=G(r,n,i,a,this.options.orientation),d=h?(o-n)/(a-n):(t-r)/(i-r),u={x:i,y:a},p=N({x:r,y:n},c,d),y=N(c,f,d),x=N(f,u,d),g=N(p,y,d),m=N(y,x,d),w=N(g,m,d);return h?t>=w.x&&t<=w.x+l:o>=w.y&&o<=w.y+s}inXRange(t,o){const{x:e,x2:r,width:n}=this.getProps(["x","x2","width"],o),i=Math.min(e,r),a=Math.max(e,r)+("vertical"===this.options.orientation?n:0);return t>=i&&t<=a}inYRange(t,o){const{y:e,y2:r,height:n}=this.getProps(["y","y2","height"],o),i=Math.min(e,r),a=Math.max(e,r)+("vertical"===this.options.orientation?0:n);return t>=i&&t<=a}getCenterPoint(t){const{x:o,y:e,x2:r,y2:n,height:i,width:a}=this.getProps(["x","y","x2","y2","height","width"],t),s="vertical"===this.options.orientation;return{x:(o+r+(s?a:0))/2,y:(e+n+(s?0:i))/2}}tooltipPosition(t=!1){return this.getCenterPoint(t)}getRange(t){const o="vertical"===this.options.orientation;return"x"===t?o?this.width/2:0:o?0:this.height/2}constructor(t){super(),this.flow=0,this.x2=0,this.y2=0,this.width=0,this.height=0,this.progress=1,t&&Object.assign(this,t)}}J.id="flow",J.defaults={alpha:.5,colorFrom:"red",colorMode:"gradient",colorTo:"green",flowColor:null,flowLabels:{borderRadius:0,color:"black",display:!1,padding:4,position:"center"},hoverColorFrom:(t,o)=>I(o.colorFrom),hoverColorTo:(t,o)=>I(o.colorTo),orientation:"horizontal"},J.descriptors={_scriptable:!0,flowLabels:{_scriptable:!0}},o.Chart.register($,J),t.Flow=J,t.SankeyController=$});