diff --git a/.circleci/config.yml b/.circleci/config.yml index 32e27a37aa9..b66d1326d15 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -217,11 +217,12 @@ jobs: make-baselines-virtual-webgl: parallelism: 8 docker: - - image: circleci/python:3.8.9 + - image: cimg/python:3.12.11 working_directory: ~/plotly.js steps: - attach_workspace: at: ~/ + - run: sudo apt-get update - run: name: Install kaleido, plotly.io and required fonts command: .circleci/env_image.sh @@ -235,11 +236,12 @@ jobs: make-baselines-mathjax3: docker: - - image: circleci/python:3.8.9 + - image: cimg/python:3.12.11 working_directory: ~/plotly.js steps: - attach_workspace: at: ~/ + - run: sudo apt-get update - run: name: Install kaleido, plotly.io and required fonts command: .circleci/env_image.sh @@ -254,11 +256,12 @@ jobs: make-baselines: parallelism: 12 docker: - - image: circleci/python:3.8.9 + - image: cimg/python:3.12.11 working_directory: ~/plotly.js steps: - attach_workspace: at: ~/ + - run: sudo apt-get update - run: name: Install kaleido, plotly.io and required fonts command: .circleci/env_image.sh @@ -273,11 +276,12 @@ jobs: make-baselines-b64: parallelism: 12 docker: - - image: circleci/python:3.8.9 + - image: cimg/python:3.12.11 working_directory: ~/plotly.js steps: - attach_workspace: at: ~/ + - run: sudo apt-get update - run: name: Install kaleido, plotly.io and required fonts command: .circleci/env_image.sh @@ -347,11 +351,12 @@ jobs: make-exports: docker: - - image: circleci/python:3.8.9 + - image: cimg/python:3.12.11 working_directory: ~/plotly.js steps: - attach_workspace: at: ~/ + - run: sudo apt-get update - run: name: Install kaleido, plotly.io and required fonts command: .circleci/env_image.sh @@ -362,7 +367,7 @@ jobs: sudo apt-get install poppler-utils - run: name: Create svg, jpg, jpeg, webp, pdf and eps files - command: python3 test/image/make_exports.py + command: sudo python3 test/image/make_exports.py - persist_to_workspace: root: ~/ paths: @@ -488,7 +493,7 @@ jobs: - store_artifacts: path: stackgl_modules/index.js destination: stackgl_modules/index.js - + test-topojson-build: docker: - image: cimg/node:18.20.4 diff --git a/.circleci/env_image.sh b/.circleci/env_image.sh index 47b5d530545..17e2f5bfa26 100755 --- a/.circleci/env_image.sh +++ b/.circleci/env_image.sh @@ -2,10 +2,20 @@ set -e # install required fonts sudo apt-get install fonts-liberation2 fonts-open-sans fonts-noto-cjk fonts-noto-color-emoji + +# install pip +sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py +sudo python3 get-pip.py + +# install additional fonts +sudo python3 -m pip install requests sudo python3 .circleci/download_google_fonts.py sudo cp -r .circleci/fonts/ /usr/share/ +sudo apt install fontconfig sudo fc-cache -f + # install kaleido & plotly -sudo python3 -m pip install kaleido==0.2.1 plotly==5.5.0 --progress-bar off +sudo python3 -m pip install kaleido==0.2.1 plotly==6.2.0 --progress-bar off + # install numpy i.e. to convert arrays to typed arrays sudo python3 -m pip install numpy==1.24.2 diff --git a/.circleci/test.sh b/.circleci/test.sh index b814c1dd3e8..4fc876018b8 100755 --- a/.circleci/test.sh +++ b/.circleci/test.sh @@ -97,24 +97,24 @@ case $1 in find $ROOT/test/image/mocks/gl* -type f -printf "%f\n"; \ find $ROOT/test/image/mocks/map* -type f -printf "%f\n"; \ } | sed 's/\.json$//1' | circleci tests split) - python3 test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$? + sudo python3 test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$? exit $EXIT_STATE ;; make-baselines-mathjax3) - python3 test/image/make_baseline.py mathjax3 legend_mathjax_title_and_items mathjax parcats_grid_subplots table_latex_multitrace_scatter table_plain_birds table_wrapped_birds ternary-mathjax ternary-mathjax-title-place-subtitle || EXIT_STATE=$? + sudo python3 test/image/make_baseline.py mathjax3 legend_mathjax_title_and_items mathjax parcats_grid_subplots table_latex_multitrace_scatter table_plain_birds table_wrapped_birds ternary-mathjax ternary-mathjax-title-place-subtitle || EXIT_STATE=$? exit $EXIT_STATE ;; make-baselines-b64) SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split) - python3 test/image/make_baseline.py b64 $SUITE || EXIT_STATE=$? + sudo python3 test/image/make_baseline.py b64 $SUITE || EXIT_STATE=$? exit $EXIT_STATE ;; make-baselines) SUITE=$(find $ROOT/test/image/mocks/ -type f -printf "%f\n" | sed 's/\.json$//1' | circleci tests split) - python3 test/image/make_baseline.py $SUITE || EXIT_STATE=$? + sudo python3 test/image/make_baseline.py $SUITE || EXIT_STATE=$? exit $EXIT_STATE ;; diff --git a/CHANGELOG.md b/CHANGELOG.md index 278e49e26de..6b3ca2bfeab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,72 @@ To see all merged commits on the master branch that will be part of the next plo where X.Y.Z is the semver of most recent plotly.js release. +## [3.1.0] + +### Added +- Add property `zerolinelayer` to cartesian axes to allow drawing zeroline above traces [[#7269](https://github.com/plotly/plotly.js/pull/7269)] +- Add `pattern.path` attribute as an alternative to the preset `pattern.shape` values, so you can use any SVG path string as a pattern fill. [[#7280](https://github.com/plotly/plotly.js/pull/7280)] +- Allow configuration of horizontal legend max height [[#7359](https://github.com/plotly/plotly.js/pull/7359)] +- Add `modebardisable` attribute to cartesian axes, to allow fine control over which buttons affect which axes [[#7358](https://github.com/plotly/plotly.js/pull/7358)] +- Add support for ticklabelposition "inside"/"outside" for category axes with `tickson` set to "boundaries" [[#7420](https://github.com/plotly/plotly.js/pull/7420)], +with thanks to @my-tien for the contribution! +- Add `unifiedhovertitle.text` to format unified hover titles [[#7439](https://github.com/plotly/plotly.js/pull/7439)] +- Add `layout.hoverlabel.showarrow` (and `trace.hoverlabel.showarrow`) attribute to allow hiding the triangular caret that appears on the hover label box [[#7451](https://github.com/plotly/plotly.js/pull/7451)] +- Add `minorloglabels` to cartesian axes [[#7468](https://github.com/plotly/plotly.js/pull/7468)] +- Make modebar keyboard-accessible via tabbing [[#7492](https://github.com/plotly/plotly.js/pull/7492)], with thanks to @davidangarita1 for the contribution! + +### Changed +- Switch to United Nations (coastlines, countries, land, ocean) + Natural Earth (lakes, rivers, subunits) geodata for building topojson used in geo plot [[#7393](https://github.com/plotly/plotly.js/pull/7393)] +- Make 'png' all caps [[#7400](https://github.com/plotly/plotly.js/pull/7400)] +- Refactor files related to UN topojson [[#7481](https://github.com/plotly/plotly.js/pull/7481)] +- Update default `topojsonURL` to point to new UN topojson [[#7514](https://github.com/plotly/plotly.js/pull/7514)] +- Add breaking change warning for *country names* `locationmode` option in choropleth, scattergeo plots [[#7514](https://github.com/plotly/plotly.js/pull/7514)] + +### Fixed +- Fix performance warning in scattergl traces, [[#7390](https://github.com/plotly/plotly.js/pull/7390)], with thanks to @MzyzzG for the contribution! +- Move css-loader and other dependencies into devDependencies section [[#7407](https://github.com/plotly/plotly.js/pull/7407)] +- Fix hidden ticklabels taking up plot space [[#7417](https://github.com/plotly/plotly.js/pull/7417)] +- Fix editable shapes (regression introduced in 2.34.0) [[#7470](https://github.com/plotly/plotly.js/pull/7470)], + with thanks to @my-tien for the contribution! +- Update legend maxheight calculation logic [[#7483](https://github.com/plotly/plotly.js/pull/7483)] +- Fix hover event not triggered on consecutive empty bins (count=0) with `hovermode:'x'` for histogram [[#7503](https://github.com/plotly/plotly.js/pull/7503)], with thanks to @Lexachoc for the contribution! +- Remove **form-data** nested dependency associated with [CVE-2025-7783](https://github.com/advisories/GHSA-fjxv-7rqg-78g4) [[#7514](https://github.com/plotly/plotly.js/pull/7514)], with thanks to @KyleBoyer for the contribution! + + +## [3.1.0-rc.1] -- 2025-08-01 + +### Added +- Add modebardisable attribute to cartesian axes, to allow fine control over which buttons affect which axes [[#7358](https://github.com/plotly/plotly.js/pull/7358)] +- Add `unifiedhovertitle.text` to format unified hover titles [[#7439](https://github.com/plotly/plotly.js/pull/7439)] +- Add `layout.hoverlabel.showarrow` (and `trace.hoverlabel.showarrow`) attribute to allow hiding the triangular caret that appears on the hover label box [[#7451](https://github.com/plotly/plotly.js/pull/7451)] +- Add `minorloglabels` to cartesian axes [[#7468](https://github.com/plotly/plotly.js/pull/7468)] +- Make modebar keyboard-accessible via tabbing [[#7492](https://github.com/plotly/plotly.js/pull/7492)], with thanks to @davidangarita1 for the contribution! + +### Changed +- Refactor files related to UN topojson [[#7481](https://github.com/plotly/plotly.js/pull/7481)] + +### Fixed +- Fix hidden ticklabels taking up plot space [[#7417](https://github.com/plotly/plotly.js/pull/7417)] +- Fix editable shapes (regression introduced in 2.34.0) [[#7470](https://github.com/plotly/plotly.js/pull/7470)], + with thanks to @my-tien for the contribution! + + +## [3.0.3] -- 2025-07-23 + +### Fixed + - Remove detailed description of font options [[7348](https://github.com/plotly/plotly.js/pull/7348)] + + +## [3.0.2] -- 2025-07-22 + +### Fixed + - Fix installing dependencies in node v22 [[#7381](https://github.com/plotly/plotly.js/pull/7381)], with thanks to @chaigh-uk for the contribution! + - Fix Persian calendar leap year [[#7456](https://github.com/plotly/plotly.js/pull/7456)] + - Fix scroll wheel zoom for geo subplots in Safari [[#7474](https://github.com/plotly/plotly.js/pull/7474)] + - Add method to check for WebKit WebView user agent string [[#7479](https://github.com/plotly/plotly.js/pull/7479)] + - Fix edit colorbar title [[7487](https://github.com/plotly/plotly.js/pull/7487)] + + ## [3.1.0-rc.0] -- 2025-07-15 ### Added @@ -19,7 +85,7 @@ where X.Y.Z is the semver of most recent plotly.js release. with thanks to @my-tien for the contribution! ### Changed - - Switch to United Nations (coastlines, countries, land, ocean) + Natural Earth (lakes, rivers, subunits) geodata for building topojson used in geo plot + - Switch to United Nations (coastlines, countries, land, ocean) + Natural Earth (lakes, rivers, subunits) geodata for building topojson used in geo plot [[#7393](https://github.com/plotly/plotly.js/pull/7393)] - Make 'png' all caps [[#7400](https://github.com/plotly/plotly.js/pull/7400)] ### Fixed diff --git a/CITATION.cff b/CITATION.cff index 33a3785790e..3b5efb27c47 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -9,7 +9,7 @@ authors: - family-names: "Samimi" given-names: "Mojtaba" title: "Open source Plotly charting library" -version: 3.1.0-rc.0 +version: 3.1.0 doi: 10.5281/zenodo.13964707 -date-released: 2025-07-15 +date-released: 2025-08-07 url: "https://github.com/plotly/plotly.js" diff --git a/README.md b/README.md index 56d98f8062b..d61082b8455 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo ```html
- + @@ -79,7 +79,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag. ```html ``` @@ -89,7 +89,7 @@ Fastly supports Plotly.js with free CDN service. Read more atp?1:c>=p?0:NaN}e.descending=function(c,p){return p =p.length)return S?S.call(c,N):M?N.sort(M):N;for(var W=-1,$=N.length,j=p[V++],he,_e,te,le=new b,ue;++W<$;)(ue=le.get(he=j(_e=N[W])))?ue.push(_e):le.set(he,[_e]);return E?(_e=E(),te=function(xe,Te){_e.set(xe,L(E,Te,V))}):(_e={},te=function(xe,Te){_e[xe]=L(E,Te,V)}),le.forEach(te),_e}function P(E,N){if(N>=p.length)return E;var V=[],W=x[N++];return E.forEach(function($,j){V.push({key:$,values:P(j,N)})}),W?V.sort(function($,j){return W($.key,j.key)}):V}return c.map=function(E,N){return L(N,E,0)},c.entries=function(E){return P(L(e.map,E,0),0)},c.key=function(E){return p.push(E),c},c.sortKeys=function(E){return x[p.length-1]=E,c},c.sortValues=function(E){return M=E,c},c.rollup=function(E){return S=E,c},c},e.set=function(c){var p=new O;if(c)for(var x=0,M=c.length;x =0&&(x=c.slice(0,p))!=="xmlns"&&(c=c.slice(p+1)),me.hasOwnProperty(x)?{space:me[x],local:c}:c}},ge.attr=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node();return c=e.ns.qualify(c),c.local?x.getAttributeNS(c.space,c.local):x.getAttribute(c)}for(p in c)this.each(we(p,c[p]));return this}return this.each(we(c,p))};function we(c,p){c=e.ns.qualify(c);function x(){this.removeAttribute(c)}function M(){this.removeAttributeNS(c.space,c.local)}function S(){this.setAttribute(c,p)}function L(){this.setAttributeNS(c.space,c.local,p)}function P(){var N=p.apply(this,arguments);N==null?this.removeAttribute(c):this.setAttribute(c,N)}function E(){var N=p.apply(this,arguments);N==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,N)}return p==null?c.local?M:x:typeof p=="function"?c.local?E:P:c.local?L:S}function ye(c){return c.trim().replace(/\s+/g," ")}ge.classed=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node(),M=(c=Fe(c)).length,S=-1;if(p=x.classList){for(;++S p?1:c>=p?0:NaN}e.descending=function(c,p){return p =p.length)return S?S.call(c,N):M?N.sort(M):N;for(var W=-1,$=N.length,j=p[V++],de,_e,te,oe=new b,ce;++W<$;)(ce=oe.get(de=j(_e=N[W])))?ce.push(_e):oe.set(de,[_e]);return E?(_e=E(),te=function(xe,we){_e.set(xe,L(E,we,V))}):(_e={},te=function(xe,we){_e[xe]=L(E,we,V)}),oe.forEach(te),_e}function P(E,N){if(N>=p.length)return E;var V=[],W=x[N++];return E.forEach(function($,j){V.push({key:$,values:P(j,N)})}),W?V.sort(function($,j){return W($.key,j.key)}):V}return c.map=function(E,N){return L(N,E,0)},c.entries=function(E){return P(L(e.map,E,0),0)},c.key=function(E){return p.push(E),c},c.sortKeys=function(E){return x[p.length-1]=E,c},c.sortValues=function(E){return M=E,c},c.rollup=function(E){return S=E,c},c},e.set=function(c){var p=new O;if(c)for(var x=0,M=c.length;x =0&&(x=c.slice(0,p))!=="xmlns"&&(c=c.slice(p+1)),ye.hasOwnProperty(x)?{space:ye[x],local:c}:c}},be.attr=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node();return c=e.ns.qualify(c),c.local?x.getAttributeNS(c.space,c.local):x.getAttribute(c)}for(p in c)this.each(Me(p,c[p]));return this}return this.each(Me(c,p))};function Me(c,p){c=e.ns.qualify(c);function x(){this.removeAttribute(c)}function M(){this.removeAttributeNS(c.space,c.local)}function S(){this.setAttribute(c,p)}function L(){this.setAttributeNS(c.space,c.local,p)}function P(){var N=p.apply(this,arguments);N==null?this.removeAttribute(c):this.setAttribute(c,N)}function E(){var N=p.apply(this,arguments);N==null?this.removeAttributeNS(c.space,c.local):this.setAttributeNS(c.space,c.local,N)}return p==null?c.local?M:x:typeof p=="function"?c.local?E:P:c.local?L:S}function ge(c){return c.trim().replace(/\s+/g," ")}be.classed=function(c,p){if(arguments.length<2){if(typeof c=="string"){var x=this.node(),M=(c=Ne(c)).length,S=-1;if(p=x.classList){for(;++S oe)E=E.L;else if(P=p-iN(E,x),P>oe){if(!E.R){M=E;break}E=E.R}else{L>-oe?(M=E.P,S=E):P>-oe?(M=E,S=E.N):M=S=E;break}var N=Q3(c);if(ts.insert(M,N),!(!M&&!S)){if(M===S){ns(M),S=Q3(M.site),ts.insert(N,S),N.edge=S.edge=Du(M.site,N.site),as(M),as(S);return}if(!S){N.edge=Du(M.site,N.site);return}ns(M),ns(S);var V=M.site,W=V.x,$=V.y,j=c.x-W,he=c.y-$,_e=S.site,te=_e.x-W,le=_e.y-$,ue=2*(j*le-he*te),xe=j*j+he*he,Te=te*te+le*le,ce={x:(le*xe-he*Te)/ue+W,y:(j*Te-te*xe)/ue+$};Hc(S.edge,V,_e,ce),N.edge=Du(V,c,null,ce),S.edge=Du(c,_e,null,ce),as(M),as(S)}}function $3(c,p){var x=c.site,M=x.x,S=x.y,L=S-p;if(!L)return M;var P=c.P;if(!P)return-1/0;x=P.site;var E=x.x,N=x.y,V=N-p;if(!V)return E;var W=E-M,$=1/L-1/V,j=W/V;return $?(-j+Math.sqrt(j*j-2*$*(W*W/(-2*V)-N+V/2+S-L/2)))/$+M:(M+E)/2}function iN(c,p){var x=c.N;if(x)return $3(x,p);var M=c.site;return M.y===p?M.x:1/0}function j3(c){this.site=c,this.edges=[]}j3.prototype.prepare=function(){for(var c=this.edges,p=c.length,x;p--;)x=c[p].edge,(!x.b||!x.a)&&c.splice(p,1);return c.sort(e5),c.length};function lN(c){for(var p=c[0][0],x=c[1][0],M=c[0][1],S=c[1][1],L,P,E,N,V=Wl,W=V.length,$,j,he,_e,te,le;W--;)if($=V[W],!(!$||!$.prepare()))for(he=$.edges,_e=he.length,j=0;j<_e;)le=he[j].end(),E=le.x,N=le.y,te=he[++j%_e].start(),L=te.x,P=te.y,(_(E-L)>oe||_(N-P)>oe)&&(he.splice(j,0,new Oc(cN($.site,le,_(E-p) 1)if(W>j){if(!M)M={x:(P-ue)/le,y:P};else if(M.y>=E)return;x={x:(E-ue)/le,y:E}}else{if(!M)M={x:(E-ue)/le,y:E};else if(M.y =L)return;x={x:L,y:le*L+ue}}else{if(!M)M={x:L,y:le*L+ue};else if(M.x =0?c.slice(0,p):c,M=p>=0?c.slice(p+1):"in";return x=yN.get(x)||l5,M=gN.get(M)||X,bN(M(x.apply(null,r.call(arguments,1))))};function bN(c){return function(p){return p<=0?0:p>=1?1:c(p)}}function o5(c){return function(p){return 1-c(1-p)}}function s5(c){return function(p){return .5*(p<.5?c(2*p):2-c(2-2*p))}}function xN(c){return c*c}function _N(c){return c*c*c}function wN(c){if(c<=0)return 0;if(c>=1)return 1;var p=c*c,x=p*c;return 4*(c<.5?x:3*(c-p)+x-.75)}function TN(c){return function(p){return Math.pow(p,c)}}function MN(c){return 1-Math.cos(c*ur)}function AN(c){return Math.pow(2,10*(c-1))}function kN(c){return 1-Math.sqrt(1-c*c)}function SN(c,p){var x;return arguments.length<2&&(p=.45),arguments.length?x=p/ir*Math.asin(1/c):(c=1,x=p/4),function(M){return 1+c*Math.pow(2,-10*M)*Math.sin((M-x)*ir/p)}}function CN(c){return c||(c=1.70158),function(p){return p*p*((c+1)*p-c)}}function LN(c){return c<1/2.75?7.5625*c*c:c<2/2.75?7.5625*(c-=1.5/2.75)*c+.75:c<2.5/2.75?7.5625*(c-=2.25/2.75)*c+.9375:7.5625*(c-=2.625/2.75)*c+.984375}e.interpolateHcl=qN;function qN(c,p){c=e.hcl(c),p=e.hcl(p);var x=c.h,M=c.c,S=c.l,L=p.h-x,P=p.c-M,E=p.l-S;return isNaN(P)&&(P=0,M=isNaN(M)?p.c:M),isNaN(L)?(L=0,x=isNaN(x)?p.h:x):L>180?L-=360:L<-180&&(L+=360),function(N){return Hn(x+L*N,M+P*N,S+E*N)+""}}e.interpolateHsl=DN;function DN(c,p){c=e.hsl(c),p=e.hsl(p);var x=c.h,M=c.s,S=c.l,L=p.h-x,P=p.s-M,E=p.l-S;return isNaN(P)&&(P=0,M=isNaN(M)?p.s:M),isNaN(L)?(L=0,x=isNaN(x)?p.h:x):L>180?L-=360:L<-180&&(L+=360),function(N){return Sa(x+L*N,M+P*N,S+E*N)+""}}e.interpolateLab=EN;function EN(c,p){c=e.lab(c),p=e.lab(p);var x=c.l,M=c.a,S=c.b,L=p.l-x,P=p.a-M,E=p.b-S;return function(N){return qc(x+L*N,M+P*N,S+E*N)+""}}e.interpolateRound=u5;function u5(c,p){return p-=c,function(x){return Math.round(c+p*x)}}e.transform=function(c){var p=a.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(x){if(x!=null){p.setAttribute("transform",x);var M=p.transform.baseVal.consolidate()}return new f5(M?M.matrix:RN)})(c)};function f5(c){var p=[c.a,c.b],x=[c.c,c.d],M=v5(p),S=c5(p,x),L=v5(PN(x,p,-S))||0;p[0]*x[1] 0?L=ce:(x.c=null,x.t=NaN,x=null,p.end({type:"end",alpha:L=0})):ce>0&&(p.start({type:"start",alpha:L=ce}),x=Fc(c.tick)),c):L},c.start=function(){var ce,Ve=he.length,rr=_e.length,or=M[0],ar=M[1],hr,dr;for(ce=0;ce>>1;c(p[L],x)<0?M=L+1:S=L}return M},right:function(p,x,M,S){for(arguments.length<3&&(M=0),arguments.length<4&&(S=p.length);M>>1;c(p[L],x)>0?S=L:M=L+1}return M}}}var g=m(v);e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(c){return m(c.length===1?function(p,x){return v(c(p),x)}:c)},e.shuffle=function(c,p,x){(M=arguments.length)<3&&(x=c.length,M<2&&(p=0));for(var M=x-p,S,L;M;)L=Math.random()*M--|0,S=c[M+p],c[M+p]=c[L+p],c[L+p]=S;return c},e.permute=function(c,p){for(var x=p.length,M=new Array(x);x--;)M[x]=c[p[x]];return M},e.pairs=function(c){for(var p=0,x=c.length-1,M,S=c[0],L=new Array(x<0?0:x);p0?1:c<0?-1:0}function Vr(c,p,x){return(p[0]-c[0])*(x[1]-c[1])-(p[1]-c[1])*(x[0]-c[0])}function Ct(c){return c>1?0:c<-1?Se:Math.acos(c)}function ea(c){return c>1?ur:c<-1?-ur:Math.asin(c)}function ka(c){return((c=Math.exp(c))-1/c)/2}function ra(c){return((c=Math.exp(c))+1/c)/2}function pn(c){return((c=Math.exp(2*c))-1)/(c+1)}function Ia(c){return(c=Math.sin(c/2))*c}var ta=Math.SQRT2,Ha=2,yr=4;e.interpolateZoom=function(c,p){var x=c[0],M=c[1],S=c[2],L=p[0],P=p[1],E=p[2],N=L-x,V=P-M,W=N*N+V*V,$,j;if(W>4,M=M>>4|M,S=N&240,S=S>>4|S,L=N&15,L=L<<4|L):c.length===7&&(M=(N&16711680)>>16,S=(N&65280)>>8,L=N&255)),p(M,S,L))}function jr(c,p,x){var M=Math.min(c/=255,p/=255,x/=255),S=Math.max(c,p,x),L=S-M,P,E,N=(S+M)/2;return L?(E=N<.5?L/(S+M):L/(2-S-M),c==S?P=(p-x)/L+(p>>1;c(p[L],x)<0?M=L+1:S=L}return M},right:function(p,x,M,S){for(arguments.length<3&&(M=0),arguments.length<4&&(S=p.length);M>>1;c(p[L],x)>0?S=L:M=L+1}return M}}}var g=m(v);e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(c){return m(c.length===1?function(p,x){return v(c(p),x)}:c)},e.shuffle=function(c,p,x){(M=arguments.length)<3&&(x=c.length,M<2&&(p=0));for(var M=x-p,S,L;M;)L=Math.random()*M--|0,S=c[M+p],c[M+p]=c[L+p],c[L+p]=S;return c},e.permute=function(c,p){for(var x=p.length,M=new Array(x);x--;)M[x]=c[p[x]];return M},e.pairs=function(c){for(var p=0,x=c.length-1,M,S=c[0],L=new Array(x<0?0:x);p0?1:c<0?-1:0}function Qr(c,p,x){return(p[0]-c[0])*(x[1]-c[1])-(p[1]-c[1])*(x[0]-c[0])}function Kt(c){return c>1?0:c<-1?Ce:Math.acos(c)}function qt(c){return c>1?ar:c<-1?-ar:Math.asin(c)}function yt(c){return((c=Math.exp(c))-1/c)/2}function At(c){return((c=Math.exp(c))+1/c)/2}function ua(c){return((c=Math.exp(2*c))-1)/(c+1)}function fa(c){return(c=Math.sin(c/2))*c}var zt=Math.SQRT2,Oa=2,yr=4;e.interpolateZoom=function(c,p){var x=c[0],M=c[1],S=c[2],L=p[0],P=p[1],E=p[2],N=L-x,V=P-M,W=N*N+V*V,$,j;if(W>4,M=M>>4|M,S=N&240,S=S>>4|S,L=N&15,L=L<<4|L):c.length===7&&(M=(N&16711680)>>16,S=(N&65280)>>8,L=N&255)),p(M,S,L))}function $r(c,p,x){var M=Math.min(c/=255,p/=255,x/=255),S=Math.max(c,p,x),L=S-M,P,E,N=(S+M)/2;return L?(E=N<.5?L/(S+M):L/(2-S-M),c==S?P=(p-x)/L+(p=W&&ue.x<=j&&ue.y>=$&&ue.y<=he?[[W,he],[j,he],[j,$],[W,$]]:[];xe.point=N[te]}),V}function E(N){return N.map(function(V,W){return{x:Math.round(M(V,W)/oe)*oe,y:Math.round(S(V,W)/oe)*oe,i:W}})}return P.links=function(N){return g1(E(N)).edges.filter(function(V){return V.l&&V.r}).map(function(V){return{source:N[V.l.i],target:N[V.r.i]}})},P.triangles=function(N){var V=[];return g1(E(N)).cells.forEach(function(W,$){for(var j=W.site,he=W.edges.sort(e5),_e=-1,te=he.length,le,ue,xe=he[te-1].edge,Te=xe.l===j?xe.r:xe.l;++_e0&&(R=0);break}return R>0?k.slice(0,R)+k.slice(z+1):k}var f;function v(k,q){var D=t(k,q);if(!D)return k+"";var R=D[0],z=D[1],F=z-(f=Math.max(-8,Math.min(8,Math.floor(z/3)))*3)+1,I=R.length;return F===I?R:F>I?R+new Array(F-I+1).join("0"):F>0?R.slice(0,F)+"."+R.slice(F):"0."+new Array(1-F).join("0")+t(k,Math.max(0,q+F-1))[0]}function h(k,q){var D=t(k,q);if(!D)return k+"";var R=D[0],z=D[1];return z<0?"0."+new Array(-z).join("0")+R:R.length>z+1?R.slice(0,z+1)+"."+R.slice(z+1):R+new Array(z-R.length+2).join("0")}var d={"%":function(k,q){return(k*100).toFixed(q)},b:function(k){return Math.round(k).toString(2)},c:function(k){return k+""},d:r,e:function(k,q){return k.toExponential(q)},f:function(k,q){return k.toFixed(q)},g:function(k,q){return k.toPrecision(q)},o:function(k){return Math.round(k).toString(8)},p:function(k,q){return h(k*100,q)},r:h,s:v,X:function(k){return Math.round(k).toString(16).toUpperCase()},x:function(k){return Math.round(k).toString(16)}};function m(k){return k}var g=Array.prototype.map,y=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function _(k){var q=k.grouping===void 0||k.thousands===void 0?m:n(g.call(k.grouping,Number),k.thousands+""),D=k.currency===void 0?"":k.currency[0]+"",R=k.currency===void 0?"":k.currency[1]+"",z=k.decimal===void 0?".":k.decimal+"",F=k.numerals===void 0?m:i(g.call(k.numerals,String)),I=k.percent===void 0?"%":k.percent+"",O=k.minus===void 0?"-":k.minus+"",X=k.nan===void 0?"NaN":k.nan+"";function J(H){H=o(H);var G=H.fill,Q=H.align,K=H.sign,ie=H.symbol,de=H.zero,pe=H.width,Ae=H.comma,ee=H.precision,ke=H.trim,ve=H.type;ve==="n"?(Ae=!0,ve="g"):d[ve]||(ee===void 0&&(ee=12),ke=!0,ve="g"),(de||G==="0"&&Q==="=")&&(de=!0,G="0",Q="=");var be=ie==="$"?D:ie==="#"&&/[boxX]/.test(ve)?"0"+ve.toLowerCase():"",se=ie==="$"?R:/[%p]/.test(ve)?I:"",ge=d[ve],B=/[defgprs%]/.test(ve);ee=ee===void 0?6:/[gprs]/.test(ve)?Math.max(1,Math.min(21,ee)):Math.max(0,Math.min(20,ee));function re(U){var me=be,we=se,ye,Re,Fe;if(ve==="c")we=ge(U)+we,U="";else{U=+U;var Ee=U<0||1/U<0;if(U=isNaN(U)?X:ge(Math.abs(U),ee),ke&&(U=u(U)),Ee&&+U==0&&K!=="+"&&(Ee=!1),me=(Ee?K==="("?K:O:K==="-"||K==="("?"":K)+me,we=(ve==="s"?y[8+f/3]:"")+we+(Ee&&K==="("?")":""),B){for(ye=-1,Re=U.length;++ye
>4,y[f++]=(h&15)<<4|d>>2,y[f++]=(d&3)<<6|m&63;return g};e.decode=i,e.encode=n,Object.defineProperty(e,"__esModule",{value:!0})})});var nl=Z((cie,gb)=>{"use strict";gb.exports=function(r){return window&&window.process&&window.process.versions?Object.prototype.toString.call(r)==="[object Object]":Object.prototype.toString.call(r)==="[object Object]"&&Object.getPrototypeOf(r).hasOwnProperty("hasOwnProperty")}});var an=Z(Un=>{"use strict";var iI=Y1().decode,lI=nl(),U1=Array.isArray,oI=ArrayBuffer,sI=DataView;function bb(e){return oI.isView(e)&&!(e instanceof sI)}Un.isTypedArray=bb;function uv(e){return U1(e)||bb(e)}Un.isArrayOrTypedArray=uv;function uI(e){return!uv(e[0])}Un.isArray1D=uI;Un.ensureArray=function(e,r){return U1(e)||(e=[]),e.length=r,e};var na={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};na.uint8c=na.u1c;na.uint8=na.u1;na.int8=na.i1;na.uint16=na.u2;na.int16=na.i2;na.uint32=na.u4;na.int32=na.i4;na.float32=na.f4;na.float64=na.f8;function G1(e){return e.constructor===ArrayBuffer}Un.isArrayBuffer=G1;Un.decodeTypedArraySpec=function(e){var r=[],t=fI(e),a=t.dtype,n=na[a];if(!n)throw new Error('Error in dtype: "'+a+'"');var i=n.BYTES_PER_ELEMENT,l=t.bdata;G1(l)||(l=iI(l));var o=t.shape===void 0?[l.byteLength/i]:(""+t.shape).split(",");o.reverse();var s=o.length,u,f,v=+o[0],h=i*v,d=0;if(s===1)r=new n(l);else if(s===2)for(u=+o[1],f=0;f{"use strict";var _b=Hr(),W1=an().isArrayOrTypedArray;Ab.exports=function(r,t){if(_b(t))t=String(t);else if(typeof t!="string"||t.substr(t.length-4)==="[-1]")throw"bad property string";var a=t.split("."),n,i,l,o;for(o=0;o
/g),f=0;f