@antv/g2 5.0.0-beta.1 → 5.0.0-beta.2
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.
- package/dist/g2-lite.min.js +2 -2
- package/dist/g2.min.js +2 -2
- package/esm/animation/morphing.js +10 -8
- package/esm/animation/morphing.js.map +1 -1
- package/esm/api/chart.js +2 -5
- package/esm/api/chart.js.map +1 -1
- package/esm/component/axis.d.ts +1 -2
- package/esm/component/axis.js +81 -198
- package/esm/component/axis.js.map +1 -1
- package/esm/component/legendCategory.d.ts +0 -1
- package/esm/component/legendCategory.js +36 -49
- package/esm/component/legendCategory.js.map +1 -1
- package/esm/component/legendContinuous.js +29 -19
- package/esm/component/legendContinuous.js.map +1 -1
- package/esm/component/utils.d.ts +1 -0
- package/esm/component/utils.js +3 -0
- package/esm/component/utils.js.map +1 -1
- package/esm/composition/facetRect.js +2 -4
- package/esm/composition/facetRect.js.map +1 -1
- package/esm/composition/repeatMatrix.js +2 -2
- package/esm/composition/repeatMatrix.js.map +1 -1
- package/esm/interaction/action/service/legendItemSelection.js.map +1 -1
- package/esm/interaction/action/transformer/setItemState.js.map +1 -1
- package/esm/mark/cell.js +1 -1
- package/esm/shape/area/curve.js +2 -9
- package/esm/shape/area/curve.js.map +1 -1
- package/esm/shape/interval/color.js +2 -2
- package/esm/shape/interval/color.js.map +1 -1
- package/esm/shape/line/curve.js +23 -12
- package/esm/shape/line/curve.js.map +1 -1
- package/esm/shape/line/line.js +6 -2
- package/esm/shape/line/line.js.map +1 -1
- package/esm/shape/line/smooth.js +6 -2
- package/esm/shape/line/smooth.js.map +1 -1
- package/esm/shape/text/advance.js +2 -2
- package/esm/shape/text/advance.js.map +1 -1
- package/esm/shape/utils.d.ts +1 -0
- package/esm/shape/utils.js +8 -1
- package/esm/shape/utils.js.map +1 -1
- package/esm/spec/transform.d.ts +10 -2
- package/esm/stdlib/index.js +2 -2
- package/esm/stdlib/index.js.map +1 -1
- package/esm/theme/dark.js +78 -65
- package/esm/theme/dark.js.map +1 -1
- package/esm/theme/light.js +84 -74
- package/esm/theme/light.js.map +1 -1
- package/esm/transform/groupN.js +2 -0
- package/esm/transform/groupN.js.map +1 -1
- package/esm/transform/index.d.ts +8 -6
- package/esm/transform/index.js +4 -3
- package/esm/transform/index.js.map +1 -1
- package/esm/transform/sample.d.ts +8 -0
- package/esm/transform/sample.js +48 -0
- package/esm/transform/sample.js.map +1 -0
- package/esm/transform/{Select.d.ts → select.d.ts} +0 -0
- package/esm/transform/{Select.js → select.js} +1 -1
- package/esm/transform/{Select.js.map → select.js.map} +1 -1
- package/esm/transform/{SelectX.d.ts → selectX.d.ts} +0 -0
- package/esm/transform/{SelectX.js → selectX.js} +1 -1
- package/esm/transform/{SelectX.js.map → selectX.js.map} +1 -1
- package/esm/transform/{SelectY.d.ts → selectY.d.ts} +0 -0
- package/esm/transform/{SelectY.js → selectY.js} +1 -1
- package/esm/transform/{SelectY.js.map → selectY.js.map} +1 -1
- package/esm/transform/sort.d.ts +1 -1
- package/esm/transform/sort.js +39 -21
- package/esm/transform/sort.js.map +1 -1
- package/lib/animation/morphing.js +10 -8
- package/lib/animation/morphing.js.map +1 -1
- package/lib/api/chart.js +2 -5
- package/lib/api/chart.js.map +1 -1
- package/lib/component/axis.d.ts +1 -2
- package/lib/component/axis.js +80 -197
- package/lib/component/axis.js.map +1 -1
- package/lib/component/legendCategory.d.ts +0 -1
- package/lib/component/legendCategory.js +36 -49
- package/lib/component/legendCategory.js.map +1 -1
- package/lib/component/legendContinuous.js +29 -19
- package/lib/component/legendContinuous.js.map +1 -1
- package/lib/component/utils.d.ts +1 -0
- package/lib/component/utils.js +5 -1
- package/lib/component/utils.js.map +1 -1
- package/lib/composition/facetRect.js +2 -4
- package/lib/composition/facetRect.js.map +1 -1
- package/lib/composition/repeatMatrix.js +2 -2
- package/lib/composition/repeatMatrix.js.map +1 -1
- package/lib/interaction/action/service/legendItemSelection.js.map +1 -1
- package/lib/interaction/action/transformer/setItemState.js.map +1 -1
- package/lib/mark/cell.js +1 -1
- package/lib/shape/area/curve.js +2 -9
- package/lib/shape/area/curve.js.map +1 -1
- package/lib/shape/interval/color.js +2 -2
- package/lib/shape/interval/color.js.map +1 -1
- package/lib/shape/line/curve.js +21 -10
- package/lib/shape/line/curve.js.map +1 -1
- package/lib/shape/line/line.js +5 -1
- package/lib/shape/line/line.js.map +1 -1
- package/lib/shape/line/smooth.js +5 -1
- package/lib/shape/line/smooth.js.map +1 -1
- package/lib/shape/text/advance.js +2 -2
- package/lib/shape/text/advance.js.map +1 -1
- package/lib/shape/utils.d.ts +1 -0
- package/lib/shape/utils.js +9 -1
- package/lib/shape/utils.js.map +1 -1
- package/lib/spec/transform.d.ts +10 -2
- package/lib/stdlib/index.js +1 -1
- package/lib/stdlib/index.js.map +1 -1
- package/lib/theme/dark.js +78 -65
- package/lib/theme/dark.js.map +1 -1
- package/lib/theme/light.js +84 -74
- package/lib/theme/light.js.map +1 -1
- package/lib/transform/groupN.js +2 -0
- package/lib/transform/groupN.js.map +1 -1
- package/lib/transform/index.d.ts +8 -6
- package/lib/transform/index.js +9 -7
- package/lib/transform/index.js.map +1 -1
- package/lib/transform/sample.d.ts +8 -0
- package/lib/transform/sample.js +52 -0
- package/lib/transform/sample.js.map +1 -0
- package/lib/transform/{Select.d.ts → select.d.ts} +0 -0
- package/lib/transform/{Select.js → select.js} +1 -1
- package/lib/transform/{Select.js.map → select.js.map} +1 -1
- package/lib/transform/{SelectX.d.ts → selectX.d.ts} +0 -0
- package/lib/transform/{SelectX.js → selectX.js} +1 -1
- package/lib/transform/{SelectX.js.map → selectX.js.map} +1 -1
- package/lib/transform/{SelectY.d.ts → selectY.d.ts} +0 -0
- package/lib/transform/{SelectY.js → selectY.js} +1 -1
- package/lib/transform/{SelectY.js.map → selectY.js.map} +1 -1
- package/lib/transform/sort.d.ts +1 -1
- package/lib/transform/sort.js +38 -20
- package/lib/transform/sort.js.map +1 -1
- package/package.json +3 -3
- package/src/animation/morphing.ts +12 -8
- package/src/api/chart.ts +2 -5
- package/src/component/axis.ts +233 -310
- package/src/component/legendCategory.ts +52 -68
- package/src/component/legendContinuous.ts +24 -25
- package/src/component/utils.ts +4 -0
- package/src/composition/facetRect.ts +2 -4
- package/src/composition/repeatMatrix.ts +2 -2
- package/src/interaction/action/service/legendItemSelection.ts +1 -2
- package/src/interaction/action/transformer/setItemState.ts +2 -3
- package/src/mark/cell.ts +1 -1
- package/src/shape/area/curve.ts +7 -9
- package/src/shape/interval/color.ts +7 -7
- package/src/shape/line/curve.ts +27 -12
- package/src/shape/line/line.ts +6 -2
- package/src/shape/line/smooth.ts +11 -2
- package/src/shape/text/advance.ts +2 -2
- package/src/shape/utils.ts +8 -1
- package/src/spec/transform.ts +10 -1
- package/src/stdlib/index.ts +2 -0
- package/src/theme/dark.ts +78 -66
- package/src/theme/light.ts +84 -75
- package/src/transform/groupN.ts +2 -0
- package/src/transform/index.ts +8 -6
- package/src/transform/sample.ts +45 -0
- package/src/transform/sort.ts +53 -21
package/dist/g2-lite.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g"),require("@antv/g-canvas")):"function"==typeof define&&define.amd?define(["exports","@antv/g","@antv/g-canvas"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={},t.window.G,t.window.G.Canvas2D)}(this,function(g,F,v){"use strict";const k="main-layer",tt="label-layer",et="element",C="view",nt="plot",rt="component",it="label",at="area";var L=1e-6,O="undefined"!=typeof Float32Array?Float32Array:Array;function j(){var t=new O(9);return O!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var z=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],f=n[0],h=n[1],d=n[2],p=n[3],y=n[4],g=n[5],m=n[6],v=n[7],n=n[8];return t[0]=f*r+h*o+d*c,t[1]=f*i+h*s+d*u,t[2]=f*a+h*l+d*e,t[3]=p*r+y*o+g*c,t[4]=p*i+y*s+g*u,t[5]=p*a+y*l+g*e,t[6]=m*r+v*o+n*c,t[7]=m*i+v*s+n*u,t[8]=m*a+v*l+n*e,t};function W(){var t=new O(16);return O!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function H(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function V(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y,g){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=y,t[15]=g,t}function G(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function q(t,e){var n,r,i,a,o,s;return t===e?(n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s):(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]),t}function Y(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],y=e[13],g=e[14],e=e[15],m=n*s-r*o,v=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,M=i*c-a*l,k=u*y-f*p,O=u*g-h*p,_=u*e-d*p,S=f*g-h*y,E=f*e-d*y,A=h*e-d*g,P=m*A-v*E+b*S+x*_-w*O+M*k;return P?(t[0]=(s*A-l*E+c*S)*(P=1/P),t[1]=(i*E-r*A-a*S)*P,t[2]=(y*M-g*w+e*x)*P,t[3]=(h*w-f*M-d*x)*P,t[4]=(l*_-o*A-c*O)*P,t[5]=(n*A-i*_+a*O)*P,t[6]=(g*b-p*M-e*v)*P,t[7]=(u*M-h*b+d*v)*P,t[8]=(o*E-s*_+c*k)*P,t[9]=(r*_-n*E-a*k)*P,t[10]=(p*w-y*b+e*m)*P,t[11]=(f*b-u*w-d*m)*P,t[12]=(s*O-o*S-l*k)*P,t[13]=(n*S-r*O+i*k)*P,t[14]=(y*v-p*x-g*m)*P,t[15]=(u*x-f*v+h*m)*P,t):null}function U(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],y=t[14],t=t[15];return(e*o-n*a)*(f*t-h*y)-(e*s-r*a)*(u*t-h*p)+(e*l-i*a)*(u*y-f*p)+(n*s-r*o)*(c*t-h*d)-(n*l-i*o)*(c*y-f*d)+(r*l-i*s)*(c*p-u*d)}function X(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],y=e[12],g=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];return t[0]=v*r+b*s+x*f+w*y,t[1]=v*i+b*l+x*h+w*g,t[2]=v*a+b*c+x*d+w*m,t[3]=v*o+b*u+x*p+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*f+w*y,t[5]=v*i+b*l+x*h+w*g,t[6]=v*a+b*c+x*d+w*m,t[7]=v*o+b*u+x*p+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*f+w*y,t[9]=v*i+b*l+x*h+w*g,t[10]=v*a+b*c+x*d+w*m,t[11]=v*o+b*u+x*p+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*f+w*y,t[13]=v*i+b*l+x*h+w*g,t[14]=v*a+b*c+x*d+w*m,t[15]=v*o+b*u+x*p+w*e,t}function $(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,y=n[0],g=n[1],n=n[2];return e===t?(t[12]=e[0]*y+e[4]*g+e[8]*n+e[12],t[13]=e[1]*y+e[5]*g+e[9]*n+e[13],t[14]=e[2]*y+e[6]*g+e[10]*n+e[14],t[15]=e[3]*y+e[7]*g+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*y+s*g+f*n+e[12],t[13]=i*y+l*g+h*n+e[13],t[14]=a*y+c*g+d*n+e[14],t[15]=o*y+u*g+p*n+e[15]),t}function Z(t,e,n){var r=n[0],i=n[1],n=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ot(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*n+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+f*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=f*n-s*r,t}function st(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-f*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+f*n,t}function lt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function ct(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,f=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(f+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function ut(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function ft(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function ht(t,e){var n=new O(3),r=(ft(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,f=0;return 0<n?(f=2*Math.sqrt(1+n),t[3]=.25*f,t[0]=(u-i)/f,t[1]=(r-s)/f,t[2]=(o-l)/f):c<a&&e<a?(f=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/f,t[0]=.25*f,t[1]=(o+l)/f,t[2]=(r+s)/f):e<c?(f=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/f,t[0]=(o+l)/f,t[1]=.25*f,t[2]=(u+i)/f):(f=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/f,t[0]=(r+s)/f,t[1]=(u+i)/f,t[2]=.25*f),t}function dt(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],l=a+a,c=o+o,u=s+s,f=a*l,h=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],y=i[0],g=i[1],i=i[2],m=(1-(d+s))*u,v=(h+e)*u,u=(a-c)*u,h=(h-e)*p,e=(1-(f+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(f+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=h,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=c,t[11]=0,t[12]=n[0]+y-(m*y+h*g+p*i),t[13]=n[1]+g-(v*y+e*g+a*i),t[14]=n[2]+i-(u*y+s*g+c*i),t[15]=1,t}function pt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function yt(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function gt(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var mt=gt;function vt(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],f=r[1],r=r[2],h=n[0],d=n[1],n=n[2];return Math.abs(l-h)<L&&Math.abs(c-d)<L&&Math.abs(e-n)<L?G(t):(h=l-h,d=c-d,n=e-n,i=f*(n*=s=1/Math.hypot(h,d,n))-r*(d*=s),r=r*(h*=s)-u*n,u=u*d-f*h,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,f=d*u-n*r,a=n*i-h*u,o=h*r-d*i,(s=Math.hypot(f,a,o))?(f*=s=1/s,a*=s,o*=s):o=a=f=0,t[0]=i,t[1]=f,t[2]=h,t[3]=0,t[4]=r,t[5]=a,t[6]=d,t[7]=0,t[8]=u,t[9]=o,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(f*l+a*c+o*e),t[14]=-(h*l+d*c+n*e),t[15]=1,t)}function bt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var xt=Object.freeze({__proto__:null,create:W,clone:function(t){var e=new O(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:H,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y){var g=new O(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=a,g[6]=o,g[7]=s,g[8]=l,g[9]=c,g[10]=u,g[11]=f,g[12]=h,g[13]=d,g[14]=p,g[15]=y,g},set:V,identity:G,transpose:q,invert:Y,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],y=e[13],g=e[14],e=e[15];return t[0]=s*(h*e-d*g)-f*(l*e-c*g)+y*(l*d-c*h),t[1]=-(r*(h*e-d*g)-f*(i*e-a*g)+y*(i*d-a*h)),t[2]=r*(l*e-c*g)-s*(i*e-a*g)+y*(i*c-a*l),t[3]=-(r*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*e-d*g)-u*(l*e-c*g)+p*(l*d-c*h)),t[5]=n*(h*e-d*g)-u*(i*e-a*g)+p*(i*d-a*h),t[6]=-(n*(l*e-c*g)-o*(i*e-a*g)+p*(i*c-a*l)),t[7]=n*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*e-d*y)-u*(s*e-c*y)+p*(s*d-c*f),t[9]=-(n*(f*e-d*y)-u*(r*e-a*y)+p*(r*d-a*f)),t[10]=n*(s*e-c*y)-o*(r*e-a*y)+p*(r*c-a*s),t[11]=-(n*(s*d-c*f)-o*(r*d-a*f)+u*(r*c-a*s)),t[12]=-(o*(f*g-h*y)-u*(s*g-l*y)+p*(s*h-l*f)),t[13]=n*(f*g-h*y)-u*(r*g-i*y)+p*(r*h-i*f),t[14]=-(n*(s*g-l*y)-o*(r*g-i*y)+p*(r*l-i*s)),t[15]=n*(s*h-l*f)-o*(r*h-i*f)+u*(r*l-i*s),t},determinant:U,multiply:X,translate:$,scale:Z,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,f,h,d,p,y,g,m,v,b,x,w,M,k,O=r[0],_=r[1],r=r[2],S=Math.hypot(O,_,r);return S<L?null:(O*=S=1/S,_*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7],d=e[8],p=e[9],y=e[10],g=e[11],v=O*_*(i=1-n)-r*S,b=_*_*i+n,x=r*_*i+O*S,w=O*r*i+_*S,M=_*r*i-O*S,k=r*r*i+n,t[0]=a*(n=O*O*i+n)+c*(m=_*O*i+r*S)+d*(r=r*O*i-_*S),t[1]=o*n+u*m+p*r,t[2]=s*n+f*m+y*r,t[3]=l*n+h*m+g*r,t[4]=a*v+c*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+f*b+y*x,t[7]=l*v+h*b+g*x,t[8]=a*w+c*M+d*k,t[9]=o*w+u*M+p*k,t[10]=s*w+f*M+y*k,t[11]=l*w+h*M+g*k,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:ot,rotateY:st,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+f*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=f*n-s*r,t},fromTranslation:lt,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<L?null:(i*=o=1/o,a*=o,n*=o,o=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=a*i*r+n*o,t[2]=n*i*r-a*o,t[3]=0,t[4]=i*a*r-n*o,t[5]=a*a*r+e,t[6]=n*a*r+i*o,t[7]=0,t[8]=i*n*r+a*o,t[9]=a*n*r-i*o,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:ct,fromQuat2:function(t,e){var n=new O(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=r*r+i*i+a*a+o*o;return 0<f?(n[0]=2*(s*o+u*r+l*a-c*i)/f,n[1]=2*(l*o+u*i+c*r-s*a)/f,n[2]=2*(c*o+u*a+s*i-l*r)/f):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),ct(t,e,n),t},getTranslation:ut,getScaling:ft,getRotation:ht,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(f=a+a),i=i*(h=o+o),c=a*f,a=a*h,o=o*h,u=e*u,f=e*f,e=e*h,h=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*h,t[1]=(l+e)*h,t[2]=(i-f)*h,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+f)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:dt,fromQuat:pt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:yt,perspective:yt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:gt,ortho:mt,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:vt,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,f=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=f*f+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(f*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=f,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*f-l*o,t[6]=l*r-c*f,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:bt,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],h=t[10],d=t[11],p=t[12],y=t[13],g=t[14],t=t[15],m=e[0],v=e[1],b=e[2],x=e[3],w=e[4],M=e[5],k=e[6],O=e[7],_=e[8],S=e[9],E=e[10],A=e[11],P=e[12],N=e[13],T=e[14],e=e[15];return Math.abs(n-m)<=L*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=L*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=L*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=L*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=L*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-M)<=L*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(l-k)<=L*Math.max(1,Math.abs(l),Math.abs(k))&&Math.abs(c-O)<=L*Math.max(1,Math.abs(c),Math.abs(O))&&Math.abs(u-_)<=L*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(f-S)<=L*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-E)<=L*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-A)<=L*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-P)<=L*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(y-N)<=L*Math.max(1,Math.abs(y),Math.abs(N))&&Math.abs(g-T)<=L*Math.max(1,Math.abs(g),Math.abs(T))&&Math.abs(t-e)<=L*Math.max(1,Math.abs(t),Math.abs(e))},mul:X,sub:bt});function m(){var t=new O(3);return O!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function wt(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function b(t,e,n){var r=new O(3);return r[0]=t,r[1]=e,r[2]=n,r}function Mt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function kt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Ot(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function _t(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function St(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Et(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function At(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Pt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[0],o=n[1],n=n[2];t[0]=i*n-e*o,t[1]=e*a-r*n,t[2]=r*o-i*a}function Nt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/a,t}function Tt(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function Lt(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],a=e[1],e=e[2];return Math.abs(n-i)<=L*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=L*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=L*Math.max(1,Math.abs(t),Math.abs(e))}var Ct=_t,jt=wt;function Ft(){var t=new O(4);return O!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function It(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*e,t}function Rt(){var t=new O(4);return O!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Bt(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Dt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function zt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e,a=a?1/a:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=e*a,t}function Wt(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),a=Math.sin(n),n=Math.cos(n),o=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*a*o,t[1]=e*a*r+i*n*o,t[2]=e*n*o-i*a*r,t[3]=e*n*r+i*a*o}m(),Ft();var Ht=function(t,e,n,r){var i=new O(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},Vt=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},Gt=Dt,qt=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e;return 0<a&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=e*a,t};function Yt(t,e){var n=new O(2);return n[0]=t,n[1]=e,n}function Ut(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Xt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function $t(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function Zt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Kt(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function Jt(t,e){var n=e[0],r=e[1],n=n*n+r*r;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t}m(),b(1,0,0),b(0,1,0),Rt(),Rt(),j();var Qt=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function te(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}e=new O(2),O!=Float32Array&&(e[0]=0,e[1]=0);var ee=function(t,e){return(ee=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ee(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var _=function(){return(_=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function K(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function t(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}function ne(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function R(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function re(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}var ie={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var ae={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function oe(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return ae[e]===t.length-1&&"achlmqstvz".includes(e)})}function se(t){return oe(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function le(t){return se(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function ce(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=ae[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,ae[n]))),ae[n]););}function ue(t){return 48<=t&&t<=57}function fe(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function he(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=ae[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,fe(t),t.data=[],u)for(;;){for(var f=u;0<f;--f){if(97!=(32|c)||3!==f&&4!==f?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(ue(n=43!==(n=i.charCodeAt(o))&&45!==n?n:i.charCodeAt(o+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(o+=1),e&&o<r&&n&&ue(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&ue(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;ue(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&ue(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&ue(i.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(a,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" is not a number'}(t):(a=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(a=i.charCodeAt(r))?(n.param=0,n.index+=1):49===a?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),fe(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,fe(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}ce(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var de=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function pe(t){var o,s,l,c;return se(t)?te(t):(t=function(t){if(oe(t))return te(t);var e=new de(t);for(fe(e);e.index<e.max&&!e.err.length;)he(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function ye(t){if(le(t))return te(t);for(var e,n,r,i,a,o,s,l=pe(t),c=_({},ie),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=h=a=f=i=r=void 0,r=e[0],i=n.x1,f=n.y1,a=n.x2,h=n.y2,o=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],f]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*f-h,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(h=2*i-n.qx,a=2*f-n.qy,s=["Q",n.qx=h,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var f=l[u],h=f.length;c.x1=+f[h-2],c.y1=+f[h-1],c.x2=+f[h-4]||c.x1,c.y2=+f[h-3]||c.y1}return l}function ge(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function me(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function ve(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function be(t,e,n,r,i){var a=ve([t,e],[n,r]),o={x:0,y:0};return{length:a,point:o="number"==typeof i?i<=0?{x:t,y:e}:a<=i?{x:n,y:r}:{x:(i=me([t,e],[n,r],i/a))[0],y:i[1]}:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function xe(t,e,n,r){var t=[t,e],e=[n,r],i=me(t,e,.5),e=me(e,i,.5),a=me(i,e,.5),o=me(e,a,.5),s=me(a,o,.5),t=be(t[0],t[1],i[0],i[1],a[0]).point,i=be(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function we(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],f=c[1],h=e.x1,d=e.y1,p=e.x,y=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=f,t;case"A":return s=[h,d].concat(c),["C"].concat(function t(e,n,r,i,a,o,s,l,c,u){var f=120*Math.PI/180,h=Math.PI/180*(+a||0),d=[],p=(u?(x=u[0],w=u[1],v=u[2],b=u[3]):(e=(g=ge(e,n,-h)).x,n=g.y,1<(p=(y=(e-(l=(g=ge(l,c,-h)).x))/2)*y/(r*r)+(g=(n-(c=g.y))/2)*g/(i*i))&&(r*=p=Math.sqrt(p),i*=p),p=r*r,m=i*i,v=(o=(o===s?-1:1)*Math.sqrt(Math.abs((p*m-p*g*g-m*y*y)/(p*g*g+m*y*y))))*r*g/i+(e+l)/2,b=o*-i*y/r+(n+c)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((c-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),x=e<v?Math.PI-x:x,w=l<v?Math.PI-w:w,x<0&&(x=2*Math.PI+x),w<0&&(w=2*Math.PI+w),s&&w<x&&(x-=2*Math.PI),!s&&x<w&&(w-=2*Math.PI)),w-x),y=(Math.abs(p)>f&&(m=w,g=l,o=c,w=x+f*(s&&x<w?1:-1),d=t(l=v+r*Math.cos(w),c=b+i*Math.sin(w),r,i,a,0,s,g,o,[w,m,v,b])),p=w-x,Math.cos(x)),f=Math.sin(x),a=Math.cos(w),s=Math.sin(w),g=Math.tan(p/4),o=4/3*r*g,m=4/3*i*g,v=[e,n],b=[e+o*f,n-m*y],x=[l+o*s,c-m*a],w=[l,c];if(b[0]=2*v[0]-b[0],b[1]=2*v[1]-b[1],u)return b.concat(x,w,d);for(var M=[],k=0,O=(d=b.concat(x,w,d)).length;k<O;k+=1)M[k]=k%2?ge(d[k-1],d[k],h).y:ge(d[k],d[k+1],h).x;return M}(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=f,s=[h,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(xe(h,d,u,f));case"Z":return h===p&&d===y?["C",h,d,p,y,p,y]:["C"].concat(xe(h,d,p,y))}return t}function Me(t,e){var n;if(void 0===e&&(e=!1),le(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=te(t),e?[n,[]]:n;for(var r,i=ye(t),a=_({},ie),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var f=we(i[u],a),h=(i[u]=f,g=y=p=d=h=void 0,i),d=o,p=u;if(7<h[p].length){h[p].shift();for(var y=h[p],g=p;y.length;)d[p]="A",h.splice(g+=1,0,["C"].concat(y.splice(0,6)));h.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(f=i[u]).length,a.x1=+f[r-2],a.y1=+f[r-1],a.x2=+f[r-4]||a.x1,a.y2=+f[r-3]||a.y1}return e?[i,c]:i}function ke(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,f=void 0===u||u,u=c.length,h=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,y=t,g=e,m=0,v=[y,g,m],b=[y,g],x={x:0,y:0},w=[{x:y,y:g}];p&&l<=0&&(x={x:y,y:g});for(var M,k,O,_,S,E,A,P,N,T,L=0;L<=d;L+=1)M=t,k=e,O=n,_=r,S=i,E=a,A=o,P=s,T=void 0,T=1-(N=L/d),y=(M={x:Math.pow(T,3)*M+3*Math.pow(T,2)*N*O+3*T*Math.pow(N,2)*S+Math.pow(N,3)*A,y:Math.pow(T,3)*k+3*Math.pow(T,2)*N*_+3*T*Math.pow(N,2)*E+Math.pow(N,3)*P}).x,g=M.y,f&&w.push({x:y,y:g}),h&&(m+=ve(b,[y,g])),b=[y,g],p&&l<=m&&l>v[2]&&(O=(m-l)/(m-v[2]),x={x:b[0]*(1-O)+v[0]*O,y:b[1]*(1-O)+v[1]*O}),v=[y,g,m];return{length:m,point:x=p&&m<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function Oe(t){return(c=l=s=0)<=Me(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function _e(t){return t.map(function(t,e,n){var r,i,a,o,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?ke(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),a=e.slice(4,6),e=e.slice(6,8),n=me(n,i,r),i=me(i,a,r),a=me(a,e,r),o=me(n,i,r),i=me(i,a,r),r=me(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}function Se(t){return Array.isArray?Array.isArray(t):Ne(t,"Array")}function Ee(t){var e=typeof t;return null!==t&&"object"==e||"function"==e}var Ae=function(t){return null==t},Pe={}.toString,Ne=function(t,e){return Pe.call(t)==="[object "+e+"]"},Te=function(t){if(Se(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},Le=function(t){if(Se(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},Ce=function(t){return Ne(t,"String")},je=function(t,e,n){return t<e?e:n<t?n:t},Fe=function(t){return Ne(t,"Number")};function Ie(a,o){if("function"!=typeof a)throw new TypeError("Expected a function");function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}return s.cache=new Map,s}var Re=function(t,e){return(t%e+e)%e},Be=function(t){return Ne(t,"Boolean")},De=function(t){return void 0===t};function ze(t,e,n){(t.prototype=e.prototype=n).constructor=t}function We(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function He(){}var e="\\s*([+-]?\\d+)\\s*",Ve="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ge=/^#([0-9a-f]{3,8})$/,qe=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),Ye=new RegExp("^rgb\\("+[n,n,n]+"\\)$"),Ue=new RegExp("^rgba\\("+[e,e,e,Ve]+"\\)$"),Xe=new RegExp("^rgba\\("+[n,n,n,Ve]+"\\)$"),$e=new RegExp("^hsl\\("+[Ve,n,n]+"\\)$"),Ze=new RegExp("^hsla\\("+[Ve,n,n,Ve]+"\\)$"),Ke={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 Je(){return this.rgb().formatHex()}function Qe(){return this.rgb().formatRgb()}function tn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ge.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?en(e):3===n?new rn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?nn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?nn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=qe.exec(t))?new rn(e[1],e[2],e[3],1):(e=Ye.exec(t))?new rn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ue.exec(t))?nn(e[1],e[2],e[3],e[4]):(e=Xe.exec(t))?nn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=$e.exec(t))?ln(e[1],e[2]/100,e[3]/100,1):(e=Ze.exec(t))?ln(e[1],e[2]/100,e[3]/100,e[4]):Ke.hasOwnProperty(t)?en(Ke[t]):"transparent"===t?new rn(NaN,NaN,NaN,0):null}function en(t){return new rn(t>>16&255,t>>8&255,255&t,1)}function nn(t,e,n,r){return new rn(t=r<=0?e=n=NaN:t,e,n,r)}function rn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function an(){return"#"+sn(this.r)+sn(this.g)+sn(this.b)}function on(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function sn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ln(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new un(t,e,n,r)}function cn(t){var e,n,r,i,a,o,s,l;return t instanceof un?new un(t.h,t.s,t.l,t.opacity):(t=t instanceof He?t:tn(t))?t instanceof un?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new un(o,s,l,t.opacity)):new un}function un(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function fn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function hn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function dn(t,e){return Math.abs(t-e)<.001}function pn(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function yn(t){return(t+2*Math.PI)%(2*Math.PI)}ze(He,tn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Je,formatHex:Je,formatHsl:function(){return cn(this).formatHsl()},formatRgb:Qe,toString:Qe}),ze(rn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof He?i:tn(i))?new rn((i=i.rgb()).r,i.g,i.b,i.opacity):new rn:new rn(t,e,n,null==r?1:r);var i},We(He,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new rn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new rn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:an,formatHex:an,formatRgb:on,toString:on})),ze(un,function(t,e,n,r){return 1===arguments.length?cn(t):new un(t,e,n,null==r?1:r)},We(He,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new un(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new un(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new rn(fn(240<=t?t-240:120+t,n,e),fn(t,n,e),fn(t<120?240+t:t-120,n,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var gn={box:function(t,e,n,r){return pn([t,n],[e,r])},length:hn,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?hn(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?hn(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){var o,n=[n-t,r-e];return(r=n)[0]===(o=[0,0])[0]&&r[1]===o[1]?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(Jt(r=[-n[1],n[0]],r),o=[i-t,a-e],Math.abs(o[0]*r[0]+o[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function mn(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),f=u/10,h=0;h<=c;h++){var d=h*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=hn(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,y=0;y<32&&!(f<1e-4);y++){var g=o-f,m=o+f,v=[i.apply(void 0,t.concat([g])),i.apply(void 0,e.concat([g]))],v=hn(l[0],l[1],v[0],v[1]);0<=g&&v<s?(o=g,s=v):(g=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=hn(l[0],l[1],g[0],g[1]),m<=1&&v<s?(o=m,s=v):f*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function vn(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function bn(t,e,n){n=t+n-2*e;return dn(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function xn(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function wn(t,e,n,r,i,a,o){var s=vn(t,n,i,o),l=vn(e,r,a,o),c=gn.pointAt(t,e,n,r,o),n=gn.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function Mn(t,e,n,r,i,a,o){return 0===o?(hn(t,e,n,r)+hn(n,r,i,a)+hn(t,e,i,a))/2:(e=(t=wn(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),Mn.apply(void 0,e)+Mn.apply(void 0,n))}var kn={box:function(t,e,n,r,i,a){var o=bn(t,n,i)[0],s=bn(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(vn(t,n,i,o)),void 0!==s&&c.push(vn(e,r,a,s)),pn(l,c)},length:function(t,e,n,r,i,a){return Mn(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return mn([t,n,i],[e,r,a],o,s,vn)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return hn(t.x,t.y,o,s)},interpolationAt:vn,pointAt:function(t,e,n,r,i,a,o){return{x:vn(t,n,i,o),y:vn(e,r,a,o)}},divide:wn,tangentAngle:function(t,e,n,r,i,a,o){t=xn(t,n,i,o),n=xn(e,r,a,o);return yn(Math.atan2(n,t))}};function On(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function _n(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function Sn(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return dn(r,0)?dn(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):dn(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function En(t,e,n,r,i,a,o,s,l){var c=On(t,n,i,o,l),u=On(e,r,a,s,l),f=gn.pointAt(t,e,n,r,l),n=gn.pointAt(n,r,i,a,l),r=gn.pointAt(i,a,o,s,l),i=gn.pointAt(f.x,f.y,n.x,n.y,l),a=gn.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,f.x,f.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function An(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],f=0,h=c.length,d=0;d<h;d++)f+=hn(c[d],u[d],c[(d+1)%h],u[(d+1)%h]);return f/2}t=En(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return An.apply(void 0,e)+An.apply(void 0,n)}var Pn={extrema:Sn,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=Sn(t,n,i,o),f=Sn(e,r,a,s),h=0;h<u.length;h++)l.push(On(t,n,i,o,u[h]));for(var d=0;d<f.length;d++)c.push(On(e,r,a,s,f[d]));return pn(l,c)},length:function(t,e,n,r,i,a,o,s){return An(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return mn([t,n,i,o],[e,r,a,s],l,c,On,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return hn(t.x,t.y,l,c)},interpolationAt:On,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:On(t,n,i,o,l),y:On(e,r,a,s,l)}},divide:En,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=_n(t,n,i,o,l),n=_n(e,r,a,s,l);return yn(Math.atan2(n,t))}};function Nn(t,e){t=Math.abs(t);return 0<e?t:-1*t}var Tn=function(t,e,n,r,i,a){var o=n,s=r;if(0===o||0===s)return{x:t,y:e};for(var n=i-t,r=a-e,l=Math.abs(n),c=Math.abs(r),u=o*o,f=s*s,h=Math.PI/4,d=0,p=0,y=0;y<4;y++){var d=o*Math.cos(h),p=s*Math.sin(h),g=(u-f)*Math.pow(Math.cos(h),3)/o,m=(f-u)*Math.pow(Math.sin(h),3)/s,v=d-g,b=p-m,g=l-g,m=c-m,x=Math.hypot(b,v),w=Math.hypot(m,g);h+=x*Math.asin((v*m-b*g)/(x*w))/Math.sqrt(u+f-d*d-p*p),h=Math.min(Math.PI/2,Math.max(0,h))}return{x:t+Nn(d,n),y:e+Nn(p,r)}};function Ln(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function Cn(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function jn(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function Fn(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var In={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var h=s+f;a<o?a<h&&h<o&&u.push(h):o<h&&h<a&&u.push(h)}for(var d=0;d<u.length;d++){var p=Ln(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var y=Math.atan(r/(n*Math.tan(i))),g=1/0,m=-1/0,v=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=y+b;a<o?a<x&&x<o&&v.push(x):o<x&&x<a&&v.push(x)}for(var w=0;w<v.length;w++){var M=Cn(0,e,n,r,i,v[w]);M<g&&(g=M),m<M&&(m=M)}return{x:l,y:g,width:c-l,height:m-g}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=Fn(s-t,l-e,-i),l=s[0],s=s[1],l=Tn(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=jn(n,r,a):o<c&&(l=jn(n,r,o)),Fn(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return hn(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:Ln(t,0,n,r,i,o),y:Cn(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return yn(Math.atan2(i,s))}};function Rn(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=hn(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var Bn,Dn,zn={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return pn(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],a=e[r+1];n+=hn(i[0],i[1],a[0],a[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=Rn(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=gn.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=gn.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=Rn(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function Wn(){}function Hn(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Vn(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new Hn(n,r||t,i),r=Dn?Dn+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function Gn(t,e){0==--t._eventsCount?t._events=new Wn:delete t._events[e]}function qn(){this._events=new Wn,this._eventsCount=0}n=e,Bn=Object.prototype.hasOwnProperty,Dn="~",Object.create&&(Wn.prototype=Object.create(null),(new Wn).__proto__||(Dn=!1)),qn.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)Bn.call(t,e)&&n.push(Dn?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},qn.prototype.listeners=function(t){var t=Dn?Dn+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},qn.prototype.listenerCount=function(t){t=Dn?Dn+t:t,t=this._events[t];return t?t.fn?1:t.length:0},qn.prototype.emit=function(t,e,n,r,i,a){var o=Dn?Dn+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(h=1,s=new Array(c-1);h<c;h++)s[h-1]=arguments[h];l.fn.apply(l.context,s)}else for(var u,f=l.length,h=0;h<f;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,n);break;case 4:l[h].fn.call(l[h].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[h].fn.apply(l[h].context,s)}return!0},qn.prototype.on=function(t,e,n){return Vn(this,t,e,n,!1)},qn.prototype.once=function(t,e,n){return Vn(this,t,e,n,!0)},qn.prototype.removeListener=function(t,e,n,r){t=Dn?Dn+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||Gn(this,t);else{for(var a=0,o=[],s=i.length;a<s;a++)(i[a].fn!==e||r&&!i[a].once||n&&i[a].context!==n)&&o.push(i[a]);o.length?this._events[t]=1===o.length?o[0]:o:Gn(this,t)}}else Gn(this,t);return this},qn.prototype.removeAllListeners=function(t){return t?(t=Dn?Dn+t:t,this._events[t]&&Gn(this,t)):(this._events=new Wn,this._eventsCount=0),this},qn.prototype.off=qn.prototype.removeListener,qn.prototype.addListener=qn.prototype.on,qn.prefixed=Dn,n.exports=qn.EventEmitter=qn;var Yn=e.exports,Ve="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};let Un=1;const Xn="object"==typeof self&&self.self==self?self:"object"==typeof Ve&&Ve.global==Ve?Ve:{},$n=Date.now();let Zn={},Kn=Date.now();const Jn=t=>"string"!=typeof t?t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const n=Date.now(),e=n-Kn,r=16<e?0:16-e,i=Un++;return Zn[i]=t,1<Object.keys(Zn).length||setTimeout(()=>{Kn=n;const e=Zn;Zn={},Object.keys(e).forEach(t=>e[t](Xn.performance&&"function"==typeof Xn.performance.now?Xn.performance.now():Date.now()-$n))},r),i}:""===t?Xn.requestAnimationFrame:Xn[t+"RequestAnimationFrame"],Qn=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],t=>!!Jn(t)),tr=Jn(Qn),er="string"!=typeof(n=Qn)?t=>{delete Zn[t]}:""===n?Xn.cancelAnimationFrame:Xn[n+"CancelAnimationFrame"]||Xn[n+"CancelRequestAnimationFrame"];Xn.requestAnimationFrame=tr,Xn.cancelAnimationFrame=er,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:tr,cancelAnimationFrame:er}),(e=u=u||{}).COORDINATE="<coordinate>",e.COLOR="<color>",e.PAINT="<paint>",e.NUMBER="<number>",e.ANGLE="<angle>",e.OPACITY_VALUE="<opacity-value>",e.SHADOW_BLUR="<shadow-blur>",e.LENGTH="<length>",e.PERCENTAGE="<percentage>",e.LENGTH_PERCENTAGE="<length> | <percentage>",e.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",e.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",e.LIST_OF_POINTS="<list-of-points>",e.PATH="<path>",e.FILTER="<filter>",e.Z_INDEX="<z-index>",e.OFFSET_DISTANCE="<offset-distance>",e.DEFINED_PATH="<defined-path>",e.MARKER="<marker>",e.TRANSFORM="<transform>",e.TRANSFORM_ORIGIN="<transform-origin>",e.TEXT="<text>",e.TEXT_TRANSFORM="<text-transform>";var x,nr=function(){function g(t,e){void 0===t&&(t=[0,0,0]),void 0===e&&(e=[0,0,0]),this.center=m(),this.halfExtents=m(),this.min=m(),this.max=m(),this.update(t,e)}g.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=g.prototype;return t.update=function(t,e){Mt(this.center,t),Mt(this.halfExtents,e),Ct(this.min,this.center,this.halfExtents),Ot(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){Ot(this.center,e,t),St(this.center,this.center,.5),Ct(this.halfExtents,e,t),St(this.halfExtents,this.halfExtents,.5),Mt(this.min,t),Mt(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,a,o,s,l,c,u,f,h,d,p,y;g.isEmpty(t)||(g.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],f=r[1],o=r[2],l=(h=t.center)[0],y=h[1],h=h[2],c=(t=t.halfExtents)[0],(d=y-(u=t[1]))<(s=p-f)&&(s=d),(d=p+f)<(p=y+u)&&(d=p),(y=h-(f=t[2]))<(u=a-o)&&(u=y),(p=a+o)<(t=h+f)&&(p=t),e[0]=.5*((a=(y=l-c)<(a=n-i)?y:a)+(o=(o=n+i)<(h=l+c)?h:o)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(o-a),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=a,this.min[1]=s,this.min[2]=u,this.max[0]=o,this.max[1]=d,this.max[2]=p))},t.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,a=e[0],o=e[4],s=e[8],l=e[1],c=e[5],u=e[9],f=e[2],h=e[6],d=e[10],p=Math.abs(a),y=Math.abs(o),g=Math.abs(s),m=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(f),w=Math.abs(h),M=Math.abs(d);kt(n,e[12]+a*i[0]+o*i[1]+s*i[2],e[13]+l*i[0]+c*i[1]+u*i[2],e[14]+f*i[0]+h*i[1]+d*i[2]),kt(r,p*t[0]+y*t[1]+g*t[2],m*t[0]+v*t[1]+b*t[2],x*t[0]+w*t[1]+M*t[2]),this.min=Ct(this.min,n,r),this.max=Ot(this.max,n,r)},t.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]},t.intersection=function(t){var e,n,r,i;return this.intersects(t)?(e=new g,i=m(),n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=m(),i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null},t.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])},t.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?Mt(m(),this.min):272===t.pnVertexFlag?b(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?b(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?b(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?b(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?b(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?b(this.max[0],this.max[1],this.min[2]):b(this.max[0],this.max[1],this.max[2])},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Mt(m(),this.max):272===t.pnVertexFlag?b(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?b(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?b(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?b(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?b(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?b(this.min[0],this.min[1],this.max[2]):b(this.min[0],this.min[1],this.min[2])},g}(),rr=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||b(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])},e.distanceToPoint=function(t){return At(t,this.normal)-this.distance},e.normalize=function(){var t=1/jt(this.normal);St(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r,i,a=this.distanceToPoint(t),a=a/(a-this.distanceToPoint(e)),o=0<=a&&a<=1;return o&&n&&(n=n,e=e,a=a,r=(t=t)[0],i=t[1],t=t[2],n[0]=r+a*(e[0]-r),n[1]=i+a*(e[1]-i),n[2]=t+a*(e[2]-t)),o},t}(),ir=(0,function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new rr)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],y=t[14],t=t[15];kt(this.planes[0].normal,i-e,l-a,h-c),this.planes[0].distance=t-d,kt(this.planes[1].normal,i+e,l+a,h+c),this.planes[1].distance=t+d,kt(this.planes[2].normal,i+n,l+o,h+u),this.planes[2].distance=t+p,kt(this.planes[3].normal,i-n,l-o,h-u),this.planes[3].distance=t-p,kt(this.planes[4].normal,i-r,l-s,h-f),this.planes[4].distance=t-y,kt(this.planes[5].normal,i+r,l+s,h+f),this.planes[5].distance=t+y,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),ar=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),or=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),sr=((n=x=x||{}).GROUP="g",n.CIRCLE="circle",n.ELLIPSE="ellipse",n.IMAGE="image",n.RECT="rect",n.LINE="line",n.POLYLINE="polyline",n.POLYGON="polygon",n.TEXT="text",n.PATH="path",n.HTML="html",n.MESH="mesh",Ie(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}));function lr(t){if(!t)throw new Error}function cr(t,e){if(t===e)throw new Error}function ur(t){return"function"==typeof t}var fr={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},hr=Ie(function(t){var t=sr(t),e=fr[t];return(null==e?void 0:e.alias)||t});var s,dr,pr,yr,gr="Method not implemented.";function mr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vr(t,e,n){e&&mr(t.prototype,e),n&&mr(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function br(){return(br=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function xr(t,e){t.prototype=Object.create(e.prototype),wr(t.prototype.constructor=t,e)}function wr(t,e){return(wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Mr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Or(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?kr(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kr(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e=s=s||{})[e.kUnknown=0]="kUnknown",e[e.kNumber=1]="kNumber",e[e.kPercentage=2]="kPercentage",e[e.kEms=3]="kEms",e[e.kPixels=4]="kPixels",e[e.kRems=5]="kRems",e[e.kDegrees=6]="kDegrees",e[e.kRadians=7]="kRadians",e[e.kGradians=8]="kGradians",e[e.kTurns=9]="kTurns",e[e.kMilliseconds=10]="kMilliseconds",e[e.kSeconds=11]="kSeconds",e[e.kInteger=12]="kInteger",(n=dr=dr||{})[n.kUNumber=0]="kUNumber",n[n.kUPercent=1]="kUPercent",n[n.kULength=2]="kULength",n[n.kUAngle=3]="kUAngle",n[n.kUTime=4]="kUTime",n[n.kUOther=5]="kUOther",(e=pr=pr||{})[e.kYes=0]="kYes",e[e.kNo=1]="kNo",(n=yr=yr||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo";function _r(t){return t?"number"===t?s.kNumber:"percent"===t||"%"===t?s.kPercentage:(e=t,Tr.find(function(t){return t.name===e}).unit_type):s.kUnknown;var e}function Sr(t){var e=1;switch(t){case s.kPixels:case s.kDegrees:case s.kSeconds:break;case s.kMilliseconds:e=.001;break;case s.kRadians:e=180/Math.PI;break;case s.kGradians:e=.9;break;case s.kTurns:e=360}return e}function Er(t){switch(t){case s.kNumber:case s.kInteger:return"";case s.kPercentage:return"%";case s.kEms:return"em";case s.kRems:return"rem";case s.kPixels:return"px";case s.kDegrees:return"deg";case s.kRadians:return"rad";case s.kGradians:return"grad";case s.kMilliseconds:return"ms";case s.kSeconds:return"s";case s.kTurns:return"turn"}return""}var Ar,Pr,Nr,l,Tr=[{name:"em",unit_type:s.kEms},{name:"px",unit_type:s.kPixels},{name:"deg",unit_type:s.kDegrees},{name:"rad",unit_type:s.kRadians},{name:"grad",unit_type:s.kGradians},{name:"ms",unit_type:s.kMilliseconds},{name:"s",unit_type:s.kSeconds},{name:"rem",unit_type:s.kRems},{name:"turn",unit_type:s.kTurns}],n=((e=Ar=Ar||{})[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",function(){function t(){}t.isAngle=function(t){return t===s.kDegrees||t===s.kRadians||t===s.kGradians||t===s.kTurns},t.isLength=function(t){return t>=s.kEms&&t<s.kDegrees},t.isRelativeUnit=function(t){return t===s.kPercentage||t===s.kEms||t===s.kRems},t.isTime=function(t){return t===s.kSeconds||t===s.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(pr.kNo,yr.kNo,"")},e.isNumericValue=function(){return this.getType()>=Ar.kUnitType&&this.getType()<=Ar.kClampType},t}()),e=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}xr(t,n);var e=t.prototype;return e.getType=function(){return Ar.kColorType},e.to=function(t){return this},t}(n),Lr=((r=Pr=Pr||{})[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",function(r){function t(t,e){var n=r.call(this)||this;return n.type=void 0,n.value=void 0,n.type=t,n.value=e,n}xr(t,r);var e=t.prototype;return e.clone=function(){return new t(this.type,this.value)},e.buildCSSText=function(t,e,n){return n},e.getType=function(){return Ar.kColorType},t}(n)),Cr=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}xr(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return Ar.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(n);(r=Nr=Nr||{}).kAdd="+",r.kSubtract="-",r.kMultiply="*",r.kDivide="/",r.kMin="min",r.kMax="max",r.kClamp="clamp",r.kInvalid="",(r=l=l||{})[r.kLength=0]="kLength",r[r.kAngle=1]="kAngle",r[r.kTime=2]="kTime",r[r.kFrequency=3]="kFrequency",r[r.kResolution=4]="kResolution",r[r.kFlex=5]="kFlex",r[r.kPercent=6]="kPercent",r[r.kNumBaseTypes=7]="kNumBaseTypes";function jr(t){return"number"==typeof t?new Hr(t,s.kNumber):t}var Fr=function(){function t(t,e){void 0===t&&(t=s.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=l.kPercent,this.hasPercentHint=!1,this.exponents=new Array(l.kNumBaseTypes).fill(0),t!==s.kNumber&&this.setExponent(function(t){switch(cr(t,s.kNumber),t){case s.kEms:case s.kPixels:case s.kRems:return l.kLength;case s.kMilliseconds:case s.kSeconds:return l.kTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return l.kAngle;case s.kPercentage:return l.kPercent;default:return l.kLength}}(t),e)}var e=t.prototype;return e.applyPercentHint=function(t){cr(t,l.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(l.kPercent)),this.setExponent(l.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},e.hasNonZeroEntries=function(){return 0<this.numNonZeroEntries},e.isOnlyNonZeroEntry=function(t,e){return cr(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},e.exponent=function(t){return this.exponents[t]},e.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},t.negateExponents=function(t){return t.exponents.forEach(function(t){return-1*t}),t},e.matchesBaseType=function(t){return cr(t,l.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},e.matchesPercentage=function(){return this.isOnlyNonZeroEntry(l.kPercent,1)},e.matchesBaseTypePercentage=function(t){return cr(t,l.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(l.kPercent,1)},e.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},e.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(l.kPercent,1)},t.add=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);var r=t.percentHint,i=e.percentHint;if(r!==i)throw new Error;for(var a=0;a<l.kNumBaseTypes;++a){var o=a;if(t.exponents[a]!==e.exponents[a]&&(o!==l.kPercent&&(t.applyPercentHint(o),e.applyPercentHint(o)),t.exponents[a]!==e.exponents[a]))return t}}return t},t.multiply=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<l.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t},t}(),r=function(n){function d(t){var e=n.call(this)||this;return e.type_=void 0,e.type_=t,e}xr(d,n);var t=d.prototype;return t.getType=function(){return Ar.kUnknownType},t.equals=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ir(n).every(function(t){return e.equals(t)})},t.add=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Ir(e),i=(Rr(Ar.kSumType,r,this),Dr(r,Nr.kAdd));return i||$r.create(r)},t.sub=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=Ir(e)).map(function(t){return t.negate()}),i=(Rr(Ar.kSumType,r,this),Dr(r,Nr.kAdd));return i||$r.create(r)},t.mul=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Ir(e),i=(Rr(Ar.kProductType,r,this),zr(r));return i||Zr.create(r)},t.div=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=Ir(e)).map(function(t){return t.invert()}),i=(Rr(Ar.kProductType,r,this),zr(r));return i||Zr.create(r)},t.min=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Ir(e),i=(Rr(Ar.kMinType,r,this),Dr(r,Nr.kMin));return i||Ur.create(r)},t.max=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=Ir(e),i=(Rr(Ar.kMaxType,r,this),Dr(r,Nr.kMax));return i||Xr.create(r)},t.to=function(t){var e=this.sumValue();return 0!==e.length&&1===e.length&&(e=Br(e[0]))?(t="string"==typeof t?_r(t):t,e.convertTo(t)):null},t.toSum=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a=i[r];if(!d.isValidUnit(_r(a)))return null}var o=this.sumValue();if(!o.length)return null;for(var s=[],l=Or(o);!(c=l()).done;){var c=Br(c.value);if(!c)return null;s.push(c)}if(0===e.length)return s.sort(function(t,e){return t.unit-e.unit}),lr(!!(o=$r.create(s))),o;for(var u=[],f=0,h=e;f<h.length;f++)!function(){var t=h[f],r=_r(t),t=(lr(d.isValidUnit(r)),s.reduce(function(t,e,n){return e&&(e=e.convertTo(r))&&(t+=e.value,s[n]=null),t},0));u.push(new Hr(t,r))}();if(s.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return $r.create(u)},t.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(l.kLength);return e&&(t.length=e),(e=this.type_.exponent(l.kAngle))&&(t.angle=e),(e=this.type_.exponent(l.kTime))&&(t.time=e),(e=this.type_.exponent(l.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(l.kResolution))&&(t.resolution=e),(e=this.type_.exponent(l.kFlex))&&(t.flex=e),(e=this.type_.exponent(l.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case l.kLength:return"length";case l.kAngle:return"angle";case l.kTime:return"time";case l.kFrequency:return"frequency";case l.kResolution:return"resolution";case l.kFlex:return"flex";case l.kPercent:return"percent"}return""}(this.type_.percentHint)),t},d.isValidUnit=function(t){return!!(t===s.kNumber||t==s.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t))},t.negate=function(){return Gr.create(this)},t.invert=function(){return Vr.create(this)},d}(n);function Ir(t){return t.map(jr)}function Rr(t,e,n){lr(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function Br(t){return 0===Object.keys(t.units).length?new Hr(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new Hr(t.value,Number(Object.keys(t.units)[0])):null}function Dr(t,e){lr(!!t.length);var n=t[0]instanceof Hr?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var a=t[i]instanceof Hr?t[i]:null;if(!a||a.unit!==n.unit)return null;e===Nr.kAdd?r+=a.value:e===Nr.kMax?r=Math.max(r,a.value):e===Nr.kMin&&(r=Math.min(r,a.value))}return new Hr(r,n.unit)}function zr(t){lr(!!t.length);for(var e=s.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof Hr?t[r]:null;if(!i)return null;if(i.unit!==s.kNumber){if(e!==s.kNumber)return null;e=i.unit}n*=i.value}return new Hr(n,e)}function Wr(t){switch(function(t){switch(t){case s.kNumber:case s.kInteger:return dr.kUNumber;case s.kPercentage:return dr.kUPercent;case s.kPixels:return dr.kULength;case s.kMilliseconds:case s.kSeconds:return dr.kUTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return dr.kUAngle;default:return dr.kUOther}}(t)){case dr.kUNumber:return s.kNumber;case dr.kULength:return s.kPixels;case dr.kUPercent:return s.kPercentage;case dr.kUTime:return s.kSeconds;case dr.kUAngle:return s.kDegrees;default:return s.kUnknown}}var Hr=function(r){function n(t,e){var n,e="string"==typeof(e=void 0===e?s.kNumber:e)?_r(e):e;return(n=r.call(this,new Fr(e))||this).unit=void 0,n.value=void 0,n.unit=e,n.value=t,n}xr(n,r);var t=n.prototype;return t.clone=function(){return new n(this.value,this.unit)},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=Wr(this.unit))!==Wr(t)||e===s.kUnknown?null:(e=Sr(this.unit)/Sr(t),new n(this.value*e,t))},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return Ar.kUnitType},t.sumValue=function(){var t,e,n=[],r={};return this.unit!==s.kNumber&&(r[t=this.unit,(e=Wr(t))===s.kUnknown?t:e]=1),n.push({value:this.value*Sr(this.unit),units:r}),n},t.negate=function(){return new n(-this.value,this.unit)},t.invert=function(){return this.unit===s.kNumber?0===this.value?null:new n(1/this.value,this.unit):Vr.create(this)},t.buildCSSText=function(t,e,n){switch(this.unit){case s.kUnknown:break;case s.kInteger:i=Number(this.value).toFixed(0);break;case s.kNumber:case s.kPercentage:case s.kEms:case s.kRems:case s.kPixels:case s.kDegrees:case s.kRadians:case s.kGradians:case s.kMilliseconds:case s.kSeconds:case s.kTurns:var r,i,a=this.value,o=Er(this.unit);i=a<-999999||999999<a?(r=Er(this.unit),!Number.isFinite(a)||Number.isNaN(a)?function(t,e){void 0===e&&(e="");return(Number.isFinite(t)?(lr(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e}(a,r):a+(r||"")):""+a+o}return n+=i},n}(r),n=function(t){function e(){return t.apply(this,arguments)||this}return xr(e,t),e.prototype.isUnitValue=function(){return!1},e}(r),Vr=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="invert",e.value=t,e}xr(e,n),e.create=function(t){return new e(t,Fr.negateExponents(t.type_))};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return Ar.kInvertType},t.equals=function(t){return t.getType()===Ar.kInvertType&&this.value.equals(t.value)},t.sumValue=function(){var e=this.value.sumValue();return 0===e.length||1!==e.length||0===e[0].value?null:(Object.keys(e[0].units).forEach(function(t){e[0].units[t]*=-1}),e[0].value=1/e[0].value,e)},t.buildCSSText=function(t,e,n){return e==yr.kNo&&(n+=t===pr.kYes?"(":"calc("),n=this.value.buildCSSText(pr.kYes,yr.kNo,n+="1 / "),e===yr.kNo&&(n+=")"),n},e}(n),Gr=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="negate",e.value=t,e}xr(e,n),e.create=function(t){return new e(t,t.type_)};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return Ar.kNegateType},t.equals=function(t){return t.getType()===Ar.kNegateType&&this.value.equals(t.value)},t.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach(function(t){t.value*=-1}),t)},t.buildCSSText=function(t,e,n){return e==yr.kNo&&(n+=t===pr.kYes?"(":"calc("),n=this.value.buildCSSText(pr.kYes,yr.kNo,n+="-"),e===yr.kNo&&(n+=")"),n},e}(n);function qr(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}function Yr(t){return ei[t]||(ei[t]=new Cr(t)),ei[t]}var r=function(n){function t(t,e){e=n.call(this,e)||this;return e.values=void 0,e.values=t,e}xr(t,n);var e=t.prototype;return e.numericValues=function(){return this.values},e.equals=function(n){return this.getType()===n.getType()&&this.values.every(function(t,e){return t.equals(n.values[e])})},t}(n),Ur=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="min",t}xr(e,i),e.create=function(t){return new e(t,qr(t,Fr.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Ar.kMinType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=Or(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="min(";for(var r,i=!0,a=Or(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(pr.kYes,yr.kYes,n);return n+=")"},e}(r),Xr=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="max",t}xr(e,i),e.create=function(t){return new e(t,qr(t,Fr.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Ar.kMaxType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=Or(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="max(";for(var r,i=!0,a=Or(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(pr.kYes,yr.kYes,n);return n+=")"},e}(r),$r=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="sum",t}xr(e,i),e.create=function(t){return new e(t,qr(t,Fr.add))},e.numericTypeFromUnitMap=function(n){var r=new Fr;return Object.keys(n).forEach(function(t){var e=n[t];r=Fr.multiply(r,new Fr(Number(t),e),!1),lr(!0)}),r},e.canCreateNumericTypeFromSumValue=function(t){var e=this,n=(lr(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return Fr.add(n,e.numericTypeFromUnitMap(t.units),!1),!0})};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Ar.kSumType},t.sumValue=function(){var n=[];return this.numericValues().forEach(function(t){t=t.sumValue();if(!t.length)return null;t.forEach(function(e){var t=n.findIndex(function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)});-1===t?n.push(br({},e)):n[t].value+=e.value})}),e.canCreateNumericTypeFromSumValue(n)?n:null},t.buildCSSText=function(t,e,n){e==yr.kNo&&(n+=t===pr.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(pr.kYes,yr.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===Ar.kNegateType?(n+=" - ",a.value):(n+=" + ",a)).buildCSSText(pr.kYes,yr.kNo,n)}return e===yr.kNo&&(n+=")"),n},e}(r),Zr=function(i){function a(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="product",t}xr(a,i),a.create=function(t){return new a(t,qr(t,Fr.multiply))},a.multiplyUnitMaps=function(n,r){return Object.keys(r).forEach(function(t){cr(r[t].value,0);var e=t in n?n[t].value:0;e+r[t].value===0?delete n[t]:n[t]=e+r[t].value}),n};var t=a.prototype;return t.clone=function(){return new a(this.values,this.type_)},t.getType=function(){return Ar.kProductType},t.sumValue=function(){var e=[{value:1,units:{}}];return this.numericValues().forEach(function(t){var n=t.sumValue();if(!n.length)return null;var r=[];e.forEach(function(e){n.forEach(function(t){r.push({value:e.value*t.value,units:a.multiplyUnitMaps(e.units,t.units)})})}),e=r}),e},t.buildCSSText=function(t,e,n){e==yr.kNo&&(n+=t===pr.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(pr.kYes,yr.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===Ar.kInvertType?(n+=" / ",a.value):(n+=" * ",a)).buildCSSText(pr.kYes,yr.kNo,n)}return e===yr.kNo&&(n+=")"),n},a}(r),Kr=new Hr(0,"px"),Jr=(new Hr(1,"px"),new Hr(0,"deg")),Qr=function(o){function t(t,e,n,r,i){var a;return void 0===r&&(r=1),void 0===i&&(i=!1),(a=o.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=t,a.g=e,a.b=n,a.alpha=r,a.isNone=i,a}xr(t,o);var e=t.prototype;return e.clone=function(){return new t(this.r,this.g,this.b,this.alpha)},e.buildCSSText=function(t,e,n){return n+("rgba("+this.r+","+this.g+","+this.b+","+this.alpha)+")"},t}(e),ti=new Cr("unset"),n=new Cr("initial"),r=new Cr("inherit"),ei={"":ti,unset:ti,initial:n,inherit:r},ni=new Qr(0,0,0,0,!0),ri=new Qr(0,0,0,0),ii=Ie(function(t,e,n,r){return new Qr(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),ai=Ie(function(t,e){return void 0===e&&(e=s.kNumber),new Hr(t,e)},function(t,e){return""+t+(e=void 0===e?s.kNumber:e)}),oi=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,si=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,li=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,ci=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var ui={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},fi=Ie(function(t){t="angular"===t.type?Number(t.value):ui[t.value]||0;return ai(t,"deg")}),hi=Ie(function(t){var e,n=50,r=50,i="%",a="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(a=null==t?void 0:t.type,r=Number(t.value))),{cx:ai(n,i),cy:ai(r,a)}}),di=Ie(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return Ya(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,a=(r[i-1].length=null!=(h=r[i-1].length)?h:{type:"%",value:"100"},1<i&&(r[0].length=null!=(h=r[0].length)?h:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!Ae(c)&&!Ae(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:""+(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var f,h=t.map(function(t){return{offset:ai(t.length.value,"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#"+t:"literal"===e?t:"rgb"===e?"rgb("+t.join(",")+")":"rgba("+t.join(",")+")")};var e});return"linear-gradient"===e?new Lr(Pr.LinearGradient,{angle:n?fi(n):Jr,steps:h}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=hi(n[0].at)).cx,t=t.cy,n[0].style&&(f=(n=n[0].style).type,n=n.value,f="extent-keyword"===f?Yr(n):ai(n,f)),new Lr(Pr.RadialGradient,{cx:e,cy:t,size:f,steps:h})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=oi.exec(t);if(n)return r=(null==(r=n[2].match(ci))?void 0:r.map(function(t){return t.split(":")}))||[],[new Lr(Pr.LinearGradient,{angle:ai(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:ai(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=si.exec(t);if(t)return t=(null==(t=t[4].match(ci))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:ai(50,"%"),cy:ai(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:ai(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!Ce(n))return[new Lr(Pr.RadialGradient,n)]}else if("p"===e){var r=t;if(r=li.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});var pi=Ie(function(t){var e;return Ee(e=t)&&e.image?br({repetition:"repeat"},t):"transparent"===(t=Ae(t)?"":t)?ri:di(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=tn(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),ii.apply(void 0,e))});function yi(t,e){if(t instanceof Qr&&e instanceof Qr)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(je(e[n],0,255));return e[3]=je(e[3],0,1),"rgba("+e.join(",")+")"}]}function gi(t,e){if(Ae(e))return ai(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return ai(Number(e),"px");if(0<="deg".search(t))return ai(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return ai(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var mi=Ie(function(t){return gi(new RegExp("px","g"),t)}),vi=(Ie(function(t){return gi(new RegExp("%","g"),t)}),Ie(function(t){return Fe(t)||isFinite(Number(t))?ai(Number(t),"px"):gi(new RegExp("px|%|em|rem","g"),t)})),bi=Ie(function(t){return gi(new RegExp("deg|rad|grad|turn","g"),t)});function xi(t){var e=0;return t.unit===s.kDegrees?e=t.value:t.unit===s.kRadians?e=Ia(Number(t.value)):t.unit===s.kTurns&&(e=360*Number(t.value)),e}function wi(t){return Ce(t)?t.split(" ").map(function(t){return vi(t)}):t.map(function(t){return vi(t.toString())})}function Mi(t,e,n){var r;return t.unit===s.kPixels?Number(t.value):t.unit===s.kPercentage&&n?(n=n.nodeName===x.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,nr.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var ki=function(t){return gi(/deg|rad|grad|turn|px|%/g,t)},Oi=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function _i(t){if("none"!==(t=(t=void 0===t?"":t).toLowerCase().trim()))for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<Oi.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return ki(t)||pi(t)})}),n.lastIndex===t.length)return r}return[]}function Si(t){return t.toString()}var Ei=Ie(function(t){return"number"==typeof t?ai(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ai(Number(t)):ai(0)});function Ai(t,e){return[t,e,Si]}function Pi(n,r){return function(t,e){return[t,e,function(t){return Si(je(t,n,r))}]}}function Ni(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Ie(function(t){return(Ce(t)?t.split(" "):t).map(Ei)});var Ti=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=ye(e)}catch(t){n=ye(""),console.error("[g]: Invalid SVG Path definition: "+e)}var e=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(n),t=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):"Z"===o?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}0<r.length&&n.push(r);return{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=function(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],c=(r=t[s+1],l[0]),u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var f=function(t,e){var n=e[1],r=e[2],i=Re(Fa(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,h=u*u/(n*n)+f*f/(r*r);1<h&&(n*=Math.sqrt(h),r*=Math.sqrt(h));h=n*n*(f*f)+r*r*(u*u),h=h?Math.sqrt((n*n*(r*r)-h)/h):1;a===o&&(h*=-1);isNaN(h)&&(h=0);var d=r?h*n*f/r:0,h=n?h*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*h,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*h,p=[(u-d)/n,(f-h)/r],u=[(-1*u-d)/n,(-1*f-h)/r],d=Mo([1,0],p),f=Mo(p,u);wo(p,u)<=-1&&(f=Math.PI);1<=wo(p,u)&&(f=0);0===o&&0<f&&(f-=2*Math.PI);1===o&&f<0&&(f+=2*Math.PI);return{cx:s,cy:l,rx:po(t,[c,e])?0:n,ry:po(t,[c,e])?0:r,startAngle:d,endAngle:d+f,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=f}"Z"===c?(n=i,r=t[a+1]):(v=l.length,n=[l[v-2],l[v-1]]),r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&po(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h,d,p,y,g,m,v=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=v,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(h=[l[1],l[2]],u.startTangent=[b[0]-h[0],b[1]-h[1]],u.endTangent=[n[0]-h[0],n[1]-h[1]]):"T"===c?(d=go((h=e[s-1]).currentPoint,b),"Q"===h.command?(u.command="Q",u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-d[0],n[1]-d[1]]):(u.command="TL",u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])):"C"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(y=go((p=e[s-1]).currentPoint,b),g=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-y[0],b[1]-y[1]]):(u.command="SQ",u.startTangent=[b[0]-g[0],b[1]-g[1]]),u.endTangent=[n[0]-g[0],n[1]-g[1]]):"A"===c&&(y=bo(u,0),b=y.x,g=y.y,c=bo(u,1,!1),m=c.x,c=c.y,u.startTangent=[b,g],u.endTangent=[m,c]),e.push(u)}return e}(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=kn.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=Pn.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var f=o.arcParams;u=In.box(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===o.command||"M"===o.command)&&o.prePoint&&o.nextPoint&&i.push(o)}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var h=Le(n),d=Le(r),p=Te(n),y=Te(r);if(0!==i.length)for(var g=0;g<i.length;g++){var m=i[g],v=m.currentPoint,b=void 0;v[0]===h?(b=yo(m,e),h-=b.xExtra):v[0]===p&&(b=yo(m,e),p+=b.xExtra),v[1]===d?(b=yo(m,e),d-=b.yExtra):v[1]===y&&(b=yo(m,e),y+=b.yExtra)}return{x:h,y:d,width:p-h,height:y-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},Li=Ie(Ti);function Ci(t,e){t=(Ce(t)?Li:Ti)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function ji(t,e,n){var r,i,a,o,s,l,c,u,f,h=t.curve,d=e.curve,t=(h&&0!==h.length||(h=Me(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=Me(e.absolutePath,!1),e.curve=d),[h,d]),h=Oe((t=h.length!==d.length?function t(e,n,r){var i,e=_e(e),n=_e(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],f=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&f[n]&&t.l>=u[n],f[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(h,d):t)[0])!==Oe(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):te(t[0]);return[h,(i=t[1],a=h,c=i.length-1,u=[],f=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){f+=ve(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=f,f=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function Fi(t,e){var n,r,i=Ce(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,a=[],o=0,s=zn.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=gn.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}var Ii=null;function Ri(t){return function(e){var n=0;return t.map(function(t){return t===Ii?e[n++]:t})}}function Bi(t){return t}var Di={matrix:["NNNNNN",[Ii,Ii,0,0,Ii,Ii,0,0,0,0,1,0,Ii,Ii,0,1],Bi],matrix3d:["NNNNNNNNNNNNNNNN",Bi],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Ri([Ii,Ii,new Hr(1)]),Bi],scalex:["N",Ri([Ii,new Hr(1),new Hr(1)]),Ri([Ii,new Hr(1)])],scaley:["N",Ri([new Hr(1),Ii,new Hr(1)]),Ri([new Hr(1),Ii])],scalez:["N",Ri([new Hr(1),new Hr(1),Ii])],scale3d:["NNN",Bi],skew:["Aa",null,Bi],skewx:["A",null,Ri([Ii,Jr])],skewy:["A",null,Ri([Jr,Ii])],translate:["Tt",Ri([Ii,Ii,Kr]),Bi],translatex:["T",Ri([Ii,Kr,Kr]),Ri([Ii,Kr])],translatey:["T",Ri([Kr,Ii,Kr]),Ri([Kr,Ii])],translatez:["L",Ri([Kr,Kr,Ii])],translate3d:["TTL",Bi]};function zi(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,a=e[1],o=Di[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var f=s[u],h=l[u],d=void 0;if(void 0===(d=f?{A:function(t){return"0"===t.trim()?Jr:bi(t)},N:Ei,T:vi,L:mi}[h.toUpperCase()](f):{a:Jr,n:c[0],t:Kr}[h]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function Wi(t){switch(t.t){case"rotatex":return i=Fa(xi(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=Fa(xi(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=Fa(xi(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=Fa(xi(t.d[3])),a=e*e+n*n+r*r,a=(0==a?(e=1,r=n=0):1!=a&&(e/=a=Math.sqrt(a),n/=a,r/=a),Math.sin(i/2)),o=a*Math.cos(i/2),a=a*a;return[1-2*(n*n+r*r)*a,2*(e*n*a+r*o),2*(e*r*a-n*o),0,2*(e*n*a-r*o),1-2*(e*e+r*r)*a,2*(n*r*a+e*o),0,2*(e*r*a+n*o),2*(n*r*a-e*o),1-2*(e*e+n*n)*a,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":o=Fa(xi(t.d[0])),a=Fa(xi(t.d[1]));return[1,Math.tan(a),0,0,Math.tan(o),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=Fa(xi(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=Fa(xi(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Mi(t.d[0],0,null)||0,n=Mi(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Mi(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=Mi(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=Mi(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Mi(t.d[0],0,null)||0,n=Mi(t.d[1],0,null)||0,r=Mi(t.d[2],0,null)||0,1];case"perspective":a=Mi(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,a?-1/a:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function Hi(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function Vi(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return function(t,e,n,r,i,a){if(!function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(Da,t))return;if(H(za,Da),za[3]=0,za[7]=0,za[11]=0,za[15]=1,Math.abs(U(za))<1e-8)return;var t=Da[3],o=Da[7],s=Da[11],l=Da[12],c=Da[13],u=Da[14],f=Da[15];if(0!==t||0!==o||0!==s){if(Wa[0]=t,Wa[1]=o,Wa[2]=s,Wa[3]=f,!Y(za,za))return;q(za,za),It(i,Wa,za)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(d,Da),n[0]=wt(d[0]),Et(d[0],d[0]),r[0]=At(d[0],d[1]),Va(d[1],d[1],d[0],1,-r[0]),n[1]=wt(d[1]),Et(d[1],d[1]),r[0]/=n[1],r[1]=At(d[0],d[2]),Va(d[2],d[2],d[0],1,-r[1]),r[2]=At(d[1],d[2]),Va(d[2],d[2],d[1],1,-r[2]),n[2]=wt(d[2]),Et(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],Pt(Ha,d[1],d[2]),At(d[0],Ha)<0)for(var h=0;h<3;h++)n[h]*=-1,d[h][0]*=-1,d[h][1]*=-1,d[h][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(a[0]=-a[0]);d[0][2]>d[2][0]&&(a[1]=-a[1]);d[1][0]>d[0][1]&&(a[2]=-a[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(Wi).reduce(Hi),e,n,r,i,a),[[e,n,r,a,i]]}var Gi=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],f=r[2],r=r[3],h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],f=(h[0][0]=1-2*(u*u+f*f),h[0][1]=2*(c*u-f*r),h[0][2]=2*(c*f+u*r),h[1][0]=2*(c*u+f*r),h[1][1]=1-2*(c*c+f*f),h[1][2]=2*(u*f-c*r),h[2][0]=2*(c*f-u*r),h[2][1]=2*(u*f+c*r),h[2][2]=1-2*(c*c+u*u),a=qi(a,h),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(f[2][1]=n[2],a=qi(a,f)),n[1]&&(f[2][1]=0,f[2][0]=n[0],a=qi(a,f)),n[0]&&(f[2][0]=0,f[1][0]=n[0],a=qi(a,f));for(var d=0;d<3;d++)for(var p=0;p<3;p++)a[d][p]*=e[d];return 0==(r=a)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])};function qi(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var a=0;a<4;a++)n[r][i]+=e[r][a]*t[a][i];return n}function Yi(t){return t.toFixed(6).replace(".000000","")}function Ui(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=Vi(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=Vi(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),i=(r=je(r,-1,1),[]);if(1===r)i=t;else for(var a=Math.acos(r),o=+Math.sin(n*a)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}(r[0][3],i[0][3],t[5]);return Gi(t[0],t[1],t[2],e,t[4]).map(Yi).join(",")}])}function Xi(t){return t.replace(/[xy]/,"")}function $i(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var Zi=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function Ki(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var n=0;n<r.length;n++)!function(t){var t=r[t],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?ai(n):ai(n,t.unit)})})}(n)}var a=[],o=[],s=[];if(r.length!==i.length)var l=Ui(r,i),a=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,f=i[c].t,h=r[c].d,d=i[c].d,p=Di[u],y=Di[f],g=void 0;if(Zi(u,f)){var m=Ui([r[c]],[i[c]]);a.push(m[0]),o.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===f)g=u;else if(p[2]&&y[2]&&Xi(u)===Xi(f))g=Xi(u),h=p[2](h),d=y[2](d);else{if(!p[1]||!y[1]||$i(u)!==$i(f)){m=Ui(r,i);a=[m[0]],o=[m[1]],s=[["matrix",[m[2]]]];break}g=$i(u),h=p[1](h),d=y[1](d)}for(var v=[],b=[],x=[],w=0;w<h.length;w++){var M=function(t,e,n,r,i){void 0===i&&(i=0);var a="",o=t.value||0,s=e.value||0,l=Wr(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=Er(t.unit)):(Hr.isLength(t.unit)||Hr.isLength(e.unit))&&(o=Mi(t,i,n),s=Mi(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(h[w],d[w],t,!1,w);v[w]=M[0],b[w]=M[1],x.push(M[2])}a.push(v),o.push(b),s.push([g,x])}}return e&&(l=a,a=o,o=l),[a,o,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var Ji=Ie(function(t){var e;return Ce(t)?"text-anchor"===t?[ai(0,"px"),ai(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[vi(Qi(e[0])),vi(Qi(e[1]))]):[ai(t[0]||0,"px"),ai(t[1]||0,"px")]});function Qi(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var e=function(){function t(){this.parser=bi,this.mixer=Ai}return t.prototype.calculator=function(t,e,n,r){return xi(n)},t}(),n=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof Cr&&(n=null),w.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&w.sceneGraphService.dirtifyToRoot(t)}),n},t}(),r=function(){function t(){this.parser=pi,this.mixer=yi}return t.prototype.calculator=function(t,e,n,r){return n instanceof Cr?"none"===n.value?ni:ri:n},t}(),ta=function(){function t(){this.parser=_i}return t.prototype.calculator=function(t,e,n){return n instanceof Cr?[]:n},t}();function ea(t){t=t.parsedStyle.fontSize;return Ae(t)?null:t}function na(){this.parser=Ji}var ra,ia,a=function(){function t(){this.parser=vi,this.mixer=Ai}return t.prototype.calculator=function(t,e,n,r,i){if(!Hr.isRelativeUnit(n.unit))return n.value;if(n.unit===s.kPercentage)return 0;if(n.unit===s.kEms){if(r.parentNode){var a=ea(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===s.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=ea(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),aa=function(){function t(){this.mixer=Ni}var e=t.prototype;return e.parser=function(t){t=wi(Fe(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),oa=function(){function t(){this.mixer=Ni}var e=t.prototype;return e.parser=function(t){t=wi(Fe(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),sa=function(t){function e(){return t.apply(this,arguments)||this}return xr(e,t),e.prototype.postProcessor=function(t){var e,n,r;switch(t.nodeName){case x.CIRCLE:case x.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;Ae(a)||(l=a),Ae(i)||(c=i);break;case x.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case x.RECT:case x.IMAGE:case x.GROUP:case x.HTML:case x.TEXT:case x.MESH:Ae(t.parsedStyle.x)||(l=t.parsedStyle.x),Ae(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==x.PATH&&t.nodeName!==x.POLYLINE&&t.nodeName!==x.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),Ae(l)&&Ae(c)&&Ae(u)||(e=(r=t.getLocalPosition())[0],n=r[1],r=r[2],t.setLocalPosition(Ae(l)?e:l,Ae(c)?n:c,Ae(u)?r:u))},e}(a),la=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof Cr?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),o=function(){function t(){this.mixer=Ai,this.parser=Ei}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ca=function(){function t(){this.parser=Ei,this.mixer=Pi(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==x.LINE&&e!==x.PATH&&e!==x.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),c=function(){function t(){this.parser=Ei,this.mixer=Pi(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ua=function(){function t(){this.parser=Ci,this.mixer=ji}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof Cr&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new or(0,0,0,0)}:n},e.postProcessor=function(t){var e,n;t.nodeName===x.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))},t}(),fa=function(){function t(){this.parser=Fi}return t.prototype.postProcessor=function(t){var e,n;t.nodeName!==x.POLYGON&&t.nodeName!==x.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))},t}(),ha=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).mixer=Pi(0,1/0),t}return xr(t,i),t}(a),da=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Cr?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),pa=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i,a=r.getAttribute("text");return a&&(i=a,"capitalize"===n.value?i=a.charAt(0).toUpperCase()+a.slice(1):"lowercase"===n.value?i=a.toLowerCase():"uppercase"===n.value&&(i=a.toUpperCase()),r.parsedStyle.text=i),n.value},t}(),ya=function(){function t(){this.tmpMat4=W(),this.parser=zi,this.mixer=Ki}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Cr?[]:n},e.postProcessor=function(t){!function(t,l){var c=this;{var u,f;t&&t.length&&(f=u=0,l?(u=l.parsedStyle.defX||0,f=l.parsedStyle.defY||0,l.resetLocalTransform(),l.setLocalPosition(u,f)):l=new Na({}),t.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[Kr,Kr],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[Kr],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[Kr],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[Kr],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[Kr,Kr,Kr],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[Jr],l.rotateLocal(0,0,o[0].value)):"rotatex"===s?(o=t||[Jr],l.rotateLocal(o[0].value,0,0)):"rotatey"===s?(o=t||[Jr],l.rotateLocal(0,o[0].value,0)):"rotatez"===s?(o=t||[Jr],l.rotateLocal(0,0,o[0].value)):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(Fa(o[0]),Fa(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(Fa(o[0]),l.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],Fa(o[0]))):"matrix"===s?(e=(o=t.map(function(t){return t.value}))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],l.setLocalTransform(V(c.tmpMat4,e,n,0,0,r,i,0,0,0,0,1,0,a+u,o+f,0,1))):"matrix3d"===s&&(V.apply(xt,[c.tmpMat4].concat(t.map(function(t){return t.value}))),c.tmpMat4[12]+=u,c.tmpMat4[13]+=f,l.setLocalTransform(c.tmpMat4)))}))}l.getLocalTransform()}(t.parsedStyle.transform,t)},t}(),ga=function(){function t(){this.parser=Ei}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0)},t}(),ma=function(){function e(t){this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new ar,this.page=new ar,this.canvas=new ar,this.viewport=new ar,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}var t=e.prototype;return t.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},t.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.stopPropagation=function(){this.propagationStopped=!0},t.initEvent=function(){},t.initUIEvent=function(){},t.clone=function(){throw new Error(gr)},vr(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),e}(),va=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(Mr(n),e),n}return xr(t,r),t}(ma),ba=function(i){function d(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}xr(d,i),d.isNode=function(t){return!!t.childNodes};var t=d.prototype;return t.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},t.hasChildNodes=function(){return 0<this.childNodes.length},t.isDefaultNamespace=function(t){throw new Error(gr)},t.lookupNamespaceURI=function(t){throw new Error(gr)},t.lookupPrefix=function(t){throw new Error(gr)},t.normalize=function(){throw new Error(gr)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,f=s[c],h=o[l+c];if(h!==f)return(u=f.parentNode.childNodes).indexOf(f)<u.indexOf(h)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:o===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING},t.contain=function(t){return this.contains(t)},t.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},t.getAncestor=function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e},t.forEach=function(e){e(this)||this.childNodes.forEach(function(t){t.forEach(e)})},vr(d,[{key:"textContent",get:function(){var t="";this.nodeName===x.TEXT&&(t+=this.style.text);for(var e=Or(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===x.TEXT?t+=n.nodeValue:t+=n.textContent}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===x.TEXT&&(this.style.text=""+t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}}]),d}(function(){function t(){this.emitter=new Yn}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r,i,a,o=Be(n)&&n||Ee(n)&&n.capture,n=Ee(n)&&n.once,s=ur(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],c=i,l=!0),t=o?t+"capture":t,e=ur(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,n=Be(n)&&n||Ee(n)&&n.capture,i=ur(e)?void 0:e;return e=ur(e)?e:null==(r=e)?void 0:r.handleEvent,this.emitter.off(t=n?t+"capture":t,e,i),this},e.emit=function(t,e){this.dispatchEvent(new va(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!(t instanceof ma))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var n;if(n=this.document?this:this.defaultView||(null==(n=this.ownerDocument)?void 0:n.defaultView)){if(t.manager=n.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null!=(n=t.manager)&&n.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}()),xa=(ba.DOCUMENT_POSITION_DISCONNECTED=1,ba.DOCUMENT_POSITION_PRECEDING=2,ba.DOCUMENT_POSITION_FOLLOWING=4,ba.DOCUMENT_POSITION_CONTAINS=8,ba.DOCUMENT_POSITION_CONTAINED_BY=16,ba.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,ra=ra||{},ra[ra.Standard=0]="Standard",(_a=ia=ia||{}).DESTROY="destroy",_a.ATTR_MODIFIED="DOMAttrModified",_a.INSERTED="DOMNodeInserted",_a.REMOVED="removed",_a.MOUNTED="DOMNodeInsertedIntoDocument",_a.UNMOUNTED="DOMNodeRemovedFromDocument",_a.BOUNDS_CHANGED="bounds-changed",_a.RENDER_ORDER_CHANGED="render-order-changed",_a.CULLED="culled",function(c){function t(t,e,n,r,i,a,o,s){var l=c.call(this,null)||this;return l.relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return xr(t,c),t}(ma)),wa=(xa.ADDITION=2,xa.MODIFICATION=1,xa.REMOVAL=3,0),Ma=new xa(ia.INSERTED,null,"","","",0,"",""),ka=new xa(ia.REMOVED,null,"","","",0,"",""),Oa=new va(ia.DESTROY),_a=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).entity=wa++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:ra.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:b(0,0,0),localRotation:Ht(0,0,0,1),localScale:b(1,1,1),localTransform:W(),localSkew:Yt(0,0),position:b(0,0,0),rotation:Ht(0,0,0,1),scaling:b(1,1,1),worldTransform:W(),origin:b(0,0,0)},t.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},t.geometry={contentBounds:void 0,renderBounds:void 0},t.rBushNode={aabb:void 0},t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={anchor:ti,opacity:ti,fillOpacity:ti,strokeOpacity:ti,fill:ti,stroke:ti,transform:ti,transformOrigin:ti,visibility:ti,pointerEvents:ti,lineWidth:ti,lineCap:ti,lineJoin:ti,increasedLineWidthForHitTesting:ti,fontSize:ti,fontFamily:ti,fontStyle:ti,fontWeight:ti,fontVariant:ti,textAlign:ti,textBaseline:ti,textTransform:ti,zIndex:ti,filter:ti,shadowType:ti},t.parsedStyle={},t.attributes={},t}xr(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(gr)},e.appendChild=function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return w.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),Ma.relatedNode=this,t.dispatchEvent(Ma),t},e.insertBefore=function(t,e){return e?(e=this.childNodes.indexOf(e),this.appendChild(t,e-1)):this.appendChild(t),t},e.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.removeChild=function(t){var e;return ka.relatedNode=this,t.dispatchEvent(ka),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),w.sceneGraphService.detach(t),t},e.removeChildren=function(){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)})},e.destroyChildren=function(){this.childNodes.slice().forEach(function(t){t.destroyChildren(),t.destroy()})},e.matches=function(t){return w.sceneGraphService.matches(t,this)},e.getElementById=function(t){return w.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return w.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return w.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return w.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return w.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return w.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(w.sceneGraphService.matches(t,e))return e}while(null!==(e=e.parentElement));return null},e.find=function(e){var n=this,r=null;return this.forEach(function(t){return!(t===n||!e(t)||(r=t,0))}),r},e.findAll=function(e){var n=this,r=[];return this.forEach(function(t){t!==n&&e(t)&&r.push(t)}),r},e.after=function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t,e){var n;return null==(n=r.parentNode)?void 0:n.appendChild(t,i+e+1)})}},e.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,a)}},e.replaceWith=function(){this.after.apply(this,arguments),this.remove()},e.append=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e.appendChild(t)})},e.prepend=function(){for(var n=this,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t,e){return n.appendChild(t,e)})},e.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},e.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.destroy=function(){this.dispatchEvent(Oa),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return w.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return w.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return w.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return w.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return w.sceneGraphService.getBoundingClientRect(this)},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.getAttributeNames=function(){return Object.keys(this.attributes)},e.getAttribute=function(t){var e=this.attributes[t];return void 0===e&&(t=hr(t),e=this.attributes[t],Ae(e))?null:e},e.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.hasAttributes=function(){return!!this.getAttributeNames().length},e.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.setAttribute=function(t,e,n){this.attributes[t]=e},e.getAttributeNS=function(t,e){throw new Error(gr)},e.getAttributeNode=function(t){throw new Error(gr)},e.getAttributeNodeNS=function(t,e){throw new Error(gr)},e.hasAttributeNS=function(t,e){throw new Error(gr)},e.removeAttributeNS=function(t,e){throw new Error(gr)},e.removeAttributeNode=function(t){throw new Error(gr)},e.setAttributeNS=function(t,e,n){throw new Error(gr)},e.setAttributeNode=function(t){throw new Error(gr)},e.setAttributeNodeNS=function(t){throw new Error(gr)},e.toggleAttribute=function(t,e){throw new Error(gr)},vr(t,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t+1])||null}},{key:"previousSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1])||null}}]),t}(ba),Sa=new xa(ia.ATTR_MODIFIED,null,null,null,null,xa.MODIFICATION,null,null),Ea={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},Aa={anchor:[0,0],fill:ni,stroke:ni,transform:[],zIndex:0,filter:[],shadowType:"outer"},Pa=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],Na=function(i){function o(t){var r=i.call(this)||this;return r.config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||x.GROUP,r.config.style=br({},r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,Aa,r.config.initialParsedStyle),Object.assign(r.attributes,Ea),r.initAttributes(r.config.style),r.style=new Proxy({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}}),w.displayObjectPool.add(r.entity,Mr(r)),r}xr(o,i);var t=o.prototype;return t.destroy=function(){i.prototype.destroy.call(this),w.displayObjectPool.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})},t.cloneNode=function(e,t){var n,r=br({},this.attributes);for(n in r){var i=r[n];i instanceof o&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(r[n]=i.cloneNode(e)),t&&(r[n]=t(n,i))}var a=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return a.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),a.appendChild(t))}),a},t.initAttributes=function(t){var e=this.renderable;w.styleValueRegistry.processProperties(this,t=void 0===t?{}:t,{forceUpdateGeometry:!0,usedAttributes:Pa}),e.dirty=!0},t.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=hr(t);De(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),i.prototype.setAttribute.call(this,t,e))},t.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r=this.renderable,i=this.attributes[t],a=this.parsedStyle[t],o=(w.styleValueRegistry.processProperties(this,((o={})[t]=e,o),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(Sa.relatedNode=this,Sa.prevValue=i,Sa.newValue=e,Sa.attrName=t,Sa.prevParsedValue=a,Sa.newParsedValue=o,this.isMutationObserved?this.dispatchEvent(Sa):(Sa.target=this).ownerDocument.defaultView.dispatchEvent(Sa,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,a,o)},t.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return new or(n,e,r-n,t-e)},t.setOrigin=function(t,e,n){return w.sceneGraphService.setOrigin(this,ja(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getOrigin=function(){return w.sceneGraphService.getOrigin(this)},t.setPosition=function(t,e,n){return w.sceneGraphService.setPosition(this,ja(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.setLocalPosition=function(t,e,n){return w.sceneGraphService.setLocalPosition(this,ja(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translate=function(t,e,n){return w.sceneGraphService.translate(this,ja(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translateLocal=function(t,e,n){return w.sceneGraphService.translateLocal(this,ja(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getPosition=function(){return w.sceneGraphService.getPosition(this)},t.getLocalPosition=function(){return w.sceneGraphService.getLocalPosition(this)},t.scale=function(t,e,n){return this.scaleLocal(t,e,n)},t.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=ja(t,e=e||t,n=n||t)),w.sceneGraphService.scaleLocal(this,t),this},t.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=ja(t,e=e||t,n=n||t)),w.sceneGraphService.setLocalScale(this,t),this},t.getLocalScale=function(){return w.sceneGraphService.getLocalScale(this)},t.getScale=function(){return w.sceneGraphService.getScale(this)},t.getEulerAngles=function(){return Ia(Ra(m(),w.sceneGraphService.getWorldTransform(this))[2])},t.getLocalEulerAngles=function(){return Ia(Ra(m(),w.sceneGraphService.getLocalRotation(this))[2])},t.setEulerAngles=function(t){return w.sceneGraphService.setEulerAngles(this,0,0,t),this},t.setLocalEulerAngles=function(t){return w.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},t.rotateLocal=function(t,e,n){return Ae(e)&&Ae(n)?w.sceneGraphService.rotateLocal(this,0,0,t):w.sceneGraphService.rotateLocal(this,t,e,n),this},t.rotate=function(t,e,n){return Ae(e)&&Ae(n)?w.sceneGraphService.rotate(this,0,0,t):w.sceneGraphService.rotate(this,t,e,n),this},t.setRotation=function(t,e,n,r){return w.sceneGraphService.setRotation(this,t,e,n,r),this},t.setLocalRotation=function(t,e,n,r){return w.sceneGraphService.setLocalRotation(this,t,e,n,r),this},t.setLocalSkew=function(t,e){return w.sceneGraphService.setLocalSkew(this,t,e),this},t.getRotation=function(){return w.sceneGraphService.getRotation(this)},t.getLocalRotation=function(){return w.sceneGraphService.getLocalRotation(this)},t.getLocalSkew=function(){return w.sceneGraphService.getLocalSkew(this)},t.getLocalTransform=function(){return w.sceneGraphService.getLocalTransform(this)},t.getWorldTransform=function(){return w.sceneGraphService.getWorldTransform(this)},t.setLocalTransform=function(t){return w.sceneGraphService.setLocalTransform(this,t),this},t.resetLocalTransform=function(){w.sceneGraphService.resetLocalTransform(this)},t.getAnimations=function(){return this.activeAnimations},t.animate=function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null},t.isVisible=function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)},t.isInteractive=function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)},t.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},t.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))+1),this},t.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))-1),this},t.getConfig=function(){return this.config},t.attr=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1];return i?Ee(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,a),this):this.attributes[i]:this.attributes},t.getMatrix=function(t){var t=t||this.getWorldTransform(),e=ut(m(),t),n=e[0],e=e[1],r=ft(m(),t),i=r[0],r=r[1],t=ht(Rt(),t),t=Ra(m(),t),a=t[0],t=t[2],o=(a=a||t,t=n,n=e,e=i,i=r,r=Math.cos(a),a=Math.sin(a),e*r),s=i*a,l=0,e=-e*a,a=i*r,i=0,r=t,t=n,n=1,c=new O(9);return c[0]=o,c[1]=s,c[2]=l,c[3]=e,c[4]=a,c[5]=i,c[6]=r,c[7]=t,c[8]=n,c},t.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},t.setMatrix=function(t){var t=Ba(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setEulerAngles(t).setPosition(e,n).setLocalScale(r,i)},t.setLocalMatrix=function(t){var t=Ba(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setLocalEulerAngles(t).setLocalPosition(e,n).setLocalScale(r,i)},t.show=function(){this.style.visibility="visible"},t.hide=function(){this.style.visibility="hidden"},t.getCount=function(){return this.childElementCount},t.getParent=function(){return this.parentElement},t.getChildren=function(){return this.children},t.getFirst=function(){return this.firstElementChild},t.getLast=function(){return this.lastElementChild},t.getChildByIndex=function(t){return this.children[t]||null},t.add=function(t,e){return this.appendChild(t,e)},t.setClip=function(t){this.style.clipPath=t},t.set=function(t,e){this.config[t]=e},t.get=function(t){return this.config[t]},t.moveTo=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},t.move=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},t.setZIndex=function(t){return this.style.zIndex=t,this},vr(o,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),o}(_a),Ta={},La=[],ba=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return Ta[t]},e.getAll=function(){return Object.keys(Ta).map(function(t){return Ta[t]})},e.add=function(t,e){(Ta[t]=e).nodeName===x.HTML&&La.push(e)},e.remove=function(t){var e=Ta[t];e&&(delete Ta[t],e.nodeName===x.HTML)&&(t=La.indexOf(e),La.splice(t,1))},e.getHTMLs=function(){return La},t}();function Ca(t){return void 0===t?0:360<t||t<-360?t%360:t}function ja(t,e,n){var r,i;return void 0===e&&(e=0),void 0===n&&(n=0),Fe(t)?b(t,e,n):Array.isArray(t)&&3===t.length?(r=t,(i=new O(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):b(t[0],t[1]||e,t[2]||n)}function Fa(t){return t*(Math.PI/180)}function Ia(t){return t*(180/Math.PI)}function Ra(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=ft(m(),r))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/l,r[10]/c),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/l,r[5]/l)):(a=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(a=c*c))<(t=s*c-r*l)?(o[0]=Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):t<-.499995*n?(o[0]=-Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):(o[0]=Math.asin(2*(s*l-c*r)),o[1]=Math.atan2(2*(s*c+r*l),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),o);var n,r,i,a,o,s,l,c,u}function Ba(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?a=-a:o=-o),a&&(e*=1/a,n*=1/a);r=Ia(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var Da=W(),za=W(),Wa=Ft(),d=[m(),m(),m()],Ha=m();function Va(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}Ga={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},qa="";var Ga,qa,Ya=function(t){return qa=t,Xa()};function Ua(t){throw new Error(qa+": "+t)}function Xa(){var t=io($a);return 0<qa.length&&Ua("Invalid input not EOF"),t}function $a(){return Za("linear-gradient",Ga.linearGradient,Ja)||Za("repeating-linear-gradient",Ga.repeatingLinearGradient,Ja)||Za("radial-gradient",Ga.radialGradient,Qa)||Za("repeating-radial-gradient",Ga.repeatingRadialGradient,Qa)||Za("conic-gradient",Ga.conicGradient,Qa)}function Za(n,t,r){return Ka(t,function(t){var e=r();return e&&!fo(Ga.comma)&&Ua("Missing comma before color stops"),{type:n,orientation:e,colorStops:io(ao)}})}function Ka(t,e){t=fo(t);if(t)return fo(Ga.startCall)||Ua("Missing ("),e=e(t),fo(Ga.endCall)||Ua("Missing )"),e}function Ja(){return uo("directional",Ga.sideOrCorner,1)||uo("angular",Ga.angleValue,1)}function Qa(){var t,e,n=to();return n&&((t=[]).push(n),e=qa,fo(Ga.comma))&&((n=to())?t.push(n):qa=e),t}function to(){var t,e=function(){var t=uo("shape",/^(circle)/i,0);t&&(t.style=co()||eo());return t}()||function(){var t=uo("shape",/^(ellipse)/i,0);t&&(t.style=so()||eo());return t}();return e?e.at=no():(t=eo())?(e=t,(t=no())&&(e.at=t)):(t=ro())&&(e={type:"default-radial",at:t}),e}function eo(){return uo("extent-keyword",Ga.extentKeywords,1)}function no(){var t;if(uo("position",/^at/,0))return(t=ro())||Ua("Missing positioning value"),t}function ro(){var t={x:so(),y:so()};if(t.x||t.y)return{type:"position",value:t}}function io(t){var e=t(),n=[];if(e)for(n.push(e);fo(Ga.comma);)(e=t())?n.push(e):Ua("One extra comma");return n}function ao(){var t=uo("hex",Ga.hexColor,1)||Ka(Ga.rgbaColor,function(){return{type:"rgba",value:io(oo)}})||Ka(Ga.rgbColor,function(){return{type:"rgb",value:io(oo)}})||uo("literal",Ga.literalColor,0);return t||Ua("Expected color definition"),t.length=so(),t}function oo(){return fo(Ga.number)[1]}function so(){return uo("%",Ga.percentageValue,1)||lo()||co()}function lo(){return uo("position-keyword",Ga.positionKeywords,1)}function co(){return uo("px",Ga.pixelValue,1)||uo("em",Ga.emValue,1)}function uo(t,e,n){e=fo(e);if(e)return{type:t,value:e[n]}}function fo(t){var e=/^[\n\r\t\s]+/.exec(qa),e=(e&&ho(e[0].length),t.exec(qa));return e&&ho(e[0].length),e}function ho(t){qa=qa.substring(t)}function po(t,e){return t[0]===e[0]&&t[1]===e[1]}function yo(t,e){var n,r=t.prePoint,i=t.currentPoint,t=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),o=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),r=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),r=Math.acos((a+o-r)/(2*Math.sqrt(a)*Math.sqrt(o)));return!r||0===Math.sin(r)||(void(a=0)===n&&(n=1e-5),Math.abs(r-a)<n)?{xExtra:0,yExtra:0}:(o=Math.abs(Math.atan2(t[1]-i[1],t[0]-i[0])),a=Math.abs(Math.atan2(t[0]-i[0],t[1]-i[1])),o=o>Math.PI/2?Math.PI-o:o,a=a>Math.PI/2?Math.PI-a:a,{xExtra:Math.cos(r/2-o)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(a-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function go(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function mo(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=Fa(r=Re(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=vo({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=vo(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var vo=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)};function bo(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=mo({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=mo({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function xo(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function wo(t,e){return xo(t)*xo(e)?(t[0]*e[0]+t[1]*e[1])/(xo(t)*xo(e)):1}function Mo(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(wo(t,e))}_a=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+=this.getInterceptor(o)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=Or(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}o+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError"+t+" = false;\ntry {\n"),o+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",a||(o=(o=(o=o+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),a||(o+="}\n");break;case"async":var f=(f=(f="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(f+=r("_result"+t)),i&&(f+=i()),o+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:f=f+"}\n"+"})"})+");\n";break;case"promise":o=(o=(o=(o+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n"))+("if (!_promise"+t+" || !_promise"+t+".then)\n")+(" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n"))+("_promise"+t+".then((function(_result"+t+") {\n")+("_hasResult"+t+" = true;\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),o=(o=o+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return o},e.callTapsSeries=function(t){var a=this,o=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,c=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),f=e||n,h="",d=l,p=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(d!==l&&("sync"!==a.options.taps[n].type||20<p++)&&(p=0,h=(h+="function _next"+n+"() {\n")+d()+"}\n",d=function(){return(f?"return ":"")+"_next"+n+"();\n"}),d),i=a.callTap(n,{onError:function(t){return o(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:c&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return h+=d()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:o.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}();new(function(t){function e(){return t.apply(this,arguments)||this}return xr(e,t),e.prototype.content=function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})},e}(_a)),new(function(t){function e(){return t.apply(this,arguments)||this}return xr(e,t),e.prototype.content=function(t){var i=this,a=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return a(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})},e}(_a)),new(function(t){function e(){return t.apply(this,arguments)||this}return xr(e,t),e.prototype.content=function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})},e}(_a));new(function(t){function e(){return t.apply(this,arguments)||this}return xr(e,t),e.prototype.content=function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})},e}(_a));var ko=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Oo=/([\"\'])[^\'\"]+\1/;var _o,So,Eo,Ao=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:u.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:u.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:u.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:u.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:u.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:u.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:u.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:u.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:u.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:u.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:u.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:u.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:u.FILTER},{n:"clipPath",syntax:u.DEFINED_PATH},{n:"textPath",syntax:u.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:u.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"center":t===x.TEXT?"text-anchor":"left top"},l:!0,syntax:u.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===x.CIRCLE||t===x.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:u.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:u.COORDINATE},{n:"cy",int:!0,d:"0",syntax:u.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:u.COORDINATE},{n:"y",int:!0,d:"0",syntax:u.COORDINATE},{n:"z",int:!0,d:"0",syntax:u.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:u.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:u.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:u.COORDINATE},{n:"y1",int:!0,l:!0,syntax:u.COORDINATE},{n:"z1",int:!0,l:!0,syntax:u.COORDINATE},{n:"x2",int:!0,l:!0,syntax:u.COORDINATE},{n:"y2",int:!0,l:!0,syntax:u.COORDINATE},{n:"z2",int:!0,l:!0,syntax:u.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:u.PATH,p:50},{n:"points",l:!0,syntax:u.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:u.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:u.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:u.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:u.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:u.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:u.NUMBER,d:function(t){return t===x.PATH||t===x.POLYGON||t===x.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:u.MARKER},{n:"markerEnd",syntax:u.MARKER},{n:"markerMid",syntax:u.MARKER},{n:"markerStartOffset",syntax:u.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:u.LENGTH,l:!0,int:!0,d:"0"}],Po={},No=new WeakMap,To={},Lo=Ie(function(t){return t.sort(function(t,e){return To[t]-To[e]})}),Co=m(),jo=m(),Fo=m(),_a=function(){function t(){var e=this;Ao.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){To[t]=(Po[t]=e).p||0})},e.unregisterMetadata=function(t){delete Po[t]},e.getPropertySyntax=function(t){return w.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,r,t){var i=this,t=t=void 0===t?{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}:t,a=t.skipUpdateAttribute,e=t.skipParse,o=t.forceUpdateGeometry,t=t.usedAttributes,s=o,o=Object.keys(r);o.forEach(function(t){var e=hr(t);a||(n.attributes[e]=r[t]),!s&&null!=(t=Po[e])&&t.l&&(s=!0)}),e||o.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),(o=Lo(null!=t&&t.length?Array.from(new Set(o.concat(t))):o)).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=i.computeProperty(t,n.computedStyle[t],n))}),s&&this.updateGeometry(n),o.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n)}),n.children.length&&o.forEach(function(e){e in n.parsedStyle&&i.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},e.parseProperty=function(t,e,n){var r,t=Po[t],i=e;return"unset"===(e=""!==e&&!Ae(e)?e:"unset")||"initial"===e||"inherit"===e?i=Yr(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=Yr(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=Po[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof Cr){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))Ae(r)||(e=this.parseProperty(t,ur(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),Ae(s)?void this.addUnresolveProperty(n,t):s}i=o&&this.getPropertySyntax(o);a=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof Cr?e.value:e}return a},e.postProcessProperty=function(t,e){var t=Po[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e)},e.addUnresolveProperty=function(t,e){var n=No.get(t);n||(No.set(t,[]),n=No.get(t)),-1===n.indexOf(e)&&n.push(e)},e.tryToResolveProperty=function(t,e,n){var n=(n=void 0===n?{}:n).inherited;if(n&&(t.parentElement&&function(t,e){t=No.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n},e.recalc=function(e){var n,t=No.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),No.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,l,c,u,f,h,d,p,y,g,m,v=w.geometryUpdaterFactory[t.nodeName];v&&((s=t.geometry).contentBounds||(s.contentBounds=new nr),s.renderBounds||(s.renderBounds=new nr),e=t.parsedStyle,d=(v=v.update(e,t)).width,h=v.height,p=void 0===(p=v.depth)?0:p,f=void 0===(f=v.offsetX)?0:f,m=void 0===(m=v.offsetY)?0:m,v=void 0===(v=v.offsetZ)?0:v,n=d<0,r=h<0,p=kt(Co,Math.abs(d)/2,Math.abs(h)/2,p/2),l=e.stroke,c=e.lineWidth,u=e.increasedLineWidthForHitTesting,g=e.shadowType,y=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,t.nodeName===x.TEXT&&delete e.anchor,d=kt(jo,(1-2*(o&&o[0]||0))*d/2+f,(1-2*(o&&o[1]||0))*h/2+m,(1-2*(o&&o[2]||0))*p[2]+v),s.contentBounds.update(d,p),f=t.nodeName===x.POLYLINE||t.nodeName===x.POLYGON||t.nodeName===x.PATH?Math.SQRT2:.5,l&&!l.isNone&&Ot(p,p,kt(Fo,h=((c||0)+(u||0))*f,h,0)),s.renderBounds.update(d,p),y&&g&&"inner"!==g&&(v=(m=s.renderBounds).min,l=m.max,c=e.shadowBlur||0,u=e.shadowOffsetX||0,f=e.shadowOffsetY||0,h=v[0]-c+u,d=l[0]+c+u,p=v[1]-c+f,y=l[1]+c+f,v[0]=Math.min(v[0],h),l[0]=Math.max(l[0],d),v[1]=Math.min(v[1],p),l[1]=Math.max(l[1],y),s.renderBounds.setMinMax(v,l)),i.forEach(function(t){var e,n,r,i,a,o=t.name,t=t.params;"blur"===o?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,Ot(s.renderBounds.halfExtents,s.renderBounds.halfExtents,b(i,i,0)))):"drop-shadow"===o&&(i=t[0].value,o=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,a=e[1]-t+o,t=n[1]+t+o,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],a),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),o=e.anchor,g=(n?-1:1)*Mi(a[0],0,t),m=(r?-1:1)*Mi(a[1],1,t),g-=(n?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,m-=(r?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(g,m),w.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=Po[t];return!!t&&t.inh},t}();(Ro=_o=_o||{})[Ro.ORBITING=0]="ORBITING",Ro[Ro.EXPLORING=1]="EXPLORING",Ro[Ro.TRACKING=2]="TRACKING",(Ro=So=So||{})[Ro.DEFAULT=0]="DEFAULT",Ro[Ro.ROTATIONAL=1]="ROTATIONAL",Ro[Ro.TRANSLATIONAL=2]="TRANSLATIONAL",Ro[Ro.CINEMATIC=3]="CINEMATIC",(Ro=Eo=Eo||{})[Ro.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",Ro[Ro.PERSPECTIVE=1]="PERSPECTIVE";var Io="updated",Ro=function(){function t(){this.canvas=void 0,this.eventEmitter=new Yn,this.matrix=W(),this.right=b(1,0,0),this.up=b(0,1,0),this.forward=b(0,0,1),this.position=b(0,0,1),this.focalPoint=b(0,0,0),this.distanceVector=b(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=W(),this.projectionMatrixInverse=W(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=_o.EXPLORING,this.trackingMode=So.DEFAULT,this.projectionMode=Eo.PERSPECTIVE,this.frustum=new ir,this.orthoMatrix=W()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===Eo.ORTHOGRAPHIC},e.getProjectionMode=function(){return this.projectionMode},e.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.getFrustum=function(){return this.frustum},e.getPosition=function(){return this.position},e.getFocalPoint=function(){return this.focalPoint},e.getDollyingStep=function(){return this.dollyingStep},e.getNear=function(){return this.near},e.getFar=function(){return this.far},e.getZoom=function(){return this.zoom},e.getOrthoMatrix=function(){return this.orthoMatrix},e.getView=function(){return this.view},e.setEnableUpdate=function(t){this.enableUpdate=t},e.setType=function(t,e){return this.type=t,this.type===_o.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===_o.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==_o.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.getViewTransform=function(){return Y(W(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=lt(W(),[t,e,0]);this.jitteredProjectionMatrix=X(W(),t,this.projectionMatrix)},e.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.setMatrix=function(t){return this.matrix=t,this._update(),this},e.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.setNear=function(t){return this.projectionMode===Eo.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.setFar=function(t){return this.projectionMode===Eo.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.setViewOffset=function(t,e,n,r,i,a){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.projectionMode===Eo.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===Eo.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.setZoom=function(t){return this.zoom=t,this.projectionMode===Eo.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Eo.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=b(t.x-r,t.y-n,0),e=At(i,this.right)/wt(this.right),r=At(i,this.up)/wt(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=Eo.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(Fa(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,Z(this.projectionMatrix,this.projectionMatrix,b(1,-1,1)),Y(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=Eo.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=a;var o,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,o=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=o*this.view.offsetY)-o*this.view.height),mt(this.projectionMatrix,s,n,r,e,i,a),Z(this.projectionMatrix,this.projectionMatrix,b(1,-1,1)),Y(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=ja(t,e=void 0===e?this.position[1]:e,n=void 0===n?this.position[2]:n);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r,i=b(0,1,0);return this.focalPoint=ja(t,e,n),this.trackingMode===So.CINEMATIC&&(t=(r=_t(m(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=wt(r),e=Ia(Math.asin(e/r)),r=90+Ia(Math.atan2(n,t)),st(n=W(),n,Fa(r)),ot(n,n,Fa(e)),i=Nt(m(),[0,1,0],n)),Y(this.matrix,vt(W(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.getDistance=function(){return this.distance},e.getDistanceVector=function(){return this.distanceVector},e.setDistance=function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=m(),t=this.distance,n=this.forward,r=this.focalPoint,e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate()),this},e.setMaxDistance=function(t){return this.maxDistance=t,this},e.setMinDistance=function(t){return this.minDistance=t,this},e.setAzimuth=function(t){return this.azimuth=Ca(t),this.computeMatrix(),this._getAxes(),this.type===_o.ORBITING||this.type===_o.EXPLORING?this._getPosition():this.type===_o.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=Ca(t),this.computeMatrix(),this._getAxes(),this.type===_o.ORBITING||this.type===_o.EXPLORING?this._getPosition():this.type===_o.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=Ca(t),this.computeMatrix(),this._getAxes(),this.type===_o.ORBITING||this.type===_o.EXPLORING?this._getPosition():this.type===_o.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getRoll=function(){return this.roll},e._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.computeMatrix=function(){var t=Bt(Rt(),[0,0,1],Fa(this.roll)),e=(G(this.matrix),Bt(Rt(),[1,0,0],Fa((this.rotateWorld&&this.type!==_o.TRACKING||this.type===_o.TRACKING?1:-1)*this.elevation))),n=Bt(Rt(),[0,1,0],Fa((this.rotateWorld&&this.type!==_o.TRACKING||this.type===_o.TRACKING?1:-1)*this.azimuth)),n=Dt(Rt(),n,e),n=Dt(Rt(),n,t),e=pt(W(),n);this.type===_o.ORBITING||this.type===_o.EXPLORING?($(this.matrix,this.matrix,this.focalPoint),X(this.matrix,this.matrix,e),$(this.matrix,this.matrix,[0,0,this.distance])):this.type===_o.TRACKING&&($(this.matrix,this.matrix,this.position),X(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=ja(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()},e._getAxes=function(){Mt(this.right,ja(It(Ft(),[1,0,0,0],this.matrix))),Mt(this.up,ja(It(Ft(),[0,1,0,0],this.matrix))),Mt(this.forward,ja(It(Ft(),[0,0,1,0],this.matrix))),Et(this.right,this.right),Et(this.up,this.up),Et(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=wt(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===_o.TRACKING||this.rotateWorld?(this.elevation=Ia(Math.asin(e/r)),this.azimuth=Ia(Math.atan2(-t,-n))):(this.elevation=-Ia(Math.asin(e/r)),this.azimuth=-Ia(Math.atan2(-t,-n)))},e._getPosition=function(){Mt(this.position,ja(It(Ft(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;Tt(this.distanceVector,[0,0,-this.distance],(t=j(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Ot(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=_t(m(),this.focalPoint,this.position),this.distance=wt(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===Eo.ORTHOGRAPHIC&&(t=this.position,e=Bt(Rt(),[0,0,1],-this.roll*Math.PI/180),dt(this.orthoMatrix,e,b((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),b(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=X(W(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(Io))},e.rotate=function(t,e,n){throw new Error(gr)},e.pan=function(t,e){throw new Error(gr)},e.dolly=function(t){throw new Error(gr)},e.createLandmark=function(t,e){throw new Error(gr)},e.gotoLandmark=function(t,e){throw new Error(gr)},t}(),Bo=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),Do=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),zo=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}},t}(),Wo=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),Ho=function(){function t(){}return t.prototype.update=function(t){var t=t.points.points,e=Math.min.apply(Math,t.map(function(t){return t[0]})),n=Math.max.apply(Math,t.map(function(t){return t[0]})),r=Math.min.apply(Math,t.map(function(t){return t[1]}));return{width:n-e,height:Math.max.apply(Math,t.map(function(t){return t[1]}))-r}},t}(),Vo=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!Ce(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),Go=function(){function t(t){this.globalRuntime=void 0,this.globalRuntime=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!Ae(t)},e.update=function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=n-e.ascent:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})},t}(),qo=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}this.canvas.width=10,this.canvas.height=10}return this.canvas},e.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t}(),Yo=(0,/\[\s*(.*)=(.*)\s*\]/),Uo=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})},e.is=function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var t=t.match(Yo),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}},e.attributeToString=function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!Ae(t))&&t.toString?t.toString():""},t}(),Xo=function(){function t(t){var o,i,a,r,s,l,c,u,f,n,h,d,y=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new va(ia.BOUNDS_CHANGED),this.rotate=(o=Rt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(Wt(r=Rt(),e[0],e[1],e[2]),i=y.getRotation(t),a=y.getRotation(t.parentNode),Vt(o,a),zt(o,o),Dt(r,o,r),Dt(n.localRotation,r,i),qt(n.localRotation,n.localRotation),y.dirtifyLocal(t,n)):y.rotateLocal(t,e)}),this.rotateLocal=(i=Rt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;Wt(i,e[0],e[1],e[2]),Gt(n.localRotation,n.localRotation,i),y.dirtifyLocal(t,n)}),this.setEulerAngles=(a=Rt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(Wt(n.localRotation,e[0],e[1],e[2]),r=y.getRotation(t.parentNode),Vt(a,zt(Rt(),r)),Gt(n.localRotation,n.localRotation,a),y.dirtifyLocal(t,n)):y.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));var i,a,o,s,l,c,u,f,h,d,p,n=t.transformable;Lt(e,m())||(i=r=e,a=n.localRotation,o=a[0],s=a[1],l=a[2],a=a[3],c=i[0],u=i[1],i=i[2],p=s*(d=o*u-s*c)-l*(h=l*c-o*i),l=l*(f=s*i-l*u)-o*d,o=o*h-s*f,h*=s=2*a,d*=s,l*=2,o*=2,r[0]=c+(f*=s)+(p*=2),r[1]=u+h+l,r[2]=i+d+o,Ot(n.localPosition,n.localPosition,e),y.dirtifyLocal(t,n))},this.setPosition=(r=W(),s=m(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Lt(y.getPosition(t),s)||(Mt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,H(r,e.worldTransform),Y(r,r),Nt(n.localPosition,s,r)):Mt(n.localPosition,s),y.dirtifyLocal(t,n))}),this.setLocalPosition=(l=m(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Lt(n.localPosition,l)||(Mt(n.localPosition,l),y.dirtifyLocal(t,n))}),this.translate=(c=m(),u=m(),f=m(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Lt(e="number"==typeof e?kt(u,e,n,r):e,c)||(Ot(f,y.getPosition(t),e),y.setPosition(t,f))}),this.setRotation=function(){var o=Rt();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=Ht(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=y.getRotation(t.parentNode),Vt(o,n),zt(o,o),Dt(a.localRotation,o,e),qt(a.localRotation,a.localRotation),y.dirtifyLocal(t,a)):y.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=W(),h=m(),d=Ht(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(dt(t.localTransform,t.localRotation,t.localPosition,b(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=G(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),X(t.localTransform,t.localTransform,e)),e=dt(n,d,h,t.localScale,t.origin),X(t.localTransform,t.localTransform,e)):dt(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}var e=t.prototype;return e.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},e.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},e.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},e.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,Ae(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);n=e.sortable,(null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),e=t.transformable;e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t)},e.detach=function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(n.dirty=!0),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)},e.getOrigin=function(t){return t.transformable.origin},e.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;Lt(e,n.origin)||((r=n.origin)[0]=e[0],r[1]=e[1],r[2]=e[2]||0,this.dirtifyLocal(t,n))},e.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;Wt(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)},e.scaleLocal=function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=b(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)},e.setLocalScale=function(t,e){var n=t.transformable,e=b(e[0],e[1],e[2]||n.localScale[2]);Lt(e,n.localScale)||(Mt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=Ht(e,n,r,i));n=t.transformable;Vt(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=Yt(e,n));var r,n=t.transformable;r=n.localSkew,e=e,r[0]=e[0],r[1]=e[1],this.dirtifyLocal(t,n)},e.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)},e.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},e.triggerPendingEvents=function(){function r(t,e){t.isConnected&&!i.has(t.entity)&&(n.boundsChangedEvent.detail=e,(n.boundsChangedEvent.target=t).ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.pendingEvents=[],i.clear()},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0),n=n.parentNode}this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},e.updateDisplayObjectDependency=function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))},e.informDependentDisplayObjects=function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t),t.dispatchEvent(new xa(ia.ATTR_MODIFIED,t,n,n,e,xa.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return ut(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return ht(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return ft(e.scaling,this.getWorldTransform(t,e))},e.getWorldTransform=function(t,e){return((e=void 0===e?t.transformable:e).localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},e.getLocalPosition=function(t){return t.transformable.localPosition},e.getLocalRotation=function(t){return t.transformable.localRotation},e.getLocalScale=function(t){return t.transformable.localScale},e.getLocalSkew=function(t){return t.transformable.localSkew},e.getLocalTransform=function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform},e.setLocalTransform=function(t,e){var n=ut(m(),e),r=ht(Rt(),e),e=ft(m(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},e.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},e.getTransformedGeometryBounds=function(t,e,n){e=this.getGeometryBounds(t,e=void 0===e?!1:e);return nr.isEmpty(e)?null:((n=n||new nr).setFromTransformedAABB(e,this.getWorldTransform(t)),n)},e.getGeometryBounds=function(t,e){t=t.geometry;return((e=void 0===e?!1:e)?t.renderBounds:t.contentBounds||null)||new nr},e.getBounds=function(t,e){var n,r,i=this,a=(void 0===e&&(e=!1),t.renderable);return a.boundsDirty||e||!a.bounds?!a.renderBoundsDirty&&e&&a.renderBounds?a.renderBounds:(n=e?a.renderBounds:a.bounds,r=this.getTransformedGeometryBounds(t,e,n),t.childNodes.forEach(function(t){t=i.getBounds(t,e);t&&(r?r.add(t):(r=n||new nr).update(t.center,t.halfExtents))}),e&&(t=function(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}(t))&&(t=t.style.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new nr)&&(e?a.renderBounds=r:a.bounds=r),e?a.renderBoundsDirty=!1:a.boundsDirty=!1,r):a.bounds},e.getLocalBounds=function(t){if(t.parentNode){var e,n=W(),r=(t.parentNode.transformable&&(n=Y(W(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!nr.isEmpty(r))return(e=new nr).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(nr.isEmpty(i)||(r=new nr).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=r.getMin())[0],t=t[1],n=(r=r.getMax())[0],r=r[1],new or(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new or((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)},e.dirtifyWorldInternal=function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)},e.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},e.sync=function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?X(e.worldTransform,n.worldTransform,e.localTransform):H(e.worldTransform,e.localTransform),e.dirtyFlag=!1)},e.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),$o={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},Zo=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Ko=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),Jo=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),Qo=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!Jo.exec(e)&&!Ko.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=[].concat(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}var e=t.prototype;return e.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,$o.MetricsString+$o.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText($o.BaselineSymbol).width),s=$o.HeightMultiplier*o,o=o*$o.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,f=0,h=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[f+d]){h=!0;break}if(h)break;f+=c}for(n.ascent=o-u,f=r-c,h=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[f+p]){h=!0;break}if(h)break;f-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,f=(e.textPathSide,e.textPathStartOffset,e.leading),f=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=Fe(e)&&e+"px"||"16px",a=Ce(n)?n.split(","):[n],o=a.length-1;0<=o;o--){var s=a[o].trim();!Oo.test(s)&&ko.indexOf(s)<0&&(s='"'+s+'"'),a[o]=s}return r+" "+i+" "+t+" "+e+" "+a.join(",")}(e),d=this.measureFont(h,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=h,e.isOverflowing=!1;var y=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),g=new Array(y.length),m=0;if(!u){for(var v=0;v<y.length;v++){var b=p.measureText(y[v]).width+(y[v].length-1)*c;g[v]=b,m=Math.max(m,b)}var r=m+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(y.length-1)*(x+f),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:h,width:r,height:i,lines:y,lineWidths:g,lineHeight:x+=f,maxLineWidth:m,fontProperties:d,lineMetrics:g.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new or(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength(),u.getPoint(0);for(var M=0;M<y.length;M++)p.measureText(y[M]).width,y[M].length},e.setGraphemeOnPath=function(){},e.wordWrap=function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",f=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),h=0,d=0,p={},y=function(t){return r.getFromCache(t,a,p,l)},g=Array.from(u).reduce(function(t,e){return t+y(e)},0),m=Array.from(t),v=0;v<m.length;v++){var b=m[v],x=t[v-1],w=t[v+1],M=y(b);if(this.isNewline(b)){if(s<=++h){e.isOverflowing=!0;break}d=0,f[h]=""}else{if(0<d&&c<d+M){if(s<=h+1){if(e.isOverflowing=!0,0<g&&g<=c){for(var k=0,O=0,_=0;_<f[h].length;_++){var S=y(f[h][_]);if(c<k+S+g){O=_;break}k+=S}f[h]=(f[h]||"").slice(0,O)+u}break}if(d=0,f[++h]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(f=this.trimToBreakable(f),d=this.sumTextWidthByCache(f[h]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(f=this.trimByKinsokuShorui(f),d+=y(x||""))}d+=M,f[h]=(f[h]||"")+b}}return f.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=$o.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=$o.Newlines.indexOf(t.charCodeAt(0))},e.trimToBreakable=function(t){var e,t=[].concat(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t},e.canBreakInLastChar=function(t){return!t||!Zo.test(t)},e.sumTextWidthByCache=function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)},e.findBreakableIndex=function(t){for(var e=t.length-1;0<=e;e--)if(!Zo.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i},t}(),w={},Bo=(Vo=new Vo,Ho=new Ho,(hc={})[x.CIRCLE]=new Bo,hc[x.ELLIPSE]=new Do,hc[x.RECT]=Vo,hc[x.IMAGE]=Vo,hc[x.GROUP]=Vo,hc[x.LINE]=new zo,hc[x.TEXT]=new Go(w),hc[x.POLYLINE]=Ho,hc[x.POLYGON]=Ho,hc[x.PATH]=new Wo,hc[x.HTML]=null,hc[x.MESH]=null,hc),Go=(Do=new r,Vo=new a,(zo={})[u.PERCENTAGE]=null,zo[u.NUMBER]=new o,zo[u.ANGLE]=new e,zo[u.DEFINED_PATH]=new n,zo[u.PAINT]=Do,zo[u.COLOR]=Do,zo[u.FILTER]=new ta,zo[u.LENGTH]=Vo,zo[u.LENGTH_PERCENTAGE]=Vo,zo[u.LENGTH_PERCENTAGE_12]=new aa,zo[u.LENGTH_PERCENTAGE_14]=new oa,zo[u.COORDINATE]=new sa,zo[u.OFFSET_DISTANCE]=new ca,zo[u.OPACITY_VALUE]=new c,zo[u.PATH]=new ua,zo[u.LIST_OF_POINTS]=new fa,zo[u.SHADOW_BLUR]=new ha,zo[u.TEXT]=new da,zo[u.TEXT_TRANSFORM]=new pa,zo[u.TRANSFORM]=new ya,zo[u.TRANSFORM_ORIGIN]=new na,zo[u.Z_INDEX]=new ga,zo[u.MARKER]=new la,zo),Ho=(w.CameraContribution=Ro,w.AnimationTimeline=null,w.EasingFunction=null,w.offscreenCanvas=new qo,w.displayObjectPool=new ba,w.sceneGraphSelector=new Uo,w.sceneGraphService=new Xo(w),w.textService=new Qo(w),w.geometryUpdaterFactory=Bo,w.CSSPropertySyntaxFactory=Go,w.styleValueRegistry=new _a,w.layoutRegistry=null,function(){function t(){this.context=void 0,this.plugins=[]}var e=t.prototype;return e.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},e.removeAllRenderingPlugins=function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})},t}());function ts(){ts=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=e.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method))return f;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}r=u(r,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;r=r.arg;return r?r.done?(n[e.resultName]=r.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},y=(a(e,r,function(){return this}),Object.getPrototypeOf),y=y&&y(y(M([]))),g=(y&&y!==t&&l.call(y,r)&&(e=y),p.prototype=h.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function M(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:k}}function k(){return{value:void 0,done:!0}}return c(g,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(g),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(g),a(g,i,"Generator"),a(g,r,function(){return this}),a(g,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=M,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:M(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function es(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function ns(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){es(r,e,n,i,a,"next",t)}function a(t){es(r,e,n,i,a,"throw",t)}i(void 0)})}}function rs(){return(rs=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function is(t,e){return(is=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}x.CIRCLE,x.ELLIPSE,x.IMAGE,x.RECT,x.LINE,x.POLYLINE,x.POLYGON,x.TEXT,x.PATH,x.HTML,(Wo=Ab=Ab||{}).READY="ready",Wo.BEFORE_RENDER="beforerender",Wo.AFTER_RENDER="afterrender",Wo.BEFORE_DESTROY="beforedestroy",Wo.AFTER_DESTROY="afterdestroy",Wo.RESIZE="resize",Wo.DIRTY_RECTANGLE="dirtyrectangle",new va(ia.MOUNTED),new va(ia.UNMOUNTED),new va(Ab.BEFORE_RENDER),new va(Ab.AFTER_RENDER);var as=function(){function a(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return a.prototype.apply=function(t){function e(t){var e,a,o,s,l,c,u=t.target,f=u===d,h=f&&i?d:u.closest&&u.closest("[draggable=true]");h&&(e=function(){var e=ns(ts().mark(function t(e){var n,r,i;return ts().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=ve([e.clientX,e.clientY],s),n<=m||r<=g)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",h.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],h.dispatchEvent(e),c=[e.clientX,e.clientY],f){t.next=21;break}return n="pointer"===p?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,d.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(y?d:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",h.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var n=t.renderingService,d=t.renderingContext.root.ownerDocument,r=d.defaultView,t=this.dragndropPluginOptions,p=t.overlap,i=t.isDocumentDraggable,y=t.isDocumentDroppable,g=t.dragstartDistanceThreshold,m=t.dragstartTimeThreshold;n.hooks.init.tapPromise(a.tag,ns(ts().mark(function t(){return ts().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(a.tag,function(){r.removeEventListener("pointerdown",e)})},a}(),os=(as.tag="Dragndrop",function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="dragndrop",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),is(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new as(rs({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},e}(Ho)),ss=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},ls={}.toString,cs=function(t,e){return ls.call(t)==="[object "+e+"]"},us=function(t){return cs(t,"Function")},fs=function(t){return null==t},hs=function(t){return Array.isArray?Array.isArray(t):cs(t,"Array")},ds=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function ps(t,e){if(t)if(hs(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(ds(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}function ys(t){if(hs(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])}function gs(t){if(hs(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])}var ms=function(t){return"object"==typeof t&&null!==t},vs=function(t){if(!ms(t)||!cs(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},bs=function(t){return cs(t,"String")};function xs(t,e,n){return t<e?e:n<t?n:t}var ws=function(t){return cs(t,"Number")},Ms=1e-5;function ks(t,e,n){return void 0===n&&(n=Ms),Math.abs(t-e)<n}function Os(t){return(t=As(t)).charAt(0).toLowerCase()+t.substring(1)}var _s=function(t,e){if(hs(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=us(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}},Ss=function(t,e){if(hs(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=us(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}},Es=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return ps(n,function(t,e){us(n)&&"prototype"===e||r.push(t)}),r},As=function(t){return fs(t)?"":t.toString()};function Ps(t){return null===t}function Ns(t){return void 0===t}function Ts(t){return t instanceof Element||t instanceof HTMLDocument}var Ls=function(t){t=As(t);return t.charAt(0).toUpperCase()+t.substring(1)},Cs={}.toString,js=function(t){return Cs.call(t).replace(/^\[object /,"").replace(/]$/,"")},Fs=Object.prototype,Is=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Fs)};function Rs(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function Bs(t,e,n,r){return e&&Rs(t,e),n&&Rs(t,n),r&&Rs(t,r),t}var Ds=function(t){if("object"!=typeof t||null===t)return t;if(hs(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=Ds(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=Ds(t[i]):e[i]=t[i];return e};function zs(a,o){var s;if(us(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var Ws=5;var I=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||Ws,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&vs(o)?(vs(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):hs(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Hs=function(t,e){if(!ss(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r},Vs=Object.prototype.hasOwnProperty;function Gs(t,e,n){for(var r=0,i=bs(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t}function qs(e,t){var n;return null!==e&&vs(e)?(n={},ps(t,function(t){Ks.call(e,t)&&(n[t]=e[t])}),n):{}}function Ys(t,r){return n=function(t,e,n){return r.includes(n)||(t[n]=e),t},e={},hs(t=t)||vs(t)?(i=e,ps(t,function(t,e){i=n(i,t,e)}),i):t;var n,e,i}function Us(){}function Xs(t){return t}var $s,Zs=function(t,e){if(t===e)return!0;if(t&&e&&!bs(t)&&!bs(e)){if(ss(t)||ss(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=Zs(t[r],e[r]));r++);return n}if(ms(t)||ms(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=Zs(t[i[r]],e[i[r]]));r++);return n}}return!1},Ks=Object.prototype.hasOwnProperty,Js=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function Qs(t){return fs(t)?0:(ss(t)?t:Object.keys(t)).length}var tl=zs(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return($s=$s||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),$s.measureText(bs(t)?t:"").width},function(t,e){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}([t],Es(e=void 0===e?{}:e)).join("")});const el=()=>[["cartesian"]],nl=(el.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]),rl=(nl.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),il=(rl.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),al=(il.props={},()=>[["translate",.5,.5],["reflect"],["translate",-.5,-.5]]),ol=(al.props={},()=>[["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),sl=(ol.props={},()=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5]]),ll=(sl.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[...il(),...nl({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),cl=(ll.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["transpose"],...al(),...nl({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),ul=(cl.props={},()=>[["parallel",0,1,0,1]]),fl=(ul.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),hl=(fl.props={},({focusX:t=0,distortionX:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),dl=(hl.props={},({focusY:t=0,distortionY:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),pl=(dl.props={},({value:e})=>t=>t.map(()=>e)),yl=(pl.props={},({value:e})=>t=>t.map(e)),gl=(yl.props={},({value:e})=>t=>t.map(t=>t[e])),ml=(gl.props={},({value:t})=>()=>t);function vl(t,e){return t.parent===e.parent?1:2}function bl(t,e){return t+e.x}function xl(t,e){return Math.max(t,e.y)}function wl(){var s=vl,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(bl,0)/e.length,t.y=1+n.reduce(xl,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function Ml(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function kl(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=_l)):void 0===e&&(e=Ol);for(var n,r,i,a,o,t=new Al(t),s=[t];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;0<=a;--a)s.push(r=i[a]=new Al(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(El)}function Ol(t){return t.children}function _l(t){return Array.isArray(t)?t[1]:null}function Sl(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function El(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function Al(t){this.data=t,this.depth=this.height=0,this.parent=null}function Pl(t){return null==t?null:Nl(t)}function Nl(t){if("function"!=typeof t)throw new Error;return t}function Tl(){return 0}function Ll(t){return function(){return t}}ml.props={},Al.prototype=kl.prototype={constructor:Al,count:function(){return this.eachAfter(Ml)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return kl(this).eachBefore(Sl)},[Symbol.iterator]:function*(){var t,e,n,r,i,a=[this];do{for(e=a.reverse(),a=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length)}};const Cl=4294967296;function jl(t,e){for(var n,r,i=0,a=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&Il(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Bl(t[0],t[1]);case 3:return Dl(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(Rl(e,t))return[e];for(n=0;n<t.length;++n)if(Fl(e,t[n])&&Rl(Bl(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Fl(Bl(t[n],t[r]),e)&&Fl(Bl(t[n],e),t[r])&&Fl(Bl(t[r],e),t[n])&&Rl(Dl(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function Fl(t,e){var n=t.r-e.r,r=e.x-t.x,e=e.y-t.y;return n<0||n*n<r*r+e*e}function Il(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Rl(t,e){for(var n=0;n<e.length;++n)if(!Il(t,e[n]))return;return 1}function Bl(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function Dl(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,f=i-o,h=i-l,d=e-t,p=n-t,y=r*r+i*i-t*t,a=y-a*a-o*o+e*e,o=y-s*s-l*l+n*n,e=u*f-c*h,y=(f*o-h*a)/(2*e)-r,s=(h*d-f*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,h=s*s+n*n-1,f=2*(t+y*s+l*n),a=y*y+l*l-t*t,o=-(1e-6<Math.abs(h)?(f+Math.sqrt(f*f-4*h*a))/(2*h):a/f);return{x:r+y+s*o,y:i+l+n*o,r:o}}function zl(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Wl(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Hl(t){var e=t._,t=t.next._,n=e.r+t.r,r=(e.x*t.r+t.x*e.r)/n,t=(e.y*t.r+t.y*e.r)/n;return r*r+t*t}function Vl(t){this._=t,this.next=null,this.previous=null}function Gl(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,f,h,d=t[0];if(d.x=0,d.y=0,!(1<a))return d.r;if(r=t[1],d.x=-r.r,r.x=d.r,r.y=0,!(2<a))return d.r+r.r;zl(r,d,i=t[2]),d=new Vl(d),r=new Vl(r),i=new Vl(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){zl(d._,r._,i=t[l]),i=new Vl(i),c=r.next,u=d.previous,f=r._.r,h=d._.r;do{if(f<=h){if(Wl(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}f+=c._.r,c=c.next}else{if(Wl(u._,i._)){((d=u).next=r).previous=d,--l;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=Hl(d);(i=i.next)!==r;)(s=Hl(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=jl(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function ql(t){return Math.sqrt(t.value)}function Yl(){var n=null,r=1,i=1,a=Tl;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Cl)/Cl}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Ul(n)).eachAfter(Xl(a,.5,e)).eachBefore($l(1)):t.eachBefore(Ul(ql)).eachAfter(Xl(Tl,1,e)).eachAfter(Xl(a,t.r/Math.min(r,i),e)).eachBefore($l(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=Pl(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(a="function"==typeof t?t:Ll(+t),e):a},e}function Ul(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Xl(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=Gl(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function $l(n){return function(t){var e=t.parent;t.r*=n,e&&(t.x=e.x+n*t.x,t.y=e.y+n*t.y)}}function Zl(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Kl(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var Jl={depth:-1},Ql={},tc={};function ec(t){return t.id}function nc(t){return t.parentId}function rc(){var g,m=ec,v=nc;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=m,f=v,h=new Map;if(null!=g){const p=c.map((t,e)=>{t=g(t,e,n),e=(t=""+t).length;return"/"===(t=ac(t,e-1)&&!ac(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),y=p.map(ic);var d=new Set(p).add("");for(const r of y)d.has(r)||(d.add(r),p.push(r),y.push(ic(r)),c.push(tc));u=(t,e)=>p[e],f=(t,e)=>y[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new Al(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,h.set(l,h.has(l)?Ql:o)),null!=(s=f(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=h.get(s)))throw new Error("missing: "+s);if(a===Ql)throw new Error("ambiguous: "+s);a.children?a.children.push(o):a.children=[o],o.parent=a}else{if(i)throw new Error("multiple roots");i=o}if(!i)throw new Error("no root");if(null!=g){for(;i.data===tc&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===tc;--t)o.data=null}if(i.parent=Jl,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(El),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(m=Pl(t),e):m},e.parentId=function(t){return arguments.length?(v=Pl(t),e):v},e.path=function(t){return arguments.length?(g=Pl(t),e):g},e}function ic(t){let e=t.length;if(e<2)return"";for(;1<--e&&!ac(t,e););return t.slice(0,e)}function ac(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function oc(t,e){return t.parent===e.parent?1:2}function sc(t){var e=t.children;return e?e[0]:t.t}function lc(t){var e=t.children;return e?e[e.length-1]:t.t}function cc(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function uc(){var h=oc,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new cc(t,0)];e=o.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;0<=i;--i)o.push(n=e.children[i]=new cc(r[i],i)),n.parent=e;return(t.parent=new cc(null,0)).children=[t],t}(t);return s.eachAfter(f),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:h(e,n)/2,i=s-e.x,a=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function f(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,a=0,o=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+h(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+h(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],l=i.m,c=a.m,u=o.m,f=s.m;o=lc(o),i=sc(i),o&&i;)s=sc(s),(a=lc(a)).a=t,0<(r=o.z+u-i.z-l+h(o._,i._))&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}(function(t,e,n){return t.a.parent===e.parent?t.a:n}(o,t,n),t,r),l+=r,c+=r),u+=o.m,l+=i.m,f+=s.m,c+=a.m;o&&!lc(a)&&(a.t=o,a.m+=u-c),i&&!sc(s)&&(s.t=i,s.m+=l-f,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(h=t,e):h},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function fc(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}cc.prototype=Object.create(Al.prototype);var hc=(1+Math.sqrt(5))/2;function dc(t,e,n,r,i,a){for(var o,s,l,c,u,f,h,d,p,y,g,m=[],v=e.children,b=0,x=0,w=v.length,M=e.value;b<w;){for(l=i-n,c=a-r;!(u=v[x++].value)&&x<w;);for(g=(f=h=u)*u*(y=Math.max(c/l,l/c)/(M*t)),p=Math.max(h/g,g/f);x<w;++x){if(u+=s=v[x].value,s<f&&(f=s),h<s&&(h=s),g=u*u*y,p<(d=Math.max(h/g,g/f))){u-=s;break}p=d}m.push(o={value:u,dice:l<c,children:v.slice(b,x)}),o.dice?Kl(o,n,r,i,M?r+=c*u/M:a):fc(o,n,r,M?n+=l*u/M:i,a),M-=u,b=x}return m}var pc=function e(a){function t(t,e,n,r,i){dc(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(hc);function yc(t,e,n,r,i){var a,o,y=t.children,s=y.length,g=new Array(s+1);for(g[0]=o=a=0;a<s;++a)g[a+1]=o+=y[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=y[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=g[e],c=r/2+l,u=e+1,f=n-1;for(;u<f;){var h=u+f>>>1;g[h]<c?u=1+h:f=h}c-g[u-1]<g[u]-c&&e+1<u&&--u;var l=g[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function gc(t,e,n,r,i){(1&t.depth?fc:Kl)(t,e,n,r,i)}var mc=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,f=a.length,h=t.value;++u<f;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?Kl(o,e,n,r,h?n+=(i-n)*o.value/h:i):fc(o,e,n,h?e+=(r-e)*o.value/h:r,i),h-=o.value}else t._squarify=a=dc(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(hc);function vc(t={}){t=t.shapes;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function bc(t={}){return[...vc(t),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function xc(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function wc(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function Mc(t={}){return vc(t)}function kc(){return[{type:"maybeKey"}]}function Oc(t,e){return t.getBandWidth(t.invert(e))}function _c(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:f=r,bandOffsetY:h=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),y=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?Oc(l,a[e]):0;var r=p?Oc(c,o[e]):0,e=y&&s?(Oc(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+f*n+e,i+h*r]}:t=>t}function Sc(t){return parseFloat(t)/100}function Ec(t,e,n,r){const{x:i,y:a}=n,{width:o,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=a[t];return[["string"==typeof e?Sc(e)*o:+e,"string"==typeof t?Sc(t)*s:+t]]})]}function Ac(e){return"function"==typeof e?e:t=>t[e]}function Pc(t,e){return Array.from(t,Ac(e))}function Nc(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const a=Pc(t,e),o=Pc(t,n),s=Pc(t,r);return{links:t.map((t,e)=>({target:o[e],source:a[e],value:s[e]})),nodes:i||Array.from(new Set([...a,...o]),t=>({key:t}))}}function Tc(t,e){return t.getBandWidth(t.invert(e))}const Lc=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[f]=i.getSize(),h=r?r.map(t=>+t/f):null,d=r?(t,e,n)=>{t+=e/2,e=h[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=Tc(c,a[t]),n=e*(u?Tc(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};Lc.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...bc({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...kc(),...wc()],interaction:{shareTooltip:!0}};const Cc=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function jc(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Fc(n){let a,o,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(a=jc,o=(t,e)=>jc(n(t),e),(t,e)=>n(t)-e):(a=n===jc||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Ic,o=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function Ic(){return 0}Cc.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...bc({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...kc(),...wc()],interaction:{shareTooltip:!0}};r=Fc(jc).right;const Rc=Fc(function(t){return null===t?NaN:+t}).center;var Bc=r;function Dc(e,n){let r=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function zc(t,e){t=function(e,n){let r=0,i,a=0,o=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-a,a+=i/++r,o+=i*(t-a));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-a,a+=i/++r,o+=i*(s-a))}if(1<r)return o/(r-1)}(t,e);return t&&Math.sqrt(t)}function Wc(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(void 0===r?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}return[r,i]}class Hc{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){var n=this._partials;let r=0;for(let t=0;t<this._n&&t<32;t++){var i=n[t],a=e+i,i=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);i&&(n[r++]=i),e=a}return n[r]=e,this._n=r+1,this}valueOf(){var t=this._partials;let e=this._n,n,r,i,a=0;if(0<e){for(a=t[--e];0<e&&(n=a,r=t[--e],a=n+r,!(i=r-(a-n))););0<e&&(i<0&&t[e-1]<0||0<i&&0<t[e-1])&&(r=2*i,n=a+r,r==n-a)&&(a=n)}return a}}class Vc extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Gc(this,t))}has(t){return super.has(Gc(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function Gc({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function qc(t){return t}function Yc(t,...e){return $c(t,qc,qc,e)}function Uc(t,e,...n){return $c(t,qc,e,n)}function Xc(t,e,...n){return $c(t,Array.from,e,n)}function $c(t,u,f,h){return function t(e,n){if(n>=h.length)return f(e);var r=new Vc,i=h[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function Zc(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=Jc(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>Jc(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Kc(n))}function Kc(r=jc){if(r===jc)return Jc;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function Jc(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var Qc=Array.prototype.slice;function tu(t){return()=>t}var eu=Math.sqrt(50),nu=Math.sqrt(10),ru=Math.sqrt(2);function iu(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/Math.pow(10,t);return 0<=t?(eu<=n?10:nu<=n?5:ru<=n?2:1)*Math.pow(10,t):-Math.pow(10,-t)/(eu<=n?10:nu<=n?5:ru<=n?2:1)}function au(t){return Math.ceil(Math.log(Dc(t))/Math.LN2)+1}function ou(){var y=qc,g=Wc,m=au;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=y(t[a],a,t);var o=g(i),s=o[0],l=o[1],c=m(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(g===Wc&&([s,l]=function(t,e,n){let r;for(;;){var i=iu(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(s,l,u)),(c=function(n,r,t){var e,i,a,o,s=-1;if(t=+t,(n=+n)===(r=+r)&&0<t)return[n];if((e=r<n)&&(i=n,n=r,r=i),0===(o=iu(n,r,t))||!isFinite(o))return[];if(0<o){let t=Math.round(n/o),e=Math.round(r/o);for(t*o<n&&++t,e*o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)*o}else{o=-o;let t=Math.round(n*o),e=Math.round(r*o);for(t/o<n&&++t,e/o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)/o}return e&&a.reverse(),a}(s,l,u))[0]<=s&&(n=iu(s,l,u)),c[c.length-1]>=l)if(l<=o&&g===Wc){const n=iu(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var f=c.length;c[0]<=s;)c.shift(),--f;for(;c[f-1]>l;)c.pop(),--f;var h,d,p=new Array(f+1);for(a=0;a<=f;++a)(h=p[a]=[]).x0=0<a?c[a-1]:s,h.x1=a<f?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&p[Math.min(f,Math.floor((e-s)/n))].push(t[a]);else if(n<0)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&(d=Math.floor((s-e)*n),p[Math.min(f,d+(c[d]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&p[Bc(c,e,0,f)].push(t[a]);return p}return e.value=function(t){return arguments.length?(y="function"==typeof t?t:tu(t),e):y},e.domain=function(t){return arguments.length?(g="function"==typeof t?t:tu([t[0],t[1]]),e):g},e.thresholds=function(t){return arguments.length?(m="function"==typeof t?t:Array.isArray(t)?tu(Qc.call(t)):tu(t),e):m},e}function su(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function lu(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function cu(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function uu(n,r,i=0,a=n.length-1,o){for(o=void 0===o?Jc:Kc(o);i<a;){600<a-i&&(s=a-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),u=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1),uu(n,r,Math.max(i,Math.floor(r-l*c/s+u)),Math.min(a,Math.floor(r+(s-l)*c/s+u)),o));var s,l,c,u,f=n[r];let t=i,e=a;for(fu(n,i,r),0<o(n[a],f)&&fu(n,i,a);t<e;){for(fu(n,t,e),++t,--e;o(n[t],f)<0;)++t;for(;0<o(n[e],f);)--e}0===o(n[i],f)?fu(n,i,e):fu(n,++e,a),e<=r&&(i=e+1),r<=e&&(a=e-1)}return n}function fu(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function hu(t,e,n){var r;if(n=(t=Float64Array.from(function*(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}(t,n))).length)return(e=+e)<=0||n<2?cu(t):1<=e?su(t):(n=(n-1)*e,(r=su(uu(t,e=Math.floor(n)).subarray(0,e+1)))+(cu(t.subarray(e+1))-r)*(n-e))}function du(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(a=+a)>=a&&(++r,i+=a)}if(r)return i/r}function pu(t,e){return hu(t,.5,e)}function yu(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function gu(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function mu(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function vu(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function bu(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function xu(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function wu(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function Mu(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function ku(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function Ou(t){return wu(t)||bu(t)}const _u=(t,e,n,r)=>{var i;const{series:a,x:o,y:s}=n;var{x:n,y:e}=e;if(void 0===o||void 0===s)throw new Error("Missing encode for x or y channel.");var t=a?Array.from(Yc(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},Su=(t,e,n,i)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===a.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=a.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},Eu=()=>(t,e,n,r)=>{return(Mu(r)?Su:_u)(t,e,n,r)};Eu.props={defaultShape:"line",defaultLabelShape:"label",channels:[...bc({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...kc(),...wc(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,showCrosshairs:!0}};const Au=y=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[f,h]=o.getSize(),d=_c(e,n,y),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/f,r=r/h,a=[e-i,n-r],e=[e+i,n+r];return[o.map(d(a,t)),o.map(d(e,t))]}):Array.from(t,t=>[o.map(d(p(t),t))])]};Au.props={defaultShape:"hollow",defaultLabelShape:"label",channels:[...bc({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...kc(),{type:"maybeSize"},...xc()]};const Pu=s=>{const{cartesian:l=!1}=s;return l?Ec:(t,e,n,r)=>{if(l)return Ec(t,0,n,r);const{x:i,y:a}=n,o=_c(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Pu.props={defaultShape:"text",defaultLabelShape:"label",channels:[...bc({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...kc(),...xc()]};const Nu=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};Nu.props={defaultShape:"cell",defaultLabelShape:"label",channels:[...bc({shapes:["rect","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...kc(),...xc()]};const Tu=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,series:r}=n;n=r?Array.from(Yc(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=a.map([+o[i],+s[i]]),r[n+t]=a.map([+o[i],+l[i]])}return r}),n]};Tu.props={defaultShape:"area",defaultLabelShape:"label",channels:[...bc({shapes:["area","smooth"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...kc(),...wc()],interaction:{shareTooltip:!0,seriesTooltip:!0,showCrosshairs:!0}};const Lu=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=_c(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};Lu.props={defaultShape:"link",defaultLabelShape:"label",channels:[...bc({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...kc(),...xc()]};const Cu=s=>{var t=s["cartesian"];return t?Ec:(t,e,n,r)=>{const{x:i,y:a}=n,o=_c(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Cu.props={defaultShape:"image",defaultLabelShape:"label",channels:[...bc({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...kc(),...xc()]};const ju=()=>(t,e,n,a)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<o.length;t++){var r=o[t][e];if(void 0===r)break;var i=s[t][e];n.push(a.map([+r,+i]))}return n});return[t,n]};ju.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[...bc({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...kc(),...xc()]};const Fu=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:f,y3:h,y4:d,series:p}=n,y=e.x,g=e.series;return[t,Array.from(t,t=>{var e=y.getBandWidth(y.invert(+l[t])),n=e*(g?g.getBandWidth(g.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+f[t],+h[t],+d[t]];return[[e-n/2,o],[e+n/2,o],[e,o],[e,a],[e-n/2,a],[e+n/2,a],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},Iu=(Fu.props={defaultShape:"box",defaultLabelShape:"label",channels:[...bc({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroX"}],postInference:[...kc(),...wc()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});Iu.props={defaultShape:"vector",defaultLabelShape:"label",channels:[...bc({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...kc(),...xc()]};const Ru=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};Ru.props={defaultShape:"line",defaultLabelShape:"label",channels:[...Mc({shapes:["line"]}),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...kc()]};const Bu=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};Bu.props={defaultShape:"line",defaultLabelShape:"label",channels:[...Mc({shapes:["line"]}),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...kc()]};const Du=(...t)=>Lu(...t);function zu(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:a}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+e]}}function Wu(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=zu("x",r,n,e.x),o=zu("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=a(t),[t,r]=o(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}Du.props={defaultShape:"connector",defaultLabelShape:"label",channels:[...Mc({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...kc()]};const Hu=()=>Wu();Hu.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Mc({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...kc()]};const Vu=()=>Wu({extendY:!0});Vu.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Mc({shapes:["range"]}),{name:"x",required:!0}],preInference:[],postInference:[...kc()]};const Gu=()=>Wu({extendX:!0});function qu(t){return t.target.depth}function Yu(t,e){return t.sourceLinks.length?t.depth:e-1}function Uu(t){return function(){return t}}function Xu(t,e){return Zu(t.source,e.source)||t.index-e.index}function $u(t,e){return Zu(t.target,e.target)||t.index-e.index}function Zu(t,e){return t.y0-e.y0}function Ku(t){return t.value}function Ju(t){return t.index}function Qu(t){return t.nodes}function tf(t){return t.links}function ef(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function nf({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function rf(){let x=0,w=0,M=1,k=1,O=24,_=8,S,E=Ju,A=Yu,P,N,T,L=Qu,C=tf,j=6;function e(e){e={nodes:L(e),links:C(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const y=new Map(i.map(t=>[E(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=ef(y,n)),"object"!=typeof r&&(r=t.target=ef(y,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=T)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(T),r.sort(T)}t=e.nodes;for(const g of t)g.value=void 0===g.fixedValue?Math.max(mu(g.sourceLinks,Ku),mu(g.targetLinks,Ku)):g.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(P){var s,l=Math.max(su(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=P.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(su(t,t=>t.depth)+1,0),n=(M-x-O)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const a of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,a,e))));a.layer=i,a.x0=x+i*n,a.x1=a.x0+O,r[i]?r[i].push(a):r[i]=[a]}if(N)for(const o of r)o.sort(N);return r}(e),t=(S=Math.min(_,(k-w)/(su(u,t=>t.length)-1)),u),f=cu(t,t=>(k-w-(t.length-1)*S)/mu(t,Ku));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*f,e=v.y1+S;for(const b of v.sourceLinks)b.width=b.value*f}e=(k-e+S)/(m.length+1);for(let t=0;t<m.length;++t){var h=m[t];h.y0+=e*(t+1),h.y1+=e*(t+1)}!function(t){if(void 0===T)for(var{sourceLinks:e,targetLinks:n}of t)e.sort($u),n.sort(Xu)}(m)}for(let t=0;t<j;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/j);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===N&&o.sort(Zu),o.length&&F(o,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var a,o=n[t];for(const c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===N&&o.sort(Zu),o.length&&F(o,i)}}(u,d,p)}return nf(e),e}function F(t,e){var n=t.length>>1,r=t[n];a(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),a(t,k,t.length-1,e),i(t,w,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],a=(e-i.y0)*r;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+S}}function a(t,e,n,r){for(;0<=n;--n){var i=t[n],a=(i.y1-e)*r;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-S}}function I({sourceLinks:t,targetLinks:e}){if(void 0===T){for(const{source:{sourceLinks:t}}of e)t.sort($u);for(const{target:{targetLinks:e}}of t)e.sort(Xu)}}return e.update=function(t){return nf(t),t},e.nodeId=function(t){return arguments.length?(E="function"==typeof t?t:Uu(t),e):E},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:Uu(t),e):A},e.nodeDepth=function(t){return arguments.length?(P=t,e):P},e.nodeSort=function(t){return arguments.length?(N=t,e):N},e.nodeWidth=function(t){return arguments.length?(O=+t,e):O},e.nodePadding=function(t){return arguments.length?(_=S=+t,e):_},e.nodes=function(t){return arguments.length?(L="function"==typeof t?t:Uu(t),e):L},e.links=function(t){return arguments.length?(C="function"==typeof t?t:Uu(t),e):C},e.linkSort=function(t){return arguments.length?(T=t,e):T},e.size=function(t){return arguments.length?(x=w=0,M=+t[0],k=+t[1],e):[M-x,k-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],M=+t[1][0],w=+t[0][1],k=+t[1][1],e):[[x,w],[M,k]]},e.iterations=function(t){return arguments.length?(j=+t,e):j},e}Gu.props={defaultShape:"range",defaultLabelShape:"label",channels:[...Mc({shapes:["range"]}),{name:"y",required:!0}],preInference:[],postInference:[...kc()]};const af={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},of={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?cu(t.sourceLinks,qu)-1:0},justify:Yu};const sf=f=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},af,f),l=rf().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?of[n]||Yu:"function"==c?n:Yu).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function lf(t){return t}function cf(t=""){throw new Error(t)}function uf(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function ff(t){return null!=t&&!Number.isNaN(t)}function J(t,e){return hf(t,e)||{}}function hf(t,n){t=Object.entries(t).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Os(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function df(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}sf.props={};const pf=g=>{const m={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},v={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},b={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:null}},x={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=g,{links:t,nodes:l}=Nc(t,e),c=J(e,"node"),e=J(e,"link"),{key:u=t=>t.key,color:f=u}=c,{links:i,nodes:t}=sf(Object.assign(Object.assign(Object.assign({},m),{nodeId:Ac(u)}),i))({links:t,nodes:l});const h=J(r,"label"),{text:d=u,spacing:p=5}=h,y=K(h,["text","spacing"]);return[I({},v,{data:t,encode:Object.assign(Object.assign({},c),{color:f}),scale:n,style:J(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},x),{text:d,dx:t=>t.x[0]<.5?p:-p}),y),...a],animate:"object"==typeof s?J(s,"node"):s,axis:!1}),I({},b,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa"},J(r,"link")),animate:"object"==typeof s?J(s,"link"):s})]}},yf=(pf.props={composite:!0},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);yf.props={defaultShape:"path",defaultLabelShape:"label",channels:[...bc({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[],postInference:[...kc()]};const gf=t=>t?parseInt(t):0;function mf(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||gf(t.width),e=e.clientHeight||gf(t.height),{width:(i={width:i-(gf(t.paddingLeft)+gf(t.paddingRight)),height:e-(gf(t.paddingLeft)+gf(t.paddingRight))}).width,height:i.height}):{width:n,height:r}}function vf(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:f=u,insetRight:h=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-f-h,height:t-a-n-c-o-d-u}}function bf(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,f,h,d,n=function(t,e){var n={treemapBinary:yc,treemapDice:Kl,treemapSlice:fc,treemapSliceDice:gc,treemapSquarify:pc,treemapResquarify:mc};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?rc().path(p):rc():kl)(t));function y(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(g),l=[0],i&&t.eachBefore(Zl),t}function g(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=f(t)-e)<n&&(n=i=(n+i)/2),(a-=h(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:t[r]).sort(e.sort):p.count(),o=pc,i=!1,s=a=1,l=[0],d=h=f=u=c=Tl,y.round=function(t){return arguments.length?(i=!!t,y):i},y.size=function(t){return arguments.length?(a=+t[0],s=+t[1],y):[a,s]},y.tile=function(t){return arguments.length?(o=Nl(t),y):o},y.padding=function(t){return arguments.length?y.paddingInner(t).paddingOuter(t):y.paddingInner()},y.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:Ll(+t),y):c},y.paddingOuter=function(t){return arguments.length?y.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):y.paddingTop()},y.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:Ll(+t),y):u},y.paddingRight=function(t){return arguments.length?(f="function"==typeof t?t:Ll(+t),y):f},y.paddingBottom=function(t){return arguments.length?(h="function"==typeof t?t:Ll(+t),y):h},y.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:Ll(+t),y):d},y.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const xf=u=>t=>{var{width:t,height:e}=vf(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[]}=u,l=K(u,["data","encode","scale","style","layout","labels"]),c={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=bf(n,I({},c,o),r),n=J(a,"label");return[I({},t,Object.assign(Object.assign({data:e,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0,lineHeight:t=>t.y1-t.y0}),n),...s]},l),{axis:!1}))]},wf=(xf.props={composite:!0},u=>t=>{var{width:t,height:e}=vf(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[]}=u,l=K(u,["data","encode","scale","style","layout","labels"]),c={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(hs(t)?rc().path(e.path):kl)(t);return r?n.sum(t=>t[r]).sort(e.sort):n.count(),Yl().size(e.size).padding(e.padding)(n),n.descendants()})(n,I({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),I({},c.encode,r)),t=J(a,"label");return[I({},c,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r,lineHeight:t=>2*t.r}),t),...s]},l),{axis:!1}))]});function Mf(t,e){return cu(t,t=>e[t])}function kf(t,e){return su(t,t=>e[t])}function Of(t,e){const n=2.5*_f(t,e)-1.5*Ef(t,e);return cu(t,t=>e[t]>=n?e[t]:NaN)}function _f(t,e){return hu(t,.25,t=>e[t])}function Sf(t,e){return hu(t,.5,t=>e[t])}function Ef(t,e){return hu(t,.75,t=>e[t])}function Af(t,e){const n=2.5*Ef(t,e)-1.5*_f(t,e);return su(t,t=>e[t]<=n?e[t]:NaN)}function Pf(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(Yc(t,t=>a[+t]).values()).flatMap(t=>{const e=Of(t,i),n=Af(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}wf.props={composite:!0};const Nf=o=>()=>{var{data:t,encode:e,style:n={}}=o,{extend:r=!1}=n,n=K(n,["extend"]),i=e["y"],i={y:i,y1:i,y2:i,y3:i,y4:i},a={y1:_f,y2:Sf,y3:Ef};return r?[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:Mf},a),{y4:kf})],encode:Object.assign(Object.assign({},e),i),style:n}]:(r=J(n,"box"),n=J(n,"point"),[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:Of},a),{y4:Af})],encode:Object.assign(Object.assign({},e),i),style:r},{type:"point",data:t,transform:[{type:Pf}],encode:e,style:Object.assign({},n)}])},Tf=(Nf.props={composite:!0},s=>{var t=s["cartesian"];return t?Ec:(t,e,n,r)=>{const{x:i,y:a}=n,o=_c(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function Lf(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,f,h,d=t._root,p={data:r},y=t._x0,g=t._y0,m=t._x1,v=t._y1;if(d){for(;d.length;)if((c=e>=(a=(y+m)/2))?y=a:m=a,(u=n>=(o=(g+v)/2))?g=o:v=o,!(d=(i=d)[f=u<<1|c]))return i[f]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[f]=p:t._root=p;else{for(;i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(y+m)/2))?y=a:m=a,(u=n>=(o=(g+v)/2))?g=o:v=o,(f=u<<1|c)==(h=(o<=l)<<1|a<=s););i[h]=d,i[f]=p}}else t._root=p}return t}function Cf(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function jf(t){return t[0]}function Ff(t){return t[1]}function If(t,e,n){e=new Rf(null==e?jf:e,null==n?Ff:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function Rf(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Bf(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}Tf.props={defaultShape:"shape",defaultLabelShape:"label",channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};a=If.prototype=Rf.prototype;function Df(t){return function(){return t}}function zf(t){return 1e-6*(t()-.5)}function Wf(t){return t.index}function Hf(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function Vf(c){var u,f,a,o,h,d,s=Wf,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Df(30),p=1;function e(t){for(var e=0,n=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||zf(d),o=i.y+i.vy-r.y-r.vy||zf(d),a*=s=((s=Math.sqrt(a*a+o*o))-f[l])/s*t*u[l],o*=s,i.vx-=a*(s=h[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=Hf(r,t.source)),"object"!=typeof t.target&&(t.target=Hf(r,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(i=0,h=new Array(n);i<n;++i)t=c[i],h[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),f=new Array(n),y()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function y(){if(a)for(var t=0,e=c.length;t<e;++t)f[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:Df(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Df(+t),y(),e):r},e}a.copy=function(){var t,e,n=new Rf(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Bf(e));else n._root=Bf(r);return n},a.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Lf(this.cover(e,n),e,n,t)},a.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)Lf(this,i[u],a[u],t[u]);return this},a.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},a.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},a.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},a.find=function(t,e,n){var r,i,a,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,y=[],g=this._root;for(g&&y.push(new Cf(g,f,h,d,p)),null==n?n=1/0:(f=t-n,h=e-n,d=t+n,p=e+n,n*=n);r=y.pop();)!(g=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<f||(i=r.y1)<h||(g.length?(y.push(new Cf(g[3],a=(s+o)/2,c=(l+i)/2,o,i),new Cf(g[2],s,c,a,i),new Cf(g[1],a,l,o,c),new Cf(g[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=y[y.length-1],y[y.length-1]=y[y.length-1-i],y[y.length-1-i]=r)):(l=(o=t-+this._x.call(null,g.data))*o+(s=e-+this._y.call(null,g.data))*s)<n&&(f=t-(c=Math.sqrt(n=l)),h=e-c,d=t+c,p=e+c,u=g.data));return u},a.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,f,h=this._root,d=this._x0,p=this._y0,y=this._x1,g=this._y1;if(h){if(h.length)for(;;){if((l=a>=(s=(d+y)/2))?d=s:y=s,(c=o>=(s=(p+g)/2))?p=s:g=s,!(h=(e=h)[u=c<<1|l]))return this;if(!h.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;h.data!==t;)if(!(h=(r=h).next))return this;(i=h.next)&&delete h.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[f]=h:this._root=h)):this._root=i}}return this},a.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},a.root=function(){return this._root},a.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},a.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new Cf(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new Cf(e,o,s,i,a)),(e=c[2])&&l.push(new Cf(e,n,s,o,a)),(e=c[1])&&l.push(new Cf(e,o,r,i,s)),e=c[0])&&l.push(new Cf(e,n,r,o,s));return this},a.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Cf(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,f=e.node;f.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=f[0])&&n.push(new Cf(i,a,o,c,u)),(i=f[1])&&n.push(new Cf(i,c,o,s,u)),(i=f[2])&&n.push(new Cf(i,a,u,c,l)),i=f[3])&&n.push(new Cf(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},a.x=function(t){return arguments.length?(this._x=t,this):this._x},a.y=function(t){return arguments.length?(this._y=t,this):this._y};var Gf={value:()=>{}};function qf(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Yf(r)}function Yf(t){this._=t}function Uf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Gf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Yf.prototype=qf.prototype={constructor:Yf,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=Uf(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Uf(i[n],t.name,null);return this}for(;++o<s;)if(n=(n=(t=a[o]).type)&&function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name))return n},copy:function(){var t,e={},n=this._;for(t in n)e[t]=n[t].slice();return new Yf(e)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var Xf,$f,Zf=0,Kf=0,Jf=0,Qf=1e3,th=0,eh=0,nh=0,rh="object"==typeof performance&&performance.now?performance:Date,ih="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ah(){return eh||(ih(oh),eh=rh.now()+nh)}function oh(){eh=0}function sh(){this._call=this._time=this._next=null}function lh(t,e,n){var r=new sh;return r.restart(t,e,n),r}function ch(){eh=(th=rh.now())+nh,Zf=Kf=0;try{ah(),++Zf;for(var t,e=Xf;e;)0<=(t=eh-e._time)&&e._call.call(void 0,t),e=e._next;--Zf}finally{for(var n,r,i=Xf,a=1/(Zf=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:Xf=r);$f=n,fh(a),eh=0}}function uh(){var t=rh.now(),e=t-th;Qf<e&&(nh-=e,th=t)}function fh(t){Zf||(Kf=Kf&&clearTimeout(Kf),24<t-eh?(t<1/0&&(Kf=setTimeout(ch,t-rh.now()-nh)),Jf=Jf&&clearInterval(Jf)):(Jf||(th=rh.now(),Jf=setInterval(uh,Qf)),Zf=1,ih(ch)))}sh.prototype=lh.prototype={constructor:sh,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?ah():+n)+(null==e?0:+e),this._next||$f===this||($f?$f._next=this:Xf=this,$f=this),this._call=t,this._time=n,fh()},stop:function(){this._call&&(this._call=null,this._time=1/0,fh())}};const hh=4294967296;function dh(t){return t.x}function ph(t){return t.y}var yh=10,gh=Math.PI*(3-Math.sqrt(5));function mh(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,f=new Map,t=lh(i),n=qf("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%hh)/hh}();function i(){h(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function h(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,f.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=yh*Math.sqrt(.5+r),e=r*gh,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:h,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),f.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,f.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?f.delete(t):f.set(t,p(e)),a):f.get(t)},find:function(t,e,n){var r,i,a,o=0,s=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function vh(t,e,n){var i,l,c,u,f,r,h,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,I=(r=Df(-30),d=(h=1)/0,p=.81,y.initialize=function(t,e){i=t,c=e,R()},y.strength=function(t){return arguments.length?(r="function"==typeof t?t:Df(+t),R(),y):r},y.distanceMin=function(t){return arguments.length?(h=t*t,y):Math.sqrt(h)},y.distanceMax=function(t){return arguments.length?(d=t*t,y):Math.sqrt(d)},y.theta=function(t){return arguments.length?(p=t*t,y):Math.sqrt(p)},y);function y(t){var e,n=i.length,r=If(i,dh,ph).visitAfter(B);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function R(){if(i){var t,e,n=i.length;for(f=new Array(n),t=0;t<n;++t)e=i[t],f[e.index]=+r(e,t,i)}}function B(t){var e,n,r,i,a,o=0,s=0;if(t.length){for(r=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(o+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;o+=f[e.data.index],e=e.next;);t.value=o}function D(t,e,n,r){if(!t.value)return!0;var i=t.x-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=zf(c))*i),0===a&&(s+=(a=zf(c))*a),s<h&&(s=Math.sqrt(h*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=zf(c))*i),0===a&&(s+=(a=zf(c))*a),s<h)&&(s=Math.sqrt(h*s));t.data!==l&&(o=f[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var g,m,v,b,x,w,M,k,O,_,S,E,A,P,n=Vf(a).id(Ac(n)),N=("function"==typeof o&&I.strength(o),"function"==typeof s&&n.strength(s),mh(t).force("link",n).force("charge",I));function T(t){for(var e,n=0,r=m.length;n<r;++n)(e=m[n]).vy+=(b[n]-e.y)*v[n]*t}function L(){if(m){var t,e=m.length;for(v=new Array(e),b=new Array(e),t=0;t<e;++t)v[t]=isNaN(b[t]=+g(m[t],t,m))?0:+x(m[t],t,m)}}function C(t){for(var e,n=0,r=M.length;n<r;++n)(e=M[n]).vx+=(O[n]-e.x)*k[n]*t}function j(){if(M){var t,e=M.length;for(k=new Array(e),O=new Array(e),t=0;t<e;++t)k[t]=isNaN(O[t]=+w(M[t],t,M))?0:+_(M[t],t,M)}}function F(){for(var t,e=A.length,n=0,r=0,i=0;i<e;++i)n+=(t=A[i]).x,r+=t.y;for(n=(n/e-S)*P,r=(r/e-E)*P,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?N.force("center",(P=1,null==S&&(S=0),null==E&&(E=0),F.initialize=function(t){A=t},F.x=function(t){return arguments.length?(S=+t,F):S},F.y=function(t){return arguments.length?(E=+t,F):E},F.strength=function(t){return arguments.length?(P=+t,F):P},F)):N.force("x",(_=Df(.1),"function"!=typeof w&&(w=Df(null==w?0:+w)),C.initialize=function(t){M=t,j()},C.strength=function(t){return arguments.length?(_="function"==typeof t?t:Df(+t),j(),C):_},C.x=function(t){return arguments.length?(w="function"==typeof t?t:Df(+t),j(),C):w},C)).force("y",(x=Df(.1),"function"!=typeof g&&(g=Df(null==g?0:+g)),T.initialize=function(t){m=t,L()},T.strength=function(t){return arguments.length?(x="function"==typeof t?t:Df(+t),L(),T):x},T.y=function(t){return arguments.length?(g="function"==typeof t?t:Df(+t),L(),T):g},T)),N.stop();var z=Math.ceil(Math.log(N.alphaMin())/Math.log(1-N.alphaDecay()));for(let t=0;t<z;t++)N.tick();return{nodesData:t,linksData:a}}const bh=f=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=f,l=J(e,"node"),c=J(e,"link"),{links:t,nodes:u}=Nc(t,e),{nodesData:t,linksData:u}=vh({links:t,nodes:u},I({},{joint:!0},i),e);return[I({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:u,encode:c,labels:o,style:J(r,"link"),animate:"object"==typeof s?J(s,"link"):s}),I({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},l),scale:n,style:J(r,"node"),labels:[Object.assign(Object.assign({},{text:""}),J(r,"label")),...a],animate:"object"==typeof s?J(s,"node"):s})]},xh=(bh.props={composite:!0},f=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=kl(t,t=>t.children).sum(t=>t[e]).sort(i),l=f();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),wh=t=>xh(wl)(t),Mh=(wh.props={},t=>xh(uc)(t)),kh=(Mh.props={},c=>{const u={sortBy:(t,e)=>e.value-t.value},f={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},h={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},d={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=c,l=null==e?void 0:e.value,{nodes:i,edges:l}=Mh(Object.assign(Object.assign(Object.assign({},u),i),{field:l}))(t);return[I({},h,{data:l,encode:J(e,"link"),scale:J(n,"link"),labels:o,style:Object.assign({stroke:"#999"},J(r,"link")),animate:"object"==typeof s?J(s,"link"):s}),I({},f,{data:i,scale:J(n,"node"),encode:J(e,"node"),labels:[Object.assign(Object.assign({},d),J(r,"label")),...a],style:Object.assign({},J(r,"node")),animate:"object"==typeof s?J(s,"node"):s})]}});kh.props={composite:!0};var Oh={},_h={},Sh=34,Eh=10,Ah=13;function Ph(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function Nh(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function Th(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function Lh(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Th(-e,6):9999<e?"+"+Th(e,6):Th(e,4))+"-"+Th(t.getUTCMonth()+1,2)+"-"+Th(t.getUTCDate(),2)+(a?"T"+Th(n,2)+":"+Th(r,2)+":"+Th(i,2)+"."+Th(a,3)+"Z":i?"T"+Th(n,2)+":"+Th(r,2)+":"+Th(i,2)+"Z":r||n?"T"+Th(n,2)+":"+Th(r,2)+"Z":"")}function Ch(r){var e=new RegExp('["'+r+"\n\r]"),f=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,l=!1;function c(){if(s)return _h;if(l)return l=!1,Oh;var t,e,n=a;if(r.charCodeAt(n)===Sh){for(;a++<i&&r.charCodeAt(a)!==Sh||r.charCodeAt(++a)===Sh;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===Eh?l=!0:e===Ah&&(l=!0,r.charCodeAt(a)===Eh)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===Eh)l=!0;else if(e===Ah)l=!0,r.charCodeAt(a)===Eh&&++a;else if(e!==f)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===Eh&&--i,r.charCodeAt(i-1)===Ah&&--i;(e=c())!==_h;){for(var u=[];e!==Oh&&e!==_h;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?Lh(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,a){var o,s;return(t=n(t,function(t,e){if(o)return o(t,e-1);var n,r,i;s=t,o=a?(r=a,i=Ph(n=t),function(t,e){return r(i(t),e,n)}):Ph(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?Nh(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?Nh(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function jh(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Fh&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const Fh=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),Ih=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>ne(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),Ch(i).parse(t,a?jh:lf);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};Ih.props={};const Rh=t=>{const{fields:a,as:n=[]}=t;return t=>{if(!a||(e=a,0===Object.keys(e).length))return t;var e;const[r="key",i="value"]=n;return t.reduce((e,n)=>{for(let t=0;t<a.length;t++)e.push(Object.assign(Object.assign({},n),{[r]:a[t],[i]:n[a[t]]}));return e},[])}};Rh.props={};const Bh=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)};function Dh(t,e,n){return Math.min(n,Math.max(e,t))}Bh.props={};const zh=i=>t=>{const{fields:e=[]}=i;let{start:n=0,end:r=t.length}=i;n=Dh(n,0,t.length-1),r=Dh(r,1,t.length),n>r&&([n,r]=[r,n]);return t.filter((t,e)=>e>=n&&e<r).map(n=>e.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{}))},Wh=(zh.props={},t=>{t=t.fields;return zh({fields:t})});Wh.props={};const Hh=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};Hh.props={};const Vh=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}},Gh=(Vh.props={},t=>{const e=t["value"];return()=>e}),qh=(Gh.props={},t=>{const{callback:e=lf}=t;return t=>e(t)}),Yh=(qh.props={},t=>{const{callback:e=lf}=t;return t=>Array.isArray(t)?t.map(e):t});Yh.props={};var Uh=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const Xh={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function $h(t){const{y:c,thickness:u,weight:f,marginRatio:h,id:d,source:p,target:y,sourceWeight:g,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},Xh),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=y(t),t.sourceWeight=g(t),t.targetWeight=m(t)});const i=Yc(r,t=>t.source),a=Yc(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=a.has(t.id)?a.get(t.id):[];t.frequency=e.length+n.length,t.value=mu(e,t=>t.sourceWeight)+mu(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:Uh[v])&&r.sort(n),!(n=(r=e).length))throw cf("Invalid nodes: it's empty!");if(f){const o=h/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-h),e.height=u;var n=o+t,r=n+e.width,i=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!f)return e.forEach(t=>{var e=p(t),n=y(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=Yc(e,t=>t.source),l=Yc(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const Zh=e=>t=>$h(e)(t),Kh=(Zh.props={},Math.PI/180),Jh=64,Qh=2048;function td(t){return t.text}function ed(){return"serif"}function nd(){return"normal"}function rd(t){return t.value}function id(){return 90*~~(2*Math.random())}function ad(){return 1}function od(){}function sd(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(Jh<<5)/c,Qh/c);let i=0,a=0,n=0;var u,f,h,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*Kh),h=Math.cos(o.rotate*Kh),u=t*h,f=t*d,h=e*h,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(f+h),Math.abs(f-h))):t=t+31>>5<<5,e>n&&(n=e),i+t>=Jh<<5&&(i=0,a+=n,n=0),a+e>=Qh)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*Kh),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(Jh<<5)/c,Qh/c).data,y=[];0<=--s;)if((o=r[s]).hasText){var g=o.width,m=g>>5;let n=o.y1-o.y0;for(let t=0;t<n*m;t++)y[t]=0;if(null==(i=o.xoff))return;a=o.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<g;t++){var v=m*e+(t>>5),b=p[(a+e)*(Jh<<5)+(i+t)<<2]?1<<31-t%32:0;y[v]|=b,r|=b}r?t=e:(o.y0++,n--,e--,a++)}o.y1=o.y0+t,o.sprite=y.slice(0,(o.y1-o.y0)*m)}}}function ld(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function cd(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function ud(){return document.createElement("canvas")}function fd(t){return"function"==typeof t?t:function(){return t}}const hd={archimedean:ld,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function dd(){let b=[256,256],r=td,i=ed,p=rd,y=nd,g=id,m=ad,x=ld,w=Math.random,v=od,M=[],k=null,O=1/0;const _=nd,S=ud,E={};return E.start=function(){const[a,o]=b,s=((t=S()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(Jh<<5)/e,t.height=Qh/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=E.board||cd((b[0]>>5)*b[1]),c=M.length,u=[],f=M.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=_.call(this,t,e,n),t.weight=y.call(this,t,e,n),t.rotate=g.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=m.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let h=-1,d=E.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<O&&++h<c;){var i=f[h];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,sd(s,i,f,h),i.hasText&&function(i,t,e){var n=t.x,r=t.y,a=Math.sqrt(b[0]*b[0]+b[1]*b[1]),o=x(b),s=w()<.5?1:-1;let l,c=-s,u,f;for(;(l=o(c+=s))&&(u=~~l[0],f=~~l[1],!(Math.min(Math.abs(u),Math.abs(f))>=a));)if(t.x=n+u,t.y=r+f,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,a=t.width>>5,e=t.x-(a<<4),o=127&e,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var h=t.sprite,d=t.width>>5,p=b[0]>>5,y=t.x-(d<<4),g=127&y,m=32-g,v=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(y>>5);for(let e=0;e<v;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<m|(t<d?(n=h[e*d+t])>>>g:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(v.call(null,"word",{cloud:E,word:i}),u.push(i),d?E.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}E._tags=u,E._bounds=d,h>=c&&(E.stop(),v.call(null,"end",{cloud:E,words:u,bounds:d}))}return k&&clearInterval(k),k=setInterval(n,0),n(),E},E.stop=function(){return k&&(clearInterval(k),k=null),E},E.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=cd((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}E.board=a,E.hasImage=!0}},E.timeInterval=function(t){O=null==t?1/0:t},E.words=function(t){M=t},E.size=function(t=[]){b=[+t[0],+t[1]]},E.text=function(t){r=fd(t)},E.font=function(t){i=fd(t)},E.fontWeight=function(t){y=fd(t)},E.rotate=function(t){g=fd(t)},E.spiral=function(t){x=hd[t]||t},E.fontSize=function(t){p=fd(t)},E.padding=function(t){m=fd(t)},E.random=function(t){w=fd(t)},E.on=function(t){v=fd(t)},E}const pd={size:[500,500],fontSize:[14,28]};function yd(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const gd=h=>f=>ne(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},pd,h),e=dd(),e=(i=e,a=t,yield{set(t,e,n){return void 0!==a[t]&&(e=e?e.call(null,a[t]):a[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return ne(this,void 0,void 0,function*(){var t;return void 0!==a[e]&&(t=n?yield n.call(null,a[e]):a[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=f.map(t=>t.value),n=t,t=[cu(e),su(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[a,o]=t;return o===a?()=>(i+r)/2:({value:t})=>(i-r)/(o-a)*(t-a)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",yd,e.createMask),e.words([...f]),e.start());const[r,o]=t.size;var t=[{x:0,y:0},{x:r,y:o}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=K(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function md(e){return"string"==typeof e?t=>t[e]:e}gd.props={};const vd=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=md(r),l=md(t),c=Uc(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})};vd.props={};const bd=u=>c=>ne(void 0,void 0,void 0,function*(){var{width:t,height:e}=vf(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=K(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield gd(Object.assign(Object.assign({},l),o))(e);return[I({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]}),xd=(bd.props={composite:!0},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),wd=(xd.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),Md=(wd.props={},()=>["#95F0FF","#78D3F8","#5AB8DB","#3A9DBF","#0A82A4","#00698A","#005170","#003958","#002440"]),kd=(Md.props={},()=>["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]),Od=(kd.props={},()=>["#9DF5CA","#61DDAA","#42C090","#19A576","#008A5D","#006F45","#00562F","#003E19","#002800"]),_d=(Od.props={},()=>["#8CF4F2","#6FD8D6","#52BCBA","#31A09F","#008685","#006C6C","#005354","#003B3D","#002627"]),Sd=(_d.props={},()=>["#D0E4FF","#B4C8ED","#99ADD1","#7E92B5","#65789B","#4C6080","#334867","#1B324F","#021D38"]),Ed=(Sd.props={},()=>["#FFC771","#FFAB57","#F6903D","#D77622","#B85C00","#9B4300","#7D2A00","#601000","#450000"]),Ad=(Ed.props={},()=>["#FFC2EC","#FFA6D0","#F08BB4","#D37099","#B65680","#9A3C67","#7E214F","#630038","#490022"]),Pd=(Ad.props={},()=>["#FFBB95","#FF9E7B","#FF8362","#E8684A","#C84D32","#AA311C","#8C1104","#6F0000","#510000"]),Nd=(Pd.props={},()=>["#FFD83B","#F6BD16","#D7A100","#B98700","#9C6E00","#7F5600","#633F00","#482900","#2F1400"]),Td=(Nd.props={},()=>["#FFCCFF","#EBB0FF","#CE95F5","#B27AD8","#9661BC","#7B48A1","#613086","#48186C","#2E0054"]),Ld=(Td.props={},()=>["#FDEDBE","#FFDF80","#FFCB33","#FFB200","#FF8C00","#FF6500","#E6450F","#B22C00","#661900"]),Cd=(Ld.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),jd=(Cd.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),Fd=(jd.props={},()=>["#D2EDC8","#A9DACC","#75C6D1","#42B3D5","#3993C2","#3073AE","#27539B","#1E3388","#171E6D"]),Id=(Fd.props={},()=>["#003F7F","#004C99","#0059B2","#0072E5","#1A8CFF","#4DA6FF","#80BFFF","#B3D9FF","#EAE9EB","#FFD5B1","#FFC08C","#FFAB66","#FF963E","#F17F0B","#D16A0C","#A45411","#794012"]),Rd=(Id.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#E0F2EB","#66D8FF","#1AC5FF","#007FFF","#0059FF","#0040FF","#002CB2","#FFDF80","#001F7F"]),Bd=(Rd.props={},()=>["#014c63","#10686c","#168575","#16a37e","#0bc286","#65cf9b","#96dcb0","#c1e8c5","#F2EAEA","#FFC5AC","#FFA884","#FF895D","#FF6836","#F3470D","#D13808","#A4300C","#7A270E"]),Dd=(Bd.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#FFE2DC","#EAACFF","#DD78FF","#C53FFF","#A700FF","#8500FF","#620BE1","#3607C2","#27029A"]);function zd(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Wd(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Hd(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}Dd.props={};const Vd=Math.sqrt(50),Gd=Math.sqrt(10),qd=Math.sqrt(2);function Yd(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=Vd?10:n>=Gd?5:n>=qd?2:1)*10**t:-(10**-t)/(n>=Vd?10:n>=Gd?5:n>=qd?2:1)}function Ud(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=Vd?r*=10:n>=Gd?r*=5:n>=qd&&(r*=2),e<t?-r:r}const Xd=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,a=t[r],o=t[i],s;return o<a&&([a,o]=[o,a],[r,i]=[i,r]),0<(s=Yd(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=Yd(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=Yd(a,o,n)),0<s?(t[r]=Math.floor(a/s)*s,t[i]=Math.ceil(o/s)*s):s<0&&(t[r]=Math.ceil(a*s)/s,t[i]=Math.floor(o*s)/s),t},$d=36e5,Zd=864e5,Kd=7*Zd;Zd,Zd;function Jd(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}o=Jd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),e=Jd(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),n=Jd(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),Do=Jd($d,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+$d*e)},t=>t.getHours()),ta=Jd(Zd,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Zd*e)},t=>t.getDate()-1);const Qd=Jd(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());Vo=Jd(Kd,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Kd*e)},t=>{var e=Qd.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Kd)}),aa=Jd(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const tp={millisecond:o,second:e,minute:n,hour:Do,day:ta,week:Vo,month:Qd,year:aa};oa=Jd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),sa=Jd(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),ca=Jd(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),c=Jd($d,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+$d*e)},t=>t.getUTCHours()),ua=Jd(Zd,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Zd*e)},t=>t.getUTCDate()-1);const ep=Jd(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());fa=Jd(Kd,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Kd*e)},t=>{var e=ep.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Kd)}),ha=Jd(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const np={millisecond:oa,second:sa,minute:ca,hour:c,day:ua,week:fa,month:ep,year:ha};function rp(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:a,millisecond:o}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:a,second:o,millisecond:s}=t?np:tp;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=Hd(i,l,0,c,s);let f;return f=u===c?[a,Ud(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max(Ud(t,e,n),1)]}const ip=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=rp(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function ap(t){return!Ns(t)&&!Ps(t)&&!Number.isNaN(t)}const op=e=>t=>-e(-t),sp=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?op(t):t},lp=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?op(n):n},cp=(t,e,n,r)=>{var i=t<0,a=sp(r,i),r=lp(r,i),i=e<t,o=i?t:e,e=[r(Math.floor(a(i?e:t))),r(Math.ceil(a(o)))];return i?e.reverse():e};function up(e,o){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:a}=this.getOptions(),r=o(r.map(t)),a=a?(n=i,t=>{t=n(t);return ws(t)?Math.round(t):t}):i;this.output=zd(a,r,e,t)},t.prototype.invert=void 0}}var fp,da={exports:{}},pa={exports:{}},hp=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},dp=Array.prototype.concat,pp=Array.prototype.slice,yp=pa.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];hp(i)?e=dp.call(e,pp.call(i)):e.push(i)}return e},gp=(yp.wrap=function(t){return function(){return t(yp(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),mp=pa.exports,vp=Object.hasOwnProperty,bp=Object.create(null);for(fp in gp)vp.call(gp,fp)&&(bp[gp[fp]]=fp);var xp=da.exports={to:{},get:{}};function wp(t,e,n){return Math.min(Math.max(e,t),n)}function Mp(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}xp.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=xp.get.hsl(t),n="hsl";break;case"hwb":e=xp.get.hwb(t),n="hwb";break;default:e=xp.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},xp.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(e.slice(a,2+a),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:vp.call(gp,e[1])?((i=gp[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=wp(i[n],0,255);return i[3]=wp(i[3],0,1),i},xp.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,wp(parseFloat(t[2]),0,100),wp(parseFloat(t[3]),0,100),wp(isNaN(e)?1:e,0,1)]):null},xp.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,wp(parseFloat(t[2]),0,100),wp(parseFloat(t[3]),0,100),wp(isNaN(e)?1:e,0,1)]):null},xp.to.hex=function(){var t=mp(arguments);return"#"+Mp(t[0])+Mp(t[1])+Mp(t[2])+(t[3]<1?Mp(Math.round(255*t[3])):"")},xp.to.rgb=function(){var t=mp(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},xp.to.rgb.percent=function(){var t=mp(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},xp.to.hsl=function(){var t=mp(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},xp.to.hwb=function(){var t=mp(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},xp.to.keyword=function(t){return bp[t.slice(0,3)]};var kp=da.exports;function Op(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function _p(t){var e,n,r,t=kp.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*Op(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*Op(n,r,e),255*Op(n,r,e-1/3),t]):null):null}const Sp=(e,n)=>t=>e*(1-t)+n*t,Ep=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return Sp(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=_p(n),c=_p(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},Ap=(t,e)=>{const n=Sp(t,e);return t=>Math.round(n(t))};function Pp({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function Np(t){return"object"==typeof t?t.valueOf():t}class Tp extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=Np,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(Pp({map:this.map,initKey:this.initKey},t))}has(t){return super.has(Pp({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class Lp{constructor(t){this.options=I({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=I({},this.options,t),this.rescale(t)}rescale(t){}}const Cp=Symbol("defaultUnknown");function jp(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function Fp(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==Cp)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function Ip(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class Rp extends Lp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:Cp}}map(t){return 0===this.domainIndexMap.size&&jp(this.domainIndexMap,this.getDomain(),this.domainKey),Fp({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&jp(this.rangeIndexMap,this.getRange(),this.rangeKey),Fp({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=Ip(e),this.rangeKey=Ip(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new Rp(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function Bp(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,f=u/(2/l*r+1-1/l*i);const h=f*i/l;f-=l*h;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=f/d.reduce((t,e)=>t+e);var c=new Tp(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),y=new Tp(e.map((t,e)=>{e=d[e]*p+h;return[t,o?Math.floor(e):e]})),f=Array.from(y.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/l*i))*s;let g=o?Math.round(t):t;var m=new Array(l);for(let t=0;t<l;t+=1){m[t]=(v=g,Math.round(1e12*v)/1e12);var v=e[t];g+=y.get(v)}return{valueBandWidth:c,valueStep:y,adjustedRange:m}}class Dp extends Rp{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Cp,flex:[]}}clone(){return new Dp(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return Bp(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const zp=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=Yd(a,o,n);if(0===s||!Number.isFinite(s))return[];if(0<s){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/s}return i};function Wp(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const Hp=[1,5,2,2.5,4,3],Vp=100*Number.EPSILON;const Gp=(n,r,t=5,i=!0,a=Hp,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,f,h,d,p,y={score:-2,lmin:0,lmax:0,lstep:0};let g=1;for(;g<1/0;){for(let t=0;t<a.length;t+=1){var m=a[t],v=(f=m,h=a,d=g,p=void 0,p=Qs(h),1-Hs(h,f)/(p-1)-d+1);if(o[0]*v+o[1]+o[2]+o[3]<y.score){g=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(o[0]*v+o[1]+o[2]*b+o[3]<y.score)break;var x=(r-n)/(e+1)/g/m;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=g*m*10**t,M=(O=r,M=w*(e-1),(O-=n)<M?1-((M-O)/2)**2/(.1*O)**2:1);if(o[0]*v+o[1]*M+o[2]*b+o[3]<y.score)break;var k=Math.floor(r/w)*g-(e-1)*g,O=Math.ceil(n/w)*g;if(k<=O){var _=O-k;for(let t=0;t<=_;t+=1){var S=(k+t)*(w/g),E=S+w*(e-1),A=w,P=function(t,e,n,r,i,a){var o=Qs(e),e=Hs(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<Vp||a-t<Vp)&&r<=0&&0<=i?1:s)}(m,a,g,S,E,A),N=1-.5*((r-E)**2+(n-S)**2)/(.1*(r-n))**2,T=(l=e,T=n,l=(l-1)/(E-(L=S)),c=((c=s)-1)/(Math.max(E,r)-Math.min(T,L)),2-Math.max(l/c,c/l)),L=o[0]*P+o[1]*N+o[2]*T+ +o[3];y.score<L&&(!i||S<=n&&r<=E)&&(y.lmin=S,y.lmax=E,y.lstep=A,y.score=L)}}t+=1}e+=1}}g+=1}var t=Wp(y.lmax),e=Wp(y.lmin),C=Wp(y.lstep),j=Math.floor((t=(t-e)/C,Math.round(1e12*t)/1e12))+1,F=new Array(j);F[0]=Wp(e);for(let t=1;t<j;t+=1)F[t]=Wp(F[t-1]+C);return F};class qp extends Lp{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Gp}}map(t){return ap(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new qp(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return ws(t)&&ws(r)?n(t,r,e):[]}}const Yp=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return zd(o=t<r?(a=Wd(t,r),n(e,i)):(a=Wd(r,t),n(i,e)),a)},Up=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=Wd(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=Hd(r,t,1,i)-1,n=a[e];return zd(o[e],n)(t)}},Xp=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?Up:Yp)(t,e,r?Ap:n)};class $p extends Lp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Sp,tickCount:5}}map(t){return ap(t)?this.output(t):this.options.unknown}invert(t){return ap(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return Xd}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return Xs}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=Xp(n.map(t),r,a,i);this.output=zd(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=Xp(i,r.map(t),Sp);this.input=zd(e,n,i)}}class Zp extends $p{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Ep,tickMethod:zp,tickCount:5}}chooseTransforms(){return[Xs,Xs]}clone(){return new Zp(this.options)}}class Kp extends Dp{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Cp,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new Kp(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const Jp=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class Qp extends $p{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Ep,tickMethod:zp,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[Xs,Xs]:(t=.5===r?Jp:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new Qp(this.options)}}class t0 extends Qp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Ep,tickMethod:zp,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new t0(this.options)}}class e0 extends Lp{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return ap(t)?(t=Hd(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new e0(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const n0=(t,e,n,r=10)=>{var i=t<0,a=lp(r,i),o=sp(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),f=o(c),h=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&h.push(p)}}else for(;u<=f;u+=1){var y=a(u);for(let t=1;t<r;t+=1){var g=y*t;if(c<g)break;l<=g&&h.push(g)}}2*h.length<n&&(h=zp(l,c,n))}else h=zp(u,f,Math.min(f-u,n)).map(a);return s?h.reverse():h};class r0 extends $p{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Ep,tickMethod:n0,tickCount:5}}chooseNice(){return cp}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[sp(t,e),lp(t,e)]}clone(){return new r0(this.options)}}class i0 extends e0{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Gp}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=Xd(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new i0(this.options)}}function a0(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class o0 extends e0{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Gp}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=a0(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new o0(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var s0=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,l0=/\[([^]*?)\]/gm;function c0(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function u0(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a,o=i[r];for(a in o)t[a]=o[a]}return t}function f0(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var h0,ya=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ga=["January","February","March","April","May","June","July","August","September","October","November","December"],u=c0(ga,3),d0=u0({},{dayNamesShort:c0(ya,3),dayNames:ya,monthNamesShort:u,monthNames:ga,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),p0={D:function(t){return String(t.getDate())},DD:function(t){return f0(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return f0(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return f0(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return f0(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return f0(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return f0(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return f0(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return f0(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return f0(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return f0(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return f0(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+f0(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+f0(Math.floor(Math.abs(t)/60),2)+":"+f0(Math.abs(t)%60,2)}},y0={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"};const g0=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=rp(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function m0(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class v0 extends $p{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:g0,interpolate:Sp,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return ip}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:a,utc:t}=this.options,o=t?np:tp,s=t?m0:Xs;return t=>{var e=s(t),t=a||function(t,e){var{second:e,minute:n,hour:r,day:i,week:a,month:o,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":o.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,o),n=void 0;if(void 0===t&&(t=y0.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=y0[t]||t).replace(l0,function(t,e){return r.push(e),"@@@"}),u0(u0({},d0),n));return(t=t.replace(s0,function(t){return p0[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new v0(this.options)}}var b0;let x0=h0=class extends Zp{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Xs,tickMethod:zp,tickCount:5}}constructor(t){super(t)}clone(){return new h0(this.options)}};x0=h0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([up(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return zd(Sp(0,1),Wd(t,e))})],x0);let w0=b0=class extends Zp{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:Xs,tickMethod:zp,tickCount:5}}constructor(t){super(t)}clone(){return new b0(this.options)}};w0=b0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([up(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=zd(Sp(0,.5),Wd(e,n)),a=zd(Sp(.5,1),Wd(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],w0);const M0=t=>new Dp(t),k0=(M0.props={},t=>new Zp(t)),O0=(k0.props={},t=>new Rp(t)),_0=(O0.props={},t=>new qp(t)),S0=(_0.props={},t=>new Kp(t)),E0=(S0.props={},t=>new v0(t)),A0=(E0.props={},t=>new r0(t)),P0=(A0.props={},t=>new Qp(t)),N0=(P0.props={},t=>new e0(t)),T0=(N0.props={},t=>new o0(t)),L0=(T0.props={},t=>new i0(t)),C0=(L0.props={},t=>new t0(t)),j0=(C0.props={},t=>new x0(t)),F0=(j0.props={},Math.PI),I0=2*F0,R0=1e-6,B0=I0-R0;function D0(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function z0(){return new D0}function W0(t){return function(){return t}}D0.prototype=z0.prototype={constructor:D0,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){var a,o,s=this._x1,l=this._y1,c=(n=+n)-(t=+t),u=(r=+r)-(e=+e),f=s-t,h=l-e,d=f*f+h*h;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):d>R0&&(Math.abs(h*c-u*f)>R0&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((F0-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>R0&&(this._+="L"+(t+d*f)+","+(e+d*h)),this._+="A"+i+","+i+",0,0,"+ +(f*s<h*n)+","+(this._x1=t+r*c)+","+(this._y1=e+r*u)):this._+="L"+(this._x1=t)+","+(this._y1=e))},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,a=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>R0||Math.abs(this._y1-c)>R0)&&(this._+="L"+l+","+c),n&&((a=a<0?a%I0+I0:a)>B0?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):a>R0&&(this._+="A"+n+","+n+",0,"+ +(a>=F0)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const H0=Math.abs,V0=Math.atan2,G0=Math.cos,q0=Math.max,Y0=Math.min,U0=Math.sin,X0=Math.sqrt,$0=1e-12,Z0=Math.PI,K0=Z0/2,J0=2*Z0;function Q0(t){return 1<=t?K0:t<=-1?-K0:Math.asin(t)}function t1(t){return t.innerRadius}function e1(t){return t.outerRadius}function n1(t){return t.startAngle}function r1(t){return t.endAngle}function i1(t){return t&&t.padAngle}function a1(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/X0(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,f=n-t,h=u*u+f*f,a=i-a,s=s*n-e*t,n=(f<0?-1:1)*X0(q0(0,a*a*h-s*s)),e=(s*f-u*n)/h,t=(-s*u-f*n)/h,d=(s*f+u*n)/h,s=(-s*u+f*n)/h,u=e-r,f=t-c,n=d-r,h=s-c;return n*n+h*h<u*u+f*f&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function o1(){var A=t1,P=e1,N=W0(0),T=null,L=n1,C=r1,j=i1,F=null;function e(){var t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,y,g,m,v,b,x,w,M=+A.apply(this,arguments),k=+P.apply(this,arguments),O=L.apply(this,arguments)-K0,_=C.apply(this,arguments)-K0,S=H0(_-O),E=O<_;if(F=F||(t=z0()),k<M&&(e=k,k=M,M=e),k>$0?S>J0-$0?(F.moveTo(k*G0(O),k*U0(O)),F.arc(0,0,k,O,_,!E),M>$0&&(F.moveTo(M*G0(_),M*U0(_)),F.arc(0,0,M,_,O,E))):(r=e=O,i=n=_,o=a=S,h=(u=j.apply(this,arguments)/2)>$0&&(T?+T.apply(this,arguments):X0(M*M+k*k)),w=x=s=Y0(H0(k-M)/2,+N.apply(this,arguments)),h>$0&&(f=Q0(h/M*U0(u)),h=Q0(h/k*U0(u)),(a-=2*f)>$0?(r+=f*=E?1:-1,i-=f):(a=0,r=i=(O+_)/2),(o-=2*h)>$0?(e+=h*=E?1:-1,n-=h):(o=0,e=n=(O+_)/2)),u=k*G0(e),f=k*U0(e),h=M*G0(i),O=M*U0(i),s>$0&&(d=k*G0(n),p=k*U0(n),y=M*G0(r),g=M*U0(r),S<Z0)&&(_=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<$0))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,f,y,g,d,p,h,O))&&(S=u-_[0],v=f-_[1],b=d-_[0],m=p-_[1],v=1/U0((1<(S=(S*b+v*m)/(X0(S*S+v*v)*X0(b*b+m*m)))?0:S<-1?Z0:Math.acos(S))/2),b=X0(_[0]*_[0]+_[1]*_[1]),x=Y0(s,(M-b)/(v-1)),w=Y0(s,(k-b)/(1+v))),o>$0?w>$0?(l=a1(y,g,u,f,k,w,E),c=a1(d,p,h,O,k,w,E),F.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?F.arc(l.cx,l.cy,w,V0(l.y01,l.x01),V0(c.y01,c.x01),!E):(F.arc(l.cx,l.cy,w,V0(l.y01,l.x01),V0(l.y11,l.x11),!E),F.arc(0,0,k,V0(l.cy+l.y11,l.cx+l.x11),V0(c.cy+c.y11,c.cx+c.x11),!E),F.arc(c.cx,c.cy,w,V0(c.y11,c.x11),V0(c.y01,c.x01),!E))):(F.moveTo(u,f),F.arc(0,0,k,e,n,!E)):F.moveTo(u,f),M>$0&&a>$0?x>$0?(l=a1(h,O,d,p,M,-x,E),c=a1(u,f,y,g,M,-x,E),F.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?F.arc(l.cx,l.cy,x,V0(l.y01,l.x01),V0(c.y01,c.x01),!E):(F.arc(l.cx,l.cy,x,V0(l.y01,l.x01),V0(l.y11,l.x11),!E),F.arc(0,0,M,V0(l.cy+l.y11,l.cx+l.x11),V0(c.cy+c.y11,c.cx+c.x11),E),F.arc(c.cx,c.cy,x,V0(c.y11,c.x11),V0(c.y01,c.x01),!E))):F.arc(0,0,M,i,r,E):F.lineTo(h,O)):F.moveTo(0,0),F.closePath(),t)return F=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +P.apply(this,arguments))/2,e=(+L.apply(this,arguments)+ +C.apply(this,arguments))/2-Z0/2;return[G0(e)*t,U0(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:W0(+t),e):A},e.outerRadius=function(t){return arguments.length?(P="function"==typeof t?t:W0(+t),e):P},e.cornerRadius=function(t){return arguments.length?(N="function"==typeof t?t:W0(+t),e):N},e.padRadius=function(t){return arguments.length?(T=null==t?null:"function"==typeof t?t:W0(+t),e):T},e.startAngle=function(t){return arguments.length?(L="function"==typeof t?t:W0(+t),e):L},e.endAngle=function(t){return arguments.length?(C="function"==typeof t?t:W0(+t),e):C},e.padAngle=function(t){return arguments.length?(j="function"==typeof t?t:W0(+t),e):j},e.context=function(t){return arguments.length?(F=null==t?null:t,e):F},e}function s1(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function l1(t){this._context=t}function c1(t){return new l1(t)}function u1(t){return t[0]}function f1(t){return t[1]}function h1(o,s){var l=W0(!0),c=null,u=c1,f=null;function e(t){var e,n,r,i=(t=s1(t)).length,a=!1;for(null==c&&(f=u(r=z0())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?f.lineStart():f.lineEnd()),a&&f.point(+o(n,e,t),+s(n,e,t));if(r)return f=null,r+""||null}return o="function"==typeof o?o:void 0===o?u1:W0(o),s="function"==typeof s?s:void 0===s?f1:W0(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:W0(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:W0(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:W0(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(f=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=f=null:f=u(c=t),e):c},e}function d1(u,f,h){var d=null,p=W0(!0),y=null,g=c1,m=null;function e(t){var e,n,r,i,a,o=(t=s1(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==y&&(m=g(a=z0())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),r=e-1;n<=r;--r)m.point(l[r],c[r]);m.lineEnd(),m.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+f(i,e,t),m.point(d?+d(i,e,t):l[e],h?+h(i,e,t):c[e]))}if(a)return m=null,a+""||null}function t(){return h1().defined(p).curve(g).context(y)}return u="function"==typeof u?u:void 0===u?u1:W0(+u),f="function"==typeof f?f:W0(void 0===f?0:+f),h="function"==typeof h?h:void 0===h?f1:W0(+h),e.x=function(t){return arguments.length?(u="function"==typeof t?t:W0(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:W0(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:W0(+t),e):d},e.y=function(t){return arguments.length?(f="function"==typeof t?t:W0(+t),h=null,e):f},e.y0=function(t){return arguments.length?(f="function"==typeof t?t:W0(+t),e):f},e.y1=function(t){return arguments.length?(h=null==t?null:"function"==typeof t?t:W0(+t),e):h},e.lineX0=e.lineY0=function(){return t().x(u).y(f)},e.lineY1=function(){return t().x(u).y(h)},e.lineX1=function(){return t().x(d).y(f)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:W0(!!t),e):p},e.curve=function(t){return arguments.length?(g=t,null!=y&&(m=g(y)),e):g},e.context=function(t){return arguments.length?(null==t?y=m=null:m=g(y=t),e):y},e}l1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var p1=g1(c1);function y1(t){this._curve=t}function g1(e){function t(t){return new y1(e(t))}return t._curve=e,t}function m1(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(g1(t)):e()._curve},t}function v1(){}function b1(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function x1(t,e){this._context=t,this._k=(1-e)/6}function w1(t,e){this._context=t,this._k=(1-e)/6}function M1(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>$0&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>$0&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function k1(t,e){this._context=t,this._alpha=e}y1.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},x1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:b1(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:b1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new x1(t,n)}return t.tension=function(t){return e(+t)},t}(0),w1.prototype={areaStart:v1,areaEnd:v1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:b1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new w1(t,n)}return t.tension=function(t){return e(+t)},t}(0),k1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:M1(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var O1=function e(n){function t(t){return n?new k1(t,n):new x1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function _1(t,e){this._context=t,this._alpha=e}_1.prototype={areaStart:v1,areaEnd:v1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:M1(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var S1=function e(n){function t(t){return n?new _1(t,n):new w1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function E1(t){this._context=t}function A1(t){return new E1(t)}function P1(t,e){this._context=t,this._t=e}function N1(t){return new P1(t,.5)}function T1(t){return new P1(t,0)}function L1(t){return new P1(t,1)}function Q(t){return new C1([t],null,t,t.ownerDocument)}E1.prototype={areaStart:v1,areaEnd:v1,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},P1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(n=this._x*(1-this._t)+t*this._t,this._context.lineTo(n,this._y),this._context.lineTo(n,e))}this._x=t,this._y=e}};class C1{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],a=[],o=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new C1(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new C1(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new C1([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],a=e(r,t);a.__data__=r,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new C1(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var o=this._elements[t],s=e(o.__data__,t);o.appendChild(s),n.push(s)}return new C1(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new C1([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),f=Yc(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var h=e[t],d=n(h,t),p=r(h,t);if(c.has(d)){var y=c.get(d);y.__data__=h,y.__facet__=!1,a.push(y),o.delete(y),c.delete(d)}else if(u.has(d)){y=u.get(d);y.__data__=h,y.__facet__=!0,a.push(y),u.delete(d)}else if(f.has(d)){const Yc=f.get(d);s.push([h,Yc]);for(const g of Yc)o.delete(g);f.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(h):d.__toData__=[h],l.add(d),o.delete(d)):i.push(h)}var t=[new C1([],i,this._parent,this._document),new C1(a,null,this._parent,this._document),new C1(o,null,this._parent,this._document),new C1([],s,this._parent,this._document),new C1(l,null,this._parent,this._document)];return new C1(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new C1(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=C1.registry[t])?new e:cf("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){const n=this._elements[t];var e=this._transitions[t];e?(Array.isArray(e)?e:[e]).map(t=>t.finished.then(()=>n.remove())):n.remove()}return new C1([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function j1([t,e],[n,r]){return[t-n,e-r]}function F1([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function I1([t,e]){return Math.atan2(e,t)}function R1([t,e]){return I1([t,e])+Math.PI/2}function B1(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[a,o]of t)e=Math.min(a,e),n=Math.max(a,n),r=Math.min(o,r),i=Math.max(o,i);var t=n-e,s=i-r;return[e,r,t,s]}function D1([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function z1(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function W1(t){return t.map((t,e)=>e)}function B(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function H1(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*F1(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function V1(t,e,n,r,i){e=I1(j1(r,e))+Math.PI,n=I1(j1(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function G1(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=W1(a),[r,o]=Wc(t,t=>a[t]);const s=new Zp({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function q1(t){var[t,e,n,r]=t;return[r,t,e,n]}function Y1(t,e,n){var[e,r,,i]=vu(t)?q1(e):e,[n,a]=n,t=t.getCenter(),o=R1(j1(e,t)),r=R1(j1(r,t)),n=r===o&&n!==a?r+2*Math.PI:r;return{startAngle:o,endAngle:0<=n-o?n:2*Math.PI+n,innerRadius:F1(i,t),outerRadius:F1(e,t)}}function U1(t,e,n,r){var i=t["defaultColor"],t=t[e]||{};return Object.assign({},{fill:i,stroke:i},t[n]||t[r])}function X1(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}C1.registry={g:F.Group,rect:F.Rect,circle:F.Circle,path:F.Path,text:F.Text,ellipse:F.Ellipse,image:F.Image,line:F.Line,polygon:F.Polygon,polyline:F.Polyline,html:F.HTML};const $1=N=>{const{colorAttribute:T,first:L=!0,last:C=!0}=N,j=K(N,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),i=T,a=r[i],o=K(r,["symbol"==typeof i?i:i+""]),r=o.lineWidth||1,{stroke:i,radius:s=0,radiusTopLeft:l=s,radiusTopRight:c=s,radiusBottomRight:u=s,radiusBottomLeft:f=s,innerRadius:h=0,innerRadiusTopLeft:d=h,innerRadiusTopRight:p=h,innerRadiusBottomRight:y=h,innerRadiusBottomLeft:h=h,inset:g=0,insetLeft:m=g,insetRight:v=g,insetBottom:b=g,insetTop:x=g,lineWidth:r="stroke"===T||i?r:0}=j,w=K(j,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","inset","insetLeft","insetRight","insetBottom","insetTop","lineWidth"]),{color:a=a,opacity:M}=e;if(!bu(n)&&!wu(n)){var[k,,O]=!!vu(n)?q1(t):t;const[P,E]=k;var[O,k]=j1(O,k),_=(0<O?P:P+O)+m,S=(0<k?E:E+k)+x,O=Math.abs(O)-(m+v),m=Math.abs(k)-(x+b);return Q(new F.Rect({})).call(B,o).style("lineWidth",r).style("x",_).style("y",S).style("width",O).style("height",m).style("stroke",void 0===i?a:i).style(X1(N),M).style(T,a).style("radius",[L?l:d,L?c:p,C?u:y,C?f:h]).call(B,w).node()}const{y:E,y1:A}=e;v=n.getCenter(),k=Y1(n,t,[E,A]),x=o1().cornerRadius(s).padAngle(g*Math.PI/180);return Q(new F.Path({})).call(B,o).style("path",x(k)).style("transform",`translate(${v[0]}, ${v[1]})`).style("stroke",a||i).style("lineWidth",r).style(T,a).style(X1(N),M).call(B,j).node()}},Z1=($1.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>$1(Object.assign({colorAttribute:"fill"},t))),K1=(Z1.props=Object.assign({},$1.props),t=>$1(Object.assign({colorAttribute:"stroke"},t)));K1.props=Object.assign({},$1.props);const J1=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(vu(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,l=K(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return $1(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function Q1(t,e,n){var[t,r,i,a]=t;if(vu(n)){const o=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,o,s,a]}const o=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,o,s,a]}J1.props=Object.assign({},$1.props);const ty=t=>J1(Object.assign({adjustPoints:Q1},t));function ey(t){const e="function"==typeof t?t:t.render;return class extends F.CustomElement{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}ty.props=Object.assign({},$1.props);const ny=ey(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;Q(t).maybeAppend("line",()=>new F.Path({})).style("d",e).call(B,r),Q(t).maybeAppend("line1",()=>new F.Path({})).style("d",n).call(B,i)});const ry=t=>{const{curve:u,gradient:f=!1,gradientColor:h="between",defined:d=t=>!Number.isNaN(t)&&null!=t,connectNulls:p=!1}=t,y=K(t,["curve","gradient","gradientColor","defined","connectNulls"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),{stroke:i,lineWidth:a}=r,o=K(r,["stroke","lineWidth"]),{color:r=i,size:e=a,transform:i,seriesColor:a,seriesX:s,seriesY:l}=e,a=f&&a?G1(a,s,l,f,h):r,s=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),e&&{lineWidth:e}),i&&{transform:i}),y),l=bu(n)?[...t,t[0]]:t;const c=h1().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>d(t)&&d(e)).curve(u);var[r,o]=function(t,e){var n=[],r=[];let i=!1,a=null;for(const o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(l,d),a=J(y,"connect"),e=!!o.length;return(!e||p&&!Object.keys(a).length?Q(new F.Path({})).style("d",c(r)).call(B,s):e&&!p?Q(new F.Path({})).style("d",c(l)).call(B,s):Q(new ny).style("style1",Object.assign(Object.assign({},s),a)).style("style2",s).style("d1",o.map(c).join(",")).style("d2",c(l))).node()}},iy=(ry.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>ry(Object.assign({curve:c1},t))),ay=(iy.props=Object.assign({},ry.props),t=>{var{alpha:e=.5}=t,t=K(t,["alpha"]);return ry(Object.assign({curve:O1.alpha(e)},t))}),oy=(ay.props=Object.assign({},ry.props),t=>ry(Object.assign({curve:L1},t))),sy=(oy.props=Object.assign({},ry.props),t=>ry(Object.assign({curve:T1},t))),ly=(sy.props=Object.assign({},ry.props),t=>ry(Object.assign({curve:N1},t)));function cy(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}ly.props=Object.assign({},ry.props);var uy=Object.freeze({__proto__:null,point:cy,square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},triangleDown:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},hexagon:function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},bowtie:function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},line:function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}});const f=h=>{const{colorAttribute:d,symbol:t,mode:p="auto"}=h,y=K(h,["colorAttribute","symbol","mode"]),g=uy[t]||cy;return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=U1(r,a,o,s),a=d,o=r[a],s=r["lineWidth"],r=K(r,["symbol"==typeof a?a:a+"","lineWidth"]),a=y.stroke?s||1:s,{color:s=o,transform:o,opacity:l}=e,[c,u]=1===(c=t).length?c[0]:([[c,f],[u,i]]=c,[(c+u)/2,(f+i)/2]),f=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||ku(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(p,t,e,n)||y.r||r.r;return Q(new F.Path).call(B,r).style("d",g(c,u,f)).style("lineWidth",a).style("transform",o).style("stroke",s).style(X1(h),l).style(d,s).call(B,y).node()}},fy=(f.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>f(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),hy=(fy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),dy=(hy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),py=(dy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),yy=(py.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),gy=(yy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),my=(gy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),vy=(my.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),by=(vy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),xy=(by.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),wy=(xy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),My=(wy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),ky=(My.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),Oy=(ky.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),_y=(Oy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"point"},t))),Sy=(_y.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"square"},t))),Ey=(Sy.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),Ay=(Ey.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),Py=(Ay.props=Object.assign({},f.props),t=>f(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),Ny=(Py.props=Object.assign({},f.props),t=>{const{arrowSize:f="40%"}=t,h=K(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=U1(r,e,i,a),{fill:e,stroke:i}=r,a=K(r,["fill","stroke"]),[r,t]=t,[l,c]=H1(r,t,{arrowSize:f}),u=z0();return u.moveTo(...r),u.lineTo(...t),u.moveTo(...t),u.lineTo(...l),u.moveTo(...t),u.lineTo(...c),Q(new F.Path).call(B,a).style("d",u.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(B,h).node()}});Ny.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};i(Cy,Ty=F.CustomElement),Cy.prototype.connectedCallback=function(){var t=this.style,e=t.x,t=t.y;this.setLocalPosition([Number(e)||0,Number(t)||0]),this.update(),this.bindEvents(this.attributes,this)},Cy.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),null!=(t=this.render)&&t.call(this,this.attributes,this)},Cy.prototype.clear=function(){this.removeChildren()},Cy.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},Cy.prototype.bindEvents=function(t,e){};var Ty,Ly,la=Cy;function Cy(t){return Ty.call(this,t)||this}function jy(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,jy)}function Fy(){this.constructor=Ly}Ly=jy,zo=Error,Fy.prototype=zo.prototype,Ly.prototype=new Fy,jy.buildMessage=function(t,e){var a={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],a[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var Iy;function Ry(t,e,n,r){var i,a,o=By(r=void 0===r?"...":r,n),s=bs(t)?t:As(t),l=e,c=[];if(By(t,n)<=e)return t;for(;;){if(i=s.substr(0,16),l<(a=By(i,n))+o)break;if(c.push(i),l-=a,!(s=s.substr(16)))return c.join("")}for(;;){if(i=s.substr(0,1),l<(a=By(i,n))+o)break;if(c.push(i),l-=a,!(s=s.substr(1)))return c.join("")}return"".concat(c.join("")).concat(r)}var By=zs(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(Iy=Iy||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(n,"px"),r].join(" "),Iy.measureText(bs(t)?t:"").width},function(t,e){return re([t],R(Es(e=void 0===e?{}:e)),!1).join("")});function Dy(t,e){return"string"==typeof t?By(t,e):t}var zy=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,t=t.style.fontSize;return{fontSize:"object"==typeof t?t.value:t,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function Wy(t,e){return"capitalize"===e?t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()}):"lowercase"===e?t.toLowerCase():"uppercase"===e?t.toUpperCase():t}function Hy(t,e){e=Math.pow(10,e);return~~(t*e)/e}function Vy(t){return t.toLocaleString()}function Gy(t,e){return void 0===e&&(e=0),Math.abs(t)<1e3?String(t):"".concat(Hy(t/1e3,e).toLocaleString(),"K")}var qy=function(t,e,n){return t<0&&Number.isFinite(t)?e:n},Yy=function(t,e,n){return 0<t&&Number.isFinite(t)?e:n},Uy=function(t,e){return t*e},Xy=Math.PI/180;function $y(t){if(ws(t))return[t,t,t,t];if(hs(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var Zy=["default","active","selected","disabled","inactive"],Ky={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function Jy(t){var e;return t?null==t?void 0:t.default:(e=Ds(t)||{},Zy.forEach(function(t){t in e&&delete e[t]}),e)}function Qy(t,e,n){return void 0===n&&(n=!1),e?(e=Gs(t,e),n?I({},Jy(t),e):e):Jy(t)||{}}function tg(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}ng.prototype.selectAll=function(t){return new ng("string"==typeof t?this.__parent__.querySelectorAll(t):t,null,this.__elements__[0],this.__document__)},ng.prototype.select=function(t){t="string"==typeof t?this.__parent__.querySelectorAll(t)[0]||null:t;return new ng([t],null,t,this.__document__)},ng.prototype.append=function(n){var r=this,t="function"==typeof n?n:function(){return t=n,r.__document__?r.__document__.createElement(t,{}):(e=ng.registry[t])?new e:new Error("Unknown node type: ".concat(t));var t,e},e=[];if(null!==this.__data__){for(var i=0;i<this.__data__.length;i++)(s=t(a=this.__data__[i],i)).__data__=a,this.__parent__.appendChild(s),e.push(s);return new ng(e,null,this.__parent__,this.__document__)}for(i=0;i<this.__elements__.length;i++){var a,o=this.__elements__[i],s=t(a=o.__data__,i);o.appendChild(s),e.push(s)}return new ng(e,null,e[0],this.__document__)},ng.prototype.data=function(t,n){void 0===n&&(n=function(t){return t});for(var e=[],r=[],i=new Map(this.__elements__.map(function(t,e){return[n(t.__data__,e),t]})),a=0;a<t.length;a++){var o,s=t[a],l=n(s,a);i.has(l)?((o=i.get(l)).__data__=s,r.push(o),i.delete(l)):e.push(s)}var c=Array.from(i.values()),c=[new ng([],e,this.__parent__,this.__document__),new ng(r,null,this.__parent__,this.__document__),new ng(c,null,this.__parent__,this.__document__)];return new ng(this.__elements__,null,this.__parent__,this.__document__,c)},ng.prototype.merge=function(t){return new ng(re(re([],R(this.__elements__),!1),R(t.__elements__),!1),null,this.__parent__,this.__document__)},ng.prototype.join=function(t,e,n){void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()});t=(t=void 0===t?function(t){return t}:t)(this.__enter__),e=e(this.__update__),n=n(this.__exit__);return e.merge(t).merge(n)},ng.prototype.remove=function(){var n=re([],R(this.__elements__),!1);return this.__elements__.forEach(function(t){var e;t.parentNode&&(t.parentNode.removeChild(t),e=n.indexOf(t),n.splice(e,1),null!=(e=t.parentNode)&&e.removeChild(t),t.remove())}),new ng(n,null,this.__parent__,this.__document__)},ng.prototype.each=function(t){for(var e=0;e<this.__elements__.length;e++){var n,r=this.__elements__[e];r&&(n=r.__data__,t.call(r,n,e))}return this},ng.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))}),this},ng.prototype.style=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))}),this},ng.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},ng.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,re([this.__parent__,this],R(e),!1)),this},ng.prototype.node=function(){return this.__elements__[0]},ng.prototype.nodes=function(){return this.__elements__},ng.registry={g:F.Group,rect:F.Rect,circle:F.Circle,path:F.Path,text:F.Text,ellipse:F.Ellipse,image:F.Image,line:F.Line,polygon:F.Polygon,polyline:F.Polyline,html:F.HTML};var eg=ng;function ng(t,e,n,r,i){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null]),this.__elements__=t=void 0===t?null:t,this.__data__=e,this.__parent__=n,this.__document__=r,this.__enter__=i[0],this.__update__=i[1],this.__exit__=i[2]}function M(t){return new eg([t],null,t,t.ownerDocument)}function S(t,e){var n,r;if(e)try{for(var i=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=R(a.value,2),s=o[0],l=o[1];t.style(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function D(t,e,n){return t.querySelector(e)?M(t).select(e):M(t).append(n)}function rg(t){var e,t=t&&t.getRenderBounds();return t?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0}}function ig(t){var t=t.getLocalBounds(),t=R([t.min,t.max],2),e=R(t[0],2),n=e[0],e=e[1],t=R(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function ag(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}var og=["year","month","day","hour","minute","second"],sg=["YYYY","MM","DD","hh","mm","ss"];function lg(t){return t instanceof Date?t:new Date(t)}function cg(t){for(var e,t=R(t,2),n=t[0],t=t[1],n=og.indexOf(n),r=og.indexOf(t),i="",a=n;a<=r;a+=1)i+=sg[a],a<r&&(e="-",2===a?e=" ":2<a&&(e=":"),i+=e);return i}function ug(t,e){var n={YYYY:t.getFullYear(),MM:t.getMonth()+1,DD:t.getDate(),hh:t.getHours(),mm:t.getMinutes(),ss:t.getSeconds()},r=e;return Object.keys(n).forEach(function(t){var e=n[t];r=r.replace(t,"YYYY"===t?"".concat(e):"0".concat(e).slice(-2))}),r}function fg(t,e){t=new Date(t);return{year:function(t){t.setMonth(0),t.setHours(0,0,0,0)},month:function(t){t.setDate(1),t.setHours(0,0,0,0)},day:function(t){return t.setHours(0,0,0,0)},hour:function(t){return t.setMinutes(0,0,0)},minute:function(t){return t.setSeconds(0,0)},second:function(t){return t.setMilliseconds(0)}}[e](t),ug(t,cg(["year",e]))}function hg(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)dg(t,e[r]);return t}var dg=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=5),Object.entries(i).forEach(function(t){var t=R(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?vs(t)?(vs(r[e])||(n[e]={}),a<o?dg(r[e],t,a+1,o):n[e]=i[e]):hs(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function pg(t,e,n,r,i,a){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=a&&a<=Math.max(n,r))}function yg(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function gg(t,e){var t=R(t,2),n=t[0],t=t[1],e=R(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function mg(a){return void 0===a&&(a=0),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,r=window.setTimeout(function(){i.apply(t,e),r=null},a))})}}var vg=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function bg(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}Ro=bg;function xg(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function wg(t,e,n){return[["M",t-n,e],["L",t+n,e]]}qo=wg;function Mg(t){n="default",ds(e=t)&&e instanceof Image?n="image":us(e)?n="symbol":bs(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}i(Og,kg=la),Og.prototype.render=function(t,e){t.x,t.y;var r=t.symbol,n=t.size,i=void 0===n?16:n,a=K(t,["x","y","symbol","size"]),o=Mg(r);o?D(e,".".concat(o,"-marker"),o).attr("className","marker ".concat(o,"-marker")).call(function(t){var e,n;"image"===o?(e=2*i,t.style("img",r).style("width",e).style("height",e).style("x",-i).style("y",-i)):(e=i/2,n=us(r)?r:Og.getSymbol(r),t.style("path",null==n?void 0:n(0,0,e)).call(S,a))}):(null!=(n=this.querySelector(".marker"))&&n.remove(),this.removeChildren())},Og.MARKER_SYMBOL_MAP=new Map,Og.registerSymbol=function(t,e){Og.MARKER_SYMBOL_MAP.set(t,e)},Og.getSymbol=function(t){return Og.MARKER_SYMBOL_MAP.get(t)};var kg,E=Og;function Og(){return null!==kg&&kg.apply(this,arguments)||this}E.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),E.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),E.registerSymbol("line",xg),E.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),E.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),E.registerSymbol("circle",bg),E.registerSymbol("point",Ro),E.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),E.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),E.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),E.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),E.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),E.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),E.registerSymbol("line",xg),E.registerSymbol("dot",wg),E.registerSymbol("dash",qo),E.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),E.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),E.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),E.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),E.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});i(Eg,_g=la),Eg.prototype.render=function(t,e){var n,r,i=t.padding,a=t.marker,o=t.text,s=t.textStyle,l=t.radius,c=t.backgroundStyle,u=t.spacing,f=t.align,t=t.verticalAlign,i=R($y(i),4),h=i[0],d=i[1],p=i[2],i=i[3],y=D(e,".tag-content","g").attr("className","tag-content").node(),g=D(y,".tag-marker",function(){return new E({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(a||{symbol:"triangle",size:0,x:0})}).node(),u=(u=u,{x:(m=(g=g).getLocalBounds()).halfExtents[0]?m.max[0]+(u||0):g.style.x,y:m.halfExtents[1]?(m.min[1]+m.max[1])/2:g.style.y}),m=u.x,g=u.y,g=(D(y,".tag-text","text").attr("className","tag-text").style("fontFamily","sans-serif").style("fontSize",12).style("x",m).style("y",g).style("text",fs(o)?"":"".concat(o)).call(S,s).style("textBaseline","middle").call(function(t){o||t.remove()}),u=i,m=h,g=f||"start",s=t||"top",t=(f=y).getLocalBounds(),r=n=0,"start"===g&&(n=u),"center"===g&&(n=-t.halfExtents[0]),"end"===g&&(n=-u-2*t.halfExtents[0]),"top"===s&&(r=m+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=m-2*t.halfExtents[1]),f.setLocalPosition([n,r]),y.getLocalBounds());D(e,".tag-background","rect").attr("className","tag-background").style("zIndex",(y.style.zIndex||0)-1).style("x",g.min[0]-i).style("y",g.min[1]-h).style("width",null!==c?i+d+2*g.halfExtents[0]:0).style("height",null!==c?h+p+2*g.halfExtents[1]:0).style("radius",null!=l?l:2).style("fill","#fafafa").style("stroke","#d9d9d9").style("lineWidth",1).call(S,c)},Eg.defaultOptions={type:Eg.tag="tag",style:{padding:4,spacing:4}};var _g,Sg=Eg;function Eg(t){return _g.call(this,I({},Eg.defaultOptions,t))||this}var Ag,Pg,Ng={small:{textStyle:{fontSize:10},buttonStyle:{width:40,height:20},markerStyle:{size:8}},middle:{textStyle:{fontSize:12},buttonStyle:{width:60,height:30},markerStyle:{size:12}},large:{textStyle:{fontSize:16},buttonStyle:{width:80,height:40},markerStyle:{size:16}}},Tg={primary:{textStyle:{default:{fill:"#fff"},active:{}},buttonStyle:{default:{fill:"#1890ff",lineWidth:0},active:{fill:"#40a9ff"}},markerStyle:{default:{fill:"#1890ff"},active:{fill:"#40a9ff"}}},dashed:{textStyle:{default:{},active:{}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb",lineDash:[5,5]},active:{}},markerStyle:{}},link:{textStyle:{default:{fill:"#1890ff"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{fill:"#1890ff"}}},text:{textStyle:{default:{fill:"#000"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{stroke:"#000"}}},default:{textStyle:{default:{fill:"#000"},active:{fill:"#1890ff"}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb"},active:{stroke:"#1890ff"}},markerStyle:{default:{stroke:"#bbb",lineWidth:1},active:{stroke:"#1890ff"}}}},Lg={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}},Cg=(i(jg,Ag=la),Object.defineProperty(jg.prototype,"markerSize",{get:function(){var t=this.attributes.marker,e=this.getStyle("markerStyle");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(jg.prototype,"text",{get:function(){var t,e=this.attributes.text;return""===e?e:(t=this.textAvailableWidth,Ry(e,t))},enumerable:!1,configurable:!0}),Object.defineProperty(jg.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.marker,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=Ns(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(jg.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),jg.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=I({},Gs(Ng,[n,e]),Qy(Gs(Tg,[t,e]),r),Qy(Gs(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in Lg[e]&&(i[t]=Gs(Lg,[e,t]))}),Object.keys(Lg.strict[e]).forEach(function(t){i[t]=Gs(Lg,["strict",e,t])}),I(i,Qy(Gs(this.attributes,e),"disabled"))),i},jg.prototype.render=function(t,e){var n=t.padding,r=t.marker,t=t.markerSpacing,t=void 0===t?0:t,n=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),R($y(n),4)),i=(n[0],n[1]),a=(n[2],n[3]),o=this.buttonHeight,s=this.getStyle("markerStyle"),l=this.markerSize,n=D(e,".marker",function(){return new E({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(_(_({},s),{symbol:r,x:a+l/2,y:o/2,size:l}))}).node().getLocalBounds(),c=this.text,c=void 0===c?"":c,u=this.getStyle("textStyle"),n=(this.textShape=D(e,".text","text").attr("className","text").style("x",l?n.max[0]+t:a).style("y",o/2).style("text",c).style("textAlign","left").style("textBaseline","middle").call(S,u).node(),this.textShape.getLocalBounds()),c=this.getStyle("buttonStyle");D(e,".background","rect").attr("className","background").style("zIndex",-1).call(S,c).style("height",o).style("width",a+(l?l+t:0)+2*n.halfExtents[0]+i).node()},jg.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},jg.prototype.setState=function(t){this.update({state:t})},jg.prototype.hide=function(){this.style.visibility="hidden"},jg.prototype.show=function(){this.style.visibility="visible"},jg.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},jg.defaultOptions={type:jg.tag="button",style:{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",markerAlign:"left",markerSpacing:5,textStyle:{default:{},active:{}},buttonStyle:{default:{lineWidth:1,radius:5},active:{}},markerStyle:{default:{}}}},jg);function jg(t){var n=Ag.call(this,hg({},jg.defaultOptions,t))||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=void 0===t?"default":t,n.render(n.attributes,n)},n}function Fg(t){return Pg.call(this,I({},Fg.defaultOptions,t))||this}i(Fg,Pg=la),Fg.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,c=t.width,u=t.separator,t=R($y(i),3),i=t[0],f=t[1],t=t[2],h=D(e,".container","g").attr("className","container").style("x",n+t).style("y",r+i),d=0,p=0,y=(h.node().removeChildren(),this),a=0;a<s.length;a++)!function(t){var e,n=s[t],r=new Sg({className:"breadcrumb-item",style:_(_({x:d,y:p,text:fs(n.text)?n.id:n.text,textStyle:l},qs(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(h.append(function(){return r}),r.getLocalBounds()),a=2*i.halfExtents[0],i=2*i.halfExtents[1],a=(d+=a,fs(c)||c-f<d&&(r.attr({x:0,y:p+i}),d=a,p+=i),y.bindInnerEvents(r,n),u||{}),n=a.spacing,n=void 0===n?0:n,o=a.text,o=void 0===o?"/":o,a=a.style;t!==s.length-1&&(e=new F.Text({className:"".concat(Fg.tag,"-separator"),id:"".concat(Fg.tag,"-separator-").concat(t),style:_(_(_(_({},Ky),{x:d+n,y:p+i/2}),a),{text:o,textAlign:"end",textBaseline:"middle"})}),h.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(a)},Fg.prototype.update=function(t){this.attr(I({},this.attributes,t)),this.render(this.attributes,this)},Fg.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},Fg.defaultOptions={type:Fg.tag="breadcrumb",style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:_(_({},Ky),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};i(Bg,Ig=F.DisplayObject),Bg.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},Bg.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},Bg.prototype.update=function(t){var e=t.lines,t=t.areas;this.clear(),e&&this.setAttribute("lines",e),t&&this.setAttribute("areas",t),this.render()},Bg.prototype.createLines=function(t){var e=this;t.forEach(function(t){e.linesGroup.appendChild(new F.Path({name:"line",style:t}))})},Bg.prototype.createAreas=function(t){var e=this;t.forEach(function(t){e.areasGroup.appendChild(new F.Path({name:"area",style:t}))})};var Ig,Rg=Bg;function Bg(t){var e=this,n=t.style,t=K(t,["style"]);return(e=Ig.call(this,I({},{type:"lines",style:{width:0,height:0}},_({style:n},t)))||this).linesGroup=new F.Group({name:"lines"}),e.appendChild(e.linesGroup),e.areasGroup=new F.Group({name:"areas"}),e.appendChild(e.areasGroup),e.render(),e}i(Wg,Dg=F.DisplayObject),Wg.prototype.render=function(){var e=this;this.attributes.columns.forEach(function(t){t.forEach(function(t){e.columnsGroup.appendChild(new F.Rect({name:"column",style:t}))})})},Wg.prototype.update=function(t){this.attr(I({},this.attributes,t)),t.columns&&(this.clear(),this.render())},Wg.prototype.clear=function(){this.removeChildren()};var Dg,zg=Wg;function Wg(t){var e=this,n=t.style,t=K(t,["style"]);return(e=Dg.call(this,I({},{type:"column",style:{width:0,height:0}},_({style:n},t)))||this).columnsGroup=new F.Group({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function Hg(t){return 0===t.length?[0,0]:[gs(Ss(t,function(t){return gs(t)||0})),ys(_s(t,function(t){return ys(t)||0}))]}function Vg(t){for(var e=Ds(t),n=e[0].length,t=R([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],a=0;a<e.length;a+=1)for(var o=e[a],s=0;s<n;s+=1)0<=o[s]?(o[s]+=r[s],r[s]=o[s]):(o[s]+=i[s],i[s]=o[s]);return e}function Gg(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r;if(o){c=r[0],u=r[1];for(var s=0,l=t.length;s<l;s+=1)var c=Xt([0,0],c,x=t[s]),u=$t([0,0],u,x)}for(var s=0,f=t.length;s<f;s+=1){var h,d,p,y,g,m,v,b,x=t[s];0!==s||n?s!==f-1||n?(h=t[[s?s-1:f-1,s-1][n?0:1]],d=t[n?(s+1)%f:s+1],m=Zt(m=Qt([0,0],d,h),m,e),0!==(g=(p=Kt(x,h))+(y=Kt(x,d)))&&(p/=g,y/=g),g=Zt([0,0],m,-p),m=Zt([0,0],m,y),v=Ut([0,0],x,g),b=Xt([0,0],b=Ut([0,0],x,m),$t([0,0],d,x)),b=$t([0,0],b,Xt([0,0],d,x)),v=Xt([0,0],v=Ut([0,0],x,g=Zt([0,0],g=Qt([0,0],b,x),-p/y)),$t([0,0],h,x)),v=$t([0,0],v,Xt([0,0],h,x)),b=Ut([0,0],x,m=Zt([0,0],m=Qt([0,0],x,v),y/p)),o&&(v=Xt([0,0],v=$t([0,0],v,c),u),b=Xt([0,0],b=$t([0,0],b,c),u)),a.push(i),a.push(v),i=b):(v=x,a.push(i),a.push(v)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,f=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[0])[0],l[1]])),f}function qg(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return re([e===n?"M":"L"],R(t),!1)});return e?t.reverse():t}function Yg(t,e){if(void 0===e&&(e=!1),t.length<=2)return qg(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];Zs(a,n.slice(-2))||n.push.apply(n,re([],R(a),!1))}var o=Gg(n,!1);return e?o.unshift(re(["M"],R(t[r-1]),!1)):o.unshift(re(["M"],R(t[0]),!1)),o}function Ug(t,e,n){t=Ds(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}i(Kg,Xg=la),Object.defineProperty(Kg.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=Ds(t),ws(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(Kg.prototype,"data",{get:function(){return this.attributes.isStack?Vg(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(Kg.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(Kg.prototype,"baseline",{get:function(){var t=this.scales.y,e=R(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(Kg.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(Kg.prototype,"linesCfg",{get:function(){var t,n,r,i,a,e,o,s,l,c=this,u=this.attributes,f=u.areaStyle,h=u.isStack,d=u.lineStyle,p=u.smooth,u=this.containerCfg.width,y=this.data;return 0===y[0].length?{lines:[],areas:[]}:(t=this.scales,e=t.x,t=t.y,y=y,n=(e={type:"line",x:e,y:t}).x,r=e.y,i=(e=R(r.getOptions().range||[0,0],2))[0],a=e[1],i<a&&(e=R([i,a],2),a=e[0],i=e[1]),t=y.map(function(t){return t.map(function(t,e){return[n.map(e),xs(r.map(t),a,i)]})}),e=[],f&&(y=this.baseline,e=h?(p?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=Yg(o),l=void 0,l=0===i?Ug(s,e,n):(a=Yg(t[i-1],!0),o=o[0],a[0][0]="L",re(re(re([],R(s),!1),R(a),!1),[re(["M"],R(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=qg(t[i]),s=void 0,s=0===i?Ug(o,e,n):((a=qg(t[i-1],!0))[0][0]="L",re(re(re([],R(o),!1),R(a),!1),[["Z"]],!1));r.push(s)}return r})(t,u,y):(o=p,s=u,l=y,t.map(function(t){return Ug((o?Yg:qg)(t),s,l)}))),{lines:t.map(function(t,e){return _({stroke:c.getColor(e),path:(p?Yg:qg)(t)},d)}),areas:e.map(function(t,e){return _({path:t,fill:c.getColor(e)},f)})})},enumerable:!1,configurable:!0}),Object.defineProperty(Kg.prototype,"columnsCfg",{get:function(){var i=this,t=this.attributes,a=t.isStack,o=t.columnStyle,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};a&&(s=Vg(s));var e=this.createScales(s),l=e.x,c=e.y,e=R(Hg(s),2),n=e[0],e=e[1],u=new Zp({domain:[0,e-(0<n?0:n)],range:[0,t]}),f=l.getBandWidth(),h=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=f/s.length;return _(_({fill:i.getColor(r)},o),a?{x:l.map(e),y:c.map(t),width:f,height:u.map(h[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),Kg.prototype.render=function(t,e){this.containerShape=D(e,".container","rect").attr("className","container").node();var n=this.attributes.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=D(e,".".concat(r),function(){return new("line"===n?Rg:zg)({className:r,style:i})}).call(S,i).node()},Kg.prototype.update=function(t){this.attr(I({},this.attributes,t)),this.render(this.attributes,this)},Kg.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},Kg.prototype.getColor=function(t){var e=this.attributes.color;return hs(e)?e[t%e.length]:us(e)?e.call(null,t):e},Kg.prototype.createScales=function(t){var e=this.attributes,n=e.type,r=e.isGroup,i=e.barPadding,a=e.nice,a=void 0===a||a,o=e.minValue,e=e.maxValue,s=this.containerCfg,l=s.width,s=s.height,c=R(Hg(t),2),u=c[0],c=c[1];return{type:n,x:"line"===n?new Zp({domain:[0,t[0].length-1],range:[0,l]}):new Dp({domain:t[0].map(function(t,e){return e}),range:[0,l],paddingInner:r?i:0}),y:new Zp({domain:[null!=o?o:u,null!=e?e:c],range:[s,0],nice:a})}},Kg.tag="sparkline",Kg.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineStyle:{lineWidth:1},isGroup:!1,columnStyle:{lineWidth:1,stroke:"#fff",padding:.1}}};var Xg,$g,Zg=Kg;function Kg(t){return Xg.call(this,I({},Kg.defaultOptions,t))||this}function Jg(){return null!==$g&&$g.apply(this,arguments)||this}function Qg(e,n){return i(t,r=F.CustomElement),t.prototype.connectedCallback=function(){var t,e;null!=(t=(e=this.descriptor).render)&&t.call(e,this.attributes,this),null!=(e=(t=this.descriptor).bindEvents)&&e.call(t,this.attributes,this)},t.prototype.update=function(t){var e;this.attr(I({},this.attributes,t=void 0===t?{}:t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t;function t(t){t=r.call(this,hg({},{style:n},t))||this;return t.descriptor=e,t}var r}i(Jg,$g=F.CustomElement);var tm=Qg({render:function(t,e){function n(t,e,n,r,i){D(f,"line-".concat(t),"line").attr("className","line-".concat(t)).style("x1",e).style("y1",n).style("x2",r).style("y2",i).style("stroke",f.style.stroke).style("strokeOpacity",f.style.strokeOpacity).style("lineWidth",f.style.lineWidth)}var r=t.size,i=t.radius,a=t.stroke,o=t.fill,s=t.lineWidth,l=t.orient,c=t.fillOpacity,t=t.strokeOpacity,r=void 0===r?10:r,u=2.4*r,f=D(e,".rect","rect").attr("className","rect").style("x",-r/2).style("y",-u/2).style("width",r).style("height",u).style("fill",o||"#fff").style("fillOpacity",c||1).style("stroke",a||"#bfbfbf").style("lineWidth","number"!=typeof s?1:s).style("strokeOpacity",t).style("radius","number"!=typeof i?r/4:null!=i?i:2).node(),o=1/3*r,c=2/3*r,a=.25*u,s=.75*u;n(0,o,a,o,s),n(0,c,a,c,s),f.setOrigin(r/2,u/2),"vertical"===l?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}});i(am,em=la),am.prototype.render=function(t,e){var n,r,i,a=t.iconCfg,t=t.textCfg;i=e,a=((n=a)||{}).type,r="handle-icon ".concat(a,"-handle"),M(i).selectAll(".handle-icon").data(a?[a]:[],function(t){return t}).join(function(t){return t.append(function(t){return"symbol"===t?new E({className:r,name:"icon",style:n}):new tm({name:"icon",className:r,style:n})})},function(t){return t.each(function(){this.update(n)})},function(t){return t.remove()}),void 0===(i=t)&&(i={}),D(e,".".concat(a="handle-text"),"text").attr("className",a).style("fontSize",12).style("fill","#000").style("fillOpacity",.45).style("textAlign","center").style("textBaseline","middle").call(S,i)};var em,nm,rm,im=am;function am(){return null!==em&&em.apply(this,arguments)||this}function om(t){var a=nm.call(this,I({},om.defaultOptions,t))||this;return a.onSelectionMouseenter=function(){a.selectionShape.attr(a.getStyle("selectionStyle"))},a.onSelectionMouseleave=function(){a.selectionShape.attr(a.getStyle("selectionStyle"))},a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(tg(t));var t=a.availableSpace,e=t.x,t=t.y,n=a.attributes,r=n.x,n=n.y;a.selectionStartPos=a.getRatio(a.prevPos-a.getOrientVal([e,t])-a.getOrientVal([r,n])),a.selectionWidth=0,a.addEventListener("mousemove",a.onDragging),a.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){t.stopPropagation();var t=a.getOrientVal(tg(t)),e=t-a.prevPos;if(e){var n=a.getRatio(e);switch(a.target){case"start":a.setValuesOffset(n);break;case"end":a.setValuesOffset(0,n);break;case"selection":a.setValuesOffset(n,n);break;case"background":a.selectionWidth+=n,a.setValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort())}a.prevPos=t}},a.onDragEnd=function(){a.removeEventListener("mousemove",a.onDragging),a.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChanged=function(t){t=new F.CustomEvent("valueChanged",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}function sm(t){var o=rm.call(this,I({},sm.defaultOptions,t))||this;return o.onValueChanged=function(t){var e=o.style.value;t!==e&&(e=new F.CustomEvent("scroll",t={detail:{oldValue:t,value:e}}),o.dispatchEvent(e),e=new F.CustomEvent("valueChanged",t),o.dispatchEvent(e))},o.onTrackClick=function(t){var e=o.attributes.thumbLen,n=R(o.getLocalPosition(),2),r=n[0],n=n[1],i=R(o.padding,4),a=i[0],i=i[3],r=o.getOrientVal([r+i,n+a]),i=o.getOrientVal(tg(t))-e/2,n=o.valueOffset(i-r,!0);o.setValue(n)},o.onThumbMouseenter=function(){o.thumbShape.attr(o.getStyle("thumbStyle","active"))},o.onTrackMouseenter=function(){o.trackShape.attr(o.getStyle("trackStyle","active"))},o.onThumbMouseleave=function(){o.thumbShape.attr(o.getStyle("thumbStyle"))},o.onTrackMouseleave=function(){o.trackShape.attr(o.getStyle("trackStyle"))},o.onDragStart=function(t){t.stopPropagation(),o.prevPos=o.getOrientVal(tg(t)),document.addEventListener("mousemove",o.onDragging),document.addEventListener("mouseup",o.onDragEnd),document.addEventListener("touchmove",o.onDragging),document.addEventListener("touchcancel",o.onDragEnd)},o.onDragging=function(t){t.stopPropagation();var t=o.getOrientVal(tg(t)),e=t-o.prevPos;o.setOffset(e),o.prevPos=t},o.onDragEnd=function(t){t.preventDefault(),document.removeEventListener("mousemove",o.onDragging),document.removeEventListener("mouseup",o.onDragEnd),document.removeEventListener("touchmove",o.onDragging),document.removeEventListener("touchcancel",o.onDragEnd)},o}i(om,nm=la),Object.defineProperty(om.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.getSafetyValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(om.prototype,"names",{get:function(){return this.getAttribute("names")},set:function(t){this.setAttribute("names",t)},enumerable:!1,configurable:!0}),Object.defineProperty(om.prototype,"backgroundShapeCfg",{get:function(){return _(_({cursor:"crosshair",zIndex:0},this.availableSpace),this.getStyle("backgroundStyle"))},enumerable:!1,configurable:!0}),Object.defineProperty(om.prototype,"sparklineShapeCfg",{get:function(){var t=this.attributes,t=(t.orient,t.sparkline),e=t.padding,t=K(t,["padding"]),e=R($y(e),4),n=e[0],r=e[1],i=e[2],e=e[3],a=this.availableSpace,o=a.width,a=a.height,s=this.getStyle("backgroundStyle").lineWidth,s=void 0===s?0:s;return _(_({x:s/2+e,y:s/2+n},t),{zIndex:0,width:o-s-e-r,height:a-s-n-i})},enumerable:!1,configurable:!0}),Object.defineProperty(om.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.padding,n=t.width,t=t.height,e=R($y(e),4),r=e[0],i=e[1],a=e[2],e=e[3];return{x:e,y:r,width:n-(e+i),height:t-(r+a)}},enumerable:!1,configurable:!0}),om.prototype.getValues=function(){return this.values},om.prototype.setValues=function(t){this.values=t,this.update({values:t})},om.prototype.getNames=function(){return this.names},om.prototype.setNames=function(t){this.names=t},om.prototype.render=function(t,e){function n(e){var t="slider-".concat(e,"-handle");return D(a,".".concat(t),function(){return new im({className:t})}).call(function(t){t.node().update(r.getHandleShapeCfg(e))}).node()}var r=this,i=t.backgroundStyle,t=t.selectionStyle,e=D(e,".slider-background","rect").attr("className","slider-background").style("cursor","crosshair").style("fill","#416180").style("fillOpacity",.05).call(S,this.availableSpace).call(S,Qy(i)).node(),a=(D(this.backgroundShape=e,".slider-sparkline",function(){return new Zg({})}).attr("className","slider-sparkline").call(function(t){t.node().update(r.sparklineShapeCfg)}),D(e,".slider-foreground","g").attr("className","slider-foreground").node());this.selectionShape=D(a,".slider-selection","rect").attr("className","slider-selection").style("cursor","move").style("zIndex",2).style("fill","#5B8FF9").style("fillOpacity",.15).call(S,this.calcMask()).call(S,Qy(t)||{}).node();this.startHandle=n("start"),this.endHandle=n("end")},om.prototype.getSafetyValues=function(t,e){void 0===t&&(t=this.getValues()),void 0===e&&(e=4);var n,r=this.attributes,i=r.min,r=r.max,a=R(this.getValues(),2),o=a[0],a=a[1],t=R(t||[o,a],2),s=t[0],t=t[1],l=t-s;return t<s&&(s=(n=R([t,s],2))[0],t=n[1]),r-i<l?[i,r]:s<i?o===i&&a===t?[i,t]:[i,l+i]:r<t?a===r&&o===s?[s,r]:[r-l,r]:[Hy(s,e),Hy(t,e)]},om.prototype.getStyle=function(t,e,n){return void 0===e&&(e="default"),n?this.getHandleCfg(n):Qy(Gs(this.attributes,t),e,!0)},om.prototype.calcMask=function(t){var t=R(this.getSafetyValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.width,n=n.height;return this.getOrientVal([{y:0,height:n,x:e*r,width:(t-e)*r},{x:0,width:r,y:e*n,height:(t-e)*n}])},om.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=R(this.getSafetyValues(),2),i=r[0],r=r[1],t=("start"===t?i:r)*this.getOrientVal([n,e]);return{x:this.getOrientVal([t,n/2]),y:this.getOrientVal([e/2,t])}},om.prototype.calcHandleText=function(t){var e,n,r=this.attributes,i=r.orient,r=r.names,a=this.getHandleCfg(t),o=a.spacing,s=a.formatter,a=a.textStyle,l=this.getHandleSize(t),c=this.getSafetyValues(),u=this.availableSpace,f=u.width,u=u.height,h=this.calcMask(),d=h.x,p=h.y,y=h.width,h=h.height,r=R("start"===t?[r[0],c[0]]:[r[1],c[1]],2),c=s(r[0],r[1]),s=new F.Text({style:_(_({},a),{text:c})}),r=rg(s),a=r.width,r=r.height,s=(s.destroy(),0),g=0,l=l/2,m="center";return"horizontal"===i?(e=(i=o+l)+a/2,m="start"===t?(s=0<(n=d-i-a)?-e:e,0<n?"end":"start"):(s=(n=a<f-d-y-i)?e:-e,n?"start":"end")):(a=o+l,g="start"===t?r<p-l?-a:a:r<u-p-h-l?a:-a),{x:s,y:g,text:c,textAlign:m}},om.prototype.getHandleTextShapeCfg=function(t){var e=this.getHandleCfg(t).textStyle;return _(_({},e),this.calcHandleText(t))},om.prototype.getHandleIconShapeCfg=function(t){var e,n=this.attributes.orient,r=this.getHandleCfg(t),i=r.handleIcon,r=r.handleStyle,a=this.getOrientVal(["ew-resize","ns-resize"]),t=this.getHandleSize(t),i=i?(e="symbol",_(_({},r),{cursor:a,size:t,symbol:i})):(e="default",_(_({},r),{cursor:a,size:t}));return _({orient:n,type:e},i)},om.prototype.getHandleShapeCfg=function(t){var e=this.getHandleCfg(t),n=this.calcHandlePosition(t),r=n.x,n=n.y,i=this.calcHandleText(t);return{x:r,y:n,handleType:t,zIndex:3,visibility:null!=e&&e.show?"visible":"hidden",iconCfg:this.getHandleIconShapeCfg(t),textCfg:_(_({},this.getHandleTextShapeCfg(t)),i)}},om.prototype.getHandleCfg=function(t){var e=Gs(this.attributes,"handle"),n=e.start,r=e.end,e=K(e,["start","end"]),i={};return"start"===t?i=n:"end"===t&&(i=r),I({},e,i)},om.prototype.getHandleSize=function(t){var e,t=this.getHandleCfg(t).size;return t||(e=(t=this.attributes).width,t=t.height,Math.floor((this.getOrientVal([t,e])+4)/2.4))},om.prototype.getOrientVal=function(t){var t=R(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},om.prototype.setValuesOffset=function(t,e){void 0===e&&(e=0);var n=R(this.getValues(),2),r=n[0],n=n[1],t=[r+t,n+e].sort();this.setValues(t),this.onValueChanged([r,n])},om.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},om.prototype.bindEvents=function(){function r(t){return t&&".handle-text"!==t.className}var i=this,t=this.selectionShape;t.addEventListener("mousedown",this.onDragStart("selection")),t.addEventListener("touchstart",this.onDragStart("selection")),t.addEventListener("mouseenter",this.onSelectionMouseenter),t.addEventListener("mouseleave",this.onSelectionMouseleave);[this.startHandle,this.endHandle].forEach(function(t){var n=t.style.handleType;t.addEventListener("mousedown",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)}),t.addEventListener("touchstart",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)})}),this.backgroundShape.addEventListener("mousedown",this.onDragStart("background")),this.backgroundShape.addEventListener("touchstart",this.onDragStart("background"))},om.defaultOptions={type:om.tag="slider",style:{orient:"horizontal",values:[0,1],names:["",""],min:0,max:1,width:200,height:20,sparkline:{padding:[1,1,1,1]},padding:[0,0,0,0],selectionStyle:{active:{fill:"#ccdaf5"}},handle:{show:!0,formatter:function(t,e){return t},spacing:10}}},i(sm,rm=la),Object.defineProperty(sm.prototype,"padding",{get:function(){return $y(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(sm.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.width,t=t.height,n=R(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3];return{x:n,y:r,width:e-(n+i),height:t-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(sm.prototype,"trackLen",{get:function(){var t=this.availableSpace,e=t.width,t=t.height;return this.getOrientVal([e,t])},enumerable:!1,configurable:!0}),Object.defineProperty(sm.prototype,"thumbRadius",{get:function(){var t=this.attributes.isRound,e=this.availableSpace,n=e.width,e=e.height,r=Gs(this.attributes,["thumbStyle","default","radius"]);return t?r||this.getOrientVal([e,n])/2:0},enumerable:!1,configurable:!0}),sm.prototype.render=function(t,e){var n=t.width,r=t.height,i=t.trackStyle,a=t.thumbStyle,o=t.value,s=t.thumbLen,t=t.orient,e=D(e,".track","rect").attr("className","track").style("width",null!=n?n:10).style("height",null!=r?r:200).call(S,Qy(i)).node(),n=this.valueOffset(o||0),r=this.availableSpace;this.thumbShape=D(e,".thumb","rect").attr("className","thumb").style("x","vertical"===t?r.x:r.x+n).style("y","vertical"===t?r.y+n:r.y).style("width","vertical"===t?r.width:s).style("height","vertical"===t?s:r.height).style("radius",this.thumbRadius).call(S,Qy(a)).node(),this.trackShape=e},sm.prototype.getValue=function(){return this.style.value},sm.prototype.setValue=function(t){var e=this.style,n=e.value,r=e.min,e=e.max;this.update({value:xs(t,r,e)}),this.onValueChanged(n)},sm.prototype.setOffset=function(t){var e=this.getValue();this.setValue(this.valueOffset(t,!0)+e)},sm.prototype.valueOffset=function(t,e){var n=this.attributes,r=n.thumbLen,i=n.min,n=n.max,r=this.trackLen-r;return(e=void 0!==e&&e)?t/r:r*xs(t,i,n)},sm.prototype.getStyle=function(t,e){return void 0===e&&(e="default"),Qy(Gs(this.attributes,t),e)},sm.prototype.bindEvents=function(){this.trackShape.addEventListener("click",this.onTrackClick),this.thumbShape.addEventListener("mousedown",this.onDragStart),this.thumbShape.addEventListener("touchstart",this.onDragStart),this.onHover()},sm.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},sm.prototype.onHover=function(){this.thumbShape.addEventListener("mouseenter",this.onThumbMouseenter),this.trackShape.addEventListener("mouseenter",this.onTrackMouseenter),this.thumbShape.addEventListener("mouseleave",this.onThumbMouseleave),this.trackShape.addEventListener("mouseleave",this.onTrackMouseleave)},sm.defaultOptions={type:sm.tag="scrollbar",style:{orient:"vertical",min:0,max:1,isRound:!0,thumbLen:20,padding:[2,2,2,2],trackStyle:{default:{fill:"#fafafa",lineWidth:1,stroke:"#e8e8e8"},active:{}},thumbStyle:{default:{fill:"#c1c1c1"},active:{opacity:.8}}}};Object.defineProperty(cm.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(cm.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(cm.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(cm.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(cm.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(cm.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),cm.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},cm.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},cm.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},cm.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},cm.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},cm.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},cm.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},cm.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var lm=cm;function cm(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function um(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=R(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=R(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function fm(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),a=i.min,o=i.max,i=i.halfExtents,s=a[0],l=2*i[0],i=2*i[1],a=a[1],c=o[0],o=o[1],u=0,f=0,h=s,d=a,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,y=e.style.textBaseline,u=+e.style.dx,f=+e.style.dy,"center"===p?h=(s+c)/2:"right"!==p&&"end"!==p||(h=c),"middle"===y?d=(a+o)/2:"bottom"!==y&&"baseline"!==y||(d=o)),R(n,4)),c=p[0],y=void 0===c?0:c,o=p[1],n=void 0===o?0:o,c=p[2],o=p[3];return t.set((u+=s)-(void 0===o?n:o),(f+=a)-y,u+l+n,f+i+(void 0===c?y:c)),e.setEulerAngles(r),t.rotatedPoints(r*Xy,h,d)}function hm(t,e,n){t=fm(new lm,t,n),e=fm(new lm,e,n);return um(e,[t[0],t[1],t[2],t[3]])||um(e,[t[0],t[1],t[4],t[5]])||um(e,[t[4],t[5],t[6],t[7]])||um(e,[t[2],t[3],t[6],t[7]])}function dm(t,e,n){return"top"===t||"bottom"===t?e:n}function pm(t,e,n){return"left"===t||"right"===t?e:n}function ym(t,e,n){return"outside"===t?e:n}var gm=function(t,e,n){return"left"===t?e:n},mm=function(t,e,n){return"right"===t?e:n},vm=function(t,e,n){return"left"===t||"top"===t||"inside"===t?e:n};function bm(t,r){var i;return re([],R(t.reduce(function(t,e,n){return n&&i&&hm(i,e,r)?(t.add(i),t.add(e)):i=e,t},new Set)),!1)}var ba={style:{title:{content:"",rotate:void 0,maxLength:260},ticks:[],ticksThreshold:100,tickLine:{len:6},subTickLine:{len:4,count:0},label:{type:"text",alignTick:!0,tickPadding:2,margin:[0,0,0,0],overlapOrder:["autoRotate","autoEllipsis","autoHide"],autoRotate:!1,autoEllipsis:!1,autoHide:!1,autoHideTickLine:!0,showLast:!0,showFirst:!0,optionalAngles:[0,45,90],minLabel:0,minLength:14,maxLength:160,ellipsisStep:" "},verticalFactor:1}},xm=(I({},ba,{style:{type:"arc"}}),I({},ba,{style:{}}),{year:[["year","second"],["year","day"],["month","day"],["day","day"]],month:[["month","day"],["day","day"]],day:[["month","day"],["day","day"]],hour:[["hour","second"],["hour","minute"],["hour","hour"]],minute:[["minute","second"],["second","second"]],second:[["second","second"]]});function wm(t,r){for(var i,a=t.map(function(t,e){return[t.id,{text:t.style.text,value:t.style.tip||t.style.text,idx:e}]}),o=new Map(a),e=Ss(a,function(t){t=R(t,2),t[0],t=t[1].value;return new Date(t).getTime()}).text,n=_s(a,function(t){t=R(t,2),t[0],t=t[1].value;return new Date(t).getTime()}).text,s=(n=n,e=R([lg(e=e),lg(n)],2),n=e[0],e=e[1],n.getFullYear()!==e.getFullYear()?"year":n.getMonth()!==e.getMonth()?"month":n.getDay()!==e.getDay()?"day":n.getHours()!==e.getHours()?"hour":n.getMinutes()!==e.getMinutes()?"minute":"second"),l=new Date("1970-01-01 00:00:00"),c=zy(t[0]),u=0;u<xm[s].length;u+=1){var f=xm[s][u];if(tl(ug(l,cg(f)),c)<r){i=f;break}i=f}return function(t,e){var n,e=o.get(e.id).idx;return 0===e?t:(e=null==(e=a[e-1])?void 0:e[1].text,t=new Date(t),n=i,fg(new Date(e),s)!==fg(t,s)&&(n=function(t,e,n,r){for(var i=[],a=R(t,2)[1],o=og.indexOf(a),s=0;s<=o;s+=1){var l=[og[s],a];if(tl(ug(e,cg(l)),r)<n){i=l;break}}return i}(i,t,r,c)),ug(t,cg(n)))}}function Mm(o,s,t){if(!(s.length<=1))for(var e=t.ellipsisStep,n=t.minLength,r=t.maxLength,i=t.margin,l=void 0===i?[]:i,c=t.labelType,u=zy(s[0]),a=Dy(e,u)||1,f=Dy(n,u)||1,i=Dy(r,u),h=(!fs(i)&&i!==1/0||(i=Math.max.apply(null,s.map(function(t){return t.getBBox().width}))),Date.now()),d=s.slice(),t=R(l,4),e=(t[0],t[1]),p=void 0===e?0:e,n=(t[2],t[3]),y=void 0===n?p:n,g=function(e){var t,n,r,i,a;return(d=bm(s,l)).length<1||300<Date.now()-h?{value:void 0}:(a=function(t,e){return""},n=dm(o,e-y-p,e),a="time"===c?wm(s,n):"number"===c?(n=n,r=(t=s).map(function(t,e){return{text:t.style.text,value:Number(t.style.tip||t.style.text)}}),r=Number(_s(r,function(t){t=t.text;return(null==t?void 0:t.length)||0}).value),t=zy(t[0]),i=Vy(r),tl(i,t)<=n?function(t,e){return Vy(Number(t))}:(i=Gy(r),tl(i,t)<=n?function(t,e){return Gy(Number(t),1)}:function(t,e){return Number(t).toExponential()})):function(t){return Ry(t,e,u)},void d.forEach(function(t,e){var n=t.style.tip||t.style.text,n=(t.style.tip=n,a.call(null,n,t));t.attr("text",n)}))},m=i;f+a<m;m-=a){var v=g(m);if("object"==typeof v)return v.value}}var km=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(t.style.visibility="hidden"))})};function Om(t,e,n){var r=e.length;if(!(r<=1||2===r&&null!=n&&n.showFirst&&null!=n&&n.showLast)){var i,a,o,s=km,l=2,c=e.slice(),u=e.slice(),f=Date.now(),h=Math.min.apply(null,e.map(function(t){return t.getBBox().width}))||1;for("top"!==t&&"bottom"!==t||(t=ig(e[0]).left,e=ig(e[r-1]).right,e=Math.abs(e-t)||1,l=Math.max(Math.floor(r*h/e),l)),null!=n&&n.showFirst&&(i=c.splice(0,1)[0]),null!=n&&n.showLast&&(a=c.splice(-1,1)[0],c.reverse());bm((a?re(re([a],R(u),!1),[i],!1):re([i],R(u),!1)).filter(function(t){return vg(t)}),null==n?void 0:n.margin).length;)if(a&&!i&&l%2==0?c.splice(0,1).forEach(function(t){return t.style.visibility="hidden"}):a&&i&&c.splice(0,1).forEach(function(t){return t.style.visibility="hidden"}),u=s(((o=c).forEach(function(t){return t.style.visibility="visible"}),o),{seq:l}),l++,200<Date.now()-f)return}}function _m(a,t,e){for(var n=e.optionalAngles,o=void 0===n?[0,45,90]:n,r=e.margin,i=function(i){if(t.forEach(function(t){return e=a,t=t,n=o[i],t.setEulerAngles(n),void(n&&(r=vm(e,-1,1),e=gm(e,"end",mm(e,"start",Yy(Uy(r,n),"left",qy(Uy(r,n),"right")))),t.style.textAlign=e));var e,n,r}),bm(t,r).length<1)return"break"},s=0;s<o.length&&"break"!==i(s);s++);}var Sm=new Map([["autoHide",{getDefault:function(){return Om},equidistance:Om,greedy:function(t,e,n){var r,i=e.length;i<=1||2===i&&null!=n&&n.showFirst&&null!=n&&n.showLast||e.slice().forEach(function(t,e){e&&r&&hm(r,t,null==n?void 0:n.margin)?e===i-1&&null!=n&&n.showLast?r.style.visibility="hidden":t.style.visibility="hidden":r=t})}}],["autoRotate",{getDefault:function(){return _m}}],["autoEllipsis",{getDefault:function(){return Mm},ellipsis:Mm}]]);function Em(t,e,n){var r,t=Array.from(t||[]).map(function(t,e){return _({id:"".concat(e)},t)}),i=t.length,a=t;return"number"==typeof e&&e<i&&(r=Math.ceil(i/e),a=t.filter(function(t,e){return e%r==0||e===i-1})),n&&1!==a[a.length-1].value&&a.push({value:1,id:"append"}),a}function Am(o,s){return function(i){var t,a;o&&(t=void 0===(t=o.overlapOrder)?[]:t,a=_({labelType:o.type},qs(o,["optionalAngles","minLength","maxLength","ellipsisStep","showFirst","showLast","margin"])),t.forEach(function(t){var e,n=Sm.get(t),r=o[t];n&&r&&(t=t,e=o)&&("autoRotate"!==t||fs(e.rotate))&&(t=n.getDefault(),"function"==typeof r?t=r:"object"==typeof r?(t=n[r.type]||Us,a=_(_({},a),r.cfg)):"string"==typeof r&&(t=n[r]||Us),t(s,i,a))}))}}function Pm(t,n,e){e&&t.forEach(function(t,e){e=n[e];e&&(e.style.visibility=t.style.visibility)})}function Nm(t,e,n,r,i,a){D(t,".axis-title","text").attr("className","axis-title").style("text",(null==a?void 0:a.content)||"").style("x",e).style("y",n).style("fill","black").style("fontSize",12).style("fontWeight","lighter").style("textAlign",r).style("textBaseline",i).style("transform","rotate(".concat((null==a?void 0:a.rotate)||0,"deg)")).style("visibility",a?"visible":"hidden").call(S,(null==a?void 0:a.style)||{})}function Tm(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function Lm(t,n,r,e){void 0===e&&(e=""),M(t).selectAll(".axis-".concat(e,"tick")).data(r?n:[],function(t){return t.id}).join(function(t){return t.append(function(t){return new F.Line({className:"axis-".concat(e,"tick"),style:t})}).style("stroke","#416180").style("lineWidth",.5).style("strokeOpacity","sub"===e?.45:.65).style("visibility","visible").each(function(t,e){this.attr(t),Tm(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),Tm(this,e,n,null==r?void 0:r.style)}).style("visibility","visible")},function(t){return t.remove()})}function Cm(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function jm(t,e){var n=zy(t),e=Dy(e,n);t.attr("tip",null),vg(e)&&e<2*t.getBounds().halfExtents[0]&&(e=Ry(t.style.text||"",e,n,"..."),t.attr("tip",t.style.text),t.attr("text",e))}function Fm(t,e,n,r,i){M(t).selectAll(".".concat(e)).data(n,function(t){return t.id}).join(function(t){return t.append("text").attr("className",e).style("fontFamily","sans-serif").style("fontSize",12).style("fontWeight","normal").call(S,i||{}).each(function(t,e){this.attr(t),jm(this,(null==r?void 0:r.maxLength)||Number.MAX_SAFE_INTEGER),Cm(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),jm(this,(null==r?void 0:r.maxLength)||Number.MAX_SAFE_INTEGER),Cm(this,e,n,null==r?void 0:r.style)})},function(t){return t.remove()})}function Im(t,e,n){Fm(t,"axis-label",(n=void 0===n?{}:n)?e:[],n,{fill:"#000",fontWeight:"lighter"})}function Rm(t,e,n,r,i,a){D(t,".axis-".concat(e,"-arrow"),function(){return new E({})}).attr("className","axis-arrow$$ axis-".concat(e,"-arrow")).style("visibility",a?"visible":"hidden").style("symbol","axis-arrow").style("x",n).style("y",r).style("size",8).style("lineWidth",.5).style("fill","grey").style("stroke","grey").style("fillOpacity",.85).style("strokeOpacity",.85).style("transformOrigin","left").style("transform","rotate(".concat(i,"deg)")).call(S,a||{})}function Bm(t,e,n,r){var i,a,o,s;void 0===r&&(r={}),D(t,".axis-line","path").attr("className","axis-line").style("visibility",r?"visible":"hidden").style("stroke","grey").style("lineWidth",.5).style("strokeOpacity",.85).style("path",e).call(S,(null==r?void 0:r.style)||{}),n&&(r=(e=(null==r?void 0:r.arrow)||{}).start,e=e.end,n=R(n,2),i=(a=R(n[0],2))[0],a=a[1],o=(n=R(n[1],2))[0],n=n[1],s=Math.atan((n-a)/(o-i))/Math.PI*180/2,i===o?s=n<a?45:-45:a===n&&(s=o<i?0:90),Rm(t,"start",i,a,s,r),Rm(t,"end",o,n,s+90,e))}function Dm(t,e,n,r){var i,a,o,s,l;return e?(a=t[0],o=e,s=(a=R(a,2))[0],a=a[1],s=(o=R(o,2))[0]-s,o=o[1]-a,i=Math.sqrt(s*s+o*o),l=r?0:1,n?"M".concat(e[0],",").concat(e[1]-i," A").concat(i,",").concat(i,",0,0,").concat(l,",").concat(e[0],",").concat(e[1]+i," A").concat(i,",").concat(i,",0,0,").concat(l,",").concat(e[0],",").concat(e[1]-i," Z"):t.reduce(function(t,e,n){return(0===n?"M":"".concat(t,"A").concat(i,",").concat(i,",0,0,").concat(l,",")).concat(e[0],",").concat(e[1])},"")):""}function zm(t,e,n,r,i){return"circle"===e?Dm(t,n,r,i):(e=t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},""),"".concat(e).concat(r?"Z":""))}i(Vm,Wm=la),Vm.prototype.render=function(t,e){var n,r,i,a,o=t.items,s=void 0===o?[]:o,l=t.type,c=t.center,o=t.lineStyle,u=t.alternateColor,f=t.closed,t=s.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:zm(t.points,l,c,f)}}),h=(n=t,r={style:o},M(e).selectAll(".grid-line").data(n,function(t){return t.id}).join(function(t){return t.append("path").attr("className","grid-line").style("stroke","#D9D9D9").style("lineWidth",1).style("lineDash",[4,4]).each(function(t,e){this.attr(t),Tm(this,e,n,null==r?void 0:r.style)})},function(t){return t.each(function(t,e){this.attr(t),Tm(this,e,n,null==r?void 0:r.style)})},function(t){return t.remove()}),[]);if(u)for(var d=Array.isArray(u)?u:[u,"transparent"],p=0;p<s.length-1;p++){0===p&&2<s[0].points.length&&(y=zm(s[0].points,l,c),h.push({path:y,fill:d[h.length%2]}));var y=zm(s[p].points,l,c,f),g=zm(s[p+1].points.slice().reverse(),l,c,f,!0),m=void 0,m=f?"".concat(y," ").concat(g):"".concat(y," L").concat(g.slice(1)," Z");h.push({path:m,fill:d[h.length%2]})}i=h,M(e).selectAll(".grid-region").data(i,function(t,e){return e}).join(function(t){return t.append("path").attr("className","grid-region").each(function(t,e){this.attr(t),Tm(this,e,i,null==a?void 0:a.style)})},function(t){return t.each(function(t,e){this.attr(t),Tm(this,e,i,null==a?void 0:a.style)})},function(t){return t.remove()})};var Wm,Hm=Vm;function Vm(){return null!==Wm&&Wm.apply(this,arguments)||this}function Gm(t,e){e?D(t,".axis-grid",function(){return new Hm({})}).attr("className","axis-grid").call(function(t){return t.node().update(e)}):(t=t.querySelector(".axis-grid"))&&t.remove()}function qm(t,e,n,r){void 0===r&&(r=0);var t=R(t,2),i=R(t[0],2),a=i[0],i=i[1],t=R(t[1],2),o=t[0],t=t[1],e=R([e*(o-a)+a,e*(t-i)+i],2),s=e[0],e=e[1],o=Jt([0,0],[Math.abs(o-a),-Math.abs(t-i)]),a=vm(n,-1,1),n=R(Zt([0,0],(t=o,!(i=[])?(i[0]=t[1],i[1]=-1*t[0]):(i[0]=-1*t[1],i[1]=t[0]),i),r),2),o=n[0],t=n[1];return[[s,e],[s+Uy(a,o),e+Uy(a,t)]]}function Ym(o,s,t,e,n){var l=(null==n?void 0:n.len)||0,c=t,n=e||{},u=n.formatter,t=n.tickPadding,f=void 0===t?0:t,e=n.offset,h=void 0===e?0:e,t=n.alignTick,d=void 0===t||t,e=n.rotate,p=void 0===e?0:e,y=vm(c,-1,1);return Array.from(o).map(function(t,e){var n=t.value,r=(d||(n=((e===o.length-1?1:null==(r=o[e+1])?void 0:r.value)+n)/2+(i||0)/2),R(qm(s,n,c,l+f),2)),i=R(r[1],2),n=i[0],i=i[1],e=u?u(t,e):t.text,a=dm(c,"center",gm(c,"end","start"));return p&&(a=gm(c,"end",mm(c,"start",Yy(Uy(y,p),"left",qy(Uy(y,p),"right"))))),{id:"label-".concat(t.id),data:t,x:n+dm(c,h,0),y:i+pm(c,h,0),text:e,textAlign:a,textBaseline:pm(c,"middle","top"===c?"bottom":"top"),transform:"rotate(".concat(p||0,"deg)")}})}E.registerSymbol("axis-arrow",function(t,e,n){var r=t+2*n;return[["M",t,e],["L",r,e],["L",r-n,e-n],["L",r+n,e],["L",r-n,e+n],["L",r,e]]});var Um=Qg({render:function(t,e){var n=t.startPos,r=t.endPos,i=t.verticalFactor,a=t.ticksThreshold,o=t.appendTick,s=t.axisLine,l=t.ticks,l=void 0===l?[]:l,c=t.label,c=void 0===c?{}:c,u=t.tickLine,f=t.subTickLine,h=t.title,t=t.grid,n=[n||[0,0],r||[0,0]],r=R(n,2),d=R(r[0],2),p=d[0],d=d[1],r=R(r[1],2),y=r[0],r=r[1],g=Jt([0,0],[y-p,r-d]),g=(void 0===(g=g)&&(g=[0,0]),void 0===(i=i||1)&&(i=1),Math.abs(g[0])>Math.abs(g[1])?1===i?"bottom":"top":-1===i?"left":"right"),i=Em(l,a,o);Gm(e,t);Bm(D(e,".axis-line-group","g").attr("className","axis-line-group").node(),"M".concat(p,",").concat(d," L").concat(y,",").concat(r),n,s);l=D(e,".axis-tick-group","g").attr("className","axis-tick-group").node();m=n,v=g,b=(null==u?void 0:u.len)||0;Lm(l,Array.from(i).map(function(t){var e=R(qm(m,t.value,v,b),2),n=R(e[0],2),r=n[0],n=n[1],e=R(e[1],2);return{x1:r,y1:n,x2:e[0],y2:e[1],id:"tick-".concat(t.id),data:t}}),u);var m,v,b,a="axis-subtick-group",o=D(e,".".concat(a),"g").attr("className",a).node();x=i,w=n,M=g,k=null==f?void 0:f.count,O=null==f?void 0:f.len,void 0===k&&(k=0),void 0===O&&(O=0);Lm(o,Array.from(x).map(function(o,s){return s===x.length-1?[]:Array(k).fill(null).map(function(t,e){var n=(((null==(n=x[s+1])?void 0:n.value)||1)-o.value)/(k+1),n=o.value+n*(e+1),n=R(qm(w,n,M,O),2),r=R(n[0],2),i=r[0],r=r[1],n=R(n[1],2),a=n[0],n=n[1];return{id:"sub-".concat(o.id,"-").concat(e),x1:i,y1:r,x2:a,y2:n}})}).flat(),f,"sub");var x,w,M,k,O,_,S,E,t="axis-label-group",p=D(e,".".concat(t),"g").attr("className",t).node(),d=(Im(p,Ym(i,n,g,c,u),c),p.querySelectorAll(".axis-label")),y=p.querySelectorAll(".axis-tick"),r=(Am(c,g)(d),Pm(d,y,null==c?void 0:c.autoHideTickLine),R(l.getBounds().halfExtents,2)),a=r[0],o=r[1],f=R(p.getBounds().halfExtents,2),t=f[0],i=f[1],d=+((null==(u=null==s?void 0:s.style)?void 0:u.lineWidth)||0),c=(y=g,c=2*(a+t)+d,l=2*(o+i)+d,r=h,f=(p=R(p=n,2))[0],p=p[1],s=(f=R(f,2))[0],f=f[1],u=(p=R(p,2))[0],p=p[1],g=Math.min(s,u),a=Math.max(s,u),t=Math.min(f,p),o=Math.max(f,p),i=g,d=t,_=n=0,S="bottom",E="start","left"===y||"right"===y?(n=c+((null==r?void 0:r.titlePadding)||0),"center"===(null==r?void 0:r.titleAnchor)&&(d=(f+p)/2),"end"===(null==r?void 0:r.titleAnchor)&&(d=o,S="top"),"left"===y&&(E="end",n*=-1)):(_=l+((null==r?void 0:r.titlePadding)||0),"center"===(null==r?void 0:r.titleAnchor)&&(i=(s+u)/2,E="center"),"end"===(null==r?void 0:r.titleAnchor)&&(i=a,E="end"),"top"===y&&(_*=-1),"bottom"===y&&(S="top")),void 0!==(null==r?void 0:r.positionX)&&(i=g+r.positionX,E="start"),void 0!==(null==r?void 0:r.positionY)&&(d=t+r.positionY,S="bottom"),{x:i+n,y:d+_,textAlign:E,textBaseline:S});Nm(e,c.x,c.y,c.textAlign,c.textBaseline,h)}},ba.style),Xm=Math.PI,$m=Math.abs,Zm=Math.cos,Km=Math.sin,Jm=R([2*Xm],1)[0];function Qm(t,e,n,r,i){void 0===i&&(i=0);var t=R(t,2),a=t[0],t=t[1],n=n*Xy,o=e*Zm(n),s=e*Km(n),r=vm(r,-1,1);return[[a+o,t+s],[a+(e+Uy(r,i))*Zm(n),t+(e+Uy(r,i))*Km(n)]]}function tv(t){var e;return ks(t[0],0)?e="center":0<t[0]?e="start":t[0]<0&&(e="end"),e}function ev(t,h,d,p,y,e,g,m){void 0===m&&(m=0);var v=e,b=vm(v,-1,1),e=g.tickPadding,x=void 0===e?0:e,w=g.formatter,M=g.align,k=g.rotate;return Array.from(t).map(function(t,e){var n,r=(d-h)*t.value+h,i=m+x,a=270<=(a=r)?(a-360)%360:a,o=R(Qm(y,p,r,v,i),2),o=R(o[1],2),s=o[0],o=o[1],l=w?w(t,e):t.text,c="center",u="baseline",f=[Uy(b,s-y[0]),Uy(b,o-y[1])];return"radial"===M?(u="middle",(90<=a||a<-90)&&(a+=180),c=tv(f),ks(a,-90)&&(c=ym(v,"start","end")),ks(a,270)&&(c=ym(v,"end","start"))):"tangential"===M?(c="center",u="bottom",0<=a&&a<180?(a+=270,e="function"==typeof(null==g?void 0:g.style)?g.style(t,e):null!=(e=null==(e=null==g?void 0:g.style)?void 0:e.fontSize)?e:14,r=R(Qm(y,p,r,v,i+e),2),s=(i=R(r[1],2))[0],o=i[1]):a+=90):(a=null!=k?k:0,c=tv(f),ks((e=f)[1],0)?n="middle":0<e[1]?n="top":e[1]<0&&(n="bottom"),u=n),{id:"label-".concat(t.id),x:s,y:o,text:l,textAlign:c,textBaseline:u,transform:"rotate(".concat((a||0).toFixed(0),"deg)"),data:t}})}var nv,rv=Qg({render:function(t,e){var n=t.startAngle,n=void 0===n?0:n,r=t.endAngle,r=void 0===r?0:r,i=t.center,a=t.radius,o=t.axisLine,s=t.tickLine,l=t.subTickLine,c=t.label,c=void 0===c?{}:c,u=t.ticks,I=t.title,f=t.grid,h=t.ticksThreshold,d=t.appendTick,t=t.verticalFactor,u=Em(void 0===u?[]:u,h,d),h=-1===t?"inside":"outside",d=(Gm(e,f),D(e,".axis-line-group","g").attr("className","axis-line-group").node());t=i,f=a,g=n/180*Math.PI,F=r/180*Math.PI,void 0===f&&(f=0),void 0===g&&(g=0),void 0===F&&(F=0),p=(t=R(t=void 0===t?[0,0]:t,2))[0],t=t[1],C=(j=R([f,f],2))[0],j=j[1],k=(O=R([p+f*Zm(g),t+f*Km(g)],2))[0],O=O[1],y=(f=R([p+f*Zm(F),t+f*Km(F)],2))[0],f=f[1];Bm(d,(d=$m(F-g))===Jm?"M".concat(p,",").concat(t-j,", A").concat(C,",").concat(j,",0,1,1,").concat(p,",").concat(t+j,", A").concat(C,",").concat(j,",0,1,1,").concat(p,",").concat(t-j):(d=Xm<d?1:0,F=F<g?0:1,"M".concat(p,",").concat(t,",L").concat(k,",").concat(O,",A").concat(C,",").concat(j,",0,").concat(d,",").concat(F,",").concat(y,",").concat(f,",L").concat(p,",").concat(t)),void 0,o);var p,y,g=D(e,".axis-tick-group","g").attr("className","axis-tick-group").node();m=n,v=r,b=a,x=i,w=h,void 0===(M=null==s?void 0:s.len)&&(M=0);Lm(g,Array.from(u).map(function(t){var e=(v-m)*t.value+m,e=R(Qm(x,b,e,w,M),2),n=R(e[0],2),r=n[0],n=n[1],e=R(e[1],2);return{x1:r,y1:n,x2:e[0],y2:e[1],id:"tick-".concat(t.id),data:t}}),s);var m,v,b,x,w,M,k="axis-subtick-group",O=D(e,".".concat(k),"g").attr("className",k).node();_=u,S=n,E=r,A=a,P=i,N=h,T=null==l?void 0:l.count,L=null==l?void 0:l.len,void 0===T&&(T=0),void 0===L&&(L=0);Lm(O,Array.from(_).map(function(o,s){return Array(T).fill(null).map(function(t,e){var n=(((null==(n=_[s+1])?void 0:n.value)||1+_[0].value)-o.value)/(T+1),n=o.value+n*(e+1),n=R(Qm(P,A,(E-S)*n+S,N,L),2),r=R(n[0],2),i=r[0],r=r[1],n=R(n[1],2),a=n[0],n=n[1];return{id:"sub-".concat(o.id,"-").concat(e),x1:i,y1:r,x2:a,y2:n}})}).flat(),l,"sub");var _,S,E,A,P,N,T,L,C="axis-label-group",j=D(e,".".concat(C),"g").attr("className",C).node(),d=(Im(j,ev(u,n,r,a,i,h,c,null==s?void 0:s.len),c),j.querySelectorAll(".axis-label")),F=j.querySelectorAll(".axis-tick");Am(c,h)(d),Pm(d,F,null==c?void 0:c.autoHideTickLine),Nm(e,i[0],i[1],"center","middle",I)}},hg({startAngle:-90,endAngle:270,center:[0,0],label:{tickPadding:2,style:{},align:"normal"}},ba.style||{})),iv=(i(av,nv=F.CustomElement),av.prototype.connectedCallback=function(){this.render(),this.bindEvents()},av.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),t.disabled&&(this.active=!1,this.disabled=!0),this.render()},av.prototype.setState=function(t){"disabled"===t?(this.active=!1,this.disabled=!0):this.disabled=!1,this.render()},av.prototype.render=function(){var t=this.style,e=t.size,e=void 0===e?8:e,n=t.symbol,r=t.markerStyle,t=t.backgroundStyle,i=R($y(this.style.margin),4),a=i[0],o=i[1],s=i[2],i=i[3],l=R($y(this.style.padding),4),c=l[0],u=l[1],f=l[2],l=l[3],u=(e-u-l)/2,f=(e-c-f)/2,o=(D(this,".container","rect").attr("className","container").style("x",-(u+l+i)).style("y",-(f+c+a)).style("width",e+o+i).style("height",e+a+s).style("fill","transparent").style("cursor",this.disabled?"not-allowed":"pointer").style("zIndex",1),t||{}),i=o.active,a=o.disabled,s=K(o,["active","disabled"]),t=(D(this,".background","rect").attr("className","background").style("x",-(u+l)).style("y",-(f+c)).style("width",e).style("height",e).call(S,s).call(S,this.active?i:{}).call(S,this.disabled?a:{}),"function"==typeof n?n:av.getSymbol(n||"")),o=r||{},l=o.active,c=o.disabled,e=K(o,["active","disabled"]);D(this,".marker","path").attr("className","marker").style("x",0).style("y",0).style("path",null==t?void 0:t(0,0,Math.min(u,f))).call(S,e).call(S,this.active?l:{}).call(S,this.disabled?c:{})},av.prototype.bindEvents=function(){var e=this,n=M(this).select(".marker"),r=M(this).select(".background");M(this).on("pointerup",function(){e.disabled||(e.active=!0)}),M(this).on("pointermove",function(){var t;e.disabled||(e.active=!0,S(n,null==(t=e.style.markerStyle)?void 0:t.active),S(r,null==(t=e.style.backgroundStyle)?void 0:t.active))}),M(this).on("pointerout",function(){e.disabled||(e.active=!1,S(n,Ys(e.style.markerStyle||{},["active"])),S(r,Ys(e.style.backgroundStyle||{},["active"])))})},av.MARKER_SYMBOL_MAP=new Map,av.registerSymbol=function(t,e){av.MARKER_SYMBOL_MAP.set(t,e)},av.getSymbol=function(t){return av.MARKER_SYMBOL_MAP.get(t)},av);function av(t){t=nv.call(this,t)||this;return t.active=!1,t.disabled=!1,t.disabled=t.style.disabled||!1,t}iv.registerSymbol("timeline-prev-button",function(t,e,n){return[["M",t+n,e+n],["L",t,e],["L",t+n,e-n],["M",t,e+n],["L",t-n,e],["L",t,e-n]]}),iv.registerSymbol("timeline-next-button",function(t,e,n){return[["M",t,e+n],["L",t+n,e],["L",t,e-n],["M",t-n,e+n],["L",t,e],["L",t-n,e-n]]}),iv.registerSymbol("timeline-play-button",function(t,e,n){return[["M",t+2,e+3],["L",t+2,e-3],["M",t-2,e+3],["L",t-2,e-3]]}),iv.registerSymbol("timeline-stop-button",function(t,e,n){return[["M",t+3,e],["L",t-1.5,e-1.5*Math.sqrt(3)],["L",t-1.5,e+1.5*Math.sqrt(3)],["Z"]]});var Uo={margin:[2,4],markerStyle:{stroke:"#bfbfbf",active:{stroke:"#3471F9"}},backgroundStyle:{fill:"transparent"}},ov={x:0,y:0,data:[],width:500,height:40,selection:[0,0],orient:"horizontal",singleModeControl:{width:56,size:12,labelStyle:{text:"单一时间",fontSize:10,dx:4}},speedControl:{width:32,markerSize:4,speeds:[1,2,3,4,5],labelStyle:{fontFamily:"sans-serif",fill:"rgba(0,0,0,0.45)",fontStyle:"normal",fontWeight:500,fontSize:10,textBaseline:"top"},formatter:function(t){return"".concat(t.toFixed(1),"x")}},controlPosition:"bottom",controlButton:{spacing:14,prevBtn:_(_({},Uo),{symbol:"timeline-prev-btn",padding:0,size:8}),nextBtn:_(_({},Uo),{symbol:"timeline-next-btn",padding:0,size:8}),playBtn:{margin:4,padding:0,size:20,symbol:"",markerStyle:{stroke:"#bfbfbf",fill:"#bfbfbf",active:{stroke:"#3471F9",fill:"#3471F9"}},backgroundStyle:{stroke:"#bfbfbf",lineWidth:1,fill:"#F7F7F7",active:{fill:"rgba(52, 113, 249, 0.1)",stroke:"#3471F9"}}}},padding:[0,8],playAxis:{appendPadding:[4,0],handleStyle:{r:3,lineWidth:1},label:{position:1,tickPadding:2,tickLine:{len:4,style:{stroke:"rgba(0,0,0,0.25)",lineWidth:1}},style:{fontSize:10,fillOpacity:1,fill:"rgba(0,0,0,0.45)"}},loop:!1},playInterval:2e3,autoPlay:!1},sv=I({},{x:0,y:0,data:[],length:120,orient:"horizontal",selection:0,selectionStyle:{fill:"#5B8FF9",fillOpacity:.15},loop:!1,playInterval:1e3},ov.playAxis),lv={axisLine:null,label:{autoRotate:!1,rotate:0,autoHide:!0,autoHideTickLine:!1,autoEllipsis:!0,minLength:50,alignTick:!0}};function cv(t,e){void 0===t&&(t=[]);var t=R(Array.of(t).flat(),2),n=t[0],n=void 0===n?0:n,t=t[1];return e?[n,n]:[n,void 0===t?n:t]}i(fv,uv=F.CustomElement),fv.prototype.update=function(t){var e=I({},this.attributes,t=void 0===t?{}:t),t=(t.selection&&(this.selection=cv(t.selection,e.singleMode)),t.singleMode&&(this.selection=cv(e.selection,t.singleMode)),this.playTimer);t&&this.stop(),this.attr(e),this.render(),t&&this.play()},fv.prototype.play=function(){var r=this,t=this.style,e=t.data,i=t.loop,a=t.singleMode,o=t.playMode,s=e.length,t=this.style.playInterval;fs(t)&&(t=sv.playInterval),this.playTimer&&clearInterval(this.playTimer),this.playTimer=setInterval(function(){var t,e,n;!i&&r.selection[1]>=s-1?r.stop(!0):a?(t=(r.selection[0]+1)%s,r.setSelection({start:t,end:t})):(t=r.selection[0],n=r.selection[1],e=r.selection[1]-r.selection[0],n=s-1<=n?"increase"===o?t:(t=0,e):("increase"!==o&&(t=(t+1)%s),(n+1)%s),r.setSelection({start:t,end:n}))},t)},fv.prototype.stop=function(t){clearInterval(this.playTimer),this.playTimer=void 0,t&&this.dispatchEvent(new F.CustomEvent("timelineStopped",{selection:this.selection}))},fv.prototype.prev=function(){var t,e=R(this.selection,2),n=e[0],e=e[1],r=this.style.data.length,r=r&&this.style.singleMode?t=(n-1+r)%r:0===n?(t=r-(e-n)-1,r-1):(t=n-1,e-1);this.setSelection({start:null!=t?t:this.selection[0],end:null!=r?r:this.selection[1]})},fv.prototype.next=function(){var t,e=R(this.selection,2),n=e[0],e=e[1],r=this.style.data.length,r=r&&this.style.singleMode?t=(n+1)%r:e===r-1?(t=0,e-n):(t=n+1,e+1);this.setSelection({start:null!=t?t:this.selection[0],end:null!=r?r:this.selection[1]})},fv.prototype.getSelection=function(){return this.selection},Object.defineProperty(fv.prototype,"orient",{get:function(){return this.style.orient||"horizontal"},enumerable:!1,configurable:!0}),fv.prototype.ifH=function(t,e){return"horizontal"===this.orient?"function"==typeof t?t():t:"function"==typeof e?e():e},fv.prototype.destroy=function(){uv.prototype.destroy.call(this),this.playTimer&&clearInterval(this.playTimer),this.playTimer=void 0};var uv,Xo=fv;function fv(){var t=null!==uv&&uv.apply(this,arguments)||this;return t.selection=[0,0],t}function hv(t,e){return new Kp({domain:t.map(function(t,e){return e}),range:e,padding:.1})}function dv(t,e,n){n=hv(n,[0,e]).getStep(),e=0<t?Math.ceil:Math.floor;return 0<n?e(t/n):0}function pv(t,e,n){return hv(n,[0,e]).map(t)}i(mv,yv=Xo),mv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(mv.prototype,"styles",{get:function(){return I({},mv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),mv.prototype.setSelection=function(t){var e,n,r=t.start,t=t.end,i=this.styles,a=i.data,a=void 0===a?[]:a,i={duration:i.playInterval/2,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",fill:"both"},o=this.ifH("cx","cy"),s=M(this).select(".slider-start-handle").node();void 0!==r&&(n=pv(r,this.style.length,a),this.startHandleAnimation=s.animate([((e={})[o]=s.style[o],e),((s={})[o]=n,s)],i)),void 0!==t&&(e=M(this).select(".slider-end-handle").node(),n=pv(t,this.style.length,a),this.endHandleAnimation=e.animate([((s={})[o]=e.style[o],s),((a={})[o]=n,a)],i)),this.selection=[null!=r?r:this.selection[0],null!=t?t:this.selection[1]],this.dispatchEvent(new F.CustomEvent("selectionChanged",{detail:{selection:this.selection}}))},mv.prototype.render=function(){var e=this,n=this.styles,t=R(this.ifH([n.length,n.size],[n.size,n.length]),2),r=t[0],i=t[1],t=D(this,".slider-background","line").attr("className","slider-background").style("x1",0).style("y1",0).style("x2",this.ifH(r,0)).style("y2",this.ifH(0,i)).style("lineWidth",n.size).style("lineCap","round").style("stroke",null==(t=n.backgroundStyle)?void 0:t.fill).style("strokeOpacity",null==(t=n.backgroundStyle)?void 0:t.fillOpacity).node(),a=hv(n.data,[0,1]),o=R(this.selection.map(function(t){return a.map(t)}),2),s=o[0],s=void 0===s?0:s,o=o[1],o=void 0===o?s:o,l=this.ifH(s*r,0),c=this.ifH(o*r,0),s=this.ifH(0,s*i),o=this.ifH(0,o*i),u=(D(t,".slider-selection","line").attr("className","slider-selection").style("x1",l).style("y1",s).style("x2",c).style("y2",o).style("lineWidth",n.size).style("lineCap","round").style("stroke",null==(f=n.selectionStyle)?void 0:f.fill).style("strokeOpacity",null==(f=n.selectionStyle)?void 0:f.fillOpacity).style("visibility",n.singleMode?"hidden":"visible").call(S,n.selectionStyle),"running"===(null==(f=this.startHandleAnimation)?void 0:f.playState)&&this.startHandleAnimation.pause(),D(t,".slider-start-handle","circle").attr("className","slider-start-handle").style("cx",l).style("cy",s).call(S,n.handleStyle),"paused"===(null==(f=this.startHandleAnimation)?void 0:f.playState)&&this.startHandleAnimation.play(),"running"===(null==(l=this.endHandleAnimation)?void 0:l.playState)&&this.endHandleAnimation.pause(),D(t,".slider-end-handle","circle").attr("className","slider-end-handle").style("cx",c).style("cy",o).style("visibility",n.singleMode?"hidden":"visible").call(S,n.handleStyle),"paused"===(null==(s=this.endHandleAnimation)?void 0:s.playState)&&this.endHandleAnimation.play(),n.data.map(function(t,e){return{value:a.map(e),text:t.date}})),f=n.label||{},l=f.position,h=void 0===l?-1:l,d=f.tickLine,p=K(f,["position","tickLine"]);D(t,".slider-axis",function(){return new Um({className:"slider-axis"})}).call(function(t){return t.node().update(I({},lv,{startPos:[h*e.ifH(0,r+2),h*e.ifH(i+2,0)],endPos:[e.ifH(r,0)+h*e.ifH(0,r+2),e.ifH(0,i)+h*e.ifH(i+2,0)],ticks:u,verticalFactor:h,tickLine:null===n.label?null:d,label:null===n.label?null:p}))})},mv.prototype.bindEvents=function(){var t=M(this).select(".slider-background"),r=(this.dragHandle(t,"start"),this.dragHandle(t,"end"),this.dragSelection(t),t.select(".slider-selection").node()),e=t.select(".slider-start-handle").node(),t=t.select(".slider-end-handle").node();e.addEventListener(F.ElementEvent.ATTR_MODIFIED,function(t){var e=t.attrName,n=t.newValue;t.prevValue,"cx"!==e&&"cy"!==e||(t=parseFloat(n)||0,r.style["cx"===e?"x1":"y1"]=t)}),t.addEventListener(F.ElementEvent.ATTR_MODIFIED,function(t){var e=t.attrName,n=t.newValue;t.prevValue,"cx"!==e&&"cy"!==e||(t=parseFloat(n)||0,r.style["cx"===e?"x2":"y2"]=t)})},mv.prototype.dragHandle=function(n,a){function t(t){var e,n,r,i;c&&(c=!1,t=dv(s?l.ifH(t.x-s[0],t.y-s[1]):0,l.style.length,l.style.data),s=void 0,e=(n=R(l.selection,2))[0],n=n[1],r=l.style.data.length-1,"start"===a?e===n&&0<t?(i=xs(0,e+t,r),l.setSelection({start:i,end:i})):l.setSelection({start:xs(e+t,0,n)}):e===n&&t<0?(i=xs(0,n+t,r),l.setSelection({start:i,end:i})):l.setSelection({end:xs(n+t,e,r)}),l.playTimer)&&l.play()}var o,s,l=this,c=!1;n.on("pointerdown",function(t){l.playTimer&&clearInterval(l.playTimer);var e=n.select(".slider-".concat(a,"-handle")).node();t.target===e&&(c=!0,s=[t.x,t.y],o=[t.x,t.y])}.bind(this)).on("pointerup",t).on("mouseupoutside",t).on("touchendoutside",t).on("pointermove",function(t){var e,n,r,i;c&&(e=l.styles.length,n=M(l).select(".slider-".concat(a,"-handle")).node(),r=l.ifH(t.x-o[0],t.y-o[1]),i=n.getLocalPosition(),"vertical"===l.orient?n.style.cy=xs(i[1]+r,0,e):n.style.cx=xs(i[0]+r,0,e),o=[t.x,t.y])})},mv.prototype.dragSelection=function(t){function e(t){l.playTimer&&clearInterval(l.playTimer),t.target===a&&(f=!0,i=[t.x,t.y],s=[t.x,t.y])}function n(t){var e;f&&(f=!1,t=dv(i?l.ifH(t.x-i[0],t.y-i[1]):0,l.style.length,l.style.data),i=void 0,e=l.selection[1]-l.selection[0],t=xs(l.selection[1]+t,e,l.style.data.length-1),l.setSelection({start:t-e,end:t}),l.playTimer)&&l.play()}function r(t){var e,n,r,i,a,o;f&&(e=l.styles.length,n=l.ifH(t.x-s[0],t.y-s[1]),r=(o=R(c.getLocalPosition(),2))[0],o=o[1],i=(a=R(u.getLocalPosition(),2))[0],a=a[1],"vertical"===l.orient?(c.style.cy=xs(o+n,0,e-(a=a-o)),u.style.cy=c.style.cy+a):(o=i-r,c.style.cx=xs(r+n,0,e),u.style.cx=c.style.cx+o),s=[t.x,t.y])}var s,i,l=this,a=t.select(".slider-selection").node(),c=t.select(".slider-start-handle").node(),u=t.select(".slider-end-handle").node(),f=!1;t.on("mousedown",e.bind(this)).on("touchstart",e.bind(this)).on("mouseup",n.bind(this)).on("mouseupoutside",n.bind(this)).on("touchend",n.bind(this)).on("touchendoutside",n.bind(this)).on("mousemove",r.bind(this)).on("touchmove",r.bind(this))},mv.defaultOptions={style:I({},sv,{tag:"slider-axis",size:3,handleStyle:{r:3,stroke:"#8AADF3",strokeOpacity:.75,lineWidth:1,fill:"#fff",fillOpacity:1},backgroundStyle:{fill:"#416180",fillOpacity:.1},selectionStyle:{cursor:"grabbing"}})};var yv,gv=mv;function mv(t){t=yv.call(this,I({},mv.defaultOptions,t))||this;return t.startHandleAnimation=null,t.endHandleAnimation=null,t.selection=cv(t.style.selection,t.style.singleMode),t}function vv(t,e){return new Dp({domain:t.map(function(t,e){return e}),range:e,paddingOuter:0,paddingInner:0})}i(wv,bv=Xo),wv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(wv.prototype,"styles",{get:function(){return I({},wv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),wv.prototype.setSelection=function(t){var e,n=R(this.selection,2),r=n[0],n=n[1];this.selection=cv([null!=(e=t.start)?e:r,null!=(e=t.end)?e:n],this.style.singleMode),this.dispatchEvent(new F.CustomEvent("selectionChanged",{detail:{selection:this.selection}})),this.render()},wv.prototype.render=function(){var i=this,r=this.styles,a=r.size,o=r.spacing,t=R(this.ifH(["x","y","width","height"],["y","x","height","width"]),4),s=t[0],l=t[1],c=t[2],u=t[3],t=D(this,".slider-background","rect").attr("className","slider-background").style("x",0).style("y",0).style(c,r.length).style(u,a+o).call(S,r.backgroundStyle).node(),f=this.getCellScale(),h=f.getBandWidth(),e=r.data.map(function(t,e){var n;return _(((n={})[s]=f.map(e),n[l]=o/2,n[c]=h-r.cellGap,n[u]=a,n),r.cellStyle)}),e=(M(t).selectAll(".cell").data(e).join(function(t){return t.append("rect").attr("className","cell").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()}),e.filter(function(t,e){var n=R(i.selection,2),r=n[0],n=n[1];return r<=e&&e<=n}).map(function(t){return _(_({},t),r.selectionStyle)})),n={duration:this.style.playInterval/2,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",fill:"both"},d=(M(t).selectAll(".selected-cell").data(e).join(function(t){return t.append("rect").attr("className","selected-cell").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.animate([t],n)})},function(t){return t.remove()}),r.length-2*r.spacing+r.cellGap),p=vv(r.data,[0,d]),y=r.data.map(function(t,e){return{value:(p.map(e)+(h-r.cellGap)/2)/d,text:t.date}}),e=r.label||{},g=e.position,m=void 0===g?-1:g,v=e.tickLine,b=K(e,["position","tickLine"]),g=-1===m?-2:r.spacing+a+2,x=[r.spacing,g],w=[o+d,g];"vertical"===this.orient&&(x=[x[1],x[0]],w=[w[1],w[0]]),D(t,".slider-axis",function(){return new Um({className:"slider-axis",style:lv})}).call(function(t){return t.node().update({startPos:x,endPos:w,ticks:y,verticalFactor:m,tickLine:null===r.label?null:v,label:null===r.label?null:b})})},wv.prototype.bindEvents=function(){this.dragSelection()},wv.prototype.getCellScale=function(){var t=this.styles.cellGap,e=this.styles.length,n=this.styles.spacing;return vv(this.style.data,[n,e-n+t])},wv.prototype.dragSelection=function(){function t(){r=!1,i.playTimer&&i.play()}var n,i=this,a=M(this).select(".slider-background"),r=!1,o=this.styles.spacing,s=function(t){var e=R(a.node().getPosition(),2),n=e[0],e=e[1],n=i.ifH(n+4,e+o),e=i.styles.cellGap,r=i.getCellScale().getStep();return Math.floor((t-n+e)/r)};a.on("pointerdown",function(t){i.playTimer&&clearInterval(i.playTimer),r=!0,n=i.ifH(t.x,t.y);t=s(n);i.setSelection({start:t,end:t})}).on("pointerup",t).on("mouseupoutside",t).on("touchendoutside",t).on("pointermove",function(t){var e;r&&(t=s(i.ifH(t.x,t.y)),e=(t=R((e=n?s(n):t)<t?[e,t]:[t,e],2))[0],t=t[1],i.setSelection({start:e,end:t}))})},wv.defaultOptions={style:I({},sv,{tag:"cell-axis",backgroundStyle:{fill:"#416180",fillOpacity:.05},size:16,spacing:4,cellGap:2,cellStyle:{fill:"#416180",fillOpacity:.1},selectionStyle:{fillOpacity:.45},label:{autoHideTickLine:!0}})};var bv,xv=wv;function wv(t){t=bv.call(this,I({},wv.defaultOptions,t))||this;return t.selection=cv(t.style.selection,t.style.singleMode),t}function Mv(t,e){return[1.43,2.79,4.89,7.57,11.66][t]/11.66*e}var kv,Qo=I({},ov.speedControl,{markerFill:"#8c8c8c",spacing:1,lineStyle:{stroke:"#bfbfbf",lineWidth:1}}),Ov=(i(_v,kv=F.CustomElement),_v.prototype.connectedCallback=function(){this.render(),this.bindEvents()},_v.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),this.render()},Object.defineProperty(_v.prototype,"styles",{get:function(){return I({},_v.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),_v.prototype.render=function(){var t=this.styles,e=t.initialSpeed,n=t.markerSize,r=t.markerFill,i=t.lineStyle,a=t.speeds,o=t.labelStyle,s=t.spacing,t=t.formatter,t=void 0===t?function(t){return"".concat(t)}:t,e=a.indexOf(e),l=2*n,c=Mv(e=-1===e?0:e,2*l),u=n*Math.tan(Math.PI/6)*2,r=(D(this,".speed-marker","path").attr("className","speed-marker").style("fill",r).style("path",[["M",0,c-u/2],["L",n,c],["L",0,c+u/2],["Z"]]),n-.5),c=D(this,".line-group","rect").attr("className","line-group").style("x",r).style("y",0).style("width",l).style("height",2*l).style("cursor","pointer").style("fill","transparent").node(),u=a.reduce(function(t,e,n){n=Mv(n,2*l);return t.push(["M",0,n],["L",l,n]),t},[]);D(c,".speed-path","path").attr("className","speed-path").style("path",u).call(S,i),D(this,".speed-label","text").attr("className","speed-label").style("x",r+l+s).style("y",2).style("text",t(a[e])).call(S,o)},_v.prototype.bindEvents=function(){var e=this,t=this.querySelector(".line-group");t.addEventListener("pointerdown",function(t){return e.onClick(t)}),t.addEventListener("touchmove",function(t){return e.onClick(t)})},_v.prototype.onClick=function(t){var a,e=this.styles,o=e.speeds,n=e.markerSize,e=e.formatter,e=void 0===e?function(t){return"".concat(t)}:e,s=2*n*2,n=this.querySelector(".line-group"),r=M(this).select(".speed-label").node(),i=M(this).select(".speed-marker").node();t.currentTarget===n&&(a=t.y-n.getBBox().y,-1!==(t=o.findIndex(function(t,e){var n=Mv(e,s),r=Mv(e-1,s),i=Mv(e+1,s);return 0===e?a<n+(Mv(1,s)-n)/2:e===o.length-1?n-(n-r)/2<a:(e=[n-(n-r)/2,n+(i-n)/2])[0]<=a&&a<e[1]})))&&(r.setAttribute("text",e(o[t])),i.setLocalPosition(0,Mv(t,s)-s/8),this.dispatchEvent(new F.CustomEvent("speedChanged",{detail:{speed:o[t]}})))},_v.tag="speed-control",_v.defaultOptions={style:Qo},_v);function _v(t){return kv.call(this,I({},_v.defaultOptions,t))||this}i(Pv,Sv=F.CustomElement),Pv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Object.defineProperty(Pv.prototype,"styles",{get:function(){return I({},Pv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),Pv.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),fs(t.active)||(this.active=t.active),this.render()},Pv.prototype.render=function(){var t,e=this.styles,n=e.size,r=e.buttonStyle,i=e.labelStyle,e=e.symbol,a=r.active,r=K(r,["active"]),r=D(this,".button","rect").attr("className","button").style("x",0).style("y",0).style("width",n).style("height",n).call(S,r).call(S,this.active?a:{}).node();D(r,".symbol","path").attr("className","symbol").style("x",n/2).style("y",n/2).style("path",[["M",(a=n/2)-(t=r=n/2)/7*4,r-t/14],["L",a-t/7,r+t/7*3],["L",a+t/7*4,r-t/7*3]]).style("lineWidth",1).style("lineCap","round").style("stroke","transparent").style("cursor","pointer").call(S,this.active?null==e?void 0:e.active:{}),D(this,".label","text").attr("className","label").style("x",n).style("y",n/2).call(S,i)},Pv.prototype.bindEvents=function(){var t=this;M(this).select(".button").on("pointerdown",function(){t.dispatchEvent(new F.CustomEvent("singleModeChanged",{detail:{active:!t.active}}))})},Pv.defaultOptions={style:{size:12,buttonStyle:{fill:"transparent",stroke:"#000",strokeOpacity:.15,cursor:"pointer",lineWidth:1,radius:2,active:{stroke:"#3471F9",fill:"#3471F9",strokeOpacity:1}},symbol:{active:{stroke:"#fff"}},labelStyle:{text:"",textAlign:"left",textBaseline:"middle",fill:"#000",fillOpacity:.65},cursor:"pointer"}};var Sv,Ev,Av=Pv;function Pv(t){t=Sv.call(this,I({},Pv.defaultOptions,t))||this;return t.active=!1,t.active=t.style.active||!1,t}function Nv(t,e,n){var r,i,a,o,s,n=I({},ov,n),l=n.type,c=n.playAxis,u=n.controlButton,f=n.speedControl,h=n.singleModeControl,d=(null==(d=null==c?void 0:c.label)?void 0:d.position)||-1,p=null!=(p=null==c?void 0:c.spacing)?p:(null==(p=null==(p=xv.defaultOptions)?void 0:p.style)?void 0:p.spacing)||0,y=(null==c?void 0:c.size)||("cell"===l?null==(y=null==(y=xv.defaultOptions)?void 0:y.style)?void 0:y.size:null==(y=null==(y=gv.defaultOptions)?void 0:y.style)?void 0:y.size)||4,p=(y+="cell"===l?p:0,R($y(null==c?void 0:c.appendPadding),4)),g=p[0],m=p[1],v=p[2],p=p[3],b=(null==u?void 0:u.spacing)||0,x=Ps(u)||Ps(null==u?void 0:u.playBtn)?0:null==(x=null==u?void 0:u.playBtn)?void 0:x.size,w=Ps(u)||Ps(null==u?void 0:u.prevBtn)?0:null==(w=null==u?void 0:u.prevBtn)?void 0:w.size,u=Ps(u)||Ps(null==u?void 0:u.nextBtn)?0:null==(u=null==u?void 0:u.nextBtn)?void 0:u.size,M=x/2+w/2+b,k=x/2+u/2+b,O=null===f?0:null==f?void 0:f.markerSize,_=2*O,f=null===f?0:null==f?void 0:f.width,S=2*_+O/2,E=null===h?0:null==h?void 0:h.width,h=null===h?0:(null==h?void 0:h.size)+2;return"vertical"===n.orient?{axis:{x:(n=p+(-1===d?30:0))+("cell"===l?0:y/2),y:i=(r=w+b+x/2)+x/2+b+g,length:(a=(s=(o=e-h)-4-S)-b-u/2)-b-u/2-v-i},prevBtn:{x:i=n+y/2,y:w/2,size:w},playBtn:{x:i,y:r,size:x},nextBtn:{x:i,y:a,size:u},speedControl:{x:n-f/2,y:s,size:f},singleModeControl:{x:0,y:o}}:(i=(r=e-E)-8-f,a=c,s=(a=I({},ov.playAxis,a).label)?((null==(n=a.tickLine)?void 0:n.len)||0)+(a.tickPadding||0)+(Number(a.style.fontSize)||0)+2:0,o=(-1===d?s:0)+("cell"===l?0:y/2)+g,"bottom"===t?{axis:{x:p,y:o,length:e-(p+m)},playBtn:{x:E=e/2,y:c=o+(1===d?s:0)+y+x/2+v,size:x},prevBtn:{x:E-M,y:c,size:w},nextBtn:{x:E+k,y:c,size:u},speedControl:{x:i,y:n=o+(1===d?s:0)+y+v,size:f},singleModeControl:{x:r,y:n+_-h/2}}:(g="cell"===l?o+y/2:o,e="cell"===l&&-1===d?s+y-S:1===d?o+O/2:o-S,"left"===t?{axis:{x:n=(v=(c=(E=w/2)+M)+k)+u/2+p,y:o,length:i-m-n},prevBtn:{x:E,y:g,size:w},playBtn:{x:c,y:g,size:x},nextBtn:{x:v,y:g,size:u},speedControl:{x:i,y:e,size:f},singleModeControl:{x:r,y:e+_-h/2}}:{axis:{x:p,y:o,length:(y=(s=(l=i-(u/2+b))-k)-M)-w/2-m-p},playBtn:{x:s,y:g,size:x},prevBtn:{x:y,y:g,size:w},nextBtn:{x:l,y:g,size:u},speedControl:{x:i,y:e,size:f},singleModeControl:{x:r,y:e+_-h/2}}))}function Tv(t){t=Ev.call(this,I({},{style:ov},t))||this;return t.speed=1,t.singleMode=!1,t.playing=!1,t.selection=[0,0],t.singleMode=t.style.singleMode||!1,t.selection=cv(t.style.selection,t.singleMode),t}function Lv(t){var e,n={left:0,top:0,width:0,height:0};return"html"===(null==t?void 0:t.tagName)?n={left:0,top:0,width:(e=t.style).width,height:e.height}:t&&(t=(e=t.getLocalBounds()).min,e=e.halfExtents,n={left:t[0],top:t[1],width:2*e[0],height:2*e[1]}),{left:0,top:0,right:n.width,bottom:n.height}}function Cv(t,n){var r,e,i,a;return n?(r=n.useHTML,e=n.style,i="legend-title ".concat(r?"html":"text","-title"),a="<span>".concat((null==n?void 0:n.content)||"","</span>"),D(t,".".concat(i),function(){return r?new F.HTML({className:i,style:{innerHTML:a}}):new F.Text({className:i,style:e})}).call(function(t){var e;r?t.style("width",null!=(e=n.width)?e:80).style("height",null!=(e=n.height)?e:20).style("innerHTML",a):t.style("fontSize",12).style("textBaseline","top").style("text",n.content||"")}).call(S,e).node()):((t=t.querySelector(".legend-title"))&&t.remove(),null)}function jv(t,e,n,r){return D(t,".".concat(e),"g").attr("className",e).style("x",n).style("y",r).node()}function Fv(t,e,n,r,i){D(t,".".concat(e),"rect").attr("className",e).style("zIndex",-1).style("width",n).style("height",r).call(S,i||{}).node()}i(Tv,Ev=F.CustomElement),Tv.prototype.connectedCallback=function(){this.render(),this.bindEvents()},Tv.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),void 0!==t.singleMode&&(this.singleMode=t.singleMode),t.selection&&(this.selection=cv(t.selection,this.singleMode)),this.render()},Object.defineProperty(Tv.prototype,"styles",{get:function(){return I({},ov,this.attributes)},enumerable:!1,configurable:!0}),Tv.prototype.render=function(){var e=this,t=this.styles,n=t.width,r=t.height,i=t.controlPosition,a=t.speedControl,o=t.singleModeControl,t=R($y(this.styles.padding),4),s=t[0],s=void 0===s?0:s,l=t[1],l=void 0===l?0:l,c=t[2],t=t[3],t=void 0===t?l:t,u=D(this,".container","g").attr("className","container").style("x",t).style("y",s).node(),f=Nv(i,"vertical"===this.style.orient?r-(s+c):n-(t+l),this.styles);this.renderAxis(u,f),this.renderControlButton(u,f),D(u,".timeline-speed-control",function(){return new Ov({})}).attr("className","timeline-speed-control").call(function(t){null===a?t.remove():t.node().update(_(_({x:f.speedControl.x,y:f.speedControl.y},a),{initialSpeed:e.speed}))}),D(u,".timeline-single-control",function(){return new Av({})}).attr("className","timeline-single-control").call(function(t){null===o?t.remove():t.node().update(_(_({x:f.singleModeControl.x,y:f.singleModeControl.y},o),{active:e.singleMode}))})},Tv.prototype.renderAxis=function(t,e){var n=this,r=this.styles.data,i=this.styles.type||"slider",a=M(t).select(".timeline-axis").node(),o="cell"===i?xv:gv;a&&a.style.tag!=="".concat(i,"-axis")&&(a.remove(),this.removeChild(a)),D(t,".timeline-axis",function(){return new o({})}).attr("className","timeline-axis").call(function(t){t.node().update(_({x:e.axis.x,y:e.axis.y,length:e.axis.length,data:r,selection:n.selection,orient:n.style.orient,playInterval:n.style.playInterval/n.speed,singleMode:n.singleMode},n.style.playAxis||{})),t.node().update({handleStyle:{cursor:"vertical"===n.style.orient?"ns-resize":"ew-resize"}})}).node()},Tv.prototype.renderControlButton=function(t,n){var e,r=this,i=n.playBtn.size||0,a=n.prevBtn.size||0,o=(null==(e=n.nextBtn)?void 0:e.size)||0;D(t,".timeline-prev-btn",function(){return new iv({})}).attr("className","timeline-prev-btn").call(function(t){var e;a?(t.node().update(_(_({},(null==(e=r.style.controlButton)?void 0:e.prevBtn)||{}),{x:n.prevBtn.x,y:n.prevBtn.y,size:a,symbol:"timeline-prev-button"})),t.node().update({markerStyle:{transformOrigin:"center",transform:"vertical"===r.style.orient?"rotate(90deg)":""}})):t.remove()}),D(t,".timeline-play-btn",function(){return new iv({})}).attr("className","timeline-play-btn").call(function(t){var e;i?(t.node().update({backgroundStyle:{radius:(n.playBtn.size||0)/2}}),t.node().update(_(_({},(null==(e=r.style.controlButton)?void 0:e.playBtn)||{}),{x:n.playBtn.x,y:n.playBtn.y,size:i,symbol:r.playing?"timeline-play-button":"timeline-stop-button"}))):t.remove()}),D(t,".timeline-next-btn",function(){return new iv({})}).attr("className","timeline-next-btn").call(function(t){var e;o?(t.node().update(_(_({},(null==(e=r.style.controlButton)?void 0:e.nextBtn)||{}),{x:n.nextBtn.x,y:n.nextBtn.y,size:o,symbol:"timeline-next-button"})),t.node().update({markerStyle:{transformOrigin:"center",transform:"vertical"===r.style.orient?"rotate(90deg)":""}})):t.remove()}),this.style.autoPlay&&!this.playing&&(this.playing=!0,M(this).select(".timeline-axis").call(function(t){return null==(t=t.node())?void 0:t.play()}),M(this).select(".timeline-play-btn").call(function(t){return null==(t=t.node())?void 0:t.update({symbol:"timeline-play-button"})})),!this.style.autoPlay&&this.playing&&(this.playing=!1,M(this).select(".timeline-axis").call(function(t){return null==(t=t.node())?void 0:t.stop()}),M(this).select(".timeline-play-btn").call(function(t){return null==(t=t.node())?void 0:t.update({symbol:"timeline-stop-button"})}))};var Bo={style:{x:0,y:0,padding:0,orient:"horizontal",backgroundStyle:{fill:"transparent",lineWidth:0},title:{content:"",spacing:4,align:"left",style:{fontWeight:"bold",fontFamily:"sans-serif",fontSize:12,textAlign:"top",textBaseline:"top",fill:"#2C3542"}},label:{style:{fill:"#2C3542",fillOpacity:.65,fontSize:12}}}},Iv={symbol:"circle",size:8},Rv={style:{inactive:{fill:"#d3d2d3",opacity:.5}}},Bv={style:{inactive:{fill:"#d3d2d3",opacity:.5}}},Dv=I({},Bo,{style:{type:"category",items:[],maxWidth:void 0,maxHeight:void 0,maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!(Tv.prototype.bindEvents=function(){var e=this,n=M(this).select(".timeline-axis").node(),r=M(this).select(".timeline-play-btn").node();r&&M(r).on("pointerdown",function(t){e.playing?(e.playing=!1,n.stop(),r.update({symbol:"timeline-stop-button"})):(e.playing=!0,n.play(),r.update({symbol:"timeline-play-button"}))}),M(this).on("timelineStopped",function(){e.playing=!1,null!=r&&r.update({symbol:"timeline-stop-button"})}),M(this).on("speedChanged",function(t){e.speed=t.detail.speed,n.update({playInterval:e.style.playInterval/e.speed})}),M(this).select(".timeline-prev-btn").on("pointerdown",function(){return n.prev()}),M(this).select(".timeline-next-btn").on("pointerdown",function(){return n.next()}),M(this).on("singleModeChanged",function(t){e.singleMode=t.detail.active,e.selection=cv(e.selection,e.singleMode),e.render()}),M(this).on("selectionChanged",function(t){e.selection=t.detail.selection})}),pageNavigator:{loop:!1}}}),zv={width:100,height:20,type:"color",chunked:!1,ticks:[],isGradient:"auto",backgroundColor:"#c5c5c5"},Wv={spacing:4,formatter:function(t){return String(t)},align:"rail",flush:!0,maxLength:30},Hv={size:25,stroke:"#c5c5c5",fill:"#fff",lineWidth:1},Vv=I({},Bo,{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],label:Wv,rail:zv,slidable:!0,indicator:{size:8,spacing:10,padding:5,backgroundStyle:{fill:"#262626","background-color":"#262626","border-radius":"5px"},text:{style:{color:"white","font-size":"12px"}}}}}),Gv="legend-item-";function qv(t,e){t&&(t.setAttribute("tip",t.style.text),null!=t)&&t.attr("text",e||"")}function Yv(n,t){return void 0===n&&(n={}),(t=void 0===t?"":t).split("-").reduce(function(t,e){return _(_({},t),Gs(n,e,{}))},{})}i($v,Uv=la),$v.prototype.setState=function(t,e){void 0===t&&(t=""),void 0===e&&(e=!0);var n=new Set((this.state||"").split("-"));e?n.add(t):n.delete(t),this.state=re([],R(n),!1).join("-"),this.update()},$v.prototype.getState=function(){return this.state},$v.prototype.update=function(t){Uv.prototype.update.call(this,t=void 0===t?{}:t),t.state&&(this.state=t.state)},Object.defineProperty($v.prototype,"styles",{get:function(){return I({},$v.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),$v.prototype.render=function(t,e){var n,r,i,a,o,s,l=this,c=this.styles,u=c.backgroundStyle,f=c.itemMarker,h=c.padding,d=c.itemName,p=c.itemValue,c=c.maxItemWidth,y=this.styles.itemHeight,h=R($y(h),4),g=h[0],m=h[1],v=h[2],h=h[3],b=Number((null==f?void 0:f.size)||0),x=(fs(y)&&(y=Math.max.call(null,b,Number((null==(x=null==d?void 0:d.style)?void 0:x.fontSize)||0),Number((null==(x=null==p?void 0:p.style)?void 0:x.fontSize)||0))+(g+v)),D(this,".".concat(Gv,"container"),"g").attr("className","".concat(Gv,"container")).style("x",h).style("y",y/2).node()),w=(D(x,".".concat(Gv,"marker"),function(){return new E({})}).attr("className","".concat(Gv,"marker")).call(function(t){f?t.node().update(_(_({x:b/2,y:0,size:b,symbol:f.symbol},f.style||{}),Yv(f.style,l.state))):t.remove()}),b?b+((null==d?void 0:d.spacing)||0):0),g=D(x,".".concat(Gv,"name"),"text").attr("className","".concat(Gv,"name")).call(function(t){d?t.node().attr(_(_({x:w,y:0,tip:"",text:(null==d?void 0:d.content)||"",textBaseline:"middle",textAlign:"left"},d.style||{}),Yv(d.style,l.state))):t.remove()}).node(),M=w,v=(g&&!g.destroyed&&(M=g.getLocalBounds().max[0]),D(x,".".concat(Gv,"value"),"text").attr("className","".concat(Gv,"value")).call(function(t){p?t.node().attr(_(_(_({x:M+(p.spacing||0),y:0,tip:"",text:(null==p?void 0:p.content)||"",textAlign:"left"},p.style||{}),Yv(p.style,l.state)),{textBaseline:"middle"})):t.remove()}).node()),k=(fs(c)||(g=null!=g&&g.destroyed?null:g,v=null!=v&&v.destroyed?null:v,n=c-w-(h+m),(g||v)&&"number"==typeof n&&(Number(n)<=0?(qv(g,""),qv(v,"")):g&&v?(o=g.getLocalBounds(),i=v.getLocalBounds(),n<(r=2*o.halfExtents[0])+(k=2*i.halfExtents[0])+(i=r&&k?i.min[0]-o.max[0]:0)&&(a=(o=R([.5*n,.5*n],2))[0],o=o[1],s=O=!0,r<=a?(o=n-(r+i),O=!1):k<=o&&(a=n-(k+i),s=!1),O&&(qv(g,Ry(g.style.text,a,zy(g))),v.attr("x",Number(g.style.x)+a+i)),s)&&qv(v,Ry(v.style.text,o,zy(v)))):n<2*(r=g||v).getLocalBounds().halfExtents[0]&&qv(r,Ry(r.style.text,n,zy(r))))),x.getLocalBounds()),O=Math.max(2*k.halfExtents[0]+m+h,this.styles.itemWidth||0);fs(c)||(O=Math.min(c,O)),D(this,".".concat(Gv,"background"),"rect").attr("className","".concat(Gv,"background")).style("x",k.min[0]-h).style("y",0).style("width",O).style("height",y).style("zIndex",-1).call(S,u).call(S,Yv(u,this.state))},$v.defaultOptions={style:{id:"",value:{},itemMarker:{size:8,symbol:"circle",style:{fill:"#d3d2d3",fillOpacity:1,lineWidth:0,active:{cursor:"pointer"}}},itemName:{spacing:4,style:{fontFamily:"sans-serif",fill:"#646464",fontSize:12,opacity:1,active:{cursor:"pointer"}}},itemValue:{spacing:4,style:{fontFamily:"sans-serif",fill:"#646464",opacity:1,fontSize:12,active:{cursor:"pointer"}}}}};var Uv,Xv=$v;function $v(t){t=Uv.call(this,I({},$v.defaultOptions,t))||this;return t.state="default",t.state=t.style.state||"selected",t}function Zv(t,a,o){void 0===o&&(o=0);var s=0,l=0,c=0;return t.reduce(function(t,e){var n=R(e.getLocalBounds().halfExtents,2),r=n[0],n=n[1],i="horizontal"===a?[t,0]:[0,t];return e.setLocalPosition(i[0],i[1]),l=Math.max(l,2*n),c=Math.max(c,2*r),(s="horizontal"===a?t+2*r:t+2*n)+o},0),{totalSize:s,maxItemWidth:c,maxItemHeight:l}}iv.registerSymbol("left",function(t,e,n){return[["M",t-n*Math.sin(Math.PI/3),e],["L",t+n,e-n],["L",t+n,e+n],["Z"]]}),iv.registerSymbol("right",function(t,e,n){return[["M",t-n,e-n],["L",t+n*Math.sin(Math.PI/3),e],["L",t-n,e+n],["Z"]]}),iv.registerSymbol("up",function(t,e,n){return[["M",t-n,e+n],["L",t,e-n*Math.sin(Math.PI/3)],["L",t+n,e+n],["Z"]]}),iv.registerSymbol("down",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t,e+n*Math.sin(Math.PI/3)],["Z"]]});i(Qv,Kv=F.CustomElement),Qv.prototype.connectedCallback=function(){this.container=this.appendChild(new F.Group),this.clipView=new F.Path({style:{path:[]}}),this.container.appendChild(this.clipView),this.render(),this.bindEvents()},Qv.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),this.render()},Object.defineProperty(Qv.prototype,"styles",{get:function(){return I({},Qv.defaultOptions.style,this.attributes)},enumerable:!1,configurable:!0}),Qv.prototype.render=function(){this.renderButtonGroup();var t=this.style.items,t=void 0===t?[]:t;this.items=M(this.container).selectAll(".legend-item").data(t||[],function(t,e){return t.id||e}).join(function(t){return t.append(function(t){return new Xv({id:t.id,className:"legend-item",style:t})})},function(t){return t.each(function(t){this.update(t)})},function(t){return t.remove()}).nodes(),this.adjustLayout()},Qv.prototype.bindEvents=function(){this.prevButton.addEventListener("pointerdown",this.prev.bind(this)),this.nextButton.addEventListener("pointerdown",this.next.bind(this))},Qv.prototype.ifHorizontal=function(t,e){return"vertical"===this.style.orient?"function"==typeof e?e():e:"function"==typeof t?t():t},Qv.prototype.renderButtonGroup=function(){var t=this.styles,e=t.pageButtonStyle,n=void 0===e?{}:e,e=t.pageTextStyle,t=D(this,".page-button-group",function(){return new F.Group({className:"page-button-group"})}).node(),r="page-prev-button",i="page-next-button";this.prevButton=D(t,"#".concat(r),function(){return new iv({})}).attr("id",r).attr("className","page-button").attr("zIndex",2).call(function(t){t.node().update(n)}).node(),D(t,".page-info","text").attr("className","page-info").call(S,e),this.nextButton=D(t,"#".concat(i),function(){return new iv({})}).attr("id",i).attr("className","page-button").attr("zIndex",2).call(function(t){t.node().update(n)}).node(),this.updatePageButtonSymbol()},Object.defineProperty(Qv.prototype,"pageInfoBounds",{get:function(){var t,e,n,r,i=this.querySelector(".page-info");return i?(r=(t=this.styles).pageFormatter,t=t.pageInfoSpacing,e=i.style.visibility,i.style.visibility="hidden",i.style.text=r(1,this.styles.items.length),n=(r=R(i.getLocalBounds().halfExtents,2))[0],r=r[1],i.style.visibility=e,{width:2*(n+t),height:2*(r+t)}):{width:0,height:0}},enumerable:!1,configurable:!0}),Qv.prototype.layoutButton=function(t){var e,n=this.style.pageInfoSpacing,r=this.pageInfoBounds.height,n=this.pageInfoBounds.width+2*(void 0===n?0:n),i=R(this.querySelector(".page-button-group").childNodes,3),a=i[0],o=i[1],i=i[2];"horizontal"===t?(t=2*a.getLocalBounds().halfExtents[0],e=2*i.getLocalBounds().halfExtents[0],a.style.x=t/2,i.style.x=t+n+e/2,o.style.x=(Number(a.style.x)+Number(i.style.x))/2,a.style.y=0,i.style.y=0,o.style.y=0):(t=2*a.getLocalBounds().halfExtents[1],n=2*i.getLocalBounds().halfExtents[1],a.style.y=-(r+t)/2,i.style.y=(r+n)/2,o.style.y=0,e=this.pageInfoBounds.width/2,a.style.x=e,i.style.x=e,o.style.x=e)},Qv.prototype.showButtonGroup=function(){this.querySelector(".page-button-group").style.visibility="visible"},Qv.prototype.resetPageCfg=function(){this.querySelector(".page-button-group").style.visibility="hidden",this.container.style.clipPath=null,this.currPage=void 0,this.maxPages=void 0,this.pageOffsets=[],this.container.style.transform="translate(0,0)",this.clipView&&(this.clipView.style.transform="translate(0,0)")},Qv.prototype.adjustLayout=function(){var t,e,n,r;this.resetPageCfg(),this.items.length<=1||(t=(n=R($y(this.style.spacing),2))[0],n=n[1],t=this.ifHorizontal(t,n),t=(n=Zv(this.items,this.style.orient||"horizontal",t)).totalSize,e=n.maxItemWidth,n=n.maxItemHeight,r=this.ifHorizontal(this.style.maxWidth,this.style.maxHeight),!fs(r)&&r!==1/0&&r<t&&(this.style.autoWrap&&"vertical"!==this.style.orient?(this.layoutButton("vertical"),this.adjustHorizontalWrap(e,n,r)):(this.layoutButton("horizontal"),this.adjustFlip(e,n,r))))},Qv.prototype.adjustFlip=function(t,e,n){this.showButtonGroup();var r=this.querySelector(".page-button-group"),i=this.style.pageSpacing,a=this.prevButton.style.size||Qv.defaultOptions.style.pageButtonSize,o=r.getLocalBounds(),s=2*o.halfExtents[0],o=2*o.halfExtents[1],e=R(this.ifHorizontal([n-(s+i),e],[t,n-(o+i)]),2),l=e[0],c=e[1];this.clipView.style.path="M-1,0 L".concat(l,",0 L").concat(l,",").concat(c," L-1,").concat(c," Z"),this.container.style.clipPath=this.clipView,r.style.x=this.ifHorizontal(n-s,0),r.style.y=this.ifHorizontal(c/2-1,c+a+i);for(var u="x"===this.ifHorizontal("x","y")?0:1,f=[0],h=1,d=0;d<this.items.length;d++){var p=this.items[d].getLocalBounds(),y=p.min;p.max[u]-function(t){if(ss(t))return t[t.length-1]}(f)>this.ifHorizontal(l,c)+4&&(0!==y[u]&&f.push(y[u]),h+=1)}this.maxPages=h,this.currPage=1,this.pageOffsets=f,this.updatePageNavigatorState()},Qv.prototype.adjustHorizontalWrap=function(t,c,e){this.showButtonGroup();var n,r=this.querySelector(".page-button-group"),i=this.style,a=i.pageSpacing,a=void 0===a?0:a,o=i.cols,i=this.pageInfoBounds.width,u=this.style.maxRows||2,s=r.getLocalBounds(),s=Math.max(2*s.halfExtents[0],i),i=e-(s+a),l=c*u;function f(t,e){for(var n=1,r=0,i=[0],a=0;a<e.length;a++){var o=e[a],s=o.getLocalBounds(),l=s.min;s.max[0]-r>t&&(n+=1,r=l[0],n%u==1)&&i.push((n-1)*c),o.setLocalPosition(l[0]-r,(n-1)*c)}return i}o&&u&&(o*u<=this.items.length&&(i=e),n=e/o),this.clipView.style.path="M-1,0 L".concat(i,",0 L").concat(i,",").concat(l," L-1,").concat(l," Z"),this.container.style.clipPath=this.clipView;var h=[];if(o&&n)for(var d=R($y(this.style.spacing),1)[0],p=0,y=0,g=0;g<this.items.length;g+=o){y=0,(p+=1)%u==1&&h.push(Math.floor(p/u)*l);for(var m=0;m<o&&g+m<this.items.length;m++)this.items[g+m].update({x:y,y:(p-1)*c,maxItemWidth:n-d}),y+=n}else 1===(h=f(i,this.items)).length&&(d=(a=R($y(this.style.spacing),2))[0],i=a[1],y=this.ifHorizontal(d,i),Zv(this.items,this.style.orient||"horizontal",y),f(e,this.items));this.maxPages=h.length,this.currPage=1,this.pageOffsets=h,this.maxPages<=1?this.resetPageCfg():(r.style.x=e-s,r.style.y=l/2-2,this.updatePageNavigatorState())},Qv.prototype.updatePageNavigatorState=function(){this.updatePageInfo(),this.currPage===this.maxPages?this.nextButton.setState("disabled"):this.nextButton.setState("default"),1===this.currPage?this.prevButton.setState("disabled"):this.prevButton.setState("default")},Qv.prototype.updatePageButtonSymbol=function(){var t=this.style.autoWrap,t=this.ifHorizontal(t?1:0,1);this.prevButton.update({symbol:["left","up"][t]}),this.nextButton.update({symbol:["right","down"][t]})},Qv.prototype.updatePageInfo=function(){var t=this.styles.pageFormatter;M(this).select(".page-info").style("text",this.currPage&&this.maxPages?t(this.currPage,this.maxPages):"")},Qv.prototype.finished=function(){var e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&this.resolveFinishedPromise(),this.finishedPromise},Qv.prototype.prev=function(){var t,e;this.maxPages&&this.currPage&&(t=this.style.loop,(e=this.currPage-1)<1&&(e=t?this.maxPages:1),this.goTo(e))},Qv.prototype.next=function(){var t,e,n;this.maxPages&&this.currPage&&(t=this.style.loop,e=this.maxPages,n=this.currPage+1,this.goTo(n=e<n?t?1:e:n))},Qv.prototype.goTo=function(t){var e,n,r,i,a=this;t!==this.currPage&&"idle"===this.playState&&(e=(i=this.style).effect,n=i.duration,i=i.autoWrap,r=(i=R(this.ifHorizontal(i?[0,-this.pageOffsets[t-1]]:[-this.pageOffsets[t-1],0],[0,-this.pageOffsets[t-1]]),2))[0],i=i[1],this.playState="running",this.clipView.animate([{transform:this.clipView.style.transform},{transform:"translate(".concat(-r,"px,").concat(-i,"px)")}],{duration:n,easing:e,fill:"both"}),this.container.animate([{transform:this.container.style.transform},{transform:"translate(".concat(r,"px,").concat(i,"px)")}],{duration:n,easing:e,fill:"both"}),Promise.all(this.clipView.getAnimations().map(function(t){return t.finished})).then(function(){a.currPage=t,a.updatePageNavigatorState(),a.resolveFinishedPromise(),a.playState="idle"}),this.finished())},Qv.defaultOptions={style:{spacing:[4,0],effect:"easeQuadInOut",duration:320,maxRows:2,maxCols:2,pageButtonSize:10,pageInfoSpacing:2,pageFormatter:function(t,e){return"".concat(t,"/").concat(e)},pageButtonStyle:{size:10,margin:0,padding:0,markerStyle:{fill:"black",cursor:"pointer",disabled:{fill:"#d9d9d9",cursor:"not-allowed"}},backgroundStyle:{cursor:"pointer",fill:"transparent",disabled:{cursor:"not-allowed"}}},pageTextStyle:{fontSize:12,textBaseline:"middle",textAlign:"center"}}};var Kv,Jv=Qv;function Qv(t){t=Kv.call(this,I({},Qv.defaultOptions,t))||this;return t.items=[],t.maxPages=void 0,t.currPage=void 0,t.pageOffsets=[],t.playState="idle",t}function tb(t){var e=t.items,i=t.maxWidth,a=t.maxItemWidth,o=t.itemMarker,s=t.itemName,l=t.itemValue,n=t.reverse,c=t.itemWidth,u=t.itemHeight,f=t.itemPadding,h=t.itemBackgroundStyle,d=e.slice();return n&&d.reverse(),d.map(function(t,e){return{id:t.id||"legend-item-".concat(e),state:t.state||"default",value:t,maxItemWidth:gs([null!=a?a:Number.MAX_VALUE,null!=i?i:Number.MAX_VALUE]),itemMarker:(r=us(o)?o(t,e,d):o,I({},Iv,{symbol:t.marker,style:{fill:t.color,stroke:t.color}},r)),itemName:(r=I({},{formatter:function(){return t.name}},s),n=r.formatter,r=K(r,["formatter"]),I({},Rv,{content:n(t,e,d)},r)),itemValue:(n=I({},{formatter:function(){return t.value}},l),r=n.formatter,n=K(n,["formatter"]),I({},Bv,{content:r(t,e,d)},n)),itemWidth:c,itemHeight:u,padding:f,backgroundStyle:h};var n,r})}i(rb,eb=la),rb.prototype.render=function(e,t){var n=e.padding,r=e.title,i=e.inset,a=e.orient,o=void 0===a?"horizontal":a,s=e.spacing,l=e.autoWrap,c=e.maxRows,u=e.maxWidth,f=e.maxHeight,h=e.cols,d=e.pageNavigator,a=e.backgroundStyle,a=void 0===a?{}:a,n=R($y(n),4),p=n[0],y=n[1],g=n[2],n=n[3],m=jv(t,"legend-container",n,p),v=Cv(m,r),r=(null==r?void 0:r.spacing)||0,i=R($y(i),4),b=i[0],i=i[3],v=Lv(v),i=(D(jv(m,"legend-inner-group",v.left+i,v.bottom+b+r),".category-items",function(){return new Jv({})}).attr("className","category-items").call(function(t){t.node().update(_({orient:o,items:tb(e),spacing:s,autoWrap:l,maxRows:c,maxWidth:u,maxHeight:f,cols:h},d||{}))}).node(),m.getLocalBounds()),v=i.min,b=i.max,r=b[0]-v[0],m=b[1]-v[1];Fv(t,"legend-background",Math.min(r+y+n,u||Number.MAX_VALUE),Math.min(m+p+g,f||Number.MAX_VALUE),a)},rb.prototype.getItem=function(t){return this.querySelector("[id=".concat(t,"]"))},rb.prototype.setItemState=function(t,e,n){void 0===n&&(n=!0),null!=(t=this.getItem(t))&&t.setState(e,n)},rb.prototype.getItemsStates=function(){return this.querySelectorAll(".legend-item").map(function(t){return{id:t.id,state:t.getState()}})};var eb,nb=rb;function rb(t){return eb.call(this,I({},Dv,t))||this}function ib(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}E.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),E.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+(n=n/6)],["L",t+r-2,e+n],["M",a,e-n],["L",t+r-2,e-n]]}),E.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-(n=n/6),a],["L",t-n,e+r-2],["M",t+n,a],["L",t+n,e+r-2]]});i(sb,ab=F.CustomElement),sb.prototype.connectedCallback=function(){this.draw()},sb.prototype.attributeChangedCallback=function(){this.draw()},sb.prototype.draw=function(){this.updateBackground(),this.updateTrack()},sb.prototype.updateBackground=function(){var t=this.style.backgroundColor;this.path.style.path=this.getRailPath(),this.path.attr({fill:t,fillOpacity:.45})},sb.prototype.updateTrack=function(){var t=this.style.fill,e=(this.track.style.path=this.getRailPath(),this.getClipPath());(this.track.style.clipPath=e)&&this.track.appendChild(e),this.track.style.fill=t},Object.defineProperty(sb.prototype,"box",{get:function(){var t=this.style,e=t.orient,n=t.size,t=t.length;return ib(e,[t,n],[n,t])},enumerable:!1,configurable:!0}),sb.prototype.getRailPath=function(){var t=this.style.type,e=R(this.box,2),n=e[0],e=e[1];return"size"===t?[["M",0,e],["L",0+n,0],["L",0+n,e]]:[["M",0,e],["L",0,0],["L",0+n,0],["L",0+n,e]]},sb.prototype.getClipPath=function(){var t,e,n,r,i=this.style,a=i.orient,i=i.selection;return i?(r=(t=R(this.box,2))[0],t=t[1],n=(i=R(i,2))[0],i=i[1],e=ib(a,n*r,0),n=ib(a,0,n*t),r=ib(a,i*r,r),a=ib(a,t,i*t),new F.Path({style:{path:[["M",e,n],["L",e,a],["L",r,a],["L",r,n]]}})):null};var ab,ob=sb;function sb(t){t=ab.call(this,hg({},{style:zv},t=void 0===t?{}:t))||this;return t.path=t.appendChild(new F.Path({className:"rail-path"})),t.track=t.appendChild(new F.Path({className:"rail-path"})),t}i(ub,lb=la),ub.prototype.render=function(t,e){var n=t.textStyle,r=t.visibility,i=t.symbol,a=t.size,o=t.fill,s=t.stroke,l=t.lineWidth;i&&"hidden"!==r?(D(e,".handle",function(){return new E({})}).attr("className","handle").call(function(t){t.node().update({symbol:i,size:a,fill:o,stroke:s,lineWidth:l})}),D(e,".handle-text","text").attr("className","handle-text").call(S,n)):(null!=(t=e.querySelector(".handle"))&&t.remove(),null!=(r=e.querySelector(".handle-text"))&&r.remove())};var lb,cb=ub;function ub(){return null!==lb&&lb.apply(this,arguments)||this}i(db,fb=F.CustomElement),db.prototype.connectedCallback=function(){this.init(),this.bindEvents()},db.prototype.attributeChangedCallback=function(t,e,n){"textStyle"!==t&&"padding"!==t&&"position"!==t||this.init()},db.prototype.hide=function(){this.style.visibility="hidden"},db.prototype.show=function(){this.style.visibility="visible"},db.prototype.init=function(){var t=this.style,e=t.textStyle;"top"===t.position?this.text.attr(_({textAlign:"center"},e)):this.text.attr(_({textAlign:"left"},e))},db.prototype.updateBackground=function(){var t,e,n=this.text.getLocalBounds(),r=n.min,n=n.max,i=Math.min(n[0]-r[0],40),r=[r[0]-4,r[1]-2,r[0]+i+4,n[1]+2],a=(i=this.style.position,r=(n=R(n=r,4))[0],e=n[1],a=n[2],n=n[3],"top"===i?[["M",r,n],["L",r,e],["L",a,e],["L",a,n],["L",r+(i=a-r)/2+(t=xs(10,i/3,i/2))/2,n],["L",r+i/2,n+4],["L",r+i/2-t/2,n],["L",r,n]]:[["M",r,e],["L",a,e],["L",a,n],["L",r,n],["L",r,e+(i=n-e)/2+(t=xs(6,i/3,i/2))/2],["L",r-4,e+i/2],["L",r,e+i/2-t/2],["L",r,e]]);this.background.style.path=a},db.prototype.bindEvents=function(){var t=this;this.text.addEventListener(F.ElementEvent.BOUNDS_CHANGED,function(){t.updateBackground()})};var fb,hb=db;function db(t){t=fb.call(this,hg({},{style:{visibility:"hidden"}},t=void 0===t?{}:t))||this;return t.background=t.appendChild(new F.Path({style:{lineCap:"round",fill:"#262626",lineWidth:1,stroke:"#333"}})),t.text=t.appendChild(new F.Text({style:{text:"",fill:"#fff",fontSize:10,textBaseline:"middle"}})),t}function pb(t,e){var t=R(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}function yb(t,e,n,r,i){var a=R(ib(t,["dx","dy"],["dy","dx"]),2),o=a[0],a=a[1],s={};return s[o]=e,s[a]="start"===n?-i:r+i,s.textAlign=ib(t,"center","start"===n?"right":"left"),s.textBaseline=ib(t,"start"===n?"bottom":"top","middle"),s}function gb(t,e){var n,s,l,c,r,i,a,u=t.min,f=t.max,o=t.handle,h=t.orient,d=void 0===h?"horizontal":h;return null===t.label||o?[]:(s=hg({size:24,length:200},zv,t.rail||{}),h=hg({},Wv,t.label||{}),l=h.align,c=h.spacing,"rail"===l?(t=(o=R(ib(d,["dx","dy"],["dy","dx"]),2))[0],h=o[1],r=(o=R(ib(d,["right","left"],["center","center"]),2))[0],o=o[1],i=(a=R(ib(d,["middle","middle"],["bottom","top"]),2))[0],a=a[1],[((n={id:"legend-label-0",text:"".concat(u)})[t]=-c,n[h]=s.size/2,n.textAlign=r,n.textBaseline=i,n),((r={id:"legend-label-1",text:"".concat(f)})[t]=s.length+c,r[h]=s.size/2,r.textAlign=o,r.textBaseline=a,r)]):e.map(function(t,e){o=t,n=u,r=f,i=s;var n,r,i,a=(a=void 0!==a&&a)?o*(r-n)/i.length:Hy((o-n)*(n<r?i.length/(r-n):0),2),o=yb(d,a,l,s.size,c);return _({id:"legend-label-".concat(e),text:"".concat(t)},o)}))}var mb=zs(function(t){return t.sort(function(t,e){return t-e})},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return JSON.stringify(t)});i(kb,vb=la),kb.prototype.render=function(t,e){var n=t.padding,r=t.title,i=t.inset,a=(t.orient,t.backgroundStyle),a=void 0===a?{}:a,o=t.maxWidth,s=t.maxHeight,l=t.label,n=R($y(n),4),c=n[0],u=n[1],f=n[2],n=n[3],h=jv(e,"legend-container",n,c),d=Cv(h,r),r=(null==r?void 0:r.spacing)||0,i=R($y(i),4),p=i[0],i=i[3],d=Lv(d),i=jv(h,"legend-inner-group",d.left+i,d.bottom+p+r),d=gb(t,this.ticks),p=(Fm(i,"legend-label",d,l,{fill:"#2C3542",fillOpacity:.65,fontWeight:"normal"}),this.drawInner(),h.getLocalBounds()),r=p.min,t=p.max,i=t[0]-r[0],d=t[1]-r[1];Fv(e,"legend-background",Math.min(i+u+n,o||Number.MAX_VALUE),Math.min(d+c+f,s||Number.MAX_VALUE),a)},kb.prototype.drawInner=function(){this.drawRail(),this.drawHandles(),this.createIndicator()},Object.defineProperty(kb.prototype,"orient",{get:function(){return this.style.orient||"horizontal"},enumerable:!1,configurable:!0}),Object.defineProperty(kb.prototype,"selection",{get:function(){var t=this.style,e=t.min,n=t.max;return[t.start||e,t.end||n]},enumerable:!1,configurable:!0}),Object.defineProperty(kb.prototype,"labelsCfg",{get:function(){var t=this.style.label;return hg({},Wv,t||{})},enumerable:!1,configurable:!0}),Object.defineProperty(kb.prototype,"railCfg",{get:function(){var t=this.style.rail;return hg({size:24,length:200},zv,t||{})},enumerable:!1,configurable:!0}),Object.defineProperty(kb.prototype,"handleCfg",{get:function(){var t=this.style,e=t.handle,t=t.label;return hg({},Hv,e||{},{textStyle:this.labelsCfg.style,spacing:this.labelsCfg.spacing,visibility:e&&null!==t?"visible":"hidden"})},enumerable:!1,configurable:!0}),kb.prototype.ifHorizontal=function(t,e){return ib(this.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},Object.defineProperty(kb.prototype,"color",{get:function(){var t,e,i,a,o,n=this.style.color,n=Array.from(void 0===n?[]:n),r=n.length;return r?this.railCfg.chunked?(t=this.ticks,e=this.orient,i=Array.from(n),a=i.length,o=t.length,t.reduce(function(t,e,n){var r=i[n%a];return t+" ".concat(n/(o-1),":").concat(r).concat(n<o-1?" ".concat((n+1)/(o-1),":").concat(r):"")},"l(".concat("horizontal"===e?"0":"270",")"))):n.reduce(function(t,e,n){return t+" ".concat(n/(r-1),":").concat(e)},"l(".concat(this.ifHorizontal("0","270"),")")):""},enumerable:!1,configurable:!0}),Object.defineProperty(kb.prototype,"slidable",{get:function(){return!!this.style.handle},enumerable:!1,configurable:!0}),Object.defineProperty(kb.prototype,"ticks",{get:function(){var t=this.style,e=t.min,t=t.max;return mb(re(re([e],R(this.railCfg.ticks||[]),!1),[t],!1))},enumerable:!1,configurable:!0}),kb.prototype.drawRail=function(){var t=this.style,e=t.orient,n=t.min,t=t.max,r=R(this.selection,2),i=r[0],r=r[1],a=this.querySelector(".legend-inner-group");this.rail=M(this.rail||a.appendChild(new ob)).attr("className","legend-rail").call(S,_(_({},this.railCfg),{fill:this.color,orient:e})).style("selection",this.slidable?[(i-n)/(t-n),(r-n)/(t-n)]:void 0).node()},kb.prototype.drawHandles=function(){var t=R(this.selection,2),e=t[0],t=t[1];this.startHandle=this.drawHandle("start",e),this.endHandle=this.drawHandle("end",t)},kb.prototype.drawHandle=function(t,e){var n=this,r=this.labelsCfg,i=r.align,r=r.spacing,a=this.railCfg.size,o=this.handleCfg.size,s=this.getOffset(e),l=yb(this.orient,s,i,a,-o/3),c=l.dx,u=l.dy,f=yb(this.orient,s,i,a,"start"===i?r:o/3+r),l="start"===t?this.startHandle:this.endHandle,s=this.querySelector(".legend-inner-group");return M(l||s.appendChild(new cb({}))).attr("className","legend-handle-".concat(t)).call(function(t){return t.node().update(_(_({},n.handleCfg),{x:c,y:u,symbol:n.ifHorizontal("horizontalHandle","verticalHandle"),textStyle:_({text:"".concat(null!=e?e:""),x:+f.dx-+c,y:+f.dy-+u,textAlign:f.textAlign,textBaseline:f.textBaseline},n.handleCfg.textStyle)}))}).node()},kb.prototype.createIndicator=function(){this.indicator=this.appendChild(new hb({zIndex:2,className:"legend-indicator",style:{position:this.ifHorizontal("top","right")}}))},kb.prototype.bindEvents=function(){var n=this,t=new Map;t.set("rail",this.rail),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){t.addEventListener("mousedown",n.onDragStart(e)),t.addEventListener("touchstart",n.onDragStart(e))}),this.startHandle.addEventListener("mouseover",function(){return n.updateMouse()}),this.endHandle.addEventListener("mouseover",function(){return n.updateMouse()}),this.rail.addEventListener("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},kb.prototype.showIndicator=function(t,e){var n,r,i,a,o,s,l;void 0===e&&(e="".concat(t)),"number"!=typeof t?this.hideIndicator():(this.indicator.show(),l=this.querySelector(".legend-container"),n=(r=this.style).min,r=r.max,t=xs(t,n,r),n=this.ifHorizontal(this.getOffset(t),this.railCfg.size+12),r=this.ifHorizontal(-14,this.getOffset(t)),i=(t=this.rail.getBBox()).x,t=t.y,a=(o=l.getBBox()).x,o=o.y,s=(l=R(l.getLocalPosition(),2))[0],l=l[1],this.indicator.style.x=i-a+s+n,this.indicator.style.y=t-o+l+r,this.indicator.style.textStyle={text:e})},kb.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.hide()},kb.prototype.onDragEnd=function(){this.style.cursor="default",this.removeEventListener("mousemove",this.onDragging),this.removeEventListener("touchmove",this.onDragging),document.removeEventListener("mouseup",this.onDragEnd),document.removeEventListener("touchend",this.onDragEnd)},kb.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},kb.prototype.setSelection=function(t,e){this.updateSelection(t,e)},kb.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=R(this.selection,2),c=l[0],l=l[1],t=R([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.style),c=n.min,l=n.max,u=R((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=R(n,2))[0],n=n[1],a=(c=R(c,2))[0],c=c[1],o=(l=R(l,2))[0],l=l[1],c=(a=R([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=R([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[Hy(c,r),Hy(a,r)]),2),e=u[0],t=u[1];this.update({start:e,end:t}),this.dispatchSelection()},Object.defineProperty(kb.prototype,"step",{get:function(){var t=this.attributes,e=t.step,n=t.min,t=t.max;return Ns(e)?Hy(.01*(t-n),0):e},enumerable:!1,configurable:!0}),kb.prototype.getTickValue=function(t){return this.railCfg.chunked?pb(this.ticks,t).tick:(e=this.step,(n=this.style.min)+Math.round((t-n)/e)*e);var e,n},kb.prototype.getValueByCanvasPoint=function(t,e){var n=this.style,r=n.min,n=n.max,i=R(this.rail.getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,re([],R(tg(t)),!1));return xs(this.getOffset(i-a,!0)+r,r,n)},kb.prototype.getOffset=function(t,e){var n=this.style,r=n.min,n=n.max;return(e=void 0!==e&&e)?t*(n-r)/this.railCfg.length:Hy((t-r)*(r<n?this.railCfg.length/(n-r):0),2)},kb.prototype.dispatchSelection=function(){var t=new F.CustomEvent("valueChanged",{detail:{value:this.selection}});this.dispatchEvent(t)},kb.prototype.dispatchIndicated=function(t,e){t=new F.CustomEvent("onIndicated",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([mg(20)],kb.prototype,"dispatchSelection",null),t([mg(20)],kb.prototype,"dispatchIndicated",null);var vb,bb,xb,wb,Mb=kb;function kb(t){var a=vb.call(this,hg({type:"continuous-legend"},Vv,t))||this;return a.onHovering=function(t){t.stopPropagation();var e,t=a.getValueByCanvasPoint(t);Gs(a.attributes,["rail","chunked"])?(e=pb(a.ticks,t).range,a.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),a.dispatchIndicated(t,e)):(e=a.getTickValue(t),a.showIndicator(e),a.dispatchIndicated(e))},a.onDragStart=function(e){return function(t){t.stopPropagation(),a.slidable&&(a.target=e,a.prevValue=a.getTickValue(a.getValueByCanvasPoint(t)),a.addEventListener("mousemove",a.onDragging),a.addEventListener("touchmove",a.onDragging),a.addEventListener("mouseleave",a.onDragEnd),a.addEventListener("mouseup",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd))}},a.onDragging=function(t){var e=a.target,n=(a.updateMouse(),R(a.selection,2)),r=n[0],n=n[1],t=a.getTickValue(a.getValueByCanvasPoint(t)),i=t-a.prevValue;"start"===e?r!==t&&a.updateSelection(t,n):"end"===e?n!==t&&a.updateSelection(r,t):"rail"===e&&0!=i&&(a.prevValue=t,a.updateSelection(i,i,!0))},a}function Ob(t){bb||(bb=document.createElement("table"),wb=document.createElement("tr"),xb=/^\s*<(\w+|!)[^>]*>/,wb={tr:document.createElement("tbody"),tbody:bb,thead:bb,tfoot:bb,td:wb,th:wb,"*":document.createElement("div")});var e=xb.test(t)&&RegExp.$1,e=(e&&e in wb||(e="*"),wb[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}var _b,Go="tooltip",Sb="tooltip-title",Eb="tooltip-list",_a="tooltip-list-item",Wo="tooltip-list-item-name",Ab="tooltip-list-item-marker",Ho="tooltip-list-item-name-label",hc="tooltip-list-item-value",r="tooltip-crosshair-x",a="tooltip-crosshair-y",o={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},n=((e={})[".".concat(Go)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},e[".".concat(Sb)]={color:"rgba(0, 0, 0, 0.45)"},e[".".concat(Eb)]={margin:"0px","list-style-type":"none",padding:"0px"},e[".".concat(_a)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},e[".".concat(Ab)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},e[".".concat(Wo)]={display:"flex","align-items":"center","max-width":"216px"},e[".".concat(Ho)]=_({flex:1},o),e[".".concat(hc)]=_({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},o),e[".".concat(r)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e[".".concat(a)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e),Pb=(i(Nb,_b=la),Object.defineProperty(Nb.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Object.defineProperty(Nb.prototype,"position",{set:function(t){var t=R(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(Nb.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(Nb.prototype,"items",{get:function(){var t=this.attributes.items;return this.sort(this.filter(t.map(function(t,e){var n=t.name,n=void 0===n?"":n,r=t.value,i=t.color,i=void 0===i?"black":i,a=t.index,t=K(t,["name","value","color","index"]);return _({name:n,value:r,color:i,index:void 0===a?e:a},t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(Nb.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes.template.item,r=[];return this.items.forEach(function(t){var n;r.push(Ob((n=t,(t=e)&&n?t.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):t)))}),r},enumerable:!1,configurable:!0}),Object.defineProperty(Nb.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return bs(t)?ag(t):Ts(t)?t:us(t)?ag(t(this.attributes.items)):void 0},enumerable:!1,configurable:!0}),Nb.prototype.render=function(t,e){this.updateHTMLTooltipElement(),this.updatePosition()},Nb.prototype.update=function(t){this.attr(I({},this.attributes,t)),this.render(this.attributes,this)},Nb.prototype.clear=function(){this.element.innerHTML=""},Nb.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},Nb.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},Nb.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},Nb.prototype.initShape=function(){var t=this.attributes.template.container;this.element=Ob(t),!this.id&&""===this.id||this.element.setAttribute("id",this.id)},Nb.prototype.updateHTMLTooltipElement=function(){var e,r,t=this.attributes.title,n=this.element,i=this.customContent,t=(this.clear(),i?n.appendChild(i):(i=this.attributes.template.title,n.innerHTML=i,n.getElementsByClassName(Sb)[0].innerHTML=t,i=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=Eb,i.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=n,Object.entries(t).forEach(function(t){var t=R(t,2),e=t[0],n=t[1];re([r],R(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})}),this.element.style.visibility=this.visibility},Nb.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,e=R(e.offset,2),i=e[0],a=e[1],e=(t||n).split("-"),o={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,s=t.width,l=t.height,c=[-s/2,-l/2];return e.forEach(function(t){var e=R(c,2),n=e[0],e=e[1],t=R(o[t],2),r=t[0],t=t[1];c=[n+(s/2+i)*r,e+(l/2+a)*t]}),c},Nb.prototype.setOffsetPosition=function(t){var t=R(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat(r+a+e,"px"),this.element.style.top="".concat(i+n+t,"px")},Nb.prototype.updatePosition=function(){this.throttleUpdatePosition()},Nb.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=R(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,f=c.y,h=c.autoPosition,c=c.bounding;return h?(e=(h=this.element).offsetWidth,h=h.offsetHeight,f=(u=R([u+l,f+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=c.x,i=c.y,a={left:f<s,right:s+c.width<f+e,top:u<i,bottom:i+c.height<u+h},o=[],n.split("-").forEach(function(t){o.push(a[t]?r[t]:t)}),s=o.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},Nb.prototype.filter=function(t){var e=this.attributes.filterBy;return e?t.filter(e):t},Nb.prototype.sort=function(t){var e=this.attributes.sortBy;return e?t.sort(e):t},Nb.tag="tooltip",Nb.defaultOptions={style:{x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],follow:!0,enterable:!1,autoPosition:!0,items:[],throttleFrequency:50,container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(Go,'"></div>'),title:'<div class="'.concat(Sb,'"></div>'),item:'<li class="'.concat(_a,'" data-index={index}>\n <span class="').concat(Wo,'">\n <span class="').concat(Ab,'" style="background:{color}"></span>\n <span class="').concat(Ho,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(hc,'" title="{value}">{value}</span>\n </li>')},style:n}},Nb);function Nb(t){var e=_b.call(this,I({},Nb.defaultOptions,t))||this;return e.visibility="visible",e.throttleUpdatePosition=Js(function(){e.setOffsetPosition(e.autoPosition(e.getRelativeOffsetFromCursor()))},e.attributes.throttleFrequency,{}),e.visibility=e.attributes.visibility,e.initShape(),e.render(e.attributes,e),e}var Tb,Lb={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function Cb(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function jb(t){return Tb.call(this,I({},jb.defaultOptions,t))||this}i(jb,Tb=la),jb.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=D(e,".switch-content","g").attr("className","switch-content").node(),l=e.getLocalBounds(),n=Gs(Lb,n,Lb.default),c=n.sizeStyle,u=n.tagStyle,f=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",h=c,d=o?t:s,p=((t||s)&&D(e,".switch-tag",function(){return new Sg({})}).attr("className","switch-tag").call(function(t){var e,t=t.node(),n=(t.update(I({cursor:f,backgroundStyle:null,text:!1,marker:!1},u,d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);h=_(_({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:h.height},n={width:i,height:r},i=h.radius,r=o,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===o?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),D(e,".switch-background","rect").attr("className","switch-background").style("zIndex",(e.style.zIndex||0)-1).style("x",l.min[0]).style("y",l.min[1]).style("fill",n).style("cursor",f).style("fillOpacity",r?.4:1).call(S,h).node()),y=D(e,".switch-background-stroke","rect").attr("className","switch-background-stroke").style("zIndex",(e.style.zIndex||0)-2).style("x",l.min[0]).style("y",l.min[1]).style("stroke",n).style("lineWidth",0).call(S,h).node();D(e,".switch-handle","rect").attr("className","switch-handle").style("fill","#fff").style("cursor",f).call(function(t){var e,t=t.node(),n=Cb(p,a,o),r=Cb(p,a,!o);t.attr("x")&&!Zs(n,r)&&i.checked!==o?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=y.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),y.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!o},jb.defaultOptions={type:jb.tag="switch",style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var Fb,Do={text:"",type:"primary",height:20,width:20,buttonStyle:{default:{lineWidth:0,fill:"#fff"},active:{fill:"#fff"},disabled:{fill:"#fff"}},markerStyle:{default:{fill:"black",size:10},disabled:{fill:"#8c8c8c"}}};function Ib(t){var t=Fb.call(this,I({},Ib.defaultOptions,t))||this,e=(t.playState="idle",t.attributes),n=e.view,e=e.initPageNum;return t.currPage=e,t.view=n,t.init(),t}i(Ib,Fb=la),Object.defineProperty(Ib.prototype,"finished",{get:function(){var e=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t){e.resolveFinishedPromise=function(){e.finishedPromise=null,t(e.currPage)}})),"idle"===this.playState&&this.resolveFinishedPromise(),this.finishedPromise},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"maxPages",{get:function(){var t=this.attributes,e=t.pageWidth,n=t.pageHeight,r=t.orient,i=t.pageLimit;return t.pageCallback||i!==1/0?i:"horizontal"===r?Math.ceil(this.width/e):Math.ceil(this.height/n)},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"view",{get:function(){return this.fullView},set:function(t){var e=this.attributes,n=e.width,e=e.height;t.setLocalPosition(0,0),this.fullView=t,n&&e||(e=(n=rg(t)).width,t=n.height,this.width=e,this.height=t)},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"width",{get:function(){var t=this.attributes.width;return t||this.viewWidth},set:function(t){this.viewWidth=t},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"height",{get:function(){var t=this.attributes.height;return t||this.viewHeight},set:function(t){this.viewHeight=t},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"btnPosition",{get:function(){var t;return null!=(t=this.style.button)&&t.position?this.style.button.position:"horizontal"===this.style.orient?"right":"bottom"},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"defaultShape",{get:function(){return["left","right","left-right"].includes(this.btnPosition)?["left","right"]:["up","down"]},enumerable:!1,configurable:!0}),Object.defineProperty(Ib.prototype,"buttonCfg",{get:function(){var t=R(this.defaultShape,2),e=t[0],t=t[1],n=this.attributes.button,r=n.prev,n=n.next;return{prev:_({marker:e},r),next:_({marker:t},n)}},enumerable:!1,configurable:!0}),Ib.prototype.render=function(t,e){},Ib.prototype.init=function(){this.initShape(),this.updateView(),this.updateButton(),this.updateButtonState(),this.adjustLayout()},Ib.prototype.update=function(t){var e=t.view;e&&(this.view&&(this.view.style.clipPath=null,this.removeChild(this.view)),this.currPage=this.attributes.initPageNum,this.view=e,this.view.style.clipPath=this.clipView,this.appendChild(this.view),this.view.toBack()),this.attr(I({},this.attributes,t)),this.updateView(),this.updateButton(),this.updateButtonState(),this.adjustLayout()},Ib.prototype.clear=function(){this.view&&(this.view.style.clipPath=null,this.removeChild(this.view)),this.fullView=void 0,this.removeChildren()},Ib.prototype.destroy=function(){this.removeChildren(),Fb.prototype.destroy.call(this)},Ib.prototype.goTo=function(t){var e,n,r,i,a,o,s,l,c,u,f=this;return"idle"===this.playState&&(e=(n=this.attributes).effect,n=n.duration,r=(c=this.calcRelativePagingOffset(t)).viewFromX,i=c.viewFromY,a=c.viewToX,o=c.viewToY,u=c.clipFromX,s=c.clipFromY,l=c.clipToX,c=c.clipToY,this.playState="running",this.clipView.animate([{transform:"translate(".concat(u,"px, ").concat(s,"px)")},{transform:"translate(".concat(l,"px, ").concat(c,"px)")}],{duration:n,easing:e,fill:"both"}),null!=(u=this.view.animate([{transform:"translate(".concat(r,"px, ").concat(i,"px)")},{transform:"translate(".concat(a,"px, ").concat(o,"px)")}],{duration:n,easing:e,fill:"both"})))&&u.finished.then(function(){f.currPage=t,f.updateButtonState(),f.resolveFinishedPromise(),f.playState="idle"}),this.finished},Ib.prototype.prev=function(){var t=this.attributes.loop,e=this.currPage-1;return e<1&&(e=t?this.maxPages:1),this.goTo(e)},Ib.prototype.next=function(){var t=this.attributes.loop,e=this.maxPages,n=this.currPage+1;return this.goTo(n=e<n?t?1:e:n)},Ib.prototype.initShape=function(){this.clipView=new F.Rect({name:"clipView",style:{x:0,y:0,width:0,height:0}}),this.view.style.clipPath=this.clipView,this.view.appendChild(this.clipView),this.appendChild(this.view),this.view.toBack();var t=R(this.defaultShape,2),e=t[0],t=t[1];this.prevButton=new Cg({name:"prevButton",style:_(_({},Ib.defaultOptions.style.button.prev),{marker:e,onClick:this.prev.bind(this)})}),this.appendChild(this.prevButton),this.nextButton=new Cg({name:"nextButton",style:_(_({},Ib.defaultOptions.style.button.next),{marker:t,onClick:this.next.bind(this)})}),this.appendChild(this.nextButton),this.paginationGroup=new F.Group({name:"paginationGroup"}),this.appendChild(this.paginationGroup)},Ib.prototype.updateView=function(){var t=this.getClipViewSpace(this.currPage),e=t.width,t=t.height;this.clipView.attr({width:e,height:t}),this.view.setLocalPosition(0,0),this.clipView.setLocalPosition(0,0)},Ib.prototype.updateButton=function(){var t=this.buttonCfg,e=t.prev,t=t.next;e&&this.prevButton.update(e),t&&this.nextButton.update(t)},Ib.prototype.updateButtonState=function(){this.attributes.loop?(this.nextButton.setState("default"),this.prevButton.setState("default")):(this.nextButton.setState(this.currPage===this.maxPages?"disabled":"default"),this.prevButton.setState(1===this.currPage?"disabled":"default"))},Ib.prototype.getClipViewSpace=function(t){var e=this.attributes,n=e.orient,r=e.pageWidth,i=e.pageHeight,e=e.pageCallback,a={x:0,y:0,width:r,height:i},o=this.maxPages;return e?_(_({},a),e(t)):(o<t||t<1||("vertical"===n?a.y=(t-1)*i:"horizontal"===n&&(a.x=(t-1)*r)),a)},Ib.prototype.absolute2Relative=function(t,e){var n=this.currPage,n=this.getClipViewSpace(n);return[t+n.x,e+n.y]},Ib.prototype.getViewPosition=function(t){var e=this.getClipViewSpace(1),n=e.x,e=e.y,t=this.getClipViewSpace(t),n=R([-t.x+n,-t.y+e],2);return{x:n[0],y:n[1]}},Ib.prototype.getRelativeViewPosition=function(t){var t=this.getViewPosition(t),e=t.x,t=t.y,e=R(this.absolute2Relative(e,t),2);return{x:e[0],y:e[1]}},Ib.prototype.calcRelativePagingOffset=function(t){var e=R(this.absolute2Relative.apply(this,re([],R(this.view.getLocalPosition().slice(0,2)),!1)),2),n=e[0],e=e[1],t=this.getRelativeViewPosition(t),r=t.x,t=t.y,i=R([-n,-e],2),a=i[0],i=i[1],o=R([-r,-t],2);return{viewFromX:n,viewFromY:e,viewToX:r,viewToY:t,clipFromX:a,clipFromY:i,clipToX:o[0],clipToY:o[1]}},Ib.prototype.adjustLayout=function(){this.adjustButton()},Ib.prototype.adjustButton=function(){var t,e=this.attributes,n=e.button,r=e.pageWidth,e=e.pageHeight,i=this.btnPosition,n=(null==n?void 0:n.spacing)||0,a=rg(this.prevButton),o=a.width,a=a.height,s=rg(this.nextButton),l=s.width,s=s.height,c=0,u=0,f=0,h=0;"left-right"===i?(c=-(n+o),u=(e-a)/2,f=n+r,h=(e-s)/2):"top-bottom"===i?(c=(r-o)/2,u=-(n+a),f=(r-l)/2,h=n+e):"top"===i?(c=(r-n)/2-o,u=-(n+(t=ys([a,s]))),f=(r+n)/2,h=-(n+t)):"bottom"===i?(c=(r-n)/2-o,f=(r+n)/2,h=u=n+e):"left"===i?(c=(f=-(n+l))-(n+o),h=u=(e-(t=ys([a,s])))/2):"right"===i&&(f=(c=n+r)+o,h=u=(e-(t=ys([a,s])))/2),this.prevButton.setLocalPosition(c,u),this.nextButton.setLocalPosition(f,h)},Ib.defaultOptions={type:Ib.tag="page-navigator",style:{x:0,y:0,effect:"linear",duration:200,orient:"horizontal",initPageNum:1,pageLimit:1/0,loop:!1,button:{prev:_({spacing:0},Do),next:_({spacing:0},Do),style:{default:{},active:{},disabled:{}},spacing:5},pagination:{type:"currTotal",style:{default:{},active:{}},separator:"/",spacing:5}}},E.registerSymbol("left",function(t,e,n){return[["M",t-n,e],["L",t+n,e-n],["L",t+n,e+n],["Z"]]}),E.registerSymbol("right",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e],["L",t-n,e+n],["Z"]]}),E.registerSymbol("up",function(t,e,n){return[["M",t-n,e+n],["L",t,e-n],["L",t+n,e+n],["Z"]]}),E.registerSymbol("down",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t,e+n],["Z"]]});var Rb,Bb,Db,zb,ta={text:{text:""},lineStyle:{stroke:"#416180",strokeOpacity:.45,lineWidth:1,lineDash:[5,5]}},Vo=hg({},ta,{type:"line",text:{position:"start",align:"center",verticalAlign:"bottom"}}),aa=hg({},ta,{type:"circle",defaultRadius:0}),oa=hg({},ta,{type:"polygon",defaultRadius:0,startAngle:0}),sa=(i(Wb,Rb=la),Object.defineProperty(Wb.prototype,"localPointer",{get:function(){var t=R(this.getPosition(),2),e=t[0],t=t[1],n=R(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(Wb.prototype,"tagCfg",{get:function(){var t=this.attributes.text;return t.position,K(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(Wb.prototype,"crosshairCfg",{get:function(){var t=this.attributes.lineStyle;return _(_({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),Wb.prototype.render=function(t,e){var n=this,e=D(e,".crosshair-group","g").attr("className","crosshair-group").node();this.shapesGroup=e,this.tagShape=D(e,".crosshair-tag",function(){return new Sg({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=D(e,".crosshair-path","path").attr("className","crosshair-path").call(S,this.crosshairCfg).node(),this.adjustLayout()},Wb.prototype.update=function(t){this.attr(I({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},Wb.prototype.setPointer=function(t){this.pointer=t},Wb.defaultOptions={type:Wb.tag="crosshair-base",style:ta},Wb);function Wb(t){return Rb.call(this,I({},Wb.defaultOptions,t))||this}function Hb(t){return Bb.call(this,hg({},Hb.defaultOptions,t))||this}function Vb(t){return Db.call(this,hg({},Vb.defaultOptions,t))||this}function Gb(t){return zb.call(this,hg({},Gb.defaultOptions,t))||this}i(Hb,Bb=sa),Object.defineProperty(Hb.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=R(t.startPos,2),n=e[0],e=e[1],t=R(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(Hb.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=R(this.getPosition(),2))[0],e=e[1],[(n=R(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(Hb.prototype,"isVertical",{get:function(){var t=this.attributes,e=R(t.startPos,2),n=e[0],e=e[1],t=R(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(Hb.prototype,"tagShapeSpace",{get:function(){var t=rg(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Hb.prototype.update=function(t){Bb.prototype.update.call(this,t)},Hb.prototype.setPointer=function(t){Bb.prototype.setPointer.call(this,t),this.adjustPosition()},Hb.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},Hb.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},Hb.prototype.adjustPosition=function(){var t=R(this.localPointer,2),e=t[0],t=t[1],n=R(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},Hb.prototype.adjustTag=function(){var t,e,n=this.attributes,r=n.text,i=R(n.startPos,2),a=i[0],i=i[1],n=R(n.endPos,2),o=n[0],n=n[1];r&&""!==r?(this.tagShape.show(),r=r.position,e=(t=this.tagShapeSpace).width,t=t.height,a=(o=R(this.getOrientVal({start:[-e/2,t/2],end:[o-a+e/2,t/2]},{start:[0,0],end:[0,n-i+t]})[r],2))[0],e=o[1],this.tagShape.setLocalPosition(a,e)):this.tagShape.hide()},Hb.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},Hb.defaultOptions={type:Hb.tag="line-crosshair",style:Vo},t([mg(20)],Hb.prototype,"setPointer",null),i(Vb,Db=sa),Object.defineProperty(Vb.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),Vb.prototype.update=function(t){Db.prototype.update.call(this,t)},Vb.prototype.setPointer=function(t){var t=R(t,2),e=t[0],t=t[1],e=(Db.prototype.setPointer.call(this,[e,t]),R(this.localPointer,2)),t=e[0],e=e[1],n=R(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},Vb.prototype.adjustLayout=function(){this.tagShape.hide()},Vb.prototype.createCirclePath=function(t){var e=this.attributes,n=R(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return bg(r,n,t||e)},Vb.defaultOptions={type:Vb.tag="circle-crosshair",style:aa},t([mg(20)],Vb.prototype,"setPointer",null),i(Gb,zb=sa),Object.defineProperty(Gb.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),Gb.prototype.update=function(t){zb.prototype.update.call(this,t)},Object.defineProperty(Gb.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],f=[],h=0;h<l;h+=1)f.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+c*h,a=i=void 0,i=e[0]-n[0],e=e[1]-n[1],a=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*a+n[0],t[1]=i*a+e*r+n[1],t));return f},enumerable:!1,configurable:!0}),Gb.prototype.setPointer=function(t){var t=R(t,2),e=t[0],t=t[1],e=(zb.prototype.setPointer.call(this,[e,t]),R(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=R(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=gg(n,[t,e])/gg(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},Gb.prototype.adjustLayout=function(){this.tagShape.hide()},Gb.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=R(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=R(t,2),t=R(Zt([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",a+n,o+t]});return t.push(["Z"]),t},Gb.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=R(t,2),c=t[0],u=t[1],f=this.points,t=R(this.attributes.center,2),h=t[0],d=t[1],p=1;p<=f.length;p+=1){var y=R(f[p-1],2),g=y[0],y=y[1],m=R(f[p%f.length],2),v=m[0],m=m[1],g=(i=[h,d],g=[g+h,y+d],y=[v+h,m+d],l=s=o=a=m=v=void 0,m=(r=R(r=[c,u],2))[0],r=r[1],a=(i=R(i,2))[0],i=i[1],o=(g=R(g,2))[0],g=g[1],s=(y=R(y,2))[0],y=y[1],l=[],(y-g)*(a-m)==(i-r)*(s-o)?(i-r)*(o-m)==(g-r)*(a-m)&&(pg(m,a,r,i,o,g)&&yg(l,o,g),pg(m,a,r,i,s,y)&&yg(l,s,y),pg(o,s,g,y,m,r)&&yg(l,m,r),pg(o,s,g,y,a,i))&&yg(l,a,i):(v=(m*(i-r)+g*(a-m)-r*(a-m)-o*(i-r))/((s-o)*(i-r)-(a-m)*(y-g)),0<=(y=(o*(y-g)+r*(s-o)-g*(s-o)-m*(y-g))/((a-m)*(y-g)-(s-o)*(i-r)))&&y<=1&&0<=v&&v<=1&&(l[0]=m+y*(a-m),l[1]=r+y*(i-r))),l);0!==g.length&&(e=(s=R(g,2))[0],n=s[1])}return[e,n]},Gb.defaultOptions={type:Gb.tag="polygon-crosshair",style:oa},t([mg(20)],Gb.prototype,"setPointer",null);i(Xb,qb=F.DisplayObject),Object.defineProperty(Xb.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&hs(t)?t.map(function(t){return hs(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(Xb.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(Xb.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(Xb.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(Xb.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(Xb.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(Xb.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var e,t=R(t,2),n=t[0],t=t[1];return"wavy"===t?_({path:r.getWavyPath(n)},i):"double"===t?_({path:r.getDoubleLinePath(n)},i):(e={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg},_(_({path:r.getLinePath(n)},i),e[t]))})},enumerable:!1,configurable:!0}),Xb.prototype.update=function(t){var e=this;this.attr(hg({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new F.Path({style:t}))})},Xb.prototype.clear=function(){this.removeChildren()},Xb.prototype.getLinePos=function(t){var e=R(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,a=i.height,i=i.fontSize,o=R([0,0],2),s=o[0],o=o[1],o=("overline"===t?(s=(n=R([0,a*n-i/2],2))[0],n):"line-through"===t?(s=(n=R([0,a*r],2))[0],n):(s=(t=R([0,a*e+i/2],2))[0],t))[1];return[s,o]},Xb.prototype.getLinePath=function(t){var e=this.attributes.width,t=R(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},Xb.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=R(this.getLinePos(t),2),a=i[0],i=i[1],o=R([0,0],2),s=o[0],o=o[1];return"line-through"===t&&(s=(e=R([-.5,.5],2))[0],o=e[1]),"underline"===t?(s=(e=R([0,1],2))[0],o=e[1]):"overline"===t&&(s=(e=R([1,0],2))[0],o=e[1]),[["M",a,i+n*s],["L",a+r,i+n*s],["M",a,i+n*o],["L",a+r,i+n*o]]},Xb.prototype.getWavyPath=function(t){return[]},Xb.tag="decoration",Xb.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var qb,Yb,Ub=Xb;function Xb(t){t=qb.call(this,hg({},Xb.defaultOptions,t))||this;return t.update({}),t}function $b(t){t=Yb.call(this,hg({},$b.defaultOptions,t))||this;return t.init(),t}i($b,Yb=la),Object.defineProperty($b.prototype,"textWidth",{get:function(){var e=this;return ys(this.renderText.split("\n").map(function(t){return By(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"textHeight",{get:function(){return rg(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"width",{get:function(){var t=this.attributes.width;return"auto"===t||void 0===t||0===t?this.textWidth:t},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"height",{get:function(){var t=this.attributes.height;return ws(t)&&0!==t?t:rg(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"lineHeight",{get:function(){var t=this.attributes,e=t.lineHeight,t=t.fontSize;return e&&0!==e?e:t},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return Wy(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:Wy(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"ellipsisText",{get:function(){var e=this,t=this.text,n=this.attributes,r=n.width,n=n.overflow,i="ellipsis"===n?"...":n;return t.split("\n").map(function(t){return Ry(t,ws(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&ws(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"font",{get:function(){return qs(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return _(_(_({},Ky),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return _({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"decorationCfg",{get:function(){var t=this.attributes,e=t.decoration,n=t.fontSize,r=this.decorationLineWidth,i=this.fontColor;return this.textShape.getLineBoundingRects().map(function(t){return hg({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty($b.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),$b.prototype.init=function(){this.initShape(),this.update({})},$b.prototype.update=function(t){this.attr(hg({},this.attributes,t)),this.render()},$b.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new Ub({style:t}))})},$b.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},$b.prototype.initShape=function(){this.backgroundShape=new F.Rect({name:"background",style:{width:0,height:0}}),this.decorationGroup=new F.Group({name:"decoration-group"}),this.textShape=new F.Text({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},$b.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&ws(n)&&"clip"===e&&(this.clipRect=new F.Rect({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},$b.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;ws(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},$b.prototype.adjustVerticalAlign=function(){var t=this.verticalAlign,e=this.textHeight,n=0,n="top"===t?e/2:"middle"===t?this.height/2:this.height-e/2;this.textShape.attr({y:n})},$b.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},$b.defaultOptions={type:$b.tag="paragraph",style:{text:"",fontColor:"#000",fontFamily:"sans-serif",fontSize:12,fontWeight:"normal",fontVariant:"normal",letterSpacing:0,leading:0,fontStyle:"normal",decoration:{type:"none",style:{}},overflow:"none",backgroundStyle:{},transform:"none",tooltip:!1,tooltipWait:300}};var Zb,ca=_(_({},Ky),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),Kb={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},Jb={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function Qb(t){return Zb.call(this,I({},Qb.defaultOptions,t))||this}i(Qb,Zb=la),Qb.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,a=t.checked,t=t.spacing,a=(this.checked=!!a,D(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=Bs({},this.checked?Kb.selected:Kb.default,r),r=Bs({},Jb,i),t=(this.checkboxBoxShape=D(a,".checkbox-box","rect").attr("className","checkbox-box").style("zIndex",(a.style.zIndex||0)-1).call(S,e).node(),D(this.checkboxBoxShape,".checkbox-checked","path").attr("className","checkbox-box-checked").style("stroke","#ffffff").call(S,r),i=this.checkboxBoxShape,e=Number(t),{x:(r=i.getLocalBounds()).halfExtents[0]?r.max[0]+(e||0):i.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:i.style.y}),e=t.x,r=t.y;D(a,".checkbox-label","text").attr("className","checkbox-label").style("x",e).style("y",r).call(S,n)},Qb.defaultOptions={type:Qb.tag="checkbox",style:{x:0,y:0,label:_({text:""},ca),spacing:4,checked:!1}};var t2="gui-poptip",e2="gui-poptip-arrow",n2="gui-poptip-text",r2=((c={})[".".concat(t2)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},c[".".concat(n2)]={"text-align":"center"},c[".".concat(t2,"[data-position='top']")]={transform:"translate(-50%, -100%)"},c[".".concat(t2,"[data-position='left']")]={transform:"translate(-100%, -50%)"},c[".".concat(t2,"[data-position='right']")]={transform:"translate(0, -50%)"},c[".".concat(t2,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},c[".".concat(t2,"[data-position='top-left']")]={transform:"translate(0,-100%)"},c[".".concat(t2,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},c[".".concat(t2,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},c[".".concat(t2,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},c[".".concat(t2,"[data-position='right-top']")]={transform:"translate(0, 0)"},c[".".concat(t2,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},c[".".concat(t2,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},c[".".concat(t2,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},c[".".concat(e2)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},c[".".concat(t2,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},c["[data-position='top'] .".concat(e2)]={bottom:"-2px"},c[".".concat(t2,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},c["[data-position='left'] .".concat(e2)]={right:"-2px"},c[".".concat(t2,"[data-position='right']")]={transform:"translate(5px, -50%)"},c["[data-position='right'] .".concat(e2)]={left:"-2px"},c[".".concat(t2,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},c["[data-position='bottom'] .".concat(e2)]={top:"-2px"},c[".".concat(t2,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},c["[data-position='top-left'] .".concat(e2)]={left:"10px",bottom:"-2px"},c[".".concat(t2,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},c["[data-position='top-right'] .".concat(e2)]={right:"10px",bottom:"-2px"},c[".".concat(t2,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},c["[data-position='left-top'] .".concat(e2)]={right:"-2px",top:"8px"},c[".".concat(t2,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},c["[data-position='left-bottom'] .".concat(e2)]={right:"-2px",bottom:"8px"},c[".".concat(t2,"[data-position='right-top']")]={transform:"translate(5px, 0)"},c["[data-position='right-top'] .".concat(e2)]={left:"-2px",top:"8px"},c[".".concat(t2,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},c["[data-position='right-bottom'] .".concat(e2)]={left:"-2px",bottom:"8px"},c[".".concat(t2,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},c["[data-position='bottom-left'] .".concat(e2)]={top:"-2px",left:"8px"},c[".".concat(t2,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},c["[data-position='bottom-right'] .".concat(e2)]={top:"-2px",right:"8px"},c),i2=void 0;var a2;function o2(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function s2(t){var n,r;return n=o2,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(i2,t)}(t)}function l2(t){t=a2.call(this,I({style:{id:"gui-poptip"}},l2.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}i(l2,a2=la),Object.defineProperty(l2.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),l2.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},l2.prototype.update=function(t){this.attr(I({},this.style,t)),this.render(this.attributes,this)},l2.prototype.bind=function(s,l){var c,t,e,u=this;s&&(c=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=c,i=(l&&(o=(i="function"==typeof l?l.call(null,t):l).html,a=i.target,i=K(i,["html","target"]),n=Bs({},u.style,i),!a&&!1!==a||(e=a),"string"==typeof o)&&(r=o),n.position),a=n.arrowPointAtCenter,o=n.follow,n=n.offset;e?(e=(t=R(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,e,i,a,o),2))[0],a=t[1],u.showTip(e,a,{text:r,position:i,offset:n})):u.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},l2.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=R(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},l2.prototype.clear=function(){this.container.innerHTML=""},l2.prototype.destroy=function(){var t,e=this;re([],R(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},l2.prototype.showTip=function(t,e,n){var r,i=Gs(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(n2)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},l2.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},l2.prototype.getContainer=function(){return this.container},l2.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(t2).concat(t?" ".concat(t):"")},l2.prototype.initShape=function(){var t=this,e=this.style.id;this.container=s2(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},l2.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.setAttribute("class",this.getClassName()),'<span class="'.concat(e2,'"></span>'));t.innerHTML=n,bs(r)?t.innerHTML+=r:r&&Ts(r)&&t.appendChild(r),e&&(t.getElementsByClassName(n2)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},l2.prototype.applyStyles=function(){var t,e=hg({},r2,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=R(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=R(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},l2.prototype.setOffsetPosition=function(t,e,n){var n=R(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},l2.tag="poptip",l2.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:r2,template:'<div class="'.concat(n2,'"></div>')}};function c2(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return h1()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e).concat([[0,0]]);const c=[n[0]-a,n[1]-o],[u,f]=s;return l=c,t=u,i=f,e=F1(l,t),t=F1(t,i),i=F1(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),h1()(s)}const u2=ey(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=K(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),f=J(e,"background"),h=f["padding"],f=K(f,["padding"]),d=J(e,"connector"),{points:p=[]}=d,d=K(d,["points"]),i=[[+i,+a],[+n,+r]],a=Q(t).maybeAppend("text","text").call(B,e).node(),n=c2(Q(t).maybeAppend("background","rect").style("zIndex",-1).call(B,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(a,h)).call(B,o?f:{}).node(),i,p,u),r=l&&new E({id:"startMarker",style:J(e,"startMarker")}),a=c&&new E({id:"endMarker",style:J(e,"endMarker")});Q(t).maybeAppend("connector","path").style("path",n).style("markerStart",r).style("markerEnd",a).call(B,s?d:{})}),f2=t=>{const l=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),{color:i,text:a="",fontSize:o,rotate:e=0,transform:s=""}=e,a={text:String(a),stroke:i,fill:i,fontSize:o},[[i,o]]=t;return Q(new u2).style("x",i).style("y",o).call(B,r).style("transform",s+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(B,a).call(B,l).node()}};f2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const h2=ey(t=>{var e=K(t.attributes,["class","x","y"]);const n=J(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",a,o],["Z"]]};var[i,a]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(Q(t).maybeAppend("marker",()=>new E({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());Q(t).maybeAppend("text","text").style("x",i).style("y",a).call(B,e)}),d2=t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),{color:i,text:a=""}=e,o={text:String(a),stroke:i,fill:i},[[e,a]]=t;return Q(new h2).call(B,r).style("x",e).style("y",a).call(B,o).call(B,s).node()}},p2=(d2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},ey(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;Q(t).maybeAppend("connect-path",()=>new F.Path({})).style("d",n).call(B,i),Q(t).maybeAppend("area-path",()=>new F.Path({})).style("d",e).call(B,r)}));const y2=t=>{const{curve:u,gradient:f=!1,defined:h=t=>!Number.isNaN(t)&&null!=t,connectNulls:d=!1}=t,p=K(t,["curve","gradient","defined","connectNulls"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=U1(n,r,i,a),r=n["fill"],i=K(n,["fill"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,s=(e=e,bu(s=c)?(e=e["transform"],`translate(${(s=s.getCenter())[0]}, ${s[1]}) `+(e||"")):""),e=f&&n?G1(n,r,o,f):a;const l=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:e,fill:e}),s&&{transform:s}),p);var[n,r]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,f=e[t],h=e[t+l];[...f,...h].some(t=>!n(t))?o=!0:(r.push(f),i.push(h),o&&s&&(o=!1,[c,u]=s,a.push([c,f,u,h])),s=[f,h])}return[r.concat(i),a]}(t,h),o=J(p,"connect"),a=!!r.length,i=t=>Q(new F.Path({})).style("d",t).call(B,l).node();return bu(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=d1().curve(p1),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return m1(a())},delete t.lineX0,t.lineEndAngle=function(){return m1(o())},delete t.lineX1,t.lineInnerRadius=function(){return m1(s())},delete t.lineY0,t.lineOuterRadius=function(){return m1(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(g1(t)):e()._curve},t.angle((t,e)=>R1(j1(r[e],n))).outerRadius((t,e)=>F1(r[e],n)).innerRadius((t,e)=>F1(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(h)).curve(u)(i);var e,a,o,s,l},!a||d&&!Object.keys(o).length?i(e(n)):a&&!d?i(e(t)):Q(new p2).style("areaStyle",l).style("connectStyle",Object.assign(Object.assign({},o),p)).style("areaPath",e(t)).style("connectPath",r.map(e).join("")).node()):(s=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return d1().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(h)).curve(u)(n)},!a||d&&!Object.keys(o).length?i(s(n)):a&&!d?i(s(t)):Q(new p2).style("areaStyle",l).style("connectStyle",Object.assign(Object.assign({},o),p)).style("areaPath",s(t)).style("connectPath",r.map(s).join("")).node())}},g2=(y2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=bu(n)?A1:c1;return y2(Object.assign({curve:i},a))(t,e,n,r)}),m2=(g2.props=Object.assign({},y2.props),t=>{const{alpha:a=.5}=t,o=K(t,["alpha"]);return(t,e,n,r)=>{var i=bu(n)?S1:O1;return y2(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),v2=(m2.props=Object.assign({},y2.props),i=>(t,e,n,r)=>y2(Object.assign({curve:N1},i))(t,e,n,r)),b2=(v2.props=Object.assign({},y2.props),t=>{const l=t["arrowSize"],c=K(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=U1(r,a,o,s),a=r["stroke"],o=K(r,["stroke"]),{color:s=a,transform:r}=e,[e,a]=t,t=z0();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=H1(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),Q(new F.Path).call(B,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(B,c).node()}}),x2=(b2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),i=r["stroke"],a=K(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=z0();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),Q(new F.Path).call(B,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(B,s).node()}});x2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const w2=t=>{const{cornerRatio:u=1/3}=t,f=K(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=U1(r,o,s,l),o=r["stroke"],s=K(r,["stroke"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=z0(),bu(o)?(i=F1(t,c=o.getCenter()),i=(F1(e,c)-i)*n+i,a.moveTo(t[0],t[1]),V1(a,t,e,c,i)):vu(o)?(a.moveTo(t[0],t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(a.moveTo(t[0],t[1]),a.lineTo(t[0],t[1]+(e[1]-t[1])*n),a.lineTo(e[0],t[1]+(e[1]-t[1])*n)),a.lineTo(e[0],e[1]),a);return Q(new F.Path).call(B,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(B,f).node()}},M2=(w2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),i=r["stroke"],a=K(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=z0();return t.moveTo(e[0],e[1]),bu(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):V1(t,e,i,D1(e,i),F1(e,i)/2),Q(new F.Path).call(B,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(B,s).node()}}),k2=(M2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),i=r["stroke"],a=K(r,["stroke"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return Q(new F.Image).call(B,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(B,u).node()}});k2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const O2=t=>{const l=K(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=U1(r,e,i,a),{fill:e,stroke:i}=r,a=K(r,["fill","stroke"]),r=function(i,t){const a=z0();if(bu(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>F1(t,o));return t.forEach((t,e)=>{var n,r;0===e?a.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?V1(a,r,t,o,n):a.lineTo(t[0],t[1]))}),a.closePath(),a}return n=a,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return Q(new F.Path).call(B,a).style("d",r.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(B,l).node()}};O2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const _2=t=>{const l=K(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=U1(r,e,i,a),{fill:e,stroke:i}=r,a=K(r,["fill","stroke"]),r=function(t,e){var n,[t,r,i,a]=t,o=z0();return bu(e)?(n=F1(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),V1(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),V1(o,r,t,e,n),o.closePath()):(o.moveTo(t[0],t[1]),o.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(t[0],t[1]),o.closePath()),o}(t,n);return Q(new F.Path).call(B,a).style("d",r.toString()).style("fill",o||e).style("stroke",o||i).style("transform",s).call(B,l).node()}};_2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const S2=t=>{const g=K(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:f,defaultShape:h,color:d,transform:p}=e,r=U1(r,e,f,h),{fill:e,stroke:f}=r,h=K(r,["fill","stroke"]),y=(r=t,t=n,n=z0(),bu(t)?([i,a]=t=t.getCenter(),o=I1(j1(r[0],t)),s=I1(j1(r[1],t)),y=F1(t,r[2]),l=F1(t,r[3]),c=F1(t,r[8]),u=F1(t,r[10]),t=F1(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,y,o,s),n.arc(i,a,y,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return Q(new F.Path).call(B,h).style("d",y.toString()).style("stroke",f).style("fill",d||e).style("transform",p).call(B,g).node()}};S2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const E2=t=>{const s=K(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),{stroke:i,lineWidth:a}=r,o=K(r,["stroke","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,bu(t=n)?(t=t.getCenter(),o1()({startAngle:0,endAngle:2*Math.PI,outerRadius:F1(a[0],t),innerRadius:F1(a[1],t)})):h1().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,bu(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return Q(new F.Path({})).call(B,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(B,s).node()}};function A2(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}E2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const P2=ey(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=K(e,["points","class","endMarker","direction"]),i=J(e,"endMarker"),n=(n=n,h1().x(t=>t[0]).y(t=>t[1])(n));Q(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new E({className:"marker",style:Object.assign(Object.assign({},i),{symbol:A2})}):null).call(B,e)});const N2=t=>{const{offset:s=0,connectLength1:l}=t,c=K(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=U1(r,i,a,o),{fill:i,stroke:a=i,connectLength1:o=l}=r,i=K(r,["fill","stroke","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(vu(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,o);return Q(new P2).call(B,i).style("points",n).style("stroke",r||a).style("transform",e).call(B,c).node()}};function T2(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=df(a.x,c),i=df(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function L2(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:f}=Y1(e,i,[t,n]),h="inside"===r?(u+f)/2:f;e=j2(h,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?C2(s,h,n):D1(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function C2(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function j2(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function F2(r,t,e,n){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,connector:l=!0,connectorLength2:c=0,connectorDistance:u=0,radius:f=.5,offset:h=0}=e,d=Y1(n,t,[i,a]);var{startAngle:e,endAngle:t}=d;const p=n.getCenter(),y=(e+t)/2;var[e,t]=(()=>{var t="inside"===r?f:1,{innerRadius:e,outerRadius:n}=d,n=e+(n-e)*t;return[n,n+h]})();const g=0<Math.sin(y)?1:-1;var[e,t,...m]=((t,e)=>{var[t,n]=C2(p,y,t),[e,r]=C2(p,y,e),i=l?g*c:0;return[[t,n],[e+i,r],[-i,0]]})(e,t),m={connector:l,connectorPoints:m,dx:l?+u*g:0},v=(t,e="x",n="y")=>({[e]:t[0],[n]:t[1]});return Object.assign(Object.assign(Object.assign(Object.assign({},v(e,"x0","y0")),v(t)),(e=r,v=0<g||xu(n),t=j2(y,o,s),"inside"===e?{textAlign:"center",textBaseline:"middle",rotate:t}:{textAlign:v?"start":"end",textBaseline:"middle",rotate:t})),m)}function I2(t,e,n,r){var i=n["bounds"];return 1===i.length?([i]=i=(i=n).bounds,{x:i[0],y:i[1]}):(xu(r)?L2:Ou(r)?F2:T2)(t,e,n,r)}N2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var R2=Object.freeze({__proto__:null,top:I2,bottom:I2,right:I2,left:I2,topLeft:I2,topRight:I2,bottomLeft:I2,bottomRight:I2,inside:I2,outside:I2,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=lu(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=I1(j1(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l}deg)`,textAlign:"center",textBaseline:"middle"}}});function B2(t,e,n,r){var i=e["position"],i=(a=n,void 0!==(i=i)?i:Ou(a)?"inside":vu(a)?"right":"top"),a=r["inside"===i?"innerLabel":"label"],r=Object.assign({},a,e),e=R2[i.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},a),e(i,t,r,n));throw new Error("Unknown position: "+i)}const D2=t=>(t,e,n,r)=>{var i=e["text"],a=K(e,["text","x","y"]),t=B2(t,e,n,r),{rotate:e=0,transform:r=""}=t,t=K(t,["rotate","transform"]);return Q(new u2).call(B,t).style("text",""+i).style("transform",r+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(B,a).node()},z2=(D2.props={},t=>{const s=t["colorAttribute"],l=K(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=K(U1(r,i,a,o),["stroke"]),{d:i,color:a}=e;return Q(new F.Path).call(B,r).style("d",i).style(s,a).call(B,l).node()}}),W2=(z2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>z2(Object.assign({colorAttribute:"fill"},t))),H2=(W2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>z2(Object.assign({fill:"none",colorAttribute:"stroke"},t))),V2=(H2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=K(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),G2=(V2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"}),q2={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},Y2="#416180",U2=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:G2[100],enter:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:Y2,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:Y2,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:Y2,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:Y2,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:Y2,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:Y2,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:Y2,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:Y2,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:Y2,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:G2[100]}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:G2[65],titleFillOpacity:1,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:G2[25],lineStrokeOpacity:.45,lineLineWidth:.5,tickLineStroke:G2[25],tickLineLineWidth:1,tickLineLength:4,labelFill:G2[45],labelFillOpacity:1,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:G2[15],gridStrokeOpacity:1,gridLineWidth:.5,gridLineDash:[0,0]},legend:{padding:8,showTitle:!1,titleFill:G2[45],titleFontSize:12,titleLineHeight:21,titleFontWeight:"normal",titleSpacing:4,markerFill:e,markerSpacing:8,markerSize:4,itemLabelFill:G2[65],itemLabelFillOpacity:1,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:G2[65],itemValueFillOpacity:.85,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:G2[100],navButtonFillOpacity:1,navPageNumFill:G2[45],navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:G2[45],labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:G2[6],handleMarkerStroke:G2[25],handleMarkerLineWidth:1,handleLabelFill:G2[45],handleLabelFontSize:12,handleLabelLineHeight:12,handleLabelFontWeight:"normal"},label:{fill:G2[100],fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:Y2,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:q2[100],fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railHeight:16,railFill:Y2,railFillOpacity:.05,railForegroundFill:e,railForegroundFillOpacity:.15,handleHeight:24,handleWidth:10,handleFill:"#f7f7f7",handleFillOpacity:1,handleStroke:G2[25],handleStrokeOpacity:1,handleLineWidth:1,handleRadius:2,textFill:G2[100],textFillOpacity:.45,textFontSize:12,textFontWeight:"normal"},scrollbar:{},title:{fill:G2[85],fillOpacity:1,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:G2[65],fillOpacity:1,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)},X2=(U2.props={},{100:"#000",95:"#0D0D0D",85:"#262626",65:"#595959",45:"#8C8C8C",25:"#BFBFBF",15:"#D9D9D9",6:"#F0F0F0"}),$2={100:"#FFFFFF",95:"#F2F2F2",85:"#D9D9D9",65:"#A6A6A6",45:"#737373",25:"#404040",15:"#262626",6:"#0F0F0F"},Z2="#F9FBFD",K2=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:$2[100],enter:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:$2[65],fontSize:12,connectorStroke:Z2,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:Z2,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:Z2,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:Z2,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:Z2,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:Z2,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:Z2,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:Z2,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:Z2,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:$2[100]}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:$2[65],titleFillOpacity:1,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:$2[25],lineStrokeOpacity:.45,lineLineWidth:.5,tickLineStroke:$2[25],tickLineLineWidth:1,tickLineLength:4,labelFill:$2[45],labelFillOpacity:1,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:$2[15],gridStrokeOpacity:1,gridLineWidth:.5,gridLineDash:[0,0]},legend:{padding:8,showTitle:!1,titleFill:$2[45],titleFontSize:12,titleLineHeight:21,titleFontWeight:"normal",titleSpacing:4,markerFill:e,markerSpacing:8,markerSize:4,itemLabelFill:$2[65],itemLabelFillOpacity:1,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:$2[65],itemValueFillOpacity:.85,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:$2[100],navButtonFillOpacity:1,navPageNumFill:$2[45],navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:$2[45],labelFontSize:12,labelLineHeight:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:$2[6],handleMarkerStroke:$2[25],handleMarkerLineWidth:1,handleLabelFill:$2[45],handleLabelFontSize:12,handleLabelLineHeight:12,handleLabelFontWeight:"normal"},label:{fill:$2[100],fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:Z2,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:X2[100],fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railHeight:16,railFill:Z2,railFillOpacity:.05,railForegroundFill:e,railForegroundFillOpacity:.15,handleHeight:24,handleWidth:10,handleFill:"#f7f7f7",handleFillOpacity:1,handleStroke:$2[25],handleStrokeOpacity:1,handleLineWidth:1,handleRadius:2,textFill:$2[100],textFillOpacity:.45,textFontSize:12,textFontWeight:"normal"},scrollbar:{},title:{fill:$2[85],fillOpacity:1,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:$2[65],fillOpacity:1,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)};function J2(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}K2.props={};var Q2,tx=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ex(t){var e;if(e=tx.exec(t))return new nx({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function nx(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function rx(t,e){var n,e=J2(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}ex.prototype=nx.prototype,nx.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ix={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>rx(100*t,e),r:rx,s:function(t,e){var n,r,i=J2(t,e);return i?(n=i[0],(i=(i=i[1])-(Q2=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+J2(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function ax(t){return t}var ox,sx,lx=Array.prototype.map,cx=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ux(t){var e,s,l,M=void 0===t.grouping||void 0===t.thousands?ax:(s=lx.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",k=void 0===t.decimal?".":t.decimal+"",O=void 0===t.numerals?ax:(e=lx.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",_=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=ex(t)).fill,u=t.align,f=t.sign,e=t.symbol,h=t.zero,d=t.width,p=t.comma,y=t.precision,g=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):ix[m]||(void 0===y&&(y=12),g=!0,m="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?a:"",x=ix[m],w=/[defgprs%]/.test(m);function n(t){var e,n,r,i=v,a=b;if("c"===m)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),y),g&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((o=o&&0==+t&&"+"!==f?!1:o)?"("===f?f:_:"-"===f||"("===f?"":f)+i,a=("s"===m?cx[8+Q2/3]:"")+a+(o&&"("===f?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?k+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!h&&(t=M(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&h&&(t=M(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return O(t)}return y=void 0===y?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),n.toString=function(){return t+""},n}return{format:o,formatPrefix:function(t,e){var n=o(((t=ex(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=J2(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=cx[8+e/3];return function(t){return n(r*t)+i}}}}function fx(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function hx(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=Wc(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,f=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new Zp({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),h=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return ku(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new Zp({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new Zp({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return bu(s)||vu(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=f(a.map(t)+i);return{value:vu(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,text:u(t,e,n)}}),xu(s)&&"arcY"===o?i.map(({value:t,text:e})=>({value:1-t,text:e})):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:h(f(a.map(t)+r)),text:""+u("number"!=typeof(r=t)||Math.abs(r)<1e-15?r:parseFloat(r.toFixed(15)),e,n)}})}function dx(t,e,n,r,i){var a;return bu(a=n)&&vu(a)||Mu(n)?[]:t.map(t=>{t=function(t,e,n,r,i){var[r,a]=r,[i,o]=i,[n,s]=fx(n);let l,c,u,f;return"bottom"===e||"top"===e?(l=c=r+(i-r)*t,u=a,f="bottom"===e?a-s:a+s):(u=f=a+(o-a)*t,l=r,c="left"===e?r+n:r-n),[[l,u],[c,f]]}(t.value,e,n,r,i);return{points:bu(n)?[t[0]]:t}})}ua=ux({thousands:",",grouping:[3],currency:["$",""]}),ox=ua.format,ua.formatPrefix;const px=t=>{const{position:u,labelFormatter:f=t=>""+t,tickFilter:h,tickCount:d,tickMethod:p}=t,y=K(t,["position","labelFormatter","tickFilter","tickCount","tickMethod"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{x:i,y:a,width:o,height:s}=i,i=[i+o/2,a+s/2],a=hx(t,e,d,f,h,p,u,n),t=Math.min(o,s)/2,[e,o]=function(t){var[,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[180*+t/Math.PI,180*+e/Math.PI]}(n),[s,l]=function(t){var[,,,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[+t,+e]}(n),{grid:c=!1}=y,c=c?function(t,e,n,r,i,a,o){const[s,l]=e;var[e,o]=fx(o),e=Math.min(e,o)/2;const c=i*e,u=a*e;return t.map(({value:t})=>{var t=(r-n)*t+n,e=Math.cos(t*Math.PI/180),t=Math.sin(t*Math.PI/180);return{points:[[s+c*e,l+c*t],[s+u*e,l+u*t]]}})}(a,i,e,o,s,l,n):[];return new rv({style:I({},{center:i,radius:t,startAngle:e,endAngle:o,ticks:a,verticalFactor:"arc"===u?1:-1,axisLine:{style:Object.assign({lineWidth:0,strokeOpacity:0},J(y,"line"))},grid:{items:c,lineStyle:Object.assign({stroke:"#1b1e23",strokeOpacity:.1,lineDash:[0,0]},J(y,"grid"))},tickLine:{len:4,style:Object.assign({lineWidth:1,stroke:"#BFBFBF"},J(y,"tick"))},label:{align:"arcInner"===u?"radial":"tangential",tickPadding:2,style:J(y,"label")}})})}},yx=v=>{const{position:b,title:x,labelFormatter:w=t=>""+t,direction:M="left",tickCount:k,tickFilter:O,tickMethod:_,titleAnchor:S}=v,E=K(v,["position","title","labelFormatter","direction","tickCount","tickFilter","tickMethod","titleAnchor"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{startPos:a,endPos:o,labelOffset:s,titlePosition:l,titlePadding:c,titleRotate:u,verticalFactor:f,titleOffsetY:h,labelAlign:d,axisLine:p,label:y=void 0===v.label||v.label,tickLine:g=void 0===v.tickLine||v.tickLine}=function(t,e,n){var{x:n,y:r,width:i,height:a}=n;return"bottom"===t?{startPos:[n,r],endPos:[n+i,r],labelOffset:8,titlePosition:"end",titlePadding:2,titleRotate:0,verticalFactor:1}:"left"===t||"centerHorizontal"===t?{startPos:[n+i,r],endPos:[n+i,r+a],titlePosition:"center",titlePadding:6,titleRotate:-90,labelAlign:"end",labelOffset:4,verticalFactor:-1}:"right"===t?{startPos:[n,r],endPos:[n,r+a],titlePosition:"center",titlePadding:16,titleRotate:-90,labelAlign:"start",labelOffset:4,verticalFactor:1}:"arcY"===t?{startPos:[n,r],endPos:[n+i,r+a],titlePosition:"start",titlePadding:4,titleOffsetY:-5,titleRotate:0,labelOffset:"left"===e?4:"right"===e?-4:0,verticalFactor:-1,labelAlign:"center"===e?"center":"right"===e?"start":void 0,axisLine:!1}:{startPos:[n,r+a],endPos:[n+i,r+a],titlePosition:"end",titlePadding:2,titleRotate:0,labelOffset:4,verticalFactor:-1}}(b,M,i),e=hx(t,e,k,w,O,_,b,n),l="arcY"===b||t.getTicks?l:"center",[,m]=n.getCenter(),{grid:t=!!t.getTicks}=E,t=t?dx(e,b,n,a,o):[],n=J(E,"line");return new Um({style:I(Object.assign({startPos:a,endPos:o,verticalFactor:f,ticks:e,label:y?Object.assign(Object.assign({tickPadding:s,autoHide:!1,autoRotate:!0},J(E,"label")),{style:Object.assign(Object.assign({},d&&{textAlign:d}),J(E,"label"))}):null,axisLine:p||Object.keys(n).length?{stroke:"#BFBFBF",style:n}:null,grid:Object.assign({items:t,lineStyle:Object.assign({stroke:"#1b1e23",strokeOpacity:.05,lineDash:[0,0]},J(E,"grid"))},"arcY"===b&&{type:"circle",center:[i.x,m+i.y],closed:!0}),tickLine:g?{len:4,style:Object.assign({lineWidth:1,stroke:"#BFBFBF"},J(E,"tick"))}:null},x&&{title:{content:(a=x,Array.isArray(a)?a.join(", "):""+a),titleAnchor:S||l,style:Object.assign({fontWeight:"bold",fillOpacity:1,dy:h,textAnchor:l},J(E,"title")),titlePadding:c,rotate:u}}))})}},gx=t=>{const{position:i,labelFormatter:e=t=>""+t}=t;var n="string"==typeof e?ox(e):e;const a=Object.assign(Object.assign({},t),{labelFormatter:n});return(t,e,n,r)=>("arc"===i||"arcInner"===i?px:yx)(a)(t,e,n,r)},mx=(gx.props={defaultPosition:"left",defaultSize:45,defaultOrder:0},t=>gx(t)),vx=(mx.props=Object.assign(Object.assign({},gx.props),{defaultPosition:"bottom"}),t=>gx(t)),bx=(vx.props=Object.assign(Object.assign({},gx.props),{defaultPosition:"left"}),t=>{const{position:c,labelFormatter:u=t=>""+t,dx:f=0,dy:h=0,title:d,cols:p=void 0,autoWrap:y=!1}=t,g=K(t,["position","labelFormatter","dx","dy","title","cols","autoWrap"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a,width:o,height:s}=i,t=t.map(t=>({id:t,name:u(t),color:e.map(t)})),l=y&&p?o/p:void 0,t=I({},Object.assign(Object.assign({items:t,x:i+f,y:a+h,orient:["right","left","arcCenter"].includes(c)?"vertical":"horizontal",maxWidth:o,maxHeight:s,autoWrap:y,maxItemWidth:l,itemWidth:l,spacing:[8,0],itemName:{style:{fontSize:12,fillOpacity:1,fill:"#000",fontWeight:"lighter",active:{fillOpacity:.8},inactive:{fill:"#d8d8d8"},unchecked:{fill:"#d8d8d8"}}}},d&&{title:{content:Array.isArray(d)?d[0]:d,style:{fontSize:12,fontWeight:"bold",fillOpacity:1}}}),{itemMarker:{size:8,symbol:"circle",style:{fillOpacity:1,inactive:{fillOpacity:.2},unchecked:{fill:"#d8d8d8",stroke:"#d8d8d8"}}},itemBackgroundStyle:{fill:"transparent"}}),Object.assign({},g));return new nb({className:"category-legend",style:t})}}),xx=(bx.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},t=>{const c=t["title"];return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a}=i,o=(null==(o=e.getTicks)?void 0:o.call(e))||[],[s,l]=t;return new Mb({style:Object.assign(Object.assign({x:i,y:a,rail:{length:120,size:12,ticks:o},min:s,max:l,indicator:null,handle:null},c&&{title:{content:Array.isArray(c)?c[0]:c,style:{fontSize:12}}}),{color:t.map(t=>e.map(t))})})}});function wx(t,e,n){return t.querySelector(e)?Q(t).select(e):Q(t).append(n)}xx.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};sx={render(t,e){const{text:n,style:r,subtitle:i,subtitleStyle:a}=t;t=wx(e,".title","text").attr("className","title").style("fontSize",14).style("textBaseline","top").style("text",n).call(B,r||{}).node().getLocalBounds();wx(e,".sub-title","text").attr("className","sub-title").style("y",t.max[1]+((null===a||void 0===a?void 0:a.spacing)||0)).style("fontSize",12).style("textBaseline","top").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign({text:i},a))})}};const Mx=class extends F.CustomElement{constructor(t){super(t),this.descriptor=sx}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(I({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},kx=t=>{const{text:a,style:o,subtitle:s,subtitleStyle:l}=t;return(t,e,n,r)=>{var{x:e,y:i}=e.bbox;return new Mx({style:I({},{style:r.title,subtitleStyle:r.subtitle},{x:e,y:i,style:o,text:a,subtitle:s,subtitleStyle:l})})}};kx.props={defaultPosition:"top",defaultOrder:2,defaultSize:30};class Ox{constructor(t){this.$value=t}static of(t){return new Ox(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function _x(t,e,n){return Ox.of({}).call(Sx,t).call(Sx,e).call(Sx,n).value()}function Sx(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function Ex(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const Ax=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],Px=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=vu(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,_x(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},Nx=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=vu(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,_x(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},Tx=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=vu(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,_x(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},Lx=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=vu(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,_x(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},Cx=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],_x(i,n,l))},jx=(Cx.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],_x(i,n,l))});function Fx(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function Ix(t,e){var[n,r,i,t]=Fx(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),f=i/u;for(let t=0;t<u;t++){var h=n+t*f,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@antv/g"),require("@antv/g-canvas")):"function"==typeof define&&define.amd?define(["exports","@antv/g","@antv/g-canvas"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={},t.window.G,t.window.G.Canvas2D)}(this,function(y,F,N){"use strict";const L="main-layer",tt="label-layer",et="element",C="view",nt="plot",rt="component",it="label",at="area";var j=1e-6,B="undefined"!=typeof Float32Array?Float32Array:Array;function D(){var t=new B(9);return B!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var z=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],f=n[0],h=n[1],d=n[2],p=n[3],g=n[4],y=n[5],m=n[6],v=n[7],n=n[8];return t[0]=f*r+h*o+d*c,t[1]=f*i+h*s+d*u,t[2]=f*a+h*l+d*e,t[3]=p*r+g*o+y*c,t[4]=p*i+g*s+y*u,t[5]=p*a+g*l+y*e,t[6]=m*r+v*o+n*c,t[7]=m*i+v*s+n*u,t[8]=m*a+v*l+n*e,t};function G(){var t=new B(16);return B!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}function W(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function H(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=f,t[11]=h,t[12]=d,t[13]=p,t[14]=g,t[15]=y,t}function V(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function q(t,e){var n,r,i,a,o,s;return t===e?(n=e[1],r=e[2],i=e[3],a=e[6],o=e[7],s=e[11],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s):(t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]),t}function Y(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15],m=n*s-r*o,v=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,k=i*c-a*l,M=u*g-f*p,O=u*y-h*p,_=u*e-d*p,S=f*y-h*g,E=f*e-d*g,A=h*e-d*y,T=m*A-v*E+b*S+x*_-w*O+k*M;return T?(t[0]=(s*A-l*E+c*S)*(T=1/T),t[1]=(i*E-r*A-a*S)*T,t[2]=(g*k-y*w+e*x)*T,t[3]=(h*w-f*k-d*x)*T,t[4]=(l*_-o*A-c*O)*T,t[5]=(n*A-i*_+a*O)*T,t[6]=(y*b-p*k-e*v)*T,t[7]=(u*k-h*b+d*v)*T,t[8]=(o*E-s*_+c*M)*T,t[9]=(r*_-n*E-a*M)*T,t[10]=(p*w-g*b+e*m)*T,t[11]=(f*b-u*w-d*m)*T,t[12]=(s*O-o*S-l*M)*T,t[13]=(n*S-r*O+i*M)*T,t[14]=(g*v-p*x-y*m)*T,t[15]=(u*x-f*v+h*m)*T,t):null}function U(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];return(e*o-n*a)*(f*t-h*g)-(e*s-r*a)*(u*t-h*p)+(e*l-i*a)*(u*g-f*p)+(n*s-r*o)*(c*t-h*d)-(n*l-i*o)*(c*g-f*d)+(r*l-i*s)*(c*p-u*d)}function X(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],g=e[12],y=e[13],m=e[14],e=e[15],v=n[0],b=n[1],x=n[2],w=n[3];return t[0]=v*r+b*s+x*f+w*g,t[1]=v*i+b*l+x*h+w*y,t[2]=v*a+b*c+x*d+w*m,t[3]=v*o+b*u+x*p+w*e,v=n[4],b=n[5],x=n[6],w=n[7],t[4]=v*r+b*s+x*f+w*g,t[5]=v*i+b*l+x*h+w*y,t[6]=v*a+b*c+x*d+w*m,t[7]=v*o+b*u+x*p+w*e,v=n[8],b=n[9],x=n[10],w=n[11],t[8]=v*r+b*s+x*f+w*g,t[9]=v*i+b*l+x*h+w*y,t[10]=v*a+b*c+x*d+w*m,t[11]=v*o+b*u+x*p+w*e,v=n[12],b=n[13],x=n[14],w=n[15],t[12]=v*r+b*s+x*f+w*g,t[13]=v*i+b*l+x*h+w*y,t[14]=v*a+b*c+x*d+w*m,t[15]=v*o+b*u+x*p+w*e,t}function K(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,g=n[0],y=n[1],n=n[2];return e===t?(t[12]=e[0]*g+e[4]*y+e[8]*n+e[12],t[13]=e[1]*g+e[5]*y+e[9]*n+e[13],t[14]=e[2]*g+e[6]*y+e[10]*n+e[14],t[15]=e[3]*g+e[7]*y+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=a,t[3]=o,t[4]=s,t[5]=l,t[6]=c,t[7]=u,t[8]=f,t[9]=h,t[10]=d,t[11]=p,t[12]=r*g+s*y+f*n+e[12],t[13]=i*g+l*y+h*n+e[13],t[14]=a*g+c*y+d*n+e[14],t[15]=o*g+u*y+p*n+e[15]),t}function $(t,e,n){var r=n[0],i=n[1],n=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function ot(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=i*n+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+f*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=f*n-s*r,t}function st(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-f*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+f*n,t}function lt(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function ct(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,f=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(f+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(c+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function ut(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function ft(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function ht(t,e){var n=new B(3),r=(ft(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,f=0;return 0<n?(f=2*Math.sqrt(1+n),t[3]=.25*f,t[0]=(u-i)/f,t[1]=(r-s)/f,t[2]=(o-l)/f):c<a&&e<a?(f=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/f,t[0]=.25*f,t[1]=(o+l)/f,t[2]=(r+s)/f):e<c?(f=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/f,t[0]=(o+l)/f,t[1]=.25*f,t[2]=(u+i)/f):(f=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/f,t[0]=(r+s)/f,t[1]=(u+i)/f,t[2]=.25*f),t}function dt(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],l=a+a,c=o+o,u=s+s,f=a*l,h=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],g=i[0],y=i[1],i=i[2],m=(1-(d+s))*u,v=(h+e)*u,u=(a-c)*u,h=(h-e)*p,e=(1-(f+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(f+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=h,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=c,t[11]=0,t[12]=n[0]+g-(m*g+h*y+p*i),t[13]=n[1]+y-(v*g+e*y+a*i),t[14]=n[2]+i-(u*g+s*y+c*i),t[15]=1,t}function pt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function gt(t,e,n,r,i){e=1/Math.tan(e/2);return t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=(i+r)*(n=1/(r-i)),t[14]=2*i*r*n):(t[10]=-1,t[14]=-2*r),t}function yt(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var mt=yt;function vt(t,e,n,r){var i,a,o,s,l=e[0],c=e[1],e=e[2],u=r[0],f=r[1],r=r[2],h=n[0],d=n[1],n=n[2];return Math.abs(l-h)<j&&Math.abs(c-d)<j&&Math.abs(e-n)<j?V(t):(h=l-h,d=c-d,n=e-n,i=f*(n*=s=1/Math.hypot(h,d,n))-r*(d*=s),r=r*(h*=s)-u*n,u=u*d-f*h,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,f=d*u-n*r,a=n*i-h*u,o=h*r-d*i,(s=Math.hypot(f,a,o))?(f*=s=1/s,a*=s,o*=s):o=a=f=0,t[0]=i,t[1]=f,t[2]=h,t[3]=0,t[4]=r,t[5]=a,t[6]=d,t[7]=0,t[8]=u,t[9]=o,t[10]=n,t[11]=0,t[12]=-(i*l+r*c+u*e),t[13]=-(f*l+a*c+o*e),t[14]=-(h*l+d*c+n*e),t[15]=1,t)}function bt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}var xt=Object.freeze({__proto__:null,create:G,clone:function(t){var e=new B(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},copy:W,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g){var y=new B(16);return y[0]=t,y[1]=e,y[2]=n,y[3]=r,y[4]=i,y[5]=a,y[6]=o,y[7]=s,y[8]=l,y[9]=c,y[10]=u,y[11]=f,y[12]=h,y[13]=d,y[14]=p,y[15]=g,y},set:H,identity:V,transpose:q,invert:Y,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],f=e[9],h=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15];return t[0]=s*(h*e-d*y)-f*(l*e-c*y)+g*(l*d-c*h),t[1]=-(r*(h*e-d*y)-f*(i*e-a*y)+g*(i*d-a*h)),t[2]=r*(l*e-c*y)-s*(i*e-a*y)+g*(i*c-a*l),t[3]=-(r*(l*d-c*h)-s*(i*d-a*h)+f*(i*c-a*l)),t[4]=-(o*(h*e-d*y)-u*(l*e-c*y)+p*(l*d-c*h)),t[5]=n*(h*e-d*y)-u*(i*e-a*y)+p*(i*d-a*h),t[6]=-(n*(l*e-c*y)-o*(i*e-a*y)+p*(i*c-a*l)),t[7]=n*(l*d-c*h)-o*(i*d-a*h)+u*(i*c-a*l),t[8]=o*(f*e-d*g)-u*(s*e-c*g)+p*(s*d-c*f),t[9]=-(n*(f*e-d*g)-u*(r*e-a*g)+p*(r*d-a*f)),t[10]=n*(s*e-c*g)-o*(r*e-a*g)+p*(r*c-a*s),t[11]=-(n*(s*d-c*f)-o*(r*d-a*f)+u*(r*c-a*s)),t[12]=-(o*(f*y-h*g)-u*(s*y-l*g)+p*(s*h-l*f)),t[13]=n*(f*y-h*g)-u*(r*y-i*g)+p*(r*h-i*f),t[14]=-(n*(s*y-l*g)-o*(r*y-i*g)+p*(r*l-i*s)),t[15]=n*(s*h-l*f)-o*(r*h-i*f)+u*(r*l-i*s),t},determinant:U,multiply:X,translate:K,scale:$,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,f,h,d,p,g,y,m,v,b,x,w,k,M,O=r[0],_=r[1],r=r[2],S=Math.hypot(O,_,r);return S<j?null:(O*=S=1/S,_*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],l=e[3],c=e[4],u=e[5],f=e[6],h=e[7],d=e[8],p=e[9],g=e[10],y=e[11],v=O*_*(i=1-n)-r*S,b=_*_*i+n,x=r*_*i+O*S,w=O*r*i+_*S,k=_*r*i-O*S,M=r*r*i+n,t[0]=a*(n=O*O*i+n)+c*(m=_*O*i+r*S)+d*(r=r*O*i-_*S),t[1]=o*n+u*m+p*r,t[2]=s*n+f*m+g*r,t[3]=l*n+h*m+y*r,t[4]=a*v+c*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+f*b+g*x,t[7]=l*v+h*b+y*x,t[8]=a*w+c*k+d*M,t[9]=o*w+u*k+p*M,t[10]=s*w+f*k+g*M,t[11]=l*w+h*k+y*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:ot,rotateY:st,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=i*n+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+f*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=f*n-s*r,t},fromTranslation:lt,fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<j?null:(i*=o=1/o,a*=o,n*=o,o=Math.sin(e),e=Math.cos(e),t[0]=i*i*(r=1-e)+e,t[1]=a*i*r+n*o,t[2]=n*i*r-a*o,t[3]=0,t[4]=i*a*r-n*o,t[5]=a*a*r+e,t[6]=n*a*r+i*o,t[7]=0,t[8]=i*n*r+a*o,t[9]=a*n*r-i*o,t[10]=n*n*r+e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},fromXRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromYRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=e,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){var n=Math.sin(e),e=Math.cos(e);return t[0]=e,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromRotationTranslation:ct,fromQuat2:function(t,e){var n=new B(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=r*r+i*i+a*a+o*o;return 0<f?(n[0]=2*(s*o+u*r+l*a-c*i)/f,n[1]=2*(l*o+u*i+c*r-s*a)/f,n[2]=2*(c*o+u*a+s*i-l*r)/f):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),ct(t,e,n),t},getTranslation:ut,getScaling:ft,getRotation:ht,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(f=a+a),i=i*(h=o+o),c=a*f,a=a*h,o=o*h,u=e*u,f=e*f,e=e*h,h=r[0],d=r[1],r=r[2];return t[0]=(1-(c+o))*h,t[1]=(l+e)*h,t[2]=(i-f)*h,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+f)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:dt,fromQuat:pt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:gt,perspective:gt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:yt,ortho:mt,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:vt,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,f=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=f*f+(r=r*l-o*n)*r+(o=o*c-s*l)*o)&&(f*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=f,t[1]=r,t[2]=o,t[3]=0,t[4]=c*o-n*r,t[5]=n*f-l*o,t[6]=l*r-c*f,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:bt,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],f=t[9],h=t[10],d=t[11],p=t[12],g=t[13],y=t[14],t=t[15],m=e[0],v=e[1],b=e[2],x=e[3],w=e[4],k=e[5],M=e[6],O=e[7],_=e[8],S=e[9],E=e[10],A=e[11],T=e[12],P=e[13],N=e[14],e=e[15];return Math.abs(n-m)<=j*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=j*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=j*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=j*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=j*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-k)<=j*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(l-M)<=j*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-O)<=j*Math.max(1,Math.abs(c),Math.abs(O))&&Math.abs(u-_)<=j*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(f-S)<=j*Math.max(1,Math.abs(f),Math.abs(S))&&Math.abs(h-E)<=j*Math.max(1,Math.abs(h),Math.abs(E))&&Math.abs(d-A)<=j*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-T)<=j*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(g-P)<=j*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(y-N)<=j*Math.max(1,Math.abs(y),Math.abs(N))&&Math.abs(t-e)<=j*Math.max(1,Math.abs(t),Math.abs(e))},mul:X,sub:bt});function m(){var t=new B(3);return B!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function wt(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function b(t,e,n){var r=new B(3);return r[0]=t,r[1]=e,r[2]=n,r}function kt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Mt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Ot(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function _t(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function St(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Et(t,e){var n=e[0],r=e[1],i=e[2],n=n*n+r*r+i*i;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function At(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Tt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[0],o=n[1],n=n[2];t[0]=i*n-e*o,t[1]=e*a-r*n,t[2]=r*o-i*a}function Pt(t,e,n){var r=e[0],i=e[1],e=e[2],a=n[3]*r+n[7]*i+n[11]*e+n[15];return t[0]=(n[0]*r+n[4]*i+n[8]*e+n[12])/(a=a||1),t[1]=(n[1]*r+n[5]*i+n[9]*e+n[13])/a,t[2]=(n[2]*r+n[6]*i+n[10]*e+n[14])/a,t}function Nt(t,e,n){var r=e[0],i=e[1],e=e[2];t[0]=r*n[0]+i*n[3]+e*n[6],t[1]=r*n[1]+i*n[4]+e*n[7],t[2]=r*n[2]+i*n[5]+e*n[8]}function Lt(t,e){var n=t[0],r=t[1],t=t[2],i=e[0],a=e[1],e=e[2];return Math.abs(n-i)<=j*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=j*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=j*Math.max(1,Math.abs(t),Math.abs(e))}var Ct=_t,jt=wt;function Ft(){var t=new B(4);return B!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function It(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*a+n[12]*e,t[1]=n[1]*r+n[5]*i+n[9]*a+n[13]*e,t[2]=n[2]*r+n[6]*i+n[10]*a+n[14]*e,t[3]=n[3]*r+n[7]*i+n[11]*a+n[15]*e,t}function Rt(){var t=new B(4);return B!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function Bt(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function Dt(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function zt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e,a=a?1/a:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=e*a,t}function Gt(t,e,n,r){var i=.5*Math.PI/180,i=(e*=i,n*=i,r*=i,Math.sin(e)),e=Math.cos(e),a=Math.sin(n),n=Math.cos(n),o=Math.sin(r),r=Math.cos(r);t[0]=i*n*r-e*a*o,t[1]=e*a*r+i*n*o,t[2]=e*n*o-i*a*r,t[3]=e*n*r+i*a*o}m(),Ft();var Wt=function(t,e,n,r){var i=new B(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},Ht=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},Vt=Dt,qt=function(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n*n+r*r+i*i+e*e;return 0<a&&(a=1/Math.sqrt(a)),t[0]=n*a,t[1]=r*a,t[2]=i*a,t[3]=e*a,t};function Yt(t,e){var n=new B(2);return n[0]=t,n[1]=e,n}function Ut(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function Xt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function Kt(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function $t(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Zt(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function Jt(t,e){var n=e[0],r=e[1],n=n*n+r*r;return 0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n,t}m(),b(1,0,0),b(0,1,0),Rt(),Rt(),D();var Qt=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function te(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}e=new B(2),B!=Float32Array&&(e[0]=0,e[1]=0);var ee=function(t,e){return(ee=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])}))(t,e)};function ne(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}ee(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function Z(t,e){var n={};for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function t(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}function re(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function ie(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,a=n.call(t),o=[];try{for(;(void 0===e||0<e--)&&!(r=a.next()).done;)o.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}function w(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function ae(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t===e&&r:e.has(t))return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t);throw new TypeError("Cannot read private member from an object whose class did not declare it")}var oe={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var se={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function le(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return se[e]===t.length-1&&"achlmqstvz".includes(e)})}function ce(t){return le(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function ue(t){return ce(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function fe(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=se[n]&&("m"===n&&2<r.length?(t.segments.push([e].concat(r.splice(0,2))),n="l",e="m"===e?"l":"L"):t.segments.push([e].concat(r.splice(0,se[n]))),se[n]););}function he(t){return 48<=t&&t<=57}function de(t){for(var e,n=t.pathValue,r=t.max;t.index<r&&(10===(e=n.charCodeAt(t.index))||13===e||8232===e||8233===e||32===e||9===e||11===e||12===e||160===e||5760<=e&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(e));)t.index+=1}function pe(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=se[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,de(t),t.data=[],u)for(;;){for(var f=u;0<f;--f){if(97!=(32|c)||3!==f&&4!==f?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(he(n=43!==(n=i.charCodeAt(o))&&45!==n?n:i.charCodeAt(o+=1))||46===n){if(46!==n){if(e=48===n,n=i.charCodeAt(o+=1),e&&o<r&&n&&he(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&he(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;he(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&he(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&he(i.charCodeAt(o));)o+=1}t.index=o,t.param=+t.pathValue.slice(a,o)}else t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" is not a number'}(t):(a=i=r=void 0,r=(n=t).index,i=n.pathValue,48===(a=i.charCodeAt(r))?(n.param=0,n.index+=1):49===a?(n.param=1,n.index+=1):n.err='[path-util]: invalid Arc flag "'+i[r]+'", expecting 0 or 1 at index '+r),t.err.length)return;t.data.push(t.param),de(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,de(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}fe(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var ge=function(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function ye(t){var o,s,l,c;return ce(t)?te(t):(t=function(t){if(le(t))return te(t);var e=new ge(t);for(de(e);e.index<e.max&&!e.err.length;)pe(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function me(t){if(ue(t))return te(t);for(var e,n,r,i,a,o,s,l=ye(t),c=v({},oe),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,s=o=h=a=f=i=r=void 0,r=e[0],i=n.x1,f=n.y1,a=n.x2,h=n.y2,o=e.slice(1).map(Number),s=e,"TQ".includes(r)||(n.qx=null,n.qy=null),"H"===r?s=["L",e[1],f]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*f-h,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(h=2*i-n.qx,a=2*f-n.qy,s=["Q",n.qx=h,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var f=l[u],h=f.length;c.x1=+f[h-2],c.y1=+f[h-1],c.x2=+f[h-4]||c.x1,c.y2=+f[h-3]||c.y1}return l}function ve(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function be(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function xe(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function we(t,e,n,r,i){var a=xe([t,e],[n,r]),o={x:0,y:0};return{length:a,point:o="number"==typeof i?i<=0?{x:t,y:e}:a<=i?{x:n,y:r}:{x:(i=be([t,e],[n,r],i/a))[0],y:i[1]}:o,min:{x:Math.min(t,n),y:Math.min(e,r)},max:{x:Math.max(t,n),y:Math.max(e,r)}}}function ke(t,e,n,r){var t=[t,e],e=[n,r],i=be(t,e,.5),e=be(e,i,.5),a=be(i,e,.5),o=be(e,a,.5),s=be(a,o,.5),t=we(t[0],t[1],i[0],i[1],a[0]).point,i=we(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Me(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],f=c[1],h=e.x1,d=e.y1,p=e.x,g=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=f,t;case"A":return s=[h,d].concat(c),["C"].concat(function t(e,n,r,i,a,o,s,l,c,u){var f=120*Math.PI/180,h=Math.PI/180*(+a||0),d=[],p=(u?(x=u[0],w=u[1],v=u[2],b=u[3]):(e=(y=ve(e,n,-h)).x,n=y.y,1<(p=(g=(e-(l=(y=ve(l,c,-h)).x))/2)*g/(r*r)+(y=(n-(c=y.y))/2)*y/(i*i))&&(r*=p=Math.sqrt(p),i*=p),p=r*r,m=i*i,v=(o=(o===s?-1:1)*Math.sqrt(Math.abs((p*m-p*y*y-m*g*g)/(p*y*y+m*g*g))))*r*y/i+(e+l)/2,b=o*-i*g/r+(n+c)/2,x=Math.asin(((n-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),w=Math.asin(((c-b)/i*Math.pow(10,9)>>0)/Math.pow(10,9)),x=e<v?Math.PI-x:x,w=l<v?Math.PI-w:w,x<0&&(x=2*Math.PI+x),w<0&&(w=2*Math.PI+w),s&&w<x&&(x-=2*Math.PI),!s&&x<w&&(w-=2*Math.PI)),w-x),g=(Math.abs(p)>f&&(m=w,y=l,o=c,w=x+f*(s&&x<w?1:-1),d=t(l=v+r*Math.cos(w),c=b+i*Math.sin(w),r,i,a,0,s,y,o,[w,m,v,b])),p=w-x,Math.cos(x)),f=Math.sin(x),a=Math.cos(w),s=Math.sin(w),y=Math.tan(p/4),o=4/3*r*y,m=4/3*i*y,v=[e,n],b=[e+o*f,n-m*g],x=[l+o*s,c-m*a],w=[l,c];if(b[0]=2*v[0]-b[0],b[1]=2*v[1]-b[1],u)return b.concat(x,w,d);for(var k=[],M=0,O=(d=b.concat(x,w,d)).length;M<O;M+=1)k[M]=M%2?ve(d[M-1],d[M],h).y:ve(d[M],d[M+1],h).x;return k}(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=u,e.qy=f,s=[h,d].concat(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(ke(h,d,u,f));case"Z":return h===p&&d===g?["C",h,d,p,g,p,g]:["C"].concat(ke(h,d,p,g))}return t}function Oe(t,e){var n;if(void 0===e&&(e=!1),ue(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=te(t),e?[n,[]]:n;for(var r,i=me(t),a=v({},oe),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var f=Me(i[u],a),h=(i[u]=f,y=g=p=d=h=void 0,i),d=o,p=u;if(7<h[p].length){h[p].shift();for(var g=h[p],y=p;g.length;)d[p]="A",h.splice(y+=1,0,["C"].concat(g.splice(0,6)));h.splice(p,1)}l=i.length,"Z"===s&&c.push(u),r=(f=i[u]).length,a.x1=+f[r-2],a.y1=+f[r-1],a.x2=+f[r-4]||a.x1,a.y2=+f[r-3]||a.y1}return e?[i,c]:i}function _e(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,f=void 0===u||u,u=c.length,h=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,g=t,y=e,m=0,v=[g,y,m],b=[g,y],x={x:0,y:0},w=[{x:g,y:y}];p&&l<=0&&(x={x:g,y:y});for(var k,M,O,_,S,E,A,T,P,N,L=0;L<=d;L+=1)k=t,M=e,O=n,_=r,S=i,E=a,A=o,T=s,N=void 0,N=1-(P=L/d),g=(k={x:Math.pow(N,3)*k+3*Math.pow(N,2)*P*O+3*N*Math.pow(P,2)*S+Math.pow(P,3)*A,y:Math.pow(N,3)*M+3*Math.pow(N,2)*P*_+3*N*Math.pow(P,2)*E+Math.pow(P,3)*T}).x,y=k.y,f&&w.push({x:g,y:y}),h&&(m+=xe(b,[g,y])),b=[g,y],p&&l<=m&&l>v[2]&&(O=(m-l)/(m-v[2]),x={x:b[0]*(1-O)+v[0]*O,y:b[1]*(1-O)+v[1]*O}),v=[g,y,m];return{length:m,point:x=p&&m<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function Se(t){return(c=l=s=0)<=Oe(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function Ee(t){return t.map(function(t,e,n){var r,i,a,o,n=e&&n[e-1].slice(-2).concat(t.slice(1)),s=e?_e(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],{bbox:!1}).length:0,n=e?s?(void 0===r&&(r=.5),n=(e=n).slice(0,2),i=e.slice(2,4),a=e.slice(4,6),e=e.slice(6,8),n=be(n,i,r),i=be(i,a,r),a=be(a,e,r),o=be(n,i,r),i=be(i,a,r),r=be(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}var Ae=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Te=function(t){return"function"==typeof t},Pe=function(t){return null==t},Ne={}.toString,Le=function(t,e){return Ne.call(t)==="[object "+e+"]"},Ce=function(t){return Array.isArray?Array.isArray(t):Le(t,"Array")},je=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function Fe(t,e){if(t)if(Ce(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(je(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var Ie=function(t){return"object"==typeof t&&null!==t},Re=function(t){if(!Ie(t)||!Le(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e},Be=function(t){if(Ce(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},De=function(t){if(Ce(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},ze=function(t){return Le(t,"String")},Ge=function(t,e,n){return t<e?e:n<t?n:t},We=function(t){return Le(t,"Number")};var He=function(t,e){return(t%e+e)%e},Ve=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return Fe(n,function(t,e){Te(n)&&"prototype"===e||r.push(t)}),r};var qe=function(t){return Le(t,"Boolean")},Ye=function(t){return void 0===t},Ue=function(t){return t instanceof Element||t instanceof HTMLDocument};function Xe(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function Ke(t,e,n,r){return e&&Xe(t,e),n&&Xe(t,n),r&&Xe(t,r),t}function $e(t){if("object"!=typeof t||null===t)return t;if(Ce(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=$e(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=$e(t[i]):e[i]=t[i];return e}function Ze(a,o){var s;if(Te(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map,s;throw new TypeError("Expected a function")}var Je=$e,Qe=5;function tn(t,e){if(t===e)return!0;if(t&&e&&!ze(t)&&!ze(e)){if(Ae(t)||Ae(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=tn(t[r],e[r]));r++);return n}if(Ie(t)||Ie(e)){var i=Object.keys(t),a=Object.keys(e);if(i.length!==a.length)return!1;for(n=!0,r=0;r<i.length&&(n=tn(t[i[r]],e[i[r]]));r++);return n}}return!1}function en(t,e,n){for(var r=0,i=ze(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t}function nn(e,t){var n;return null!==e&&Re(e)?(n={},Fe(t,function(t){ln.call(e,t)&&(n[t]=e[t])}),n):{}}function rn(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;return i=i||{},t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t}function an(){}var on=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||Qe,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Re(o)?(Re(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Ce(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},sn=tn,ln=Object.prototype.hasOwnProperty;function cn(t,e,n){(t.prototype=e.prototype=n).constructor=t}function un(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function fn(){}var e="\\s*([+-]?\\d+)\\s*",hn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dn=/^#([0-9a-f]{3,8})$/,pn=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),gn=new RegExp("^rgb\\("+[n,n,n]+"\\)$"),yn=new RegExp("^rgba\\("+[e,e,e,hn]+"\\)$"),mn=new RegExp("^rgba\\("+[n,n,n,hn]+"\\)$"),vn=new RegExp("^hsl\\("+[hn,n,n]+"\\)$"),bn=new RegExp("^hsla\\("+[hn,n,n,hn]+"\\)$"),xn={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 wn(){return this.rgb().formatHex()}function kn(){return this.rgb().formatRgb()}function Mn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=dn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?On(e):3===n?new Sn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?_n(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?_n(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=pn.exec(t))?new Sn(e[1],e[2],e[3],1):(e=gn.exec(t))?new Sn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=yn.exec(t))?_n(e[1],e[2],e[3],e[4]):(e=mn.exec(t))?_n(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=vn.exec(t))?Pn(e[1],e[2]/100,e[3]/100,1):(e=bn.exec(t))?Pn(e[1],e[2]/100,e[3]/100,e[4]):xn.hasOwnProperty(t)?On(xn[t]):"transparent"===t?new Sn(NaN,NaN,NaN,0):null}function On(t){return new Sn(t>>16&255,t>>8&255,255&t,1)}function _n(t,e,n,r){return new Sn(t=r<=0?e=n=NaN:t,e,n,r)}function Sn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function En(){return"#"+Tn(this.r)+Tn(this.g)+Tn(this.b)}function An(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Tn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Pn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new Ln(t,e,n,r)}function Nn(t){var e,n,r,i,a,o,s,l;return t instanceof Ln?new Ln(t.h,t.s,t.l,t.opacity):(t=t instanceof fn?t:Mn(t))?t instanceof Ln?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new Ln(o,s,l,t.opacity)):new Ln}function Ln(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Cn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function jn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Fn(t,e){return Math.abs(t-e)<.001}function In(t,e){var n=Math.min.apply(Math,t),r=Math.min.apply(Math,e);return{x:n,y:r,width:Math.max.apply(Math,t)-n,height:Math.max.apply(Math,e)-r}}function Rn(t){return(t+2*Math.PI)%(2*Math.PI)}cn(fn,Mn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:wn,formatHex:wn,formatHsl:function(){return Nn(this).formatHsl()},formatRgb:kn,toString:kn}),cn(Sn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof fn?i:Mn(i))?new Sn((i=i.rgb()).r,i.g,i.b,i.opacity):new Sn:new Sn(t,e,n,null==r?1:r);var i},un(fn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Sn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Sn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:En,formatHex:En,formatRgb:An,toString:An})),cn(Ln,function(t,e,n,r){return 1===arguments.length?Nn(t):new Ln(t,e,n,null==r?1:r)},un(fn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ln(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ln(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new Sn(Cn(240<=t?t-240:120+t,n,e),Cn(t,n,e),Cn(t<120?240+t:t-120,n,e),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Bn={box:function(t,e,n,r){return In([t,n],[e,r])},length:jn,pointAt:function(t,e,n,r,i){return{x:(1-i)*t+i*n,y:(1-i)*e+i*r}},pointDistance:function(t,e,n,r,i,a){var o=(n-t)*(i-t)+(r-e)*(a-e);return o<0?jn(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?jn(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){var o,n=[n-t,r-e];return(r=n)[0]===(o=[0,0])[0]&&r[1]===o[1]?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(Jt(r=[-n[1],n[0]],r),o=[i-t,a-e],Math.abs(o[0]*r[0]+o[1]*r[1]))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Dn(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),f=u/10,h=0;h<=c;h++){var d=h*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=jn(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,g=0;g<32&&!(f<1e-4);g++){var y=o-f,m=o+f,v=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=jn(l[0],l[1],v[0],v[1]);0<=y&&v<s?(o=y,s=v):(y=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=jn(l[0],l[1],y[0],y[1]),m<=1&&v<s?(o=m,s=v):f*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function zn(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Gn(t,e,n){n=t+n-2*e;return Fn(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function Wn(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function Hn(t,e,n,r,i,a,o){var s=zn(t,n,i,o),l=zn(e,r,a,o),c=Bn.pointAt(t,e,n,r,o),n=Bn.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function Vn(t,e,n,r,i,a,o){return 0===o?(jn(t,e,n,r)+jn(n,r,i,a)+jn(t,e,i,a))/2:(e=(t=Hn(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),Vn.apply(void 0,e)+Vn.apply(void 0,n))}var qn={box:function(t,e,n,r,i,a){var o=Gn(t,n,i)[0],s=Gn(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(zn(t,n,i,o)),void 0!==s&&c.push(zn(e,r,a,s)),In(l,c)},length:function(t,e,n,r,i,a){return Vn(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return Dn([t,n,i],[e,r,a],o,s,zn)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return jn(t.x,t.y,o,s)},interpolationAt:zn,pointAt:function(t,e,n,r,i,a,o){return{x:zn(t,n,i,o),y:zn(e,r,a,o)}},divide:Hn,tangentAngle:function(t,e,n,r,i,a,o){t=Wn(t,n,i,o),n=Wn(e,r,a,o);return Rn(Math.atan2(n,t))}};function Yn(t,e,n,r,i){var a=1-i;return a*a*a*t+3*e*i*a*a+3*n*i*i*a+r*i*i*i}function Un(t,e,n,r,i){var a=1-i;return 3*(a*a*(e-t)+2*a*i*(n-e)+i*i*(r-n))}function Xn(t,e,n,r){var i,a,r=-3*t+9*e-9*n+3*r,n=6*t-12*e+6*n,e=3*e-3*t,t=[];return Fn(r,0)?Fn(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Fn(e=n*n-4*r*e,0)?t.push(-n/(2*r)):0<e&&(a=(-n-(e=Math.sqrt(e)))/(2*r),0<=(i=(-n+e)/(2*r))&&i<=1&&t.push(i),0<=a)&&a<=1&&t.push(a),t}function Kn(t,e,n,r,i,a,o,s,l){var c=Yn(t,n,i,o,l),u=Yn(e,r,a,s,l),f=Bn.pointAt(t,e,n,r,l),n=Bn.pointAt(n,r,i,a,l),r=Bn.pointAt(i,a,o,s,l),i=Bn.pointAt(f.x,f.y,n.x,n.y,l),a=Bn.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,f.x,f.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function $n(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],f=0,h=c.length,d=0;d<h;d++)f+=jn(c[d],u[d],c[(d+1)%h],u[(d+1)%h]);return f/2}t=Kn(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return $n.apply(void 0,e)+$n.apply(void 0,n)}var Zn={extrema:Xn,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=Xn(t,n,i,o),f=Xn(e,r,a,s),h=0;h<u.length;h++)l.push(Yn(t,n,i,o,u[h]));for(var d=0;d<f.length;d++)c.push(Yn(e,r,a,s,f[d]));return In(l,c)},length:function(t,e,n,r,i,a,o,s){return $n(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return Dn([t,n,i,o],[e,r,a,s],l,c,Yn,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return jn(t.x,t.y,l,c)},interpolationAt:Yn,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:Yn(t,n,i,o,l),y:Yn(e,r,a,s,l)}},divide:Kn,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=Un(t,n,i,o,l),n=Un(e,r,a,s,l);return Rn(Math.atan2(n,t))}};function Jn(t,e){t=Math.abs(t);return 0<e?t:-1*t}var Qn=function(t,e,n,r,i,a){var o=n,s=r;if(0===o||0===s)return{x:t,y:e};for(var n=i-t,r=a-e,l=Math.abs(n),c=Math.abs(r),u=o*o,f=s*s,h=Math.PI/4,d=0,p=0,g=0;g<4;g++){var d=o*Math.cos(h),p=s*Math.sin(h),y=(u-f)*Math.pow(Math.cos(h),3)/o,m=(f-u)*Math.pow(Math.sin(h),3)/s,v=d-y,b=p-m,y=l-y,m=c-m,x=Math.hypot(b,v),w=Math.hypot(m,y);h+=x*Math.asin((v*m-b*y)/(x*w))/Math.sqrt(u+f-d*d-p*p),h=Math.min(Math.PI/2,Math.max(0,h))}return{x:t+Jn(d,n),y:e+Jn(p,r)}};function tr(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function er(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function nr(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function rr(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var ir={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],f=2*-Math.PI;f<=2*Math.PI;f+=Math.PI){var h=s+f;a<o?a<h&&h<o&&u.push(h):o<h&&h<a&&u.push(h)}for(var d=0;d<u.length;d++){var p=tr(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var g=Math.atan(r/(n*Math.tan(i))),y=1/0,m=-1/0,v=[a,o],b=2*-Math.PI;b<=2*Math.PI;b+=Math.PI){var x=g+b;a<o?a<x&&x<o&&v.push(x):o<x&&x<a&&v.push(x)}for(var w=0;w<v.length;w++){var k=er(0,e,n,r,i,v[w]);k<y&&(y=k),m<k&&(m=k)}return{x:l,y:y,width:c-l,height:m-y}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=rr(s-t,l-e,-i),l=s[0],s=s[1],l=Qn(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=nr(n,r,a):o<c&&(l=nr(n,r,o)),rr(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return jn(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:tr(t,0,n,r,i,o),y:er(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return Rn(Math.atan2(i,s))}};function ar(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=jn(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var or,sr,lr={box:function(t){for(var e=[],n=[],r=0;r<t.length;r++){var i=t[r];e.push(i[0]),n.push(i[1])}return In(e,n)},length:function(t){var e=t;if(e.length<2)return 0;for(var n=0,r=0;r<e.length-1;r++){var i=e[r],a=e[r+1];n+=jn(i[0],i[1],a[0],a[1])}return n},pointAt:function(t,e){var n=e;if(1<n||n<0||t.length<2)return null;var e=ar(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Bn.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=Bn.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=ar(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function cr(){}function ur(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function fr(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new ur(n,r||t,i),r=sr?sr+e:e;return t._events[r]?t._events[r].fn?t._events[r]=[t._events[r],n]:t._events[r].push(n):(t._events[r]=n,t._eventsCount++),t}function hr(t,e){0==--t._eventsCount?t._events=new cr:delete t._events[e]}function dr(){this._events=new cr,this._eventsCount=0}n=e,or=Object.prototype.hasOwnProperty,sr="~",Object.create&&(cr.prototype=Object.create(null),(new cr).__proto__||(sr=!1)),dr.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)or.call(t,e)&&n.push(sr?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},dr.prototype.listeners=function(t){var t=sr?sr+t:t,e=this._events[t];if(!e)return[];if(e.fn)return[e.fn];for(var n=0,r=e.length,i=new Array(r);n<r;n++)i[n]=e[n].fn;return i},dr.prototype.listenerCount=function(t){t=sr?sr+t:t,t=this._events[t];return t?t.fn?1:t.length:0},dr.prototype.emit=function(t,e,n,r,i,a){var o=sr?sr+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(h=1,s=new Array(c-1);h<c;h++)s[h-1]=arguments[h];l.fn.apply(l.context,s)}else for(var u,f=l.length,h=0;h<f;h++)switch(l[h].once&&this.removeListener(t,l[h].fn,void 0,!0),c){case 1:l[h].fn.call(l[h].context);break;case 2:l[h].fn.call(l[h].context,e);break;case 3:l[h].fn.call(l[h].context,e,n);break;case 4:l[h].fn.call(l[h].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[h].fn.apply(l[h].context,s)}return!0},dr.prototype.on=function(t,e,n){return fr(this,t,e,n,!1)},dr.prototype.once=function(t,e,n){return fr(this,t,e,n,!0)},dr.prototype.removeListener=function(t,e,n,r){t=sr?sr+t:t;if(this._events[t])if(e){var i=this._events[t];if(i.fn)i.fn!==e||r&&!i.once||n&&i.context!==n||hr(this,t);else{for(var a=0,o=[],s=i.length;a<s;a++)(i[a].fn!==e||r&&!i[a].once||n&&i[a].context!==n)&&o.push(i[a]);o.length?this._events[t]=1===o.length?o[0]:o:hr(this,t)}}else hr(this,t);return this},dr.prototype.removeAllListeners=function(t){return t?(t=sr?sr+t:t,this._events[t]&&hr(this,t)):(this._events=new cr,this._eventsCount=0),this},dr.prototype.off=dr.prototype.removeListener,dr.prototype.addListener=dr.prototype.on,dr.prefixed=sr,n.exports=dr.EventEmitter=dr;var pr=e.exports,hn="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};let gr=1;const yr="object"==typeof self&&self.self==self?self:"object"==typeof hn&&hn.global==hn?hn:{},mr=Date.now();let vr={},br=Date.now();const xr=t=>"string"!=typeof t?t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const n=Date.now(),e=n-br,r=16<e?0:16-e,i=gr++;return vr[i]=t,1<Object.keys(vr).length||setTimeout(()=>{br=n;const e=vr;vr={},Object.keys(e).forEach(t=>e[t](yr.performance&&"function"==typeof yr.performance.now?yr.performance.now():Date.now()-mr))},r),i}:""===t?yr.requestAnimationFrame:yr[t+"RequestAnimationFrame"],wr=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],t=>!!xr(t)),kr=xr(wr),Mr="string"!=typeof(n=wr)?t=>{delete vr[t]}:""===n?yr.cancelAnimationFrame:yr[n+"CancelAnimationFrame"]||yr[n+"CancelRequestAnimationFrame"];yr.requestAnimationFrame=kr,yr.cancelAnimationFrame=Mr,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:kr,cancelAnimationFrame:Mr}),(e=c=c||{}).COORDINATE="<coordinate>",e.COLOR="<color>",e.PAINT="<paint>",e.NUMBER="<number>",e.ANGLE="<angle>",e.OPACITY_VALUE="<opacity-value>",e.SHADOW_BLUR="<shadow-blur>",e.LENGTH="<length>",e.PERCENTAGE="<percentage>",e.LENGTH_PERCENTAGE="<length> | <percentage>",e.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",e.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",e.LIST_OF_POINTS="<list-of-points>",e.PATH="<path>",e.FILTER="<filter>",e.Z_INDEX="<z-index>",e.OFFSET_DISTANCE="<offset-distance>",e.DEFINED_PATH="<defined-path>",e.MARKER="<marker>",e.TRANSFORM="<transform>",e.TRANSFORM_ORIGIN="<transform-origin>",e.TEXT="<text>",e.TEXT_TRANSFORM="<text-transform>";var k,Or=function(){function y(t,e){void 0===t&&(t=[0,0,0]),void 0===e&&(e=[0,0,0]),this.center=m(),this.halfExtents=m(),this.min=m(),this.max=m(),this.update(t,e)}y.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=y.prototype;return t.update=function(t,e){kt(this.center,t),kt(this.halfExtents,e),Ct(this.min,this.center,this.halfExtents),Ot(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){Ot(this.center,e,t),St(this.center,this.center,.5),Ct(this.halfExtents,e,t),St(this.halfExtents,this.halfExtents,.5),kt(this.min,t),kt(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,a,o,s,l,c,u,f,h,d,p,g;y.isEmpty(t)||(y.isEmpty(this)?this.setMinMax(t.getMin(),t.getMax()):(n=(e=this.center)[0],p=e[1],a=e[2],i=(r=this.halfExtents)[0],f=r[1],o=r[2],l=(h=t.center)[0],g=h[1],h=h[2],c=(t=t.halfExtents)[0],(d=g-(u=t[1]))<(s=p-f)&&(s=d),(d=p+f)<(p=g+u)&&(d=p),(g=h-(f=t[2]))<(u=a-o)&&(u=g),(p=a+o)<(t=h+f)&&(p=t),e[0]=.5*((a=(g=l-c)<(a=n-i)?g:a)+(o=(o=n+i)<(h=l+c)?h:o)),e[1]=.5*(s+d),e[2]=.5*(u+p),r[0]=.5*(o-a),r[1]=.5*(d-s),r[2]=.5*(p-u),this.min[0]=a,this.min[1]=s,this.min[2]=u,this.max[0]=o,this.max[1]=d,this.max[2]=p))},t.setFromTransformedAABB=function(t,e){var n=this.center,r=this.halfExtents,i=t.center,t=t.halfExtents,a=e[0],o=e[4],s=e[8],l=e[1],c=e[5],u=e[9],f=e[2],h=e[6],d=e[10],p=Math.abs(a),g=Math.abs(o),y=Math.abs(s),m=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(f),w=Math.abs(h),k=Math.abs(d);Mt(n,e[12]+a*i[0]+o*i[1]+s*i[2],e[13]+l*i[0]+c*i[1]+u*i[2],e[14]+f*i[0]+h*i[1]+d*i[2]),Mt(r,p*t[0]+g*t[1]+y*t[2],m*t[0]+v*t[1]+b*t[2],x*t[0]+w*t[1]+k*t[2]),this.min=Ct(this.min,n,r),this.max=Ot(this.max,n,r)},t.intersects=function(t){var e=this.getMax(),n=this.getMin(),r=t.getMax(),t=t.getMin();return n[0]<=r[0]&&e[0]>=t[0]&&n[1]<=r[1]&&e[1]>=t[1]&&n[2]<=r[2]&&e[2]>=t[2]},t.intersection=function(t){var e,n,r,i;return this.intersects(t)?(e=new y,i=m(),n=this.getMin(),r=t.getMin(),i[0]=Math.max(n[0],r[0]),i[1]=Math.max(n[1],r[1]),i[2]=Math.max(n[2],r[2]),n=i,r=m(),i=this.getMax(),t=t.getMax(),r[0]=Math.min(i[0],t[0]),r[1]=Math.min(i[1],t[1]),r[2]=Math.min(i[2],t[2]),e.setMinMax(n,r),e):null},t.containsPoint=function(t){var e=this.getMin(),n=this.getMax();return!(t[0]<e[0]||t[0]>n[0]||t[1]<e[1]||t[1]>n[1]||t[2]<e[2]||t[2]>n[2])},t.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?kt(m(),this.min):272===t.pnVertexFlag?b(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?b(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?b(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?b(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?b(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?b(this.max[0],this.max[1],this.min[2]):b(this.max[0],this.max[1],this.max[2])},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?kt(m(),this.max):272===t.pnVertexFlag?b(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?b(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?b(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?b(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?b(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?b(this.min[0],this.min[1],this.max[2]):b(this.min[0],this.min[1],this.min[2])},y}(),_r=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||b(0,1,0),this.updatePNVertexFlag()}var e=t.prototype;return e.updatePNVertexFlag=function(){this.pnVertexFlag=(Number(0<=this.normal[0])<<8)+(Number(0<=this.normal[1])<<4)+Number(0<=this.normal[2])},e.distanceToPoint=function(t){return At(t,this.normal)-this.distance},e.normalize=function(){var t=1/jt(this.normal);St(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r,i,a=this.distanceToPoint(t),a=a/(a-this.distanceToPoint(e)),o=0<=a&&a<=1;return o&&n&&(n=n,e=e,a=a,r=(t=t)[0],i=t[1],t=t[2],n[0]=r+a*(e[0]-r),n[1]=i+a*(e[1]-i),n[2]=t+a*(e[2]-t)),o},t}(),Sr=(0,function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new _r)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],f=t[10],h=t[11],d=t[12],p=t[13],g=t[14],t=t[15];Mt(this.planes[0].normal,i-e,l-a,h-c),this.planes[0].distance=t-d,Mt(this.planes[1].normal,i+e,l+a,h+c),this.planes[1].distance=t+d,Mt(this.planes[2].normal,i+n,l+o,h+u),this.planes[2].distance=t+p,Mt(this.planes[3].normal,i-n,l-o,h-u),this.planes[3].distance=t-p,Mt(this.planes[4].normal,i-r,l-s,h-f),this.planes[4].distance=t-g,Mt(this.planes[5].normal,i+r,l+s,h+f),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),Er=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}var e=t.prototype;return e.clone=function(){return new t(this.x,this.y)},e.copyFrom=function(t){this.x=t.x,this.y=t.y},t}(),Ar=function(){function t(t,e,n,r){this.x=void 0,this.y=void 0,this.width=void 0,this.height=void 0,this.left=void 0,this.right=void 0,this.top=void 0,this.bottom=void 0,this.x=t,this.y=e,this.width=n,this.height=r,this.left=t,this.right=t+n,this.top=e,this.bottom=e+r}return t.prototype.toJSON=function(){},t}(),Tr=((n=k=k||{}).GROUP="g",n.CIRCLE="circle",n.ELLIPSE="ellipse",n.IMAGE="image",n.RECT="rect",n.LINE="line",n.POLYLINE="polyline",n.POLYGON="polygon",n.TEXT="text",n.PATH="path",n.HTML="html",n.MESH="mesh",Ze(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}));function Pr(t){if(!t)throw new Error}function Nr(t,e){if(t===e)throw new Error}function Lr(t){return"function"==typeof t}var Cr={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},jr=Ze(function(t){var t=Tr(t),e=Cr[t];return(null==e?void 0:e.alias)||t});var s,Fr,Ir,Rr,Br="Method not implemented.";function Dr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,function(t){t=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0===n)return("string"===e?String:Number)(t);n=n.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(t,"string");return"symbol"==typeof t?t:String(t)}(r.key),r)}}function zr(t,e,n){e&&Dr(t.prototype,e),n&&Dr(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function Gr(){return(Gr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Wr(t,e){t.prototype=Object.create(e.prototype),Hr(t.prototype.constructor=t,e)}function Hr(t,e){return(Hr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Vr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Yr(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?qr(t,e):"Map"===(n="Object"===(n=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:n)||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qr(t,e):void 0}(t))||e&&t&&"number"==typeof t.length)return r&&(t=r),n=0,function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e=s=s||{})[e.kUnknown=0]="kUnknown",e[e.kNumber=1]="kNumber",e[e.kPercentage=2]="kPercentage",e[e.kEms=3]="kEms",e[e.kPixels=4]="kPixels",e[e.kRems=5]="kRems",e[e.kDegrees=6]="kDegrees",e[e.kRadians=7]="kRadians",e[e.kGradians=8]="kGradians",e[e.kTurns=9]="kTurns",e[e.kMilliseconds=10]="kMilliseconds",e[e.kSeconds=11]="kSeconds",e[e.kInteger=12]="kInteger",(n=Fr=Fr||{})[n.kUNumber=0]="kUNumber",n[n.kUPercent=1]="kUPercent",n[n.kULength=2]="kULength",n[n.kUAngle=3]="kUAngle",n[n.kUTime=4]="kUTime",n[n.kUOther=5]="kUOther",(e=Ir=Ir||{})[e.kYes=0]="kYes",e[e.kNo=1]="kNo",(n=Rr=Rr||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo";function Ur(t){return t?"number"===t?s.kNumber:"percent"===t||"%"===t?s.kPercentage:(e=t,Qr.find(function(t){return t.name===e}).unit_type):s.kUnknown;var e}function Xr(t){var e=1;switch(t){case s.kPixels:case s.kDegrees:case s.kSeconds:break;case s.kMilliseconds:e=.001;break;case s.kRadians:e=180/Math.PI;break;case s.kGradians:e=.9;break;case s.kTurns:e=360}return e}function Kr(t){switch(t){case s.kNumber:case s.kInteger:return"";case s.kPercentage:return"%";case s.kEms:return"em";case s.kRems:return"rem";case s.kPixels:return"px";case s.kDegrees:return"deg";case s.kRadians:return"rad";case s.kGradians:return"grad";case s.kMilliseconds:return"ms";case s.kSeconds:return"s";case s.kTurns:return"turn"}return""}var $r,Zr,Jr,l,Qr=[{name:"em",unit_type:s.kEms},{name:"px",unit_type:s.kPixels},{name:"deg",unit_type:s.kDegrees},{name:"rad",unit_type:s.kRadians},{name:"grad",unit_type:s.kGradians},{name:"ms",unit_type:s.kMilliseconds},{name:"s",unit_type:s.kSeconds},{name:"rem",unit_type:s.kRems},{name:"turn",unit_type:s.kTurns}],n=((e=$r=$r||{})[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",function(){function t(){}t.isAngle=function(t){return t===s.kDegrees||t===s.kRadians||t===s.kGradians||t===s.kTurns},t.isLength=function(t){return t>=s.kEms&&t<s.kDegrees},t.isRelativeUnit=function(t){return t===s.kPercentage||t===s.kEms||t===s.kRems},t.isTime=function(t){return t===s.kSeconds||t===s.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(Ir.kNo,Rr.kNo,"")},e.isNumericValue=function(){return this.getType()>=$r.kUnitType&&this.getType()<=$r.kClampType},t}()),e=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}Wr(t,n);var e=t.prototype;return e.getType=function(){return $r.kColorType},e.to=function(t){return this},t}(n),ti=((r=Zr=Zr||{})[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",function(r){function t(t,e){var n=r.call(this)||this;return n.type=void 0,n.value=void 0,n.type=t,n.value=e,n}Wr(t,r);var e=t.prototype;return e.clone=function(){return new t(this.type,this.value)},e.buildCSSText=function(t,e,n){return n},e.getType=function(){return $r.kColorType},t}(n)),ei=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}Wr(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return $r.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(n);(r=Jr=Jr||{}).kAdd="+",r.kSubtract="-",r.kMultiply="*",r.kDivide="/",r.kMin="min",r.kMax="max",r.kClamp="clamp",r.kInvalid="",(r=l=l||{})[r.kLength=0]="kLength",r[r.kAngle=1]="kAngle",r[r.kTime=2]="kTime",r[r.kFrequency=3]="kFrequency",r[r.kResolution=4]="kResolution",r[r.kFlex=5]="kFlex",r[r.kPercent=6]="kPercent",r[r.kNumBaseTypes=7]="kNumBaseTypes";function ni(t){return"number"==typeof t?new ui(t,s.kNumber):t}var ri=function(){function t(t,e){void 0===t&&(t=s.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=l.kPercent,this.hasPercentHint=!1,this.exponents=new Array(l.kNumBaseTypes).fill(0),t!==s.kNumber&&this.setExponent(function(t){switch(Nr(t,s.kNumber),t){case s.kEms:case s.kPixels:case s.kRems:return l.kLength;case s.kMilliseconds:case s.kSeconds:return l.kTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return l.kAngle;case s.kPercentage:return l.kPercent;default:return l.kLength}}(t),e)}var e=t.prototype;return e.applyPercentHint=function(t){Nr(t,l.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(l.kPercent)),this.setExponent(l.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},e.hasNonZeroEntries=function(){return 0<this.numNonZeroEntries},e.isOnlyNonZeroEntry=function(t,e){return Nr(e,0),1===this.numNonZeroEntries&&this.exponent(t)===e},e.exponent=function(t){return this.exponents[t]},e.setExponent=function(t,e){var n=this.exponents[t];0==n&&0!==e?this.numNonZeroEntries++:0!==n&&0==e&&this.numNonZeroEntries--,this.exponents[t]=e},t.negateExponents=function(t){return t.exponents.forEach(function(t){return-1*t}),t},e.matchesBaseType=function(t){return Nr(t,l.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},e.matchesPercentage=function(){return this.isOnlyNonZeroEntry(l.kPercent,1)},e.matchesBaseTypePercentage=function(t){return Nr(t,l.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(l.kPercent,1)},e.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},e.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(l.kPercent,1)},t.add=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);var r=t.percentHint,i=e.percentHint;if(r!==i)throw new Error;for(var a=0;a<l.kNumBaseTypes;++a){var o=a;if(t.exponents[a]!==e.exponents[a]&&(o!==l.kPercent&&(t.applyPercentHint(o),e.applyPercentHint(o)),t.exponents[a]!==e.exponents[a]))return t}}return t},t.multiply=function(t,e,n){if(!t.hasPercentHint||!e.hasPercentHint||t.percentHint==e.percentHint){t.hasPercentHint?e.applyPercentHint(t.percentHint):e.hasPercentHint&&t.applyPercentHint(e.percentHint);for(var r=0;r<l.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t},t}(),r=function(n){function d(t){var e=n.call(this)||this;return e.type_=void 0,e.type_=t,e}Wr(d,n);var t=d.prototype;return t.getType=function(){return $r.kUnknownType},t.equals=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ii(n).every(function(t){return e.equals(t)})},t.add=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=ii(e),i=(ai($r.kSumType,r,this),si(r,Jr.kAdd));return i||mi.create(r)},t.sub=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=ii(e)).map(function(t){return t.negate()}),i=(ai($r.kSumType,r,this),si(r,Jr.kAdd));return i||mi.create(r)},t.mul=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=ii(e),i=(ai($r.kProductType,r,this),li(r));return i||vi.create(r)},t.div=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=(r=ii(e)).map(function(t){return t.invert()}),i=(ai($r.kProductType,r,this),li(r));return i||vi.create(r)},t.min=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=ii(e),i=(ai($r.kMinType,r,this),si(r,Jr.kMin));return i||gi.create(r)},t.max=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=ii(e),i=(ai($r.kMaxType,r,this),si(r,Jr.kMax));return i||yi.create(r)},t.to=function(t){var e=this.sumValue();return 0!==e.length&&1===e.length&&(e=oi(e[0]))?(t="string"==typeof t?Ur(t):t,e.convertTo(t)):null},t.toSum=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a=i[r];if(!d.isValidUnit(Ur(a)))return null}var o=this.sumValue();if(!o.length)return null;for(var s=[],l=Yr(o);!(c=l()).done;){var c=oi(c.value);if(!c)return null;s.push(c)}if(0===e.length)return s.sort(function(t,e){return t.unit-e.unit}),Pr(!!(o=mi.create(s))),o;for(var u=[],f=0,h=e;f<h.length;f++)!function(){var t=h[f],r=Ur(t),t=(Pr(d.isValidUnit(r)),s.reduce(function(t,e,n){return e&&(e=e.convertTo(r))&&(t+=e.value,s[n]=null),t},0));u.push(new ui(t,r))}();if(s.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return mi.create(u)},t.type=function(){var t={length:0,angle:0,time:0,frequency:0,resolution:0,flex:0,percent:0,percentHint:"length"},e=this.type_.exponent(l.kLength);return e&&(t.length=e),(e=this.type_.exponent(l.kAngle))&&(t.angle=e),(e=this.type_.exponent(l.kTime))&&(t.time=e),(e=this.type_.exponent(l.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(l.kResolution))&&(t.resolution=e),(e=this.type_.exponent(l.kFlex))&&(t.flex=e),(e=this.type_.exponent(l.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case l.kLength:return"length";case l.kAngle:return"angle";case l.kTime:return"time";case l.kFrequency:return"frequency";case l.kResolution:return"resolution";case l.kFlex:return"flex";case l.kPercent:return"percent"}return""}(this.type_.percentHint)),t},d.isValidUnit=function(t){return!!(t===s.kNumber||t==s.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t))},t.negate=function(){return hi.create(this)},t.invert=function(){return fi.create(this)},d}(n);function ii(t){return t.map(ni)}function ai(t,e,n){Pr(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function oi(t){return 0===Object.keys(t.units).length?new ui(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new ui(t.value,Number(Object.keys(t.units)[0])):null}function si(t,e){Pr(!!t.length);var n=t[0]instanceof ui?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var a=t[i]instanceof ui?t[i]:null;if(!a||a.unit!==n.unit)return null;e===Jr.kAdd?r+=a.value:e===Jr.kMax?r=Math.max(r,a.value):e===Jr.kMin&&(r=Math.min(r,a.value))}return new ui(r,n.unit)}function li(t){Pr(!!t.length);for(var e=s.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof ui?t[r]:null;if(!i)return null;if(i.unit!==s.kNumber){if(e!==s.kNumber)return null;e=i.unit}n*=i.value}return new ui(n,e)}function ci(t){switch(function(t){switch(t){case s.kNumber:case s.kInteger:return Fr.kUNumber;case s.kPercentage:return Fr.kUPercent;case s.kPixels:return Fr.kULength;case s.kMilliseconds:case s.kSeconds:return Fr.kUTime;case s.kDegrees:case s.kRadians:case s.kGradians:case s.kTurns:return Fr.kUAngle;default:return Fr.kUOther}}(t)){case Fr.kUNumber:return s.kNumber;case Fr.kULength:return s.kPixels;case Fr.kUPercent:return s.kPercentage;case Fr.kUTime:return s.kSeconds;case Fr.kUAngle:return s.kDegrees;default:return s.kUnknown}}var ui=function(r){function n(t,e){var n,e="string"==typeof(e=void 0===e?s.kNumber:e)?Ur(e):e;return(n=r.call(this,new ri(e))||this).unit=void 0,n.value=void 0,n.unit=e,n.value=t,n}Wr(n,r);var t=n.prototype;return t.clone=function(){return new n(this.value,this.unit)},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=ci(this.unit))!==ci(t)||e===s.kUnknown?null:(e=Xr(this.unit)/Xr(t),new n(this.value*e,t))},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return $r.kUnitType},t.sumValue=function(){var t,e,n=[],r={};return this.unit!==s.kNumber&&(r[t=this.unit,(e=ci(t))===s.kUnknown?t:e]=1),n.push({value:this.value*Xr(this.unit),units:r}),n},t.negate=function(){return new n(-this.value,this.unit)},t.invert=function(){return this.unit===s.kNumber?0===this.value?null:new n(1/this.value,this.unit):fi.create(this)},t.buildCSSText=function(t,e,n){switch(this.unit){case s.kUnknown:break;case s.kInteger:i=Number(this.value).toFixed(0);break;case s.kNumber:case s.kPercentage:case s.kEms:case s.kRems:case s.kPixels:case s.kDegrees:case s.kRadians:case s.kGradians:case s.kMilliseconds:case s.kSeconds:case s.kTurns:var r,i,a=this.value,o=Kr(this.unit);i=a<-999999||999999<a?(r=Kr(this.unit),!Number.isFinite(a)||Number.isNaN(a)?function(t,e){void 0===e&&(e="");return(Number.isFinite(t)?(Pr(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e}(a,r):a+(r||"")):""+a+o}return n+=i},n}(r),n=function(t){function e(){return t.apply(this,arguments)||this}return Wr(e,t),e.prototype.isUnitValue=function(){return!1},e}(r),fi=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="invert",e.value=t,e}Wr(e,n),e.create=function(t){return new e(t,ri.negateExponents(t.type_))};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return $r.kInvertType},t.equals=function(t){return t.getType()===$r.kInvertType&&this.value.equals(t.value)},t.sumValue=function(){var e=this.value.sumValue();return 0===e.length||1!==e.length||0===e[0].value?null:(Object.keys(e[0].units).forEach(function(t){e[0].units[t]*=-1}),e[0].value=1/e[0].value,e)},t.buildCSSText=function(t,e,n){return e==Rr.kNo&&(n+=t===Ir.kYes?"(":"calc("),n=this.value.buildCSSText(Ir.kYes,Rr.kNo,n+="1 / "),e===Rr.kNo&&(n+=")"),n},e}(n),hi=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="negate",e.value=t,e}Wr(e,n),e.create=function(t){return new e(t,t.type_)};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return $r.kNegateType},t.equals=function(t){return t.getType()===$r.kNegateType&&this.value.equals(t.value)},t.sumValue=function(){var t=this.value.sumValue();return 0===t.length?null:(t.forEach(function(t){t.value*=-1}),t)},t.buildCSSText=function(t,e,n){return e==Rr.kNo&&(n+=t===Ir.kYes?"(":"calc("),n=this.value.buildCSSText(Ir.kYes,Rr.kNo,n+="-"),e===Rr.kNo&&(n+=")"),n},e}(n);function di(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}function pi(t){return Mi[t]||(Mi[t]=new ei(t)),Mi[t]}var r=function(n){function t(t,e){e=n.call(this,e)||this;return e.values=void 0,e.values=t,e}Wr(t,n);var e=t.prototype;return e.numericValues=function(){return this.values},e.equals=function(n){return this.getType()===n.getType()&&this.values.every(function(t,e){return t.equals(n.values[e])})},t}(n),gi=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="min",t}Wr(e,i),e.create=function(t){return new e(t,di(t,ri.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return $r.kMinType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=Yr(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="min(";for(var r,i=!0,a=Yr(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(Ir.kYes,Rr.kYes,n);return n+=")"},e}(r),yi=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="max",t}Wr(e,i),e.create=function(t){return new e(t,di(t,ri.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return $r.kMaxType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=Yr(this.numericValues());!(n=e()).done;){var n=n.value.sumValue();if(!n.length||JSON.stringify(n[0].units)!==JSON.stringify(t[0].units))return null;n[0].value<t[0].value&&(t=n)}return t},t.buildCSSText=function(t,e,n){n+="max(";for(var r,i=!0,a=Yr(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(Ir.kYes,Rr.kYes,n);return n+=")"},e}(r),mi=function(i){function e(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="sum",t}Wr(e,i),e.create=function(t){return new e(t,di(t,ri.add))},e.numericTypeFromUnitMap=function(n){var r=new ri;return Object.keys(n).forEach(function(t){var e=n[t];r=ri.multiply(r,new ri(Number(t),e),!1),Pr(!0)}),r},e.canCreateNumericTypeFromSumValue=function(t){var e=this,n=(Pr(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return ri.add(n,e.numericTypeFromUnitMap(t.units),!1),!0})};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return $r.kSumType},t.sumValue=function(){var n=[];return this.numericValues().forEach(function(t){t=t.sumValue();if(!t.length)return null;t.forEach(function(e){var t=n.findIndex(function(t){return JSON.stringify(t.units)===JSON.stringify(e.units)});-1===t?n.push(Gr({},e)):n[t].value+=e.value})}),e.canCreateNumericTypeFromSumValue(n)?n:null},t.buildCSSText=function(t,e,n){e==Rr.kNo&&(n+=t===Ir.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Ir.kYes,Rr.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===$r.kNegateType?(n+=" - ",a.value):(n+=" + ",a)).buildCSSText(Ir.kYes,Rr.kNo,n)}return e===Rr.kNo&&(n+=")"),n},e}(r),vi=function(i){function a(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).operator="product",t}Wr(a,i),a.create=function(t){return new a(t,di(t,ri.multiply))},a.multiplyUnitMaps=function(n,r){return Object.keys(r).forEach(function(t){Nr(r[t].value,0);var e=t in n?n[t].value:0;e+r[t].value===0?delete n[t]:n[t]=e+r[t].value}),n};var t=a.prototype;return t.clone=function(){return new a(this.values,this.type_)},t.getType=function(){return $r.kProductType},t.sumValue=function(){var e=[{value:1,units:{}}];return this.numericValues().forEach(function(t){var n=t.sumValue();if(!n.length)return null;var r=[];e.forEach(function(e){n.forEach(function(t){r.push({value:e.value*t.value,units:a.multiplyUnitMaps(e.units,t.units)})})}),e=r}),e},t.buildCSSText=function(t,e,n){e==Rr.kNo&&(n+=t===Ir.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(Ir.kYes,Rr.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===$r.kInvertType?(n+=" / ",a.value):(n+=" * ",a)).buildCSSText(Ir.kYes,Rr.kNo,n)}return e===Rr.kNo&&(n+=")"),n},a}(r),bi=new ui(0,"px"),xi=(new ui(1,"px"),new ui(0,"deg")),wi=function(o){function t(t,e,n,r,i){var a;return void 0===r&&(r=1),void 0===i&&(i=!1),(a=o.call(this,"rgb")||this).r=void 0,a.g=void 0,a.b=void 0,a.alpha=void 0,a.isNone=void 0,a.r=t,a.g=e,a.b=n,a.alpha=r,a.isNone=i,a}Wr(t,o);var e=t.prototype;return e.clone=function(){return new t(this.r,this.g,this.b,this.alpha)},e.buildCSSText=function(t,e,n){return n+("rgba("+this.r+","+this.g+","+this.b+","+this.alpha)+")"},t}(e),ki=new ei("unset"),n=new ei("initial"),r=new ei("inherit"),Mi={"":ki,unset:ki,initial:n,inherit:r},Oi=new wi(0,0,0,0,!0),_i=new wi(0,0,0,0),Si=Ze(function(t,e,n,r){return new wi(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),Ei=Ze(function(t,e){return void 0===e&&(e=s.kNumber),new ui(t,e)},function(t,e){return""+t+(e=void 0===e?s.kNumber:e)}),Ai=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Ti=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Pi=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Ni=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var Li={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},Ci=Ze(function(t){t="angular"===t.type?Number(t.value):Li[t.value]||0;return Ei(t,"deg")}),ji=Ze(function(t){var e,n=50,r=50,i="%",a="%";return"position"===(null==t?void 0:t.type)&&(e=(t=t.value).x,t=t.y,"position-keyword"===(null==e?void 0:e.type)&&("left"===e.value?n=0:"center"===e.value?n=50:"right"===e.value?n=100:"top"===e.value?r=0:"bottom"===e.value&&(r=100)),"position-keyword"===(null==t?void 0:t.type)&&("left"===t.value?n=0:"center"===t.value?r=50:"right"===t.value?n=100:"top"===t.value?r=0:"bottom"===t.value&&(r=100)),"px"!==(null==e?void 0:e.type)&&"%"!==(null==e?void 0:e.type)&&"em"!==(null==e?void 0:e.type)||(i=null==e?void 0:e.type,n=Number(e.value)),"px"!==(null==t?void 0:t.type)&&"%"!==(null==t?void 0:t.type)&&"em"!==(null==t?void 0:t.type)||(a=null==t?void 0:t.type,r=Number(t.value))),{cx:Ei(n,i),cy:Ei(r,a)}}),Fi=Ze(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return vo(t).map(function(t){for(var e=t.type,n=t.orientation,t=t.colorStops,r=t,i=r.length,a=(r[i-1].length=null!=(h=r[i-1].length)?h:{type:"%",value:"100"},1<i&&(r[0].length=null!=(h=r[0].length)?h:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var l,c=null==(l=r[s].length)?void 0:l.value;if(!Pe(c)&&!Pe(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:""+(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var f,h=t.map(function(t){return{offset:Ei(t.length.value,"%"),color:(e=(t=t).type,t=t.value,"hex"===e?"#"+t:"literal"===e?t:"rgb"===e?"rgb("+t.join(",")+")":"rgba("+t.join(",")+")")};var e});return"linear-gradient"===e?new ti(Zr.LinearGradient,{angle:n?Ci(n):xi,steps:h}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=ji(n[0].at)).cx,t=t.cy,n[0].style&&(f=(n=n[0].style).type,n=n.value,f="extent-keyword"===f?pi(n):Ei(n,f)),new ti(Zr.RadialGradient,{cx:e,cy:t,size:f,steps:h})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=Ai.exec(t);if(n)return r=(null==(r=n[2].match(Ni))?void 0:r.map(function(t){return t.split(":")}))||[],[new ti(Zr.LinearGradient,{angle:Ei(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:Ei(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=Ti.exec(t);if(t)return t=(null==(t=t[4].match(Ni))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:Ei(50,"%"),cy:Ei(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:Ei(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!ze(n))return[new ti(Zr.RadialGradient,n)]}else if("p"===e){var r=t;if(r=Pi.exec(r)){var i=r[1],r=r[2];switch(i){case"a":i="repeat";break;case"x":i="repeat-x";break;case"y":i="repeat-y";break;default:i="no-repeat"}return{image:r,repetition:i}}return null}});var Ii=Ze(function(t){var e;return je(e=t)&&e.image?Gr({repetition:"repeat"},t):"transparent"===(t=Pe(t)?"":t)?_i:Fi(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=Mn(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),Si.apply(void 0,e))});function Ri(t,e){if(t instanceof wi&&e instanceof wi)return[[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var e=t.slice();if(e[3])for(var n=0;n<3;n++)e[n]=Math.round(Ge(e[n],0,255));return e[3]=Ge(e[3],0,1),"rgba("+e.join(",")+")"}]}function Bi(t,e){if(Pe(e))return Ei(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return Ei(Number(e),"px");if(0<="deg".search(t))return Ei(Number(e),"deg")}var n=[],r=(e=e.replace(t,function(t){return n.push(t),"U"+t}),"U("+t.source+")");return n.map(function(t){return Ei(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var Di=Ze(function(t){return Bi(new RegExp("px","g"),t)}),zi=(Ze(function(t){return Bi(new RegExp("%","g"),t)}),Ze(function(t){return We(t)||isFinite(Number(t))?Ei(Number(t),"px"):Bi(new RegExp("px|%|em|rem","g"),t)})),Gi=Ze(function(t){return Bi(new RegExp("deg|rad|grad|turn","g"),t)});function Wi(t){var e=0;return t.unit===s.kDegrees?e=t.value:t.unit===s.kRadians?e=oo(Number(t.value)):t.unit===s.kTurns&&(e=360*Number(t.value)),e}function Hi(t){return ze(t)?t.split(" ").map(function(t){return zi(t)}):t.map(function(t){return zi(t.toString())})}function Vi(t,e,n){var r;return t.unit===s.kPixels?Number(t.value):t.unit===s.kPercentage&&n?(n=n.nodeName===k.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,Or.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var qi=function(t){return Bi(/deg|rad|grad|turn|px|%/g,t)},Yi=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Ui(t){if("none"!==(t=(t=void 0===t?"":t).toLowerCase().trim()))for(var e,n=/\s*([\w-]+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];if(i=e.index+e[0].length,-1<Yi.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return qi(t)||Ii(t)})}),n.lastIndex===t.length)return r}return[]}function Xi(t){return t.toString()}var Ki=Ze(function(t){return"number"==typeof t?Ei(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?Ei(Number(t)):Ei(0)});function $i(t,e){return[t,e,Xi]}function Zi(n,r){return function(t,e){return[t,e,function(t){return Xi(Ge(t,n,r))}]}}function Ji(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Ze(function(t){return(ze(t)?t.split(" "):t).map(Ki)});var Qi=function(e){if(""===e||Array.isArray(e)&&0===e.length)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var n;try{n=me(e)}catch(t){n=me(""),console.error("[g]: Invalid SVG Path definition: "+e)}var e=function(t){for(var e=!1,n=t.length,r=0;r<n;r++){var i=t[r][0];if("C"===i||"A"===i||"Q"===i){e=!0;break}}return e}(n),t=function(t){for(var e=[],n=[],r=[],i=0;i<t.length;i++){var a=t[i],o=a[0];"M"===o?(r.length&&(n.push(r),r=[]),r.push([a[1],a[2]])):"Z"===o?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}0<r.length&&n.push(r);return{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=function(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],c=(r=t[s+1],l[0]),u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var f=function(t,e){var n=e[1],r=e[2],i=He(ao(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,f=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-e)/2,h=u*u/(n*n)+f*f/(r*r);1<h&&(n*=Math.sqrt(h),r*=Math.sqrt(h));h=n*n*(f*f)+r*r*(u*u),h=h?Math.sqrt((n*n*(r*r)-h)/h):1;a===o&&(h*=-1);isNaN(h)&&(h=0);var d=r?h*n*f/r:0,h=n?h*-r*u/n:0,s=(s+c)/2+Math.cos(i)*d-Math.sin(i)*h,l=(l+e)/2+Math.sin(i)*d+Math.cos(i)*h,p=[(u-d)/n,(f-h)/r],u=[(-1*u-d)/n,(-1*f-h)/r],d=Uo([1,0],p),f=Uo(p,u);Yo(p,u)<=-1&&(f=Math.PI);1<=Yo(p,u)&&(f=0);0===o&&0<f&&(f-=2*Math.PI);1===o&&f<0&&(f+=2*Math.PI);return{cx:s,cy:l,rx:Do(t,[c,e])?0:n,ry:Do(t,[c,e])?0:r,startAngle:d,endAngle:d+f,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=f}"Z"===c?(n=i,r=t[a+1]):(v=l.length,n=[l[v-2],l[v-1]]),r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&Do(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var h,d,p,g,y,m,v=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=v,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(h=[l[1],l[2]],u.startTangent=[b[0]-h[0],b[1]-h[1]],u.endTangent=[n[0]-h[0],n[1]-h[1]]):"T"===c?(d=Go((h=e[s-1]).currentPoint,b),"Q"===h.command?(u.command="Q",u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-d[0],n[1]-d[1]]):(u.command="TL",u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]])):"C"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(g=Go((p=e[s-1]).currentPoint,b),y=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-g[0],b[1]-g[1]]):(u.command="SQ",u.startTangent=[b[0]-y[0],b[1]-y[1]]),u.endTangent=[n[0]-y[0],n[1]-y[1]]):"A"===c&&(g=Vo(u,0),b=g.x,y=g.y,c=Vo(u,1,!1),m=c.x,c=c.y,u.startTangent=[b,y],u.endTangent=[m,c]),e.push(u)}return e}(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=qn.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=Zn.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var f=o.arcParams;u=ir.box(f.cx,f.cy,f.rx,f.ry,f.xRotation,f.startAngle,f.endAngle);break;default:n.push(s[0]),r.push(s[1])}u&&(o.box=u,n.push(u.x,u.x+u.width),r.push(u.y,u.y+u.height)),e&&("L"===o.command||"M"===o.command)&&o.prePoint&&o.nextPoint&&i.push(o)}n=n.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0}),r=r.filter(function(t){return!Number.isNaN(t)&&t!==1/0&&t!==-1/0});var h=De(n),d=De(r),p=Be(n),g=Be(r);if(0!==i.length)for(var y=0;y<i.length;y++){var m=i[y],v=m.currentPoint,b=void 0;v[0]===h?(b=zo(m,e),h-=b.xExtra):v[0]===p&&(b=zo(m,e),p+=b.xExtra),v[1]===d?(b=zo(m,e),d-=b.yExtra):v[1]===g&&(b=zo(m,e),g+=b.yExtra)}return{x:h,y:d,width:p-h,height:g-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},ta=Ze(Qi);function ea(t,e){t=(ze(t)?ta:Qi)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function na(t,e,n){var r,i,a,o,s,l,c,u,f,h=t.curve,d=e.curve,t=(h&&0!==h.length||(h=Oe(t.absolutePath,!1),t.curve=h),d&&0!==d.length||(d=Oe(e.absolutePath,!1),e.curve=d),[h,d]),h=Se((t=h.length!==d.length?function t(e,n,r){var i,e=Ee(e),n=Ee(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],f=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&f[n]&&t.l>=u[n],f[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],c)}(h,d):t)[0])!==Se(t[1])?(r=t[0],e=r.slice(1).map(function(t,e,n){return(e?n[e-1].slice(-2):r[0].slice(1)).concat(t.slice(1))}).map(function(n){return n.map(function(t,e){return n[n.length-e-2*(1-e%2)]})}).reverse(),[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))):te(t[0]);return[h,(i=t[1],a=h,c=i.length-1,u=[],f=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){f+=xe(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=f,f=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function ra(t,e){var n,r,i=ze(t)?t.split(" ").map(function(t){var t=t.split(","),e=t[0],t=t[1];return[Number(e),Number(t)]}):t,a=[],o=0,s=lr.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=Bn.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}var ia=null;function aa(t){return function(e){var n=0;return t.map(function(t){return t===ia?e[n++]:t})}}function oa(t){return t}var sa={matrix:["NNNNNN",[ia,ia,0,0,ia,ia,0,0,0,0,1,0,ia,ia,0,1],oa],matrix3d:["NNNNNNNNNNNNNNNN",oa],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",aa([ia,ia,new ui(1)]),oa],scalex:["N",aa([ia,new ui(1),new ui(1)]),aa([ia,new ui(1)])],scaley:["N",aa([new ui(1),ia,new ui(1)]),aa([new ui(1),ia])],scalez:["N",aa([new ui(1),new ui(1),ia])],scale3d:["NNN",oa],skew:["Aa",null,oa],skewx:["A",null,aa([ia,xi])],skewy:["A",null,aa([xi,ia])],translate:["Tt",aa([ia,ia,bi]),oa],translatex:["T",aa([ia,bi,bi]),aa([ia,bi])],translatey:["T",aa([bi,ia,bi]),aa([bi,ia])],translatez:["L",aa([bi,bi,ia])],translate3d:["TTL",oa]};function la(t){if("none"!==(t=(t||"none").toLowerCase().trim()))for(var e,n=/\s*(\w+)\(([^)]*)\)/g,r=[],i=0;e=n.exec(t);){if(e.index!==i)return[];var i=e.index+e[0].length,a=e[1],o=sa[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var f=s[u],h=l[u],d=void 0;if(void 0===(d=f?{A:function(t){return"0"===t.trim()?xi:Gi(t)},N:Ki,T:zi,L:Di}[h.toUpperCase()](f):{a:xi,n:c[0],t:bi}[h]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function ca(t){switch(t.t){case"rotatex":return i=ao(Wi(t.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotatey":return i=ao(Wi(t.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotatez":return i=ao(Wi(t.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":var e=t.d[0].value,n=t.d[1].value,r=t.d[2].value,i=ao(Wi(t.d[3])),a=e*e+n*n+r*r,a=(0==a?(e=1,r=n=0):1!=a&&(e/=a=Math.sqrt(a),n/=a,r/=a),Math.sin(i/2)),o=a*Math.cos(i/2),a=a*a;return[1-2*(n*n+r*r)*a,2*(e*n*a+r*o),2*(e*r*a-n*o),0,2*(e*n*a-r*o),1-2*(e*e+r*r)*a,2*(n*r*a+e*o),0,2*(e*r*a+n*o),2*(n*r*a-e*o),1-2*(e*e+n*n)*a,0,0,0,0,1];case"scale":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scalex":return[t.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaley":return[1,0,0,0,0,t.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scalez":return[1,0,0,0,0,1,0,0,0,0,t.d[0].value,0,0,0,0,1];case"scale3d":return[t.d[0].value,0,0,0,0,t.d[1].value,0,0,0,0,t.d[2].value,0,0,0,0,1];case"skew":o=ao(Wi(t.d[0])),a=ao(Wi(t.d[1]));return[1,Math.tan(a),0,0,Math.tan(o),1,0,0,0,0,1,0,0,0,0,1];case"skewx":return i=ao(Wi(t.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewy":return i=ao(Wi(t.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Vi(t.d[0],0,null)||0,n=Vi(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Vi(t.d[0],0,null)||0,0,0,1];case"translatey":return[1,0,0,0,0,1,0,0,0,0,1,0,0,n=Vi(t.d[0],0,null)||0,0,1];case"translatez":return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r=Vi(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Vi(t.d[0],0,null)||0,n=Vi(t.d[1],0,null)||0,r=Vi(t.d[2],0,null)||0,1];case"perspective":a=Vi(t.d[0],0,null)||0;return[1,0,0,0,0,1,0,0,0,0,1,a?-1/a:0,0,0,0,1];case"matrix":return[t.d[0].value,t.d[1].value,0,0,t.d[2].value,t.d[3].value,0,0,0,0,1,0,t.d[4].value,t.d[5].value,0,1];case"matrix3d":return t.d.map(function(t){return t.value})}}function ua(t,e){return[t[0]*e[0]+t[4]*e[1]+t[8]*e[2]+t[12]*e[3],t[1]*e[0]+t[5]*e[1]+t[9]*e[2]+t[13]*e[3],t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]*e[3],t[3]*e[0]+t[7]*e[1]+t[11]*e[2]+t[15]*e[3],t[0]*e[4]+t[4]*e[5]+t[8]*e[6]+t[12]*e[7],t[1]*e[4]+t[5]*e[5]+t[9]*e[6]+t[13]*e[7],t[2]*e[4]+t[6]*e[5]+t[10]*e[6]+t[14]*e[7],t[3]*e[4]+t[7]*e[5]+t[11]*e[6]+t[15]*e[7],t[0]*e[8]+t[4]*e[9]+t[8]*e[10]+t[12]*e[11],t[1]*e[8]+t[5]*e[9]+t[9]*e[10]+t[13]*e[11],t[2]*e[8]+t[6]*e[9]+t[10]*e[10]+t[14]*e[11],t[3]*e[8]+t[7]*e[9]+t[11]*e[10]+t[15]*e[11],t[0]*e[12]+t[4]*e[13]+t[8]*e[14]+t[12]*e[15],t[1]*e[12]+t[5]*e[13]+t[9]*e[14]+t[13]*e[15],t[2]*e[12]+t[6]*e[13]+t[10]*e[14]+t[14]*e[15],t[3]*e[12]+t[7]*e[13]+t[11]*e[14]+t[15]*e[15]]}function fa(t){var e=[0,0,0],n=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return function(t,e,n,r,i,a){if(!function(t,e){var n=e[15];if(0===n)return;for(var r=1/n,i=0;i<16;i++)t[i]=e[i]*r;return 1}(co,t))return;if(W(uo,co),uo[3]=0,uo[7]=0,uo[11]=0,uo[15]=1,Math.abs(U(uo))<1e-8)return;var t=co[3],o=co[7],s=co[11],l=co[12],c=co[13],u=co[14],f=co[15];if(0!==t||0!==o||0!==s){if(fo[0]=t,fo[1]=o,fo[2]=s,fo[3]=f,!Y(uo,uo))return;q(uo,uo),It(i,fo,uo)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(d,co),n[0]=wt(d[0]),Et(d[0],d[0]),r[0]=At(d[0],d[1]),po(d[1],d[1],d[0],1,-r[0]),n[1]=wt(d[1]),Et(d[1],d[1]),r[0]/=n[1],r[1]=At(d[0],d[2]),po(d[2],d[2],d[0],1,-r[1]),r[2]=At(d[1],d[2]),po(d[2],d[2],d[1],1,-r[2]),n[2]=wt(d[2]),Et(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],Tt(ho,d[1],d[2]),At(d[0],ho)<0)for(var h=0;h<3;h++)n[h]*=-1,d[h][0]*=-1,d[h][1]*=-1,d[h][2]*=-1;a[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(a[0]=-a[0]);d[0][2]>d[2][0]&&(a[1]=-a[1]);d[1][0]>d[0][1]&&(a[2]=-a[2])}(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(ca).reduce(ua),e,n,r,i,a),[[e,n,r,a,i]]}var ha=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],f=r[2],r=r[3],h=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],f=(h[0][0]=1-2*(u*u+f*f),h[0][1]=2*(c*u-f*r),h[0][2]=2*(c*f+u*r),h[1][0]=2*(c*u+f*r),h[1][1]=1-2*(c*c+f*f),h[1][2]=2*(u*f-c*r),h[2][0]=2*(c*f-u*r),h[2][1]=2*(u*f+c*r),h[2][2]=1-2*(c*c+u*u),a=da(a,h),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(f[2][1]=n[2],a=da(a,f)),n[1]&&(f[2][1]=0,f[2][0]=n[0],a=da(a,f)),n[0]&&(f[2][0]=0,f[1][0]=n[0],a=da(a,f));for(var d=0;d<3;d++)for(var p=0;p<3;p++)a[d][p]*=e[d];return 0==(r=a)[0][2]&&0==r[0][3]&&0==r[1][2]&&0==r[1][3]&&0==r[2][0]&&0==r[2][1]&&1==r[2][2]&&0==r[2][3]&&0==r[3][2]&&1==r[3][3]?[a[0][0],a[0][1],a[1][0],a[1][1],a[3][0],a[3][1]]:a[0].concat(a[1],a[2],a[3])};function da(t,e){for(var n=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],r=0;r<4;r++)for(var i=0;i<4;i++)for(var a=0;a<4;a++)n[r][i]+=e[r][a]*t[a][i];return n}function pa(t){return t.toFixed(6).replace(".000000","")}function ga(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=fa(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=fa(n)),null===r[0]||null===i[0]?[[!1],[!0],function(t){return(t?n:e)[0].d}]:(r[0].push(0),i[0].push(1),[r,i,function(t){var e=function(t,e,n){var r=function(t,e){for(var n=0,r=0;r<t.length;r++)n+=t[r]*e[r];return n}(t,e),i=(r=Ge(r,-1,1),[]);if(1===r)i=t;else for(var a=Math.acos(r),o=+Math.sin(n*a)/Math.sqrt(1-r*r),s=0;s<4;s++)i.push(t[s]*(Math.cos(n*a)-r*o)+e[s]*o);return i}(r[0][3],i[0][3],t[5]);return ha(t[0],t[1],t[2],e,t[4]).map(pa).join(",")}])}function ya(t){return t.replace(/[xy]/,"")}function ma(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var va=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function ba(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var n=0;n<r.length;n++)!function(t){var t=r[t],e=t.t,t=t.d,n="scale"===e.substring(0,5)?1:0;i.push({t:e,d:t.map(function(t){return"number"==typeof t?Ei(n):Ei(n,t.unit)})})}(n)}var a=[],o=[],s=[];if(r.length!==i.length)var l=ga(r,i),a=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,f=i[c].t,h=r[c].d,d=i[c].d,p=sa[u],g=sa[f],y=void 0;if(va(u,f)){var m=ga([r[c]],[i[c]]);a.push(m[0]),o.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===f)y=u;else if(p[2]&&g[2]&&ya(u)===ya(f))y=ya(u),h=p[2](h),d=g[2](d);else{if(!p[1]||!g[1]||ma(u)!==ma(f)){m=ga(r,i);a=[m[0]],o=[m[1]],s=[["matrix",[m[2]]]];break}y=ma(u),h=p[1](h),d=g[1](d)}for(var v=[],b=[],x=[],w=0;w<h.length;w++){var k=function(t,e,n,r,i){void 0===i&&(i=0);var a="",o=t.value||0,s=e.value||0,l=ci(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=Kr(t.unit)):(ui.isLength(t.unit)||ui.isLength(e.unit))&&(o=Vi(t,i,n),s=Vi(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(h[w],d[w],t,!1,w);v[w]=k[0],b[w]=k[1],x.push(k[2])}a.push(v),o.push(b),s.push([y,x])}}return e&&(l=a,a=o,o=l),[a,o,function(t){return t.map(function(t,n){t=t.map(function(t,e){return s[n][1][e](t)}).join(",");return"matrix"===s[n][0]&&16===t.split(",").length&&(s[n][0]="matrix3d"),"matrix3d"===s[n][0]&&6===t.split(",").length&&(s[n][0]="matrix"),s[n][0]+"("+t+")"}).join(" ")}]}var xa=Ze(function(t){var e;return ze(t)?"text-anchor"===t?[Ei(0,"px"),Ei(0,"px")]:(1===(e=t.split(" ")).length&&("top"===e[0]||"bottom"===e[0]?(e[1]=e[0],e[0]="center"):e[1]="center"),2!==e.length?null:[zi(wa(e[0])),zi(wa(e[1]))]):[Ei(t[0]||0,"px"),Ei(t[1]||0,"px")]});function wa(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var e=function(){function t(){this.parser=Gi,this.mixer=$i}return t.prototype.calculator=function(t,e,n,r){return Wi(n)},t}(),n=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof ei&&(n=null),M.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&M.sceneGraphService.dirtifyToRoot(t)}),n},t}(),r=function(){function t(){this.parser=Ii,this.mixer=Ri}return t.prototype.calculator=function(t,e,n,r){return n instanceof ei?"none"===n.value?Oi:_i:n},t}(),ka=function(){function t(){this.parser=Ui}return t.prototype.calculator=function(t,e,n){return n instanceof ei?[]:n},t}();function Ma(t){t=t.parsedStyle.fontSize;return Pe(t)?null:t}function Oa(){this.parser=xa}var _a,Sa,Ea=function(){function t(){this.parser=zi,this.mixer=$i}return t.prototype.calculator=function(t,e,n,r,i){if(!ui.isRelativeUnit(n.unit))return n.value;if(n.unit===s.kPercentage)return 0;if(n.unit===s.kEms){if(r.parentNode){var a=Ma(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===s.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=Ma(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),Aa=function(){function t(){this.mixer=Ji}var e=t.prototype;return e.parser=function(t){t=Hi(We(t)?[t]:t),t=1===t.length?[t[0],t[0]]:[t[0],t[1]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),Ta=function(){function t(){this.mixer=Ji}var e=t.prototype;return e.parser=function(t){t=Hi(We(t)?[t]:t),t=1===t.length?[t[0],t[0],t[0],t[0]]:2===t.length?[t[0],t[1],t[0],t[1]]:3===t.length?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]];return t},e.calculator=function(t,e,n){return n.map(function(t){return t.value})},t}(),Pa=function(t){function e(){return t.apply(this,arguments)||this}return Wr(e,t),e.prototype.postProcessor=function(t){var e,n,r;switch(t.nodeName){case k.CIRCLE:case k.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;Pe(a)||(l=a),Pe(i)||(c=i);break;case k.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case k.RECT:case k.IMAGE:case k.GROUP:case k.HTML:case k.TEXT:case k.MESH:Pe(t.parsedStyle.x)||(l=t.parsedStyle.x),Pe(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==k.PATH&&t.nodeName!==k.POLYLINE&&t.nodeName!==k.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),Pe(l)&&Pe(c)&&Pe(u)||(e=(r=t.getLocalPosition())[0],n=r[1],r=r[2],t.setLocalPosition(Pe(l)?e:l,Pe(c)?n:c,Pe(u)?r:u))},e}(Ea),Na=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof ei?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),La=function(){function t(){this.mixer=$i,this.parser=Ki}return t.prototype.calculator=function(t,e,n){return n.value},t}(),i=function(){function t(){this.parser=Ki,this.mixer=Zi(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==k.LINE&&e!==k.PATH&&e!==k.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),Ca=function(){function t(){this.parser=Ki,this.mixer=Zi(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),ja=function(){function t(){this.parser=ea,this.mixer=na}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof ei&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Ar(0,0,0,0)}:n},e.postProcessor=function(t){var e,n;t.nodeName===k.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))},t}(),Fa=function(){function t(){this.parser=ra}return t.prototype.postProcessor=function(t){var e,n;t.nodeName!==k.POLYGON&&t.nodeName!==k.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))},t}(),Ia=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).mixer=Zi(0,1/0),t}return Wr(t,i),t}(Ea),Ra=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof ei?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),Ba=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){var i,a=r.getAttribute("text");return a&&(i=a,"capitalize"===n.value?i=a.charAt(0).toUpperCase()+a.slice(1):"lowercase"===n.value?i=a.toLowerCase():"uppercase"===n.value&&(i=a.toUpperCase()),r.parsedStyle.text=i),n.value},t}(),Da=function(){function t(){this.parser=la,this.mixer=ba}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof ei?[]:n},e.postProcessor=function(t){var l,c,e=t.parsedStyle.transform,u=t;e&&e.length&&(c=l=0,u?(l=u.parsedStyle.defX||0,c=u.parsedStyle.defY||0,u.resetLocalTransform(),u.setLocalPosition(l,c)):u=new to({}),e.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],u.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],u.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],u.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],u.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],u.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[bi,bi],u.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[bi],u.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[bi],u.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[bi],u.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[bi,bi,bi],u.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[xi],u.rotateLocal(0,0,o[0].value)):"rotatex"===s?(o=t||[xi],u.rotateLocal(o[0].value,0,0)):"rotatey"===s?(o=t||[xi],u.rotateLocal(0,o[0].value,0)):"rotatez"===s?(o=t||[xi],u.rotateLocal(0,0,o[0].value)):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],u.setLocalSkew(ao(o[0]),ao(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],u.setLocalSkew(ao(o[0]),u.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],u.setLocalSkew(u.getLocalSkew()[0],ao(o[0]))):"matrix"===s?(e=(o=t.map(function(t){return t.value}))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],u.setLocalTransform(H(go,e,n,0,0,r,i,0,0,0,0,1,0,a+l,o+c,0,1))):"matrix3d"===s&&(H.apply(xt,[go].concat(t.map(function(t){return t.value}))),go[12]+=l,go[13]+=c,u.setLocalTransform(go)))})),u.getLocalTransform()},t}(),za=function(){function t(){this.parser=Ki}var e=t.prototype;return e.calculator=function(t,e,n,r){return n.value},e.postProcessor=function(t){var e;t.parentNode&&(e=(t=t.parentNode).renderable,t=t.sortable,e&&(e.dirty=!0),t)&&(t.dirty=!0)},t}(),Ga=function(){function e(t){this.type=void 0,this.eventPhase=e.prototype.NONE,this.target=void 0,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.currentTarget=void 0,this.defaultPrevented=!1,this.timeStamp=void 0,this.nativeEvent=void 0,this.originalEvent=void 0,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.manager=void 0,this.detail=void 0,this.layer=new Er,this.page=new Er,this.canvas=new Er,this.viewport=new Er,this.path=void 0,this.view=void 0,this.which=void 0,this.returnValue=void 0,this.srcElement=void 0,this.composed=!1,this.isTrusted=void 0,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}var t=e.prototype;return t.composedPath=function(){return!this.manager||this.path&&this.path[0]===this.target||(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path},t.preventDefault=function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0},t.stopImmediatePropagation=function(){this.propagationImmediatelyStopped=!0},t.stopPropagation=function(){this.propagationStopped=!0},t.initEvent=function(){},t.initUIEvent=function(){},t.clone=function(){throw new Error(Br)},zr(e,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"propagationPath",get:function(){return this.composedPath()}}]),e}(),Wa=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(Vr(n),e),n}return Wr(t,r),t}(Ga),Ha=function(i){function d(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}Wr(d,i),d.isNode=function(t){return!!t.childNodes};var t=d.prototype;return t.getRootNode=function(t){return void 0===t&&(t={}),this.parentNode?this.parentNode.getRootNode(t):t.composed&&this.host?this.host.getRootNode(t):this},t.hasChildNodes=function(){return 0<this.childNodes.length},t.isDefaultNamespace=function(t){throw new Error(Br)},t.lookupNamespaceURI=function(t){throw new Error(Br)},t.lookupPrefix=function(t){throw new Error(Br)},t.normalize=function(){throw new Error(Br)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,f=s[c],h=o[l+c];if(h!==f)return(u=f.parentNode.childNodes).indexOf(f)<u.indexOf(h)?s===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING:o===e?d.DOCUMENT_POSITION_PRECEDING:d.DOCUMENT_POSITION_FOLLOWING}return d.DOCUMENT_POSITION_FOLLOWING},t.contain=function(t){return this.contains(t)},t.contains=function(t){for(var e=t;e&&this!==e;)e=e.parentNode;return!!e},t.getAncestor=function(t){for(var e=this;0<t&&e;)e=e.parentNode,t--;return e},t.forEach=function(e){e(this)||this.childNodes.forEach(function(t){t.forEach(e)})},zr(d,[{key:"textContent",get:function(){var t="";this.nodeName===k.TEXT&&(t+=this.style.text);for(var e=Yr(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===k.TEXT?t+=n.nodeValue:t+=n.textContent}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===k.TEXT&&(this.style.text=""+t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}}]),d}(function(){function t(){this.emitter=new pr}var e=t.prototype;return e.on=function(t,e,n){return this.addEventListener(t,e,n),this},e.addEventListener=function(t,e,n){var r,i,a,o=qe(n)&&n||je(n)&&n.capture,n=je(n)&&n.once,s=Lr(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],c=i,l=!0),t=o?t+"capture":t,e=Lr(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,n=qe(n)&&n||je(n)&&n.capture,i=Lr(e)?void 0:e;return e=Lr(e)?e:null==(r=e)?void 0:r.handleEvent,this.emitter.off(t=n?t+"capture":t,e,i),this},e.emit=function(t,e){this.dispatchEvent(new Wa(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!(t instanceof Ga))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");var n;if(n=this.document?this:this.defaultView||(null==(n=this.ownerDocument)?void 0:n.defaultView)){if(t.manager=n.getEventService()||null,!t.manager)return!1;t.defaultPrevented=!1,t.path=[],e||(t.target=this),null!=(n=t.manager)&&n.dispatchEvent(t,t.type,e)}return!t.defaultPrevented},t}()),Va=(Ha.DOCUMENT_POSITION_DISCONNECTED=1,Ha.DOCUMENT_POSITION_PRECEDING=2,Ha.DOCUMENT_POSITION_FOLLOWING=4,Ha.DOCUMENT_POSITION_CONTAINS=8,Ha.DOCUMENT_POSITION_CONTAINED_BY=16,Ha.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,_a=_a||{},_a[_a.Standard=0]="Standard",(Ka=Sa=Sa||{}).DESTROY="destroy",Ka.ATTR_MODIFIED="DOMAttrModified",Ka.INSERTED="DOMNodeInserted",Ka.REMOVED="removed",Ka.MOUNTED="DOMNodeInsertedIntoDocument",Ka.UNMOUNTED="DOMNodeRemovedFromDocument",Ka.BOUNDS_CHANGED="bounds-changed",Ka.RENDER_ORDER_CHANGED="render-order-changed",Ka.CULLED="culled",function(c){function t(t,e,n,r,i,a,o,s){var l=c.call(this,null)||this;return l.relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return Wr(t,c),t}(Ga)),qa=(Va.ADDITION=2,Va.MODIFICATION=1,Va.REMOVAL=3,0),Ya=new Va(Sa.INSERTED,null,"","","",0,"",""),Ua=new Va(Sa.REMOVED,null,"","","",0,"",""),Xa=new Wa(Sa.DESTROY),Ka=function(i){function t(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))||this).entity=qa++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:_a.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:b(0,0,0),localRotation:Wt(0,0,0,1),localScale:b(1,1,1),localTransform:G(),localSkew:Yt(0,0),position:b(0,0,0),rotation:Wt(0,0,0,1),scaling:b(1,1,1),worldTransform:G(),origin:b(0,0,0)},t.sortable={dirty:!1,sorted:void 0,lastSortedIndex:void 0,renderOrder:0},t.geometry={contentBounds:void 0,renderBounds:void 0},t.rBushNode={aabb:void 0},t.id=void 0,t.name=void 0,t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={anchor:ki,opacity:ki,fillOpacity:ki,strokeOpacity:ki,fill:ki,stroke:ki,transform:ki,transformOrigin:ki,visibility:ki,pointerEvents:ki,lineWidth:ki,lineCap:ki,lineJoin:ki,increasedLineWidthForHitTesting:ki,fontSize:ki,fontFamily:ki,fontStyle:ki,fontWeight:ki,fontVariant:ki,textAlign:ki,textBaseline:ki,textTransform:ki,zIndex:ki,filter:ki,shadowType:ki},t.parsedStyle={},t.attributes={},t}Wr(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(Br)},e.appendChild=function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return M.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),Ya.relatedNode=this,t.dispatchEvent(Ya),t},e.insertBefore=function(t,e){return e?(e=this.childNodes.indexOf(e),this.appendChild(t,e-1)):this.appendChild(t),t},e.replaceChild=function(t,e){var n=this.childNodes.indexOf(e);return this.removeChild(e),this.appendChild(t,n),e},e.removeChild=function(t){var e;return Ua.relatedNode=this,t.dispatchEvent(Ua),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),M.sceneGraphService.detach(t),t},e.removeChildren=function(){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)})},e.destroyChildren=function(){this.childNodes.slice().forEach(function(t){t.destroyChildren(),t.destroy()})},e.matches=function(t){return M.sceneGraphService.matches(t,this)},e.getElementById=function(t){return M.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return M.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return M.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return M.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return M.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return M.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(M.sceneGraphService.matches(t,e))return e}while(null!==(e=e.parentElement));return null},e.find=function(e){var n=this,r=null;return this.forEach(function(t){return!(t===n||!e(t)||(r=t,0))}),r},e.findAll=function(e){var n=this,r=[];return this.forEach(function(t){t!==n&&e(t)&&r.push(t)}),r},e.after=function(){var r=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach(function(t,e){var n;return null==(n=r.parentNode)?void 0:n.appendChild(t,i+e+1)})}},e.before=function(){if(this.parentNode){for(var t=this.parentNode.childNodes.indexOf(this),e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=n[0],a=n.slice(1);this.parentNode.appendChild(i,t),i.after.apply(i,a)}},e.replaceWith=function(){this.after.apply(this,arguments),this.remove()},e.append=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){return e.appendChild(t)})},e.prepend=function(){for(var n=this,t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];e.forEach(function(t,e){return n.appendChild(t,e)})},e.replaceChildren=function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)},e.remove=function(){return this.parentNode?this.parentNode.removeChild(this):this},e.destroy=function(){this.dispatchEvent(Xa),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return M.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return M.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return M.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return M.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return M.sceneGraphService.getBoundingClientRect(this)},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.computedStyleMap=function(){return new Map(Object.entries(this.computedStyle))},e.getAttributeNames=function(){return Object.keys(this.attributes)},e.getAttribute=function(t){var e=this.attributes[t];return void 0===e&&(t=jr(t),e=this.attributes[t],Pe(e))?null:e},e.hasAttribute=function(t){return this.getAttributeNames().includes(t)},e.hasAttributes=function(){return!!this.getAttributeNames().length},e.removeAttribute=function(t){this.setAttribute(t,null),delete this.attributes[t]},e.setAttribute=function(t,e,n){this.attributes[t]=e},e.getAttributeNS=function(t,e){throw new Error(Br)},e.getAttributeNode=function(t){throw new Error(Br)},e.getAttributeNodeNS=function(t,e){throw new Error(Br)},e.hasAttributeNS=function(t,e){throw new Error(Br)},e.removeAttributeNS=function(t,e){throw new Error(Br)},e.removeAttributeNode=function(t){throw new Error(Br)},e.setAttributeNS=function(t,e,n){throw new Error(Br)},e.setAttributeNode=function(t){throw new Error(Br)},e.setAttributeNodeNS=function(t){throw new Error(Br)},e.toggleAttribute=function(t,e){throw new Error(Br)},zr(t,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(t){this.setAttribute("class",t)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(t){return""!==t})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t+1])||null}},{key:"previousSibling",get:function(){var t;return this.parentNode&&(t=this.parentNode.childNodes.indexOf(this),this.parentNode.childNodes[t-1])||null}}]),t}(Ha),$a=new Va(Sa.ATTR_MODIFIED,null,null,null,null,Va.MODIFICATION,null,null),Za={anchor:"",opacity:"",fillOpacity:"",strokeOpacity:"",fill:"",stroke:"",transform:"",transformOrigin:"",visibility:"",pointerEvents:"",lineWidth:"",lineCap:"",lineJoin:"",increasedLineWidthForHitTesting:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",zIndex:"",filter:"",shadowType:""},Ja={anchor:[0,0],fill:Oi,stroke:Oi,transform:[],zIndex:0,filter:[],shadowType:"outer"},Qa=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],to=function(i){function o(t){var r=i.call(this)||this;return r.config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||k.GROUP,r.config.style=Gr({},r.config.style,r.config.attrs),null!=r.config.visible&&(r.config.style.visibility=!1===r.config.visible?"hidden":"visible"),null!=r.config.interactive&&(r.config.style.pointerEvents=!1===r.config.interactive?"none":"auto"),Object.assign(r.parsedStyle,Ja,r.config.initialParsedStyle),Object.assign(r.attributes,Za),r.initAttributes(r.config.style),r.style=new Proxy({setProperty:function(t,e){r.setAttribute(t,e)},getPropertyValue:function(t){return r.getAttribute(t)},removeProperty:function(t){r.removeAttribute(t)},item:function(){return""}},{get:function(t,e){return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute(e,n),!0}}),M.displayObjectPool.add(r.entity,Vr(r)),r}Wr(o,i);var t=o.prototype;return t.destroy=function(){i.prototype.destroy.call(this),M.displayObjectPool.remove(this.entity),this.getAnimations().forEach(function(t){t.cancel()})},t.cloneNode=function(e,t){var n,r=Gr({},this.attributes);for(n in r){var i=r[n];i instanceof o&&"clipPath"!==n&&"offsetPath"!==n&&"textPath"!==n&&(r[n]=i.cloneNode(e)),t&&(r[n]=t(n,i))}var a=new this.constructor({id:this.id,name:this.name,className:this.name,interactive:this.interactive,style:r});return a.setLocalTransform(this.getLocalTransform()),e&&this.children.forEach(function(t){t.style.isMarker||(t=t.cloneNode(e),a.appendChild(t))}),a},t.initAttributes=function(t){var e=this.renderable;M.styleValueRegistry.processProperties(this,t=void 0===t?{}:t,{forceUpdateGeometry:!0,usedAttributes:Qa}),e.dirty=!0},t.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=jr(t);Ye(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),i.prototype.setAttribute.call(this,t,e))},t.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r=this.renderable,i=this.attributes[t],a=this.parsedStyle[t],o=(M.styleValueRegistry.processProperties(this,((o={})[t]=e,o),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&($a.relatedNode=this,$a.prevValue=i,$a.newValue=e,$a.attrName=t,$a.prevParsedValue=a,$a.newParsedValue=o,this.isMutationObserved?this.dispatchEvent($a):($a.target=this).ownerDocument.defaultView.dispatchEvent($a,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,a,o)},t.getBBox=function(){var t=this.getBounds(),e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return new Ar(n,e,r-n,t-e)},t.setOrigin=function(t,e,n){return M.sceneGraphService.setOrigin(this,io(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getOrigin=function(){return M.sceneGraphService.getOrigin(this)},t.setPosition=function(t,e,n){return M.sceneGraphService.setPosition(this,io(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.setLocalPosition=function(t,e,n){return M.sceneGraphService.setLocalPosition(this,io(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translate=function(t,e,n){return M.sceneGraphService.translate(this,io(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.translateLocal=function(t,e,n){return M.sceneGraphService.translateLocal(this,io(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},t.getPosition=function(){return M.sceneGraphService.getPosition(this)},t.getLocalPosition=function(){return M.sceneGraphService.getLocalPosition(this)},t.scale=function(t,e,n){return this.scaleLocal(t,e,n)},t.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=io(t,e=e||t,n=n||t)),M.sceneGraphService.scaleLocal(this,t),this},t.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=io(t,e=e||t,n=n||t)),M.sceneGraphService.setLocalScale(this,t),this},t.getLocalScale=function(){return M.sceneGraphService.getLocalScale(this)},t.getScale=function(){return M.sceneGraphService.getScale(this)},t.getEulerAngles=function(){return oo(so(m(),M.sceneGraphService.getWorldTransform(this))[2])},t.getLocalEulerAngles=function(){return oo(so(m(),M.sceneGraphService.getLocalRotation(this))[2])},t.setEulerAngles=function(t){return M.sceneGraphService.setEulerAngles(this,0,0,t),this},t.setLocalEulerAngles=function(t){return M.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},t.rotateLocal=function(t,e,n){return Pe(e)&&Pe(n)?M.sceneGraphService.rotateLocal(this,0,0,t):M.sceneGraphService.rotateLocal(this,t,e,n),this},t.rotate=function(t,e,n){return Pe(e)&&Pe(n)?M.sceneGraphService.rotate(this,0,0,t):M.sceneGraphService.rotate(this,t,e,n),this},t.setRotation=function(t,e,n,r){return M.sceneGraphService.setRotation(this,t,e,n,r),this},t.setLocalRotation=function(t,e,n,r){return M.sceneGraphService.setLocalRotation(this,t,e,n,r),this},t.setLocalSkew=function(t,e){return M.sceneGraphService.setLocalSkew(this,t,e),this},t.getRotation=function(){return M.sceneGraphService.getRotation(this)},t.getLocalRotation=function(){return M.sceneGraphService.getLocalRotation(this)},t.getLocalSkew=function(){return M.sceneGraphService.getLocalSkew(this)},t.getLocalTransform=function(){return M.sceneGraphService.getLocalTransform(this)},t.getWorldTransform=function(){return M.sceneGraphService.getWorldTransform(this)},t.setLocalTransform=function(t){return M.sceneGraphService.setLocalTransform(this,t),this},t.resetLocalTransform=function(){M.sceneGraphService.resetLocalTransform(this)},t.getAnimations=function(){return this.activeAnimations},t.animate=function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null},t.isVisible=function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)},t.isInteractive=function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)},t.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},t.toFront=function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))+1),this},t.toBack=function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,this.parentNode.children.map(function(t){return Number(t.style.zIndex)}))-1),this},t.getConfig=function(){return this.config},t.attr=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1];return i?je(i)?(Object.keys(i).forEach(function(t){e.setAttribute(t,i[t])}),this):2===n.length?(this.setAttribute(i,a),this):this.attributes[i]:this.attributes},t.getMatrix=function(t){var t=t||this.getWorldTransform(),e=ut(m(),t),n=e[0],e=e[1],r=ft(m(),t),i=r[0],r=r[1],t=ht(Rt(),t),t=so(m(),t),a=t[0],t=t[2],o=(a=a||t,t=n,n=e,e=i,i=r,r=Math.cos(a),a=Math.sin(a),e*r),s=i*a,l=0,e=-e*a,a=i*r,i=0,r=t,t=n,n=1,c=new B(9);return c[0]=o,c[1]=s,c[2]=l,c[3]=e,c[4]=a,c[5]=i,c[6]=r,c[7]=t,c[8]=n,c},t.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},t.setMatrix=function(t){var t=lo(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setEulerAngles(t).setPosition(e,n).setLocalScale(r,i)},t.setLocalMatrix=function(t){var t=lo(t),e=t[0],n=t[1],r=t[2],i=t[3],t=t[4];this.setLocalEulerAngles(t).setLocalPosition(e,n).setLocalScale(r,i)},t.show=function(){this.style.visibility="visible"},t.hide=function(){this.style.visibility="hidden"},t.getCount=function(){return this.childElementCount},t.getParent=function(){return this.parentElement},t.getChildren=function(){return this.children},t.getFirst=function(){return this.firstElementChild},t.getLast=function(){return this.lastElementChild},t.getChildByIndex=function(t){return this.children[t]||null},t.add=function(t,e){return this.appendChild(t,e)},t.setClip=function(t){this.style.clipPath=t},t.set=function(t,e){this.config[t]=e},t.get=function(t){return this.config[t]},t.moveTo=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},t.move=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},t.setZIndex=function(t){return this.style.zIndex=t,this},zr(o,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),o}(Ka),eo={},no=[],Ha=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return eo[t]},e.getAll=function(){return Object.keys(eo).map(function(t){return eo[t]})},e.add=function(t,e){(eo[t]=e).nodeName===k.HTML&&no.push(e)},e.remove=function(t){var e=eo[t];e&&(delete eo[t],e.nodeName===k.HTML)&&(t=no.indexOf(e),no.splice(t,1))},e.getHTMLs=function(){return no},t}();function ro(t){return void 0===t?0:360<t||t<-360?t%360:t}function io(t,e,n){var r,i;return void 0===e&&(e=0),void 0===n&&(n=0),We(t)?b(t,e,n):Array.isArray(t)&&3===t.length?(r=t,(i=new B(3))[0]=r[0],i[1]=r[1],i[2]=r[2],i):b(t[0],t[1]||e,t[2]||n)}function ao(t){return t*(Math.PI/180)}function oo(t){return t*(180/Math.PI)}function so(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=ft(m(),r))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/l,r[10]/c),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/l,r[5]/l)):(a=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(a=c*c))<(t=s*c-r*l)?(o[0]=Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):t<-.499995*n?(o[0]=-Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):(o[0]=Math.asin(2*(s*l-c*r)),o[1]=Math.atan2(2*(s*c+r*l),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),o);var n,r,i,a,o,s,l,c,u}function lo(t){var e=t[0],n=t[1],r=t[3],i=t[4],a=Math.sqrt(e*e+n*n),o=Math.sqrt(r*r+i*i);e*i-n*r<0&&(e<i?a=-a:o=-o),a&&(e*=1/a,n*=1/a);r=oo(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var co=G(),uo=G(),fo=Ft(),d=[m(),m(),m()],ho=m();function po(t,e,n,r,i){t[0]=e[0]*r+n[0]*i,t[1]=e[1]*r+n[1]*i,t[2]=e[2]*r+n[2]*i}var go=G();yo={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},mo="";var yo,mo,vo=function(t){return mo=t,xo()};function bo(t){throw new Error(mo+": "+t)}function xo(){var t=Po(wo);return 0<mo.length&&bo("Invalid input not EOF"),t}function wo(){return ko("linear-gradient",yo.linearGradient,Oo)||ko("repeating-linear-gradient",yo.repeatingLinearGradient,Oo)||ko("radial-gradient",yo.radialGradient,_o)||ko("repeating-radial-gradient",yo.repeatingRadialGradient,_o)||ko("conic-gradient",yo.conicGradient,_o)}function ko(n,t,r){return Mo(t,function(t){var e=r();return e&&!Ro(yo.comma)&&bo("Missing comma before color stops"),{type:n,orientation:e,colorStops:Po(No)}})}function Mo(t,e){t=Ro(t);if(t)return Ro(yo.startCall)||bo("Missing ("),e=e(t),Ro(yo.endCall)||bo("Missing )"),e}function Oo(){return Io("directional",yo.sideOrCorner,1)||Io("angular",yo.angleValue,1)}function _o(){var t,e,n=So();return n&&((t=[]).push(n),e=mo,Ro(yo.comma))&&((n=So())?t.push(n):mo=e),t}function So(){var t,e=function(){var t=Io("shape",/^(circle)/i,0);t&&(t.style=Fo()||Eo());return t}()||function(){var t=Io("shape",/^(ellipse)/i,0);t&&(t.style=Co()||Eo());return t}();return e?e.at=Ao():(t=Eo())?(e=t,(t=Ao())&&(e.at=t)):(t=To())&&(e={type:"default-radial",at:t}),e}function Eo(){return Io("extent-keyword",yo.extentKeywords,1)}function Ao(){var t;if(Io("position",/^at/,0))return(t=To())||bo("Missing positioning value"),t}function To(){var t={x:Co(),y:Co()};if(t.x||t.y)return{type:"position",value:t}}function Po(t){var e=t(),n=[];if(e)for(n.push(e);Ro(yo.comma);)(e=t())?n.push(e):bo("One extra comma");return n}function No(){var t=Io("hex",yo.hexColor,1)||Mo(yo.rgbaColor,function(){return{type:"rgba",value:Po(Lo)}})||Mo(yo.rgbColor,function(){return{type:"rgb",value:Po(Lo)}})||Io("literal",yo.literalColor,0);return t||bo("Expected color definition"),t.length=Co(),t}function Lo(){return Ro(yo.number)[1]}function Co(){return Io("%",yo.percentageValue,1)||jo()||Fo()}function jo(){return Io("position-keyword",yo.positionKeywords,1)}function Fo(){return Io("px",yo.pixelValue,1)||Io("em",yo.emValue,1)}function Io(t,e,n){e=Ro(e);if(e)return{type:t,value:e[n]}}function Ro(t){var e=/^[\n\r\t\s]+/.exec(mo),e=(e&&Bo(e[0].length),t.exec(mo));return e&&Bo(e[0].length),e}function Bo(t){mo=mo.substring(t)}function Do(t,e){return t[0]===e[0]&&t[1]===e[1]}function zo(t,e){var n,r=t.prePoint,i=t.currentPoint,t=t.nextPoint,a=Math.pow(i[0]-r[0],2)+Math.pow(i[1]-r[1],2),o=Math.pow(i[0]-t[0],2)+Math.pow(i[1]-t[1],2),r=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),r=Math.acos((a+o-r)/(2*Math.sqrt(a)*Math.sqrt(o)));return!r||0===Math.sin(r)||(void(a=0)===n&&(n=1e-5),Math.abs(r-a)<n)?{xExtra:0,yExtra:0}:(o=Math.abs(Math.atan2(t[1]-i[1],t[0]-i[0])),a=Math.abs(Math.atan2(t[0]-i[0],t[1]-i[1])),o=o>Math.PI/2?Math.PI-o:o,a=a>Math.PI/2?Math.PI-a:a,{xExtra:Math.cos(r/2-o)*(e/2*(1/Math.sin(r/2)))-e/2||0,yExtra:Math.cos(a-r/2)*(e/2*(1/Math.sin(r/2)))-e/2||0})}function Go(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function Wo(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=ao(r=He(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=Ho({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=Ho(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var Ho=function(t,e){var n=t.x*e.x+t.y*e.y,r=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2)));return(t.x*e.y-t.y*e.x<0?-1:1)*Math.acos(n/r)};function Vo(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=Wo({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=Wo({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function qo(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Yo(t,e){return qo(t)*qo(e)?(t[0]*e[0]+t[1]*e[1])/(qo(t)*qo(e)):1}function Uo(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Yo(t,e))}Ka=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+=this.getInterceptor(o)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=Yr(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}o+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError"+t+" = false;\ntry {\n"),o+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",a||(o=(o=(o=o+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),a||(o+="}\n");break;case"async":var f=(f=(f="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(f+=r("_result"+t)),i&&(f+=i()),o+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:f=f+"}\n"+"})"})+");\n";break;case"promise":o=(o=(o=(o+="var _hasResult"+t+" = false;\n")+("var _promise"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n"))+("if (!_promise"+t+" || !_promise"+t+".then)\n")+(" throw new Error('Tap function (tapPromise) did not return promise (returned ' + _promise"+t+" + ')');\n"))+("_promise"+t+".then((function(_result"+t+") {\n")+("_hasResult"+t+" = true;\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),o=(o=o+("}), function(_err"+t+") {\n")+("if(_hasResult"+t+") throw _err"+t+";\n"))+n("_err"+t)+"});\n"}return o},e.callTapsSeries=function(t){var a=this,o=t.onError,s=t.onResult,e=t.resultReturns,l=t.onDone,n=t.doneReturns,c=t.rethrowIfPossible;if(0===this.options.taps.length)return l();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),f=e||n,h="",d=l,p=0,r=function(t){function e(t){return t?"":l()}var n=t,r=(d!==l&&("sync"!==a.options.taps[n].type||20<p++)&&(p=0,h=(h+="function _next"+n+"() {\n")+d()+"}\n",d=function(){return(f?"return ":"")+"_next"+n+"();\n"}),d),i=a.callTap(n,{onError:function(t){return o(n,t,r,e)},onResult:s&&function(t){return s(n,t,r,e)},onDone:!s&&r,rethrowIfPossible:c&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return h+=d()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:o.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}();new(function(t){function e(){return t.apply(this,arguments)||this}return Wr(e,t),e.prototype.content=function(t){var i=t.onError,t=t.onDone;return this.callTapsParallel({onError:function(t,e,n,r){return i(e)+r(!0)},onDone:t})},e}(Ka)),new(function(t){function e(){return t.apply(this,arguments)||this}return Wr(e,t),e.prototype.content=function(t){var i=this,a=t.onError,e=t.onResult;return t.onDone,this.callTapsSeries({onError:function(t,e,n,r){return a(e)+r(!0)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])}})},e}(Ka)),new(function(t){function e(){return t.apply(this,arguments)||this}return Wr(e,t),e.prototype.content=function(t){var n=t.onError,e=t.onDone,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onDone:e,rethrowIfPossible:t})},e}(Ka));new(function(t){function e(){return t.apply(this,arguments)||this}return Wr(e,t),e.prototype.content=function(t){var i=this,n=t.onError,e=t.onResult,r=t.resultReturns,t=t.rethrowIfPossible;return this.callTapsSeries({onError:function(t,e){return n(e)},onResult:function(t,e,n){var r="";return(r+="if("+e+" !== undefined) {\n")+(i._args[0]+" = "+e+";\n")+"}\n"+n()},onDone:function(){return e(i._args[0])},doneReturns:r,rethrowIfPossible:t})},e}(Ka));var Xo=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Ko=/([\"\'])[^\'\"]+\1/;var $o,Zo,Jo,Qo=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:c.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:c.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:c.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:c.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:c.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:c.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:c.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:c.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:c.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:c.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:c.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:c.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:c.FILTER},{n:"clipPath",syntax:c.DEFINED_PATH},{n:"textPath",syntax:c.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:c.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===k.CIRCLE||t===k.ELLIPSE?"center":t===k.TEXT?"text-anchor":"left top"},l:!0,syntax:c.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===k.CIRCLE||t===k.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:c.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:c.COORDINATE},{n:"cy",int:!0,d:"0",syntax:c.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:c.COORDINATE},{n:"y",int:!0,d:"0",syntax:c.COORDINATE},{n:"z",int:!0,d:"0",syntax:c.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:c.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:c.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:c.COORDINATE},{n:"y1",int:!0,l:!0,syntax:c.COORDINATE},{n:"z1",int:!0,l:!0,syntax:c.COORDINATE},{n:"x2",int:!0,l:!0,syntax:c.COORDINATE},{n:"y2",int:!0,l:!0,syntax:c.COORDINATE},{n:"z2",int:!0,l:!0,syntax:c.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:c.PATH,p:50},{n:"points",l:!0,syntax:c.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:c.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:c.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:c.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:c.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:c.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:c.NUMBER,d:function(t){return t===k.PATH||t===k.POLYGON||t===k.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:c.MARKER},{n:"markerEnd",syntax:c.MARKER},{n:"markerMid",syntax:c.MARKER},{n:"markerStartOffset",syntax:c.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:c.LENGTH,l:!0,int:!0,d:"0"}],ts={},es=new WeakMap,ns={},rs=Ze(function(t){return t.sort(function(t,e){return ns[t]-ns[e]})}),is=m(),as=m(),os=m(),Ka=function(){function t(){var e=this;Qo.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){ns[t]=(ts[t]=e).p||0})},e.unregisterMetadata=function(t){delete ts[t]},e.getPropertySyntax=function(t){return M.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,r,t){var i=this,t=t=void 0===t?{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}:t,a=t.skipUpdateAttribute,e=t.skipParse,o=t.forceUpdateGeometry,t=t.usedAttributes,s=o,o=Object.keys(r);o.forEach(function(t){var e=jr(t);a||(n.attributes[e]=r[t]),!s&&null!=(t=ts[e])&&t.l&&(s=!0)}),e||o.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),(o=rs(null!=t&&t.length?Array.from(new Set(o.concat(t))):o)).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=i.computeProperty(t,n.computedStyle[t],n))}),s&&this.updateGeometry(n),o.forEach(function(t){t in n.parsedStyle&&i.postProcessProperty(t,n)}),n.children.length&&o.forEach(function(e){e in n.parsedStyle&&i.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})},e.parseProperty=function(t,e,n){var r,t=ts[t],i=e;return"unset"===(e=""!==e&&!Pe(e)?e:"unset")||"initial"===e||"inherit"===e?i=pi(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=pi(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=ts[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof ei){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))Pe(r)||(e=this.parseProperty(t,Lr(r)?r(n.nodeName):r,n));else if("inherit"===l)return s=this.tryToResolveProperty(n,t,{inherited:!0}),Pe(s)?void this.addUnresolveProperty(n,t):s}i=o&&this.getPropertySyntax(o);a=i&&i.calculator?(r=n.parsedStyle[t],i.calculator(t,r,e,n,this)):e instanceof ei?e.value:e}return a},e.postProcessProperty=function(t,e){var t=ts[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e)},e.addUnresolveProperty=function(t,e){var n=es.get(t);n||(es.set(t,[]),n=es.get(t)),-1===n.indexOf(e)&&n.push(e)},e.tryToResolveProperty=function(t,e,n){var n=(n=void 0===n?{}:n).inherited;if(n&&(t.parentElement&&function(t,e){t=es.get(t);return!t||0===t.length||t.includes(e)}(t.parentElement,e)))return"unset"===(n=t.parentElement.parsedStyle[e])||"initial"===n||"inherit"===n?void 0:n},e.recalc=function(e){var n,t=es.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),es.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,l,c,u,f,h,d,p,g,y,m,v=M.geometryUpdaterFactory[t.nodeName];v&&((s=t.geometry).contentBounds||(s.contentBounds=new Or),s.renderBounds||(s.renderBounds=new Or),e=t.parsedStyle,d=(v=v.update(e,t)).width,h=v.height,p=void 0===(p=v.depth)?0:p,f=void 0===(f=v.offsetX)?0:f,m=void 0===(m=v.offsetY)?0:m,v=void 0===(v=v.offsetZ)?0:v,n=d<0,r=h<0,p=Mt(is,Math.abs(d)/2,Math.abs(h)/2,p/2),l=e.stroke,c=e.lineWidth,u=e.increasedLineWidthForHitTesting,y=e.shadowType,g=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,t.nodeName===k.TEXT&&delete e.anchor,d=Mt(as,(1-2*(o&&o[0]||0))*d/2+f,(1-2*(o&&o[1]||0))*h/2+m,(1-2*(o&&o[2]||0))*p[2]+v),s.contentBounds.update(d,p),f=t.nodeName===k.POLYLINE||t.nodeName===k.POLYGON||t.nodeName===k.PATH?Math.SQRT2:.5,l&&!l.isNone&&Ot(p,p,Mt(os,h=((c||0)+(u||0))*f,h,0)),s.renderBounds.update(d,p),g&&y&&"inner"!==y&&(v=(m=s.renderBounds).min,l=m.max,c=e.shadowBlur||0,u=e.shadowOffsetX||0,f=e.shadowOffsetY||0,h=v[0]-c+u,d=l[0]+c+u,p=v[1]-c+f,g=l[1]+c+f,v[0]=Math.min(v[0],h),l[0]=Math.max(l[0],d),v[1]=Math.min(v[1],p),l[1]=Math.max(l[1],g),s.renderBounds.setMinMax(v,l)),i.forEach(function(t){var e,n,r,i,a,o=t.name,t=t.params;"blur"===o?(i=t[0].value,s.renderBounds.update(s.renderBounds.center,Ot(s.renderBounds.halfExtents,s.renderBounds.halfExtents,b(i,i,0)))):"drop-shadow"===o&&(i=t[0].value,o=t[1].value,t=t[2].value,e=(n=s.renderBounds).min,n=n.max,r=e[0]-t+i,i=n[0]+t+i,a=e[1]-t+o,t=n[1]+t+o,e[0]=Math.min(e[0],r),n[0]=Math.max(n[0],i),e[1]=Math.min(e[1],a),n[1]=Math.max(n[1],t),s.renderBounds.setMinMax(e,n))}),o=e.anchor,y=(n?-1:1)*Vi(a[0],0,t),m=(r?-1:1)*Vi(a[1],1,t),y-=(n?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,m-=(r?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(y,m),M.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=ts[t];return!!t&&t.inh},t}();(ls=$o=$o||{})[ls.ORBITING=0]="ORBITING",ls[ls.EXPLORING=1]="EXPLORING",ls[ls.TRACKING=2]="TRACKING",(ls=Zo=Zo||{})[ls.DEFAULT=0]="DEFAULT",ls[ls.ROTATIONAL=1]="ROTATIONAL",ls[ls.TRANSLATIONAL=2]="TRANSLATIONAL",ls[ls.CINEMATIC=3]="CINEMATIC",(ls=Jo=Jo||{})[ls.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",ls[ls.PERSPECTIVE=1]="PERSPECTIVE";var ss="updated",ls=function(){function t(){this.canvas=void 0,this.eventEmitter=new pr,this.matrix=G(),this.right=b(1,0,0),this.up=b(0,1,0),this.forward=b(0,0,1),this.position=b(0,0,1),this.focalPoint=b(0,0,0),this.distanceVector=b(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.left=void 0,this.rright=void 0,this.top=void 0,this.bottom=void 0,this.projectionMatrix=G(),this.projectionMatrixInverse=G(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=$o.EXPLORING,this.trackingMode=Zo.DEFAULT,this.projectionMode=Jo.PERSPECTIVE,this.frustum=new Sr,this.orthoMatrix=G()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===Jo.ORTHOGRAPHIC},e.getProjectionMode=function(){return this.projectionMode},e.getPerspective=function(){return this.jitteredProjectionMatrix||this.projectionMatrix},e.getPerspectiveInverse=function(){return this.projectionMatrixInverse},e.getFrustum=function(){return this.frustum},e.getPosition=function(){return this.position},e.getFocalPoint=function(){return this.focalPoint},e.getDollyingStep=function(){return this.dollyingStep},e.getNear=function(){return this.near},e.getFar=function(){return this.far},e.getZoom=function(){return this.zoom},e.getOrthoMatrix=function(){return this.orthoMatrix},e.getView=function(){return this.view},e.setEnableUpdate=function(t){this.enableUpdate=t},e.setType=function(t,e){return this.type=t,this.type===$o.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===$o.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==$o.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this},e.setWorldRotation=function(t){return this.rotateWorld=t,this._getAngles(),this},e.getViewTransform=function(){return Y(G(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=lt(G(),[t,e,0]);this.jitteredProjectionMatrix=X(G(),t,this.projectionMatrix)},e.clearJitterProjectionMatrix=function(){this.jitteredProjectionMatrix=void 0},e.setMatrix=function(t){return this.matrix=t,this._update(),this},e.setFov=function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this},e.setAspect=function(t){return this.setPerspective(this.near,this.far,this.fov,t),this},e.setNear=function(t){return this.projectionMode===Jo.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this},e.setFar=function(t){return this.projectionMode===Jo.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this},e.setViewOffset=function(t,e,n,r,i,a){return this.aspect=t/e,void 0===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.projectionMode===Jo.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.clearViewOffset=function(){return void 0!==this.view&&(this.view.enabled=!1),this.projectionMode===Jo.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this},e.setZoom=function(t){return this.zoom=t,this.projectionMode===Jo.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Jo.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this},e.setZoomByViewportPoint=function(t,e){var n=this.canvas.viewport2Canvas({x:e[0],y:e[1]}),r=n.x,n=n.y,i=this.roll,t=(this.rotate(0,0,-i),this.setPosition(r,n),this.setFocalPoint(r,n),this.setZoom(t),this.rotate(0,0,i),this.canvas.viewport2Canvas({x:e[0],y:e[1]})),i=b(t.x-r,t.y-n,0),e=At(i,this.right)/wt(this.right),r=At(i,this.up)/wt(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=Jo.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(ao(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,$(this.projectionMatrix,this.projectionMatrix,b(1,-1,1)),Y(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=Jo.ORTHOGRAPHIC,this.rright=e,this.left=t,this.top=n,this.bottom=r,this.near=i,this.far=a;var o,e=(this.rright-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.rright+this.left)/2,r=(this.top+this.bottom)/2,s=n-e,n=n+e,e=r+t,r=r-t;return null!=(t=this.view)&&t.enabled&&(t=(this.rright-this.left)/this.view.fullWidth/this.zoom,o=(this.top-this.bottom)/this.view.fullHeight/this.zoom,n=(s+=t*this.view.offsetX)+t*this.view.width,r=(e-=o*this.view.offsetY)-o*this.view.height),mt(this.projectionMatrix,s,n,r,e,i,a),$(this.projectionMatrix,this.projectionMatrix,b(1,-1,1)),Y(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=io(t,e=void 0===e?this.position[1]:e,n=void 0===n?this.position[2]:n);return this._setPosition(t),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this},e.setFocalPoint=function(t,e,n){void 0===e&&(e=this.focalPoint[1]),void 0===n&&(n=this.focalPoint[2]);var r,i=b(0,1,0);return this.focalPoint=io(t,e,n),this.trackingMode===Zo.CINEMATIC&&(t=(r=_t(m(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=wt(r),e=oo(Math.asin(e/r)),r=90+oo(Math.atan2(n,t)),st(n=G(),n,ao(r)),ot(n,n,ao(e)),i=Pt(m(),[0,1,0],n)),Y(this.matrix,vt(G(),this.position,this.focalPoint,i)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this},e.getDistance=function(){return this.distance},e.getDistanceVector=function(){return this.distanceVector},e.setDistance=function(t){var e,n,r;return this.distance===t||t<0||(this.distance=t,this.distance<2e-4&&(this.distance=2e-4),this.dollyingStep=this.distance/100,e=m(),t=this.distance,n=this.forward,r=this.focalPoint,e[0]=t*n[0]+r[0],e[1]=t*n[1]+r[1],e[2]=t*n[2]+r[2],this._setPosition(e),this.triggerUpdate()),this},e.setMaxDistance=function(t){return this.maxDistance=t,this},e.setMinDistance=function(t){return this.minDistance=t,this},e.setAzimuth=function(t){return this.azimuth=ro(t),this.computeMatrix(),this._getAxes(),this.type===$o.ORBITING||this.type===$o.EXPLORING?this._getPosition():this.type===$o.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=ro(t),this.computeMatrix(),this._getAxes(),this.type===$o.ORBITING||this.type===$o.EXPLORING?this._getPosition():this.type===$o.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=ro(t),this.computeMatrix(),this._getAxes(),this.type===$o.ORBITING||this.type===$o.EXPLORING?this._getPosition():this.type===$o.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getRoll=function(){return this.roll},e._update=function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()},e.computeMatrix=function(){var t=Bt(Rt(),[0,0,1],ao(this.roll)),e=(V(this.matrix),Bt(Rt(),[1,0,0],ao((this.rotateWorld&&this.type!==$o.TRACKING||this.type===$o.TRACKING?1:-1)*this.elevation))),n=Bt(Rt(),[0,1,0],ao((this.rotateWorld&&this.type!==$o.TRACKING||this.type===$o.TRACKING?1:-1)*this.azimuth)),n=Dt(Rt(),n,e),n=Dt(Rt(),n,t),e=pt(G(),n);this.type===$o.ORBITING||this.type===$o.EXPLORING?(K(this.matrix,this.matrix,this.focalPoint),X(this.matrix,this.matrix,e),K(this.matrix,this.matrix,[0,0,this.distance])):this.type===$o.TRACKING&&(K(this.matrix,this.matrix,this.position),X(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=io(t,e,n);t=this.matrix;t[12]=this.position[0],t[13]=this.position[1],t[14]=this.position[2],t[15]=1,this._getOrthoMatrix()},e._getAxes=function(){kt(this.right,io(It(Ft(),[1,0,0,0],this.matrix))),kt(this.up,io(It(Ft(),[0,1,0,0],this.matrix))),kt(this.forward,io(It(Ft(),[0,0,1,0],this.matrix))),Et(this.right,this.right),Et(this.up,this.up),Et(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=wt(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===$o.TRACKING||this.rotateWorld?(this.elevation=oo(Math.asin(e/r)),this.azimuth=oo(Math.atan2(-t,-n))):(this.elevation=-oo(Math.asin(e/r)),this.azimuth=-oo(Math.atan2(-t,-n)))},e._getPosition=function(){kt(this.position,io(It(Ft(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;Nt(this.distanceVector,[0,0,-this.distance],(t=D(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Ot(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=_t(m(),this.focalPoint,this.position),this.distance=wt(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===Jo.ORTHOGRAPHIC&&(t=this.position,e=Bt(Rt(),[0,0,1],-this.roll*Math.PI/180),dt(this.orthoMatrix,e,b((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),b(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=X(G(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(ss))},e.rotate=function(t,e,n){throw new Error(Br)},e.pan=function(t,e){throw new Error(Br)},e.dolly=function(t){throw new Error(Br)},e.createLandmark=function(t,e){throw new Error(Br)},e.gotoLandmark=function(t,e){throw new Error(Br)},t}(),cs=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),us=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),a=function(){function t(){}return t.prototype.update=function(t){var e=t.x1,n=t.y1,r=t.x2,t=t.y2,i=Math.min(e,r),e=Math.max(e,r),r=Math.min(n,t);return{width:e-i,height:Math.max(n,t)-r}},t}(),fs=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),hs=function(){function t(){}return t.prototype.update=function(t){var t=t.points.points,e=Math.min.apply(Math,t.map(function(t){return t[0]})),n=Math.max.apply(Math,t.map(function(t){return t[0]})),r=Math.min.apply(Math,t.map(function(t){return t[1]}));return{width:n-e,height:Math.max.apply(Math,t.map(function(t){return t[1]}))-r}},t}(),o=function(){function t(){}return t.prototype.update=function(t,e){var n=t.img,r=t.width,i=t.height,r=void 0===r?0:r,i=void 0===i?0:i;return n&&!ze(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),ds=function(){function t(t){this.globalRuntime=void 0,this.globalRuntime=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!Pe(t)},e.update=function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=n-e.ascent:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})},t}(),ps=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d");else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d"),this.context&&this.context.measureText||(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(t){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d")}this.canvas.width=10,this.canvas.height=10}return this.canvas},e.getOrCreateContext=function(t){return this.context||this.getOrCreateCanvas(t),this.context},t}(),gs=(0,/\[\s*(.*)=(.*)\s*\]/),ys=function(){function t(){}var e=t.prototype;return e.selectOne=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.find(function(t){return-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.find(function(t){return t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.find(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):null):n.find(function(t){return n!==t&&t.nodeName===e})},e.selectAll=function(e,n){var t,r,i,a=this;return e.startsWith(".")?n.findAll(function(t){return n!==t&&-1<((null==t?void 0:t.classList)||[]).indexOf(a.getIdOrClassname(e))}):e.startsWith("#")?n.findAll(function(t){return n!==t&&t.id===a.getIdOrClassname(e)}):e.startsWith("[")?(t=this.getAttribute(e),r=t.name,i=t.value,r?n.findAll(function(t){return n!==t&&("name"===r?t.name===i:a.attributeToString(t,r)===i)}):[]):n.findAll(function(t){return n!==t&&t.nodeName===e})},e.is=function(t,e){var n,r;return t.startsWith(".")?e.className===this.getIdOrClassname(t):t.startsWith("#")?e.id===this.getIdOrClassname(t):t.startsWith("[")?(n=(r=this.getAttribute(t)).name,r=r.value,"name"===n?e.name===r:this.attributeToString(e,n)===r):e.nodeName===t},e.getIdOrClassname=function(t){return t.substring(1)},e.getAttribute=function(t){var t=t.match(gs),e="",n="";return t&&2<t.length&&(e=t[1].replace(/"/g,""),n=t[2].replace(/"/g,"")),{name:e,value:n}},e.attributeToString=function(t,e){return t.getAttribute&&(t=t.getAttribute(e),!Pe(t))&&t.toString?t.toString():""},t}(),ms=function(){function t(t){var o,i,a,r,s,l,c,u,f,n,h,d,g=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new Wa(Sa.BOUNDS_CHANGED),this.rotate=(o=Rt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(Gt(r=Rt(),e[0],e[1],e[2]),i=g.getRotation(t),a=g.getRotation(t.parentNode),Ht(o,a),zt(o,o),Dt(r,o,r),Dt(n.localRotation,r,i),qt(n.localRotation,n.localRotation),g.dirtifyLocal(t,n)):g.rotateLocal(t,e)}),this.rotateLocal=(i=Rt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;Gt(i,e[0],e[1],e[2]),Vt(n.localRotation,n.localRotation,i),g.dirtifyLocal(t,n)}),this.setEulerAngles=(a=Rt(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(Gt(n.localRotation,e[0],e[1],e[2]),r=g.getRotation(t.parentNode),Ht(a,zt(Rt(),r)),Vt(n.localRotation,n.localRotation,a),g.dirtifyLocal(t,n)):g.setLocalEulerAngles(t,e)}),this.translateLocal=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));var i,a,o,s,l,c,u,f,h,d,p,n=t.transformable;Lt(e,m())||(i=r=e,a=n.localRotation,o=a[0],s=a[1],l=a[2],a=a[3],c=i[0],u=i[1],i=i[2],p=s*(d=o*u-s*c)-l*(h=l*c-o*i),l=l*(f=s*i-l*u)-o*d,o=o*h-s*f,h*=s=2*a,d*=s,l*=2,o*=2,r[0]=c+(f*=s)+(p*=2),r[1]=u+h+l,r[2]=i+d+o,Ot(n.localPosition,n.localPosition,e),g.dirtifyLocal(t,n))},this.setPosition=(r=G(),s=m(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Lt(g.getPosition(t),s)||(kt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,W(r,e.worldTransform),Y(r,r),Pt(n.localPosition,s,r)):kt(n.localPosition,s),g.dirtifyLocal(t,n))}),this.setLocalPosition=(l=m(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Lt(n.localPosition,l)||(kt(n.localPosition,l),g.dirtifyLocal(t,n))}),this.translate=(c=m(),u=m(),f=m(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Lt(e="number"==typeof e?Mt(u,e,n,r):e,c)||(Ot(f,g.getPosition(t),e),g.setPosition(t,f))}),this.setRotation=function(){var o=Rt();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=Wt(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=g.getRotation(t.parentNode),Ht(o,n),zt(o,o),Dt(a.localRotation,o,e),qt(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=G(),h=m(),d=Wt(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(dt(t.localTransform,t.localRotation,t.localPosition,b(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=V(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),X(t.localTransform,t.localTransform,e)),e=dt(n,d,h,t.localScale,t.origin),X(t.localTransform,t.localTransform,e)):dt(t.localTransform,t.localRotation,t.localPosition,t.localScale,t.origin)}),this.runtime=t}var e=t.prototype;return e.matches=function(t,e){return this.runtime.sceneGraphSelector.is(t,e)},e.querySelector=function(t,e){return this.runtime.sceneGraphSelector.selectOne(t,e)},e.querySelectorAll=function(t,e){return this.runtime.sceneGraphSelector.selectAll(t,e)},e.attach=function(t,e,n){t.parentNode&&this.detach(t),t.parentNode=e,Pe(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t);n=e.sortable,(null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),e=t.transformable;e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t)},e.detach=function(t){var e,n,r;t.parentNode&&(e=t.transformable,(null!=(n=t.parentNode.sortable)&&null!=(r=n.sorted)&&r.length||null!=(r=t.style)&&r.zIndex)&&(n.dirty=!0),-1<(r=t.parentNode.childNodes.indexOf(t))&&t.parentNode.childNodes.splice(r,1),e&&this.dirtifyWorld(t,e),t.parentNode=null)},e.getOrigin=function(t){return t.transformable.origin},e.setOrigin=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;Lt(e,n.origin)||((r=n.origin)[0]=e[0],r[1]=e[1],r[2]=e[2]||0,this.dirtifyLocal(t,n))},e.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=b(e,n,r));n=t.transformable;Gt(n.localRotation,e[0],e[1],e[2]),this.dirtifyLocal(t,n)},e.scaleLocal=function(t,e){var n,r,i=t.transformable;n=i.localScale,r=i.localScale,e=b(e[0],e[1],e[2]||1),n[0]=r[0]*e[0],n[1]=r[1]*e[1],n[2]=r[2]*e[2],this.dirtifyLocal(t,i)},e.setLocalScale=function(t,e){var n=t.transformable,e=b(e[0],e[1],e[2]||n.localScale[2]);Lt(e,n.localScale)||(kt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=Wt(e,n,r,i));n=t.transformable;Ht(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=Yt(e,n));var r,n=t.transformable;r=n.localSkew,e=e,r[0]=e[0],r[1]=e[1],this.dirtifyLocal(t,n)},e.dirtifyLocal=function(t,e){e.localDirtyFlag||(e.localDirtyFlag=!0,e.dirtyFlag)||this.dirtifyWorld(t,e)},e.dirtifyWorld=function(t,e){e.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,e),this.dirtifyToRoot(t,!0)},e.triggerPendingEvents=function(){function r(t,e){t.isConnected&&!i.has(t.entity)&&(n.boundsChangedEvent.detail=e,(n.boundsChangedEvent.target=t).ownerDocument.defaultView.dispatchEvent(n.boundsChangedEvent,!0),i.add(t.entity))}var n=this,i=new Set;this.pendingEvents.forEach(function(t){var e=t[0],n=t[1];n.affectChildren?e.forEach(function(t){r(t,n)}):r(e,n)}),this.pendingEvents=[],i.clear()},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;){var r=n.renderable;r&&(r.renderBoundsDirty=!0,r.boundsDirty=!0),n=n.parentNode}this.informDependentDisplayObjects(t),this.pendingEvents.push([t,{affectChildren:e}])},e.updateDisplayObjectDependency=function(t,e,n,r){var i;e&&e!==n&&(e=this.displayObjectDependencyMap.get(e))&&e[t]&&(i=e[t].indexOf(r),e[t].splice(i,1)),n&&((e=this.displayObjectDependencyMap.get(n))||(this.displayObjectDependencyMap.set(n,{}),e=this.displayObjectDependencyMap.get(n)),e[t]||(e[t]=[]),e[t].push(r))},e.informDependentDisplayObjects=function(t){var n=this,r=this.displayObjectDependencyMap.get(t);r&&Object.keys(r).forEach(function(e){r[e].forEach(function(t){n.dirtifyToRoot(t),t.dispatchEvent(new Va(Sa.ATTR_MODIFIED,t,n,n,e,Va.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return ut(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return ht(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return ft(e.scaling,this.getWorldTransform(t,e))},e.getWorldTransform=function(t,e){return((e=void 0===e?t.transformable:e).localDirtyFlag||e.dirtyFlag)&&(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,e)),e.worldTransform},e.getLocalPosition=function(t){return t.transformable.localPosition},e.getLocalRotation=function(t){return t.transformable.localRotation},e.getLocalScale=function(t){return t.transformable.localScale},e.getLocalSkew=function(t){return t.transformable.localSkew},e.getLocalTransform=function(t){t=t.transformable;return t.localDirtyFlag&&(this.calcLocalTransform(t),t.localDirtyFlag=!1),t.localTransform},e.setLocalTransform=function(t,e){var n=ut(m(),e),r=ht(Rt(),e),e=ft(m(),e);this.setLocalScale(t,e),this.setLocalPosition(t,n),this.setLocalRotation(t,r)},e.resetLocalTransform=function(t){this.setLocalScale(t,[1,1,1]),this.setLocalPosition(t,[0,0,0]),this.setLocalEulerAngles(t,[0,0,0]),this.setLocalSkew(t,[0,0])},e.getTransformedGeometryBounds=function(t,e,n){e=this.getGeometryBounds(t,e=void 0===e?!1:e);return Or.isEmpty(e)?null:((n=n||new Or).setFromTransformedAABB(e,this.getWorldTransform(t)),n)},e.getGeometryBounds=function(t,e){t=t.geometry;return((e=void 0===e?!1:e)?t.renderBounds:t.contentBounds||null)||new Or},e.getBounds=function(t,e){var n,r,i=this,a=(void 0===e&&(e=!1),t.renderable);return a.boundsDirty||e||!a.bounds?!a.renderBoundsDirty&&e&&a.renderBounds?a.renderBounds:(n=e?a.renderBounds:a.bounds,r=this.getTransformedGeometryBounds(t,e,n),t.childNodes.forEach(function(t){t=i.getBounds(t,e);t&&(r?r.add(t):(r=n||new Or).update(t.center,t.halfExtents))}),e&&(t=function(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}(t))&&(t=t.style.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new Or)&&(e?a.renderBounds=r:a.bounds=r),e?a.renderBoundsDirty=!1:a.boundsDirty=!1,r):a.bounds},e.getLocalBounds=function(t){if(t.parentNode){var e,n=G(),r=(t.parentNode.transformable&&(n=Y(G(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!Or.isEmpty(r))return(e=new Or).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(Or.isEmpty(i)||(r=new Or).setFromTransformedAABB(i,this.getWorldTransform(t)),null==(i=t.ownerDocument)||null==(t=i.defaultView)?void 0:t.getContextService().getBoundingClientRect());return r?(e=(t=r.getMin())[0],t=t[1],n=(r=r.getMax())[0],r=r[1],new Ar(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Ar((null==i?void 0:i.left)||0,(null==i?void 0:i.top)||0,0,0)},e.dirtifyWorldInternal=function(t,e){var n=this;!e.dirtyFlag&&(e.dirtyFlag=!0,e.frozen=!1,t.childNodes.forEach(function(t){var e=t.transformable;e.dirtyFlag||n.dirtifyWorldInternal(t,e)}),e=t.renderable)&&(e.renderBoundsDirty=!0,e.boundsDirty=!0,e.dirty=!0)},e.syncHierarchy=function(t){var e=t.transformable;if(!e.frozen){e.frozen=!0,(e.localDirtyFlag||e.dirtyFlag)&&this.sync(t,e);for(var n=t.childNodes,r=0;r<n.length;r++)this.syncHierarchy(n[r])}},e.sync=function(t,e){var n;e.localDirtyFlag&&(this.calcLocalTransform(e),e.localDirtyFlag=!1),e.dirtyFlag&&(n=(t=t.parentNode)&&t.transformable,null!==t&&n?X(e.worldTransform,n.worldTransform,e.localTransform):W(e.worldTransform,e.localTransform),e.dirtyFlag=!1)},e.unfreezeParentToRoot=function(t){for(var e=t.parentNode;e;){var n=e.transformable;n&&(n.frozen=!1),e=e.parentNode}},t}(),vs={MetricsString:"|ÉqÅ",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},bs=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,xs=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),ws=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),ks=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!ws.exec(e)&&!xs.exec(t))},this.trimByKinsokuShorui=function(t){var e,n=[].concat(t),r=n[n.length-2];return r?(e=r[r.length-1],n[n.length-2]=r.slice(0,-1),n[n.length-1]=e+n[n.length-1],n):t},this.runtime=t}var e=t.prototype;return e.measureFont=function(t,e){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];for(var n={ascent:0,descent:0,fontSize:0},r=this.runtime.offscreenCanvas.getOrCreateCanvas(e),e=this.runtime.offscreenCanvas.getOrCreateContext(e),i=(e.font=t,vs.MetricsString+vs.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(vs.BaselineSymbol).width),s=vs.HeightMultiplier*o,o=o*vs.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,f=0,h=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[f+d]){h=!0;break}if(h)break;f+=c}for(n.ascent=o-u,f=r-c,h=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[f+p]){h=!0;break}if(h)break;f-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,f=(e.textPathSide,e.textPathStartOffset,e.leading),f=void 0===f?0:f,h=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=We(e)&&e+"px"||"16px",a=ze(n)?n.split(","):[n],o=a.length-1;0<=o;o--){var s=a[o].trim();!Ko.test(s)&&Xo.indexOf(s)<0&&(s='"'+s+'"'),a[o]=s}return r+" "+i+" "+t+" "+e+" "+a.join(",")}(e),d=this.measureFont(h,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=h,e.isOverflowing=!1;var g=(i?this.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),y=new Array(g.length),m=0;if(!u){for(var v=0;v<g.length;v++){var b=p.measureText(g[v]).width+(g[v].length-1)*c;y[v]=b,m=Math.max(m,b)}var r=m+o,x=a||d.fontSize+o,i=Math.max(x,d.fontSize+o)+(g.length-1)*(x+f),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:h,width:r,height:i,lines:g,lineWidths:y,lineHeight:x+=f,maxLineWidth:m,fontProperties:d,lineMetrics:y.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new Ar(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength(),u.getPoint(0);for(var k=0;k<g.length;k++)p.measureText(g[k]).width,g[k].length},e.setGraphemeOnPath=function(){},e.wordWrap=function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",f=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),h=0,d=0,p={},g=function(t){return r.getFromCache(t,a,p,l)},y=Array.from(u).reduce(function(t,e){return t+g(e)},0),m=Array.from(t),v=0;v<m.length;v++){var b=m[v],x=t[v-1],w=t[v+1],k=g(b);if(this.isNewline(b)){if(s<=++h){e.isOverflowing=!0;break}d=0,f[h]=""}else{if(0<d&&c<d+k){if(s<=h+1){if(e.isOverflowing=!0,0<y&&y<=c){for(var M=f[h].length,O=0,_=M,S=0;S<M;S++){var E=g(f[h][S]);if(c<O+E+y){_=S;break}O+=E}f[h]=(f[h]||"").slice(0,_)+u}break}if(d=0,f[++h]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(f=this.trimToBreakable(f),d=this.sumTextWidthByCache(f[h]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(f=this.trimByKinsokuShorui(f),d+=g(x||""))}d+=k,f[h]=(f[h]||"")+b}}return f.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=vs.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=vs.Newlines.indexOf(t.charCodeAt(0))},e.trimToBreakable=function(t){var e,t=[].concat(t),n=t[t.length-2],r=this.findBreakableIndex(n);return-1!==r&&n&&(e=n.slice(r,r+1),e=r+(this.isBreakingSpace(e)?0:1),t[t.length-1]+=n.slice(r+1,n.length),t[t.length-2]=n.slice(0,e)),t},e.canBreakInLastChar=function(t){return!t||!bs.test(t)},e.sumTextWidthByCache=function(t,n){return t.split("").reduce(function(t,e){if(n[e])return t+n[e];throw Error("cannot count the word without cache")},0)},e.findBreakableIndex=function(t){for(var e=t.length-1;0<=e;e--)if(!bs.test(t[e]))return e;return-1},e.getFromCache=function(t,e,n,r){var i=n[t];return"number"!=typeof i&&(e=t.length*e,i=r.measureText(t).width+e,n[t]=i),i},t}(),M={},cs=(o=new o,hs=new hs,(fc={})[k.CIRCLE]=new cs,fc[k.ELLIPSE]=new us,fc[k.RECT]=o,fc[k.IMAGE]=o,fc[k.GROUP]=o,fc[k.LINE]=new a,fc[k.TEXT]=new ds(M),fc[k.POLYLINE]=hs,fc[k.POLYGON]=hs,fc[k.PATH]=new fs,fc[k.HTML]=null,fc[k.MESH]=null,fc),ds=(us=new r,o=new Ea,(a={})[c.PERCENTAGE]=null,a[c.NUMBER]=new La,a[c.ANGLE]=new e,a[c.DEFINED_PATH]=new n,a[c.PAINT]=us,a[c.COLOR]=us,a[c.FILTER]=new ka,a[c.LENGTH]=o,a[c.LENGTH_PERCENTAGE]=o,a[c.LENGTH_PERCENTAGE_12]=new Aa,a[c.LENGTH_PERCENTAGE_14]=new Ta,a[c.COORDINATE]=new Pa,a[c.OFFSET_DISTANCE]=new i,a[c.OPACITY_VALUE]=new Ca,a[c.PATH]=new ja,a[c.LIST_OF_POINTS]=new Fa,a[c.SHADOW_BLUR]=new Ia,a[c.TEXT]=new Ra,a[c.TEXT_TRANSFORM]=new Ba,a[c.TRANSFORM]=new Da,a[c.TRANSFORM_ORIGIN]=new Oa,a[c.Z_INDEX]=new za,a[c.MARKER]=new Na,a),hs=(M.CameraContribution=ls,M.AnimationTimeline=null,M.EasingFunction=null,M.offscreenCanvas=new ps,M.displayObjectPool=new Ha,M.sceneGraphSelector=new ys,M.sceneGraphService=new ms(M),M.textService=new ks(M),M.geometryUpdaterFactory=cs,M.CSSPropertySyntaxFactory=ds,M.styleValueRegistry=new Ka,M.layoutRegistry=null,function(){function t(){this.context=void 0,this.plugins=[]}var e=t.prototype;return e.addRenderingPlugin=function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)},e.removeAllRenderingPlugins=function(){var e=this;this.plugins.forEach(function(t){t=e.context.renderingPlugins.indexOf(t);0<=t&&e.context.renderingPlugins.splice(t,1)})},t}());function Ms(){Ms=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof h?e:h,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),f;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,f;i=r.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,f):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,f)}(n,o);if(n){if(n===f)continue;return n}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===s)throw s="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);s="executing";n=u(i,a,o);if("normal"===n.type){if(s=o.done?"completed":"suspendedYield",n.arg===f)continue;return{value:n.arg,done:o.done}}"throw"===n.type&&(s="completed",o.method="throw",o.arg=n.arg)}})}),e}function u(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}o.wrap=s;var f={};function h(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=h.prototype=Object.create(e));function m(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(y,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(y),t},o.awrap=function(t){return{__await:t}},m(v.prototype),a(v.prototype,n,function(){return this}),o.AsyncIterator=v,o.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var a=new v(s(t,e,n,r),i);return o.isGeneratorFunction(e)?a:a.next().then(function(t){return t.done?t.value:a.next()})},m(y),a(y,i,"Generator"),a(y,r,function(){return this}),a(y,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),x(n),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n,r,i=this.tryEntries[e];if(i.tryLoc===t)return"throw"===(n=i.completion).type&&(r=n.arg,x(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:k(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},o}function Os(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function _s(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Os(r,e,n,i,a,"next",t)}function a(t){Os(r,e,n,i,a,"throw",t)}i(void 0)})}}function Ss(){return(Ss=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n,r=arguments[e];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function Es(t,e){return(Es=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}k.CIRCLE,k.ELLIPSE,k.IMAGE,k.RECT,k.LINE,k.POLYLINE,k.POLYGON,k.TEXT,k.PATH,k.HTML,(fs=sb=sb||{}).READY="ready",fs.BEFORE_RENDER="beforerender",fs.AFTER_RENDER="afterrender",fs.BEFORE_DESTROY="beforedestroy",fs.AFTER_DESTROY="afterdestroy",fs.RESIZE="resize",fs.DIRTY_RECTANGLE="dirtyrectangle",new Wa(Sa.MOUNTED),new Wa(Sa.UNMOUNTED),new Wa(sb.BEFORE_RENDER),new Wa(sb.AFTER_RENDER);function As(t){return Cs(t,"Function")}var Ts=function(){function a(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return a.prototype.apply=function(t){function e(t){var e,a,o,s,l,c,u=t.target,f=u===d,h=f&&i?d:u.closest&&u.closest("[draggable=true]");h&&(e=function(){var e=_s(Ms().mark(function t(e){var n,r,i;return Ms().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=xe([e.clientX,e.clientY],s),n<=m||r<=y)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",h.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-c[0],e.dy=e.clientY-c[1],h.dispatchEvent(e),c=[e.clientX,e.clientY],f){t.next=21;break}return n="pointer"===p?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,d.elementsFromPoint(n[0],n[1]);case 17:r=t.sent,i=r[r.indexOf(u)+1],i=(null==i?void 0:i.closest("[droppable=true]"))||(g?d:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",h.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var n=t.renderingService,d=t.renderingContext.root.ownerDocument,r=d.defaultView,t=this.dragndropPluginOptions,p=t.overlap,i=t.isDocumentDraggable,g=t.isDocumentDroppable,y=t.dragstartDistanceThreshold,m=t.dragstartTimeThreshold;n.hooks.init.tapPromise(a.tag,_s(Ms().mark(function t(){return Ms().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r.addEventListener("pointerdown",e);case 1:case"end":return t.stop()}},t)}))),n.hooks.destroy.tap(a.tag,function(){r.removeEventListener("pointerdown",e)})},a}(),Ps=(Ts.tag="Dragndrop",function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="dragndrop",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),Es(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new Ts(Ss({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},e}(hs)),Ns=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Ls={}.toString,Cs=function(t,e){return Ls.call(t)==="[object "+e+"]"},js=function(t){return null==t},Fs=function(t){return Array.isArray?Array.isArray(t):Cs(t,"Array")};function Is(t){if(!Bs(t)||!Cs(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Rs(t){return(t=Gs(t)).charAt(0).toLowerCase()+t.substring(1)}var Bs=function(t){return"object"==typeof t&&null!==t},Ds=function(t){return Cs(t,"Number")},zs=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){As(n)&&"prototype"===e||r.push(t)};if(e)if(Fs(e))for(var a=0,o=e.length;a<o&&!1!==i(e[a],a);a++);else if(t=typeof e,null!==e&&"object"==t||"function"==t)for(var s in e)if(e.hasOwnProperty(s)&&!1===i(e[s],s))break;return r},Gs=function(t){return js(t)?"":t.toString()},Ws=function(t){t=Gs(t);return t.charAt(0).toUpperCase()+t.substring(1)},Hs={}.toString,Vs=function(t){return Hs.call(t).replace(/^\[object /,"").replace(/]$/,"")},qs=Object.prototype,Ys=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||qs)};var Us=5;var I=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)!function t(e,n,r,i){for(var a in r=r||0,i=i||Us,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&Is(o)?(Is(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Fs(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Xs=function(t,e){if(!Ns(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var r=-1,i=0;i<t.length;i++)if(t[i]===e){r=i;break}return r},Ks=Object.prototype.hasOwnProperty;function $s(t){return t}var Zs,Js=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function Qs(t){return js(t)?0:(Ns(t)?t:Object.keys(t)).length}!function(a,o){var s;if(As(a))return(s=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n,r=o?o.apply(this,t):t[0],i=s.cache;return i.has(r)?i.get(r):(n=a.apply(this,t),i.set(r,n),n)}).cache=new Map;throw new TypeError("Expected a function")}(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(Zs=Zs||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),Zs.measureText(Cs(t,"String")?t:"").width},function(t,e){return function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var r=Array(t),i=0,e=0;e<n;e++)for(var a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r}([t],zs(e=void 0===e?{}:e)).join("")});const tl=()=>[["cartesian"]],el=(tl.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]),nl=(el.props={},({startAngle:t=0,endAngle:e=6*Math.PI,innerRadius:n=0,outerRadius:r=1})=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5],["helix",t,e,n,r]]),rl=(nl.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),il=(rl.props={},()=>[["translate",.5,.5],["reflect"],["translate",-.5,-.5]]),al=(il.props={},()=>[["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),ol=(al.props={},()=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5]]),sl=(ol.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[...rl(),...el({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),ll=(sl.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["transpose"],...il(),...el({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),cl=(ll.props={},()=>[["parallel",0,1,0,1]]),ul=(cl.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),fl=(ul.props={},({focusX:t=0,distortionX:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),hl=(fl.props={},({focusY:t=0,distortionY:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),dl=(hl.props={},({value:e})=>t=>t.map(()=>e)),pl=(dl.props={},({value:e})=>t=>t.map(e)),gl=(pl.props={},({value:e})=>t=>t.map(t=>t[e])),yl=(gl.props={},({value:t})=>()=>t);function ml(t,e){return t.parent===e.parent?1:2}function vl(t,e){return t+e.x}function bl(t,e){return Math.max(t,e.y)}function xl(){var s=ml,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(vl,0)/e.length,t.y=1+n.reduce(bl,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function wl(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;0<=--r;)e+=n[r].value;else e=1;t.value=e}function kl(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Ol)):void 0===e&&(e=Ml);for(var n,r,i,a,o,t=new El(t),s=[t];n=s.pop();)if((i=e(n.data))&&(o=(i=Array.from(i)).length))for(n.children=i,a=o-1;0<=a;--a)s.push(r=i[a]=new El(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(Sl)}function Ml(t){return t.children}function Ol(t){return Array.isArray(t)?t[1]:null}function _l(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Sl(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function El(t){this.data=t,this.depth=this.height=0,this.parent=null}function Al(t){return null==t?null:Tl(t)}function Tl(t){if("function"!=typeof t)throw new Error;return t}function Pl(){return 0}function Nl(t){return function(){return t}}yl.props={},El.prototype=kl.prototype={constructor:El,count:function(){return this.eachAfter(wl)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return kl(this).eachBefore(_l)},[Symbol.iterator]:function*(){var t,e,n,r,i,a=[this];do{for(e=a.reverse(),a=[];t=e.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length)}};const Ll=4294967296;function Cl(t,e){for(var n,r,i=0,a=(t=function(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,o=[];i<a;)n=t[i],r&&Fl(r,n)?++i:(r=function(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Rl(t[0],t[1]);case 3:return Bl(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(Il(e,t))return[e];for(n=0;n<t.length;++n)if(jl(e,t[n])&&Il(Rl(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(jl(Rl(t[n],t[r]),e)&&jl(Rl(t[n],e),t[r])&&jl(Rl(t[r],e),t[n])&&Il(Bl(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function jl(t,e){var n=t.r-e.r,r=e.x-t.x,e=e.y-t.y;return n<0||n*n<r*r+e*e}function Fl(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Il(t,e){for(var n=0;n<e.length;++n)if(!Fl(t,e[n]))return;return 1}function Rl(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function Bl(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,f=i-o,h=i-l,d=e-t,p=n-t,g=r*r+i*i-t*t,a=g-a*a-o*o+e*e,o=g-s*s-l*l+n*n,e=u*f-c*h,g=(f*o-h*a)/(2*e)-r,s=(h*d-f*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,h=s*s+n*n-1,f=2*(t+g*s+l*n),a=g*g+l*l-t*t,o=-(1e-6<Math.abs(h)?(f+Math.sqrt(f*f-4*h*a))/(2*h):a/f);return{x:r+g+s*o,y:i+l+n*o,r:o}}function Dl(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function zl(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,e=e.y-t.y;return 0<n&&r*r+e*e<n*n}function Gl(t){var e=t._,t=t.next._,n=e.r+t.r,r=(e.x*t.r+t.x*e.r)/n,t=(e.y*t.r+t.y*e.r)/n;return r*r+t*t}function Wl(t){this._=t,this.next=null,this.previous=null}function Hl(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,f,h,d=t[0];if(d.x=0,d.y=0,!(1<a))return d.r;if(r=t[1],d.x=-r.r,r.x=d.r,r.y=0,!(2<a))return d.r+r.r;Dl(r,d,i=t[2]),d=new Wl(d),r=new Wl(r),i=new Wl(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){Dl(d._,r._,i=t[l]),i=new Wl(i),c=r.next,u=d.previous,f=r._.r,h=d._.r;do{if(f<=h){if(zl(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}f+=c._.r,c=c.next}else{if(zl(u._,i._)){((d=u).next=r).previous=d,--l;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=Gl(d);(i=i.next)!==r;)(s=Gl(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=Cl(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function Vl(t){return Math.sqrt(t.value)}function ql(){var n=null,r=1,i=1,a=Pl;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Ll)/Ll}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Yl(n)).eachAfter(Ul(a,.5,e)).eachBefore(Xl(1)):t.eachBefore(Yl(Vl)).eachAfter(Ul(Pl,1,e)).eachAfter(Ul(a,t.r/Math.min(r,i),e)).eachBefore(Xl(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=Al(t),e):n},e.size=function(t){return arguments.length?(r=+t[0],i=+t[1],e):[r,i]},e.padding=function(t){return arguments.length?(a="function"==typeof t?t:Nl(+t),e):a},e}function Yl(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Ul(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=Hl(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function Xl(n){return function(t){var e=t.parent;t.r*=n,e&&(t.x=e.x+n*t.x,t.y=e.y+n*t.y)}}function Kl(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function $l(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var Zl={depth:-1},Jl={},Ql={};function tc(t){return t.id}function ec(t){return t.parentId}function nc(){var y,m=tc,v=ec;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=m,f=v,h=new Map;if(null!=y){const p=c.map((t,e)=>{t=y(t,e,n),e=(t=""+t).length;return"/"===(t=ic(t,e-1)&&!ic(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(rc);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(rc(r)),c.push(Ql));u=(t,e)=>p[e],f=(t,e)=>g[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new El(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,h.set(l,h.has(l)?Jl:o)),null!=(s=f(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=h.get(s)))throw new Error("missing: "+s);if(a===Jl)throw new Error("ambiguous: "+s);a.children?a.children.push(o):a.children=[o],o.parent=a}else{if(i)throw new Error("multiple roots");i=o}if(!i)throw new Error("no root");if(null!=y){for(;i.data===Ql&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===Ql;--t)o.data=null}if(i.parent=Zl,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(Sl),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(m=Al(t),e):m},e.parentId=function(t){return arguments.length?(v=Al(t),e):v},e.path=function(t){return arguments.length?(y=Al(t),e):y},e}function rc(t){let e=t.length;if(e<2)return"";for(;1<--e&&!ic(t,e););return t.slice(0,e)}function ic(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function ac(t,e){return t.parent===e.parent?1:2}function oc(t){var e=t.children;return e?e[0]:t.t}function sc(t){var e=t.children;return e?e[e.length-1]:t.t}function lc(t,e){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function cc(){var h=ac,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new lc(t,0)];e=o.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;0<=i;--i)o.push(n=e.children[i]=new lc(r[i],i)),n.parent=e;return(t.parent=new lc(null,0)).children=[t],t}(t);return s.eachAfter(f),s.parent.m=-s.z,s.eachBefore(d),u?t.eachBefore(p):((r=n=e=t).eachBefore(function(t){t.x<e.x&&(e=t),t.x>n.x&&(n=t),t.depth>r.depth&&(r=t)}),s=e===n?1:h(e,n)/2,i=s-e.x,a=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function f(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){for(var i,a=0,o=0,s=t.children,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+h(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+h(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],l=i.m,c=a.m,u=o.m,f=s.m;o=sc(o),i=oc(i),o&&i;)s=oc(s),(a=sc(a)).a=t,0<(r=o.z+u-i.z-l+h(o._,i._))&&(function(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}(function(t,e,n){return t.a.parent===e.parent?t.a:n}(o,t,n),t,r),l+=r,c+=r),u+=o.m,l+=i.m,f+=s.m,c+=a.m;o&&!sc(a)&&(a.t=o,a.m+=u-c),i&&!oc(s)&&(s.t=i,s.m+=l-f,n=t)}return n}(t,r,t.parent.A||n[0])}function d(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function p(t){t.x*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(h=t,e):h},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function uc(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}lc.prototype=Object.create(El.prototype);var fc=(1+Math.sqrt(5))/2;function hc(t,e,n,r,i,a){for(var o,s,l,c,u,f,h,d,p,g,y,m=[],v=e.children,b=0,x=0,w=v.length,k=e.value;b<w;){for(l=i-n,c=a-r;!(u=v[x++].value)&&x<w;);for(y=(f=h=u)*u*(g=Math.max(c/l,l/c)/(k*t)),p=Math.max(h/y,y/f);x<w;++x){if(u+=s=v[x].value,s<f&&(f=s),h<s&&(h=s),y=u*u*g,p<(d=Math.max(h/y,y/f))){u-=s;break}p=d}m.push(o={value:u,dice:l<c,children:v.slice(b,x)}),o.dice?$l(o,n,r,i,k?r+=c*u/k:a):uc(o,n,r,k?n+=l*u/k:i,a),k-=u,b=x}return m}var dc=function e(a){function t(t,e,n,r,i){hc(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(fc);function pc(t,e,n,r,i){var a,o,g=t.children,s=g.length,y=new Array(s+1);for(y[0]=o=a=0;a<s;++a)y[a+1]=o+=g[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=g[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=y[e],c=r/2+l,u=e+1,f=n-1;for(;u<f;){var h=u+f>>>1;y[h]<c?u=1+h:f=h}c-y[u-1]<y[u]-c&&e+1<u&&--u;var l=y[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function gc(t,e,n,r,i){(1&t.depth?uc:$l)(t,e,n,r,i)}var yc=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,f=a.length,h=t.value;++u<f;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?$l(o,e,n,r,h?n+=(i-n)*o.value/h:i):uc(o,e,n,h?e+=(r-e)*o.value/h:r,i),h-=o.value}else t._squarify=a=hc(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(fc);function mc(t={}){t=t.shapes;return[{name:"color"},{name:"opacity"},{name:"shape",range:t},{name:"enterType"},{name:"enterDelay",scaleKey:"enter"},{name:"enterDuration",scaleKey:"enter"},{name:"enterEasing"},{name:"key",scale:"identity"},{name:"groupKey",scale:"identity"},{name:"label",scale:"identity"}]}function vc(t={}){return[...mc(t),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function bc(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function xc(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function wc(t={}){return mc(t)}function kc(){return[{type:"maybeKey"}]}function Mc(t,e){return t.getBandWidth(t.invert(e))}function Oc(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:f=r,bandOffsetY:h=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),g=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?Mc(l,a[e]):0;var r=p?Mc(c,o[e]):0,e=g&&s?(Mc(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+f*n+e,i+h*r]}:t=>t}function _c(t){return parseFloat(t)/100}function Sc(t,e,n,r){const{x:i,y:a}=n,{width:o,height:s}=r.getOptions();return[t,Array.from(t,t=>{var e=i[t],t=a[t];return[["string"==typeof e?_c(e)*o:+e,"string"==typeof t?_c(t)*s:+t]]})]}function Ec(e){return"function"==typeof e?e:t=>t[e]}function Ac(t,e){return Array.from(t,Ec(e))}function Tc(t,e){var{source:e=t=>t.source,target:n=t=>t.target,value:r=t=>t.value}=e,{links:t,nodes:i}=t;const a=Ac(t,e),o=Ac(t,n),s=Ac(t,r);return{links:t.map((t,e)=>({target:o[e],source:a[e],value:s[e]})),nodes:i||Array.from(new Set([...a,...o]),t=>({key:t}))}}function Pc(t,e){return t.getBandWidth(t.invert(e))}const Nc=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=e.x,u=e.series,[f]=i.getSize(),h=r?r.map(t=>+t/f):null,d=r?(t,e,n)=>{t+=e/2,e=h[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=Pc(c,a[t]),n=e*(u?Pc(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};Nc.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...vc({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...kc(),...xc()],interaction:{shareTooltip:!0}};const Lc=()=>(t,e,n,r)=>{const{x:i,x1:a,y:o,y1:s}=n;return[t,Array.from(t,t=>{return[[+i[t],+o[t]],[+a[t],+o[t]],[+a[t],+s[t]],[+i[t],+s[t]]].map(t=>r.map(t))})]};function Cc(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function jc(n){let a,o,i;function s(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<0?n=1+i:r=i}while(n<r)}return n}return i=2!==n.length?(a=Cc,o=(t,e)=>Cc(n(t),e),(t,e)=>n(t)-e):(a=n===Cc||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Fc,o=n),{left:s,center:function(t,e,n=0,r=t.length){return r=s(t,e,n,r-1),n<r&&i(t[r-1],e)>-i(t[r],e)?r-1:r},right:function(t,e,n=0,r=t.length){if(n<r){if(0!==a(e,e))return r;do{var i=n+r>>>1;o(t[i],e)<=0?n=1+i:r=i}while(n<r)}return n}}}function Fc(){return 0}Lc.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...vc({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...kc(),...xc()],interaction:{shareTooltip:!0}};r=jc(Cc).right;const Ic=jc(function(t){return null===t?NaN:+t}).center;var Rc=r;function Bc(e,n){let r=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&++r;else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(i=+i)>=i&&++r}return r}function Dc(t,e){t=function(e,n){let r=0,i,a=0,o=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(i=t-a,a+=i/++r,o+=i*(t-a));else{let t=-1;for(var s of e)null!=(s=n(s,++t,e))&&(s=+s)>=s&&(i=s-a,a+=i/++r,o+=i*(s-a))}if(1<r)return o/(r-1)}(t,e);return t&&Math.sqrt(t)}function zc(e,n){let r,i;if(void 0===n)for(const t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i<t&&(i=t)));else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(void 0===r?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}return[r,i]}class Gc{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){var n=this._partials;let r=0;for(let t=0;t<this._n&&t<32;t++){var i=n[t],a=e+i,i=Math.abs(e)<Math.abs(i)?e-(a-i):i-(a-e);i&&(n[r++]=i),e=a}return n[r]=e,this._n=r+1,this}valueOf(){var t=this._partials;let e=this._n,n,r,i,a=0;if(0<e){for(a=t[--e];0<e&&(n=a,r=t[--e],a=n+r,!(i=r-(a-n))););0<e&&(i<0&&t[e-1]<0||0<i&&0<t[e-1])&&(r=2*i,n=a+r,r==n-a)&&(a=n)}return a}}class Wc extends Map{constructor(t,e=function(t){return null!==t&&"object"==typeof t?t.valueOf():t}){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Hc(this,t))}has(t){return super.has(Hc(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):(t.set(e,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){e=e(n);t.has(e)&&(n=t.get(e),t.delete(e));return n}(this,t))}}function Hc({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function Vc(t){return t}function qc(t,...e){return Xc(t,Vc,Vc,e)}function Yc(t,e,...n){return Xc(t,Vc,e,n)}function Uc(t,e,...n){return Xc(t,Array.from,e,n)}function Xc(t,u,f,h){return function t(e,n){if(n>=h.length)return f(e);var r=new Wc,i=h[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function Kc(e,...i){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n]=i;var t,r;return n&&2!==n.length||1<i.length?(t=Uint32Array.from(e,(t,e)=>e),1<i.length?(i=i.map(t=>e.map(t)),t.sort((t,e)=>{for(const r of i){var n=Zc(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>Zc(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort($c(n))}function $c(r=Cc){if(r===Cc)return Zc;if("function"!=typeof r)throw new TypeError("compare is not a function");return(t,e)=>{var n=r(t,e);return n||0===n?n:(0===r(e,e))-(0===r(t,t))}}function Zc(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var Jc=Array.prototype.slice;function Qc(t){return()=>t}var tu=Math.sqrt(50),eu=Math.sqrt(10),nu=Math.sqrt(2);function ru(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/Math.pow(10,t);return 0<=t?(tu<=n?10:eu<=n?5:nu<=n?2:1)*Math.pow(10,t):-Math.pow(10,-t)/(tu<=n?10:eu<=n?5:nu<=n?2:1)}function iu(t){return Math.ceil(Math.log(Bc(t))/Math.LN2)+1}function au(){var m=Vc,v=zc,b=iu;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=m(t[a],a,t);var o=v(i),s=o[0],l=o[1],c=b(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(v===zc&&([s,l]=function(t,e,n){let r;for(;;){var i=ru(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(s,l,u)),(c=function(n,r,t){var e,i,a,o,s=-1;if(t=+t,(n=+n)===(r=+r)&&0<t)return[n];if((e=r<n)&&(i=n,n=r,r=i),0===(o=ru(n,r,t))||!isFinite(o))return[];if(0<o){let t=Math.round(n/o),e=Math.round(r/o);for(t*o<n&&++t,e*o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)*o}else{o=-o;let t=Math.round(n*o),e=Math.round(r*o);for(t/o<n&&++t,e/o>r&&--e,a=new Array(i=e-t+1);++s<i;)a[s]=(t+s)/o}return e&&a.reverse(),a}(s,l,u))[0]<=s&&(n=ru(s,l,u)),c[c.length-1]>=l)if(l<=o&&v===zc){const n=ru(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var f=c.length,h=0,d=f;c[h]<=s;)++h;for(;c[d-1]>l;)--d;(h||d<f)&&(c=c.slice(h,d),f=d-h);var p,g,y=new Array(f+1);for(a=0;a<=f;++a)(p=y[a]=[]).x0=0<a?c[a-1]:s,p.x1=a<f?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Math.min(f,Math.floor((e-s)/n))].push(t[a]);else if(n<0)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&(g=Math.floor((s-e)*n),y[Math.min(f,g+(c[g]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&y[Rc(c,e,0,f)].push(t[a]);return y}return e.value=function(t){return arguments.length?(m="function"==typeof t?t:Qc(t),e):m},e.domain=function(t){return arguments.length?(v="function"==typeof t?t:Qc([t[0],t[1]]),e):v},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:Qc(Array.isArray(t)?Jc.call(t):t),e):b},e}function ou(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r<i||void 0===r&&i>=i)&&(r=i)}return r}function su(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n<o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n<a||void 0===n&&a>=a)&&(n=a,r=i);return r}function lu(e,n){let r;if(void 0===n)for(const t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let t=-1;for(var i of e)null!=(i=n(i,++t,e))&&(r>i||void 0===r&&i>=i)&&(r=i)}return r}function cu(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}function uu(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function fu(t,e,n){var r;if((n=(t=Float64Array.from(function*(e,n){if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(yield t);else{let t=-1;for(var r of e)null!=(r=n(r,++t,e))&&(r=+r)>=r&&(yield r)}}(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?lu(t):1<=e?ou(t):(n=(n-1)*e,(r=ou(function n(r,i,a=0,o=1/0,s){if(i=Math.floor(i),a=Math.floor(Math.max(0,a)),o=Math.floor(Math.min(r.length-1,o)),a<=i&&i<=o)for(s=void 0===s?Zc:$c(s);a<o;){600<o-a&&(l=o-a+1,c=i-a+1,f=Math.log(l),u=.5*Math.exp(2*f/3),f=.5*Math.sqrt(f*u*(l-u)/l)*(c-l/2<0?-1:1),n(r,i,Math.max(a,Math.floor(i-c*u/l+f)),Math.min(o,Math.floor(i+(l-c)*u/l+f)),s));var l,c,u,f,h=r[i];let t=a,e=o;for(uu(r,a,i),0<s(r[o],h)&&uu(r,a,o);t<e;){for(uu(r,t,e),++t,--e;s(r[t],h)<0;)++t;for(;0<s(r[e],h);)--e}0===s(r[a],h)?uu(r,a,e):uu(r,++e,o),e<=i&&(a=e+1),i<=e&&(o=e-1)}return r}(t,e=Math.floor(n)).subarray(0,e+1)))+(lu(t.subarray(e+1))-r)*(n-e))}function hu(e,n){let r=0,i=0;if(void 0===n)for(var t of e)null!=t&&(t=+t)>=t&&(++r,i+=t);else{let t=-1;for(var a of e)null!=(a=n(a,++t,e))&&(a=+a)>=a&&(++r,i+=a)}if(r)return i/r}function du(t,e){return fu(t,.5,e)}function pu(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function gu(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}function yu(e,n){let r=0;if(void 0===n)for(var t of e)(t=+t)&&(r+=t);else{let t=-1;for(var i of e)(i=+n(i,++t,e))&&(r+=i)}return r}function mu(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function vu(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function bu(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function xu(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function wu(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function ku(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function Mu(t){return xu(t)||vu(t)}const Ou=(t,e,n,r)=>{var i;const{series:a,x:o,y:s}=n;var{x:n,y:e}=e;if(void 0===o||void 0===s)throw new Error("Missing encode for x or y channel.");var t=a?Array.from(qc(t,t=>a[t]).values()):[t],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},_u=(t,e,n,i)=>{const a=Object.entries(n).filter(([t])=>t.startsWith("position")).map(([,t])=>t);if(0===a.length)throw new Error("Missing encode for position channel.");return[t,Array.from(t,e=>{var t=a.map(t=>+t[e]),n=i.map(t),r=[];for(let t=0;t<n.length;t+=2)r.push([n[t],n[t+1]]);return r})]},Su=()=>(t,e,n,r)=>{return(wu(r)?_u:Ou)(t,e,n,r)};Su.props={defaultShape:"line",defaultLabelShape:"label",channels:[...vc({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...kc(),...xc(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,showCrosshairs:!0}};const Eu=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[f,h]=o.getSize(),d=Oc(e,n,g),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/f,r=r/h,a=[e-i,n-r],e=[e+i,n+r];return[o.map(d(a,t)),o.map(d(e,t))]}):Array.from(t,t=>[o.map(d(p(t),t))])]};Eu.props={defaultShape:"hollow",defaultLabelShape:"label",channels:[...vc({shapes:["hollow","hollowDiamond","hollowHexagon","hollowSquare","hollowTriangleDown","hollowTriangle","hollowBowtie","point","plus","diamond","square","triangle","hexagon","cross","bowtie","hyphen","line","tick","triangleDown"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size",scale:"sqrt"},{name:"dx",scale:"identity"},{name:"dy",scale:"identity"}],preInference:[{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[...kc(),{type:"maybeSize"},...bc()]};const Au=s=>{const{cartesian:l=!1}=s;return l?Sc:(t,e,n,r)=>{if(l)return Sc(t,0,n,r);const{x:i,y:a}=n,o=Oc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Au.props={defaultShape:"text",defaultLabelShape:"label",channels:[...vc({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...kc(),...bc()]};const Tu=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};Tu.props={defaultShape:"cell",defaultLabelShape:"label",channels:[...vc({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...kc(),...bc()]};const Pu=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,series:r}=n;n=r?Array.from(qc(t,t=>r[t]).values()):[t];return[n.map(t=>t[0]),Array.from(n,e=>{var n=e.length,r=new Array(2*n);for(let t=0;t<e.length;t++){var i=e[t];r[t]=a.map([+o[i],+s[i]]),r[n+t]=a.map([+o[i],+l[i]])}return r}),n]};Pu.props={defaultShape:"area",defaultLabelShape:"label",channels:[...vc({shapes:["area","smooth"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...kc(),...xc()],interaction:{shareTooltip:!0,seriesTooltip:!0,showCrosshairs:!0}};const Nu=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=Oc(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};Nu.props={defaultShape:"link",defaultLabelShape:"label",channels:[...vc({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...kc(),...bc()]};const Lu=s=>{var t=s["cartesian"];return t?Sc:(t,e,n,r)=>{const{x:i,y:a}=n,o=Oc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Lu.props={defaultShape:"image",defaultLabelShape:"label",channels:[...vc({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...kc(),...bc()]};const Cu=()=>(t,e,n,a)=>{const o=Object.entries(n).filter(([t])=>t.startsWith("x")).map(([,t])=>t),s=Object.entries(n).filter(([t])=>t.startsWith("y")).map(([,t])=>t);n=t.map(e=>{var n=[];for(let t=0;t<o.length;t++){var r=o[t][e];if(void 0===r)break;var i=s[t][e];n.push(a.map([+r,+i]))}return n});return[t,n]};Cu.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[...vc({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...kc(),...bc()]};const ju=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:f,y3:h,y4:d,series:p}=n,g=e.x,y=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+l[t])),n=e*(y?y.getBandWidth(y.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+f[t],+h[t],+d[t]];return[[e-n/2,o],[e+n/2,o],[e,o],[e,a],[e-n/2,a],[e+n/2,a],[e+n/2,r],[e-n/2,r],[e-n/2,i],[e+n/2,i],[e,r],[e,t],[e-n/2,t],[e+n/2,t]].map(t=>s.map(t))})]},Fu=(ju.props={defaultShape:"box",defaultLabelShape:"label",channels:[...vc({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroX"}],postInference:[...kc(),...xc()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});Fu.props={defaultShape:"vector",defaultLabelShape:"label",channels:[...vc({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...kc(),...bc()]};const Iu=()=>(t,e,n,r)=>{const i=n["y"];return[t,Array.from(t,t=>{return[[0,i[t]],[1,i[t]]].map(t=>r.map(t))})]};Iu.props={defaultShape:"line",defaultLabelShape:"label",channels:[...wc({shapes:["line"]}),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...kc()]};const Ru=()=>(t,e,n,r)=>{const i=n["x"];return[t,Array.from(t,t=>{return[[i[t],1],[i[t],0]].map(t=>r.map(t))})]};Ru.props={defaultShape:"line",defaultLabelShape:"label",channels:[...wc({shapes:["line"]}),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...kc()]};const Bu=(...t)=>Nu(...t);function Du(t,e,n,r){if(e)return()=>[0,1];const{[t]:i,[t+"1"]:a}=n;return t=>{var e=(null==(e=r.getBandWidth)?void 0:e.call(r,r.invert(+a[t])))||0;return[i[t],a[t]+e]}}function zu(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=Du("x",r,n,e.x),o=Du("y",s,n,e.y);return[t,Array.from(t,t=>{var[e,n]=a(t),[t,r]=o(t);return[[e,t],[n,t],[n,r],[e,r]].map(t=>i.map(t))})]}}Bu.props={defaultShape:"connector",defaultLabelShape:"label",channels:[...wc({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...kc()]};const Gu=()=>zu();Gu.props={defaultShape:"range",defaultLabelShape:"label",channels:[...wc({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...kc()]};const Wu=()=>zu({extendY:!0});Wu.props={defaultShape:"range",defaultLabelShape:"label",channels:[...wc({shapes:["range"]}),{name:"x",required:!0}],preInference:[],postInference:[...kc()]};const Hu=()=>zu({extendX:!0});function Vu(t){return t.target.depth}function qu(t,e){return t.sourceLinks.length?t.depth:e-1}function Yu(t){return function(){return t}}function Uu(t,e){return Ku(t.source,e.source)||t.index-e.index}function Xu(t,e){return Ku(t.target,e.target)||t.index-e.index}function Ku(t,e){return t.y0-e.y0}function $u(t){return t.value}function Zu(t){return t.index}function Ju(t){return t.nodes}function Qu(t){return t.links}function tf(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function ef({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const r of n.sourceLinks)r.y0=t+r.width/2,t+=r.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function nf(){let x=0,w=0,k=1,M=1,O=24,_=8,S,E=Zu,A=qu,T,P,N,L=Ju,C=Qu,j=6;function e(e){e={nodes:L(e),links:C(e)};{var{nodes:i,links:t}=e;i.forEach((t,e)=>{t.index=e,t.sourceLinks=[],t.targetLinks=[]});const g=new Map(i.map(t=>[E(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=tf(g,n)),"object"!=typeof r&&(r=t.target=tf(g,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=N)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(N),r.sort(N)}t=e.nodes;for(const y of t)y.value=void 0===y.fixedValue?Math.max(yu(y.sourceLinks,$u),yu(y.targetLinks,$u)):y.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(T){var s,l=Math.max(ou(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=T.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(ou(t,t=>t.depth)+1,0),n=(k-x-O)/(e-1),r=new Array(e).fill(0).map(()=>[]);for(const a of t){var i=Math.max(0,Math.min(e-1,Math.floor(A.call(null,a,e))));a.layer=i,a.x0=x+i*n,a.x1=a.x0+O,r[i]?r[i].push(a):r[i]=[a]}if(P)for(const o of r)o.sort(P);return r}(e),t=(S=Math.min(_,(M-w)/(ou(u,t=>t.length)-1)),u),f=lu(t,t=>(M-w-(t.length-1)*S)/yu(t,$u));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*f,e=v.y1+S;for(const b of v.sourceLinks)b.width=b.value*f}e=(M-e+S)/(m.length+1);for(let t=0;t<m.length;++t){var h=m[t];h.y0+=e*(t+1),h.y1+=e*(t+1)}!function(t){if(void 0===N)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(Xu),n.sort(Uu)}(m)}for(let t=0;t<j;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/j);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===P&&o.sort(Ku),o.length&&F(o,i)}}(u,d,p),!function(n,r,i){for(let t=1,e=n.length;t<e;++t){var a,o=n[t];for(const c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===P&&o.sort(Ku),o.length&&F(o,i)}}(u,d,p)}return ef(e),e}function F(t,e){var n=t.length>>1,r=t[n];a(t,r.y0-S,n-1,e),i(t,r.y1+S,1+n,e),a(t,M,t.length-1,e),i(t,w,0,e)}function i(t,e,n,r){for(;n<t.length;++n){var i=t[n],a=(e-i.y0)*r;1e-6<a&&(i.y0+=a,i.y1+=a),e=i.y1+S}}function a(t,e,n,r){for(;0<=n;--n){var i=t[n],a=(i.y1-e)*r;1e-6<a&&(i.y0-=a,i.y1-=a),e=i.y0-S}}function I({sourceLinks:t,targetLinks:e}){if(void 0===N){for(const{source:{sourceLinks:t}}of e)t.sort(Xu);for(const{target:{targetLinks:e}}of t)e.sort(Uu)}}return e.update=function(t){return ef(t),t},e.nodeId=function(t){return arguments.length?(E="function"==typeof t?t:Yu(t),e):E},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:Yu(t),e):A},e.nodeDepth=function(t){return arguments.length?(T=t,e):T},e.nodeSort=function(t){return arguments.length?(P=t,e):P},e.nodeWidth=function(t){return arguments.length?(O=+t,e):O},e.nodePadding=function(t){return arguments.length?(_=S=+t,e):_},e.nodes=function(t){return arguments.length?(L="function"==typeof t?t:Yu(t),e):L},e.links=function(t){return arguments.length?(C="function"==typeof t?t:Yu(t),e):C},e.linkSort=function(t){return arguments.length?(N=t,e):N},e.size=function(t){return arguments.length?(x=w=0,k=+t[0],M=+t[1],e):[k-x,M-w]},e.extent=function(t){return arguments.length?(x=+t[0][0],k=+t[1][0],w=+t[0][1],M=+t[1][1],e):[[x,w],[k,M]]},e.iterations=function(t){return arguments.length?(j=+t,e):j},e}Hu.props={defaultShape:"range",defaultLabelShape:"label",channels:[...wc({shapes:["range"]}),{name:"y",required:!0}],preInference:[],postInference:[...kc()]};const rf={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},af={left:function(t){return t.depth},right:function(t,e){return e-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?lu(t.sourceLinks,Vu)-1:0},justify:qu};const of=f=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},rf,f),l=nf().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?af[n]||qu:"function"==c?n:qu).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function sf(t){return t}function lf(t=""){throw new Error(t)}function cf(t,e){var n,r,e=e["attributes"],i=new Set(["id","className"]);for([n,r]of Object.entries(e))i.has(n)||t.attr(n,r)}function uf(t){return null!=t&&!Number.isNaN(t)}function J(t,e){return ff(t,e)||{}}function ff(t,n){t=Object.entries(t).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Rs(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function hf(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}of.props={};const df=y=>{const m={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},v={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},b={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:null}},x={textAlign:t=>t.x[0]<.5?"start":"end",position:t=>t.x[0]<.5?"right":"left",fontSize:10};return()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=y,{links:t,nodes:l}=Tc(t,e),c=J(e,"node"),e=J(e,"link"),{key:u=t=>t.key,color:f=u}=c,{links:i,nodes:t}=of(Object.assign(Object.assign(Object.assign({},m),{nodeId:Ec(u)}),i))({links:t,nodes:l});const h=J(r,"label"),{text:d=u,spacing:p=5}=h,g=Z(h,["text","spacing"]);return[I({},v,{data:t,encode:Object.assign(Object.assign({},c),{color:f}),scale:n,style:J(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},x),{text:d,dx:t=>t.x[0]<.5?p:-p}),g),...a],animate:"object"==typeof s?J(s,"node"):s,axis:!1}),I({},b,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa"},J(r,"link")),animate:"object"==typeof s?J(s,"link"):s})]}},pf=(df.props={composite:!0},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);pf.props={defaultShape:"path",defaultLabelShape:"label",channels:[...vc({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[],postInference:[...kc()]};const gf=t=>t?parseInt(t):0;function yf(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||gf(t.width),e=e.clientHeight||gf(t.height),{width:(i={width:i-(gf(t.paddingLeft)+gf(t.paddingRight)),height:e-(gf(t.paddingLeft)+gf(t.paddingRight))}).width,height:i.height}):{width:n,height:r}}function mf(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:f=u,insetRight:h=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-f-h,height:t-a-n-c-o-d-u}}function vf(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,f,h,d,n=function(t,e){var n={treemapBinary:pc,treemapDice:$l,treemapSlice:uc,treemapSliceDice:gc,treemapSquarify:dc,treemapResquarify:yc};if(e="treemapSquarify"===t?n[t].ratio(e):n[t])return e;throw new TypeError("Invalid tile method!")}(e.tile,e.ratio),p=(t=t,p=e.path,(Array.isArray(t)?"function"==typeof p?nc().path(p):nc():kl)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(y),l=[0],i&&t.eachBefore(Kl),t}function y(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=f(t)-e)<n&&(n=i=(n+i)/2),(a-=h(t)-e)<r&&(r=a=(r+a)/2),o(t,n,r,i,a))}return r?p.sum(t=>e.ignoreParentValue&&t.children?0:t[r]).sort(e.sort):p.count(),o=dc,i=!1,s=a=1,l=[0],d=h=f=u=c=Pl,g.round=function(t){return arguments.length?(i=!!t,g):i},g.size=function(t){return arguments.length?(a=+t[0],s=+t[1],g):[a,s]},g.tile=function(t){return arguments.length?(o=Tl(t),g):o},g.padding=function(t){return arguments.length?g.paddingInner(t).paddingOuter(t):g.paddingInner()},g.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:Nl(+t),g):c},g.paddingOuter=function(t){return arguments.length?g.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):g.paddingTop()},g.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:Nl(+t),g):u},g.paddingRight=function(t){return arguments.length?(f="function"==typeof t?t:Nl(+t),g):f},g.paddingBottom=function(t){return arguments.length?(h="function"==typeof t?t:Nl(+t),g):h},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:Nl(+t),g):d},g.tile(n).size(e.size).round(e.round).paddingInner(e.paddingInner).paddingOuter(e.paddingOuter).paddingTop(e.paddingTop).paddingRight(e.paddingRight).paddingBottom(e.paddingBottom).paddingLeft(e.paddingLeft)(p),p.descendants().map(t=>Object.assign(t,{x:[t.x0,t.x1],y:[t.y0,t.y1]})).filter("function"==typeof e.layer?e.layer:t=>t.height===e.layer)}const bf=u=>t=>{var{width:t,height:e}=mf(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[]}=u,l=Z(u,["data","encode","scale","style","layout","labels"]),c={tile:"treemapSquarify",ratio:.5*(1+Math.sqrt(5)),size:[t,e],round:!1,ignoreParentValue:!0,padding:0,paddingInner:0,paddingOuter:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,sort:(t,e)=>e.value-t.value,layer:0},t={type:"rect",axis:!1,encode:{x:"x",y:"y",color:t=>t.data.parent.name},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]}},style:{stroke:"#fff"}},e=vf(n,I({},c,o),r),n=J(a,"label");return[I({},t,Object.assign(Object.assign({data:e,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{fontSize:10,text:t=>t.data.name,position:"inside",fill:"#000",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>t.x1-t.x0,lineHeight:t=>t.y1-t.y0}),n),...s]},l),{axis:!1}))]},xf=(bf.props={composite:!0},u=>t=>{var{width:t,height:e}=mf(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[]}=u,l=Z(u,["data","encode","scale","style","layout","labels"]),c={type:"point",axis:!1,legend:!1,scale:{x:{domain:[0,t]},y:{domain:[0,e]},size:{type:"identity"}},encode:{x:"x",y:"y",size:"r",shape:"point"},style:{fill:r.color?void 0:t=>0===t.height?"#ddd":"#fff",stroke:r.color?void 0:t=>0===t.height?"":"#000"}},n=((t,e,n)=>{const r=n["value"];n=(Fs(t)?nc().path(e.path):kl)(t);return r?n.sum(t=>t[r]).sort(e.sort):n.count(),ql().size(e.size).padding(e.padding)(n),n.descendants()})(n,I({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),I({},c.encode,r)),t=J(a,"label");return[I({},c,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a,labels:[Object.assign(Object.assign({},{text:"",position:"inside",textOverflow:"clip",wordWrap:!0,maxLines:1,wordWrapWidth:t=>2*t.r,lineHeight:t=>2*t.r}),t),...s]},l),{axis:!1}))]});function wf(t,e){return lu(t,t=>e[t])}function kf(t,e){return ou(t,t=>e[t])}function Mf(t,e){const n=2.5*Of(t,e)-1.5*Sf(t,e);return lu(t,t=>e[t]>=n?e[t]:NaN)}function Of(t,e){return fu(t,.25,t=>e[t])}function _f(t,e){return fu(t,.5,t=>e[t])}function Sf(t,e){return fu(t,.75,t=>e[t])}function Ef(t,e){const n=2.5*Sf(t,e)-1.5*Of(t,e);return ou(t,t=>e[t]<=n?e[t]:NaN)}function Af(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(qc(t,t=>a[+t]).values()).flatMap(t=>{const e=Mf(t,i),n=Ef(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}xf.props={composite:!0};const Tf=o=>()=>{var{data:t,encode:e,style:n={}}=o,{extend:r=!1}=n,n=Z(n,["extend"]),i=e["y"],i={y:i,y1:i,y2:i,y3:i,y4:i},a={y1:Of,y2:_f,y3:Sf};return r?[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:wf},a),{y4:kf})],encode:Object.assign(Object.assign({},e),i),style:n}]:(r=J(n,"box"),n=J(n,"point"),[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:Mf},a),{y4:Ef})],encode:Object.assign(Object.assign({},e),i),style:r},{type:"point",data:t,transform:[{type:Af}],encode:e,style:Object.assign({},n)}])},Pf=(Tf.props={composite:!0},s=>{var t=s["cartesian"];return t?Sc:(t,e,n,r)=>{const{x:i,y:a}=n,o=Oc(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function Nf(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,f,h,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(d){for(;d.length;)if((c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,!(d=(i=d)[f=u<<1|c]))return i[f]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[f]=p:t._root=p;else{for(;i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,(f=u<<1|c)==(h=(o<=l)<<1|a<=s););i[h]=d,i[f]=p}}else t._root=p}return t}function Lf(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Cf(t){return t[0]}function jf(t){return t[1]}function Ff(t,e,n){e=new If(null==e?Cf:e,null==n?jf:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function If(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Rf(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}Pf.props={defaultShape:"shape",defaultLabelShape:"label",channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};Ea=Ff.prototype=If.prototype;function Bf(t){return function(){return t}}function Df(t){return 1e-6*(t()-.5)}function zf(t){return t.index}function Gf(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function Wf(c){var u,f,a,o,h,d,s=zf,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Bf(30),p=1;function e(t){for(var e=0,n=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||Df(d),o=i.y+i.vy-r.y-r.vy||Df(d),a*=s=((s=Math.sqrt(a*a+o*o))-f[l])/s*t*u[l],o*=s,i.vx-=a*(s=h[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=Gf(r,t.source)),"object"!=typeof t.target&&(t.target=Gf(r,t.target)),o[t.source.index]=(o[t.source.index]||0)+1,o[t.target.index]=(o[t.target.index]||0)+1;for(i=0,h=new Array(n);i<n;++i)t=c[i],h[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),f=new Array(n),g()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function g(){if(a)for(var t=0,e=c.length;t<e;++t)f[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:Bf(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Bf(+t),g(),e):r},e}Ea.copy=function(){var t,e,n=new If(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(r)if(r.length)for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Rf(e));else n._root=Rf(r);return n},Ea.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Nf(this.cover(e,n),e,n,t)},Ea.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)Nf(this,i[u],a[u],t[u]);return this},Ea.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},Ea.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},Ea.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Ea.find=function(t,e,n){var r,i,a,o,s,l,c,u,f=this._x0,h=this._y0,d=this._x1,p=this._y1,g=[],y=this._root;for(y&&g.push(new Lf(y,f,h,d,p)),null==n?n=1/0:(f=t-n,h=e-n,d=t+n,p=e+n,n*=n);r=g.pop();)!(y=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<f||(i=r.y1)<h||(y.length?(g.push(new Lf(y[3],a=(s+o)/2,c=(l+i)/2,o,i),new Lf(y[2],s,c,a,i),new Lf(y[1],a,l,o,c),new Lf(y[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=g[g.length-1],g[g.length-1]=g[g.length-1-i],g[g.length-1-i]=r)):(l=(o=t-+this._x.call(null,y.data))*o+(s=e-+this._y.call(null,y.data))*s)<n&&(f=t-(c=Math.sqrt(n=l)),h=e-c,d=t+c,p=e+c,u=y.data));return u},Ea.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,f,h=this._root,d=this._x0,p=this._y0,g=this._x1,y=this._y1;if(h){if(h.length)for(;;){if((l=a>=(s=(d+g)/2))?d=s:g=s,(c=o>=(s=(p+y)/2))?p=s:y=s,!(h=(e=h)[u=c<<1|l]))return this;if(!h.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,f=u)}for(;h.data!==t;)if(!(h=(r=h).next))return this;(i=h.next)&&delete h.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(h=e[0]||e[1]||e[2]||e[3])&&h===(e[3]||e[2]||e[1]||e[0])&&!h.length&&(n?n[f]=h:this._root=h)):this._root=i}}return this},Ea.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Ea.root=function(){return this._root},Ea.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},Ea.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new Lf(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new Lf(e,o,s,i,a)),(e=c[2])&&l.push(new Lf(e,n,s,o,a)),(e=c[1])&&l.push(new Lf(e,o,r,i,s)),e=c[0])&&l.push(new Lf(e,n,r,o,s));return this},Ea.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Lf(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,f=e.node;f.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=f[0])&&n.push(new Lf(i,a,o,c,u)),(i=f[1])&&n.push(new Lf(i,c,o,s,u)),(i=f[2])&&n.push(new Lf(i,a,u,c,l)),i=f[3])&&n.push(new Lf(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Ea.x=function(t){return arguments.length?(this._x=t,this):this._x},Ea.y=function(t){return arguments.length?(this._y=t,this):this._y};var Hf={value:()=>{}};function Vf(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new qf(r)}function qf(t){this._=t}function Yf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Hf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}qf.prototype=Vf.prototype={constructor:qf,on:function(t,e){var n,r,i=this._,a=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(0<=n&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),o=-1,s=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<s;)if(n=(t=a[o]).type)i[n]=Yf(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Yf(i[n],t.name,null);return this}for(;++o<s;)if(n=(n=(t=a[o]).type)&&function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(i[n],t.name))return n},copy:function(){var t,e={},n=this._;for(t in n)e[t]=n[t].slice();return new qf(e)},call:function(t,e){if(0<(n=arguments.length-2))for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var Uf,Xf,Kf=0,$f=0,Zf=0,Jf=1e3,Qf=0,th=0,eh=0,nh="object"==typeof performance&&performance.now?performance:Date,rh="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ih(){return th||(rh(ah),th=nh.now()+eh)}function ah(){th=0}function oh(){this._call=this._time=this._next=null}function sh(t,e,n){var r=new oh;return r.restart(t,e,n),r}function lh(){th=(Qf=nh.now())+eh,Kf=$f=0;try{ih(),++Kf;for(var t,e=Uf;e;)0<=(t=th-e._time)&&e._call.call(void 0,t),e=e._next;--Kf}finally{for(var n,r,i=Uf,a=1/(Kf=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:Uf=r);Xf=n,uh(a),th=0}}function ch(){var t=nh.now(),e=t-Qf;Jf<e&&(eh-=e,Qf=t)}function uh(t){Kf||($f=$f&&clearTimeout($f),24<t-th?(t<1/0&&($f=setTimeout(lh,t-nh.now()-eh)),Zf=Zf&&clearInterval(Zf)):(Zf||(Qf=nh.now(),Zf=setInterval(ch,Jf)),Kf=1,rh(lh)))}oh.prototype=sh.prototype={constructor:oh,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?ih():+n)+(null==e?0:+e),this._next||Xf===this||(Xf?Xf._next=this:Uf=this,Xf=this),this._call=t,this._time=n,uh()},stop:function(){this._call&&(this._call=null,this._time=1/0,uh())}};const fh=4294967296;function hh(t){return t.x}function dh(t){return t.y}var ph=10,gh=Math.PI*(3-Math.sqrt(5));function yh(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,f=new Map,t=sh(i),n=Vf("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%fh)/fh}();function i(){h(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function h(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,f.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=ph*Math.sqrt(.5+r),e=r*gh,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:h,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),f.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,f.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?f.delete(t):f.set(t,p(e)),a):f.get(t)},find:function(t,e,n){var r,i,a,o=0,s=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function mh(t,e,n){var i,l,c,u,f,r,h,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,I=(r=Bf(-30),d=(h=1)/0,p=.81,g.initialize=function(t,e){i=t,c=e,R()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:Bf(+t),R(),g):r},g.distanceMin=function(t){return arguments.length?(h=t*t,g):Math.sqrt(h)},g.distanceMax=function(t){return arguments.length?(d=t*t,g):Math.sqrt(d)},g.theta=function(t){return arguments.length?(p=t*t,g):Math.sqrt(p)},g);function g(t){var e,n=i.length,r=Ff(i,hh,dh).visitAfter(B);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function R(){if(i){var t,e,n=i.length;for(f=new Array(n),t=0;t<n;++t)e=i[t],f[e.index]=+r(e,t,i)}}function B(t){var e,n,r,i,a,o=0,s=0;if(t.length){for(r=i=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(o+=e.value,s+=n,r+=n*e.x,i+=n*e.y);t.x=r/s,t.y=i/s}else for((e=t).x=e.data.x,e.y=e.data.y;o+=f[e.data.index],e=e.next;);t.value=o}function D(t,e,n,r){if(!t.value)return!0;var i=t.x-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=Df(c))*i),0===a&&(s+=(a=Df(c))*a),s<h&&(s=Math.sqrt(h*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=Df(c))*i),0===a&&(s+=(a=Df(c))*a),s<h)&&(s=Math.sqrt(h*s));t.data!==l&&(o=f[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var y,m,v,b,x,w,k,M,O,_,S,E,A,T,n=Wf(a).id(Ec(n)),P=("function"==typeof o&&I.strength(o),"function"==typeof s&&n.strength(s),yh(t).force("link",n).force("charge",I));function N(t){for(var e,n=0,r=m.length;n<r;++n)(e=m[n]).vy+=(b[n]-e.y)*v[n]*t}function L(){if(m){var t,e=m.length;for(v=new Array(e),b=new Array(e),t=0;t<e;++t)v[t]=isNaN(b[t]=+y(m[t],t,m))?0:+x(m[t],t,m)}}function C(t){for(var e,n=0,r=k.length;n<r;++n)(e=k[n]).vx+=(O[n]-e.x)*M[n]*t}function j(){if(k){var t,e=k.length;for(M=new Array(e),O=new Array(e),t=0;t<e;++t)M[t]=isNaN(O[t]=+w(k[t],t,k))?0:+_(k[t],t,k)}}function F(){for(var t,e=A.length,n=0,r=0,i=0;i<e;++i)n+=(t=A[i]).x,r+=t.y;for(n=(n/e-S)*T,r=(r/e-E)*T,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?P.force("center",(T=1,null==S&&(S=0),null==E&&(E=0),F.initialize=function(t){A=t},F.x=function(t){return arguments.length?(S=+t,F):S},F.y=function(t){return arguments.length?(E=+t,F):E},F.strength=function(t){return arguments.length?(T=+t,F):T},F)):P.force("x",(_=Bf(.1),"function"!=typeof w&&(w=Bf(null==w?0:+w)),C.initialize=function(t){k=t,j()},C.strength=function(t){return arguments.length?(_="function"==typeof t?t:Bf(+t),j(),C):_},C.x=function(t){return arguments.length?(w="function"==typeof t?t:Bf(+t),j(),C):w},C)).force("y",(x=Bf(.1),"function"!=typeof y&&(y=Bf(null==y?0:+y)),N.initialize=function(t){m=t,L()},N.strength=function(t){return arguments.length?(x="function"==typeof t?t:Bf(+t),L(),N):x},N.y=function(t){return arguments.length?(y="function"==typeof t?t:Bf(+t),L(),N):y},N)),P.stop();var z=Math.ceil(Math.log(P.alphaMin())/Math.log(1-P.alphaDecay()));for(let t=0;t<z;t++)P.tick();return{nodesData:t,linksData:a}}const vh=f=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=f,l=J(e,"node"),c=J(e,"link"),{links:t,nodes:u}=Tc(t,e),{nodesData:t,linksData:u}=mh({links:t,nodes:u},I({},{joint:!0},i),e);return[I({},{type:"link",axis:!1,legend:!1,encode:{x:[t=>t.source.x,t=>t.target.x],y:[t=>t.source.y,t=>t.target.y]},style:{stroke:"#999",strokeOpacity:.6}},{data:u,encode:c,labels:o,style:J(r,"link"),animate:"object"==typeof s?J(s,"link"):s}),I({},{type:"point",axis:!1,legend:!1,encode:{x:"x",y:"y",size:5,color:"group",shape:"point"},scale:{color:{type:"ordinal"}},style:{stroke:"#fff"}},{data:t,encode:Object.assign({},l),scale:n,style:J(r,"node"),labels:[Object.assign(Object.assign({},{text:""}),J(r,"label")),...a],animate:"object"==typeof s?J(s,"node"):s})]},bh=(vh.props={composite:!0},f=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=kl(t,t=>t.children).sum(t=>t[e]).sort(i),l=f();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),xh=t=>bh(xl)(t),wh=(xh.props={},t=>bh(cc)(t)),kh=(wh.props={},c=>{const u={sortBy:(t,e)=>e.value-t.value},f={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},h={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},d={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=c,l=null==e?void 0:e.value,{nodes:i,edges:l}=wh(Object.assign(Object.assign(Object.assign({},u),i),{field:l}))(t);return[I({},h,{data:l,encode:J(e,"link"),scale:J(n,"link"),labels:o,style:Object.assign({stroke:"#999"},J(r,"link")),animate:"object"==typeof s?J(s,"link"):s}),I({},f,{data:i,scale:J(n,"node"),encode:J(e,"node"),labels:[Object.assign(Object.assign({},d),J(r,"label")),...a],style:Object.assign({},J(r,"node")),animate:"object"==typeof s?J(s,"node"):s})]}});kh.props={composite:!0};var Mh={},Oh={},_h=34,Sh=10,Eh=13;function Ah(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function Th(t){var n=Object.create(null),r=[];return t.forEach(function(t){for(var e in t)e in n||r.push(n[e]=e)}),r}function Ph(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function Nh(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Ph(-e,6):9999<e?"+"+Ph(e,6):Ph(e,4))+"-"+Ph(t.getUTCMonth()+1,2)+"-"+Ph(t.getUTCDate(),2)+(a?"T"+Ph(n,2)+":"+Ph(r,2)+":"+Ph(i,2)+"."+Ph(a,3)+"Z":i?"T"+Ph(n,2)+":"+Ph(r,2)+":"+Ph(i,2)+"Z":r||n?"T"+Ph(n,2)+":"+Ph(r,2)+"Z":"")}function Lh(r){var e=new RegExp('["'+r+"\n\r]"),f=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,l=!1;function c(){if(s)return Oh;if(l)return l=!1,Mh;var t,e,n=a;if(r.charCodeAt(n)===_h){for(;a++<i&&r.charCodeAt(a)!==_h||r.charCodeAt(++a)===_h;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===Sh?l=!0:e===Eh&&(l=!0,r.charCodeAt(a)===Sh)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===Sh)l=!0;else if(e===Eh)l=!0,r.charCodeAt(a)===Sh&&++a;else if(e!==f)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===Sh&&--i,r.charCodeAt(i-1)===Eh&&--i;(e=c())!==Oh;){for(var u=[];e!==Mh&&e!==Oh;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?Nh(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,a){var o,s;return(t=n(t,function(t,e){if(o)return o(t,e-1);var n,r,i;s=t,o=a?(r=a,i=Ah(n=t),function(t,e){return r(i(t),e,n)}):Ah(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?Th(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?Th(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function Ch(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;jh&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}const jh=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),Fh=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>re(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),Lh(i).parse(t,a?Ch:sf);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};Fh.props={};const Ih=t=>{const{fields:a,as:n=[]}=t;return t=>{if(!a||(e=a,0===Object.keys(e).length))return t;var e;const[r="key",i="value"]=n;return t.reduce((e,n)=>{for(let t=0;t<a.length;t++)e.push(Object.assign(Object.assign({},n),{[r]:a[t],[i]:n[a[t]]}));return e},[])}};Ih.props={};const Rh=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)};function Bh(t,e,n){return Math.min(n,Math.max(e,t))}Rh.props={};const Dh=i=>t=>{const{fields:e=[]}=i;let{start:n=0,end:r=t.length}=i;n=Bh(n,0,t.length-1),r=Bh(r,1,t.length),n>r&&([n,r]=[r,n]);return t.filter((t,e)=>e>=n&&e<r).map(n=>e.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{}))},zh=(Dh.props={},t=>{t=t.fields;return Dh({fields:t})});zh.props={};const Gh=r=>t=>{return r&&0!==Object.keys(r).length?t.map(t=>Object.entries(t).reduce((t,[e,n])=>(t[r[e]||e]=n,t),{})):t};Gh.props={};const Wh=t=>{var r,{fields:t=[]}=t;r=!0;const e=t.map(t=>{var e,n;return Array.isArray(t)?([e,n=r]=t,[e,n]):[t,r]});return t=>{return[...t].sort((r,i)=>e.reduce((t,[e,n=!0])=>0!==t?t:n?r[e]<i[e]?-1:+(r[e]!==i[e]):r[e]>i[e]?-1:+(r[e]!==i[e]),0))}},Hh=(Wh.props={},t=>{const e=t["value"];return()=>e}),Vh=(Hh.props={},t=>{const{callback:e=sf}=t;return t=>e(t)}),qh=(Vh.props={},t=>{const{callback:e=sf}=t;return t=>Array.isArray(t)?t.map(e):t});qh.props={};var Yh=Object.freeze({__proto__:null,weight:function(t,e){return e.value-t.value},frequency:function(t,e){return e.frequency-t.frequency},id:function(t,e){return(""+t.id).localeCompare(""+e.id)},name:function(t,e){return(""+t.name).localeCompare(""+e.name)}});const Uh={y:0,thickness:.05,weight:!1,marginRatio:.1,id:t=>t.id,source:t=>t.source,target:t=>t.target,sourceWeight:t=>t.value||1,targetWeight:t=>t.value||1,sortBy:null};function Xh(t){const{y:c,thickness:u,weight:f,marginRatio:h,id:d,source:p,target:g,sourceWeight:y,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},Uh),t);return function(t){var e=t.nodes.map(t=>Object.assign({},t)),t=t.edges.map(t=>Object.assign({},t));{var n=e,r=t;r.forEach(t=>{t.source=p(t),t.target=g(t),t.sourceWeight=y(t),t.targetWeight=m(t)});const i=qc(r,t=>t.source),a=qc(r,t=>t.target);n.forEach(t=>{t.id=d(t);var e=i.has(t.id)?i.get(t.id):[],n=a.has(t.id)?a.get(t.id):[];t.frequency=e.length+n.length,t.value=yu(e,t=>t.sourceWeight)+yu(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:Yh[v])&&r.sort(n),!(n=(r=e).length))throw lf("Invalid nodes: it's empty!");if(f){const o=h/(2*n),s=r.reduce((t,e)=>t+e.value,0);r.reduce((t,e)=>{e.weight=e.value/s,e.width=e.weight*(1-h),e.height=u;var n=o+t,r=n+e.width,i=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!f)return e.forEach(t=>{var e=p(t),n=g(t),e=r.get(e),n=r.get(n);e&&n&&(t.x=[e.x,n.x],t.y=[e.y,n.y])});e.forEach(t=>{t.x=[0,0,0,0],t.y=[c,c,c,c]});const s=qc(e,t=>t.source),l=qc(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const Kh=e=>t=>Xh(e)(t),$h=(Kh.props={},Math.PI/180),Zh=64,Jh=2048;function Qh(t){return t.text}function td(){return"serif"}function ed(){return"normal"}function nd(t){return t.value}function rd(){return 90*~~(2*Math.random())}function id(){return 1}function ad(){}function od(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(Zh<<5)/c,Jh/c);let i=0,a=0,n=0;var u,f,h,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*$h),h=Math.cos(o.rotate*$h),u=t*h,f=t*d,h=e*h,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(f+h),Math.abs(f-h))):t=t+31>>5<<5,e>n&&(n=e),i+t>=Zh<<5&&(i=0,a+=n,n=0),a+e>=Jh)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*$h),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(Zh<<5)/c,Jh/c).data,g=[];0<=--s;)if((o=r[s]).hasText){var y=o.width,m=y>>5;let n=o.y1-o.y0;for(let t=0;t<n*m;t++)g[t]=0;if(null==(i=o.xoff))return;a=o.yoff;let r=0,t=-1;for(let e=0;e<n;e++){for(let t=0;t<y;t++){var v=m*e+(t>>5),b=p[(a+e)*(Zh<<5)+(i+t)<<2]?1<<31-t%32:0;g[v]|=b,r|=b}r?t=e:(o.y0++,n--,e--,a++)}o.y1=o.y0+t,o.sprite=g.slice(0,(o.y1-o.y0)*m)}}}function sd(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function ld(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function cd(){return document.createElement("canvas")}function ud(t){return"function"==typeof t?t:function(){return t}}const fd={archimedean:sd,rectangular:function(t){const n=4*t[0]/t[1];let r=0,i=0;return function(t){var e=t<0?-1:1;switch(Math.sqrt(1+4*e*t)-e&3){case 0:r+=n;break;case 1:i+=4;break;case 2:r-=n;break;default:i-=4}return[r,i]}}};function hd(){let b=[256,256],r=Qh,i=td,p=nd,g=ed,y=rd,m=id,x=sd,w=Math.random,v=ad,k=[],M=null,O=1/0;const _=ed,S=cd,E={};return E.start=function(){const[a,o]=b,s=((t=S()).width=t.height=1,e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2),t.width=(Zh<<5)/e,t.height=Jh/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=E.board||ld((b[0]>>5)*b[1]),c=k.length,u=[],f=k.map(function(t,e,n){return t.text=r.call(this,t,e,n),t.font=i.call(this,t,e,n),t.style=_.call(this,t,e,n),t.weight=g.call(this,t,e,n),t.rotate=y.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=m.call(this,t,e,n),t}).sort(function(t,e){return e.size-t.size});var t,e;let h=-1,d=E.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<O&&++h<c;){var i=f[h];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,od(s,i,f,h),i.hasText&&function(i,t,e){var n=t.x,r=t.y,a=Math.sqrt(b[0]*b[0]+b[1]*b[1]),o=x(b),s=w()<.5?1:-1;let l,c=-s,u,f;for(;(l=o(c+=s))&&(u=~~l[0],f=~~l[1],!(Math.min(Math.abs(u),Math.abs(f))>=a));)if(t.x=n+u,t.y=r+f,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>b[0]||t.y+t.y1>b[1])&&(!e||!function(t,n,r){var i=t.sprite,a=t.width>>5,e=t.x-(a<<4),o=127&e,s=32-o,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var h=t.sprite,d=t.width>>5,p=b[0]>>5,g=t.x-(d<<4),y=127&g,m=32-y,v=t.y1-t.y0;let n,r=(t.y+t.y0)*p+(g>>5);for(let e=0;e<v;e++){for(let t=n=0;t<=d;t++)i[r+t]|=n<<m|(t<d?(n=h[e*d+t])>>>y:0);r+=p}return delete t.sprite,1}return}(l,i,d)&&(v.call(null,"word",{cloud:E,word:i}),u.push(i),d?E.hasImage||(t=d,e=i,n=void 0,n=t[0],t=t[1],e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>t.x&&(t.x=e.x+e.x1),e.y+e.y1>t.y&&(t.y=e.y+e.y1)):d=[{x:i.x+i.x0,y:i.y+i.y0},{x:i.x+i.x1,y:i.y+i.y1}],i.x-=b[0]>>1,i.y-=b[1]>>1)}E._tags=u,E._bounds=d,h>=c&&(E.stop(),v.call(null,"end",{cloud:E,words:u,bounds:d}))}return M&&clearInterval(M),M=setInterval(n,0),n(),E},E.stop=function(){return M&&(clearInterval(M),M=null),E},E.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=ld((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}E.board=a,E.hasImage=!0}},E.timeInterval=function(t){O=null==t?1/0:t},E.words=function(t){k=t},E.size=function(t=[]){b=[+t[0],+t[1]]},E.text=function(t){r=ud(t)},E.font=function(t){i=ud(t)},E.fontWeight=function(t){g=ud(t)},E.rotate=function(t){y=ud(t)},E.spiral=function(t){x=fd[t]||t},E.fontSize=function(t){p=ud(t)},E.padding=function(t){m=ud(t)},E.random=function(t){w=ud(t)},E.on=function(t){v=ud(t)},E}const dd={size:[500,500],fontSize:[14,28]};function pd(r){return new Promise((t,e)=>{if(r instanceof HTMLImageElement)t(r);else if("string"==typeof r){const n=new Image;n.crossOrigin="anonymous",n.src=r,n.onload=()=>t(n),void(n.onerror=()=>{console.error(`'image ${r} load failed !!!'`),e()})}else e()})}const gd=h=>f=>re(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},dd,h),e=hd(),e=(i=e,a=t,yield{set(t,e,n){return void 0!==a[t]&&(e=e?e.call(null,a[t]):a[t],n?n.call(null,e):"function"==typeof i[t]?i[t](e):i[t]=e),this},setAsync(e,n,r){return re(this,void 0,void 0,function*(){var t;return void 0!==a[e]&&(t=n?yield n.call(null,a[e]):a[e],r?r.call(null,t):"function"==typeof i[e]?i[e](t):i[e]=t),this})}}.set("fontSize",t=>{var e=f.map(t=>t.value),n=t,t=[lu(e),ou(e)];if("function"==typeof n)return n;if(Array.isArray(n)){const[r,i]=n;if(!t)return()=>(i+r)/2;const[a,o]=t;return o===a?()=>(i+r)/2:({value:t})=>(i-r)/(o-a)*(t-a)+r}return()=>n}).set("font").set("fontStyle").set("fontWeight").set("padding").set("rotate").set("size").set("spiral").set("timeInterval").set("random").set("text").set("on").setAsync("imageMask",pd,e.createMask),e.words([...f]),e.start());const[r,o]=t.size;var t=[{x:0,y:0},{x:r,y:o}],{_bounds:e=t,_tags:t,hasImage:n}=e,t=t.map(t=>{var{x:e,y:n}=t,t=Z(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function yd(e){return"string"==typeof e?t=>t[e]:e}gd.props={};const md=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=yd(r),l=yd(t),c=Yc(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})};md.props={};const vd=u=>c=>re(void 0,void 0,void 0,function*(){var{width:t,height:e}=mf(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=Z(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield gd(Object.assign(Object.assign({},l),o))(e);return[I({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]}),bd=(vd.props={composite:!0},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),xd=(bd.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),wd=(xd.props={},()=>["#95F0FF","#78D3F8","#5AB8DB","#3A9DBF","#0A82A4","#00698A","#005170","#003958","#002440"]),kd=(wd.props={},()=>["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]),Md=(kd.props={},()=>["#9DF5CA","#61DDAA","#42C090","#19A576","#008A5D","#006F45","#00562F","#003E19","#002800"]),Od=(Md.props={},()=>["#8CF4F2","#6FD8D6","#52BCBA","#31A09F","#008685","#006C6C","#005354","#003B3D","#002627"]),_d=(Od.props={},()=>["#D0E4FF","#B4C8ED","#99ADD1","#7E92B5","#65789B","#4C6080","#334867","#1B324F","#021D38"]),Sd=(_d.props={},()=>["#FFC771","#FFAB57","#F6903D","#D77622","#B85C00","#9B4300","#7D2A00","#601000","#450000"]),Ed=(Sd.props={},()=>["#FFC2EC","#FFA6D0","#F08BB4","#D37099","#B65680","#9A3C67","#7E214F","#630038","#490022"]),Ad=(Ed.props={},()=>["#FFBB95","#FF9E7B","#FF8362","#E8684A","#C84D32","#AA311C","#8C1104","#6F0000","#510000"]),Td=(Ad.props={},()=>["#FFD83B","#F6BD16","#D7A100","#B98700","#9C6E00","#7F5600","#633F00","#482900","#2F1400"]),Pd=(Td.props={},()=>["#FFCCFF","#EBB0FF","#CE95F5","#B27AD8","#9661BC","#7B48A1","#613086","#48186C","#2E0054"]),Nd=(Pd.props={},()=>["#FDEDBE","#FFDF80","#FFCB33","#FFB200","#FF8C00","#FF6500","#E6450F","#B22C00","#661900"]),Ld=(Nd.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),Cd=(Ld.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),jd=(Cd.props={},()=>["#D2EDC8","#A9DACC","#75C6D1","#42B3D5","#3993C2","#3073AE","#27539B","#1E3388","#171E6D"]),Fd=(jd.props={},()=>["#003F7F","#004C99","#0059B2","#0072E5","#1A8CFF","#4DA6FF","#80BFFF","#B3D9FF","#EAE9EB","#FFD5B1","#FFC08C","#FFAB66","#FF963E","#F17F0B","#D16A0C","#A45411","#794012"]),Id=(Fd.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#E0F2EB","#66D8FF","#1AC5FF","#007FFF","#0059FF","#0040FF","#002CB2","#FFDF80","#001F7F"]),Rd=(Id.props={},()=>["#014c63","#10686c","#168575","#16a37e","#0bc286","#65cf9b","#96dcb0","#c1e8c5","#F2EAEA","#FFC5AC","#FFA884","#FF895D","#FF6836","#F3470D","#D13808","#A4300C","#7A270E"]),Bd=(Rd.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#FFE2DC","#EAACFF","#DD78FF","#C53FFF","#A700FF","#8500FF","#620BE1","#3607C2","#27029A"]);function Dd(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function zd(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Gd(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}Bd.props={};const Wd=Math.sqrt(50),Hd=Math.sqrt(10),Vd=Math.sqrt(2);function qd(t,e,n){e=(e-t)/Math.max(0,n),t=Math.floor(Math.log(e)/Math.LN10),n=e/10**t;return 0<=t?(n>=Wd?10:n>=Hd?5:n>=Vd?2:1)*10**t:-(10**-t)/(n>=Wd?10:n>=Hd?5:n>=Vd?2:1)}function Yd(t,e,n){n=Math.abs(e-t)/Math.max(0,n);let r=10**Math.floor(Math.log(n)/Math.LN10);n/=r;return n>=Wd?r*=10:n>=Hd?r*=5:n>=Vd&&(r*=2),e<t?-r:r}const Ud=(t,e,n=5)=>{t=[t,e];let r=0,i=t.length-1,a=t[r],o=t[i],s;return o<a&&([a,o]=[o,a],[r,i]=[i,r]),0<(s=qd(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=qd(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=qd(a,o,n)),0<s?(t[r]=Math.floor(a/s)*s,t[i]=Math.ceil(o/s)*s):s<0&&(t[r]=Math.ceil(a*s)/s,t[i]=Math.floor(o*s)/s),t},Xd=36e5,Kd=864e5,$d=7*Kd;Kd,Kd;function Zd(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}La=Zd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),e=Zd(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),n=Zd(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),us=Zd(Xd,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Xd*e)},t=>t.getHours()),ka=Zd(Kd,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Kd*e)},t=>t.getDate()-1);const Jd=Zd(2592e6,t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getMonth();t.setMonth(n+e)},t=>t.getMonth());o=Zd($d,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+$d*e)},t=>{var e=Jd.floor(t),t=new Date(+t);return Math.floor((+t-+e)/$d)}),Aa=Zd(31536e6,t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e=1)=>{var n=t.getFullYear();t.setFullYear(n+e)},t=>t.getFullYear());const Qd={millisecond:La,second:e,minute:n,hour:us,day:ka,week:o,month:Jd,year:Aa};Ta=Zd(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),Pa=Zd(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),i=Zd(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),Ca=Zd(Xd,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Xd*e)},t=>t.getUTCHours()),ja=Zd(Kd,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Kd*e)},t=>t.getUTCDate()-1);const tp=Zd(2592e6,t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCMonth();t.setUTCMonth(n+e)},t=>t.getUTCMonth());Fa=Zd($d,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+$d*e)},t=>{var e=tp.floor(t),t=new Date(+t);return Math.floor((+t-+e)/$d)}),Ia=Zd(31536e6,t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e=1)=>{var n=t.getUTCFullYear();t.setUTCFullYear(n+e)},t=>t.getUTCFullYear());const ep={millisecond:Ta,second:Pa,minute:i,hour:Ca,day:ja,week:Fa,month:tp,year:Ia};function np(t,e,n,r,i){var t=+t,e=+e,{tickIntervals:i,year:a,millisecond:o}=function(t){var{year:t,month:e,week:n,day:r,hour:i,minute:a,second:o,millisecond:s}=t?ep:Qd;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=Gd(i,l,0,c,s);let f;return f=u===c?[a,Yd(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max(Yd(t,e,n),1)]}const rp=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=np(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function ip(t){return null!=t&&!Number.isNaN(t)}const ap=e=>t=>-e(-t),op=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?ap(t):t},sp=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?ap(n):n},lp=(t,e,n,r)=>{var i=t<0,a=op(r,i),r=sp(r,i),i=e<t,o=i?t:e,e=[r(Math.floor(a(i?e:t))),r(Math.ceil(a(o)))];return i?e.reverse():e};function cp(e,o){return t=>{t.prototype.rescale=function(){this.initRange(),this.nice();var[t]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t))},t.prototype.initRange=function(){var t=this.options["interpolator"];this.options.range=e(t)},t.prototype.composeOutput=function(t,e){var n,{domain:r,interpolator:i,round:a}=this.getOptions(),r=o(r.map(t)),a=a?(n=i,t=>{t=n(t);return Ds(t)?Math.round(t):t}):i;this.output=Dd(a,r,e,t)},t.prototype.invert=void 0}}var up,Ra={exports:{}},Ba={exports:{}},fp=function(t){return!(!t||"string"==typeof t)&&(t instanceof Array||Array.isArray(t)||0<=t.length&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&"String"!==t.constructor.name))},hp=Array.prototype.concat,dp=Array.prototype.slice,pp=Ba.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];fp(i)?e=hp.call(e,dp.call(i)):e.push(i)}return e},gp=(pp.wrap=function(t){return function(){return t(pp(arguments))}},{aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),yp=Ba.exports,mp=Object.hasOwnProperty,vp=Object.create(null);for(up in gp)mp.call(gp,up)&&(vp[gp[up]]=up);var bp=Ra.exports={to:{},get:{}};function xp(t,e,n){return Math.min(Math.max(e,t),n)}function wp(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}bp.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=bp.get.hsl(t),n="hsl";break;case"hwb":e=bp.get.hwb(t),n="hwb";break;default:e=bp.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},bp.get.rgb=function(t){if(!t)return null;var e,n,r,i=[0,0,0,1];if(e=t.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(r=e[2],e=e[1],n=0;n<3;n++){var a=2*n;i[n]=parseInt(e.slice(a,2+a),16)}r&&(i[3]=parseInt(r,16)/255)}else if(e=t.match(/^#([a-f0-9]{3,4})$/i)){for(r=(e=e[1])[3],n=0;n<3;n++)i[n]=parseInt(e[n]+e[n],16);r&&(i[3]=parseInt(r+r,16)/255)}else{if(e=t.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/))for(n=0;n<3;n++)i[n]=parseInt(e[n+1],0);else{if(!(e=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(e=t.match(/^(\w+)$/))?"transparent"===e[1]?[0,0,0,0]:mp.call(gp,e[1])?((i=gp[e[1]])[3]=1,i):null:null;for(n=0;n<3;n++)i[n]=Math.round(2.55*parseFloat(e[n+1]))}e[4]&&(e[5]?i[3]=.01*parseFloat(e[4]):i[3]=parseFloat(e[4]))}for(n=0;n<3;n++)i[n]=xp(i[n],0,255);return i[3]=xp(i[3],0,1),i},bp.get.hsl=function(t){var e;return(t=t&&t.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,xp(parseFloat(t[2]),0,100),xp(parseFloat(t[3]),0,100),xp(isNaN(e)?1:e,0,1)]):null},bp.get.hwb=function(t){var e;return(t=t&&t.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/))?(e=parseFloat(t[4]),[(parseFloat(t[1])%360+360)%360,xp(parseFloat(t[2]),0,100),xp(parseFloat(t[3]),0,100),xp(isNaN(e)?1:e,0,1)]):null},bp.to.hex=function(){var t=yp(arguments);return"#"+wp(t[0])+wp(t[1])+wp(t[2])+(t[3]<1?wp(Math.round(255*t[3])):"")},bp.to.rgb=function(){var t=yp(arguments);return t.length<4||1===t[3]?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"},bp.to.rgb.percent=function(){var t=yp(arguments),e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||1===t[3]?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"},bp.to.hsl=function(){var t=yp(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},bp.to.hwb=function(){var t=yp(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},bp.to.keyword=function(t){return vp[t.slice(0,3)]};var kp=Ra.exports;function Mp(t,e,n){let r=n;return r<0&&(r+=1),1<r&&--r,r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}function Op(t){var e,n,r,t=kp.get(t);return t?({model:t,value:e}=t,"rgb"===t?e:"hsl"===t?(e=(t=e)[0]/360,n=t[1]/100,r=t[2]/100,t=t[3],0==n?[255*r,255*r,255*r,t]:[255*Mp(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*Mp(n,r,e),255*Mp(n,r,e-1/3),t]):null):null}const _p=(e,n)=>t=>e*(1-t)+n*t,Sp=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return _p(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=Op(n),c=Op(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},Ep=(t,e)=>{const n=_p(t,e);return t=>Math.round(n(t))};function Ap({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function Tp(t){return"object"==typeof t?t.valueOf():t}class Pp extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=Tp,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(Ap({map:this.map,initKey:this.initKey},t))}has(t){return super.has(Ap({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(([{map:t,initKey:n},r]=[{map:this.map,initKey:this.initKey},t],n=n(r),t.has(n)?t.get(n):(t.set(n,r),r)),e);var n,r}delete(t){return super.delete(([{map:t,initKey:e},n]=[{map:this.map,initKey:this.initKey},t],e=e(n),t.has(e)&&(n=t.get(e),t.delete(e)),n));var e,n}}class Np{constructor(t){this.options=I({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=I({},this.options,t),this.rescale(t)}rescale(t){}}const Lp=Symbol("defaultUnknown");function Cp(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function jp(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==Lp)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function Fp(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class Ip extends Np{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:Lp}}map(t){return 0===this.domainIndexMap.size&&Cp(this.domainIndexMap,this.getDomain(),this.domainKey),jp({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&Cp(this.rangeIndexMap,this.getRange(),this.rangeKey),jp({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){var[e]=this.options.domain,[n]=this.options.range;this.domainKey=Fp(e),this.rangeKey=Fp(n),this.rangeIndexMap?(t&&!t.range||this.rangeIndexMap.clear(),t&&!t.domain&&!t.compare||(this.domainIndexMap.clear(),this.sortedDomain=void 0)):(this.rangeIndexMap=new Map,this.domainIndexMap=new Map)}clone(){return new Ip(this.options)}getRange(){return this.options.range}getDomain(){var t,e;return this.sortedDomain||({domain:t,compare:e}=this.options,this.sortedDomain=e?[...t].sort(e):t),this.sortedDomain}}function Rp(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,f=u/(2/l*r+1-1/l*i);const h=f*i/l;f-=l*h;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=f/d.reduce((t,e)=>t+e);var c=new Pp(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new Pp(e.map((t,e)=>{e=d[e]*p+h;return[t,o?Math.floor(e):e]})),f=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(f-f/l*i))*s;let y=o?Math.round(t):t;var m=new Array(l);for(let t=0;t<l;t+=1){m[t]=(v=y,Math.round(1e12*v)/1e12);var v=e[t];y+=g.get(v)}return{valueBandWidth:c,valueStep:g,adjustedRange:m}}class Bp extends Ip{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Lp,flex:[]}}clone(){return new Bp(this.options)}getStep(t){return void 0===this.valueStep?1:"number"==typeof this.valueStep?this.valueStep:void 0===t?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return void 0===this.valueBandWidth?1:"number"==typeof this.valueBandWidth?this.valueBandWidth:void 0===t?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){var{padding:t,paddingInner:e}=this.options;return 0<t?t:e}getPaddingOuter(){var{padding:t,paddingOuter:e}=this.options;return 0<t?t:e}rescale(){super.rescale();var{align:t,domain:e,range:n,round:r,flex:i}=this.options,{adjustedRange:t,valueBandWidth:n,valueStep:r}=function(t){var e=t["domain"];if(0===(e=e.length))return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!(null==(n=t.flex)||!n.length))return Rp(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const Dp=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=qd(a,o,n);if(0===s||!Number.isFinite(s))return[];if(0<s){a=Math.ceil(a/s),o=Math.floor(o/s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)*s}else{s=-s,a=Math.ceil(a*s),o=Math.floor(o*s),i=new Array(r=Math.ceil(o-a+1));for(let t=0;t<r;t+=1)i[t]=(a+t)/s}return i};function zp(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const Gp=[1,5,2,2.5,4,3],Wp=100*Number.EPSILON;const Hp=(n,r,t=5,i=!0,a=Gp,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,f,h,d,p,g={score:-2,lmin:0,lmax:0,lstep:0};let y=1;for(;y<1/0;){for(let t=0;t<a.length;t+=1){var m=a[t],v=(f=m,h=a,d=y,p=void 0,p=Qs(h),1-Xs(h,f)/(p-1)-d+1);if(o[0]*v+o[1]+o[2]+o[3]<g.score){y=1/0;break}let e=2;for(;e<1/0;){x=e;var b=(u=s)<=x?2-(x-1)/(u-1):1;if(o[0]*v+o[1]+o[2]*b+o[3]<g.score)break;var x=(r-n)/(e+1)/y/m;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=y*m*10**t,k=(O=r,k=w*(e-1),(O-=n)<k?1-((k-O)/2)**2/(.1*O)**2:1);if(o[0]*v+o[1]*k+o[2]*b+o[3]<g.score)break;var M=Math.floor(r/w)*y-(e-1)*y,O=Math.ceil(n/w)*y;if(M<=O){var _=O-M;for(let t=0;t<=_;t+=1){var S=(M+t)*(w/y),E=S+w*(e-1),A=w,T=function(t,e,n,r,i,a){var o=Qs(e),e=Xs(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<Wp||a-t<Wp)&&r<=0&&0<=i?1:s)}(m,a,y,S,E,A),P=1-.5*((r-E)**2+(n-S)**2)/(.1*(r-n))**2,N=(l=e,N=n,l=(l-1)/(E-(L=S)),c=((c=s)-1)/(Math.max(E,r)-Math.min(N,L)),2-Math.max(l/c,c/l)),L=o[0]*T+o[1]*P+o[2]*N+ +o[3];g.score<L&&(!i||S<=n&&r<=E)&&(g.lmin=S,g.lmax=E,g.lstep=A,g.score=L)}}t+=1}e+=1}}y+=1}var t=zp(g.lmax),e=zp(g.lmin),C=zp(g.lstep),j=Math.floor((t=(t-e)/C,Math.round(1e12*t)/1e12))+1,F=new Array(j);F[0]=zp(e);for(let t=1;t<j;t+=1)F[t]=zp(F[t-1]+C);return F};class Vp extends Np{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Hp}}map(t){return ip(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Vp(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return Ds(t)&&Ds(r)?n(t,r,e):[]}}const qp=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return Dd(o=t<r?(a=zd(t,r),n(e,i)):(a=zd(r,t),n(i,e)),a)},Yp=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=zd(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=Gd(r,t,1,i)-1,n=a[e];return Dd(o[e],n)(t)}},Up=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?Yp:qp)(t,e,r?Ep:n)};class Xp extends Np{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:_p,tickCount:5}}map(t){return ip(t)?this.output(t):this.options.unknown}invert(t){return ip(t)?this.input(t):this.options.unknown}nice(){var t,e,n,r;this.options.nice&&([t,e,n,...r]=this.getTickMethodOptions(),this.options.domain=this.chooseNice()(t,e,n,...r))}getTicks(){var t=this.options["tickMethod"],[e,n,r,...i]=this.getTickMethodOptions();return t(e,n,r,...i)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}chooseNice(){return Ud}rescale(){this.nice();var[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){var{clamp:e,range:n}=this.options,t=this.options.domain.map(t),n=Math.min(t.length,n.length);if(e){e=t[0],t=t[n-1];const r=t<e?t:e,i=t<e?e:t;return t=>Math.min(Math.max(r,t),i)}return $s}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=Up(n.map(t),r,a,i);this.output=Dd(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=Up(i,r.map(t),_p);this.input=Dd(e,n,i)}}class Kp extends Xp{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Sp,tickMethod:Dp,tickCount:5}}chooseTransforms(){return[$s,$s]}clone(){return new Kp(this.options)}}class $p extends Bp{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Lp,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new $p(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const Zp=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class Jp extends Xp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Sp,tickMethod:Dp,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[$s,$s]:(t=.5===r?Zp:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new Jp(this.options)}}class Qp extends Jp{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Sp,tickMethod:Dp,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new Qp(this.options)}}class t0 extends Np{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return ip(t)?(t=Gd(this.thresholds,t,0,this.n),this.options.range[t]):this.options.unknown}invert(t){var e=this.options["range"],e=e.indexOf(t),t=this.thresholds;return[t[e-1],t[e]]}clone(){return new t0(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const e0=(t,e,n,r=10)=>{var i=t<0,a=sp(r,i),o=op(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),f=o(c),h=[];if(!(r%1)&&f-u<n){if(u=Math.floor(u),f=Math.ceil(f),i)for(;u<=f;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(c<p)break;l<=p&&h.push(p)}}else for(;u<=f;u+=1){var g=a(u);for(let t=1;t<r;t+=1){var y=g*t;if(c<y)break;l<=y&&h.push(y)}}2*h.length<n&&(h=Dp(l,c,n))}else h=Dp(u,f,Math.min(f-u,n)).map(a);return s?h.reverse():h};class n0 extends Xp{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Sp,tickMethod:e0,tickCount:5}}chooseNice(){return lp}getTickMethodOptions(){var{domain:t,tickCount:e,base:n}=this.options;return[t[0],t[t.length-1],e,n]}chooseTransforms(){var{base:t,domain:e}=this.options,e=e[0]<0;return[op(t,e),sp(t,e)]}clone(){return new n0(this.options)}}class r0 extends t0{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Hp}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=Ud(n,t,e))}getTicks(){var t=this.options["tickMethod"],[e,n,r]=this.getTickMethodOptions();return t(e,n,r)}getTickMethodOptions(){var{domain:t,tickCount:e}=this.options;return[t[0],t[t.length-1],e]}rescale(){this.nice();var{range:t,domain:e}=this.options,[n,r]=e;this.n=t.length-1,this.thresholds=new Array(this.n);for(let t=0;t<this.n;t+=1)this.thresholds[t]=((t+1)*r-(t-this.n)*n)/(this.n+1)}invert(t){var[t,e]=super.invert(t),[n,r]=this.options.domain;return void 0===t&&void 0===e?[t,e]:[t||n,e||r]}getThresholds(){return this.thresholds}clone(){return new r0(this.options)}}function i0(t,e,n=!1){var r=t,i=(n||r.sort((t,e)=>t-e),[]);for(let t=1;t<e;t+=1)i.push(function(t,e){var n,r=t.length;if(r)return r<2?t[r-1]:(r=(r-1)*e,(n=t[e=Math.floor(r)])+(t[e+1]-n)*(r-e))}(r,t/e));return i}class a0 extends t0{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Hp}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=i0(t,this.n+1,!1)}invert(t){var[t,e]=super.invert(t),n=this.options["domain"],r=n[0],n=n[n.length-1];return void 0===t&&void 0===e?[t,e]:[t||r,e||n]}getThresholds(){return this.thresholds}clone(){return new a0(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var o0=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,s0=/\[([^]*?)\]/gm;function l0(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function c0(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0,i=e;r<i.length;r++){var a,o=i[r];for(a in o)t[a]=o[a]}return t}function u0(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var f0,Da=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],za=["January","February","March","April","May","June","July","August","September","October","November","December"],c=l0(za,3),h0=c0({},{dayNamesShort:l0(Da,3),dayNames:Da,monthNamesShort:c,monthNames:za,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),d0={D:function(t){return String(t.getDate())},DD:function(t){return u0(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return u0(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return u0(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return u0(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return u0(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return u0(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return u0(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return u0(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return u0(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return u0(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return u0(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return(t.getHours()<12?e.amPm[0]:e.amPm[1]).toUpperCase()},ZZ:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+u0(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+u0(Math.floor(Math.abs(t)/60),2)+":"+u0(Math.abs(t)%60,2)}},p0={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"};const g0=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=np(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function y0(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class m0 extends Xp{getDefaultOptions(){return{domain:[new Date(2e3,0,1),new Date(2e3,0,2)],range:[0,1],nice:!1,tickCount:5,tickInterval:void 0,unknown:void 0,clamp:!1,tickMethod:g0,interpolate:_p,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return rp}getTickMethodOptions(){var{domain:t,tickCount:e,tickInterval:n,utc:r}=this.options;return[t[0],t[t.length-1],e,n,r]}getFormatter(){const{mask:a,utc:t}=this.options,o=t?ep:Qd,s=t?y0:$s;return t=>{var e=s(t),t=a||function(t,e){var{second:e,minute:n,hour:r,day:i,week:a,month:o,year:s}=e;return e.floor(t)<t?".SSS":n.floor(t)<t?":ss":r.floor(t)<t?"hh:mm":i.floor(t)<t?"hh A":o.floor(t)<t?a.floor(t)<t?"MMM DD":"ddd DD":s.floor(t)<t?"MMMM":"YYYY"}(t,o),n=void 0;if(void 0===t&&(t=p0.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var r=[],i=(t=(t=p0[t]||t).replace(s0,function(t,e){return r.push(e),"@@@"}),c0(c0({},h0),n));return(t=t.replace(o0,function(t){return d0[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new m0(this.options)}}var v0;let b0=f0=class extends Kp{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:$s,tickMethod:Dp,tickCount:5}}constructor(t){super(t)}clone(){return new f0(this.options)}};b0=f0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([cp(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return Dd(_p(0,1),zd(t,e))})],b0);let x0=v0=class extends Kp{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:$s,tickMethod:Dp,tickCount:5}}constructor(t){super(t)}clone(){return new v0(this.options)}};x0=v0=function(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;0<=s;s--)(i=t[s])&&(o=(a<3?i(o):3<a?i(e,n,o):i(e,n))||o);return 3<a&&o&&Object.defineProperty(e,n,o),o}([cp(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=Dd(_p(0,.5),zd(e,n)),a=Dd(_p(.5,1),zd(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],x0);const w0=t=>new Bp(t),k0=(w0.props={},t=>new Kp(t)),M0=(k0.props={},t=>new Ip(t)),O0=(M0.props={},t=>new Vp(t)),_0=(O0.props={},t=>new $p(t)),S0=(_0.props={},t=>new m0(t)),E0=(S0.props={},t=>new n0(t)),A0=(E0.props={},t=>new Jp(t)),T0=(A0.props={},t=>new t0(t)),P0=(T0.props={},t=>new a0(t)),N0=(P0.props={},t=>new r0(t)),L0=(N0.props={},t=>new Qp(t)),C0=(L0.props={},t=>new b0(t)),j0=(C0.props={},Math.PI),F0=2*j0,I0=1e-6,R0=F0-I0;function B0(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function D0(){return new B0}function z0(t){return function(){return t}}B0.prototype=D0.prototype={constructor:B0,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){var a,o,s=this._x1,l=this._y1,c=(n=+n)-(t=+t),u=(r=+r)-(e=+e),f=s-t,h=l-e,d=f*f+h*h;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):d>I0&&(Math.abs(h*c-u*f)>I0&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((j0-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>I0&&(this._+="L"+(t+d*f)+","+(e+d*h)),this._+="A"+i+","+i+",0,0,"+ +(f*s<h*n)+","+(this._x1=t+r*c)+","+(this._y1=e+r*u)):this._+="L"+(this._x1=t)+","+(this._y1=e))},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,a=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>I0||Math.abs(this._y1-c)>I0)&&(this._+="L"+l+","+c),n&&((a=a<0?a%F0+F0:a)>R0?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):a>I0&&(this._+="A"+n+","+n+",0,"+ +(a>=j0)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const G0=Math.abs,W0=Math.atan2,H0=Math.cos,V0=Math.max,q0=Math.min,Y0=Math.sin,U0=Math.sqrt,X0=1e-12,K0=Math.PI,$0=K0/2,Z0=2*K0;function J0(t){return 1<=t?$0:t<=-1?-$0:Math.asin(t)}function Q0(t){return t.innerRadius}function t1(t){return t.outerRadius}function e1(t){return t.startAngle}function n1(t){return t.endAngle}function r1(t){return t&&t.padAngle}function i1(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/U0(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,f=n-t,h=u*u+f*f,a=i-a,s=s*n-e*t,n=(f<0?-1:1)*U0(V0(0,a*a*h-s*s)),e=(s*f-u*n)/h,t=(-s*u-f*n)/h,d=(s*f+u*n)/h,s=(-s*u+f*n)/h,u=e-r,f=t-c,n=d-r,h=s-c;return n*n+h*h<u*u+f*f&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function a1(){var A=Q0,T=t1,P=z0(0),N=null,L=e1,C=n1,j=r1,F=null;function e(){var t,e,n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v,b,x,w,k=+A.apply(this,arguments),M=+T.apply(this,arguments),O=L.apply(this,arguments)-$0,_=C.apply(this,arguments)-$0,S=G0(_-O),E=O<_;if(F=F||(t=D0()),M<k&&(e=M,M=k,k=e),M>X0?S>Z0-X0?(F.moveTo(M*H0(O),M*Y0(O)),F.arc(0,0,M,O,_,!E),k>X0&&(F.moveTo(k*H0(_),k*Y0(_)),F.arc(0,0,k,_,O,E))):(r=e=O,i=n=_,o=a=S,h=(u=j.apply(this,arguments)/2)>X0&&(N?+N.apply(this,arguments):U0(k*k+M*M)),w=x=s=q0(G0(M-k)/2,+P.apply(this,arguments)),h>X0&&(f=J0(h/k*Y0(u)),h=J0(h/M*Y0(u)),(a-=2*f)>X0?(r+=f*=E?1:-1,i-=f):(a=0,r=i=(O+_)/2),(o-=2*h)>X0?(e+=h*=E?1:-1,n-=h):(o=0,e=n=(O+_)/2)),u=M*H0(e),f=M*Y0(e),h=k*H0(i),O=k*Y0(i),s>X0&&(d=M*H0(n),p=M*Y0(n),g=k*H0(r),y=k*Y0(r),S<K0)&&(_=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<X0))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,f,g,y,d,p,h,O))&&(S=u-_[0],v=f-_[1],b=d-_[0],m=p-_[1],v=1/Y0((1<(S=(S*b+v*m)/(U0(S*S+v*v)*U0(b*b+m*m)))?0:S<-1?K0:Math.acos(S))/2),b=U0(_[0]*_[0]+_[1]*_[1]),x=q0(s,(k-b)/(v-1)),w=q0(s,(M-b)/(1+v))),o>X0?w>X0?(l=i1(g,y,u,f,M,w,E),c=i1(d,p,h,O,M,w,E),F.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?F.arc(l.cx,l.cy,w,W0(l.y01,l.x01),W0(c.y01,c.x01),!E):(F.arc(l.cx,l.cy,w,W0(l.y01,l.x01),W0(l.y11,l.x11),!E),F.arc(0,0,M,W0(l.cy+l.y11,l.cx+l.x11),W0(c.cy+c.y11,c.cx+c.x11),!E),F.arc(c.cx,c.cy,w,W0(c.y11,c.x11),W0(c.y01,c.x01),!E))):(F.moveTo(u,f),F.arc(0,0,M,e,n,!E)):F.moveTo(u,f),k>X0&&a>X0?x>X0?(l=i1(h,O,d,p,k,-x,E),c=i1(u,f,g,y,k,-x,E),F.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?F.arc(l.cx,l.cy,x,W0(l.y01,l.x01),W0(c.y01,c.x01),!E):(F.arc(l.cx,l.cy,x,W0(l.y01,l.x01),W0(l.y11,l.x11),!E),F.arc(0,0,k,W0(l.cy+l.y11,l.cx+l.x11),W0(c.cy+c.y11,c.cx+c.x11),E),F.arc(c.cx,c.cy,x,W0(c.y11,c.x11),W0(c.y01,c.x01),!E))):F.arc(0,0,k,i,r,E):F.lineTo(h,O)):F.moveTo(0,0),F.closePath(),t)return F=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +T.apply(this,arguments))/2,e=(+L.apply(this,arguments)+ +C.apply(this,arguments))/2-K0/2;return[H0(e)*t,Y0(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:z0(+t),e):A},e.outerRadius=function(t){return arguments.length?(T="function"==typeof t?t:z0(+t),e):T},e.cornerRadius=function(t){return arguments.length?(P="function"==typeof t?t:z0(+t),e):P},e.padRadius=function(t){return arguments.length?(N=null==t?null:"function"==typeof t?t:z0(+t),e):N},e.startAngle=function(t){return arguments.length?(L="function"==typeof t?t:z0(+t),e):L},e.endAngle=function(t){return arguments.length?(C="function"==typeof t?t:z0(+t),e):C},e.padAngle=function(t){return arguments.length?(j="function"==typeof t?t:z0(+t),e):j},e.context=function(t){return arguments.length?(F=null==t?null:t,e):F},e}function o1(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function s1(t){this._context=t}function l1(t){return new s1(t)}function c1(t){return t[0]}function u1(t){return t[1]}function f1(o,s){var l=z0(!0),c=null,u=l1,f=null;function e(t){var e,n,r,i=(t=o1(t)).length,a=!1;for(null==c&&(f=u(r=D0())),e=0;e<=i;++e)!(e<i&&l(n=t[e],e,t))===a&&((a=!a)?f.lineStart():f.lineEnd()),a&&f.point(+o(n,e,t),+s(n,e,t));if(r)return f=null,r+""||null}return o="function"==typeof o?o:void 0===o?c1:z0(o),s="function"==typeof s?s:void 0===s?u1:z0(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:z0(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:z0(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:z0(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(f=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=f=null:f=u(c=t),e):c},e}function h1(u,f,h){var d=null,p=z0(!0),g=null,y=l1,m=null;function e(t){var e,n,r,i,a,o=(t=o1(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==g&&(m=y(a=D0())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,m.areaStart(),m.lineStart();else{for(m.lineEnd(),m.lineStart(),r=e-1;n<=r;--r)m.point(l[r],c[r]);m.lineEnd(),m.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+f(i,e,t),m.point(d?+d(i,e,t):l[e],h?+h(i,e,t):c[e]))}if(a)return m=null,a+""||null}function t(){return f1().defined(p).curve(y).context(g)}return u="function"==typeof u?u:void 0===u?c1:z0(+u),f="function"==typeof f?f:z0(void 0===f?0:+f),h="function"==typeof h?h:void 0===h?u1:z0(+h),e.x=function(t){return arguments.length?(u="function"==typeof t?t:z0(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:z0(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:z0(+t),e):d},e.y=function(t){return arguments.length?(f="function"==typeof t?t:z0(+t),h=null,e):f},e.y0=function(t){return arguments.length?(f="function"==typeof t?t:z0(+t),e):f},e.y1=function(t){return arguments.length?(h=null==t?null:"function"==typeof t?t:z0(+t),e):h},e.lineX0=e.lineY0=function(){return t().x(u).y(f)},e.lineY1=function(){return t().x(u).y(h)},e.lineX1=function(){return t().x(d).y(f)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:z0(!!t),e):p},e.curve=function(t){return arguments.length?(y=t,null!=g&&(m=y(g)),e):y},e.context=function(t){return arguments.length?(null==t?g=m=null:m=y(g=t),e):g},e}s1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var d1=g1(l1);function p1(t){this._curve=t}function g1(e){function t(t){return new p1(e(t))}return t._curve=e,t}function y1(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(g1(t)):e()._curve},t}function m1(){}function v1(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function b1(t,e){this._context=t,this._k=(1-e)/6}function x1(t,e){this._context=t,this._k=(1-e)/6}function w1(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>X0&&(r=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*r-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,o=(o*r-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>X0&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function k1(t,e){this._context=t,this._alpha=e}p1.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},b1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:v1(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:v1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new b1(t,n)}return t.tension=function(t){return e(+t)},t}(0),x1.prototype={areaStart:m1,areaEnd:m1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:v1(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function e(n){function t(t){return new x1(t,n)}return t.tension=function(t){return e(+t)},t}(0),k1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:w1(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var M1=function e(n){function t(t){return n?new k1(t,n):new b1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function O1(t,e){this._context=t,this._alpha=e}O1.prototype={areaStart:m1,areaEnd:m1,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){var n,r;switch(t=+t,e=+e,this._point&&(n=this._x2-t,r=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:w1(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _1=function e(n){function t(t){return n?new O1(t,n):new x1(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function S1(t){this._context=t}function E1(t){return new S1(t)}function A1(t,e){this._context=t,this._t=e}function T1(t){return new A1(t,.5)}function P1(t){return new A1(t,0)}function N1(t){return new A1(t,1)}function Q(t){return new L1([t],null,t,t.ownerDocument)}S1.prototype={areaStart:m1,areaEnd:m1,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},A1.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),0<=this._line&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:var n;this._t<=0?(this._context.lineTo(this._x,e),this._context.lineTo(t,e)):(n=this._x*(1-this._t)+t*this._t,this._context.lineTo(n,this._y),this._context.lineTo(n,e))}this._x=t,this._y=e}};class L1{constructor(t=null,e=null,n=null,r=null,i=[null,null,null,null,null],a=[],o=[]){this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}selectAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new L1(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new L1(this._elements,null,this._parent,this._document,void 0,void 0,t)}select(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new L1([t],null,t,this._document)}append(t){var e="function"==typeof t?t:()=>this.createElement(t),n=[];if(null!==this._data){for(let t=0;t<this._data.length;t++){var r=this._data[t],[r,i]=Array.isArray(r)?r:[r,null],a=e(r,t);a.__data__=r,null!==i&&(a.__fromElements__=i),this._parent.appendChild(a),n.push(a)}return new L1(n,null,this._parent,this._document)}for(let t=0;t<this._elements.length;t++){var o=this._elements[t],s=e(o.__data__,t);o.appendChild(s),n.push(s)}return new L1(n,null,n[0],this._document)}maybeAppend(t,e){var n=this._elements[0],r=n.getElementById(t);return r||((r="string"==typeof e?this.createElement(e):e()).id=t,n.appendChild(r)),new L1([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),f=qc(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var h=e[t],d=n(h,t),p=r(h,t);if(c.has(d)){var g=c.get(d);g.__data__=h,g.__facet__=!1,a.push(g),o.delete(g),c.delete(d)}else if(u.has(d)){g=u.get(d);g.__data__=h,g.__facet__=!0,a.push(g),u.delete(d)}else if(f.has(d)){const qc=f.get(d);s.push([h,qc]);for(const y of qc)o.delete(y);f.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(h):d.__toData__=[h],l.add(d),o.delete(d)):i.push(h)}var t=[new L1([],i,this._parent,this._document),new L1(a,null,this._parent,this._document),new L1(o,null,this._parent,this._document),new L1([],s,this._parent,this._document),new L1(l,null,this._parent,this._document)];return new L1(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new L1(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=L1.registry[t])?new e:lf("Unknown node type: "+t)}join(t=t=>t,e=t=>t,n=t=>t.remove(),r=t=>t,i=t=>t.remove()){t=t(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)}remove(){for(let t=0;t<this._elements.length;t++){const n=this._elements[t];var e=this._transitions[t];e?(Array.isArray(e)?e:[e]).map(t=>t.finished.then(()=>n.remove())):n.remove()}return new L1([],null,this._parent,this._document,void 0,this._transitions)}each(e){for(let t=0;t<this._elements.length;t++){var n=this._elements[t],r=n.__data__;e.call(n,r,t)}return this}attr(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})}style(n,r){const i="function"!=typeof r?()=>r:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})}transition(t){const n="function"!=typeof t?()=>t:t,r=this["_transitions"];return this.each(function(t,e){r[e]=n.call(this,t,e)})}on(t,e){return this.each(function(){this.addEventListener(t,e)}),this}call(t,...e){return t.call(this._parent,this,...e),this}node(){return this._elements[0]}nodes(){return this._elements}transitions(){return this._transitions}parent(){return this._parent}}function C1([t,e],[n,r]){return[t-n,e-r]}function j1([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function F1([t,e]){return Math.atan2(e,t)}function I1([t,e]){return F1([t,e])+Math.PI/2}function R1(t){let e=1/0,n=-1/0,r=1/0,i=-1/0;for(var[a,o]of t)e=Math.min(a,e),n=Math.max(a,n),r=Math.min(o,r),i=Math.max(o,i);var t=n-e,s=i-r;return[e,r,t,s]}function B1([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function D1(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function z1(t){return t.map((t,e)=>e)}function R(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function G1(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*j1(t,e):n,r=Math.PI/6,t=Math.atan2(e[1]-t[1],e[0]-t[0]),i=Math.PI/2-t-r,t=t-r;return[[e[0]-n*Math.sin(i),e[1]-n*Math.cos(i)],[e[0]-n*Math.cos(t),e[1]-n*Math.sin(t)]]}function W1(t,e,n,r,i){e=F1(C1(r,e))+Math.PI,n=F1(C1(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function H1(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=z1(a),[r,o]=zc(t,t=>a[t]);const s=new Kp({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function V1(t){var[t,e,n,r]=t;return[r,t,e,n]}function q1(t,e,n){var[e,r,,i]=mu(t)?V1(e):e,[n,a]=n,t=t.getCenter(),o=I1(C1(e,t)),r=I1(C1(r,t)),n=r===o&&n!==a?r+2*Math.PI:r;return{startAngle:o,endAngle:0<=n-o?n:2*Math.PI+n,innerRadius:j1(i,t),outerRadius:j1(e,t)}}function Y1(t,e,n,r){var i=t["defaultColor"],t=t[e]||{};return Object.assign({},{fill:i,stroke:i},t[n]||t[r])}function U1(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function X1(t,e){return vu(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}L1.registry={g:F.Group,rect:F.Rect,circle:F.Circle,path:F.Path,text:F.Text,ellipse:F.Ellipse,image:F.Image,line:F.Line,polygon:F.Polygon,polyline:F.Polyline,html:F.HTML};const K1=P=>{const{colorAttribute:N,first:L=!0,last:C=!0}=P,j=Z(P,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Y1(r,i,a,o),i=N,a=r[i],{radius:o=0}=r,r=Z(r,["symbol"==typeof i?i:i+"","radius"]),i=r.lineWidth||1,{stroke:s,radius:o=o,radiusTopLeft:l=o,radiusTopRight:c=o,radiusBottomRight:u=o,radiusBottomLeft:f=o,innerRadius:h=0,innerRadiusTopLeft:d=h,innerRadiusTopRight:p=h,innerRadiusBottomRight:g=h,innerRadiusBottomLeft:h=h,inset:y=0,insetLeft:m=y,insetRight:v=y,insetBottom:b=y,insetTop:x=y,lineWidth:i="stroke"===N||s?i:0}=j,w=Z(j,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","inset","insetLeft","insetRight","insetBottom","insetTop","lineWidth"]),{color:a=a,opacity:k}=e;if(!vu(n)&&!xu(n)){var[M,,O]=!!mu(n)?V1(t):t;const[T,E]=M;var[O,M]=C1(O,M),_=(0<O?T:T+O)+m,S=(0<M?E:E+M)+x,O=Math.abs(O)-(m+v),m=Math.abs(M)-(x+b);return Q(new F.Rect({})).call(R,r).style("lineWidth",i).style("x",_).style("y",S).style("width",O).style("height",m).style("stroke",void 0===s?a:s).style(U1(P),k).style(N,a).style("radius",[L?l:d,L?c:p,C?u:g,C?f:h]).call(R,w).node()}const{y:E,y1:A}=e;v=n.getCenter(),M=q1(n,t,[E,A]),x=a1().cornerRadius(o).padAngle(y*Math.PI/180);return Q(new F.Path({})).call(R,r).style("path",x(M)).style("transform",`translate(${v[0]}, ${v[1]})`).style("stroke",a||s).style("lineWidth",i).style(N,a).style(U1(P),k).call(R,j).node()}},$1=(K1.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>K1(Object.assign({colorAttribute:"fill"},t))),Z1=($1.props=Object.assign({},K1.props),t=>K1(Object.assign({colorAttribute:"stroke"},t)));Z1.props=Object.assign({},K1.props);const J1=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(mu(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,l=Z(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return K1(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function Q1(t,e,n){var[t,r,i,a]=t;if(mu(n)){const o=[e?e[0][0]:(r[0]+i[0])/2,r[1]],s=[e?e[3][0]:(r[0]+i[0])/2,i[1]];return[t,o,s,a]}const o=[r[0],e?e[0][1]:(r[1]+i[1])/2],s=[i[0],e?e[3][1]:(r[1]+i[1])/2];return[t,o,s,a]}J1.props=Object.assign({},K1.props);const tg=t=>J1(Object.assign({adjustPoints:Q1},t));function eg(t){const e="function"==typeof t?t:t.render;return class extends F.CustomElement{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}tg.props=Object.assign({},K1.props);const ng=eg(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;Q(t).maybeAppend("line",()=>new F.Path({})).style("d",e).call(R,r),Q(t).maybeAppend("line1",()=>new F.Path({})).style("d",n).call(R,i)});const rg=t=>{const{curve:f,gradient:h=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connectNulls:g=!1}=t,y=Z(t,["curve","gradient","gradientColor","defined","connectNulls"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Y1(r,i,a,o),{stroke:i,lineWidth:a}=r,o=Z(r,["stroke","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=h&&a?H1(a,s,l,h,d):r,s=X1(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),y);let c;if(vu(n)){const u=n.getCenter();c=n=>y1(f1().curve(d1)).angle((t,e)=>I1(C1(n[e],u))).radius((t,e)=>j1(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(f)(n)}else c=f1().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(f);var[r,e]=function(t,e){var n=[],r=[];let i=!1,a=null;for(const o of t)e(o[0])&&e(o[1])?(n.push(o),i&&(i=!1,r.push([a,o])),a=o):i=!0;return[n,r]}(t,p),o=J(l,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?Q(new F.Path({})).style("d",c(r)).call(R,l):a&&!g?Q(new F.Path({})).style("d",c(t)).call(R,l):Q(new ng).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},ig=(rg.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=vu(n)?E1:l1;return rg(Object.assign({curve:i},a))(t,e,n,r)}),ag=(ig.props=Object.assign({},rg.props),t=>{const{alpha:a=.5}=t,o=Z(t,["alpha"]);return(t,e,n,r)=>{var i=vu(n)?_1:M1;return rg(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),og=(ag.props=Object.assign({},rg.props),t=>rg(Object.assign({curve:N1},t))),sg=(og.props=Object.assign({},rg.props),t=>rg(Object.assign({curve:P1},t))),lg=(sg.props=Object.assign({},rg.props),t=>rg(Object.assign({curve:T1},t)));function cg(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}lg.props=Object.assign({},rg.props);var ug,fg=Object.freeze({__proto__:null,point:cg,square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){var r=.618*n;return[["M",t-r,e],["L",t,e-n],["L",t+r,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]},triangleDown:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]},hexagon:function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]},bowtie:function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]},line:function(t,e,n){return[["M",t,e+n],["L",t,e-n]]},cross:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]},tick:function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]},plus:function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]},hyphen:function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}});const u=h=>{const{colorAttribute:d,symbol:t,mode:p="auto"}=h,g=Z(h,["colorAttribute","symbol","mode"]),y=fg[t]||cg;return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=Y1(r,a,o,s),a=d,o=r[a],s=r["lineWidth"],r=Z(r,["symbol"==typeof a?a:a+"","lineWidth"]),a=g.stroke?s||1:s,{color:s=o,transform:o,opacity:l}=e,[c,u]=1===(c=t).length?c[0]:([[c,f],[u,i]]=c,[(c+u)/2,(f+i)/2]),f=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||ku(r))?([[t,r],[e,i]]=e,e=Math.abs((e-t)/2),t=Math.abs((i-r)/2),Math.max(0,(e+t)/2)):n}(p,t,e,n)||g.r||r.r;return Q(new F.Path).call(R,r).style("d",y(c,u,f)).style("lineWidth",a).style("transform",o).style("stroke",s).style(U1(h),l).style(d,s).call(R,g).node()}},hg=(u.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>u(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),dg=(hg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),pg=(dg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),gg=(pg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),yg=(gg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),mg=(yg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),vg=(mg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),bg=(vg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),xg=(bg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),wg=(xg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),kg=(wg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),Mg=(kg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),Og=(Mg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),_g=(Og.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),Sg=(_g.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"point"},t))),Eg=(Sg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"square"},t))),Ag=(Eg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),Tg=(Ag.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),Pg=(Tg.props=Object.assign({},u.props),t=>u(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),Ng=(Pg.props=Object.assign({},u.props),t=>{const{arrowSize:f="40%"}=t,h=Z(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=Y1(r,e,i,a),{fill:e,stroke:i}=r,a=Z(r,["fill","stroke"]),[r,t]=t,[l,c]=G1(r,t,{arrowSize:f}),u=D0();return u.moveTo(...r),u.lineTo(...t),u.moveTo(...t),u.lineTo(...l),u.moveTo(...t),u.lineTo(...c),Q(new F.Path).call(R,a).style("d",u.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(R,h).node()}});function Lg(t,e,n,r){this.message=t,this.expected=e,this.found=n,this.location=r,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,Lg)}function Cg(){this.constructor=ug}Ng.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},ug=Lg,Na=Error,Cg.prototype=Na.prototype,ug.prototype=new Cg,Lg.buildMessage=function(t,e){var a={literal:function(t){return'"'+r(t.text)+'"'},class:function(t){for(var e="",n=0;n<t.parts.length;n++)e+=t.parts[n]instanceof Array?i(t.parts[n][0])+"-"+i(t.parts[n][1]):i(t.parts[n]);return"["+(t.inverted?"^":"")+e+"]"},any:function(t){return"any character"},end:function(t){return"end of input"},other:function(t){return t.description}};function n(t){return t.charCodeAt(0).toString(16).toUpperCase()}function r(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}function i(t){return t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(t){return"\\x0"+n(t)}).replace(/[\x10-\x1F\x7F-\x9F]/g,function(t){return"\\x"+n(t)})}return"Expected "+function(t){for(var e,n,r=new Array(t.length),i=0;i<t.length;i++)r[i]=(n=t[i],a[n.type](n));if(r.sort(),0<r.length){for(e=i=1;i<r.length;i++)r[i-1]!==r[i]&&(r[e]=r[i],e++);r.length=e}switch(r.length){case 1:return r[0];case 2:return r[0]+" or "+r[1];default:return r.slice(0,-1).join(", ")+", or "+r[r.length-1]}}(t)+" but "+((t=e)?'"'+r(t)+'"':"end of input")+" found."};var jg;function Fg(t,e,n,r){var i,a,o,s=Ig(r=void 0===r?"...":r,n),l=ze(t)?t:Pe(i=t)?"":i.toString(),c=e,u=[];if(Ig(t,n)<=e)return t;for(;;){if(a=l.substr(0,16),c<(o=Ig(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(16)))return u.join("")}for(;;){if(a=l.substr(0,1),c<(o=Ig(a,n))+s)break;if(u.push(a),c-=o,!(l=l.substr(1)))return u.join("")}return"".concat(u.join("")).concat(r)}var Ig=Ze(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(jg=jg||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(n,"px"),r].join(" "),jg.measureText(ze(t)?t:"").width},function(t,e){return w([t],x(Ve(e=void 0===e?{}:e)),!1).join("")});function Rg(t,e){return"string"==typeof t?Ig(t,e):t}function Bg(t,e){return"capitalize"===e?t.toLowerCase().replace(/( |^)[a-z]/g,function(t){return t.toUpperCase()}):"lowercase"===e?t.toLowerCase():"uppercase"===e?t.toUpperCase():t}function Dg(t,e){e=Math.pow(10,e);return~~(t*e)/e}function zg(t){if(We(t))return[t,t,t,t];if(Ce(t)){var e=t.length;if(1===e)return[t[0],t[0],t[0],t[0]];if(2===e)return[t[0],t[1],t[0],t[1]];if(3===e)return[t[0],t[1],t[2],t[1]];if(4===e)return t}return[0,0,0,0]}var Gg=["default","active","selected","disabled","inactive"],Wg={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function Hg(t){var e;return t?null==t?void 0:t.default:(e=Je(t)||{},Gg.forEach(function(t){t in e&&delete e[t]}),e)}function Vg(t,e,n){return void 0===n&&(n=!1),e?(e=en(t,e),n?on({},Hg(t),e):e):Hg(t)||{}}function qg(n,r,i){void 0===i&&(i=!1);var a={};return Object.keys(n).forEach(function(t){var e;e=t,new RegExp("^".concat(r,"[A-Z].*")).test(e)!==i&&(e=t,i?a[e]=n[e]:a[(t=e.slice(r.length)).charAt(0).toLowerCase()+t.slice(1)]=n[e])}),a}function Yg(t,e){for(var n=[],r=t,i=0;i<e.length;i++){var a=e[i];n.push(qg(r,a)),r=qg(r,a,!0)}return n.push(r),n}function Ug(t){var n=["x","y"],r=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],i={},a={};return Object.entries(t).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];n.includes(e)||(-1!==r.indexOf(e)?a[e]=t:i[e]=t)}),[i,a]}function Xg(t){var e=t.canvas,n=t.touches,r=t.offsetX,t=t.offsetY;return e?[e.x,e.y]:n?[(e=n[0]).clientX,e.clientY]:r&&t?[r,t]:[0,0]}O.prototype.selectAll=function(t){return new O("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)},O.prototype.selectFacetAll=function(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new O(this._elements,null,this._parent,this._document,void 0,void 0,t)},O.prototype.select=function(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new O([t],null,t,this._document)},O.prototype.append=function(t){var e=this,n="function"==typeof t?t:function(){return e.createElement(t)},r=[];if(null!==this._data){for(var i=0;i<this._data.length;i++){var a=this._data[i],a=x(Array.isArray(a)?a:[a,null],2),o=a[0],a=a[1];(l=n(o,i)).__data__=o,null!==a&&(l.__fromElements__=a),this._parent.appendChild(l),r.push(l)}return new O(r,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var s=this._elements[i],l=n(o=s.__data__,i);s.appendChild(l),r.push(l)}return new O(r,null,r[0],this._document)},O.prototype.maybeAppend=function(t,e){e=ae(this,Kg,"m",$g).call(this,t.startsWith("#")?t:"#".concat(t),e);return e.attr("id",t),e},O.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=ae(this,Kg,"m",$g).call(this,t.startsWith(".")?t:".".concat(t),e);return e.attr("className",t),e},O.prototype.maybeAppendByName=function(t,e){e=ae(this,Kg,"m",$g).call(this,'[name="'.concat(t,'"]'),e);return e.attr("name",t),e},O.prototype.data=function(t,n,e){void 0===n&&(n=function(t){return t}),void 0===e&&(e=function(){return null});for(var r,i,a=[],o=[],s=new Set(this._elements),l=[],c=new Set,u=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),f=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),h=qc(this._elements,function(t){return e(t.__data__)}),d=0;d<t.length;d++){var p=t[d],g=n(p,d),y=e(p,d);if(u.has(g))(x=u.get(g)).__data__=p,x.__facet__=!1,o.push(x),s.delete(x),u.delete(g);else if(f.has(g))(x=f.get(g)).__data__=p,x.__facet__=!0,o.push(x),f.delete(g);else if(h.has(g)){var m=h.get(g);l.push([p,m]);try{r=void 0;for(var v=ie(m),b=v.next();!b.done;b=v.next()){var x=b.value;s.delete(x)}}catch(t){r={error:t}}finally{try{b&&!b.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}h.delete(g)}else u.has(y)?((x=u.get(y)).__toData__?x.__toData__.push(p):x.__toData__=[p],c.add(x),s.delete(x)):a.push(p)}var w=[new O([],a,this._parent,this._document),new O(o,null,this._parent,this._document),new O(s,null,this._parent,this._document),new O([],l,this._parent,this._document),new O(c,null,this._parent,this._document)];return new O(this._elements,null,this._parent,this._document,w)},O.prototype.merge=function(t){var e=w(w([],x(this._elements),!1),x(t._elements),!1),t=w(w([],x(this._transitions),!1),x(t._transitions),!1);return new O(e,null,this._parent,this._document,void 0,t)},O.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=O.registry[t];if(e)return new e;throw e="Unknown node type: ".concat(t),new Error(e)},O.prototype.join=function(t,e,n,r,i){void 0===e&&(e=function(t){return t}),void 0===n&&(n=function(t){return t.remove()}),void 0===r&&(r=function(t){return t}),void 0===i&&(i=function(t){return t.remove()});t=(t=void 0===t?function(t){return t}:t)(this._enter),e=e(this._update),n=n(this._exit),r=r(this._merge),i=i(this._split);return e.merge(t).merge(n).merge(r).merge(i)},O.prototype.remove=function(){for(var n=this,t=0;t<this._elements.length;t++)!function(t){var e=n._elements[t],t=n._transitions[t];t?t.then(function(){return e.remove()}):e.remove()}(t);return new O([],null,this._parent,this._document,void 0,this._transitions)},O.prototype.each=function(t){for(var e=0;e<this._elements.length;e++){var n=this._elements[e],r=n.__data__;t.call(n,r,e)}return this},O.prototype.attr=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this[n]=i.call(this,t,e))})},O.prototype.style=function(n,r){var i="function"!=typeof r?function(){return r}:r;return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})},O.prototype.update=function(n){var r="function"!=typeof n?function(){return n}:n;return this.each(function(t,e){n&&this.update(r.call(this,t,e))})},O.prototype.transition=function(t){var n="function"!=typeof t?function(){return t}:t,r=this._transitions;return this.each(function(t,e){r[e]=n.call(this,t,e)})},O.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},O.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,w([this._parent,this],x(e),!1)),this},O.prototype.node=function(){return this._elements[0]},O.prototype.nodes=function(){return this._elements},O.prototype.transitions=function(){return this._transitions},O.prototype.parent=function(){return this._parent},Kg=new WeakSet,$g=function(t,e){var n=this._elements[0],t=n.querySelector(t);return t||(t="string"==typeof e?this.createElement(e):e(),n.appendChild(t)),new O([t],null,this._parent,this._document)},O.registry={g:F.Group,rect:F.Rect,circle:F.Circle,path:F.Path,text:F.Text,ellipse:F.Ellipse,image:F.Image,line:F.Line,polygon:F.Polygon,polyline:F.Polyline,html:F.HTML};var Kg,$g,Zg=O;function O(t,e,n,r,i,a,o){void 0===t&&(t=null),void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=[null,null,null,null,null]),void 0===a&&(a=[]),void 0===o&&(o=[]),Kg.add(this),this._elements=Array.from(t),this._data=e,this._parent=n,this._document=r,this._enter=i[0],this._update=i[1],this._exit=i[2],this._merge=i[3],this._split=i[4],this._transitions=a,this._facetElements=o}function _(t,e){var n,r;if(e)try{for(var i=ie(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=x(a.value,2),s=o[0],l=o[1];t.style(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function S(t){return new Zg([t],null,t,t.ownerDocument)}function Jg(t,e,n){return t.querySelector(e)?S(t).select(e):S(t).append(n)}function Qg(t){var e,t=t&&t.getRenderBounds();return t?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0}}function ty(t){var t=t.getLocalBounds(),t=x([t.min,t.max],2),e=x(t[0],2),n=e[0],e=e[1],t=x(t[1],2),r=t[0],t=t[1];return{x:n,y:e,width:r-n,height:t-e,left:n,bottom:t,top:e,right:r}}function ey(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),n=e[0]-n,e=e[1]-t;return Math.sqrt(n*n+e*e)}function ny(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}function ry(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)ay(t,e[r]);return t}var iy=5,ay=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=iy),Object.entries(i).forEach(function(t){var t=x(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?Re(t)?(Re(r[e])||(n[e]={}),a<o?ay(r[e],t,a+1,o):n[e]=i[e]):Ce(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function oy(t,e,n,r,i,a){return(t===e||Math.min(t,e)<=i&&i<=Math.max(t,e))&&(n===r||Math.min(n,r)<=a&&a<=Math.max(n,r))}function sy(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function ly(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function cy(a){return void 0===a&&(a=0),function(t,e,n){var r,i=n.value;"function"==typeof i&&(n.value=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];r||(t=this,r=window.setTimeout(function(){i.apply(t,e),r=null},a))})}}var uy,fy=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function hy(t){return ze(t)||We(t)?new F.Text({style:{text:String(t)}}):t}function dy(t){return t*Math.PI/180}function py(t){return Number((180*t/Math.PI).toPrecision(5))}function gy(t,e){var t=(t instanceof F.DisplayObject?t:t.node()).computedStyleMap().get("transform");return!t||"unset"===t.value||null==(t=null==t?void 0:t.find(function(t){return t.t===e}))?void 0:t.d.map(function(t){return t.value})}function yy(t,e){if(e)try{var o=t instanceof F.DisplayObject?t:t.node(),n=e.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(t,e,n){return"translate(".concat((e=e,n=n,i=(r=((r=o)instanceof F.DisplayObject?r:r.node()).getBBox()).width,a=r.height,[(r=x([e,n].map(function(t,e){var n;return t.includes("%")?parseFloat((null==(n=t.match(/[+-]?([0-9]*[.])?[0-9]+/))?void 0:n[0])||"0")/100*(0===e?i:a):t}),2))[0],r[1]]),")");var r,i,a});o.attr("transform",n)}catch(t){}}function my(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}function vy(t,e){return Te(t)?t.apply(void 0,w([],x(e),!1)):t}function by(t,e,n,r){void 0===r&&(r=!0),t?n(e):r&&e.node().removeChildren()}function xy(){return null!==uy&&uy.apply(this,arguments)||this}function wy(e,n){return ne(t,r=F.CustomElement),t.prototype.connectedCallback=function(){var t,e;null!=(t=(e=this.descriptor).render)&&t.call(e,this.attributes,this),null!=(e=(t=this.descriptor).bindEvents)&&e.call(t,this.attributes,this)},t.prototype.update=function(t){var e;this.attr(on({},this.attributes,t=void 0===t?{}:t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t.prototype.attributeChangedCallback=function(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)},t;function t(t){t=r.call(this,ry({},{style:n},t))||this;return t.descriptor=e,t}var r}ne(xy,uy=F.CustomElement);function ky(t,e){function r(t){return"".concat(e,"-").concat(t)}return t=Object.fromEntries(Object.entries(t).map(function(t){var t=x(t,2),e=t[0],t=t[1],n=r(t);return[e,{name:n,class:".".concat(n),id:"#".concat(n),toString:function(){return n}}]})),Object.assign(t,{prefix:r}),t}function My(t){var r=v({},t),i=new RegExp(/^(f|[\S]+F)(ilter|iltrate)$/),a={},o={iltrate:"ilter",ilter:"iltrate"};return Object.entries(t).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];i.test(e)&&(a[e]=t)}),Object.keys(a).forEach(function(t){delete r[t]}),Object.keys(a).forEach(function(t){var e,n;(t.endsWith("iltrate")&&"function"!=typeof a[t]||t.endsWith("ilter")&&"function"==typeof a[t])&&(n=t.replace(i,function(t,e,n){return"".concat(e).concat(o[n])}),Object.assign(r,((e={})[n]=a[t],e)))}),r}function Oy(t,e){"text"===t.node().nodeName&&t.call(_,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:"..."})}function _y(t,e,n){void 0===n&&(n=!1);var r=t.getBBox(),i=r.width,r=r.height,e=e/Math.max(i,r);n&&t.scale(e)}ne(Ey,Sy=F.CustomElement),Ey.prototype.connectedCallback=function(){var t=this.style,e=t.x,t=t.y;this.setLocalPosition([+(void 0===e?0:e),+(void 0===t?0:t)]),this.render(this.attributes,this),this.bindEvents(this.attributes,this)},Ey.prototype.update=function(t){this.attr(ry({},this.attributes,t=void 0===t?{}:t)),null!=(t=this.render)&&t.call(this,this.attributes,this)},Ey.prototype.clear=function(){this.removeChildren()},Ey.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},Ey.prototype.attributeChangedCallback=function(){},Ey.prototype.bindEvents=function(t,e){};var Sy,a=Ey;function Ey(t){return Sy.call(this,t)||this}function Ay(t,e,n){return[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]]}function Ty(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function Py(t,e,n){return[["M",t-n,e],["L",t+n,e]]}ls=Ay,ps=Py;function Ny(t){n="default",je(e=t)&&e instanceof Image?n="image":Te(e)?n="symbol":ze(e)&&(r=new RegExp("data:(image|text)"),n=e.match(r)?"base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(e)?"url":"symbol");var e,n,r=n;return["base64","url","image"].includes(r)?"image":t&&"symbol"===r?"path":null}ne(jy,Ly=a),jy.prototype.render=function(t,e){var r=t.x,i=t.y,a=t.symbol,n=t.size,o=void 0===n?16:n,s=Z(t,["x","y","symbol","size"]),l=Ny(a);l?Jg(e,".".concat(l,"-marker"),l).attr("className","marker ".concat(l,"-marker")).call(function(t){var e,n;"image"===l?(e=2*o,t.style("img",a).style("width",e).style("height",e).style("x",-o).style("y",-o)):(e=o/2,n=Te(a)?a:jy.getSymbol(a),t.style("path",null==n?void 0:n(r,i,e)).call(_,s))}):(null!=(n=this.querySelector(".marker"))&&n.remove(),this.removeChildren())},jy.MARKER_SYMBOL_MAP=new Map,jy.registerSymbol=function(t,e){jy.MARKER_SYMBOL_MAP.set(t,e)},jy.getSymbol=function(t){return jy.MARKER_SYMBOL_MAP.get(t)};var Ly,Cy=jy;function jy(){return null!==Ly&&Ly.apply(this,arguments)||this}Cy.registerSymbol("cross",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]}),Cy.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),Cy.registerSymbol("line",Ty),Cy.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),Cy.registerSymbol("tick",function(t,e,n){return[["M",t-n/2,e-n],["L",t+n/2,e-n],["M",t,e-n],["L",t,e+n],["M",t-n/2,e+n],["L",t+n/2,e+n]]}),Cy.registerSymbol("circle",Ay),Cy.registerSymbol("point",ls),Cy.registerSymbol("bowtie",function(t,e,n){var r=n-1.5;return[["M",t-n,e-r],["L",t+n,e+r],["L",t+n,e-r],["L",t-n,e+r],["Z"]]}),Cy.registerSymbol("hexagon",function(t,e,n){var r=n/2*Math.sqrt(3);return[["M",t,e-n],["L",t+r,e-n/2],["L",t+r,e+n/2],["L",t,e+n],["L",t-r,e+n/2],["L",t-r,e-n/2],["Z"]]}),Cy.registerSymbol("square",function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]}),Cy.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),Cy.registerSymbol("triangle",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["Z"]]}),Cy.registerSymbol("triangle-down",function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}),Cy.registerSymbol("line",Ty),Cy.registerSymbol("dot",Py),Cy.registerSymbol("dash",ps),Cy.registerSymbol("smooth",function(t,e,n){return[["M",t-n,e],["A",n/2,n/2,0,1,1,t,e],["A",n/2,n/2,0,1,0,t+n,e]]}),Cy.registerSymbol("hv",function(t,e,n){return[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]}),Cy.registerSymbol("vh",function(t,e,n){return[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]}),Cy.registerSymbol("hvh",function(t,e,n){return[["M",t-(n+1),e+2.5],["L",t-n/2,e+2.5],["L",t-n/2,e-2.5],["L",t+n/2,e-2.5],["L",t+n/2,e+2.5],["L",t+n+1,e+2.5]]}),Cy.registerSymbol("vhv",function(t,e){return[["M",t-5,e+2.5],["L",t-5,e],["L",t,e],["L",t,e-3],["L",t,e+3],["L",t+6.5,e+3]]});ne(Ry,Fy=a),Ry.prototype.render=function(t,e){var n,r,i=t.padding,a=t.marker,o=t.text,s=t.textStyle,l=t.radius,c=t.backgroundStyle,u=t.spacing,f=t.align,t=t.verticalAlign,i=x(zg(void 0===i?0:i),4),h=i[0],d=i[1],p=i[2],i=i[3],g=Jg(e,".tag-content","g").attr("className","tag-content").node(),y=Jg(g,".tag-marker",function(){return new Cy({})}).attr("className","tag-marker").call(function(t){t.node().clear(),t.node().update(a||{symbol:"triangle",size:0,x:0})}).node(),u=(u=u,{x:(m=(y=y).getLocalBounds()).halfExtents[0]?m.max[0]+(u||0):y.style.x,y:m.halfExtents[1]?(m.min[1]+m.max[1])/2:y.style.y}),m=u.x,y=u.y,y=(Jg(g,".tag-text","text").attr("className","tag-text").style("fontFamily","sans-serif").style("fontSize",12).style("x",m).style("y",y).style("text",Pe(o)?"":"".concat(o)).call(_,s).style("textBaseline","middle").call(function(t){o||t.remove()}),u=i,m=h,y=f||"start",s=t||"top",t=(f=g).getLocalBounds(),r=n=0,"start"===y&&(n=u),"center"===y&&(n=-t.halfExtents[0]),"end"===y&&(n=-u-2*t.halfExtents[0]),"top"===s&&(r=m+t.halfExtents[1]),"middle"===s&&(r=0),"bottom"===s&&(r=m-2*t.halfExtents[1]),f.setLocalPosition([n,r]),g.getLocalBounds());Jg(e,".tag-background","rect").attr("className","tag-background").style("zIndex",(g.style.zIndex||0)-1).style("x",y.min[0]-i).style("y",y.min[1]-h).style("width",null!==c?i+d+2*y.halfExtents[0]:0).style("height",null!==c?h+p+2*y.halfExtents[1]:0).style("radius",null!=l?l:2).style("fill","#fafafa").style("stroke","#d9d9d9").style("lineWidth",1).call(_,c)},Ry.defaultOptions={type:Ry.tag="tag",style:{padding:4,spacing:4}};var Fy,Iy=Ry;function Ry(t){return Fy.call(this,on({},Ry.defaultOptions,t))||this}var By,Dy,zy={small:{textStyle:{fontSize:10},buttonStyle:{width:40,height:20},markerStyle:{size:8}},middle:{textStyle:{fontSize:12},buttonStyle:{width:60,height:30},markerStyle:{size:12}},large:{textStyle:{fontSize:16},buttonStyle:{width:80,height:40},markerStyle:{size:16}}},Gy={primary:{textStyle:{default:{fill:"#fff"},active:{}},buttonStyle:{default:{fill:"#1890ff",lineWidth:0},active:{fill:"#40a9ff"}},markerStyle:{default:{fill:"#1890ff"},active:{fill:"#40a9ff"}}},dashed:{textStyle:{default:{},active:{}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb",lineDash:[5,5]},active:{}},markerStyle:{}},link:{textStyle:{default:{fill:"#1890ff"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{fill:"#1890ff"}}},text:{textStyle:{default:{fill:"#000"},active:{}},buttonStyle:{default:{fill:"transparent",lineWidth:0},active:{}},markerStyle:{default:{stroke:"#000"}}},default:{textStyle:{default:{fill:"#000"},active:{fill:"#1890ff"}},buttonStyle:{default:{fill:"transparent",stroke:"#bbb"},active:{stroke:"#1890ff"}},markerStyle:{default:{stroke:"#bbb",lineWidth:1},active:{stroke:"#1890ff"}}}},Wy={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}};function Hy(t){var n=By.call(this,ry({},Hy.defaultOptions,t))||this;return n.state="default",n.clickEvents=function(){var t=n.attributes,e=t.onClick;"disabled"!==t.state&&null!=e&&e.call(n,n)},n.mouseenterEvent=function(){"disabled"!==n.attributes.state&&(n.state="active",n.render(n.attributes,n))},n.mouseleaveEvent=function(){var t=n.attributes.state;n.state=void 0===t?"default":t,n.render(n.attributes,n)},n}function Vy(t){return Dy.call(this,on({},Vy.defaultOptions,t))||this}ne(Hy,By=a),Object.defineProperty(Hy.prototype,"markerSize",{get:function(){var t=this.attributes.marker,e=this.getStyle("markerStyle");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(Hy.prototype,"text",{get:function(){var t,e=this.attributes.text;return""===e?e:(t=this.textAvailableWidth,Fg(e,t))},enumerable:!1,configurable:!0}),Object.defineProperty(Hy.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.marker,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=Ye(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(Hy.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),Hy.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=on({},en(zy,[n,e]),Vg(en(Gy,[t,e]),r),Vg(en(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in Wy[e]&&(i[t]=en(Wy,[e,t]))}),Object.keys(Wy.strict[e]).forEach(function(t){i[t]=en(Wy,["strict",e,t])}),on(i,Vg(en(this.attributes,e),"disabled"))),i},Hy.prototype.render=function(t,e){var n=t.padding,n=void 0===n?0:n,r=t.marker,t=t.markerSpacing,t=void 0===t?0:t,n=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),x(zg(n),4)),i=(n[0],n[1]),a=(n[2],n[3]),o=this.buttonHeight,s=this.getStyle("markerStyle"),l=this.markerSize,n=Jg(e,".marker",function(){return new Cy({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(v(v({},s),{symbol:r,x:a+l/2,y:o/2,size:l}))}).node().getLocalBounds(),c=this.text,c=void 0===c?"":c,u=this.getStyle("textStyle"),n=(this.textShape=Jg(e,".text","text").attr("className","text").style("x",l?n.max[0]+t:a).style("y",o/2).style("text",c).style("textAlign","left").style("textBaseline","middle").call(_,u).node(),this.textShape.getLocalBounds()),c=this.getStyle("buttonStyle");Jg(e,".background","rect").attr("className","background").style("zIndex",-1).call(_,c).style("height",o).style("width",a+(l?l+t:0)+2*n.halfExtents[0]+i).node()},Hy.prototype.update=function(t){this.attr(on({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},Hy.prototype.setState=function(t){this.update({state:t})},Hy.prototype.hide=function(){this.style.visibility="hidden"},Hy.prototype.show=function(){this.style.visibility="visible"},Hy.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},Hy.defaultOptions={type:Hy.tag="button",style:{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",markerAlign:"left",markerSpacing:5,textStyle:{default:{},active:{}},buttonStyle:{default:{lineWidth:1,radius:5},active:{}},markerStyle:{default:{}}}},ne(Vy,Dy=a),Vy.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,l=t.textStyle,i=t.padding,c=t.width,u=t.separator,t=x(zg(void 0===i?0:i),3),i=t[0],f=t[1],t=t[2],h=Jg(e,".container","g").attr("className","container").style("x",n+t).style("y",r+i),d=0,p=0,g=(h.node().removeChildren(),this),a=0;a<s.length;a++)!function(t){var e,n=s[t],r=new Iy({className:"breadcrumb-item",style:v(v({x:d,y:p,text:Pe(n.text)?n.id:n.text,textStyle:l},nn(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(h.append(function(){return r}),r.getLocalBounds()),a=2*i.halfExtents[0],i=2*i.halfExtents[1],a=(d+=a,Pe(c)||c-f<d&&(r.attr({x:0,y:p+i}),d=a,p+=i),g.bindInnerEvents(r,n),u||{}),n=a.spacing,n=void 0===n?0:n,o=a.text,o=void 0===o?"/":o,a=a.style;t!==s.length-1&&(e=new F.Text({className:"".concat(Vy.tag,"-separator"),id:"".concat(Vy.tag,"-separator-").concat(t),style:v(v(v(v({},Wg),{x:d+n,y:p+i/2}),a),{text:o,textAlign:"end",textBaseline:"middle"})}),h.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(a)},Vy.prototype.update=function(t){this.attr(on({},this.attributes,t)),this.render(this.attributes,this)},Vy.prototype.bindInnerEvents=function(t,e){var n=this.attributes,r=n.items,i=n.onClick;i&&t.addEventListener("click",function(){i.call(t,e.id,e,r)})},Vy.defaultOptions={type:Vy.tag="breadcrumb",style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:v(v({},Wg),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};ne(Uy,qy=F.DisplayObject),Uy.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},Uy.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},Uy.prototype.update=function(t){var e=t.lines,t=t.areas;this.clear(),e&&this.setAttribute("lines",e),t&&this.setAttribute("areas",t),this.render()},Uy.prototype.createLines=function(t){var e=this;t.forEach(function(t){e.linesGroup.appendChild(new F.Path({name:"line",style:t}))})},Uy.prototype.createAreas=function(t){var e=this;t.forEach(function(t){e.areasGroup.appendChild(new F.Path({name:"area",style:t}))})};var qy,Yy=Uy;function Uy(t){var e=this,n=t.style,t=Z(t,["style"]);return(e=qy.call(this,on({},{type:"lines",style:{width:0,height:0}},v({style:n},t)))||this).linesGroup=new F.Group({name:"lines"}),e.appendChild(e.linesGroup),e.areasGroup=new F.Group({name:"areas"}),e.appendChild(e.areasGroup),e.render(),e}ne($y,Xy=F.DisplayObject),$y.prototype.render=function(){var e=this;this.attributes.columns.forEach(function(t){t.forEach(function(t){e.columnsGroup.appendChild(new F.Rect({name:"column",style:t}))})})},$y.prototype.update=function(t){this.attr(on({},this.attributes,t)),t.columns&&(this.clear(),this.render())},$y.prototype.clear=function(){this.removeChildren()};var Xy,Ky=$y;function $y(t){var e=this,n=t.style,t=Z(t,["style"]);return(e=Xy.call(this,on({},{type:"column",style:{width:0,height:0}},v({style:n},t)))||this).columnsGroup=new F.Group({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function Zy(t){return 0===t.length?[0,0]:[De(function(t,e){if(Ce(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=Te(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return De(t)||0})),Be(function(t,e){if(Ce(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=Te(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return Be(t)||0}))]}function Jy(t){for(var e=Je(t),n=e[0].length,t=x([Array(n).fill(0),Array(n).fill(0)],2),r=t[0],i=t[1],a=0;a<e.length;a+=1)for(var o=e[a],s=0;s<n;s+=1)0<=o[s]?(o[s]+=r[s],r[s]=o[s]):(o[s]+=i[s],i[s]=o[s]);return e}function Qy(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r;if(o){c=r[0],u=r[1];for(var s=0,l=t.length;s<l;s+=1)var c=Xt([0,0],c,x=t[s]),u=Kt([0,0],u,x)}for(var s=0,f=t.length;s<f;s+=1){var h,d,p,g,y,m,v,b,x=t[s];0!==s||n?s!==f-1||n?(h=t[[s?s-1:f-1,s-1][n?0:1]],d=t[n?(s+1)%f:s+1],m=$t(m=Qt([0,0],d,h),m,e),0!==(y=(p=Zt(x,h))+(g=Zt(x,d)))&&(p/=y,g/=y),y=$t([0,0],m,-p),m=$t([0,0],m,g),v=Ut([0,0],x,y),b=Xt([0,0],b=Ut([0,0],x,m),Kt([0,0],d,x)),b=Kt([0,0],b,Xt([0,0],d,x)),v=Xt([0,0],v=Ut([0,0],x,y=$t([0,0],y=Qt([0,0],b,x),-p/g)),Kt([0,0],h,x)),v=Kt([0,0],v,Xt([0,0],h,x)),b=Ut([0,0],x,m=$t([0,0],m=Qt([0,0],x,v),g/p)),o&&(v=Xt([0,0],v=Kt([0,0],v,c),u),b=Xt([0,0],b=Kt([0,0],b,c),u)),a.push(i),a.push(v),i=b):(v=x,a.push(i),a.push(v)):i=x}return n&&a.push(a.shift()),a}(r,.4,e,n),u=r.length,f=[],i=0;i<u-1;i+=1)o=c[2*i],s=c[2*i+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],f.push(["C",o[0],o[1],s[0],s[1],(l=r[0])[0],l[1]])),f}function tm(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return w([e===n?"M":"L"],x(t),!1)});return e?t.reverse():t}function em(t,e){if(void 0===e&&(e=!1),t.length<=2)return tm(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];sn(a,n.slice(-2))||n.push.apply(n,w([],x(a),!1))}var o=Qy(n,!1);return e?o.unshift(w(["M"],x(t[r-1]),!1)):o.unshift(w(["M"],x(t[0]),!1)),o}function nm(t,e,n){t=Je(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}ne(am,rm=a),Object.defineProperty(am.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=Je(t),We(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(am.prototype,"data",{get:function(){return this.attributes.isStack?Jy(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(am.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(am.prototype,"baseline",{get:function(){var t=this.scales.y,e=x(t.getOptions().domain||[0,0],2),n=e[0],e=e[1];return e<0?t.map(e):t.map(n<0?0:n)},enumerable:!1,configurable:!0}),Object.defineProperty(am.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(am.prototype,"linesCfg",{get:function(){var t,n,r,i,a,e,o,s,l,c=this,u=this.attributes,f=u.areaStyle,h=u.isStack,d=u.lineStyle,p=u.smooth,u=this.containerCfg.width,g=this.data;return 0===g[0].length?{lines:[],areas:[]}:(t=this.scales,e=t.x,t=t.y,g=g,n=(e={type:"line",x:e,y:t}).x,r=e.y,i=(e=x(r.getOptions().range||[0,0],2))[0],a=e[1],i<a&&(e=x([i,a],2),a=e[0],i=e[1]),t=g.map(function(t){return t.map(function(t,e){return[n.map(e),Ge(r.map(t),a,i)]})}),e=[],f&&(g=this.baseline,e=h?(p?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=em(o),l=void 0,l=0===i?nm(s,e,n):(a=em(t[i-1],!0),o=o[0],a[0][0]="L",w(w(w([],x(s),!1),x(a),!1),[w(["M"],x(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=tm(t[i]),s=void 0,s=0===i?nm(o,e,n):((a=tm(t[i-1],!0))[0][0]="L",w(w(w([],x(o),!1),x(a),!1),[["Z"]],!1));r.push(s)}return r})(t,u,g):(o=p,s=u,l=g,t.map(function(t){return nm((o?em:tm)(t),s,l)}))),{lines:t.map(function(t,e){return v({stroke:c.getColor(e),path:(p?em:tm)(t)},d)}),areas:e.map(function(t,e){return v({path:t,fill:c.getColor(e)},f)})})},enumerable:!1,configurable:!0}),Object.defineProperty(am.prototype,"columnsCfg",{get:function(){var i=this,t=this.attributes,a=t.isStack,o=t.columnStyle,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};a&&(s=Jy(s));var e=this.createScales(s),l=e.x,c=e.y,e=x(Zy(s),2),n=e[0],e=e[1],u=new Kp({domain:[0,e-(0<n?0:n)],range:[0,t]}),f=l.getBandWidth(),h=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=f/s.length;return v(v({fill:i.getColor(r)},o),a?{x:l.map(e),y:c.map(t),width:f,height:u.map(h[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),am.prototype.render=function(t,e){this.containerShape=Jg(e,".container","rect").attr("className","container").node();var n=this.attributes.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=Jg(e,".".concat(r),function(){return new("line"===n?Yy:Ky)({className:r,style:i})}).call(_,i).node()},am.prototype.update=function(t){this.attr(on({},this.attributes,t)),this.render(this.attributes,this)},am.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},am.prototype.getColor=function(t){var e=this.attributes.color;return Ce(e)?e[t%e.length]:Te(e)?e.call(null,t):e},am.prototype.createScales=function(t){var e=this.attributes,n=e.type,r=e.isGroup,i=e.barPadding,a=e.nice,a=void 0===a||a,o=e.minValue,e=e.maxValue,s=this.containerCfg,l=s.width,s=s.height,c=x(Zy(t),2),u=c[0],c=c[1];return{type:n,x:"line"===n?new Kp({domain:[0,t[0].length-1],range:[0,l]}):new Bp({domain:t[0].map(function(t,e){return e}),range:[0,l],paddingInner:r?i:0}),y:new Kp({domain:[null!=o?o:u,null!=e?e:c],range:[s,0],nice:a})}},am.tag="sparkline",am.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineStyle:{lineWidth:1},isGroup:!1,columnStyle:{lineWidth:1,stroke:"#fff",padding:.1}}};var rm,im=am;function am(t){return rm.call(this,on({},am.defaultOptions,t))||this}var om=wy({render:function(t,e){function n(t,e,n,r,i){Jg(f,"line-".concat(t),"line").attr("className","line-".concat(t)).style("x1",e).style("y1",n).style("x2",r).style("y2",i).style("stroke",f.style.stroke).style("strokeOpacity",f.style.strokeOpacity).style("lineWidth",f.style.lineWidth)}var r=t.size,i=t.radius,a=t.stroke,o=t.fill,s=t.lineWidth,l=t.orient,c=t.fillOpacity,t=t.strokeOpacity,r=void 0===r?10:r,u=2.4*r,f=Jg(e,".rect","rect").attr("className","rect").style("x",-r/2).style("y",-u/2).style("width",r).style("height",u).style("fill",o||"#fff").style("fillOpacity",c||1).style("stroke",a||"#bfbfbf").style("lineWidth","number"!=typeof s?1:s).style("strokeOpacity",t).style("radius","number"!=typeof i?r/4:null!=i?i:2).node(),o=1/3*r,c=2/3*r,a=.25*u,s=.75*u;n(0,o,a,o,s),n(0,c,a,c,s),f.setOrigin(r/2,u/2),"vertical"===l?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}});ne(fm,sm=a),fm.prototype.render=function(t,e){var n,r,i,a=t.iconCfg,t=t.textCfg;i=e,a=((n=a)||{}).type,r="handle-icon ".concat(a,"-handle"),S(i).selectAll(".handle-icon").data(a?[a]:[],function(t){return t}).join(function(t){return t.append(function(t){return"symbol"===t?new Cy({className:r,name:"icon",style:n}):new om({name:"icon",className:r,style:n})})},function(t){return t.each(function(){this.update(n)})},function(t){return t.remove()}),void 0===(i=t)&&(i={}),Jg(e,".".concat(a="handle-text"),"text").attr("className",a).style("fontSize",12).style("fill","#000").style("fillOpacity",.45).style("textAlign","center").style("textBaseline","middle").call(_,i)};var sm,lm,cm,um=fm;function fm(){return null!==sm&&sm.apply(this,arguments)||this}function hm(t){var a=lm.call(this,on({},hm.defaultOptions,t))||this;return a.onSelectionMouseenter=function(){a.selectionShape.attr(a.getStyle("selectionStyle"))},a.onSelectionMouseleave=function(){a.selectionShape.attr(a.getStyle("selectionStyle"))},a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(Xg(t));var t=a.availableSpace,e=t.x,t=t.y,n=a.attributes,r=n.x,n=n.y;a.selectionStartPos=a.getRatio(a.prevPos-a.getOrientVal([e,t])-a.getOrientVal([r,n])),a.selectionWidth=0,a.addEventListener("mousemove",a.onDragging),a.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){t.stopPropagation();var t=a.getOrientVal(Xg(t)),e=t-a.prevPos;if(e){var n=a.getRatio(e);switch(a.target){case"start":a.setValuesOffset(n);break;case"end":a.setValuesOffset(0,n);break;case"selection":a.setValuesOffset(n,n);break;case"background":a.selectionWidth+=n,a.setValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort())}a.prevPos=t}},a.onDragEnd=function(){a.removeEventListener("mousemove",a.onDragging),a.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChanged=function(t){t=new F.CustomEvent("valueChanged",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}function dm(t){var o=cm.call(this,on({},dm.defaultOptions,t))||this;return o.onValueChanged=function(t){var e=o.style.value;t!==e&&(e=new F.CustomEvent("scroll",t={detail:{oldValue:t,value:e}}),o.dispatchEvent(e),e=new F.CustomEvent("valueChanged",t),o.dispatchEvent(e))},o.onTrackClick=function(t){var e=o.attributes.thumbLen,n=x(o.getLocalPosition(),2),r=n[0],n=n[1],i=x(o.padding,4),a=i[0],i=i[3],r=o.getOrientVal([r+i,n+a]),i=o.getOrientVal(Xg(t))-e/2,n=o.valueOffset(i-r,!0);o.setValue(n)},o.onThumbMouseenter=function(){o.thumbShape.attr(o.getStyle("thumbStyle","active"))},o.onTrackMouseenter=function(){o.trackShape.attr(o.getStyle("trackStyle","active"))},o.onThumbMouseleave=function(){o.thumbShape.attr(o.getStyle("thumbStyle"))},o.onTrackMouseleave=function(){o.trackShape.attr(o.getStyle("trackStyle"))},o.onDragStart=function(t){t.stopPropagation(),o.prevPos=o.getOrientVal(Xg(t)),document.addEventListener("mousemove",o.onDragging),document.addEventListener("mouseup",o.onDragEnd),document.addEventListener("touchmove",o.onDragging),document.addEventListener("touchcancel",o.onDragEnd)},o.onDragging=function(t){t.stopPropagation();var t=o.getOrientVal(Xg(t)),e=t-o.prevPos;o.setOffset(e),o.prevPos=t},o.onDragEnd=function(t){t.preventDefault(),document.removeEventListener("mousemove",o.onDragging),document.removeEventListener("mouseup",o.onDragEnd),document.removeEventListener("touchmove",o.onDragging),document.removeEventListener("touchcancel",o.onDragEnd)},o}ne(hm,lm=a),Object.defineProperty(hm.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.getSafetyValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(hm.prototype,"names",{get:function(){return this.getAttribute("names")},set:function(t){this.setAttribute("names",t)},enumerable:!1,configurable:!0}),Object.defineProperty(hm.prototype,"backgroundShapeCfg",{get:function(){return v(v({cursor:"crosshair",zIndex:0},this.availableSpace),this.getStyle("backgroundStyle"))},enumerable:!1,configurable:!0}),Object.defineProperty(hm.prototype,"sparklineShapeCfg",{get:function(){var t=this.attributes,t=(t.orient,t.sparkline),e=t.padding,t=Z(t,["padding"]),e=x(zg(e),4),n=e[0],r=e[1],i=e[2],e=e[3],a=this.availableSpace,o=a.width,a=a.height,s=this.getStyle("backgroundStyle").lineWidth,s=void 0===s?0:s;return v(v({x:s/2+e,y:s/2+n},t),{zIndex:0,width:o-s-e-r,height:a-s-n-i})},enumerable:!1,configurable:!0}),Object.defineProperty(hm.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.padding,n=t.width,t=t.height,e=x(zg(e),4),r=e[0],i=e[1],a=e[2],e=e[3];return{x:e,y:r,width:n-(e+i),height:t-(r+a)}},enumerable:!1,configurable:!0}),hm.prototype.getValues=function(){return this.values},hm.prototype.setValues=function(t){this.values=t,this.update({values:t})},hm.prototype.getNames=function(){return this.names},hm.prototype.setNames=function(t){this.names=t},hm.prototype.render=function(t,e){function n(e){var t="slider-".concat(e,"-handle");return Jg(a,".".concat(t),function(){return new um({className:t})}).call(function(t){t.node().update(r.getHandleShapeCfg(e))}).node()}var r=this,i=t.backgroundStyle,t=t.selectionStyle,e=Jg(e,".slider-background","rect").attr("className","slider-background").style("cursor","crosshair").style("fill","#416180").style("fillOpacity",.05).call(_,this.availableSpace).call(_,Vg(i)).node(),a=(Jg(this.backgroundShape=e,".slider-sparkline",function(){return new im({})}).attr("className","slider-sparkline").call(function(t){t.node().update(r.sparklineShapeCfg)}),Jg(e,".slider-foreground","g").attr("className","slider-foreground").node());this.selectionShape=Jg(a,".slider-selection","rect").attr("className","slider-selection").style("cursor","move").style("zIndex",2).style("fill","#5B8FF9").style("fillOpacity",.15).call(_,this.calcMask()).call(_,Vg(t)||{}).node();this.startHandle=n("start"),this.endHandle=n("end")},hm.prototype.getSafetyValues=function(t,e){void 0===t&&(t=this.getValues()),void 0===e&&(e=4);var n,r=this.attributes,i=r.min,r=r.max,a=x(this.getValues(),2),o=a[0],a=a[1],t=x(t||[o,a],2),s=t[0],t=t[1],l=t-s;return t<s&&(s=(n=x([t,s],2))[0],t=n[1]),r-i<l?[i,r]:s<i?o===i&&a===t?[i,t]:[i,l+i]:r<t?a===r&&o===s?[s,r]:[r-l,r]:[Dg(s,e),Dg(t,e)]},hm.prototype.getStyle=function(t,e,n){return void 0===e&&(e="default"),n?this.getHandleCfg(n):Vg(en(this.attributes,t),e,!0)},hm.prototype.calcMask=function(t){var t=x(this.getSafetyValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.width,n=n.height;return this.getOrientVal([{y:0,height:n,x:e*r,width:(t-e)*r},{x:0,width:r,y:e*n,height:(t-e)*n}])},hm.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=x(this.getSafetyValues(),2),i=r[0],r=r[1],t=("start"===t?i:r)*this.getOrientVal([n,e]);return{x:this.getOrientVal([t,n/2]),y:this.getOrientVal([e/2,t])}},hm.prototype.calcHandleText=function(t){var e,n,r=this.attributes,i=r.orient,r=r.names,a=this.getHandleCfg(t),o=a.spacing,s=a.formatter,a=a.textStyle,l=this.getHandleSize(t),c=this.getSafetyValues(),u=this.availableSpace,f=u.width,u=u.height,h=this.calcMask(),d=h.x,p=h.y,g=h.width,h=h.height,r=x("start"===t?[r[0],c[0]]:[r[1],c[1]],2),c=s(r[0],r[1]),s=new F.Text({style:v(v({},a),{text:c})}),r=Qg(s),a=r.width,r=r.height,s=(s.destroy(),0),y=0,l=l/2,m="center";return"horizontal"===i?(e=(i=o+l)+a/2,m="start"===t?(s=0<(n=d-i-a)?-e:e,0<n?"end":"start"):(s=(n=a<f-d-g-i)?e:-e,n?"start":"end")):(a=o+l,y="start"===t?r<p-l?-a:a:r<u-p-h-l?a:-a),{x:s,y:y,text:c,textAlign:m}},hm.prototype.getHandleTextShapeCfg=function(t){var e=this.getHandleCfg(t).textStyle;return v(v({},e),this.calcHandleText(t))},hm.prototype.getHandleIconShapeCfg=function(t){var e,n=this.attributes.orient,r=this.getHandleCfg(t),i=r.handleIcon,r=r.handleStyle,a=this.getOrientVal(["ew-resize","ns-resize"]),t=this.getHandleSize(t),i=i?(e="symbol",v(v({},r),{cursor:a,size:t,symbol:i})):(e="default",v(v({},r),{cursor:a,size:t}));return v({orient:n,type:e},i)},hm.prototype.getHandleShapeCfg=function(t){var e=this.getHandleCfg(t),n=this.calcHandlePosition(t),r=n.x,n=n.y,i=this.calcHandleText(t);return{x:r,y:n,handleType:t,zIndex:3,visibility:null!=e&&e.show?"visible":"hidden",iconCfg:this.getHandleIconShapeCfg(t),textCfg:v(v({},this.getHandleTextShapeCfg(t)),i)}},hm.prototype.getHandleCfg=function(t){var e=en(this.attributes,"handle"),n=e.start,r=e.end,e=Z(e,["start","end"]),i={};return"start"===t?i=n:"end"===t&&(i=r),on({},e,i)},hm.prototype.getHandleSize=function(t){var e,t=this.getHandleCfg(t).size;return t||(e=(t=this.attributes).width,t=t.height,Math.floor((this.getOrientVal([t,e])+4)/2.4))},hm.prototype.getOrientVal=function(t){var t=x(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},hm.prototype.setValuesOffset=function(t,e){void 0===e&&(e=0);var n=x(this.getValues(),2),r=n[0],n=n[1],t=[r+t,n+e].sort();this.setValues(t),this.onValueChanged([r,n])},hm.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},hm.prototype.bindEvents=function(){function r(t){return t&&".handle-text"!==t.className}var i=this,t=this.selectionShape;t.addEventListener("mousedown",this.onDragStart("selection")),t.addEventListener("touchstart",this.onDragStart("selection")),t.addEventListener("mouseenter",this.onSelectionMouseenter),t.addEventListener("mouseleave",this.onSelectionMouseleave);[this.startHandle,this.endHandle].forEach(function(t){var n=t.style.handleType;t.addEventListener("mousedown",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)}),t.addEventListener("touchstart",function(t){var e=t.target;r(e)&&i.onDragStart(n)(t)})}),this.backgroundShape.addEventListener("mousedown",this.onDragStart("background")),this.backgroundShape.addEventListener("touchstart",this.onDragStart("background"))},hm.defaultOptions={type:hm.tag="slider",style:{orient:"horizontal",values:[0,1],names:["",""],min:0,max:1,width:200,height:20,sparkline:{padding:[1,1,1,1]},padding:[0,0,0,0],selectionStyle:{active:{fill:"#ccdaf5"}},handle:{show:!0,formatter:function(t,e){return t},spacing:10}}},ne(dm,cm=a),Object.defineProperty(dm.prototype,"padding",{get:function(){return zg(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(dm.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.width,t=t.height,n=x(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3];return{x:n,y:r,width:e-(n+i),height:t-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(dm.prototype,"trackLen",{get:function(){var t=this.availableSpace,e=t.width,t=t.height;return this.getOrientVal([e,t])},enumerable:!1,configurable:!0}),Object.defineProperty(dm.prototype,"thumbRadius",{get:function(){var t=this.attributes.isRound,e=this.availableSpace,n=e.width,e=e.height,r=en(this.attributes,["thumbStyle","default","radius"]);return t?r||this.getOrientVal([e,n])/2:0},enumerable:!1,configurable:!0}),dm.prototype.render=function(t,e){var n=t.width,r=t.height,i=t.trackStyle,a=t.thumbStyle,o=t.value,s=t.thumbLen,t=t.orient,e=Jg(e,".track","rect").attr("className","track").style("width",null!=n?n:10).style("height",null!=r?r:200).call(_,Vg(i)).node(),n=this.valueOffset(o||0),r=this.availableSpace;this.thumbShape=Jg(e,".thumb","rect").attr("className","thumb").style("x","vertical"===t?r.x:r.x+n).style("y","vertical"===t?r.y+n:r.y).style("width","vertical"===t?r.width:s).style("height","vertical"===t?s:r.height).style("radius",this.thumbRadius).call(_,Vg(a)).node(),this.trackShape=e},dm.prototype.getValue=function(){return this.style.value},dm.prototype.setValue=function(t){var e=this.style,n=e.value,r=e.min,e=e.max;this.update({value:Ge(t,r,e)}),this.onValueChanged(n)},dm.prototype.setOffset=function(t){var e=this.getValue();this.setValue(this.valueOffset(t,!0)+e)},dm.prototype.valueOffset=function(t,e){var n=this.attributes,r=n.thumbLen,i=n.min,n=n.max,r=this.trackLen-r;return(e=void 0!==e&&e)?t/r:r*Ge(t,i,n)},dm.prototype.getStyle=function(t,e){return void 0===e&&(e="default"),Vg(en(this.attributes,t),e)},dm.prototype.bindEvents=function(){this.trackShape.addEventListener("click",this.onTrackClick),this.thumbShape.addEventListener("mousedown",this.onDragStart),this.thumbShape.addEventListener("touchstart",this.onDragStart),this.onHover()},dm.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},dm.prototype.onHover=function(){this.thumbShape.addEventListener("mouseenter",this.onThumbMouseenter),this.trackShape.addEventListener("mouseenter",this.onTrackMouseenter),this.thumbShape.addEventListener("mouseleave",this.onThumbMouseleave),this.trackShape.addEventListener("mouseleave",this.onTrackMouseleave)},dm.defaultOptions={type:dm.tag="scrollbar",style:{orient:"vertical",min:0,max:1,isRound:!0,thumbLen:20,padding:[2,2,2,2],trackStyle:{default:{fill:"#fafafa",lineWidth:1,stroke:"#e8e8e8"},active:{}},thumbStyle:{default:{fill:"#c1c1c1"},active:{opacity:.8}}}};var Ha={style:{data:[],dataThreshold:100,showTitle:!0,titlePosition:"lb",titleFill:"black",titleFontSize:12,titleTextAlign:"center",titleSpacing:0,titleTextBaseline:"middle",showLine:!0,lineLineWidth:1,lineStroke:"black",lineArrow:new F.Path({style:{path:"M 10,10 L -10,0 L 10,-10 L0,0 L10,10Z",anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}}),lineArrowOffset:15,lineArrowSize:10,showTick:!0,tickDirection:"positive",tickStroke:"black",tickLength:5,tickLineWidth:1,tickStrokeOpacity:.65,showLabel:!0,labelSpacing:0,labelDirection:"positive",labelAlign:"parallel",labelTransforms:[],showGrid:!0,gridType:"segment",gridConnect:"line",gridDirection:"positive",gridLength:0,gridControlAngles:[]}},pm=(on({},Ha,{style:{type:"arc"}}),on({},Ha,{style:{}}),ky({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis"));function gm(t,e,n,r){var i=n[e].data,n=n.map(function(t){return t.data}),i="function"==typeof r?r.call(null,i,e,n):r;t.attr(i||{})}function ym(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=x(t,2);return[t[0],vy(t[1],e)]}))}function mm(t,e){return e&&Te(e)?t.filter(e):t}function vm(t){return t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},"")}function bm(t,e,n){var r,i,a,o;return"surround"===e.type?(r=t,n=n,o=(e=e).connect,e=e.center,"line"===(void 0===o?"line":o)?vm(r):e?(i=ey(r[0],e),a=n?0:1,r.reduce(function(t,e,n){var e=x(e,2),r=e[0],e=e[1];return(0===n?"M":"".concat(t,"A").concat(i,",").concat(i,",0,0,").concat(a,",")).concat(r,",").concat(e)},"")):""):vm(t)}function xm(t,e,n){function r(t,e){return"".concat(l," ").concat(t," ").concat(c," ").concat(e," ").concat(s)}var i=n.type,a=n.connect,o=n.center,s=n.closed?" Z":"",n=x([bm(t,n),bm(e.slice().reverse(),n,!0)],2),l=n[0],c=n[1],n=x([t[0],e.slice(-1)[0]],2),t=n[0],e=n[1];if("line"===a||"surround"===i)return r("L".concat(e.join()),"L".concat(t.join()));if(o)return a=(n=x([ey(e,o),ey(t,o)],2))[0],i=n[1],r("A".concat(a,",").concat(a,",0,0,1,").concat(e.join(" ")," L").concat(e.join()),"A".concat(i,",").concat(i,",0,0,0,").concat(t.join(" ")));throw new Error("Arc grid need to specified center")}function wm(t,e,n){n.type,n.center;var r=n.connect,i=n.areaFill;if(n.closed,!(e.length<2)&&i&&r){for(var a=Array.isArray(i)?i:[i,"transparent"],o=[],s=0;s<e.length-1;s++){var l=x([e[s].points,e[s+1].points],2),l=xm(l[0],l[1],n);o.push({path:l,fill:a[s%a.length]})}S(t).selectAll(".grid-region").data(o,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){this.attr(t),gm(this,e,o,t)}).attr("className","grid-region")},function(t){return t.each(function(t,e){this.attr(t),gm(this,e,o,t)})},function(t){return t.remove()})}}ne(Om,km=a),Om.prototype.render=function(t,e){t.className;var n,r,i,a,o=t.items,o=void 0===o?[]:o,s=(t.type,t.center,t.areaFill,t.closed,Z(t,["className","items","type","center","areaFill","closed"])),o=(o=o,t.closed?o.map(function(t){var e=t.points,n=x(e),r=n[0];return n.slice(1),v(v({},t),{points:w(w([],x(e),!1),[r],!1)})}):o);n=e,r=t,i=s,a=o.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:bm(t.points,r)}}),S(n).selectAll(".grid-line").data(a,function(t){return t.id}).join(function(t){return t.append("path").style("stroke","#D9D9D9").style("lineWidth",1).style("lineDash",[4,4]).each(function(t,e){t=t.path;this.attr(v(v({},i),{path:t})),gm(this,e,a,v({path:t},i))}).attr("className","grid-line")},function(t){return t.each(function(t,e){this.attr(t),gm(this,e,a,t)})},function(t){return t.remove()}),wm(e,o,t)};var km,Mm=Om;function Om(){return null!==km&&km.apply(this,arguments)||this}var _m=Ze(function(t,e){var e=x(e.angleRange,2),n=e[0];return(e[1]-n)*t+n},function(t,e){return w([t],x(e.angleRange),!1).join()}),Sm=Ze(function(t,e){var n,r,i;return"linear"===e.type?(r=(n=x(e.startPos,2))[0],n=n[1],i=x(e.endPos,2),Jt([0,0],[(r=x([i[0]-r,i[1]-n],2))[0],r[1]])):(i=dy(_m(t,e)),[-Math.sin(i),Math.cos(i)])},function(t,e){var n="linear"===(n=e).type?w(w([],x(n.startPos),!1),x(n.endPos),!1):w(w(w([],x(n.angleRange),!1),x(n.center),!1),[n.radius],!1);return"arc"===e.type&&n.push(t),n.join()});function Em(t,e,n){var t=Sm(t,n);return n=[],t=t,"positive"!==e?(n[0]=t[1],n[1]=-1*t[0]):(n[0]=-1*t[1],n[1]=t[0]),n}var Am=Ze(function(t,e){var n=x(e.startPos,2),r=n[0],n=n[1],e=x(e.endPos,2),e=x([e[0]-r,e[1]-n],2);return[r+e[0]*t,n+e[1]*t]},function(t,e){return w(w([t],x(e.startPos),!1),x(e.endPos),!1).join()}),Tm=Ze(function(t,e){var n=e.radius,r=x(e.center,2),i=r[0],r=r[1],t=dy(_m(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return w(w(w([t],x(e.angleRange),!1),[e.radius],!1),x(e.center),!1).join()});function Pm(t,e){return("linear"===e.type?Am:Tm)(t,e)}function Nm(a,t,o){function e(t,e){var e=x(e,2),n=(r=x(e[0],2))[0],r=r[1],i=(e=x(e[1],2))[0],e=e[1];a.maybeAppendByClassName(t,"line").attr("className","".concat(pm.line.name," ").concat(t)).call(_,v(v({},o),{x1:n,y1:r,x2:i,y2:e}))}var n,r,i,s=t.startPos,l=t.endPos,c=t.truncRange,u=t.lineExtension,f=x([s,l],2),h=x(f[0],2),d=h[0],h=h[1],f=x(f[1],2),p=f[0],f=f[1],l=x(u?(s=x([s=s,l=l,u=void 0===(u=u)?[0,0]:u],3),u=(l=x(s[0],2))[0],l=l[1],g=(n=x(s[1],2))[0],n=n[1],y=(s=x(s[2],2))[0],s=s[1],u=(g=x([g-u,n-l],2))[0],n=g[1],l=Math.sqrt(Math.pow(u,2)+Math.pow(n,2)),y=(g=x([-y/l,s/l],2))[0],s=g[1],[y*u,y*n,s*u,s*n]):new Array(4).fill(0),4),g=l[0],y=l[1],u=l[2],s=l[3];a.node().removeChildren();c?(l=(n=x(c,2))[0],c=n[1],i=(l=x([d+(p-d)*l,h+(f-h)*l],2))[0],l=l[1],r=(c=x([d+(p-d)*c,h+(f-h)*c],2))[0],c=c[1],e(pm.lineFirst.name,[[d+g,h+y],[i,l]]),e(pm.lineSecond.name,[[r,c],[p+u,f+s]]),i=a,t.truncRange,t.truncShape,t.lineExtension,i.select(pm.lineFirst.class).node(),i.select(pm.lineSecond.class).node()):e("axis-line",[[d+g,h+y],[p+u,f+s]])}function Lm(t,e,n){var r,i,a,o,s,l,c,u,f,h,d,p,g,y=e.type;"linear"===y?Nm(t,e,n):(r=t,a=n,u=(c=x((i=e).angleRange,2))[0],c=c[1],o=(s=x(i.center,2))[0],s=s[1],i=i.radius,console.assert(u<c,"end angle should be greater than start angle"),(360==(l=c-u)?r.maybeAppendByClassName(pm.line,"circle").style("cx",o).style("cy",s).style("r",i):(d=(p=x([i,i],2))[0],p=p[1],f=(g=x([u*Math.PI/180,c*Math.PI/180],2))[0],g=g[1],h=(f=x([o+i*Math.cos(f),s+i*Math.sin(f)],2))[0],f=f[1],s=(o=x([o+i*Math.cos(g),s+i*Math.sin(g)],2))[0],i=o[1],g=180<l?1:0,o=c<u?0:1,l="M".concat(h,",").concat(f,",A").concat(d,",").concat(p,",0,").concat(g,",").concat(o,",").concat(s,",").concat(i),r.maybeAppendByClassName(pm.line,"path").style("path",l))).call(_,a)),c=t,u=y,h=n,d=(f=e).lineArrow,p=e.truncRange,g=void 0===(g=e.lineArrowOffset)?0:g,f=e.lineArrowSize,d&&(S(d=hy(d)).call(_,v({},h)),_y(d,f,!0),("arc"!==u&&p?c.select(pm.lineSecond.class):c.select(pm.line.class)).style("markerEnd",d).style("markerEndOffset",-g))}function Cm(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function jm(t,r){var e=r.gridLength,i=void 0===e?0:e;return t.map(function(t){var t=t.value,e=x(Pm(t,r),2),n=e[0],e=e[1],t=x($t([0,0],Em(t,r.gridDirection,r),i),2);return{points:[[n,e],[n+t[0],e+t[1]]]}})}function Fm(t,e,n,r){var i=r.type,a=r.closed,o=r.areaFill,s=r.connect,l=Cm(n),c=mm(e,n.gridFilter),e="segment"===i?jm(c,n):function(t,o,e){var s,l,c=e.controlAngles;if(!(e=Cm(o)))throw new Error("grid center is not provid");if(t.length<2)throw new Error("Invalid grid data");if(c&&0!==c.length)return e=x(e,2),s=e[0],l=e[1],t.map(function(t){var t=x(Pm(t.value,o),2),e=t[0],t=t[1],n=x([e-s,t-l],2),r=n[0],i=n[1],a=[[e,t]];return c.forEach(function(t){var t=dy(t),t=x([Math.cos(t),Math.sin(t)],2),e=t[0],t=t[1];a.push([r*e-i*t+s,r*t+i*e+l])}),{points:a}});throw new Error("Invalid gridControlAngles")}(c,n,r);t.maybeAppendByClassName(pm.grid,function(){return new Mm({})}).update(v(v({type:i,connect:s,closed:a,center:l},r),{items:e,areaFill:Te(o)?c.map(function(t,e){return vy(o,[t,e,c])}):o}))}Object.defineProperty(Rm.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(Rm.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(Rm.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(Rm.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(Rm.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(Rm.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),Rm.prototype.clear=function(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},Rm.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},Rm.prototype.add=function(t,e){return t<this.x1&&(this.x1=t),e<this.y1&&(this.y1=e),t>this.x2&&(this.x2=t),e>this.y2&&(this.y2=e),this},Rm.prototype.rotate=function(t,e,n){t=this.rotatedPoints(t,e,n);return this.clear().add(t[0],t[1]).add(t[2],t[3]).add(t[4],t[5]).add(t[6],t[7])},Rm.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},Rm.prototype.set=function(t,e,n,r){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),r<e?(this.y2=e,this.y1=r):(this.y1=e,this.y2=r),this},Rm.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},Rm.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var Im=Rm;function Rm(t){var t=t||{},e=t.left,n=t.top,r=t.right,t=t.bottom;this.x1=null!=e?e:+Number.MAX_VALUE,this.x2=null!=r?r:-Number.MAX_VALUE,this.y1=null!=n?n:+Number.MAX_VALUE,this.y2=null!=t?t:-Number.MAX_VALUE}function Bm(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=x(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=x(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function Dm(t,e,n){void 0===n&&(n=[0,0,0,0]);var r=e.getEulerAngles()||0,i=(e.setEulerAngles(0),e.getLocalBounds()),a=i.min,o=i.max,i=i.halfExtents,s=a[0],l=2*i[0],i=2*i[1],a=a[1],c=o[0],o=o[1],u=0,f=0,h=s,d=a,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,g=e.style.textBaseline,u=+e.style.dx,f=+e.style.dy,"center"===p?h=(s+c)/2:"right"!==p&&"end"!==p||(h=c),"middle"===g?d=(a+o)/2:"bottom"!==g&&"baseline"!==g||(d=o)),x(n,4)),c=p[0],g=void 0===c?0:c,o=p[1],n=void 0===o?0:o,c=p[2],o=p[3];return t.set((u+=s)-(void 0===o?n:o),(f+=a)-g,u+l+n,f+i+(void 0===c?g:c)),e.setEulerAngles(r),t.rotatedPoints(dy(r),h,d)}function zm(t,a){var o;return w([],x(t.reduce(function(t,e,n){return n&&o&&(n=o,r=e,i=a,n=Dm(new Im,n,i),Bm(r=Dm(new Im,r,i),[n[0],n[1],n[2],n[3]])||Bm(r,[n[0],n[1],n[4],n[5]])||Bm(r,[n[4],n[5],n[6],n[7]])||Bm(r,[n[2],n[3],n[6],n[7]]))?(t.add(o),t.add(e)):o=e,t;var r,i},new Set)),!1)}var Gm=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(t.style.visibility="hidden"))})};var Wm=new Map([["hide",function(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||2===i&&a&&o)){var s,l,c,u=Gm,f=2,h=t.slice(),d=t.slice(),p=Date.now(),g=Math.min.apply(Math,w([1],x(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==Sm(0,n)[1]&&0!==Sm(0,n)[0]||(n=ty(t[0]).left,t=ty(t[i-1]).right,t=Math.abs(t-n)||1,f=Math.max(Math.floor(i*g/t),f)),a&&(s=h.splice(0,1)[0]),o&&(l=h.splice(-1,1)[0],h.reverse());zm((l?w(w([l],x(d),!1),[s],!1):w([s],x(d),!1)).filter(function(t){return fy(t)}),null==e?void 0:e.margin).length;)if((l&&!s&&f%2==0||l&&s)&&h.splice(0,1).forEach(r.hide),d=u(((c=h).forEach(r.show),c),{seq:f}),f++,200<Date.now()-p)return}}],["rotate",function(t,e,n,r){function i(){return zm(t,s).length<1}function a(n){t.forEach(function(t,e){e=Ce(n)?n[e]:n;Pe(e)||r.rotate(t,e)})}var o=void 0===(l=e.optionalAngles)?[0,45,90]:l,s=e.margin,l=e.recoverWhenFailed,e=t.map(function(t){return+(gy(t,"rotate")||0)});if(!i()){for(var c=0;c<o.length;c++)if(a(o[c]),i())return;l&&a(e)}}],["ellipsis",function(t,e,n,r){if(!(t.length<=1))for(var i,a,o=void 0===(s=e.suffix)?"...":s,s=e.minLength,l=e.maxLength,c=e.step,u=void 0===(e=e.margin)?[0,0,0,0]:e,e=(e=t[0],d=e.style.fontFamily||"sans-serif",y=e.style.fontWeight||"normal",i=e.style.fontStyle||"normal",a=e.style.fontVariant,{fontSize:"object"==typeof(e=e.style.fontSize)?e.value:e,fontFamily:d,fontWeight:y,fontStyle:i,fontVariant:a}),f=Rg(c,e)||1,h=Rg(s,e)||1,d=Rg(l,e),p=(!Pe(d)&&d!==1/0||(d=Math.max.apply(null,t.map(function(t){return t.getBBox().width}))),Date.now()),g=t.slice(),y=x(u,4),m=(y[0],y[1],y[2],y[3],d);h+f<m;m-=f){var v=function(e){return g.forEach(function(t){r.ellipsis(t,e,o)}),(g=zm(t,u)).length<1||300<Date.now()-p?{value:void 0}:void 0}(m);if("object"==typeof v)return v.value}}]]);function Hm(i,a,o){var t=a.labelTransforms,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e,n=t.type,r=Wm.get(n);e=i,n=n,a.labelTransforms&&("ellipsis"!==n||1<e.map(function(t){return t.querySelector("text")}).length)&&null!=r&&r(i,t,a,o)})}function Vm(t){for(var e=t;e<0;)e+=360;return e%360}var qm=Ze(function(t,e){var t=x(t,2),n=t[0],t=t[1],e=x(e,2),r=e[0],e=e[1],n=x([n*r+t*e,n*e-t*r],2),e=n[0],t=n[1];return Math.atan2(t,e)},function(t,e){return w(w([],x(t),!1),x(e),!1).join()});function Ym(t,e){return Em(t,e.labelDirection,e)}function Um(t,e,n){var r,i=n.labelAlign,e=gy(e,"rotate");return e?+e%180:(e=0,r=Ym(t.value,n),t=Sm(t.value,n),"horizontal"===i?0:(e="perpendicular"===i?qm([1,0],r):qm([t[0]<0?-1:1,0],t),my(n=((n=py(e))+360)%180,-90,90)||(n+=180),n))}function Xm(t,e,n){e.setLocalEulerAngles(+t);t=function(t,e,n){var r=n.type,i=n.labelAlign,t=Ym(t,n),n=Vm(e),e=Vm(py(qm([1,0],t)));if([90,270].includes(e)&&!n)return"middle";if(!(e%180)&&[90,270].includes(n))return"middle";if("linear"!==r)return"parallel"===i?"middle":my(n,90,270)?my(e,90,270)?"start":"end":my(e,90,270)?"end":"start";if(0===e){if(my(n,0,90,!1,!0))return"start";if(my(n,0,90)||my(n,270,360))return"start"}if(90===e){if(my(n,0,90,!1,!0))return"start";if(my(n,90,180)||my(n,270,360))return"end"}if(270===e){if(my(n,0,90,!1,!0))return"end";if(my(n,90,180)||my(n,270,360))return"start"}if(180===e){if(90===n)return"start";if(my(n,0,90)||my(n,270,360))return"end"}return"start"}(e.__data__.value,t,n),n=e.querySelector(".axis-label-item");"text"===(null==n?void 0:n.nodeName)&&S(n).style("textAlign",t)}function Km(t,e,n,r){var i=r.showTick,a=r.tickLength,o=r.tickDirection,s=r.labelDirection,l=vy(r.labelSpacing,[t,e,n]),s=x([Ym(t.value,r),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(function(t,e){return t*("positive"===e?-1:1)},1)}(s,o)],2),o=x(Ut([0,0],$t([0,0],s[0],l+(1===s[1]?vy(i?a:0,[t,e,n]):0)),Pm(t.value,r)),2);return{x:o[0],y:o[1]}}function $m(t,e,n,r,i){var a=i.labelFormatter,o=Ym(e.value,i),i=function(){return hy(e.label||"")};return ze(a)?i=function(){return hy(a)}:Te(a)&&(i=function(){return hy(vy(a,[e,n,r,o]))}),t.append(i).attr("className",pm.labelItem.name)}function Zm(t,e,n,r,i,a){var o=null==(o=r.getElementsByClassName(pm.labelItem.toString()))?void 0:o[0],a=x(Ug(ym(a,[t,e,n])),2),s=a[0],a=a[1],l=a.transform,a=Z(a,["transform"]);"text"===(null==o?void 0:o.nodeName)&&S(o).call(_,v({fontSize:12,fontFamily:"sans-serif",fontWeight:"normal",textBaseline:"middle"},s)),r.attr(v(v({},Km(t,e,n,i)),a)),yy(r,l),Xm(Um(t,r,i),r,i)}function Jm(n){Hm(this.node().childNodes,n,{hide:function(t){t.style.visibility="hidden"},show:function(t){t.style.visibility="visible"},rotate:function(t,e){Xm(+e,t,n)},ellipsis:function(t,e,n){null!=(t=t.querySelector("text"))&&t.attr("wordWrap",!0).attr("wordWrapWidth",e).attr("maxLines",1).attr("textOverflow",n)}})}function Qm(t,e){return Em(t,e.tickDirection,e)}var tv=Ze(function(t,e){t=x(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return w(w([],x(t),!1),[e],!1).join()});function ev(t,e,n,r,i){var a=i.tickFormatter,o=Qm(e.value,i),i="line";return a instanceof F.DisplayObject?i=function(){return a}:Te(a)&&(i=function(){return vy(a,[e,n,r,o])}),t.append(i).attr("className",pm.tickItem.name)}function nv(t,e,n,r,i,a,o){var s=Qm(t.value,a),l=(u=t,f=e,h=n,s=s,l=(a=a).tickLength,c=(a=x(Pm(u.value,a),2))[0],a=a[1],s=x(tv(s,vy(l,[u,f,h])),2),u=(l=x(s[0],2))[0],f=l[1],h=x(s[1],2),{x:c,y:a,x1:u,x2:h[0],y1:f,y2:h[1]}),s=l.x1,c=l.x2,a=l.y1,u=l.y2,f=l.x,h=l.y,l=x(Ug(ym(o,[t,e,n])),2),o=l[0],t=l[1];"line"===r.node().nodeName&&r.call(_,v({x1:s,x2:c,y1:a,y2:u},o)),i.attr(v({x:f,y:h},t)),_(r,o)}var rv={text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"left-top"},iv=ky({text:"text"},"title");function av(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}).join(""):2<t.length?t[0]:t}function ov(t,e){var n,r;try{for(var i=ie(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=x(a.value,2),s=o[0],l=o[1];t.node().attr(s)||t.style(s,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}ne(cv,sv=a),cv.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,n=t.height,r=t.position,i=t.spacing,t=t.inset,a=this.querySelector(iv.text.class);if(!a)return{x:0,y:0,width:+e,height:+n};var a=a.getBBox().height,i=x(zg(i),3),o=i[0],i=i[2],s=x([0,+n-a],2),l=s[0],s=s[1],r=av(r);if("i"===r)return{x:0,y:l,width:+e,height:+n};r.includes("t")&&(l=(o=x([a+o,+n-a-o],2))[0],s=o[1]),r.includes("b")&&(s=x([+n-a-i],1)[0]);o=x(zg(t),4),r=o[0],n=o[1],a=o[2],i=o[3],t=x([i+n,r+a],2);return{x:i,y:l+r,width:+e-t[0],height:s-t[1]}},cv.prototype.render=function(t,e){t.width,t.height,t.position,t.spacing,t.class;var n,r,i,a=Z(t,["width","height","position","spacing","class"]),o=x(Ug(a),2),s=o[0],t=(o[1],t=(o=t).width,l=o.height,o=o.position,n=x([+t/2,+l/2],2),u=(n=x([+n[0],+n[1],"center","middle"],4))[0],r=n[1],i=n[2],n=n[3],(o=av(o)).includes("l")&&(u=(c=x([0,"start"],2))[0],i=c[1]),o.includes("r")&&(u=(c=x([+t,"end"],2))[0],i=c[1]),o.includes("t")&&(r=(t=x([0,"top"],2))[0],n=t[1]),o.includes("b")&&(r=(c=x([+l,"bottom"],2))[0],n=c[1]),{x:u,y:r,textAlign:i,textBaseline:n}),o=t.x,l=t.y,c=t.textAlign,u=t.textBaseline;a.text?S(e).maybeAppendByClassName(iv.text,"text").call(_,s).call(ov,{x:o,y:l,textAlign:c,textBaseline:u}):e.removeChildren()};var sv,lv=cv;function cv(t){return sv.call(this,ry({},{style:rv},t=void 0===t?{}:t))||this}function uv(t,e,n){var r,i,a,o,s,t=t.select(pm.mainGroup.class);return t=t,e=e,r=(n=n).titlePosition,n=void 0===(n=n.titleSpacing)?0:n,r=av(void 0===r?"lb":r),i=(a=t.node().getBBox()).x,a=a.y,o=(t=x(t.node().getBounds().halfExtents,2))[0],t=t[1],s=(e=x(e.node().getBounds().halfExtents,2))[0],e=e[1],i=x([i+o,a+t],2),i=(a=x([i[0],i[1]],2))[0],a=a[1],r.includes("l")&&(i-=o+s+n),r.includes("r")&&(i+=o+s+n),r.includes("t")&&(a-=t+e+n),r.includes("b")&&(a+=t+e+n),{x:i,y:a}}function fv(t,e,n,r){var i,a,o,s;n.title&&(a=(t=x((t=t,i=(a=n).title,a=t.maybeAppendByClassName(pm.title,function(){return hy(i)}),[t,a]),2))[0],t=t[1],a=a,e=e,n=n,o=(r=x(Ug(r=r),2))[0],r=r[1],s=void 0===(s=r.transform)?"":s,r=Z(r,["transform"]),t.call(_,o),e=(o=uv(e,a,n)).x,n=o.y,a.node().attr(r),a.node().setPosition(e,n),yy(t,s))}var hv,dv=wy({render:function(n,e){var t=My(n),r=t.type,i=t.data,a=t.dataThreshold,a=void 0===a?100:a,o=(t.crossSize,t.animation,t.title,t.showTitle),s=(t.titleSpacing,t.truncRange),l=(t.truncShape,t.showLine),c=(t.lineExtension,t.lineArrow,t.lineArrowOffset,t.lineArrowSize,t.showTick),u=(t.tickDirection,t.tickLength,t.tickFilter,t.tickFormatter,t.showLabel),f=(t.labelAlign,t.labelDirection,t.labelSpacing,t.labelFilter,t.labelFormatter,t.labelTransforms,t.showGrid),t=(t.gridFilter,t.gridLength,Z(t,["type","data","dataThreshold","crossSize","animation","title","showTitle","titleSpacing","truncRange","truncShape","showLine","lineExtension","lineArrow","lineArrowOffset","lineArrowSize","showTick","tickDirection","tickLength","tickFilter","tickFormatter","showLabel","labelAlign","labelDirection","labelSpacing","labelFilter","labelFormatter","labelTransforms","showGrid","gridFilter","gridLength"])),r=x(Yg("linear"===r?(t.startPos,t.endPos,Z(t,["startPos","endPos"])):(t.angleRange,t.radius,t.center,Z(t,["angleRange","radius","center"])),["title","line","tick","label","grid"]),5),h=r[0],d=r[1],p=r[2],g=r[3],y=r[4],m=function(t,e){if(t.length<=e)return t;for(var n=Math.floor(t.length/e),r=[],i=0;i<t.length;i+=n)r.push(t[i]);return r}(i,a).filter(function(t){t=t.value;return!(s&&t>s[0]&&t<s[1])}),t=(by(f,S(e).maybeAppendByClassName(pm.gridGroup,"g"),function(t){Fm(t,m,n,y)}),S(e).maybeAppendByClassName(pm.mainGroup,"g")),r=(by(l,t.maybeAppendByClassName(pm.lineGroup,"g"),function(t){Lm(t,n,d)}),t.maybeAppendByClassName(pm.tickGroup,"g")),i=(by(c,r,function(t){var r,i,a;t=t,i=p,a=mm(m,(r=n).tickFilter),t.selectAll(".axis-tick").data(a).join(function(t){return t.append("g").attr("className",pm.tick.name).each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=ev.apply(void 0,w(w([S(this)],x(t),!1),[a,r],!1));nv.apply(void 0,w(w([],x(t),!1),[a,n,this,r,i],!1))})},function(t){return t.each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.removeChildren();var n=ev.apply(void 0,w(w([S(this)],x(t),!1),[a,r],!1));nv.apply(void 0,w(w([],x(t),!1),[a,n,this,r,i],!1))})},function(t){return t.remove()})}),t.maybeAppendByClassName(pm.labelGroup,"g")),a=(by(u,i,function(t){var e,r,i,a;e=t,i=g,a=mm(m,(r=n).labelFilter),e.selectAll(pm.label.class).data(a).join(function(t){return t.append("g").attr("className",pm.label.name).each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];$m.apply(void 0,w(w([S(this)],x(t),!1),[a,r],!1)),Zm.apply(void 0,w(w([],x(t),!1),[a,this,r,i],!1))}).call(function(){Jm.call(e,r)})},function(t){return t.each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=S(this);n.node().removeChildren(),$m.apply(void 0,w(w([n],x(t),!1),[a,r],!1)),Zm.apply(void 0,w(w([],x(t),!1),[a,this,r,i],!1))}).call(function(){Jm.call(e,r)})},function(t){return t.remove()})}),S(e).maybeAppendByClassName(pm.titleGroup,"g"));by(o,a,function(t){fv(t,S(e),n,h)})}},v({},Ha.style)),pv={pageViews:[],effect:"linear",duration:200,orient:"horizontal",initPage:0,loop:!1,buttonPath:[["M",(ys=0)-(ms=6),(ks=0)-ms],["L",ys+ms,ks],["L",ys-ms,ks+ms],["Z"]],buttonFill:"black",buttonCursor:"pointer",formatter:function(t,e){return"".concat(t,"/").concat(e)},pageNumFontSize:12,pageNumFill:"black",pageNumTextAlign:"start",pageNumTextBaseline:"middle",controllerPadding:5,controllerSpacing:5},gv=ky({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),yv=(ne(mv,hv=a),Object.defineProperty(mv.prototype,"pageShape",{get:function(){var n,t=this.attributes.pageViews,t=x((n=t.map(function(t){t=t.getBBox();return[t.width,t.height]}))[0].map(function(t,e){return n.map(function(t){return t[e]})}).map(function(t){return Math.max.apply(Math,w([],x(t),!1))}),2),e=t[0],t=t[1],r=this.attributes,i=r.pageWidth,r=r.pageHeight;return{pageWidth:void 0===i?e:i,pageHeight:void 0===r?t:r}},enumerable:!1,configurable:!0}),Object.defineProperty(mv.prototype,"currPage",{get:function(){return this._currPage},enumerable:!1,configurable:!0}),Object.defineProperty(mv.prototype,"finished",{get:function(){var t,n=this;return this.finishedPromise||(this.finishedPromise=new Promise(function(t,e){n.resolveFinishedPromise=function(){n.finishedPromise=null,t(n.currPage)}})),"idle"===this.playState&&null!=(t=this.resolveFinishedPromise)&&t.call(this),this.finishedPromise},enumerable:!1,configurable:!0}),mv.prototype.setVisiblePages=function(n){this.attributes.pageViews.forEach(function(t,e){n.includes(e)?t.attr("visibility","visible"):t.attr("visibility","hidden")})},mv.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orient,r=r.controllerPadding,a=n.getBBox(),o=a.width,a=(a.height,x("horizontal"===i?[-180,0]:[-90,90],2)),s=a[0],a=a[1],s=(t.setLocalEulerAngles(s),e.setLocalEulerAngles(a),t.getBBox()),a=s.width,s=s.height,l=e.getBBox(),c=l.width,l=l.height,c=Math.max(a,o,c),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[c/2,-s-r],[c/2,0],[c/2,l+r]],textAlign:"center"},a=x(i.offset,3),o=x(a[0],2),s=o[0],c=o[1],l=x(a[1],2),r=l[0],o=l[1],l=x(a[2],2),a=l[0],l=l[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,c),n.setLocalPosition(r,o),e.setLocalPosition(a,l)},mv.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.attributes,r=n.formatter,n=n.pageViews;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(gv.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},mv.prototype.getFollowingPageDiff=function(t){var e=this.attributes.orient,n=this.pageShape,r=n.pageWidth,n=n.pageHeight,t=t<this.currPage?-1:1;return"horizontal"===e?[t*r,0]:[0,t*n]},mv.prototype.prepareFollowingPage=function(t){var e=this.attributes.pageViews,n=(this.setVisiblePages([t,this.currPage]),x(this.getFollowingPageDiff(t),2)),r=n[0],n=n[1];e[t].setLocalPosition(r,n)},mv.prototype.renderController=function(t){var e,n,r,i=this,a=this.attributes,o=a.controllerSpacing,a=a.pageViews,s=this.pageShape,l=s.pageWidth,s=s.pageHeight;a.length<2||(n=(a=x(Yg(this.attributes,["button","pageNum"]),2))[0],a=a[1],r=(n=x(Ug(n),2))[0],n=n[1],e=t.maybeAppendByClassName(gv.prevBtnGroup,"g").call(_,n),this.prevBtnGroup=e.node(),e.maybeAppendByClassName(gv.prevBtn,"path").attr("className","btn"),n=t.maybeAppendByClassName(gv.nextBtnGroup,"g").call(_,n),this.nextBtnGroup=n.node(),n.maybeAppendByClassName(gv.nextBtn,"path").attr("className","btn"),t.selectAll(".btn").call(_,r),r=t.maybeAppendByClassName(gv.pageInfoGroup,"g"),this.pageInfoGroup=r.node(),r.maybeAppendByClassName(gv.pageInfo,"text").style("text","").call(_,v(v({},Wg),a)),this.updatePageInfo(),t.node().setLocalPosition(l+o,s/2),e.on("click",function(){i.prev()}),n.on("click",function(){i.next()}))},mv.prototype.goTo=function(e){var n=this,t=this.attributes,r=t.duration,i=t.effect,t=t.pageViews,a=this.currPage,o=this.playState,s=this.finished,l=this.playWindow;return e===a||"idle"!==o||e<0||e>=t.length||(t[a].setLocalPosition(0,0),this.prepareFollowingPage(e),o={duration:r,easing:i,fill:"both"},a=(t=x(this.getFollowingPageDiff(e),2))[0],r=t[1],this.playState="running",Promise.all([l.animate([{transform:"translate(0, 0)"},{transform:"translate(".concat(-a,", ").concat(-r,")")}],o)].map(function(t){return null==t?void 0:t.finished})).then(function(){var t;n._currPage=e,n.playState="idle",n.setVisiblePages([e]),n.updatePageInfo(),null!=(t=n.resolveFinishedPromise)&&t.call(n)})),{finished:s}},mv.prototype.prev=function(){var t=this.attributes,e=t.loop,t=t.pageViews.length,n=this.currPage,e=e?(n-1+t)%t:Ge(n-1,0,t);return this.goTo(e)},mv.prototype.next=function(){var t=this.attributes,e=t.loop,t=t.pageViews.length,n=this.currPage,e=e?(n+1)%t:Ge(n+1,0,t);return this.goTo(e)},mv.prototype.render=function(t,e){var n=this,r=t.pageViews,t=t.initPage,i=(this.clipPath=S(e).maybeAppendByClassName(gv.clipPath,function(){return new F.Rect({style:{x:0,y:0,width:0,height:0}})}),S(e).maybeAppendByClassName(gv.contentGroup,"g").style("x",0).style("y",0).style("clipPath",this.clipPath.node())),i=(this.clipPath.style("width",this.pageShape.pageWidth).style("height",this.pageShape.pageHeight),this.playWindow=i.maybeAppendByClassName(gv.playWindow,"g").node(),this.playWindow.removeChildren(),r.forEach(function(t){return n.playWindow.appendChild(t)}),this.setVisiblePages([t]),S(e).maybeAppendByClassName(gv.controller,"g"));this.renderController(i),this.goTo(t)},mv);function mv(t){t=hv.call(this,ry({},{style:pv},t))||this;return t._currPage=0,t.finishedPromise=null,t.resolveFinishedPromise=null,t.playState="idle",t}function vv(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}Cy.registerSymbol("hiddenHandle",function(t,e,n){var r=1.4*n;return[["M",t-n,e-r],["L",t+n,e-r],["L",t+n,e+r],["L",t-n,e+r],["Z"]]}),Cy.registerSymbol("verticalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=t+.4*r;return[["M",t,e],["L",a,e+i],["L",t+r,e+i],["L",t+r,e-i],["L",a,e-i],["Z"],["M",a,e+(n=n/6)],["L",t+r-2,e+n],["M",a,e-n],["L",t+r-2,e-n]]}),Cy.registerSymbol("horizontalHandle",function(t,e,n){var r=1.4*n,i=n/2,a=e+.4*r;return[["M",t,e],["L",t-i,a],["L",t-i,e+r],["L",t+i,e+r],["L",t+i,a],["Z"],["M",t-(n=n/6),a],["L",t-n,e+r-2],["M",t+n,a],["L",t+n,e+r-2]]});var bv,xv=ky({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),wv={span:[1,1],marker:"path",markerD:Ay(6,6,6),markerFill:"#d3d2d3",markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelFontFamily:"sans-serif",valueFontFamily:"sans-serif",labelTextAlign:"start",valueTextAlign:"start",labelTextBaseline:"middle",valueTextBaseline:"middle"},kv=(ne(Mv,bv=a),Object.defineProperty(Mv.prototype,"showValue",{get:function(){var t=this.attributes.value;return!!t&&(ze(t)||We(t)?""!==t:""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(Mv.prototype,"actualSpace",{get:function(){var t=this.markerGroup,e=this.labelGroup,n=this.valueGroup,t=t.node().getBBox(),r=t.width,t=t.height,e=e.node().getBBox(),i=e.width,e=e.height,n=n.node().getBBox(),a=n.width,n=n.height;return{markerWidth:r,labelWidth:i,valueWidth:a,height:Math.max(t,e,n)}},enumerable:!1,configurable:!0}),Object.defineProperty(Mv.prototype,"span",{get:function(){var t,e=this.attributes;return"span"in e?(t=(e=x(zg(e.span),2))[0],e=e[1],[t/(e=t+(t=this.showValue?e:0)),t/e]):[1,1]},enumerable:!1,configurable:!0}),Object.defineProperty(Mv.prototype,"shape",{get:function(){var t=this.attributes,e=t.markerSize,t=t.width,n=this.actualSpace,r=n.markerWidth,n=n.height,i=this.actualSpace,a=i.labelWidth,i=i.valueWidth,o=x(this.spacing,2),s=o[0],o=o[1];return t&&(t=t-e-s-o,e=x(this.span,2),a=(e=x([e[0]*t,e[1]*t],2))[0],i=e[1]),{width:r+a+i+s+o,height:n,markerWidth:r,labelWidth:a,valueWidth:i}},enumerable:!1,configurable:!0}),Object.defineProperty(Mv.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=x(zg(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(Mv.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,t=t.height,a=x(this.spacing,2),o=a[0];return{height:t,width:i,markerWidth:e,labelWidth:n,valueWidth:r,position:[e/2,e+o,e+n+o+a[1]]}},enumerable:!1,configurable:!0}),Mv.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,i=n.markerSize,a=qg(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(xv.markerGroup,"g"),by(!!r,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(xv.marker,r).call(_,v({anchor:"0.5 0.5"},a)),_y(e.markerGroup.node(),i,!0)})},Mv.prototype.renderLabel=function(t){var e=this.attributes.label,n=qg(this.attributes,"label");this.labelGroup=t.maybeAppendByClassName(xv.labelGroup,"g"),this.labelGroup.maybeAppendByClassName(xv.label,function(){return hy(e)}).call(_,n)},Mv.prototype.renderValue=function(t){var e=this,n=this.attributes.value,r=qg(this.attributes,"value");this.valueGroup=t.maybeAppendByClassName(xv.valueGroup,"g"),by(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(xv.value,function(){return hy(n)}).call(_,r)})},Mv.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=qg(this.attributes,"background");this.background=t.maybeAppendByClassName(xv.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(xv.background,"rect").call(_,v({width:n,height:e},r))},Mv.prototype.adjustLayout=function(){var t=this.layout,e=(t.markerWidth,t.labelWidth),n=t.valueWidth,r=(t.width,t.height),t=x(t.position,3),i=t[0],a=t[1],t=t[2],r=r/2;this.markerGroup.call(_,{x:i,y:r}),this.labelGroup.call(_,{x:a,y:r}),Oy(this.labelGroup.select(xv.label.class),e),this.showValue&&(this.valueGroup.call(_,{x:t,y:r}),Oy(this.valueGroup.select(xv.value.class),n))},Mv.prototype.render=function(t,e){e=S(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()},Mv);function Mv(t){return bv.call(this,ry({},{style:wv},t))||this}function Ov(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var _v,Sv=ky({itemPage:"item-page",navigator:"navigator",pageView:"page-view",item:"item"},"items"),Ev={data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orient:"horizontal",click:an,mouseenter:an,mouseleave:an},Av=(ne(Tv,_v=a),Object.defineProperty(Tv.prototype,"attrs",{get:function(){return My(this.attributes)},enumerable:!1,configurable:!0}),Object.defineProperty(Tv.prototype,"grid",{get:function(){var t=this.attrs,e=t.gridRow,n=t.gridCol,t=t.data;if(e||n)return e&&n?[e,n]:e?[e,t.length]:[t.length,n];throw new Error("gridRow and gridCol can not be set null at the same time")},enumerable:!1,configurable:!0}),Object.defineProperty(Tv.prototype,"renderData",{get:function(){var t=this.attrs,a=t.data,o=t.layout,s=qg(this.attrs,"item");return a.map(function(e,n){var t=e.id,r=e.label,i=e.value;return{id:"".concat(void 0===t?n:t),index:n,style:v({layout:o,label:r,value:i},Object.fromEntries(Object.entries(s).map(function(t){t=x(t,2);return[t[0],vy(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),Tv.prototype.getGridLayout=function(){var u=this,t=this.attrs,f=t.orient,h=t.width,d=t.rowPadding,p=t.colPadding,g=x(this.navigatorShape,1)[0],t=x(this.grid,2),y=t[0],m=t[1],v=m*y,b=0;return this.itemsCache.children.map(function(t,e){var n,r=Math.floor(e/v),i=e%v,a=u.ifHorizontal(m,y),a=[Math.floor(i/a),i%a],a=("vertical"===f&&a.reverse(),x(a,2)),o=a[0],a=a[1],s=(h-g-(m-1)*p)/m,t=t.getBBox().height,l=x([0,0],2),c=l[0],l=l[1];return b="horizontal"===f?(c=(n=x([b,o*(t+d)],2))[0],l=n[1],a===m-1?0:b+s+p):(c=(n=x([a*(s+p),b],2))[0],l=n[1],o===y-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:c,y:l}})},Tv.prototype.getFlexLayout=function(){var t=this.attrs,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,t=x(this.navigatorShape,1)[0],r=x(this.grid,2),s=r[0],l=r[1],r=x([e-t,n],2),c=r[0],u=r[1],e=x([0,0,0,0,0,0,0,0],8),f=e[0],h=e[1],d=e[2],p=e[3],g=e[4],y=e[5],m=e[6],v=e[7];return this.itemsCache.children.map(function(t,e){var t=t.getBBox(),n=t.width,t=t.height,r=0===m?0:o,i=m+r+n;return i<=c&&Ov(g,function(t){return t<l})?(r=x([m+r,v,i],3),f=r[0],h=r[1],m=r[2]):(i=x([y+1,0,0,v+t+a],4),y=i[0],g=i[1],m=i[2],(v=i[3])+a+t<=u&&Ov(y,function(t){return t<s})?(r=x([m,v,n],3),f=r[0],h=r[1],m=r[2]):(i=x([0,0,n,0,d+1,0,0,0],8),f=i[0],h=i[1],m=i[2],v=i[3],d=i[4],p=i[5],y=i[6],g=i[7])),{width:n,height:t,x:f,y:h,page:d,index:e,pageIndex:p++,row:y,col:g++}})},Object.defineProperty(Tv.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t="grid"===this.attributes.layout?this.getGridLayout:this.getFlexLayout,e=t.call(this);return 0<e.slice(-1)[0].page?(this.navigatorShape=[55,0],t.call(this)):e},enumerable:!1,configurable:!0}),Tv.prototype.ifHorizontal=function(t,e){return vv(this.attrs.orient,t,e)},Tv.prototype.renderItems=function(){var t=this.attrs,e=t.click,n=t.mouseenter,r=t.mouseleave,i=(this.items=[],this.itemsCache.removeChildren(),this.items);S(this.itemsCache).selectAll(Sv.itemPage.class).data(this.renderData).join(function(t){return t.append(function(t){t=t.style,t=new kv({style:t});return i.push(t),t}).attr("className",Sv.item.name).on("click",function(){null!=e&&e(this)}).on("mouseenter",function(){null!=n&&n(this)}).on("mouseleave",function(){null!=r&&r(this)})},function(t){return t.each(function(t){t=t.style;this.update(t)})},function(t){return t.remove()}),this.appendChild(this.itemsCache).style.visibility="hidden"},Tv.prototype.adjustLayout=function(){var n,u=this.items,t=this.itemsLayout;S(this.pageViews).selectAll(Sv.itemPage.class).data(Object.entries((n="page",t.reduce(function(t,e){return(t[e[n]]=t[e[n]]||[]).push(e),t},{}))).map(function(t){t=x(t,2);return{page:t[0],items:t[1]}})).join(function(t){return t.append("g").attr("className",Sv.itemPage.name).each(function(t){var c=this;t.items.forEach(function(t){var n,r,i,e=t.x,a=t.y,o=t.index,s=t.width,l=t.height,o=c.appendChild(u[o]);n=t,r=o,(i=ze(t="__data__")?t.split("."):t).forEach(function(t,e){e<i.length-1?(je(r[t])||(r[t]=We(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:l})})})},function(t){return t},function(t){return t.remove()}),this.removeChild(this.itemsCache)},Tv.prototype.renderNavigator=function(t){var e=this.attrs,n=e.orient,r=e.layout,e=e.width,i=x(this.navigatorShape,2),a=i[0],i=i[1],o=qg(this.attrs,"nav"),s=(null==(s=this.pageViews.children[0])?void 0:s.getBBox().height)||0,r="grid"===r?{pageWidth:e-a,pageHeight:s-i}:{},l=v(v(v({},o),r),{orient:n,pageViews:this.pageViews.children});t.maybeAppendByClassName(Sv.navigator,function(){return new yv({style:l})}).update(o)},Tv.prototype.render=function(t,e){e=S(e);this.renderItems(),this.adjustLayout(),this.renderNavigator(e)},Tv);function Tv(t){t=_v.call(this,ry({},{style:Ev},t))||this;return t.items=[],t.itemsCache=new F.Group,t.pageViews=new F.Group({className:Sv.pageView.name}),t.navigatorShape=[0,0],t}var Pv,cs={style:{padding:0,orient:"horizontal",backgroundFill:"transparent",titleText:"",showTitle:!0,titleSpacing:4,titlePosition:"left-top",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12}},Nv=on({},cs,{style:{type:"category",items:[],maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!1}}),Lv=on({},cs,{style:{type:"continuous",color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],slidable:!0,showHandle:!0,showLabel:!0,showIndicator:!0,labelSpacing:5,indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorBackgroundFill:"#262626"}}),Cv=ky({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),jv=(ne(Fv,Pv=a),Fv.prototype.renderTitle=function(t,e,n){var r=this.attributes.showTitle,i=x(Ug(qg(this.attributes,"title")),2),a=i[0],i=i[1];this.titleGroup=t.maybeAppendByClassName(Cv.titleGroup,"g").call(_,i),by(!!r,this.titleGroup,function(t){t.maybeAppendByClassName(Cv.title,function(){return new lv({style:v({width:e,height:n},a)})}).update(a)})},Fv.prototype.renderItems=function(t,e,n){var r=this,i=x(Yg(this.attributes,["title"]),2),i=x(Ug(i[1]),2),a=i[0],i=i[1],o=v(v({},a),{width:e,height:n});this.itemsGroup=t.maybeAppendByClassName(Cv.itemsGroup,"g").call(_,i),this.itemsGroup.maybeAppendByClassName(Cv.items,function(){return new Av({style:o})}).update(i),Object.entries(o).forEach(function(t){var t=x(t,2),e=t[0],t=t[1];return r.itemsGroup.attr(e,t)})},Fv.prototype.adjustLayout=function(){var t,e;this.attributes.showTitle&&(t=(e=this.titleGroup.select(Cv.title.class).node().getAvailableSpace()).x,e=e.y,this.itemsGroup.node().setLocalPosition(t,e))},Object.defineProperty(Fv.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?[(e=this.titleGroup.select(Cv.title.class).node().getAvailableSpace()).width,e.height]:[n,t]},enumerable:!1,configurable:!0}),Fv.prototype.render=function(t,e){var n=t.width,t=t.height,e=S(e);this.renderTitle(e,n,t),this.renderItems.apply(this,w([e],x(this.availableSpace),!1)),this.adjustLayout()},Fv);function Fv(t){return Pv.call(this,ry({},Nv,t))||this}var Iv,Rv={formatter:function(t){return t},padding:[2,4],position:"right",labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",backgroundZIndex:-1,backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333"},Bv=ky({background:"background",labelGroup:"label-group",label:"label"},"indicator"),Dv=(ne(zv,Iv=a),zv.prototype.renderBackground=function(){var t=this.style,e=t.position,t=x(zg(t.padding),4),n=t[0],r=t[1],i=t[2],t=t[3],a=this.label.node().getLocalBounds(),o=a.min,a=a.max,t=[[o[0]-t,o[1]-n],[a[0]+r,a[1]+i]],o=this.getPath(e,t),n=qg(this.attributes,"background");this.background=S(this.group).maybeAppendByClassName(Bv.background,"path").call(_,n).style("path",o),this.group.appendChild(this.label.node())},zv.prototype.renderLabel=function(){var t=this.attributes,e=t.value,n=t.formatter,t=x(Ug(qg(this.attributes,"label")),2),r=t[0],t=t[1];this.label=S(this.group).maybeAppendByClassName(Bv.labelGroup,"g").call(_,t),e&&this.label.maybeAppendByClassName(Bv.label,function(){return hy(n(e))}).style("text",n(e).toString()).selectAll("text").call(_,v(v({},Wg),r))},zv.prototype.adjustLayout=function(){var t=x(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},zv.prototype.getPath=function(n,t){var r=this,t=x(t,2),e=x(t[0],2),i=e[0],e=e[1],t=x(t[1],2),a=t[0],t=t[1],o={top:"bottom",right:"left",bottom:"top",left:"right"},a=Object.entries({top:[[i,e],[a,e]],right:[[a,e],[a,t]],bottom:[[a,t],[i,t]],left:[[i,t],[i,e]]}).map(function(t){var t=x(t,2),e=t[0],t=t[1];return e===o[n]?r.createCorner(t):[w(["M"],x(t[0]),!1),w(["L"],x(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},zv.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=function(t,e){var n=(t=x(t,2))[0],t=t[1],r=(e=x(e,2))[0],e=e[1];return n!==r&&t===e}.apply(void 0,w([],x(t),!1)),t=x(t,2),r=x(t[0],2),i=r[0],r=r[1],t=x(t[1],2),a=t[0],t=t[1],a=x(n?[a-i,[i,a]]:[t-r,[r,t]],2),t=a[0],a=x(a[1],2),o=a[0],a=a[1],s=t/2,e=e*(t/Math.abs(t)),t=e/2,e=e*Math.sqrt(3)/2*.8,o=x([o,o+s-t,o+s,o+s+t,a],5),s=o[0],t=o[1],a=o[2],l=o[3],o=o[4];return n?(this.point=[a,r-e],[["M",s,r],["L",t,r],["L",a,r-e],["L",l,r],["L",o,r]]):(this.point=[i+e,a],[["M",i,s],["L",i,t],["L",i+e,a],["L",i,l],["L",i,o]])},zv.prototype.bindEvents=function(){this.label.on(F.ElementEvent.BOUNDS_CHANGED,this.renderBackground)},zv.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},zv);function zv(t){void 0===t&&(t={});t=Iv.call(this,ry({},{style:v({visibility:"hidden"},Rv)},t))||this;return t.point=[0,0],t.group=t.appendChild(new F.Group({})),t}var Gv=ky({marker:"marker",labelGroup:"labelGroup",label:"label"},"handle"),Wv=wy({render:function(t,e){var a,o=t.orient,n=t.visibility,r=t.spacing,s=void 0===r?0:r,r=t.showLabel,l=t.formatter,i=t.markerSymbol,i=void 0===i?vv(o,"horizontalHandle","verticalHandle"):i,t=x(Yg(t,["label","marker"]),2),c=t[0],t=t[1],u=c.text,f=Z(c,["text"]);i&&"hidden"!==n?(c=v({symbol:i},t),a=S(e).maybeAppend(Gv.marker.name,function(){return new Cy({})}).update(c),by(r,S(e).maybeAppendByClassName(Gv.labelGroup,"g"),function(t){var t=t.maybeAppendByClassName(Gv.label,"text").call(_,v({text:l(u).toString()},f)),e=a.node().getBBox(),n=e.width,e=e.height,e=x(vv(o,[0,e+s,"center","top"],[n+s,0,"start","middle"]),4),n=e[0],r=e[1],i=e[2],e=e[3];t.node().setLocalPosition(n,r),t.style("textAlign",i).style("textBaseline",e)})):(null!=(n=e.querySelector(Gv.marker.class))&&n.remove(),null!=(i=e.querySelector(Gv.label.class))&&i.remove())}},v({},{markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orient:"vertical",spacing:0,showLabel:!0,formatter:function(t){return t.toString()}}));function Hv(t,e){var t=x(function(t,e){for(var n=1;n<t.length;n+=1){var r=t[n-1],i=t[n];if(r<=e&&e<=i)return[r,i]}return[e,e]}(t,e),2),n=t[0],t=t[1];return{tick:(n+t)/2<e?t:n,range:[n,t]}}var Vv=ky({backgroundGroup:"background-group",background:"background",ribbonGroup:"ribbon-group",ribbon:"ribbon",clipPath:"clip-path"},"ribbon");function qv(t){var e=t.orient,n=t.size,t=t.len;return vv(e,[t,n],[n,t])}function Yv(t){var e=t.type,t=x(qv(t),2),n=t[0],t=t[1];return"size"===e?[["M",0,t],["L",0+n,0],["L",0+n,t],["Z"]]:[["M",0,t],["L",0,0],["L",0+n,0],["L",0+n,t],["Z"]]}function Uv(t){var e,n,i,a,r=t.orient,o=t.color,s=t.block,t=t.blocks,l=(e=Te(o)?new Array(20).fill(0).map(function(t,e,n){return o(e/(n.length-1))}):o).length;return l?s?(s=t,t=e,n=r,i=Array.from(t),a=s+1,new Array(a).fill(0).reduce(function(t,e,n){var r=i[n%i.length];return t+" ".concat(n/(a-1),":").concat(r).concat(n<a-1?" ".concat((n+1)/(a-1),":").concat(r):"")},"l(".concat("horizontal"===n?"0":"270",")"))):e.reduce(function(t,e,n){return t+" ".concat(n/(l-1),":").concat(e)},"l(".concat(vv(r,"0","270"),")")):""}function Xv(t,e,n){var r,i,a,o=Uv(e),t=t.maybeAppendByClassName(Vv.ribbon,"path").call(_,v({path:Yv(e),fill:o},n)),n=t.maybeAppendByClassName(Vv.clipPath,"path").call(_,{path:(n=(o=e).orient,(e=o.range)?(i=(o=x(qv(o),2))[0],o=o[1],r=(e=x(e,2))[0],e=e[1],a=vv(n,r*i,0),r=vv(n,0,r*o),i=vv(n,e*i,i),[["M",a,r],["L",a,a=vv(n,o,e*o)],["L",i,a],["L",i,r],["Z"]]):[])}).node();t.style("clip-path",n)}var Kv,$v,Zv,Jv,Qv=wy({render:function(t,e){var n,r=x(Yg(t,["ribbon","background"]),2),i=r[0],r=r[1],a=S(e).maybeAppendByClassName(Vv.backgroundGroup,"g");n=t,r=r,a.maybeAppendByClassName(Vv.background,"path").call(_,v({path:Yv(n)},r)),Xv(S(e).maybeAppendByClassName(Vv.ribbonGroup,"g"),t,i)}},v({},{type:"color",orient:"horizontal",size:30,range:[0,1],len:200,block:!1,blocks:0,color:["#fff","#000"],backgroundFill:"#e5e5e5"})),tb=Ze(function(t){return{min:Math.min.apply(Math,w([],x(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,w([],x(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),eb=(ne(nb,Kv=a),nb.prototype.render=function(t,e){var n=this,r=(t.data,t.width),i=t.height,a=(t.orient,t.defaultValue,t.color,t.block,t.type,t.slidable,t.step,t.showTitle),o=(t.showHandle,t.showLabel),t=(t.showIndicator,x(Yg(My(t),["title","label","indicator","ribbon","handle"]),5)),s=t[0],l=(t[1],t[2]),c=t[3],t=(t[4],S(e).maybeAppendByClassName(Cv.title,function(){return new lv({style:v({width:r,height:i},s)})})),a=(by(a,S(e),function(t){}),t.node().getAvailableSpace()),t=a.x,u=a.y,a=(a.width,a.height,S(e).maybeAppendByClassName(Cv.contentGroup,"g").call(_,{x:t,y:u})),f=a.maybeAppendByClassName(Cv.ribbonGroup,"g");this.renderRibbon(f,c),this.handlesGroup=f.maybeAppendByClassName(Cv.handlesGroup,"g"),this.renderHandles(),this.renderIndicator(a,l),by(o,S(e).maybeAppendByClassName(Cv.labelGroup,"g").call(_,{x:t,y:u}),function(t){n.renderLabel(t)})},Object.defineProperty(nb.prototype,"range",{get:function(){var t=this.attributes.data;return tb(t)},enumerable:!1,configurable:!0}),Object.defineProperty(nb.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,t=t.max;return this._ribbonScale.update({domain:[e,t],range:[0,1]}),this._ribbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(nb.prototype,"ribbonRange",{get:function(){var t=x(this.selection,2),e=t[0],t=t[1],n=this.ribbonScale;return[n.map(e),n.map(t)]},enumerable:!1,configurable:!0}),Object.defineProperty(nb.prototype,"selection",{get:function(){var t=this.range,e=t.min,t=t.max,n=this.attributes.defaultValue,e=x(void 0===n?[e,t]:n,2);return[e[0],e[1]]},enumerable:!1,configurable:!0}),nb.prototype.ifHorizontal=function(t,e){return vv(this.style.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},nb.prototype.renderRibbon=function(t,e){var n=this.attributes,r=n.type,i=n.orient,a=n.color,o=n.block,n=n.data;this.ribbon=t.maybeAppendByClassName(Cv.ribbon,function(){return new Qv({})}).update(v({type:r,orient:i,color:a,block:o,blocks:n.length-1,range:this.ribbonRange},e))},nb.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,t=t.slidable,n=x(this.selection,2),r=n[0],n=n[1];this.startHandle=this.renderHandle("start",r),this.endHandle=this.renderHandle("end",n),e&&t?this.handlesGroup.style("visibility","visible"):this.handlesGroup.style("visibility","hidden")},nb.prototype.renderHandle=function(t,e){var n=this.attributes.orient,r=qg(this.attributes,"handle"),r=(r.formatter,Z(r,["formatter"])),n=this.handlesGroup.maybeAppendByClassName(Cv.prefix("".concat(t,"-handle")),function(){return new Wv({})}).call(_,v({orient:n,labelText:e},r));return this.setHandlePosition(t,e),n},nb.prototype.setHandlePosition=function(t,e){var n=this.attributes,r=n.ribbonSize,n=n.handleFormatter,e=this.getOffset(e),r=x(this.ifHorizontal([e,.7*r],[r/2,e]),2),e=r[0],r=r[1],t=this.handlesGroup.select(".".concat(Cv.prefix("".concat(t,"-handle")))).node(),n=(null!=t&&t.attr("formatter",n),x(t.getLocalPosition(),2)),i=n[0],n=n[1];Math.abs(e+r-i-n)<100?null!=t&&t.setLocalPosition(e,r):null!=t&&t.animate([{transform:"translate(".concat(t.getLocalPosition().slice(0,2).join(","),")")},{transform:"translate(".concat(e,", ").concat(r,")")}],{duration:200,fill:"both"})},nb.prototype.renderIndicator=function(t,e){this.indicator=t.maybeAppendByClassName(Cv.indicator,function(){return new Dv({style:e})}).update(e)},Object.defineProperty(nb.prototype,"labelData",{get:function(){var o=this,t=this.attributes,e=t.data,s=t.labelAlign;return e.reduce(function(t,e,n,r){var i,a=null!=(a=null==e?void 0:e.id)?a:n.toString();return"value"===s?t.push(v(v({},e),{id:a,label:null!=(i=null==e?void 0:e.label)?i:e.value.toString(),value:o.ribbonScale.map(e.value)})):n<r.length-1&&(i=r[n+1],r=((n=(r=x([e.value,i.value],2))[0])+(i=r[1]))/2,t.push(v(v({},e),{id:a,range:[n,i],label:[n,i].join("~"),value:o.ribbonScale.map(r)}))),t},[])},enumerable:!1,configurable:!0}),Object.defineProperty(nb.prototype,"labelStyle",{get:function(){var t=this.attributes,e=t.orient,t=t.labelDirection,t=void 0===t?"positive":t,n=x(["center","middle"],2),r=n[0],n=n[1];return"horizontal"===e?n="positive"===t?"top":"bottom":r="positive"===t?"end":"start",{labelTextAlign:r,labelTextBaseline:n}},enumerable:!1,configurable:!0}),nb.prototype.renderLabel=function(t){var e=this.attributes,n=e.ribbonSize,e=e.ribbonLen,r=qg(this.attributes,"label"),i=r.spacing,a=(r.align,r.formatter),o=r.filter,r=Z(r,["spacing","align","formatter","filter"]),e=x(this.ifHorizontal([[0,n/2],[e,n/2]],[[n/2,0],[n/2,e]]),2),s=e[0],e=e[1],l=v(v({type:"linear",startPos:s,endPos:e,data:this.labelData,showLine:!1,showGrid:!1,showTick:!1,labelSpacing:i+n/2,labelTransform:"rotate(0)"},this.labelStyle),Object.fromEntries(Object.entries(r).map(function(t){var t=x(t,2),e=t[0],t=t[1];return["label".concat((e=e).charAt(0).toUpperCase()+e.slice(1)),t]}))),s=t.maybeAppendByClassName(Cv.label,function(){return new dv({style:l})}).call(_,l).node();s.attr("labelFormatter",a),s.attr("labelFilter",o)},nb.prototype.bindEvents=function(){var n=this,t=new Map;t.set("ribbon",this.ribbon),t.set("start",this.startHandle),t.set("end",this.endHandle),t.forEach(function(t,e){null!=t&&t.on("mousedown",n.onDragStart(e)),null!=t&&t.on("touchstart",n.onDragStart(e))}),null!=(t=this.startHandle)&&t.on("mouseover",function(){return n.updateMouse()}),null!=(t=this.endHandle)&&t.on("mouseover",function(){return n.updateMouse()}),this.ribbon.on("mousemove",this.onHovering),this.addEventListener("mouseout",this.hideIndicator)},nb.prototype.showIndicator=function(t,e){void 0===e&&(e="".concat(t));var n,r=this.attributes,i=r.orient;r.showIndicator&&"number"==typeof t?(n=(r=this.range).min,r=r.max,t=Ge(t,n,r),n=[this.getOffset(t),0],"vertical"===i&&n.reverse(),this.indicator.update({visibility:"visible",position:this.ifHorizontal("top","left"),value:e}),(r=this.indicator.node()).setLocalPosition.apply(r,w([],x(n),!1))):this.hideIndicator()},nb.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.style("visibility","hidden")},nb.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},nb.prototype.setSelection=function(t,e){this.updateSelection(t,e)},nb.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=x(this.selection,2),c=l[0],l=l[1],t=x([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.range),c=n.min,l=n.max,u=x((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=x(n,2))[0],n=n[1],a=(c=x(c,2))[0],c=c[1],o=(l=x(l,2))[0],l=l[1],c=(a=x([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=x([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[Dg(c,r),Dg(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(nb.prototype,"step",{get:function(){var t=this.attributes.step,t=void 0===t?1:t,e=this.range,n=e.min,e=e.max;return Ye(t)?Dg(.01*(e-n),0):t},enumerable:!1,configurable:!0}),nb.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?Hv(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},nb.prototype.getValueByCanvasPoint=function(t,e){var n=this.range,r=n.min,n=n.max,i=x(this.ribbon.node().getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,w([],x(Xg(t)),!1));return Ge(this.getOffset(i-a,!0)+r,r,n)},nb.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,n=n.max,i=this.attributes.ribbonLen,a=this.eventToOffsetScale;return a.update({domain:[r,n],range:[0,i]}),e?a.invert(t):a.map(t)},nb.prototype.dispatchSelection=function(){var t=new F.CustomEvent("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},nb.prototype.dispatchIndicated=function(t,e){t=new F.CustomEvent("indicated",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([cy(100)],nb.prototype,"dispatchSelection",null),t([cy(100)],nb.prototype,"dispatchIndicated",null),nb);function nb(t){var a=Kv.call(this,ry({},Lv,t))||this;return a.eventToOffsetScale=new Kp({}),a._ribbonScale=new Kp({}),a.onHovering=function(t){var e=a.attributes,n=e.data,e=e.block,t=(t.stopPropagation(),a.getValueByCanvasPoint(t));e?(e=Hv(n.map(function(t){return t.value}),t).range,a.showIndicator((e[0]+e[1])/2,"".concat(e[0],"-").concat(e[1])),a.dispatchIndicated(t,e)):(n=a.getTickValue(t),a.showIndicator(n),a.dispatchIndicated(n))},a.onDragStart=function(e){return function(t){t.stopPropagation(),a.attributes.slidable&&(a.target=e,a.prevValue=a.getTickValue(a.getValueByCanvasPoint(t)),document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseleave",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd))}},a.onDragging=function(t){var e=a.target,n=(a.updateMouse(),x(a.selection,2)),r=n[0],n=n[1],t=a.getTickValue(a.getValueByCanvasPoint(t)),i=t-a.prevValue;"start"===e?r!==t&&a.updateSelection(t,n):"end"===e?n!==t&&a.updateSelection(r,t):"ribbon"===e&&0!=i&&(a.prevValue=t,a.updateSelection(i,i,!0))},a.onDragEnd=function(){a.style.cursor="default",document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("touchmove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a}function rb(t){$v||($v=document.createElement("table"),Jv=document.createElement("tr"),Zv=/^\s*<(\w+|!)[^>]*>/,Jv={tr:document.createElement("tbody"),tbody:$v,thead:$v,tfoot:$v,td:Jv,th:Jv,"*":document.createElement("div")});var e=Zv.test(t)&&RegExp.$1,e=(e&&e in Jv||(e="*"),Jv[e]),t=(t="string"==typeof t?t.replace(/(^\s*)|(\s*$)/g,""):t,e.innerHTML=""+t,e.childNodes[0]);return t&&e.contains(t)&&e.removeChild(t),t}var ib,ds="tooltip",ab="tooltip-title",ob="tooltip-list",Ka="tooltip-list-item",fs="tooltip-list-item-name",sb="tooltip-list-item-marker",hs="tooltip-list-item-name-label",fc="tooltip-list-item-value",r="tooltip-crosshair-x",Ea="tooltip-crosshair-y",La={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},n=((e={})[".".concat(ds)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},e[".".concat(ab)]={color:"rgba(0, 0, 0, 0.45)"},e[".".concat(ob)]={margin:"0px","list-style-type":"none",padding:"0px"},e[".".concat(Ka)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},e[".".concat(sb)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},e[".".concat(fs)]={display:"flex","align-items":"center","max-width":"216px"},e[".".concat(hs)]=v({flex:1},La),e[".".concat(fc)]=v({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},La),e[".".concat(r)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e[".".concat(Ea)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e),lb=(ne(cb,ib=a),Object.defineProperty(cb.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Object.defineProperty(cb.prototype,"position",{set:function(t){var t=x(t,2),e=t[0],t=t[1];this.attr({x:e,y:t}),this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(cb.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(cb.prototype,"items",{get:function(){var t=this.attributes.items;return this.sort(this.filter(t.map(function(t,e){var n=t.name,n=void 0===n?"":n,r=t.value,i=t.color,i=void 0===i?"black":i,a=t.index,t=Z(t,["name","value","color","index"]);return v({name:n,value:r,color:i,index:void 0===a?e:a},t)})))},enumerable:!1,configurable:!0}),Object.defineProperty(cb.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes.template.item,r=[];return this.items.forEach(function(t){var n;r.push(rb((n=t,(t=e)&&n?t.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):t)))}),r},enumerable:!1,configurable:!0}),Object.defineProperty(cb.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return ze(t)?ny(t):Ue(t)?t:Te(t)?ny(t(this.attributes.items)):void 0},enumerable:!1,configurable:!0}),cb.prototype.render=function(t,e){this.updateHTMLTooltipElement(),this.updatePosition()},cb.prototype.update=function(t){this.attr(on({},this.attributes,t)),this.render(this.attributes,this)},cb.prototype.clear=function(){this.element.innerHTML=""},cb.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},cb.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},cb.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},cb.prototype.initShape=function(){var t=this.attributes.template.container;this.element=rb(t),!this.id&&""===this.id||this.element.setAttribute("id",this.id)},cb.prototype.updateHTMLTooltipElement=function(){var e,r,t=this.attributes.title,n=this.element,i=this.customContent,t=(this.clear(),i?n.appendChild(i):(i=this.attributes.template.title,n.innerHTML=i,n.getElementsByClassName(ab)[0].innerHTML=t,i=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=ob,i.forEach(function(t){e.appendChild(t)}),this.element.appendChild(e)),this.attributes.style);r=n,Object.entries(t).forEach(function(t){var t=x(t,2),e=t[0],n=t[1];w([r],x(r.querySelectorAll(e)),!1).filter(function(t){return t.matches(e)}).forEach(function(t){t&&(t.style.cssText+=Object.entries(n).reduce(function(t,e){return"".concat(t).concat(e.join(":"),";")},""))})}),this.element.style.visibility=this.visibility},cb.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,e=x(e.offset,2),i=e[0],a=e[1],e=(t||n).split("-"),o={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},t=this.elementSize,s=t.width,l=t.height,c=[-s/2,-l/2];return e.forEach(function(t){var e=x(c,2),n=e[0],e=e[1],t=x(o[t],2),r=t[0],t=t[1];c=[n+(s/2+i)*r,e+(l/2+a)*t]}),c},cb.prototype.setOffsetPosition=function(t){var t=x(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat(r+a+e,"px"),this.element.style.top="".concat(i+n+t,"px")},cb.prototype.updatePosition=function(){this.throttleUpdatePosition()},cb.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=x(t,2),l=t[0],t=t[1],c=this.attributes,u=c.x,f=c.y,h=c.autoPosition,c=c.bounding;return h?(e=(h=this.element).offsetWidth,h=h.offsetHeight,f=(u=x([u+l,f+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=c.x,i=c.y,a={left:f<s,right:s+c.width<f+e,top:u<i,bottom:i+c.height<u+h},o=[],n.split("-").forEach(function(t){o.push(a[t]?r[t]:t)}),s=o.join("-"),this.getRelativeOffsetFromCursor(s)):[l,t]},cb.prototype.filter=function(t){var e=this.attributes.filterBy;return e?t.filter(e):t},cb.prototype.sort=function(t){var e=this.attributes.sortBy;return e?t.sort(e):t},cb.tag="tooltip",cb.defaultOptions={style:{x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],follow:!0,enterable:!1,autoPosition:!0,items:[],throttleFrequency:50,container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(ds,'"></div>'),title:'<div class="'.concat(ab,'"></div>'),item:'<li class="'.concat(Ka,'" data-index={index}>\n <span class="').concat(fs,'">\n <span class="').concat(sb,'" style="background:{color}"></span>\n <span class="').concat(hs,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(fc,'" title="{value}">{value}</span>\n </li>')},style:n}},cb);function cb(t){var e=ib.call(this,on({},cb.defaultOptions,t))||this;return e.visibility="visible",e.throttleUpdatePosition=rn(function(){e.setOffsetPosition(e.autoPosition(e.getRelativeOffsetFromCursor()))},e.attributes.throttleFrequency,{}),e.visibility=e.attributes.visibility,e.initShape(),e.render(e.attributes,e),e}var ub,fb={default:{sizeStyle:{width:44,height:22,radius:11},tagStyle:{textStyle:{fontSize:12,lineHeight:16,fill:"#fff"},padding:0},markerStyle:{size:11}},small:{sizeStyle:{width:28,height:16,radius:8},tagStyle:{textStyle:{fontSize:10,lineHeight:14,fill:"#fff"},padding:0},markerStyle:{size:8}},mini:{sizeStyle:{width:20,height:14,radius:7},tagStyle:{textStyle:{fontSize:7,lineHeight:10,fill:"#fff"},padding:0},markerStyle:{size:7}}};function hb(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!0);var r=Number(t.style.height)-2*e;return{x:n?Number(t.style.width)+Number(t.style.x)-e-r:Number(t.style.x)+e,y:Number(t.style.y)+e,width:r,height:r,radius:r/2}}function db(t){return ub.call(this,on({},db.defaultOptions,t))||this}ne(db,ub=a),db.prototype.render=function(t,e){var i=this,n=t.size,n=void 0===n?"default":n,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=Jg(e,".switch-content","g").attr("className","switch-content").node(),l=e.getLocalBounds(),n=en(fb,n,fb.default),c=n.sizeStyle,u=n.tagStyle,f=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",h=c,d=o?t:s,p=((t||s)&&Jg(e,".switch-tag",function(){return new Iy({})}).attr("className","switch-tag").call(function(t){var e,t=t.node(),n=(t.update(on({cursor:f,backgroundStyle:null,text:!1,marker:!1},u,d)),null==t?void 0:t.getLocalBounds()),r=n.max,n=n.min,i=r[0]-n[0]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);h=v(v({},c),{width:n}),t.update((t={x:l.min[0],y:l.min[1],width:n,height:h.height},n={width:i,height:r},i=h.radius,r=o,e=n.width,n=n.height,void 0===i&&(i=0),{x:(r=void 0===o?!0:r)?Number(t.x)+i:Number(t.width)+Number(t.x)-e,y:Number(t.y)+(Number(t.height)-n)/2}))}),Jg(e,".switch-background","rect").attr("className","switch-background").style("zIndex",(e.style.zIndex||0)-1).style("x",l.min[0]).style("y",l.min[1]).style("fill",n).style("cursor",f).style("fillOpacity",r?.4:1).call(_,h).node()),g=Jg(e,".switch-background-stroke","rect").attr("className","switch-background-stroke").style("zIndex",(e.style.zIndex||0)-2).style("x",l.min[0]).style("y",l.min[1]).style("stroke",n).style("lineWidth",0).call(_,h).node();Jg(e,".switch-handle","rect").attr("className","switch-handle").style("fill","#fff").style("cursor",f).call(function(t){var e,t=t.node(),n=hb(p,a,o),r=hb(p,a,!o);t.attr("x")&&!sn(n,r)&&i.checked!==o?(t.attr(r),null!=(e=t.getAnimations()[0])&&e.cancel(),null!=(e=g.getAnimations()[0])&&e.cancel(),t.animate([{x:r.x},{x:n.x}],{duration:120,fill:"both"}),g.animate([{lineWidth:0,strokeOpacity:.5},{lineWidth:14,strokeOpacity:0}],{duration:400,easing:"ease-on"})):t.attr(n)}),this.checked=!!o},db.defaultOptions={type:db.tag="switch",style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var pb,gb,yb,mb,us={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},ka=ry({},us,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),o=ry({},us,{type:"circle",defaultRadius:0}),Aa=ry({},us,{type:"polygon",defaultRadius:0,startAngle:0}),Ta=(ne(vb,pb=a),Object.defineProperty(vb.prototype,"localPointer",{get:function(){var t=x(this.getPosition(),2),e=t[0],t=t[1],n=x(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(vb.prototype,"tagCfg",{get:function(){var t=qg(this.attributes,"tag");return t.position,Z(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(vb.prototype,"crosshairCfg",{get:function(){var t=qg(this.attributes,"line");return v(v({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),vb.prototype.render=function(t,e){var n=this,e=Jg(e,".crosshair-group","g").attr("className","crosshair-group").node();this.shapesGroup=e,this.tagShape=Jg(e,".crosshair-tag",function(){return new Iy({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=Jg(e,".crosshair-path","path").attr("className","crosshair-path").call(_,this.crosshairCfg).node(),this.adjustLayout()},vb.prototype.update=function(t){this.attr(on({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},vb.prototype.setPointer=function(t){this.pointer=t},vb.tag="crosshair-base",vb.defaultOptions={style:us},vb);function vb(t){return pb.call(this,on({},vb.defaultOptions,t))||this}function bb(t){return gb.call(this,ry({},bb.defaultOptions,t))||this}function xb(t){return yb.call(this,ry({},xb.defaultOptions,t))||this}function wb(t){return mb.call(this,ry({},wb.defaultOptions,t))||this}ne(bb,gb=Ta),Object.defineProperty(bb.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=x(t.startPos,2),n=e[0],e=e[1],t=x(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(bb.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=x(this.getPosition(),2))[0],e=e[1],[(n=x(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(bb.prototype,"isVertical",{get:function(){var t=this.attributes,e=x(t.startPos,2),n=e[0],e=e[1],t=x(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(bb.prototype,"tagShapeSpace",{get:function(){var t=Qg(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),bb.prototype.update=function(t){gb.prototype.update.call(this,t)},bb.prototype.setPointer=function(t){gb.prototype.setPointer.call(this,t),this.adjustPosition()},bb.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},bb.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},bb.prototype.adjustPosition=function(){var t=x(this.localPointer,2),e=t[0],t=t[1],n=x(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},bb.prototype.adjustTag=function(){var t,e=this.attributes,n=e.tagText,r=e.tagPosition,i=x(e.startPos,2),a=i[0],i=i[1],e=x(e.endPos,2),o=e[0],e=e[1];n&&""!==n?(this.tagShape.show(),t=(n=this.tagShapeSpace).width,n=n.height,a=(o=x(this.getOrientVal({start:[-t/2,n/2],end:[o-a+t/2,n/2]},{start:[0,0],end:[0,e-i+n]})[r],2))[0],t=o[1],this.tagShape.setLocalPosition(a,t)):this.tagShape.hide()},bb.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},bb.tag="line-crosshair",bb.defaultOptions={style:ka},t([cy(20)],bb.prototype,"setPointer",null),ne(xb,yb=Ta),Object.defineProperty(xb.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),xb.prototype.update=function(t){yb.prototype.update.call(this,t)},xb.prototype.setPointer=function(t){var t=x(t,2),e=t[0],t=t[1],e=(yb.prototype.setPointer.call(this,[e,t]),x(this.localPointer,2)),t=e[0],e=e[1],n=x(this.attributes.center,2),r=n[0],n=n[1],t=this.createCirclePath(Math.pow(Math.pow(t-r,2)+Math.pow(e-n,2),.5));this.crosshairShape.attr({path:t})},xb.prototype.adjustLayout=function(){this.tagShape.hide()},xb.prototype.createCirclePath=function(t){var e=this.attributes,n=x(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return Ay(r,n,t||e)},xb.tag="circle-crosshair",xb.defaultOptions={style:o},t([cy(20)],xb.prototype,"setPointer",null),ne(wb,mb=Ta),Object.defineProperty(wb.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),wb.prototype.update=function(t){mb.prototype.update.call(this,t)},Object.defineProperty(wb.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],f=[],h=0;h<l;h+=1)f.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+c*h,a=i=void 0,i=e[0]-n[0],e=e[1]-n[1],a=Math.sin(r),r=Math.cos(r),t[0]=i*r-e*a+n[0],t[1]=i*a+e*r+n[1],t));return f},enumerable:!1,configurable:!0}),wb.prototype.setPointer=function(t){var t=x(t,2),e=t[0],t=t[1],e=(mb.prototype.setPointer.call(this,[e,t]),x(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=x(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=ly(n,[t,e])/ly(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},wb.prototype.adjustLayout=function(){this.tagShape.hide()},wb.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=x(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=x(t,2),t=x($t([0,0],[t[0],t[1]],r||i),2),n=t[0],t=t[1];return[0===e?"M":"L",a+n,o+t]});return t.push(["Z"]),t},wb.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=x(t,2),c=t[0],u=t[1],f=this.points,t=x(this.attributes.center,2),h=t[0],d=t[1],p=1;p<=f.length;p+=1){var g=x(f[p-1],2),y=g[0],g=g[1],m=x(f[p%f.length],2),v=m[0],m=m[1],y=(i=[h,d],y=[y+h,g+d],g=[v+h,m+d],l=s=o=a=m=v=void 0,m=(r=x(r=[c,u],2))[0],r=r[1],a=(i=x(i,2))[0],i=i[1],o=(y=x(y,2))[0],y=y[1],s=(g=x(g,2))[0],g=g[1],l=[],(g-y)*(a-m)==(i-r)*(s-o)?(i-r)*(o-m)==(y-r)*(a-m)&&(oy(m,a,r,i,o,y)&&sy(l,o,y),oy(m,a,r,i,s,g)&&sy(l,s,g),oy(o,s,y,g,m,r)&&sy(l,m,r),oy(o,s,y,g,a,i))&&sy(l,a,i):(v=(m*(i-r)+y*(a-m)-r*(a-m)-o*(i-r))/((s-o)*(i-r)-(a-m)*(g-y)),0<=(g=(o*(g-y)+r*(s-o)-y*(s-o)-m*(g-y))/((a-m)*(g-y)-(s-o)*(i-r)))&&g<=1&&0<=v&&v<=1&&(l[0]=m+g*(a-m),l[1]=r+g*(i-r))),l);0!==y.length&&(e=(s=x(y,2))[0],n=s[1])}return[e,n]},wb.tag="polygon-crosshair",wb.defaultOptions={style:Aa},t([cy(20)],wb.prototype,"setPointer",null);ne(_b,kb=F.DisplayObject),Object.defineProperty(_b.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&Ce(t)?t.map(function(t){return Ce(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(_b.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(_b.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(_b.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(_b.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(_b.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(_b.prototype,"decorationCfg",{get:function(){var r=this,i=this.attributes.style,t=this.decorationType;return"none"===t?[]:t.map(function(t){var e,t=x(t,2),n=t[0],t=t[1];return"wavy"===t?v({path:r.getWavyPath(n)},i):"double"===t?v({path:r.getDoubleLinePath(n)},i):(e={solid:r.solidCfg,dashed:r.dashedCfg,dotted:r.dottedCfg},v(v({path:r.getLinePath(n)},i),e[t]))})},enumerable:!1,configurable:!0}),_b.prototype.update=function(t){var e=this;this.attr(ry({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new F.Path({style:t}))})},_b.prototype.clear=function(){this.removeChildren()},_b.prototype.getLinePos=function(t){var e=x(this.hangingRate,3),n=e[0],r=e[1],e=e[2],i=this.attributes,a=i.height,i=i.fontSize,o=x([0,0],2),s=o[0],o=o[1],o=("overline"===t?(s=(n=x([0,a*n-i/2],2))[0],n):"line-through"===t?(s=(n=x([0,a*r],2))[0],n):(s=(t=x([0,a*e+i/2],2))[0],t))[1];return[s,o]},_b.prototype.getLinePath=function(t){var e=this.attributes.width,t=x(this.getLinePos(t),2),n=t[0],t=t[1];return[["M",n,t],["L",n+e,t]]},_b.prototype.getDoubleLinePath=function(t){var e,n=this.doubleSpacing,r=this.attributes.width,i=x(this.getLinePos(t),2),a=i[0],i=i[1],o=x([0,0],2),s=o[0],o=o[1];return"line-through"===t&&(s=(e=x([-.5,.5],2))[0],o=e[1]),"underline"===t?(s=(e=x([0,1],2))[0],o=e[1]):"overline"===t&&(s=(e=x([1,0],2))[0],o=e[1]),[["M",a,i+n*s],["L",a+r,i+n*s],["M",a,i+n*o],["L",a+r,i+n*o]]},_b.prototype.getWavyPath=function(t){return[]},_b.tag="decoration",_b.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var kb,Mb,Ob=_b;function _b(t){t=kb.call(this,ry({},_b.defaultOptions,t))||this;return t.update({}),t}function Sb(t){t=Mb.call(this,ry({},Sb.defaultOptions,t))||this;return t.init(),t}ne(Sb,Mb=a),Object.defineProperty(Sb.prototype,"textWidth",{get:function(){var e=this;return Be(this.renderText.split("\n").map(function(t){return Ig(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"textHeight",{get:function(){return Qg(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"width",{get:function(){var t=this.attributes.width;return"auto"===t||void 0===t||0===t?this.textWidth:t},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"height",{get:function(){var t=this.attributes.height;return We(t)&&0!==t?t:Qg(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"lineHeight",{get:function(){var t=this.attributes,e=t.lineHeight,t=t.fontSize;return e&&0!==e?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return Bg(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:Bg(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"ellipsisText",{get:function(){var e=this,t=this.text,n=this.attributes,r=n.width,n=n.overflow,i="ellipsis"===n?"...":n;return t.split("\n").map(function(t){return Fg(t,We(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&We(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"font",{get:function(){return nn(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return v(v(v({},Wg),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"backgroundCfg",{get:function(){var t=this.width,e=this.height,n=this.attributes.backgroundStyle;return v({x:0,y:0,width:t,height:e},n)},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"decorationCfg",{get:function(){var t=this.attributes,e=t.decoration,n=t.fontSize,r=this.decorationLineWidth,i=this.fontColor;return this.textShape.getLineBoundingRects().map(function(t){return ry({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(Sb.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),Sb.prototype.init=function(){this.initShape(),this.update({})},Sb.prototype.update=function(t){this.attr(ry({},this.attributes,t)),this.render()},Sb.prototype.render=function(){var e=this;this.clear(),this.backgroundShape.attr(this.backgroundCfg),this.textShape.attr(this.textCfg),this.layout(),this.decorationGroup.removeChildren(),this.decorationCfg.forEach(function(t){e.decorationGroup.appendChild(new Ob({style:t}))})},Sb.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},Sb.prototype.initShape=function(){this.backgroundShape=new F.Rect({name:"background",style:{width:0,height:0}}),this.decorationGroup=new F.Group({name:"decoration-group"}),this.textShape=new F.Text({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},Sb.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&We(n)&&"clip"===e&&(this.clipRect=new F.Rect({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},Sb.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;We(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},Sb.prototype.adjustVerticalAlign=function(){var t=this.verticalAlign,e=this.textHeight,n=0,n="top"===t?e/2:"middle"===t?this.height/2:this.height-e/2;this.textShape.attr({y:n})},Sb.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},Sb.defaultOptions={type:Sb.tag="paragraph",style:{text:"",fontColor:"#000",fontFamily:"sans-serif",fontSize:12,fontWeight:"normal",fontVariant:"normal",letterSpacing:0,leading:0,fontStyle:"normal",decoration:{type:"none",style:{}},overflow:"none",backgroundStyle:{},transform:"none",tooltip:!1,tooltipWait:300}};var Eb,Pa=v(v({},Wg),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),Ab={default:{width:12,height:12,radius:2,stroke:"#dadada",lineWidth:1,fill:"#ffffff",cursor:"pointer"},selected:{width:12,height:12,radius:2,stroke:"#3471F9",lineWidth:1,fill:"#3471F9",cursor:"pointer"}},Tb={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function Pb(t){return Eb.call(this,on({},Pb.defaultOptions,t))||this}ne(Pb,Eb=a),Pb.prototype.render=function(t,e){var n=t.label,r=t.boxStyle,i=t.checkedStyle,a=t.checked,t=t.spacing,a=(this.checked=!!a,Jg(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=Ke({},this.checked?Ab.selected:Ab.default,r),r=Ke({},Tb,i),t=(this.checkboxBoxShape=Jg(a,".checkbox-box","rect").attr("className","checkbox-box").style("zIndex",(a.style.zIndex||0)-1).call(_,e).node(),Jg(this.checkboxBoxShape,".checkbox-checked","path").attr("className","checkbox-box-checked").style("stroke","#ffffff").call(_,r),i=this.checkboxBoxShape,e=Number(t),{x:(r=i.getLocalBounds()).halfExtents[0]?r.max[0]+(e||0):i.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:i.style.y}),e=t.x,r=t.y;Jg(a,".checkbox-label","text").attr("className","checkbox-label").style("x",e).style("y",r).call(_,n)},Pb.defaultOptions={type:Pb.tag="checkbox",style:{x:0,y:0,label:v({text:""},Pa),spacing:4,checked:!1}};var Nb="gui-poptip",Lb="gui-poptip-arrow",Cb="gui-poptip-text",jb=((i={})[".".concat(Nb)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},i[".".concat(Cb)]={"text-align":"center"},i[".".concat(Nb,"[data-position='top']")]={transform:"translate(-50%, -100%)"},i[".".concat(Nb,"[data-position='left']")]={transform:"translate(-100%, -50%)"},i[".".concat(Nb,"[data-position='right']")]={transform:"translate(0, -50%)"},i[".".concat(Nb,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},i[".".concat(Nb,"[data-position='top-left']")]={transform:"translate(0,-100%)"},i[".".concat(Nb,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},i[".".concat(Nb,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},i[".".concat(Nb,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},i[".".concat(Nb,"[data-position='right-top']")]={transform:"translate(0, 0)"},i[".".concat(Nb,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},i[".".concat(Nb,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},i[".".concat(Nb,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},i[".".concat(Lb)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},i[".".concat(Nb,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},i["[data-position='top'] .".concat(Lb)]={bottom:"-2px"},i[".".concat(Nb,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},i["[data-position='left'] .".concat(Lb)]={right:"-2px"},i[".".concat(Nb,"[data-position='right']")]={transform:"translate(5px, -50%)"},i["[data-position='right'] .".concat(Lb)]={left:"-2px"},i[".".concat(Nb,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},i["[data-position='bottom'] .".concat(Lb)]={top:"-2px"},i[".".concat(Nb,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},i["[data-position='top-left'] .".concat(Lb)]={left:"10px",bottom:"-2px"},i[".".concat(Nb,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},i["[data-position='top-right'] .".concat(Lb)]={right:"10px",bottom:"-2px"},i[".".concat(Nb,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},i["[data-position='left-top'] .".concat(Lb)]={right:"-2px",top:"8px"},i[".".concat(Nb,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},i["[data-position='left-bottom'] .".concat(Lb)]={right:"-2px",bottom:"8px"},i[".".concat(Nb,"[data-position='right-top']")]={transform:"translate(5px, 0)"},i["[data-position='right-top'] .".concat(Lb)]={left:"-2px",top:"8px"},i[".".concat(Nb,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},i["[data-position='right-bottom'] .".concat(Lb)]={left:"-2px",bottom:"8px"},i[".".concat(Nb,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},i["[data-position='bottom-left'] .".concat(Lb)]={top:"-2px",left:"8px"},i[".".concat(Nb,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},i["[data-position='bottom-right'] .".concat(Lb)]={top:"-2px",right:"8px"},i),Fb=void 0;var Ib;function Rb(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function Bb(t){var n,r;return n=Rb,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(Fb,t)}(t)}function Db(t){t=Ib.call(this,on({style:{id:"gui-poptip"}},Db.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}ne(Db,Ib=a),Object.defineProperty(Db.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),Db.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},Db.prototype.update=function(t){this.attr(on({},this.style,t)),this.render(this.attributes,this)},Db.prototype.bind=function(s,l){var c,t,e,u=this;s&&(c=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=c,i=(l&&(o=(i="function"==typeof l?l.call(null,t):l).html,a=i.target,i=Z(i,["html","target"]),n=Ke({},u.style,i),!a&&!1!==a||(e=a),"string"==typeof o)&&(r=o),n.position),a=n.arrowPointAtCenter,o=n.follow,n=n.offset;e?(e=(t=x(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,e,i,a,o),2))[0],a=t[1],u.showTip(e,a,{text:r,position:i,offset:n})):u.hideTip()}),s.addEventListener("mouseleave",e),this.map.set(s,[t,e]))},Db.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=x(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},Db.prototype.clear=function(){this.container.innerHTML=""},Db.prototype.destroy=function(){var t,e=this;w([],x(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},Db.prototype.showTip=function(t,e,n){var r,i=en(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(Cb)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},Db.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},Db.prototype.getContainer=function(){return this.container},Db.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(Nb).concat(t?" ".concat(t):"")},Db.prototype.initShape=function(){var t=this,e=this.style.id;this.container=Bb(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},Db.prototype.updatePoptipElement=function(){var t=this.container,e=(this.clear(),this.style),n=e.id,r=e.template,e=e.text,n=(this.container.setAttribute("id",n),this.container.setAttribute("class",this.getClassName()),'<span class="'.concat(Lb,'"></span>'));t.innerHTML=n,ze(r)?t.innerHTML+=r:r&&Ue(r)&&t.appendChild(r),e&&(t.getElementsByClassName(Cb)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},Db.prototype.applyStyles=function(){var t,e=ry({},jb,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=x(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=x(e,2),n=e[0],e=e[1];return"".concat(t).concat(n,": ").concat(e,";")},"");return"".concat(t).concat(n,"{").concat(e,"}")},"");this.domStyles!==e&&(this.domStyles=e,(t=this.container.querySelector("style"))&&this.container.removeChild(t),(t=document.createElement("style")).innerHTML=e,this.container.appendChild(t))},Db.prototype.setOffsetPosition=function(t,e,n){var n=x(n=void 0===n?this.style.offset:n,2),r=n[0],n=n[1],n=void 0===n?0:n;this.container.style.left="".concat(t+(void 0===r?0:r),"px"),this.container.style.top="".concat(e+n,"px")},Db.tag="poptip",Db.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:jb,template:'<div class="'.concat(Cb,'"></div>')}};function zb(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return f1()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e).concat([[0,0]]);const c=[n[0]-a,n[1]-o],[u,f]=s;return l=c,t=u,i=f,e=j1(l,t),t=j1(t,i),i=j1(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),f1()(s)}const Gb=eg(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=Z(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),f=J(e,"background"),h=f["padding"],f=Z(f,["padding"]),d=J(e,"connector"),{points:p=[]}=d,d=Z(d,["points"]),i=[[+i,+a],[+n,+r]],a=Q(t).maybeAppend("text","text").call(R,e).node(),n=zb(Q(t).maybeAppend("background","rect").style("zIndex",-1).call(R,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(a,h)).call(R,o?f:{}).node(),i,p,u),r=l&&new Cy({id:"startMarker",style:Object.assign({x:0,y:0},J(e,"startMarker"))}),a=c&&new Cy({id:"endMarker",style:Object.assign({x:0,y:0},J(e,"endMarker"))});Q(t).maybeAppend("connector","path").style("path",n).style("markerStart",r).style("markerEnd",a).call(R,s?d:{})}),Wb=t=>{const l=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Y1(r,i,a,o),{color:i,text:a="",fontSize:o,rotate:e=0,transform:s=""}=e,a={text:String(a),stroke:i,fill:i,fontSize:o},[[i,o]]=t;return Q(new Gb).style("x",i).style("y",o).call(R,r).style("transform",s+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(R,a).call(R,l).node()}};Wb.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Hb=eg(t=>{var e=Z(t.attributes,["class","x","y"]);const n=J(e,"marker"),{size:s=24}=n,r=()=>{var t=s/2,e=t/Math.sqrt(2),n=t*Math.sqrt(2),[r,i]=[-e,e-n],[a,o]=[0,0],[e,n]=[e,e-n];return[["M",r,i],["A",t,t,0,1,1,e,n],["L",a,o],["Z"]]};var[i,a]=function(t){var{min:t,max:e}=t.getLocalBounds();return[.5*(t[0]+e[0]),.5*(t[1]+e[1])]}(Q(t).maybeAppend("marker",()=>new Cy({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());Q(t).maybeAppend("text","text").style("x",i).style("y",a).call(R,e)}),Vb=t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Y1(r,i,a,o),{color:i,text:a=""}=e,o={text:String(a),stroke:i,fill:i},[[e,a]]=t;return Q(new Hb).call(R,r).style("x",e).style("y",a).call(R,o).call(R,s).node()}},qb=(Vb.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},eg(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;Q(t).maybeAppend("connect-path",()=>new F.Path({})).style("d",n).call(R,i),Q(t).maybeAppend("area-path",()=>new F.Path({})).style("d",e).call(R,r)}));const Yb=t=>{const{curve:u,gradient:l=!1,defined:f=t=>!Number.isNaN(t)&&null!=t,connectNulls:h=!1}=t,d=Z(t,["curve","gradient","defined","connectNulls"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=Y1(n,r,i,a),r=n["fill"],i=Z(n,["fill"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=X1(c,e),n=l&&n?H1(n,r,o,l):a;const s=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:n,fill:n}),e&&{transform:e}),d);var[r,o]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,f=e[t],h=e[t+l];[...f,...h].some(t=>!n(t))?o=!0:(r.push(f),i.push(h),o&&s&&(o=!1,[c,u]=s,a.push([c,f,u,h])),s=[f,h])}return[r.concat(i),a]}(t,f),a=J(s,"connect"),i=!!o.length,n=t=>Q(new F.Path({})).style("d",t).call(R,s).node();return vu(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=h1().curve(d1),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return y1(a())},delete t.lineX0,t.lineEndAngle=function(){return y1(o())},delete t.lineX1,t.lineInnerRadius=function(){return y1(s())},delete t.lineY0,t.lineOuterRadius=function(){return y1(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(g1(t)):e()._curve},t.angle((t,e)=>I1(C1(r[e],n))).outerRadius((t,e)=>j1(r[e],n)).innerRadius((t,e)=>j1(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(f)).curve(u)(i);var e,a,o,s,l},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):Q(new qb).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node()):(e=t=>{const n=t.slice(0,t.length/2),r=t.slice(t.length/2);return h1().x((t,e)=>n[e][0]).y1((t,e)=>n[e][1]).y0((t,e)=>r[e][1]).defined((t,e)=>[...n[e],...r[e]].every(f)).curve(u)(n)},!i||h&&!Object.keys(a).length?n(e(r)):i&&!h?n(e(t)):Q(new qb).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},Ub=(Yb.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=vu(n)?E1:l1;return Yb(Object.assign({curve:i},a))(t,e,n,r)}),Xb=(Ub.props=Object.assign({},Yb.props),t=>{const{alpha:a=.5}=t,o=Z(t,["alpha"]);return(t,e,n,r)=>{var i=vu(n)?_1:M1;return Yb(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),Kb=(Xb.props=Object.assign({},Yb.props),i=>(t,e,n,r)=>Yb(Object.assign({curve:T1},i))(t,e,n,r)),$b=(Kb.props=Object.assign({},Yb.props),t=>{const l=t["arrowSize"],c=Z(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=Y1(r,a,o,s),a=r["stroke"],o=Z(r,["stroke"]),{color:s=a,transform:r}=e,[e,a]=t,t=D0();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=G1(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),Q(new F.Path).call(R,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(R,c).node()}}),Zb=($b.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Y1(r,i,a,o),i=r["stroke"],a=Z(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=D0();return t.moveTo(e[0],e[1]),t.bezierCurveTo(e[0]/2+i[0]/2,e[1],e[0]/2+i[0]/2,i[1],i[0],i[1]),Q(new F.Path).call(R,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(R,s).node()}});Zb.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Jb=t=>{const{cornerRatio:u=1/3}=t,f=Z(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=Y1(r,o,s,l),o=r["stroke"],s=Z(r,["stroke"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=D0(),vu(o)?(i=j1(t,c=o.getCenter()),i=(j1(e,c)-i)*n+i,a.moveTo(t[0],t[1]),W1(a,t,e,c,i)):mu(o)?(a.moveTo(t[0],t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,t[1]),a.lineTo(t[0]+(e[0]-t[0])*n,e[1])):(a.moveTo(t[0],t[1]),a.lineTo(t[0],t[1]+(e[1]-t[1])*n),a.lineTo(e[0],t[1]+(e[1]-t[1])*n)),a.lineTo(e[0],e[1]),a);return Q(new F.Path).call(R,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(R,f).node()}},Qb=(Jb.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Y1(r,i,a,o),i=r["stroke"],a=Z(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=D0();return t.moveTo(e[0],e[1]),vu(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):W1(t,e,i,B1(e,i),j1(e,i)/2),Q(new F.Path).call(R,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(R,s).node()}}),t2=(Qb.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Y1(r,i,a,o),i=r["stroke"],a=Z(r,["stroke"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return Q(new F.Image).call(R,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(R,u).node()}});t2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const e2=t=>{const l=Z(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=Y1(r,e,i,a),{fill:e,stroke:i}=r,a=Z(r,["fill","stroke"]),r=function(i,t){const a=D0();if(vu(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>j1(t,o));return t.forEach((t,e)=>{var n,r;0===e?a.moveTo(t[0],t[1]):(n=s[e],r=i[e-1],void 0!==(e=s[e-1])&&Math.abs(n-e)<1e-10?W1(a,r,t,o,n):a.lineTo(t[0],t[1]))}),a.closePath(),a}return n=a,i.forEach((t,e)=>0===e?n.moveTo(t[0],t[1]):n.lineTo(t[0],t[1])),n.closePath(),n;var n}(t,n);return Q(new F.Path).call(R,a).style("d",r.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(R,l).node()}};e2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const n2=t=>{const l=Z(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=Y1(r,e,i,a),{fill:e,stroke:i}=r,a=Z(r,["fill","stroke"]),r=function(t,e){var n,[t,r,i,a]=t,o=D0();return vu(e)?(n=j1(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),W1(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),W1(o,r,t,e,n),o.closePath()):(o.moveTo(t[0],t[1]),o.bezierCurveTo(t[0]/2+i[0]/2,t[1],t[0]/2+i[0]/2,i[1],i[0],i[1]),o.lineTo(a[0],a[1]),o.bezierCurveTo(a[0]/2+r[0]/2,a[1],a[0]/2+r[0]/2,r[1],r[0],r[1]),o.lineTo(t[0],t[1]),o.closePath()),o}(t,n);return Q(new F.Path).call(R,a).style("d",r.toString()).style("fill",o||e).style("stroke",o||i).style("transform",s).call(R,l).node()}};n2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const r2=t=>{const y=Z(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:f,defaultShape:h,color:d,transform:p}=e,r=Y1(r,e,f,h),{fill:e,stroke:f}=r,h=Z(r,["fill","stroke"]),g=(r=t,t=n,n=D0(),vu(t)?([i,a]=t=t.getCenter(),o=F1(C1(r[0],t)),s=F1(C1(r[1],t)),g=j1(t,r[2]),l=j1(t,r[3]),c=j1(t,r[8]),u=j1(t,r[10]),t=j1(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,g,o,s),n.arc(i,a,g,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return Q(new F.Path).call(R,h).style("d",g.toString()).style("stroke",f).style("fill",d||e).style("transform",p).call(R,y).node()}};r2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const i2=t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Y1(r,i,a,o),{stroke:i,lineWidth:a}=r,o=Z(r,["stroke","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,vu(t=n)?(t=t.getCenter(),a1()({startAngle:0,endAngle:2*Math.PI,outerRadius:j1(a[0],t),innerRadius:j1(a[1],t)})):f1().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,vu(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return Q(new F.Path({})).call(R,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(R,s).node()}};function a2(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}i2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const o2=eg(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=Z(e,["points","class","endMarker","direction"]),i=J(e,"endMarker"),n=(n=n,f1().x(t=>t[0]).y(t=>t[1])(n));Q(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new Cy({className:"marker",style:Object.assign(Object.assign({},i),{symbol:a2})}):null).call(R,e)});const s2=t=>{const{offset:s=0,connectLength1:l}=t,c=Z(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Y1(r,i,a,o),{fill:i,stroke:a=i,connectLength1:o=l}=r,i=Z(r,["fill","stroke","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(mu(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,o);return Q(new o2).call(R,i).style("points",n).style("stroke",r||a).style("transform",e).call(R,c).node()}};function l2(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=hf(a.x,c),i=hf(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function c2(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:f}=q1(e,i,[t,n]),h="inside"===r?(u+f)/2:f;e=f2(h,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?u2(s,h,n):B1(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function u2(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function f2(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function h2(r,t,e,n){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,connector:l=!0,connectorLength2:c=0,connectorDistance:u=0,radius:f=.5,offset:h=0}=e,d=q1(n,t,[i,a]);var{startAngle:e,endAngle:t}=d;const p=n.getCenter(),g=(e+t)/2;var[e,t]=(()=>{var t="inside"===r?f:1,{innerRadius:e,outerRadius:n}=d,n=e+(n-e)*t;return[n,n+h]})();const y=0<Math.sin(g)?1:-1;var[e,t,...m]=((t,e)=>{var[t,n]=u2(p,g,t),[e,r]=u2(p,g,e),i=l?y*c:0;return[[t,n],[e+i,r],[-i,0]]})(e,t),m={connector:l,connectorPoints:m,dx:l?+u*y:0},v=(t,e="x",n="y")=>({[e]:t[0],[n]:t[1]});return Object.assign(Object.assign(Object.assign(Object.assign({},v(e,"x0","y0")),v(t)),(e=r,v=0<y||bu(n),t=f2(g,o,s),"inside"===e?{textAlign:"center",textBaseline:"middle",rotate:t}:{textAlign:v?"start":"end",textBaseline:"middle",rotate:t})),m)}function d2(t,e,n,r){var i=n["bounds"];return 1===i.length?([i]=i=(i=n).bounds,{x:i[0],y:i[1]}):(bu(r)?c2:Mu(r)?h2:l2)(t,e,n,r)}s2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var p2=Object.freeze({__proto__:null,top:d2,bottom:d2,right:d2,left:d2,topLeft:d2,topRight:d2,bottomLeft:d2,bottomRight:d2,inside:d2,outside:d2,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=su(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=F1(C1(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l}deg)`,textAlign:"center",textBaseline:"middle"}}});function g2(t,e,n,r){var i=e["position"],i=(a=n,void 0!==(i=i)?i:Mu(a)?"inside":mu(a)?"right":"top"),a=r["inside"===i?"innerLabel":"label"],r=Object.assign({},a,e),e=p2[i.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},a),e(i,t,r,n));throw new Error("Unknown position: "+i)}const y2=t=>(t,e,n,r)=>{var i=e["text"],a=Z(e,["text","x","y"]),t=g2(t,e,n,r),{rotate:e=0,transform:r=""}=t,t=Z(t,["rotate","transform"]);return Q(new Gb).call(R,t).style("text",""+i).style("transform",r+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(R,a).node()},m2=(y2.props={},t=>{const s=t["colorAttribute"],l=Z(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Z(Y1(r,i,a,o),["stroke"]),{d:i,color:a}=e;return Q(new F.Path).call(R,r).style("d",i).style(s,a).call(R,l).node()}}),v2=(m2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>m2(Object.assign({colorAttribute:"fill"},t))),b2=(v2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>m2(Object.assign({fill:"none",colorAttribute:"stroke"},t))),x2=(b2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=Z(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),f=(x2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),w2=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:f.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"transparent",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#aaa"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:f.BLACK,connectFillOpacity:.1}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:f.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:f.STROKE,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:f.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:f.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:f.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:f.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:f.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:f.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:f.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:f.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:f.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:f.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,tickStroke:f.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:f.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:f.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0]},legend:{padding:8,showTitle:!1,titleFill:f.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:f.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:f.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:f.BLACK,navButtonFillOpacity:.45,navPageNumFill:f.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:f.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:f.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:f.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:f.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:f.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:f.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:f.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railHeight:16,railFill:f.STROKE,railFillOpacity:.05,railForegroundFill:e,railForegroundFillOpacity:.15,handleHeight:24,handleWidth:10,handleFill:"#f7f7f7",handleFillOpacity:1,handleStroke:f.BLACK,handleStrokeOpacity:.25,handleLineWidth:1,handleRadius:2,textFill:f.BLACK,textFillOpacity:.45,textFontSize:12,textFontWeight:"normal"},scrollbar:{},title:{fill:f.BLACK,fillOpacity:.85,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:f.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)},k2=(w2.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),M2="#416180",O2=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:k2.BLACK,enter:{duration:300,fill:"both",delay:0},update:{duration:300,fill:"both",delay:0},exit:{duration:300,fill:"both",delay:0},viewFill:"#141414",plotFill:"transparent",mainFill:"transparent",contentFill:"transparent",line:{line:{fill:"",strokeOpacity:1,lineWidth:1,connectStroke:"#666"}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,fill:"",strokeOpacity:.95,lineWidth:1},plus:{r:3,fill:"",strokeOpacity:.95,lineWidth:3},diamond:{r:3,fill:"",strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:k2.BLACK,connectFillOpacity:.1}},polygon:{polygon:{fillOpacity:.95}},cell:{cell:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},rect:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},link:{link:{fill:"",strokeOpacity:1}},vector:{vector:{fillOpacity:1}},box:{box:{fillOpacity:.95,stroke:"#1D2129",lineWidth:1}},text:{text:{fill:k2.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:M2,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:M2,backgroundFillOpacity:.15,backgroundPadding:[2,4],startMarkerSymbol:"circle",startMarkerSize:4,endMarkerSymbol:"circle",endMarkerSize:4},badge:{fill:"#1D2129",fillOpacity:.65,strokeWidth:0,fontSize:10,textAlign:"center",textBaseline:"middle",markerFill:M2,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:M2,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:M2,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:M2,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:M2,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:M2,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:M2,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:k2.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:k2.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:k2.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,tickStroke:k2.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:k2.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:k2.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0]},legend:{padding:8,showTitle:!1,titleFill:k2.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:k2.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:k2.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:k2.BLACK,navButtonFillOpacity:.45,navPageNumFill:k2.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:k2.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:k2.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:k2.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:k2.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:k2.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:k2.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:k2.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railHeight:16,railFill:M2,railFillOpacity:.05,railForegroundFill:e,railForegroundFillOpacity:.15,handleHeight:24,handleWidth:10,handleFill:"#f7f7f7",handleFillOpacity:1,handleStroke:k2.BLACK,handleStrokeOpacity:.25,handleLineWidth:1,handleRadius:2,textFill:k2.BLACK,textFillOpacity:.45,textFontSize:12,textFontWeight:"normal"},scrollbar:{},title:{fill:k2.BLACK,fillOpacity:.85,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:k2.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)};function _2(t,e){var n;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(n=t.slice(0,e)).length?n[0]+n.slice(2):n,+t.slice(e+1)]}O2.props={};var S2,E2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function A2(t){var e;if(e=E2.exec(t))return new T2({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function T2(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function P2(t,e){var n,e=_2(t,e);return e?(n=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+n:n.length>e+1?n.slice(0,e+1)+"."+n.slice(e+1):n+new Array(e-n.length+2).join("0")):t+""}A2.prototype=T2.prototype,T2.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var N2={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>P2(100*t,e),r:P2,s:function(t,e){var n,r,i=_2(t,e);return i?(n=i[0],(i=(i=i[1])-(S2=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(r=n.length)?n:r<i?n+new Array(i-r+1).join("0"):0<i?n.slice(0,i)+"."+n.slice(i):"0."+new Array(1-i).join("0")+_2(t,Math.max(0,e+i-1))[0]):t+""},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function L2(t){return t}var C2,j2,F2=Array.prototype.map,I2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function R2(t){var e,s,l,k=void 0===t.grouping||void 0===t.thousands?L2:(s=F2.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",M=void 0===t.decimal?".":t.decimal+"",O=void 0===t.numerals?L2:(e=F2.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",_=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var c=(t=A2(t)).fill,u=t.align,f=t.sign,e=t.symbol,h=t.zero,d=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):N2[m]||(void 0===g&&(g=12),y=!0,m="g"),(h||"0"===c&&"="===u)&&(h=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?a:"",x=N2[m],w=/[defgprs%]/.test(m);function n(t){var e,n,r,i=v,a=b;if("c"===m)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),g),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(e+1):t}(t)),i=((o=o&&0==+t&&"+"!==f?!1:o)?"("===f?f:_:"-"===f||"("===f?"":f)+i,a=("s"===m?I2[8+S2/3]:"")+a+(o&&"("===f?")":""),w)for(e=-1,n=t.length;++e<n;)if((r=t.charCodeAt(e))<48||57<r){a=(46===r?M+t.slice(e+1):t.slice(e))+a,t=t.slice(0,e);break}}p&&!h&&(t=k(t,1/0));var s=i.length+t.length+a.length,l=s<d?new Array(d-s+1).join(c):"";switch(p&&h&&(t=k(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return O(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),n.toString=function(){return t+""},n}return{format:o,formatPrefix:function(t,e){var n=o(((t=A2(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=_2(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=I2[8+e/3];return function(t){return n(r*t)+i}}}}function B2(t,e,n){return t.querySelector(e)?Q(t).select(e):Q(t).append(n)}function D2(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function z2(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function G2(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=zc(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,f=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new Kp({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),h=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return ku(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new Kp({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new Kp({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return vu(s)||mu(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=f(a.map(t)+i);return{value:mu(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:u(t,e,n),id:String(e)}}),bu(s)&&"arcY"===o?i.map(t=>{var e=t["value"],t=Z(t,["value"]);return Object.assign({value:1-e},t)}):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:h(f(a.map(t)+r)),label:""+u("number"!=typeof(r=t)||Math.abs(r)<1e-15?r:parseFloat(r.toFixed(15)),e,n),id:String(e)}})}function W2(t,e,n){var r;return!(vu(r=e)&&mu(r)||wu(e))&&(void 0===t?!!n.getTicks:t)}function H2(t,e,n,r,i){var a=function(t,e){var[e,n]=z2(e);return"bottom"===t||"top"===t?n:e}(t,r),[,r]=r.getCenter(),{x:o,y:s,width:l,height:c}=n,a={type:"linear",lineArrow:null,titleTransform:void 0,titleTransformOrigin:"center",labelAlign:"horizontal",gridLength:a};return"bottom"===t?Object.assign(Object.assign({},a),{startPos:[o,s],endPos:[o+l,s],titlePosition:i.getTicks?"right-bottom":"bottom",titleTransform:i.getTicks?"translate(-100%, 0)":void 0,titleSpacing:10,titleTextBaseline:"bottom",labelSpacing:12,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative"}):"left"===t||"centerHorizontal"===t?Object.assign(Object.assign({},a),{startPos:[o+l,s],endPos:[o+l,s+c],titleSpacing:10,titleTextBaseline:"middle",titlePosition:"left",titleTransform:"translate(50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"positive",tickDirection:"positive",gridDirection:"negative",showLine:"centerHorizontal"===t||void 0}):"right"===t?Object.assign(Object.assign({},a),{endPos:[o,s+c],startPos:[o,s],titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",labelSpacing:4,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive"}):"arcY"===t?Object.assign(Object.assign({},a),{startPos:[o,s],endPos:[o+l,s+c],titlePosition:"top",titleSpacing:0,titleTextBaseline:"bottom",labelDirection:"right"===e?"negative":"positive",labelTransform:"center"===e?"translate(50%, 0)":"",tickDirection:"right"===e?"negative":"positive",labelSpacing:"center"===e?0:4,gridDirection:"negative",gridConnect:"arc",gridType:"surround",gridCenter:[n.x,r+n.y],gridControlAngles:[90,180,360],girdClosed:!0}):Object.assign(Object.assign({},a),{startPos:[o,s+c],endPos:[o+l,s+c],titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive",showLine:"centerVertical"===t||void 0})}Ca=R2({thousands:",",grouping:[3],currency:["$",""]}),C2=Ca.format,Ca.formatPrefix;const V2=t=>{const{position:c,labelFormatter:u=t=>""+t,tickFilter:f,tickCount:h,tickMethod:d,title:p,grid:g=!1}=t,y=Z(t,["order","size","position","labelFormatter","tickFilter","tickCount","tickMethod","title","grid"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,{x:i,y:a,width:o,height:s}=i,i=[i+o/2,a+s/2],a=G2(t,e,h,u,f,d,c,n),t=Math.min(o,s)/2,[e,o]=function(t){var[,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[180*+t/Math.PI,180*+e/Math.PI]}(n),[s,l]=function(t){var[,,,t,e]=(t=t.getOptions()["transformations"]).find(t=>"polar"===t[0]);return[+t,+e]}(n),s=function(t,e,n,r){var[i,a]=z2(r),n={titleFillOpacity:0,titlePosition:"inner",showLine:!1,showTick:!0,gridLength:(n-e)*(Math.min(i,a)/2)};return"arcInner"===t?(z2(r),Object.assign(Object.assign({},n),{labelAlign:"perpendicular",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",gridDirection:"negative"})):Object.assign(Object.assign({},n),{labelAlign:"parallel",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",gridDirection:"positive"})}(c,s,l,n),l=r["axis"];return new dv({style:I({},l,s,Object.assign({type:"arc",center:i,radius:t,angleRange:[e,o],data:a,title:D2(p),showGrid:g},y))})}},q2=t=>{const{position:i,labelFormatter:e=t=>""+t}=t;var n="string"==typeof e?C2(e):e;const a=Object.assign(Object.assign({},t),{labelFormatter:n});return(t,e,n,r)=>("arc"===i||"arcInner"===i?V2:s=>{const{position:l,title:c,labelFormatter:u=t=>""+t,direction:f="left",tickCount:h,tickFilter:d,tickMethod:p,labelAutoHide:g=!1,labelAutoRotate:y=!0,grid:m}=s,v=Z(s,["order","size","transform","position","title","labelFormatter","direction","tickCount","tickFilter","tickMethod","labelAutoHide","labelAutoRotate","grid"]);return(t,e,n,r)=>{var{domain:e,bbox:i}=e,r=r["axis"],e=G2(t,e,h,u,d,p,l,n),a=W2(m,n,t),i=H2(l,f,i,n,t),{showLabel:n=void 0===s.label||s.label,showTick:t=void 0===s.tick||s.tick,showLine:o=void 0!==s.line&&s.line}=i,i=Z(i,["showLabel","showTick","showLine"]),i=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},i),{data:e,title:D2(c),showLabel:n,labelTransforms:(i=g,e=y,n=[],i&&n.push({type:"hide"}),e&&n.push({type:"rotate",optionalAngles:[0,30,45,60,90]}),n),showGrid:a,showTick:t}),v),{showLine:!0}),o?null:{lineOpacity:0});return new dv({style:Object.assign({},r,i)})}})(a)(t,e,n,r)},Y2=(q2.props={defaultPosition:"left",defaultSize:45,defaultOrder:0},t=>q2(t)),U2=(Y2.props=Object.assign(Object.assign({},q2.props),{defaultPosition:"bottom"}),t=>q2(t));U2.props=Object.assign(Object.assign({},q2.props),{defaultPosition:"left"});const X2=t=>{const{position:u,labelFormatter:f=t=>""+t,dx:h=0,dy:d=0,title:p,gridCol:g,gridRow:y}=t,m=Z(t,["order","size","position","labelFormatter","dx","dy","title","gridCol","gridRow"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a,width:o,height:s}=i,t=t.map(t=>({id:t,label:f(t),value:"",color:e.map(t)})),[l,c]=function(t,e,n){var[r,i]=[e||100,n||100];return{top:[1,i],bottom:[1,i],left:[r,1],right:[r,1],arcCenter:[r,1]}[t]||[e,n]}(u,y,g),t={data:t,x:i+h,y:a+d,orient:["right","left","arcCenter"].includes(u)?"vertical":"horizontal",width:o,height:s,gridCol:c,gridRow:l,rowPadding:0,colPadding:8,titleText:D2(p),itemMarkerFill:t=>t?t.color:"#fff"},{legend:i={}}=r;return new jv({style:Object.assign({},i,t,m)})}},K2=(X2.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},t=>{const l=t["title"],c=Z(t,["title"]);return(e,t,n,r)=>{var{domain:t,bbox:i}=t,{x:i,y:a}=i,[o,s]=t,{continuousLegend:r={}}=r;return new eb({style:Object.assign({},r,{x:i,y:a,width:400,height:300,data:[{value:o},{value:s}],titleText:D2(l),titleFontSize:12,ribbonLen:120,ribbonSize:12,ribbonColor:t.map(t=>e.map(t)),showHandle:!1,showIndicator:!1,labelAlign:"value"},c)})}}),$2=(K2.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},j2={render(t,e){const{text:n,style:r,subtitle:i,subtitleStyle:a}=t;t=B2(e,".title","text").attr("className","title").style("fontSize",14).style("textBaseline","top").style("text",n).call(R,r||{}).node().getLocalBounds();B2(e,".sub-title","text").attr("className","sub-title").style("y",t.max[1]+((null===a||void 0===a?void 0:a.spacing)||0)).style("fontSize",12).style("textBaseline","top").call(t=>{if(!i)return t.node().remove();t.node().attr(Object.assign({text:i},a))})}},class extends F.CustomElement{constructor(t){super(t),this.descriptor=j2}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(I({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}}),Z2=t=>{const{text:a,style:o,subtitle:s,subtitleStyle:l}=t;return(t,e,n,r)=>{var{x:e,y:i}=e.bbox;return new $2({style:I({},{style:r.title,subtitleStyle:r.subtitle},{x:e,y:i,style:o,text:a,subtitle:s,subtitleStyle:l})})}};Z2.props={defaultPosition:"top",defaultOrder:2,defaultSize:30};class J2{constructor(t){this.$value=t}static of(t){return new J2(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function Q2(t,e,n){return J2.of({}).call(tx,t).call(tx,e).call(tx,n).value()}function tx(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function ex(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const nx=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],rx=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=mu(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,Q2(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},ix=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=mu(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,Q2(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},ax=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=mu(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,Q2(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},ox=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:l,opacity:c}=a.style,[r,t]=mu(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,Q2(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},sx=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],Q2(i,n,l))},lx=(sx.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a,strokeOpacity:o,opacity:s}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],Q2(i,n,l))});function cx(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function ux(t,e){var[n,r,i,t]=cx(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),f=i/u;for(let t=0;t<u;t++){var h=n+t*f,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
|
|
2
2
|
M ${t} ${e}
|
|
3
3
|
L ${t+n} ${e}
|
|
4
4
|
L ${t+n} ${e+r}
|
|
5
5
|
L ${t} ${e+r}
|
|
6
6
|
Z
|
|
7
|
-
`}([h,d,f,s]))}c-=u,l+=1}return o}function Rx(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function Bx(t,e,n,r){var i,a,o,s,l,c,u,f,h,d=e["nodeName"],p=n["nodeName"],y=F.convertToPath(e),g=F.convertToPath(n);return d===p&&"path"!==d||(void 0===y||void 0===g)?(a=n,p=r,[d,h,o,l]=Fx(i=e),[u,f,s,c]=Fx(a),u-=d,d=f-h,f=s/o,h=c/l,s=[Object.assign({transform:"translate(0, 0) scale(1, 1)"},Ex(i,Ax)),Object.assign({transform:`translate(${u}, ${d}) scale(${f}, ${h})`},Ex(a,Ax))],(o=i.animate(s,p)).finished.then(()=>Rx(a,i)),o):(c=y,d="path"===(u=(l=t)["nodeName"])?l:(Rx(u=new F.Path({style:Object.assign(Object.assign({},Ex(l,Ax)),{d:c})}),l),u),f=[Object.assign({path:y},Ex(e,Ax)),Object.assign({path:g},Ex(n,Ax))],h=d.animate(f,r),d.style.transform="scale(1, 1)",d.style.transform="none",h)}jx.props={};const Dx=y=>(t,e,n,r,i)=>{[a="pack"]=[y.split];var a="function"==typeof a?a:Ix,i=_x(i,n,y),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,Bx(s,s,c,i);if(1===n&&1<o){var[s]=t;{var l=s,c=e,u=i,s=a;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return Bx(t,new F.Path({style:Object.assign({path:d[e]},Ex(l,Ax))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,f=n,h=i;const p=(e=a)(f,o.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=f.style,e=f.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],h);return[...o.map((t,e)=>{return Bx(t,t,new F.Path({style:{path:p[e],fill:f.style.fill}}),h)}),e]}}return null},zx=(Dx.props={},b=>{return F.CSS.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:F.PropertySyntax.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!bu(r))return Px(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:s=0,inset:l=0,fillOpacity:c,strokeOpacity:u,opacity:f}=e,{points:e,y:t,y1:h}=(K(e,["radius","inset","fillOpacity","strokeOpacity","opacity"]),t);const d=o1().cornerRadius(s).padAngle(l*Math.PI/180),p=Y1(r,e,[t,h]),{startAngle:y,endAngle:g}=p,m=new F.Path({}),v=t=>{m.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=F.convertToPath(m);return m.style.transform="none",t};s=[{waveInArcAngle:y+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:y+1e-4,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.01},{waveInArcAngle:g,fillOpacity:c,strokeOpacity:u,opacity:f}],l=a.animate(s,_x(i,n,b));return l.onframe=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},l.onfinish=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:g}))},l}}),Wx=(zx.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,_x(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),Hx=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,_x(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},Vx=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],_x(i,n,o))},Gx=(Vx.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new F.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=Px(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),qx=(Gx.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new F.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=Tx(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o});function Yx(t){return Q(t).selectAll("."+et).nodes()}function Ux(t){return Q(t).select("."+nt).node()}function Xx(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getBounds();return e<t||i<e||(n<r||a<n)?null:[e-t,n-r]}function $x(t){return t&&0!==Object.keys(t).length?t:{highlightedLineWidth:1,highlightedStroke:"#000"}}function Zx(){return t=>t.__data__.color}function Kx(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function Jx(t){t=Array.from(t.markState.keys());const n=new Map(t.map(t=>[t.key,t.data]));return t=>{var{index:t,markKey:e}=t.__data__;return n.get(e)[t]}}function Qx(o,s=(t,e)=>t){const l="__states__",c="__ordinal__",i=t=>{var{[l]:e=[],[c]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),J(o,e)),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){var a=t.getAttribute(r),i=s(i,t);t.setAttribute(r,i),r in n||(n[r]=a)}t[c]=n}},a=t=>{t[l]||(t[l]=[])};return{setState:(t,...e)=>{a(t),t[l]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[l].indexOf(r);-1!==r&&t[l].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[l].indexOf(e))}}function t5(r,i){const a=new Map(r.map((t,e)=>[t,e]));return(t,e)=>{var n;return"function"!=typeof t?t:(n=a.get(e),t(i?i(e):e,n,i?r.map(i):r))}}function e5(l,t){var{valueof:c=(t,e)=>t}=t,u=K(t,["valueof"]);const f="element-link";return[(t,e)=>{if(!(t.length<=1)){var n=t.map(t=>[t,t.getBBox()]);n.sort(([,t],[,e])=>{var{x:t,y:n}=t,{x:e,y:r}=e;return t-e==0?n-r:t-e});for(let t=1;t<n.length;t++){var r=z0();const[o,s]=n[t-1];var[,i]=n[t],i=(r.moveTo(s.x+s.width,s.y),r.lineTo(i.x,i.y),r.lineTo(i.x,i.y+i.height),r.lineTo(s.x+s.width,s.y+s.height),r.closePath(),z1(u,t=>c(t,o))),{fill:a=o.getAttribute("fill")}=i,i=K(i,["fill"]),r=new F.Path({className:f+(e?" "+e:""),style:Object.assign({d:r.toString(),fill:a},i)});l.appendChild(r)}}},t=>{t=t||f;for(const e of l.getElementsByClassName(t)||[])e.remove()}]}function n5(t,e){var{elements:n,datum:r,groupKey:i=t=>t,link:a=!1}=e,e=K(e,["elements","datum","groupKey","link"]);const o=n(t),s=new Set(o),l=Yc(o,i);n=t5(o,r);const[c,u]=e5(t,Object.assign({elements:o,valueof:n},J(e,"link"))),{setState:f,removeState:h}=Qx(e,n),d=t=>{t=t.target;if(s.has(t)){var t=i(t),t=l.get(t),e=new Set(t);for(const n of o)e.has(n)?f(n,"highlighted"):f(n,"unhighlighted");a&&c(t)}},p=t=>{t=t.target;if(s.has(t)){for(const e of o)h(e,"unhighlighted","highlighted");a&&u()}};return t.addEventListener("pointerover",d),t.addEventListener("pointerout",p),()=>{t.removeEventListener("pointerover",d),t.removeEventListener("pointerout",p)}}function r5(n){return t=>{var{container:t,view:e}=t;return n5(t,Object.assign(Object.assign({},$x(n)),{elements:Yx,datum:Jx(e)}))}}function i5(n={selectedLineWidth:1,selectedColor:"black"}){return t=>{var{container:t,view:e}=t;return n5(t,Object.assign(Object.assign({},$x(n)),{elements:Yx,datum:Jx(e),groupKey:Kx(e)}))}}function a5(n){return t=>{var{container:t,view:e}=t;return n5(t,Object.assign(Object.assign(Object.assign({},n),$x(n)),{elements:Yx,datum:Jx(e),groupKey:Zx()}))}}function o5(t,e){var{elements:n,datum:r,groupKey:l=t=>t,link:c=!1,single:u=!1}=e,e=K(e,["elements","datum","groupKey","link","single"]);const f=n(t),h=new Set(f),d=Yc(f,l);n=t5(f,r);const[p,y]=e5(t,Object.assign({elements:f,valueof:n},J(e,"link"))),{setState:g,removeState:i,hasState:m}=Qx(e,n),v=()=>{for(const t of f)i(t,"selected","unselected");c&&y()},a=t=>{t=t.target;if(!h.has(t))return v();if(u){var e=t;if(m(e,"selected"))v();else{var e=l(e),e=d.get(e),n=new Set(e);for(const i of f)n.has(i)?g(i,"selected"):g(i,"unselected");c&&(y(),p(e))}}else{e=t;var t=l(e),r=d.get(t);const a=new Set(r);if(m(e,"selected")){if(!f.some(t=>!a.has(t)&&m(t,"selected")))return v();for(const o of r)g(o,"unselected");c&&y(t)}else{e=r.some(t=>m(t,"selected"));for(const s of f)a.has(s)?g(s,"selected"):m(s,"selected")||g(s,"unselected");!e&&c&&p(r,t)}}};return t.addEventListener("click",a),()=>{t.removeEventListener("click",a)}}function s5(n){return t=>{var{container:t,view:e}=t;return o5(t,Object.assign(Object.assign({},$x(n)),{elements:Yx,datum:Jx(e)}))}}function l5(n){return t=>{var{container:t,view:e}=t;return o5(t,Object.assign(Object.assign({},$x(n)),{elements:Yx,datum:Jx(e),groupKey:Kx(e)}))}}function c5(n){return t=>{var{container:t,view:e}=t;return o5(t,Object.assign(Object.assign({},$x(n)),{elements:Yx,datum:Jx(e),groupKey:Zx()}))}}function u5(t){var{wait:O=20,leading:_,trailing:S=!1,labelFormatter:E=t=>""+t}=t,A=K(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:h,x:d,series:l=[]}=t;t=h.map((t,e)=>e);const c=Zc(t.map(t=>d[t])),u=I({},e),f=u.marks.find(t=>"line"===t.type);t=su(Uc(t,t=>su(t,t=>+h[t])/cu(t,t=>+h[t]),t=>l[t]).values());I(f,{scale:{y:{domain:[1/t,t]}}});const p=Ux(r),y=r.getElementsByClassName(et);const g=Yc(r.getElementsByClassName(it),t=>t.__data__.key.split("-")[0]),m=new F.Line({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},J(A,"rule"))}),v=new F.Text({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},J(A,"label"))}),b=(m.append(v),p.appendChild(m),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[Rc(c,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",E(e))};let w;var M;const k=Js(t=>{t=Xx(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of y){var{seriesIndex:a,key:o}=u.__data__,s=a[Fc(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(h[s]/h[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),g.get(o)||[]);for(const f of s)f.setAttribute("dy",c)}}},O,{leading:_,trailing:S});return M=[0,0],ne(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,M);x(M,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(f);t.groupBy="color",t.basis=(t,e)=>{return e[t[Fc(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);w=t.view}),p.addEventListener("pointerenter",k),p.addEventListener("pointermove",k),p.addEventListener("pointerleave",k),()=>{m.remove(),p.removeEventListener("pointerenter",k),p.removeEventListener("pointermove",k),p.removeEventListener("pointerleave",k)}}}function f5({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=Ux(n),a=I({},e);for(const s of a.marks)s.animate=!1;const o=Js(t=>{var e,n,t=Xx(i,t);t&&([t,e]=t,(n=function(t){var{coordinates:e=[]}=t,n=e.find(t=>"fisheye"===t.type);return n||(e.push(n={type:"fisheye"}),t.coordinates=e,n)}(a)).focusX=t,n.focusY=e,n.isVisual=!0,r(a))},l,{leading:c,trailing:u});return i.addEventListener("pointerenter",o),i.addEventListener("pointermove",o),i.addEventListener("pointerleave",o),()=>{i.removeEventListener("pointerenter",o),i.removeEventListener("pointermove",o),i.removeEventListener("pointerleave",o)}}}function h5(t,e,n,r){var i=t.tooltipElement||function(t,e,n){var{min:[r,i],max:[a,o]}=t.getBounds(),e=new Pb({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},items:[],bounding:{x:r,y:i,width:a-r,height:o-i},position:"bottom-right",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return t.getRootNode().defaultView.getConfig().container.appendChild(e.HTMLTooltipElement),e}(t,n,r),{items:e,title:a}=e;i.show(),i.update({x:n,y:r,items:e,title:a}),t.tooltipElement=i}function d5(t){t=t.tooltipElement;t&&t.hide()}function p5(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>ff(t)))}function y5(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e||n}=t;return t}function g5(n,a,o,t=n.map(t=>t.__data__)){e=t.map(t=>t.title);var e=Array.from(new Set(e)).filter(ff),t=t.flatMap((r,t)=>{var t=n[t],e=K(r,["title"]);const i=y5(t);return Object.entries(e).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=o[t].getOptions();return Object.assign({color:i,name:function(t,e){var{color:t,series:n}=t,{color:e,series:r}=e;return t&&t.invert?t.invert(e):n&&n.invert?n.invert(r):null}(o,r)||n,value:void 0===e?e:""+e},p5(a({channel:t,value:e})))}).filter(({value:t})=>void 0!==t)});return Object.assign(Object.assign({},0<e.length&&{title:e.join(",")}),{items:t})}function m5(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function v5(t,e){return void 0===t?e:t}function b5(l,t){var{elements:e,wait:n=50,leading:r=!0,trailing:i=!1,scale:c,coordinate:u,showCrosshairs:f,item:h}=t,t=K(t,["elements","wait","leading","trailing","scale","coordinate","showCrosshairs","item"]);const d=e(l),[,p]=function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return[n-t,r-e]}(l),y=new Map(d.map(t=>{var e=t["__data__"],e=e["seriesX"];return[t,Zc(e)]})),g=J(t,"crosshairs"),a=Js(t=>{const r=Xx(l,t);var t=l.getBounds(),e=t.min[0],t=t.min[1];if(r){var n=d.map(t=>{var e=y.get(t),t=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")).map(([t,e])=>{e=e[n];return[Os(t.replace("series","")),e]}))})(t,((t,e)=>{var[t]=u.invert(t);return Rc(e,t)})(r,e)),{x:e,y:n}=t;return[t,u.map([e,n])]}),i=n.map(t=>t[0]),n=n.map(t=>t[1]),i=g5(d,h,c,i);if(h5(l,i,r[0]+e,r[1]+t),f){i=l,e=n,n=(t=Object.assign(Object.assign({},g),{height:p}))["height"],t=K(t,["height"]);const a=e=du(e.map(t=>t[0])),o=e,s=n;(n=i.ruleY||(e=new F.Line({style:Object.assign({x1:a,x2:o,y1:0,y2:s,lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t)}),i.appendChild(e),e)).style.x1=a,n.style.x2=o,n.style.y1=0,n.style.y2=s,i.ruleY=n}}},n,{leading:r,trailing:i}),o=()=>{var t;d5(l),f&&(t=l).ruleY&&(t.ruleY.remove(),t.ruleY=void 0)};return l.addEventListener("pointerenter",a),l.addEventListener("pointermove",a),l.addEventListener("pointerleave",o),()=>{l.removeEventListener("pointerover",a),l.removeEventListener("pointerout",a),l.removeEventListener("pointerleave",o)}}function x5(r,{elements:t,scale:i,wait:e=50,leading:n=!0,trailing:a=!1,groupKey:o=t=>t,item:s}){t=t(r);const l=new Set(t),c=Yc(t,o),u=Js(t=>{var e,n=t["target"];l.has(n)&&(n=o(n),n=1===(n=c.get(n)).length?function(t,r,i){var e=(n=t["__data__"])["title"],n=K(n,["title"]);const a=y5(t);return t=Object.entries(n).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=i[t].getOptions();return Object.assign({color:a,name:n,value:void 0===e?e:""+e},p5(r({channel:t,value:e})))}).filter(({value:t})=>void 0!==t),Object.assign(Object.assign({},e&&{title:e}),{items:t})}(n[0],s,i):g5(n,s,i),{offsetX:t,offsetY:e}=t,h5(r,n,t,e))},e,{leading:n,trailing:a}),f=t=>{t=t.target;l.has(t)&&d5(r)};return r.addEventListener("pointerover",u),r.addEventListener("pointermove",u),r.addEventListener("pointerout",f),()=>{r.removeEventListener("pointerover",u),r.removeEventListener("pointermove",u),r.removeEventListener("pointerout",f)}}function w5(t){const{shared:o,showCrosshairs:s,series:l,item:c=()=>({})}=t,u=K(t,["shared","showCrosshairs","series","name","item"]);return t=>{var{container:t,view:e}=t,{scale:n,markState:r,coordinate:i}=e,a=m5(r,"seriesTooltip"),r=m5(r,"showCrosshairs"),t=Ux(t);return v5(l,a)?b5(t,Object.assign(Object.assign({},u),{elements:Yx,scale:n,coordinate:i,showCrosshairs:v5(s,r),item:c})):x5(t,Object.assign(Object.assign({},u),{elements:Yx,scale:n,coordinate:i,groupKey:o?Kx(e):void 0,item:c}))}}function M5(n){return(t,...e)=>I({},n(t,...e),t)}function k5(n){return(t,...e)=>I({},t,n(t,...e))}function O5(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=K(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}qx.props={};const _5=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map(t=>{var e=t["data"],t=K(t,["data"]);return Object.assign(Object.assign({},t),{data:O5(e,o),x:n,y:r,width:i,height:a})})},S5=(_5.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var y=n[t],g=y["data"],y=K(y,["data"]),g=O5(g,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:g},y)),p+=h[t]+i}return d}),E5=(S5.props={},()=>t=>{var e=t["children"],t=K(t,["children"]);if(!Array.isArray(e))return[];const{data:a,scale:o={},axis:s={},legend:l={}}=t,n=K(t,["data","scale","axis","legend"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={}}=t,t=K(t,["data","scale","axis","legend"]);return Object.assign({data:O5(e,a),scale:I({},o,n),axis:!(!r||!s)&&I({},s,r),legend:!(!i||!l)&&I({},l,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),A5=(E5.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:y,marginTop:g,marginRight:m,data:v,coordinates:b,theme:x,component:w,interactions:M,x:k,y:O,key:_,frame:S,title:E,labelTransform:A}=t,t=K(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinates","theme","component","interactions","x","y","key","frame","title","labelTransform"]);return[{type:"standardView",x:k,y:O,key:_,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinates:b,component:w,interactions:M,frame:S,title:E,labelTransform:A,margin:d,marginLeft:p,marginBottom:y,marginTop:g,marginRight:m,marks:[Object.assign(Object.assign({},t),{key:_+"-0",data:v})]}]}),P5=(A5.props={},M5(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=Yc(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),N5=M5(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:I({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:I({title:i},o)}}}),T5=M5(()=>({animate:{enterType:"fadeIn"}})),L5=k5(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),C5=k5(()=>({type:"cell"})),j5=k5(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),F5=k5((t,c=function(t){t=t.points;return B1(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?I5(a,e):(t=e.length?void 0:null,I({title:r===i-1&&void 0,grid:t},a))}},M=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?I5(r,e):(n=e.length?void 0:null,I({title:0===t&&void 0,grid:n},r))}},k={})=>{const{data:e,encode:n,children:u,scale:r,x:O=0,y:_=0,shareData:f=!1}=t,S=e["value"],{x:E,y:A}=n;t=r.color;const P=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:g,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=W1(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[E]:t,[A]:e}=t,t=void 0===E||t===n,e=void 0===A||e===r;return t&&e}).map(t=>S.filter(t)),v=f?su(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:E,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:A,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],p=b[c],y=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=K(t,["scale","key","facet","axis","legend"]),a=null==(a=null==e?void 0:e.y)?void 0:a.guide,o=null==(o=null==e?void 0:e.x)?void 0:o.guide,s={x:{tickCount:E?5:void 0},y:{tickCount:A?5:void 0}},r=r?y:0===y.length?[]:S,l={color:{domain:P}},o={x:R5(o,w)(p,r),y:R5(a,M)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+g+O,y:f+m+_,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:I(s,e,l),axis:I({},i,o),legend:!1},t),k)})})}}});function I5(t,e){return e.length?I({title:!1,tickLine:null,label:null,subTickLine:null},t):I({title:!1,tickLine:null,label:null,subTickLine:null,grid:null},t)}function R5(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const B5=()=>t=>{return[Ox.of(t).call(C5).call(N5).call(T5).call(P5).call(L5).call(j5).call(F5).value()]},D5=(B5.props={},M5(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),z5=k5(t=>{const{data:w,children:c,x:M=0,y:k=0}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=W1(t);const s=t.map(({points:t})=>B1(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],[p,y]=l[c],g=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=K(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return I5(r,e)})(g,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return I5(n,e)})(g,w)};return Object.assign({data:w,key:i+"-"+c,x:u+m+M,y:f+v+k,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:I({x:{facet:!1},y:{facet:!1}},e),axis:I({x:{titleAnchor:"center",titleTextAnchor:"center",tickCount:5},y:{titleAnchor:"center",titleTextAnchor:"center",tickCount:5}},o,l),legend:!1,encode:I({},a,{x:p,y:y})},t)})})}}}),W5=k5(t=>{var e=t["encode"],t=K(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=K(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const H5=()=>t=>{return[Ox.of(t).call(C5).call(N5).call(z5).call(W5).call(T5).call(L5).call(D5).value()]},V5=M5(t=>({scale:{x:{guide:{type:"axisX"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),G5=M5(t=>({coordinates:[{type:"polar"}]})),q5=t=>{var e=t["encode"],t=K(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function Y5(t){return t=>null}function U5(t){var t=t["points"],[t,e,n,r]=t,i=F1(t,r),t=j1(t,r),r=j1(e,n),r=(e=r,r=I1(r=t),e=I1(e),r<e?e-r:2*Math.PI-(r-e)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=R1(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const X5=()=>t=>{return[Ox.of(t).call(C5).call(q5).call(N5).call(G5).call(j5).call(F5,U5,Y5,Y5,{frame:!1}).call(T5).call(L5).call(V5).value()]};const $5=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],f=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=I({enterDuration:e,updateDuration:e,exitDuration:e,updateEasing:n,updateType:"morphing",updateFill:"both",exitType:"fadeOut"},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield f[i]),e=i}t++}var a,o,s}};function Z5(t,e){if(null!==t)return{type:"column",value:t,field:e}}function K5(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function J5(t,e){var n=[];for(const r of t)n[r]=e;return n}function Q5(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function tw(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=Q5(t,i);if(null!==n)return[n,r]}return[null,null]}function ew(t){return!(t instanceof Date)&&"object"==typeof t}$5.props={};const nw=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,I({},e,{encode:{y1:Z5(J5(t,0))}})]};function rw(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=Q5(r,t))?void 0:t[0]]}).filter(([,t])=>ff(t));return Array.from(Yc(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function iw(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:jc(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>fw(t=>r(e[t]))):"series"===t?sw:"value"===t?lw:"sum"===t?cw:"maxIndex"===t?uw:()=>null}function aw(t,e){for(const n of t)n.sort(e)}function ow(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function sw(t,e,n){return fw(t=>n[t])}function lw(t,e,n){return fw(t=>e[t])}function cw(t,n,e){t=W1(t),t=Array.from(Yc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return fw(t=>r.get(e[t]))}function uw(t,n,e){t=W1(t),t=Array.from(Yc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,lu(e,t=>n[t])]));return fw(t=>r.get(e[t]))}function fw(n){return(t,e)=>jc(n(t),n(e))}nw.props={};const hw=(t={})=>{const{groupBy:P="x",orderBy:N=null,reverse:T=!1,y:L="y",y1:C="y1",series:j=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=Q5(r,"y"),[s,l]=Q5(r,"y1"),[r]=j?tw(r,"series","color"):Q5(r,"color"),c=rw(P,t,e),n=iw(N)(n,a,r),u=(n&&aw(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const _ of c){T&&_.reverse();var y=s?+s[_[0]]:0,g=[],m=[];for(const S of _){var v=h[S]=+a[S]-y;v<0?m.push(S):0<=v&&g.push(S)}var b=0<g.length?g:m,x=0<m.length?m:g;let t=g.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=y;for(const E of m.reverse()){var w=h[E];n=u[E]=(f[E]=n)+w}let r=y;for(const A of g){var M=h[A];0<M?r=u[A]=(f[A]=r)+M:u[A]=f[A]=r}}const k=new Set(d),O=new Set(p);r="y"===L?u:f,n="y"===C?u:f;return[t,I({},e,{encode:{y:Z5(r,o),y1:Z5(n,l)},style:Object.assign({first:(t,e)=>k.has(e),last:(t,e)=>O.has(e)},i)})]}};function dw(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}hw.props={};const pw=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(dw)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",hw({groupBy:r})(t,e,n))},yw=(pw.props={},(t={})=>{const{channel:i="x"}=t;return(t,e)=>{var n=e["encode"],r=n["title"];return void 0!==r?[t,e]:([r,n]=Q5(n,i),[t,I({},e,{encode:{title:Z5(r,n)}})])}}),gw=(yw.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,I({},e,{encode:{x:Z5(J5(t,0))},scale:{x:{guide:null}}})]}),mw=(gw.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,I({},e,{encode:{y:Z5(J5(t,0))},scale:{y:{guide:null}}})]}),vw=(mw.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,I({},e,{encode:{size:K5(J5(t,3))}})]}),bw=(vw.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=K(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,I({},e,{encode:{key:Z5(r)}})]}),xw=(bw.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=Q5(n,"color"),[t,I({},e,{encode:{series:Z5(r,i)}})])}),ww=(xw.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(ew)?[t,e]:[t,I({},e,{encode:{y:Z5(n)}})]}),Mw=(ww.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(ew)?[t,e]:[t,I({},e,{encode:{x:Z5(n)}})]}),kw=(Mw.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=Q5(n,"y"),[t,I({},e,{encode:{y1:Z5([...r])}})])}),Ow=(kw.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=Q5(n,"x"),[t,I({},e,{encode:{x1:Z5([...r])}})])}),_w=(Ow.props={},t=>{const a=t["channel"];return(t,e)=>{const r=e["encode"];var n=r["tooltip"];if(void 0!==n)return[t,e];n=Array.isArray(a)?a:[a];let i=0;n=n.flatMap(e=>Object.entries(r).filter(([t])=>t.startsWith(e)).flatMap(([t])=>{var[e,n]=Q5(r,t),t=[[t,Z5(e)]];return e&&null!==n&&(t.push(["tooltip"+(0===i?"":i),Z5(e,n)]),i++),t}));return[t,I({},e,{encode:Object.fromEntries(n)})]}}),Sw=(_w.props={},()=>(t,e)=>[t,I({scale:{x:{padding:0},y:{padding:0}}},e)]),Ew=(Sw.props={},()=>(t,e)=>{var{style:n={}}=e,r=K(e,["data","style"]),{x:i,y:a}=n,n=K(n,["x","y"]);return null==i||null==a?[t,e]:[[0],I({},r,{data:[0],cartesian:!0,encode:{x:Z5([i||0]),y:Z5([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),Aw=(Ew.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,I({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),Pw=(Aw.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(ew)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,I({},e,{encode:{x:Z5(n),y:Z5(r)}})])}),Nw=(Pw.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,I({},e,{encode:{series:K5(J5(t,void 0))}})]:[t,e]}),Tw=(Nw.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return K(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=Q5(r,"y"),[r]=tw(r,"series","color"),o=ow(r,i),i=rw(c,t,e),n=iw(f)(n,a,r),s=(n&&aw(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,I({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:Z5(s)}})]}}),Lw=(Tw.props={},t=>{const{groupBy:p=["x"],reducer:y=(t,e)=>e[t[0]],orderBy:g=null,reverse:m=!1,duration:v}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,Q5(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,f]of r){var a=[];for(const n of i){var o=Array.from(Yc(n,t=>f[t]).values());a.push(...o)}i=a}if(g){const[h]=Q5(e,g);h&&i.sort((t,e)=>y(t,h)-y(e,h)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[J5(n,r)]:tw(e,"enterDuration",J5(n,r));var[l]=tw(e,"enterDelay",J5(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=su(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,I({},t,{encode:{enterDuration:K5(s),enterDelay:K5(c)}})]}});Lw.props={};const Cw=(t={})=>{const{groupBy:d="x",basis:p="max"}=t;return(e,t)=>{const n=t["encode"];var r,i=K(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,Q5(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=rw(d,e,t),l="function"==typeof(r=p)?r:{min:(t,e)=>cu(t,t=>e[+t]),max:(t,e)=>su(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>du(t,t=>e[+t]),median:(t,e)=>pu(t,t=>e[+t]),sum:(t,e)=>mu(t,t=>e[+t]),deviation:(t,e)=>zc(t,t=>e[+t])}[r]||su;for(const e of i){var c=l(e,o);for(const h of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,f]=s[t];f[h]=+u[h]/c}}return[e,I({},t,{encode:Object.fromEntries(s.map(([t,e])=>[t,Z5(e,Q5(n,t)[1])]))})]}};function jw(t,e,n){return null===t?[-.5,.5]:(t=ow(t,e),[-(e=new Dp({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function Fw(t,e,n){return e*(1-t)+n*t}Cw.props={};const Iw=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=Q5(n,"x"),[n]=Q5(n,"y");const o=jw(a,r,l),s=jw(n,i,c);a=t.map(()=>Fw(u(),...s)),r=t.map(()=>Fw(u(),...o));return[t,I({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:Z5(a),dx:Z5(r)}})]}},Rw=(Iw.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=Q5(n,"x");const i=jw(n,r,a);n=t.map(()=>Fw(o(),...i));return[t,I({scale:{x:{padding:.5}}},e,{encode:{dx:Z5(n)}})]}}),Bw=(Rw.props={},(t={})=>{const{groupBy:y="x"}=t;return(e,t)=>{const n=t["encode"];var r=K(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,Q5(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=rw(y,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=Wc(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,I({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,Z5(e,Q5(n,t)[1])]))})]}}),Dw=(Bw.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=Q5(n,"y");var[,i]=Q5(n,"y1"),n=(f?tw(n,"series","color"):Q5(n,"color"),rw(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,I({},e,{encode:{y1:Z5(a,i)}})]}});function zw(t,e){return[t[0]]}function Ww(t,e){return[t[t.length-1]]}function Hw(t,e){return[t[lu(t,t=>e[t])]]}function Vw(t,e){return[t[function(t,e){let n,r=-1,i=-1;if(void 0===e)for(const o of t)++i,null!=o&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);else for(var a of t)null!=(a=e(a,++i,t))&&(n>a||void 0===n&&a>=a)&&(n=a,r=i);return r}(t,t=>e[t])]]}Dw.props={};const Gw=(t={})=>{const{groupBy:s="series"}=t,l=K(t,["groupBy"]);return(t,e)=>{var n=e["encode"],t=rw(s,t,e),[r,i]=Object.entries(l)[0];const[a]=Q5(n,r),o="function"==typeof(n=i)?n:{first:zw,last:Ww,max:Hw,min:Vw}[n]||zw;return[t.flatMap(t=>o(t,a)),e]}},qw=(Gw.props={},(t={})=>{var e=t["selector"],t=K(t,["selector"]);return Gw(Object.assign({x:e},t))}),Yw=(qw.props={},(t={})=>{var e=t["selector"],t=K(t,["selector"]);return Gw(Object.assign({y:e},t))});function Uw(e){return t=>null===t?e:e+" of "+t}function Xw(){return[(t,e)=>du(t,t=>+e[t]),Uw("mean")]}function $w(){return[(t,e)=>pu(t,t=>+e[t]),Uw("median")]}function Zw(){return[(t,e)=>su(t,t=>+e[t]),Uw("max")]}function Kw(){return[(t,e)=>cu(t,t=>+e[t]),Uw("min")]}function Jw(){return[(t,e)=>t.length,Uw("count")]}function Qw(){return[(t,e)=>mu(t,t=>+e[t]),Uw("sum")]}function t3(){return[(t,e)=>e[t[0]],Uw("first")]}function e3(){return[(t,e)=>e[t[t.length-1]],Uw("last")]}Yw.props={};const n3=(t={})=>{const i=t["groupBy"],a=K(t,["groupBy"]);return(t,e)=>{const{data:o,encode:s}=e,l=i(t,e);var t=Object.entries(a).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:Xw,max:Zw,count:Jw,first:t3,last:e3,sum:Qw,min:Kw,median:$w}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=Q5(s,t);return[t,Z5(l.map(t=>n(t,null!==i&&void 0!==i?i:o)),(null==r?void 0:r(a))||a)]}),n=Object.keys(s).map(t=>{const[e,n]=Q5(s,t);return[t,Z5(l.map(t=>e[t[0]]),n)]}),r=l.map(t=>o[t[0]]);return[W1(l),I({},e,{data:r,encode:Object.fromEntries([...n,...t])})]}},r3=(n3.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=K(t,["channels"]);return n3(Object.assign(Object.assign({},e),{groupBy:(t,e)=>rw(n,t,e)}))}),i3=(r3.props={},(t={})=>r3(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),a3=(i3.props={},(t={})=>r3(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),o3=(a3.props={},(t={})=>r3(Object.assign(Object.assign({},t),{channels:["color"]})));o3.props={};const s3=(t={})=>{const{reverse:s=!1,slice:l,channel:c}=t,u=K(t,["reverse","slice","channel"]);return(t,e)=>{var n=e["encode"];const[r]=Q5(n,c);var i,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=Q5(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>su(t,t=>+a[t]);if("min"===i)return t=>cu(t,t=>+a[t]);if("sum"===i)return t=>mu(t,t=>+a[t]);if("median"===i)return t=>pu(t,t=>+a[t]);if("mean"===i)return t=>du(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(c,u,n),n=(a=t,o=t=>r[t],(2!==(i=n).length?Zc(Uc(a,i,o),([t,e],[n,r])=>jc(e,r)||jc(t,n)):Zc(Yc(a,o),([t,e],[n,r])=>i(e,r)||jc(t,n))).map(([t])=>t)),a=(s&&n.reverse(),"number"==typeof l?[0,l]:l),o=l?n.slice(...a):n;return[t,I(e,{scale:{[c]:{domain:o}}})]}},l3=(s3.props={},(t={})=>s3(Object.assign(Object.assign({},t),{channel:"x"}))),c3=(l3.props={},(t={})=>s3(Object.assign(Object.assign({},t),{channel:"color"}))),u3=(c3.props={},(t={})=>s3(Object.assign(Object.assign({},t),{channel:"y"})));u3.props={};const f3=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=Q5(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):Q5(r,s)[0],r=Xc(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>mu(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,I({},e,{scale:{x:{flex:r}}})]}};function h3(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const f=a-u*c,h=u<=1?0:f/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=B1(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}f3.props={};const d3=()=>(t,e)=>[t,I({},e,{modifier:h3,axis:!1})],p3=(d3.props={},"thresholds");function y3(t){var[e,n]=Wc(t);return Math.min(200,(t=t,Math.ceil((n-e)*Math.cbrt(Dc(t))/(3.49*zc(t)))))}const g3=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=K(t,["groupChannels","binChannels"]),u={};return n3(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(p3)))),Object.fromEntries(l.flatMap(e=>[[e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",([t])=>+u[e].get(t).split(",")[1]]]))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=Q5(n,t);return t}),a=J(c,p3),o=t.filter(e=>i.every(t=>ff(t[e]))),r=[...s.map(t=>{var[t]=Q5(n,t);return t}).filter(ff).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||y3(n),e=ou().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(Yc(o,e=>r.map(t=>t(e)).join("-")).values())}}))},m3=(g3.props={},(t={})=>{var e=t["thresholds"];return g3(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});m3.props={};var fa="object"==typeof Ve&&Ve&&Ve.Object===Object&&Ve,ha="object"==typeof self&&self&&self.Object===Object&&self,pa=fa||ha||Function("return this")(),da=pa.Symbol,ya=Object.prototype,v3=ya.hasOwnProperty,b3=ya.toString,x3=da?da.toStringTag:void 0;var w3=Object.prototype.toString;var M3="[object Null]",k3="[object Undefined]",O3=da?da.toStringTag:void 0;function _3(t){if(null==t)return void 0===t?k3:M3;if(O3&&O3 in Object(t)){var e=t,n=v3.call(e,x3),r=e[x3];try{var i=!(e[x3]=void 0)}catch(t){}var a=b3.call(e);return i&&(n?e[x3]=r:delete e[x3]),a}return w3.call(t)}function S3(t){return null!=t&&"object"==typeof t}var E3=Array.isArray;function A3(t){return t}var P3="[object AsyncFunction]",N3="[object Function]",T3="[object GeneratorFunction]",L3="[object Proxy]";function C3(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}var j3=/^(?:0|[1-9]\d*)$/;var F3=9007199254740991;function I3(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=F3}function R3(t){return null!=t&&I3(t.length)&&!function(t){var e;if(e=typeof t,null!=t&&("object"==e||"function"==e))return(e=_3(t))==N3||e==T3||e==P3||e==L3}(t)}var B3=Object.prototype;function D3(t){return S3(t)&&"[object Arguments]"==_3(t)}var u=Object.prototype,z3=u.hasOwnProperty,W3=u.propertyIsEnumerable,H3=D3(function(){return arguments}())?D3:function(t){return S3(t)&&z3.call(t,"callee")&&!W3.call(t,"callee")};var ga="object"==typeof g&&g&&!g.nodeType&&g,zo=ga&&"object"==typeof module&&module&&!module.nodeType&&module,Ro=zo&&zo.exports===ga?pa.Buffer:void 0,V3=(Ro?Ro.isBuffer:void 0)||function(){return!1},G3={};G3["[object Float32Array]"]=G3["[object Float64Array]"]=G3["[object Int8Array]"]=G3["[object Int16Array]"]=G3["[object Int32Array]"]=G3["[object Uint8Array]"]=G3["[object Uint8ClampedArray]"]=G3["[object Uint16Array]"]=G3["[object Uint32Array]"]=!0,G3["[object Arguments]"]=G3["[object Array]"]=G3["[object ArrayBuffer]"]=G3["[object Boolean]"]=G3["[object DataView]"]=G3["[object Date]"]=G3["[object Error]"]=G3["[object Function]"]=G3["[object Map]"]=G3["[object Number]"]=G3["[object Object]"]=G3["[object RegExp]"]=G3["[object Set]"]=G3["[object String]"]=G3["[object WeakMap]"]=!1;var q3,qo="object"==typeof g&&g&&!g.nodeType&&g,Y3=qo&&"object"==typeof module&&module&&!module.nodeType&&module,U3=Y3&&Y3.exports===qo&&fa.process,ba=function(){try{var t=Y3&&Y3.require&&Y3.require("util").types;return t?t:U3&&U3.binding&&U3.binding("util")}catch(t){}}(),Uo=ba&&ba.isTypedArray,X3=Uo?(q3=Uo,function(t){return q3(t)}):function(t){return S3(t)&&I3(t.length)&&!!G3[_3(t)]},$3=Object.prototype.hasOwnProperty;function Z3(t,e){var n,r,i,a,o=E3(t),s=!o&&H3(t),l=!o&&!s&&V3(t),c=!o&&!s&&!l&&X3(t),u=o||s||l||c,f=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=f.length;for(n in t)!e&&!$3.call(t,n)||u&&("length"==n||l&&("offset"==n||"parent"==n)||c&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||(a=void 0,a=typeof(r=n),(i=null==(i=h)?9007199254740991:i)&&("number"==a||"symbol"!=a&&j3.test(r))&&-1<r&&r%1==0&&r<i))||f.push(n);return f}K3=Object.keys,J3=Object;var K3,J3,Q3=function(t){return K3(J3(t))},t4=Object.prototype.hasOwnProperty;function e4(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||B3))return Q3(t);var e,n,r,i=[];for(r in Object(t))t4.call(t,r)&&"constructor"!=r&&i.push(r);return i}function n4(t){return(R3(t)?Z3:e4)(t)}var r4,i4=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[r4?o:++r];if(!1===e(i[s],s,i))break}return t};o4=function(t,e){return t&&i4(t,e,n4)};function a4(t,e){if(null!=t){if(!R3(t))return o4(t,e);for(var n=t.length,r=s4?n:-1,i=Object(t);(s4?r--:++r<n)&&!1!==e(i[r],r,i););}return t}var o4,s4;function l4(t,e){(E3(t)?C3:a4)(t,"function"==typeof(t=e)?t:A3)}function c4(t,e,n){return e<=t&&t<=n}function u4(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function f4(t,e,n){var r=!1,i=t.length;if(!(i<=2)){for(var a,o,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(o=u,((s=[e,n])[0]-(a=c)[0])*(o[1]-a[1])==(o[0]-a[0])*(s[1]-a[1])&&Math.min(a[0],o[0])<=s[0]&&s[0]<=Math.max(a[0],o[0])&&Math.min(a[1],o[1])<=s[1]&&s[1]<=Math.max(a[1],o[1]))return 1;0<u4(c[1]-n)!=0<u4(u[1]-n)&&u4(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}}function h4(t){for(var e,n,r=[],i=t.length,a=0;a<i-1;a++){var o=t[a],s=t[a+1];r.push({from:{x:o[0],y:o[1]},to:{x:s[0],y:s[1]}})}return 1<r.length&&(e=t[0],n=t[i-1],r.push({from:{x:n[0],y:n[1]},to:{x:e[0],y:e[1]}})),r}function d4(t,c){var u=!1;return l4(t,function(t){if(e=t.from,t=t.to,n=c.from,r=c.to,i=n.x-e.x,a=n.y-e.y,o=t.x-e.x,t=t.y-e.y,s=r.x-n.x,r=r.y-n.y,l=null,l=.001*(o*o+t*t)*(s*s+r*r)<(n=o*r-t*s)*n&&c4(r=(i*r-a*s)/n,0,1)&&c4((i*t-a*o)/n,0,1)?{x:e.x+r*o,y:e.y+r*t}:l)return!(u=!0);var e,n,r,i,a,o,s,l}),u}function p4(t){var e=t.map(function(t){return t[0]}),t=t.map(function(t){return t[1]});return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,t),maxY:Math.max.apply(null,t)}}function y4(t){var{min:t,max:e}=t.getRenderBounds(),[t,n]=t,[e,r]=e;return[[t,n],[t,r],[e,r],[e,n]]}function g4(t){return t.style.priority||0}const m4=()=>(n,t)=>{var r=[];n.sort((t,e)=>jc(g4(t),g4(e)));for(let t=0;t<n.length;t++){var i=n[t];let e=!(i.style.visibility="visible");for(let t=0;t<r.length;t++){var a=r[t];if(function(e,n){if(!(e.length<2||n.length<2)){var r,i,a,t=p4(e),o=p4(n);if(t=t,!((o=o).minX>t.maxX||o.maxX<t.minX||o.minY>t.maxY||o.maxY<t.minY))return r=!1,l4(n,function(t){if(f4(e,t[0],t[1]))return!(r=!0)}),r?1:(l4(e,function(t){if(f4(n,t[0],t[1]))return!(r=!0)}),r||(i=h4(e),o=h4(n),a=!1,l4(o,function(t){if(d4(i,t))return!(a=!0)}),a))}}(y4(i),y4(a))){i.style.visibility="hidden",e=!0;break}}e||r.push(i)}return n};function v4(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const b4=t=>{const{maxIter:M=10,maxError:k=.1,padding:O=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[y,g]=v4(),[m,v]=v4();var a,o,s,l,[c,t]=v4(),[u,n]=v4();for(const b of i){var{min:r,max:f}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,y]=r;var[r,f]=f;g(b,y),v(b,y),t(b,f-y),n(b,[x,r])}for(let t=0;t<M;t++){i.sort((t,e)=>jc(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const y=m(h);var d=c(h),p=m(e),d=p-(y+d);d<O&&(d=(O-d)/2,r=Math.max(r,d),v(h,y-d),v(e,p+d))}}if(r<k)break}for(const w of i)w.style.y+=m(w)-y(w)}return i}},x4=t=>{const{edgeDistance:i=0}=t;return(t,e)=>{if(Ou(e)){var{x:n,width:r}=e.getOptions();const a=e.getCenter();e=df(i,r);const o=n+e,s=n+r-e;t.forEach(t=>{var{x:e,x0:n,y0:r}=t.style,e=e<=a[0]?o-e:s-e,{x:e,y:i}=(t.style.x+=e,t.style),n=j1([n,r],a),r=j1([0,i],a),i=n[1]?n[0]*r[1]/n[1]+a[0]:e;t.style.connectorPoints=[[i-e,0]]})}return t}},w4=t=>(t,e)=>{if(Ou(e)){const a=e.getCenter(),o=t.reduce((t,e)=>{var{x0:e,y0:n,offset:r=0}=e.style;return Math.max(t,F1(a,[e,n])+r)},0);t.forEach(t=>{var{x0:e,y0:n,connector:r,connectorLength2:i=0}=t.style,e=R1([e-a[0],n-a[1]]),n=r?i*(Math.sin(e)<0?-1:1):0,r=a[0]+Math.sin(e)*o,i=a[1]-Math.cos(e)*o;t.style.x=r+n,t.style.y=i,t.style.connectorPoints=[[-n,0]]})}return t};var N=1e-6,M4=1e-12,A=Math.PI,k4=A/2,O4=A/4,_4=2*A,S4=180/A,E4=A/180,A4=Math.abs,P4=Math.atan,N4=Math.atan2,P=Math.cos,T4=Math.ceil,L4=Math.exp,C4=Math.log,j4=Math.pow,T=Math.sin,F4=Math.sign||function(t){return 0<t?1:t<0?-1:0},I4=Math.sqrt,R4=Math.tan;function B4(t){return 1<t?0:t<-1?A:Math.acos(t)}function D4(t){return 1<t?k4:t<-1?-k4:Math.asin(t)}function z4(){}function W4(t,e){t&&V4.hasOwnProperty(t.type)&&V4[t.type](t,e)}var H4={Feature:function(t,e){W4(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)W4(n[r].geometry,e)}},V4={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){G4(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)G4(n[r],e,0)},Polygon:function(t,e){q4(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)q4(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)W4(n[r],e)}};function G4(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function q4(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)G4(t[n],e,1);e.polygonEnd()}function Y4(t,e){t&&H4.hasOwnProperty(t.type)?H4[t.type](t,e):W4(t,e)}function U4(t){return[N4(t[1],t[0]),D4(t[2])]}function X4(t){var e=t[0],t=t[1],n=P(t);return[n*P(e),n*T(e),T(t)]}function $4(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Z4(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function K4(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function J4(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Q4(t){var e=I4(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function tM(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function eM(t,e){return[A4(t)>A?t+Math.round(-t/_4)*_4:t,e]}function nM(t,e,n){return(t%=_4)?e||n?tM(iM(t),aM(e,n)):iM(t):e||n?aM(e,n):eM}function rM(n){return function(t,e){return[A<(t+=n)?t-_4:t<-A?t+_4:t,e]}}function iM(t){var e=rM(t);return e.invert=rM(-t),e}function aM(t,e){var i=P(t),a=T(t),o=P(e),s=T(e);function n(t,e){var n=P(e),r=P(t)*n,t=T(t)*n,n=T(e),e=n*i+r*a;return[N4(t*o-e*s,r*i-n*a),D4(e*o+t*s)]}return n.invert=function(t,e){var n=P(e),r=P(t)*n,t=T(t)*n,n=T(e),e=n*o-t*s;return[N4(t*o+n*s,r*i+e*a),D4(e*i-r*a)]},n}function oM(t,e){(e=X4(e))[0]-=t,Q4(e);t=B4(-e[1]);return((-e[2]<0?-t:t)+_4-N)%_4}function sM(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:z4,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function lM(t,e){return A4(t[0]-e[0])<N&&A4(t[1]-e[1])<N}function cM(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function uM(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(lM(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*N}s.push(n=new cM(r,t,null,!0)),l.push(n.o=new cM(r,null,n,!1)),s.push(n=new cM(i,t,null,!1)),l.push(n.o=new cM(i,null,n,!0))}}),s.length){for(l.sort(e),fM(s),fM(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function fM(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function hM(t){return A4(t[0])<=A?t[0]:F4(t[0])*((A4(t[0])+A)%_4-A)}function dM(g,m,v,b){return function(s){var l,c,u,n=m(s),f=sM(),h=m(f),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=y,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=yu(c);var t=function(t,e){var n=hM(e),r=e[1],e=T(r),i=[T(n),-P(n),0],a=0,o=0,s=new Hc;1===e?r=k4+N:-1===e&&(r=-k4-N);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=hM(h),p=h[1]/2+O4,y=T(p),g=P(p),m=0;m<f;++m,d=b,y=w,g=x,h=v){var v=u[m],b=hM(v),x=v[1]/2+O4,w=T(x),x=P(x),M=b-d,k=0<=M?1:-1,O=k*M,_=A<O,S=y*w;s.add(N4(S*k*T(O),g*x+S*P(O))),a+=_?M+k*_4:M,_^n<=d^n<=b&&(Q4(S=Z4(X4(h),X4(v))),Q4(O=Z4(i,S)),(k=(_^0<=M?-1:1)*D4(O[2]))<r||r===k&&(S[0]||S[1]))&&(o+=_^0<=M?1:-1)}return(a<-N||a<N&&s<-M4)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),uM(c,yM,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){g(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),h.point(t,e)}function o(){h.lineStart(),u=[]}function y(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(pM))}return e}}function pM(t){return 1<t.length}function yM(t,e){return((t=t.x)[0]<0?t[1]-k4-N:k4-t[1])-((e=e.x)[0]<0?e[1]-k4-N:k4-e[1])}eM.invert=eM;var gM=dM(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?A:-A,l=A4(t-f);A4(l-A)<N?(c.point(f,h=0<(h+e)/2?k4:-k4),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&A<=l&&(A4(f-d)<N&&(f-=d*N),A4(t-s)<N&&(t-=s*N),l=h,i=e,o=T((n=f)-(r=t)),h=A4(o)>N?P4((T(l)*(a=P(i))*T(r)-T(i)*(r=P(l))*T(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*k4,r.point(-A,i),r.point(0,i),r.point(A,i),r.point(A,0),r.point(A,-i),r.point(0,-i),r.point(-A,-i),r.point(-A,0),r.point(-A,i)):A4(t[0]-e[0])>N?(t=t[0]<e[0]?A:-A,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-A,-k4]);function mM(d){var y=P(d),p=6*E4,f=0<y,h=A4(y)>N;function g(t,e){return P(t)*P(e)>y}function m(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=Z4(X4(t),X4(e)),h=$4(f,f),d=f[0],p=h-d*d;return p?(r=Z4(u,f),K4(u=J4(u,y*h/p),J4(f,-y*d/p)),(p=(f=$4(u,h=r))*f-(d=$4(h,h))*($4(u,u)-1))<0?void 0:(K4(p=J4(h,(-f-(r=I4(p)))/d),u),p=U4(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=A4((s=a-i)-A)<N)&&e<o&&(c=o,o=e,e=c),(l||s<N?l?0<o+e^p[1]<(A4(p[0]-i)<N?o:e):o<=p[1]&&p[1]<=e:A<s^(i<=p[0]&&p[0]<=a))?(K4(c=J4(h,(-f+r)/d),u),[p,U4(c)]):void 0):p)):!n&&t}function v(t,e){var n=f?d:A-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return dM(g,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=g(t,e),t=f?i?0:v(t,e):i?v(t+(t<0?A:-A),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=m(o,r))&&!lM(o,n)&&!lM(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=m(r,o),a.point(n[0],n[1])):(n=m(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=m(r,o,!0))||(u=0,f?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&lM(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=P(r),c=T(r),u=o*a;null==n?(n=r+o*_4,s=r-u/2):(n=oM(l,n),s=oM(l,s),(0<o?n<s:s<n)&&(n+=o*_4));for(var f,h=n;0<o?s<h:h<s;h-=u)f=U4([l,-c*P(h),-c*T(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-A,d-A])}var vM=1e9,bM=-vM;function xM(m,v,b,x){function w(t,e){return m<=t&&t<=b&&v<=e&&e<=x}function M(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?m:b,1<i?x:v),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return A4(t[0]-m)<N?0<e?0:3:A4(t[0]-b)<N?0<e?2:1:A4(t[1]-v)<N?0<e?1:0:0<e?3:2}function k(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var i,f,a,o,s,l,c,u,h,d,p,y=r,t=sM(),e={point:n,lineStart:function(){e.point=g,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(g(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&y.lineEnd()},polygonStart:function(){y=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(m-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=yu(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),M(null,null,1,r),r.lineEnd()),n&&uM(i,k,t,M,r),r.polygonEnd());y=r,i=f=a=null}};function n(t,e){w(t,e)&&y.point(t,e)}function g(t,e){var n,r,i=w(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(y.lineStart(),y.point(t,e))):i&&h?y.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,f=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max(bM,Math.min(vM,c)),u=Math.max(bM,Math.min(vM,u))],r=[t=Math.max(bM,Math.min(vM,t)),e=Math.max(bM,Math.min(vM,e))],m,v,b,x)?i&&(y.lineStart(),y.point(t,e),p=!1):(h||(y.lineStart(),y.point(n[0],n[1])),y.point(r[0],r[1]),i||y.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function wM(t,e,n){var r=gu(t,e-N,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function MM(t,e,n){var r=gu(t,e-N,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function kM(){return y=p=10,g=90,m=360,v=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(v)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(v)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(g=+t[0],m=+t[1],e):[g,m]},e.stepMinor=function(t){return arguments.length?(p=+t[0],y=+t[1],e):[p,y]},e.precision=function(t){return arguments.length?(v=+t,u=wM(s,o,90),f=MM(r,n,v),h=wM(c,l,90),d=MM(a,i,v),e):v},e.extentMajor([[-180,-90+N],[180,90-N]]).extentMinor([[-180,-80-N],[180,80+N]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return gu(T4(a/g)*g,i,g).map(h).concat(gu(T4(c/m)*m,l,m).map(d)).concat(gu(T4(r/p)*p,n,p).filter(function(t){return A4(t%g)>N}).map(u)).concat(gu(T4(s/y)*y,o,y).filter(function(t){return A4(t%m)>N}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,y,g,m,v}var OM,_M,SM,EM,AM=t=>t,PM=new Hc,NM=new Hc,TM={point:z4,lineStart:z4,lineEnd:z4,polygonStart:function(){TM.lineStart=LM,TM.lineEnd=FM},polygonEnd:function(){TM.lineStart=TM.lineEnd=TM.point=z4,PM.add(A4(NM)),NM=new Hc},result:function(){var t=PM/2;return PM=new Hc,t}};function LM(){TM.point=CM}function CM(t,e){TM.point=jM,OM=SM=t,_M=EM=e}function jM(t,e){NM.add(EM*t-SM*e),SM=t,EM=e}function FM(){jM(OM,_M)}var IM=TM,RM=1/0,BM=RM,DM=-RM,zM=DM;var WM,HM,VM,GM,qM={point:function(t,e){t<RM&&(RM=t);DM<t&&(DM=t);e<BM&&(BM=e);zM<e&&(zM=e)},lineStart:z4,lineEnd:z4,polygonStart:z4,polygonEnd:z4,result:function(){var t=[[RM,BM],[DM,zM]];return DM=zM=-(BM=RM=1/0),t}},YM=0,UM=0,XM=0,$M=0,ZM=0,KM=0,JM=0,QM=0,tk=0,ek={point:nk,lineStart:rk,lineEnd:ok,polygonStart:function(){ek.lineStart=sk,ek.lineEnd=lk},polygonEnd:function(){ek.point=nk,ek.lineStart=rk,ek.lineEnd=ok},result:function(){var t=tk?[JM/tk,QM/tk]:KM?[$M/KM,ZM/KM]:XM?[YM/XM,UM/XM]:[NaN,NaN];return YM=UM=XM=$M=ZM=KM=JM=QM=tk=0,t}};function nk(t,e){YM+=t,UM+=e,++XM}function rk(){ek.point=ik}function ik(t,e){ek.point=ak,nk(VM=t,GM=e)}function ak(t,e){var n=t-VM,r=e-GM,n=I4(n*n+r*r);$M+=n*(VM+t)/2,ZM+=n*(GM+e)/2,KM+=n,nk(VM=t,GM=e)}function ok(){ek.point=nk}function sk(){ek.point=ck}function lk(){uk(WM,HM)}function ck(t,e){ek.point=uk,nk(WM=VM=t,HM=GM=e)}function uk(t,e){var n=t-VM,r=e-GM,n=I4(n*n+r*r);$M+=n*(VM+t)/2,ZM+=n*(GM+e)/2,KM+=n,JM+=(n=GM*t-VM*e)*(VM+t),QM+=n*(GM+e),tk+=3*n,nk(VM=t,GM=e)}var fk=ek;function hk(t){this._context=t}hk.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,_4)}},result:z4};var dk,pk,yk,gk,mk,vk=new Hc,bk={point:z4,lineStart:function(){bk.point=xk},lineEnd:function(){dk&&wk(pk,yk),bk.point=z4},polygonStart:function(){dk=!0},polygonEnd:function(){dk=null},result:function(){var t=+vk;return vk=new Hc,t}};function xk(t,e){bk.point=wk,pk=gk=t,yk=mk=e}function wk(t,e){gk-=t,mk-=e,vk.add(I4(gk*gk+mk*mk)),gk=t,mk=e}var Mk=bk;function kk(){this._string=[]}function Ok(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function _k(e,n){var r,i,a=4.5;function o(t){return t&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),Y4(t,r(i))),i.result()}return o.area=function(t){return Y4(t,r(IM)),IM.result()},o.measure=function(t){return Y4(t,r(Mk)),Mk.result()},o.bounds=function(t){return Y4(t,r(qM)),qM.result()},o.centroid=function(t){return Y4(t,r(fk)),fk.result()},o.projection=function(t){return arguments.length?(r=null==t?(e=null,AM):(e=t).stream,o):e},o.context=function(t){return arguments.length?(i=null==t?(n=null,new kk):new hk(n=t),"function"!=typeof a&&i.pointRadius(a),o):n},o.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),o):a},o.projection(e).context(n)}function Sk(r){return function(t){var e,n=new Ek;for(e in r)n[e]=r[e];return n.stream=t,n}}function Ek(){}function Ak(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Y4(n,t.stream(qM)),e(qM.result()),null!=r&&t.clipExtent(r),t}function Pk(i,a,t){return Ak(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function Nk(t,e,n){return Pk(t,[[0,0],e],n)}function Tk(r,i,t){return Ak(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function Lk(i,a,t){return Ak(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}kk.prototype={_radius:4.5,_circle:Ok(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Ok(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){var t;return this._string.length?(t=this._string.join(""),this._string=[],t):null}},Ek.prototype={constructor:Ek,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Ck=16,jk=P(30*E4);function Fk(t,e){return+e?(E=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,y={point:t,lineStart:e,lineEnd:m,polygonStart:function(){r.polygonStart(),y.lineStart=v},polygonEnd:function(){r.polygonEnd(),y.lineStart=e}};function t(t,e){t=E(t,e),r.point(t[0],t[1])}function e(){u=NaN,y.point=g,r.lineStart()}function g(t,e){var n=X4([t,e]),e=E(t,e);P(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],Ck,r),r.point(u,f)}function m(){y.point=t,r.lineEnd()}function v(){e(),y.point=b,y.lineEnd=x}function b(t,e){g(n=t,e),i=u,a=f,o=h,s=d,l=p,y.point=g}function x(){P(u,f,c,h,d,p,i,a,n,o,s,l,Ck,r),y.lineEnd=m,m()}return y}):(n=t,Sk({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,E,A;function P(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,y,g,m,v,b,x,w,M,k,O=o-t,_=s-e,S=O*O+_*_;4*A<S&&h--&&(g=a+f,x=D4(g/=m=I4((p=r+c)*p+(y=i+u)*y+g*g)),v=A4(A4(g)-1)<N||A4(n-l)<N?(n+l)/2:N4(y,p),b=(x=E(v,x))[0],x=x[1],A<(k=_*(w=b-t)-O*(M=x-e))*k/S||.3<A4((O*w+_*M)/S-.5)||r*c+i*u+a*f<jk)&&(P(t,e,n,r,i,a,b,x,v,p/=m,y/=m,g,h,d),d.point(b,x),P(b,x,v,p,y,g,o,s,l,c,u,f,h,d))}}var Ik=Sk({point:function(t,e){this.stream.point(t*E4,e*E4)}});function Rk(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,y,g,m;return e?(f=P(e),e=T(e),h=f*t,d=e*t,p=f/t,y=e/t,g=(e*r-f*n)/t,m=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-y*e+g),a*(m-y*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,v.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},v);function v(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function Bk(t){return Dk(function(){return t})()}function Dk(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,y=0,g=0,m=0,v=0,b=0,x=1,w=1,M=null,k=gM,O=null,_=AM,S=.5;function E(t){return l(t[0]*E4,t[1]*E4)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*S4,t[1]*S4]}function P(){var t=Rk(f,0,0,x,w,b).apply(null,e(p,y)),t=Rk(f,h-t[0],d-t[1],x,w,b);return r=nM(g,m,v),s=tM(e,t),l=tM(r,s),o=Fk(s,S),N()}function N(){return c=u=null,E}return E.stream=function(t){return c&&u===t?c:c=Ik((n=r,Sk({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(k(o(_(u=t))))));var n},E.preclip=function(t){return arguments.length?(k=t,M=void 0,N()):k},E.postclip=function(t){return arguments.length?(_=t,O=n=i=a=null,N()):_},E.clipAngle=function(t){return arguments.length?(k=+t?mM(M=t*E4):(M=null,gM),N()):M*S4},E.clipExtent=function(t){return arguments.length?(_=null==t?(O=n=i=a=null,AM):xM(O=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),N()):null==O?null:[[O,n],[i,a]]},E.scale=function(t){return arguments.length?(f=+t,P()):f},E.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],P()):[h,d]},E.center=function(t){return arguments.length?(p=t[0]%360*E4,y=t[1]%360*E4,P()):[p*S4,y*S4]},E.rotate=function(t){return arguments.length?(g=t[0]%360*E4,m=t[1]%360*E4,v=2<t.length?t[2]%360*E4:0,P()):[g*S4,m*S4,v*S4]},E.angle=function(t){return arguments.length?(b=t%360*E4,P()):b*S4},E.reflectX=function(t){return arguments.length?(x=t?-1:1,P()):x<0},E.reflectY=function(t){return arguments.length?(w=t?-1:1,P()):w<0},E.precision=function(t){return arguments.length?(o=Fk(s,S=t*t),N()):I4(S)},E.fitExtent=function(t,e){return Pk(E,t,e)},E.fitSize=function(t,e){return Nk(E,t,e)},E.fitWidth=function(t,e){return Tk(E,t,e)},E.fitHeight=function(t,e){return Lk(E,t,e)},function(){return e=t.apply(this,arguments),E.invert=e.invert&&A,P()}}function zk(t){var e=0,n=A/3,r=Dk(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*E4,n=t[1]*E4):[e*S4,n*S4]},t}function Wk(t,e){var n,r,i,a=T(t),o=(a+T(e))/2;return A4(o)<N?(n=P(t),s.invert=function(t,e){return[t/n,D4(e*n)]},s):(i=I4(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=N4(t,A4(e))*F4(e);return e*o<0&&(n-=A*F4(t)*F4(e)),[n/o,D4((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,T(e)/n]}function l(t,e){e=I4(r-2*o*T(e))/o;return[e*T(t*=o),i-e*P(t)]}}function Hk(){return zk(Wk).scale(155.424).center([0,33.6442])}function Vk(){return Hk().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Gk(i){return function(t,e){var n=P(t),r=P(e),n=i(n*r);return n===1/0?[2,0]:[n*r*T(t),n*T(e)]}}function qk(a){return function(t,e){var n=I4(t*t+e*e),r=a(n),i=T(r),r=P(r);return[N4(t*i,n*r),D4(n&&e*i/n)]}}var Yk=Gk(function(t){return I4(2/(1+t))});Yk.invert=qk(function(t){return 2*D4(t/2)});var Uk=Gk(function(t){return(t=B4(t))&&t/T(t)});function Xk(t,e){return[t,C4(R4((k4+e)/2))]}function $k(r){var i,a,o,s=Bk(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=A*l(),n=s((e=nM((e=s.rotate())[0]*E4,e[1]*E4,2<e.length?e[2]*E4:0),function(t){return(t=e.invert(t[0]*E4,t[1]*E4))[0]*=S4,t[1]*=S4,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===Xk?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),f()):null==u?null:[[u,i],[a,o]]},f()}function Zk(t){return R4((k4+t)/2)}function Kk(t,e){var n=P(t),i=t===e?T(t):C4(n/P(e))/C4(Zk(e)/Zk(t)),a=n*j4(Zk(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=F4(i)*I4(t*t+e*e),r=N4(t,A4(e))*F4(e);return e*i<0&&(r-=A*F4(t)*F4(e)),[r/i,2*P4(j4(a/n,1/i))-k4]},r):Xk;function r(t,e){0<a?e<-k4+N&&(e=-k4+N):k4-N<e&&(e=k4-N);e=a/j4(Zk(e),i);return[e*T(i*t),a-e*P(i*t)]}}function Jk(t,e){return[t,e]}function Qk(t,e){var n=P(t),r=t===e?T(t):(n-P(e))/(e-t),i=n/r+t;return A4(r)<N?Jk:(a.invert=function(t,e){var e=i-e,n=N4(t,A4(e))*F4(e);return e*r<0&&(n-=A*F4(t)*F4(e)),[n/r,i-F4(r)*I4(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*T(t),i-e*P(t)]}}Uk.invert=qk(function(t){return t}),Xk.invert=function(t,e){return[t,2*P4(L4(e))-k4]},Jk.invert=Jk;var t6=1.340264,e6=-.081106,n6=893e-6,r6=.003796,i6=I4(3)/2;function a6(t,e){var e=D4(i6*T(e)),n=e*e,r=n*n*n;return[t*P(e)/(i6*(t6+3*e6*n+r*(7*n6+9*r6*n))),e*(t6+e6*n+r*(n6+r6*n))]}function o6(t,e){var n=P(e),r=P(t)*n;return[n*T(t)/r,T(e)/r]}function s6(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function l6(t,e){return[P(e)*T(t),T(e)]}function c6(t,e){var n=P(e),r=1+P(t)*n;return[n*T(t)/r,T(e)/r]}function u6(t,e){return[C4(R4((k4+e)/2)),-t]}a6.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(t6+e6*i+a*(n6+r6*i))-e)/(t6+3*e6*i+a*(7*n6+9*r6*i)))*r)*i*i,!(A4(n)<M4));++o);return[i6*t*(t6+3*e6*i+a*(7*n6+9*r6*i))/P(r),D4(T(r)/i6)]},o6.invert=qk(P4),s6.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),A4(a)>N&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},l6.invert=qk(D4),c6.invert=qk(function(t){return 2*P4(t)}),u6.invert=function(t,e){return[-e,2*P4(L4(t))-k4]};var f6=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=Vk(),l=Hk().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Hk().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function h(){return e=n=null,f}return f.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},f.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+N,r+.12*e+N],[n-.214*e-N,r+.234*e-N]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+N,r+.166*e+N],[n-.115*e-N,r+.234*e-N]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return Pk(f,t,e)},f.fitSize=function(t,e){return Nk(f,t,e)},f.fitWidth=function(t,e){return Tk(f,t,e)},f.fitHeight=function(t,e){return Lk(f,t,e)},f.scale(1070)},geoAlbers:Vk,geoAzimuthalEqualArea:function(){return Bk(Yk).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:Yk,geoAzimuthalEquidistant:function(){return Bk(Uk).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:Uk,geoConicConformal:function(){return zk(Kk).scale(109.5).parallels([30,30])},geoConicConformalRaw:Kk,geoConicEqualArea:Hk,geoConicEqualAreaRaw:Wk,geoConicEquidistant:function(){return zk(Qk).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:Qk,geoEqualEarth:function(){return Bk(a6).scale(177.158)},geoEqualEarthRaw:a6,geoEquirectangular:function(){return Bk(Jk).scale(152.63)},geoEquirectangularRaw:Jk,geoGnomonic:function(){return Bk(o6).scale(144.049).clipAngle(60)},geoGnomonicRaw:o6,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,y=1,g=1,m=Sk({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=AM;function b(){return y=l*f,g=l*h,o=s=null,x}function x(t){var e,n=t[0]*y,t=t[1]*g;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/y,t/g]},x.stream=function(t){return o&&s===t?o:o=m(v(s=t))},x.postclip=function(t){return arguments.length?(v=t,p=e=n=a=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(p=e=n=a=null,AM):xM(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=T(d=t%360*E4),r=P(d),b()):d*S4},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return Pk(x,t,e)},x.fitSize=function(t,e){return Nk(x,t,e)},x.fitWidth=function(t,e){return Tk(x,t,e)},x.fitHeight=function(t,e){return Lk(x,t,e)},x},geoProjection:Bk,geoProjectionMutator:Dk,geoMercator:function(){return $k(Xk).scale(961/_4)},geoMercatorRaw:Xk,geoNaturalEarth1:function(){return Bk(s6).scale(175.295)},geoNaturalEarth1Raw:s6,geoOrthographic:function(){return Bk(l6).scale(249.5).clipAngle(90+N)},geoOrthographicRaw:l6,geoStereographic:function(){return Bk(c6).scale(250).clipAngle(142)},geoStereographicRaw:c6,geoTransverseMercator:function(){var t=$k(u6),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:u6});function h6(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function d6(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter(y6),e.find(t=>t.sphere)?{type:"Sphere"}:h6(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=_k(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function p6(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[kM()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function y6(t){return"geoPath"===t.type}var g6,Xo=()=>t=>{var{children:e,projection:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=K(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Ls(t);if(e=f6[e])return e;throw new Error("Unknown projection: "+t)}(r),p=e.map(p6);let y;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinates:[{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(d6(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);y=_k(i);const u=new Zp({domain:[t,t+n]}),f=new Zp({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}}],children:p.flatMap(t=>{return y6(t)?(e=t.style,Object.assign(Object.assign({},t),{type:"path",style:Object.assign(Object.assign({},e),{d:t=>y(t)})})):t;var e})})]},Qo=(Xo.props={},()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=K(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a}]})]});Qo.props={};const m6={"composition.geoView":Xo,"composition.geoPath":Qo};function v6(){return Object.assign({"data.fetch":Ih,"data.inline":Gh,"data.sortBy":Vh,"data.filter":Bh,"data.pick":Wh,"data.rename":Hh,"data.subset":zh,"data.fold":Rh,"data.custom":qh,"data.map":Yh,"data.cluster":wh,"data.tree":Mh,"data.sankey":sf,"data.arc":Zh,"data.wordCloud":gd,"data.join":vd,"transform.maybeZeroY1":nw,"transform.maybeZeroX":gw,"transform.maybeStackY":pw,"transform.maybeTitle":yw,"transform.maybeSeries":xw,"transform.maybeZeroPadding":Sw,"transform.stackY":hw,"transform.binX":m3,"transform.bin":g3,"transform.dodgeX":Tw,"transform.jitter":Iw,"transform.jitterX":Rw,"transform.symmetryY":Bw,"transform.diffY":Dw,"transform.stackEnter":Lw,"transform.normalizeY":Cw,"transform.select":Gw,"transform.selectX":qw,"transform.selectY":Yw,"transform.groupX":i3,"transform.groupY":a3,"transform.groupColor":o3,"transform.group":r3,"transform.maybeSize":vw,"transform.maybeZeroY":mw,"transform.maybeKey":bw,"transform.sortX":l3,"transform.sortY":u3,"transform.sortColor":c3,"transform.flexX":f3,"transform.maybeTupleY":ww,"transform.maybeTupleX":Mw,"transform.maybeIdentityY":kw,"transform.maybeIdentityX":Ow,"transform.maybeTuple":Pw,"transform.maybeVisualPosition":Ew,"transform.maybeFunctionAttribute":Aw,"transform.maybeGradient":Nw,"transform.maybeTooltip":_w,"transform.pack":d3,"coordinate.cartesian":el,"coordinate.polar":nl,"coordinate.helix":rl,"coordinate.transpose":il,"coordinate.theta":ll,"coordinate.reflect":al,"coordinate.reflectX":ol,"coordinate.reflectY":sl,"coordinate.parallel":ul,"coordinate.fisheye":fl,"coordinate.fisheyeX":hl,"coordinate.fisheyeY":dl,"coordinate.radial":cl,"encode.constant":pl,"encode.field":gl,"encode.transform":yl,"encode.column":ml,"mark.interval":Lc,"mark.rect":Cc,"mark.line":Eu,"mark.point":Au,"mark.text":Pu,"mark.cell":Nu,"mark.area":Tu,"mark.link":Lu,"mark.image":Cu,"mark.polygon":ju,"mark.box":Fu,"mark.vector":Iu,"mark.lineX":Bu,"mark.lineY":Ru,"mark.connector":Du,"mark.range":Hu,"mark.rangeX":Vu,"mark.rangeY":Gu,"mark.sankey":pf,"mark.path":yf,"mark.treemap":xf,"mark.pack":wf,"mark.boxplot":Nf,"mark.shape":Tf,"mark.forceGraph":bh,"mark.tree":kh,"mark.wordCloud":bd,"palette.category10":xd,"palette.category20":wd,"palette.sequentialBlue":Md,"palette.sequentialDarkBlue":kd,"palette.sequentialGreen":Od,"palette.sequentialDarkGreen":_d,"palette.sequentialGrey":Sd,"palette.sequentialOrange":Ed,"palette.sequentialPink":Ad,"palette.sequentialRed":Pd,"palette.sequentialYellow":Nd,"palette.sequentialPurple":Td,"palette.sequentialYellowOrange":Ld,"palette.sequentialYellowGreen":Cd,"palette.sequentialPinkPurple":jd,"palette.sequentialGreenBlue":Fd,"palette.divergingGreenYellow":Id,"palette.divergingRedBlue":Rd,"palette.divergingGreenRed":Bd,"palette.divergingRedPurple":Dd,"scale.linear":k0,"scale.ordinal":O0,"scale.band":M0,"scale.identity":_0,"scale.point":S0,"scale.time":E0,"scale.log":A0,"scale.pow":P0,"scale.sqrt":C0,"scale.threshold":N0,"scale.quantile":T0,"scale.quantize":L0,"scale.sequential":j0,"shape.interval.rect":Z1,"shape.interval.hollow":K1,"shape.interval.funnel":J1,"shape.interval.pyramid":ty,"shape.rect.rect":Z1,"shape.rect.hollow":K1,"shape.cell.cell":Z1,"shape.cell.hollow":K1,"shape.line.line":iy,"shape.line.hv":oy,"shape.line.vh":sy,"shape.line.hvh":ly,"shape.line.smooth":ay,"shape.point.bowtie":fy,"shape.point.cross":hy,"shape.point.diamond":dy,"shape.point.hexagon":py,"shape.point.hollowBowtie":yy,"shape.point.hollowDiamond":gy,"shape.point.hollowHexagon":my,"shape.point.hollow":vy,"shape.point.hollowSquare":by,"shape.point.hollowTriangle":xy,"shape.point.hollowTriangleDown":wy,"shape.point.hyphen":My,"shape.point.line":ky,"shape.point.plus":Oy,"shape.point.point":_y,"shape.point.square":Sy,"shape.point.tick":Ey,"shape.point.triangle":Ay,"shape.point.triangleDown":Py,"shape.text.text":f2,"shape.area.area":g2,"shape.area.smooth":m2,"shape.area.step":v2,"shape.link.smooth":x2,"shape.link.vhv":w2,"shape.link.arc":M2,"shape.link.link":b2,"shape.image.image":k2,"shape.polygon.polygon":O2,"shape.polygon.ribbon":_2,"shape.box.box":S2,"shape.vector.vector":Ny,"shape.label.label":D2,"shape.text.badge":d2,"shape.lineX.line":E2,"shape.lineY.line":E2,"shape.shape.shape":V2,"shape.connector.connector":N2,"shape.range.range":Z1,"shape.rangeX.range":Z1,"shape.rangeY.range":Z1,"shape.path.path":W2,"shape.path.hollow":H2,"theme.light":U2,"theme.dark":K2,"component.axisX":mx,"component.axisY":vx,"component.legendCategory":bx,"component.legendContinuous":xx,"component.title":kx,"animation.scaleInX":Px,"animation.scaleOutX":Nx,"animation.scaleInY":Tx,"animation.scaleOutY":Lx,"animation.waveIn":zx,"animation.fadeIn":Cx,"animation.fadeOut":jx,"animation.zoomIn":Wx,"animation.zoomOut":Hx,"animation.pathIn":Vx,"animation.morphing":Dx,"animation.growInX":Gx,"animation.growInY":qx,"interaction.elementHighlight":r5,"interaction.elementHighlightByX":i5,"interaction.elementHighlightByColor":a5,"interaction.elementSelect":s5,"interaction.elementSelectByX":l5,"interaction.elementSelectByColor":c5,"interaction.fisheye":f5,"interaction.chartIndex":u5,"interaction.tooltip":w5,"composition.spaceLayer":_5,"composition.spaceFlex":S5,"composition.mark":A5,"composition.view":E5,"composition.facetRect":B5,"composition.repeatMatrix":H5,"composition.facetCircle":X5,"composition.timingKeyframe":$5,"labelTransform.hideOverlap":m4,"labelTransform.dodgeY":b4,"labelTransform.spider":x4,"labelTransform.surround":w4},m6)}function b6(t,e,...n){t&&(t[e]||[]).forEach(t=>{t.apply(this,n)})}function x6(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||cf("Unknown Component: "+t)};return[t=>{var e=t["type"],t=K(t,["type"]);return r(e)(Object.assign({},t))},r]}function h(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}(Bo=g6=g6||{}).BEFORE_RENDER="beforerender",Bo.AFTER_RENDER="afterrender",Bo.BEFORE_PAINT="beforepaint",Bo.AFTER_PAINT="afterpaint",Bo.BEFORE_CHANGE_DATA="beforechangedata",Bo.AFTER_CHANGE_DATA="afterchangedata",Bo.BEFORE_CLEAR="beforeclear",Bo.AFTER_CLEAR="afterclear",Bo.BEFORE_DESTROY="beforedestroy",Bo.AFTER_DESTROY="afterdestroy",Bo.BEFORE_CHANGE_SIZE="beforechangesize",Bo.AFTER_CHANGE_SIZE="afterchangesize";o=h("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),r=h("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),a=h("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),e=h("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Go=h("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),_a=h("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Wo=h("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ab=h("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Ho=h("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),hc=h("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function w6(t,e,n){(t.prototype=e.prototype=n).constructor=t}function M6(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function k6(){}var O6=1/.7,n="\\s*([+-]?\\d+)\\s*",Do="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ta="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_6=/^#([0-9a-f]{3,8})$/,S6=new RegExp(`^rgb\\(${n},${n},${n}\\)$`),E6=new RegExp(`^rgb\\(${ta},${ta},${ta}\\)$`),A6=new RegExp(`^rgba\\(${n},${n},${n},${Do}\\)$`),P6=new RegExp(`^rgba\\(${ta},${ta},${ta},${Do}\\)$`),N6=new RegExp(`^hsl\\(${Do},${ta},${ta}\\)$`),T6=new RegExp(`^hsla\\(${Do},${ta},${ta},${Do}\\)$`),L6={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 C6(){return this.rgb().formatHex()}function j6(){return this.rgb().formatRgb()}function F6(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=_6.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?I6(e):3===n?new z6(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?R6(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?R6(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=S6.exec(t))?new z6(e[1],e[2],e[3],1):(e=E6.exec(t))?new z6(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=A6.exec(t))?R6(e[1],e[2],e[3],e[4]):(e=P6.exec(t))?R6(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=N6.exec(t))?Y6(e[1],e[2]/100,e[3]/100,1):(e=T6.exec(t))?Y6(e[1],e[2]/100,e[3]/100,e[4]):L6.hasOwnProperty(t)?I6(L6[t]):"transparent"===t?new z6(NaN,NaN,NaN,0):null}function I6(t){return new z6(t>>16&255,t>>8&255,255&t,1)}function R6(t,e,n,r){return new z6(t=r<=0?e=n=NaN:t,e,n,r)}function B6(t){return(t=t instanceof k6?t:F6(t))?new z6((t=t.rgb()).r,t.g,t.b,t.opacity):new z6}function D6(t,e,n,r){return 1===arguments.length?B6(t):new z6(t,e,n,null==r?1:r)}function z6(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function W6(){return"#"+q6(this.r)+q6(this.g)+q6(this.b)}function H6(){var t=V6(this.opacity);return(1===t?"rgb(":"rgba(")+G6(this.r)+`, ${G6(this.g)}, `+G6(this.b)+(1===t?")":`, ${t})`)}function V6(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function G6(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function q6(t){return((t=G6(t))<16?"0":"")+t.toString(16)}function Y6(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new X6(t,e,n,r)}function U6(t){var e,n,r,i,a,o,s,l;return t instanceof X6?new X6(t.h,t.s,t.l,t.opacity):(t=t instanceof k6?t:F6(t))?t instanceof X6?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new X6(o,s,l,t.opacity)):new X6}function X6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function $6(t){return(t=(t||0)%360)<0?t+360:t}function Z6(t){return Math.max(0,Math.min(1,t||0))}function K6(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}w6(k6,F6,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:C6,formatHex:C6,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return U6(this).formatHsl()},formatRgb:j6,toString:j6}),w6(z6,D6,M6(k6,{brighter(t){return t=null==t?O6:Math.pow(O6,t),new z6(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new z6(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new z6(G6(this.r),G6(this.g),G6(this.b),V6(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:W6,formatHex:W6,formatHex8:function(){return"#"+q6(this.r)+q6(this.g)+q6(this.b)+q6(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:H6,toString:H6})),w6(X6,function(t,e,n,r){return 1===arguments.length?U6(t):new X6(t,e,n,null==r?1:r)},M6(k6,{brighter(t){return t=null==t?O6:Math.pow(O6,t),new X6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new X6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new z6(K6(240<=t?t-240:120+t,n,e),K6(t,n,e),K6(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new X6($6(this.h),Z6(this.s),Z6(this.l),V6(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(){var t=V6(this.opacity);return(1===t?"hsl(":"hsla(")+$6(this.h)+`, ${100*Z6(this.s)}%, ${100*Z6(this.l)}%`+(1===t?")":`, ${t})`)}}));const J6=Math.PI/180,Q6=180/Math.PI;var t8=1.78277,e8=-.29227,n8=-.90649,r8=1.97294,i8=r8*n8,a8=r8*t8,o8=t8*e8- -.14861*n8;function s8(t,e,n,r){return 1===arguments.length?(i=t)instanceof l8?new l8(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof z6?i:B6(i)).r/255,o=i.g/255,l=i.b/255,l=(r8*(o-(a=(o8*l+i8*a-a8*o)/(o8+i8-a8)))-e8*(o=l-a))/n8,new l8((l=(s=Math.sqrt(l*l+o*o)/(r8*a*(1-a)))?Math.atan2(l,o)*Q6-120:NaN)<0?l+360:l,s,a,i.opacity)):new l8(t,e,n,null==r?1:r);var i,a,o,s,l}function l8(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}w6(l8,s8,M6(k6,{brighter(t){return t=null==t?O6:Math.pow(O6,t),new l8(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new l8(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*J6,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new z6(255*(e+n*(-.14861*r+t8*t)),255*(e+n*(e8*r+n8*t)),255*(e+r8*r*n),this.opacity)}}));var c8=t=>()=>t;function u8(e,n){return function(t){return e+t*n}}function f8(a){return 1==(a=+a)?h8:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):c8(isNaN(t)?e:t);var n,r,i}}function h8(t,e){var n=e-t;return n?u8(t,n):c8(isNaN(t)?e:t)}!function t(e){var o=f8(e);function n(e,t){var n=o((e=D6(e)).r,(t=D6(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=h8(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);d8=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var d8,p8=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=D6(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=d8(r),i=d8(i),a=d8(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function y8(s){return function t(o){function e(e,t){var n=s((e=s8(e)).h,(t=s8(t)).h),r=h8(e.s,t.s),i=h8(e.l,t.l),a=h8(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}y8(function(t,e){var n=e-t;return n?u8(t,180<n||n<-180?n-360*Math.round(n/360):n):c8(isNaN(t)?e:t)});var Vo=y8(h8),aa=t=>p8(t[t.length-1]),sa=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(h),oa=aa(sa),ca=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(h),c=aa(ca),la=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(h),ua=aa(la),Ve=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(h),ha=aa(Ve),ya=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(h),da=aa(ya),u=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(h),zo=aa(u),ga=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(h),pa=aa(ga),Ro=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(h),qo=aa(Ro),fa=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(h),ba=aa(fa),Uo=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(h),Xo=aa(Uo),Qo=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(h),Bo=aa(Qo),n=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(h),ta=aa(n),Do=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(h),g8=aa(Do),m8=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(h),v8=aa(m8),b8=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(h),x8=aa(b8),w8=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(h),M8=aa(w8),k8=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(h),O8=aa(k8),_8=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(h),S8=aa(_8),E8=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(h),A8=aa(E8),P8=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(h),N8=aa(P8),T8=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(h),L8=aa(T8),C8=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(h),j8=aa(C8),F8=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(h),I8=aa(F8),R8=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(h),B8=aa(R8),D8=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(h),z8=aa(D8),W8=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(h),H8=aa(W8),V8=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(h),aa=aa(V8);var G8=Vo(s8(300,.5,0),s8(-240,.5,1)),q8=Vo(s8(-100,.75,.35),s8(80,1.5,.8)),Vo=Vo(s8(260,.75,.35),s8(80,1.5,.8)),Y8=s8();var U8=D6(),X8=Math.PI/3,$8=2*Math.PI/3;function Z8(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var K8=Z8(h("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),J8=Z8(h("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Q8=Z8(h("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),tO=Z8(h("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),eO=Object.freeze({__proto__:null,schemeCategory10:o,schemeAccent:r,schemeDark2:a,schemePaired:e,schemePastel1:Go,schemePastel2:_a,schemeSet1:Wo,schemeSet2:Ab,schemeSet3:Ho,schemeTableau10:hc,interpolateBrBG:oa,schemeBrBG:sa,interpolatePRGn:c,schemePRGn:ca,interpolatePiYG:ua,schemePiYG:la,interpolatePuOr:ha,schemePuOr:Ve,interpolateRdBu:da,schemeRdBu:ya,interpolateRdGy:zo,schemeRdGy:u,interpolateRdYlBu:pa,schemeRdYlBu:ga,interpolateRdYlGn:qo,schemeRdYlGn:Ro,interpolateSpectral:ba,schemeSpectral:fa,interpolateBuGn:Xo,schemeBuGn:Uo,interpolateBuPu:Bo,schemeBuPu:Qo,interpolateGnBu:ta,schemeGnBu:n,interpolateOrRd:g8,schemeOrRd:Do,interpolatePuBuGn:v8,schemePuBuGn:m8,interpolatePuBu:x8,schemePuBu:b8,interpolatePuRd:M8,schemePuRd:w8,interpolateRdPu:O8,schemeRdPu:k8,interpolateYlGnBu:S8,schemeYlGnBu:_8,interpolateYlGn:A8,schemeYlGn:E8,interpolateYlOrBr:N8,schemeYlOrBr:P8,interpolateYlOrRd:L8,schemeYlOrRd:T8,interpolateBlues:j8,schemeBlues:C8,interpolateGreens:I8,schemeGreens:F8,interpolateGreys:B8,schemeGreys:R8,interpolatePurples:z8,schemePurples:D8,interpolateReds:H8,schemeReds:W8,interpolateOranges:aa,schemeOranges:V8,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:G8,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Y8.h=360*t-100,Y8.s=1.5-1.5*e,Y8.l=.8-.9*e,Y8+""},interpolateWarm:q8,interpolateCool:Vo,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,U8.r=255*(e=Math.sin(t))*e,U8.g=255*(e=Math.sin(t+X8))*e,U8.b=255*(e=Math.sin(t+$8))*e,U8+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:K8,interpolateMagma:J8,interpolateInferno:Q8,interpolatePlasma:tO});function nO(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function rO(t,e,n,r,i){var a=t[0],t=t[1],o=j();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function iO(t,e,n,r,i){var a=new Zp({range:[e,e+r]}),o=new Zp({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function aO(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function oO(t,e,n,r,i){return t[0]}function sO(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new Zp({range:[s,t]}),c=new Zp({range:[a,o]}),u=1<(s=i/r)?1:s,f=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=nO(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function lO(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function cO(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return yO.apply(void 0,gO([[-1,-1]],e,!1))}function uO(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return yO.apply(void 0,gO([[-1,1]],e,!1))}function fO(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return yO.apply(void 0,gO([[1,-1]],e,!1))}function hO(t,e,n,r,i){var a,t=t[0],o=j();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function dO(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new Zp({range:[s,s+.99*l]}),f=new Zp({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=nO(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function pO(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new Zp({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new Kp({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var yO=function(t,e,n,r,i){var a=t[0],t=t[1],o=j();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},gO=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function mO(t){return 1/Math.tan(t)}function vO(t,e,n,r,i){var a=mO(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function bO(t,e,n,r,i){var a=mO(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function xO(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function wO(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function MO(t,e,n){return n?new Zp({range:[0,1],domain:[0,e]}).map(t):t}function kO(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=MO(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[xO(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[wO(e,s,o,0,1),t]}}}function OO(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=MO(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],xO(t[1],s,o,0,1)]},untransform:function(t){return[t[0],wO(t[1],s,o,0,1)]}}}function _O(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=MO(a,r,t=void 0!==t&&t),u=MO(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[xO(e,c,s,0,1),xO(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[wO(e,c,s,0,1),wO(t,u,l,0,1)]}}}function SO(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new Zp({range:[0,r]}),u=new Zp({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=xO(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=wO(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var EO=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},AO=(PO.prototype.update=function(t){this.options=I({},this.options,t),this.recoordinate()},PO.prototype.clone=function(){return new PO(this.options)},PO.prototype.getOptions=function(){return this.options},PO.prototype.clear=function(){this.update({transformations:[]})},PO.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},PO.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},PO.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:EO(EO([],n,!0),[EO([],t,!0)],!1)}),this},PO.prototype.map=function(t){return this.output(t)},PO.prototype.invert=function(t){return this.input(t)},PO.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},PO.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?EO([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p(EO([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||Xs,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):Xs}.apply(void 0,a)},PO.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=j();return e&&t.reverse(),t.forEach(function(t){return z(p,p,t)}),e&&(e=t=p,(d=new O(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return Tt(t,t,p),[t[0],t[1]]}},PO);function PO(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:iO,translate:rO,custom:aO,matrix:oO,polar:sO,transpose:lO,scale:yO,"shear.x":vO,"shear.y":bO,reflect:cO,"reflect.x":uO,"reflect.y":fO,rotate:hO,helix:dO,parallel:pO,fisheye:_O,"fisheye.x":kO,"fisheye.y":OO,"fisheye.circular":SO},this.update(t)}function NO(t){return void 0!==t.find(t=>"polar"===t.type)}function TO(t){return void 0!==t.find(t=>"helix"===t.type)}function LO(t){return t.filter(({type:t})=>"transpose"===t).length%2==1}function CO(t){return void 0!==t.find(t=>"theta"===t.type)}function jO(t){return void 0!==t.find(t=>"radial"===t.type)}function FO(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:"string"==typeof i?"linear":2<(r||i||[]).length?zO(t):void 0===r?VO(e)?zO(t):GO(e)?"time":WO(t,i):VO([r])?zO(t):GO(e)?"time":WO(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)ff(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[a||o,i||s];case"band":case"ordinal":case"point":return HO(e);case"quantile":return function(t){return HO(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)ff(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[a||o,i||s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=Ep,nice:n=!1,tickCount:r=10}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:CO(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=Ls(e),i=eO["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"sqrt":var u=DO(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return DO(n,r,i,a,o);case"sequential":return;default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function IO(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(RO)?Wc(e):t.every(BO)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function RO(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function BO(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function DO(t,e,n,r,i){var[i]=x6("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r,offset:a}=e;return function(t,n,r=t=>t){if(!t)return null;const e=Ls(t),i=eO["scheme"+e],a=eO["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a)||i({type:r||t})}function zO(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function WO(t,e){return"color"!==t||e?"linear":"sequential"}function HO(t){return Array.from(new Set(t.flat()))}function VO(t){return qO(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function GO(t){return qO(t,t=>t instanceof Date)}function qO(t,e){for(const n of t)if(n.some(e))return!0;return!1}function YO(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=K(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function UO(t,i,a){return ne(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=x6("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=K(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>ne(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),lf)}([K(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?W1(n):[],Object.assign(Object.assign({},i),{data:n})]})}function XO(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function $O(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=z1(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date)return;t=t.type;return ff(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"!=typeof n||void 0===(null==(e=null==e?void 0:e[0])?void 0:e[n])?"constant":"field",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function ZO(t,e,n){var r=e["encode"];return r?(r=z1(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{visual:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function KO(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=x6("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=z1(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function JO(l,t,e){var n,r=t["encode"],i=K(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=K(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function QO(t,e,n){const{axis:r={},legend:i={}}=e,a=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var o="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return I(e,{scale:Object.assign(Object.assign({},Object.fromEntries(o.map(t=>[t,{guide:a(r,t)}]))),{color:{guide:a(i,"color")},size:{guide:a(i,"size")}})}),[t,e]}function t_(t,e,n){var r=e["animate"];return r||void 0===r||I(e,{animate:{enterType:null,exitType:null,updateType:null}}),[t,e]}function e_(s,l,c){return ne(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return ne(this,void 0,void 0,function*(){var t=c["library"],[t]=x6("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[YO,UO,XO,$O,ZO,KO,JO,t_,QO,...e.map(t),...r.map(t),...n.map(t)];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(s,l,{library:c});const{encode:n,scale:u,data:r}=e;if(!1===Array.isArray(r))return null;const i=l["channels"],a=Xc(Object.entries(n).filter(([,t])=>ff(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=i.find(t=>t.name===e);return null!=n&&n.independent?t:e});var o=i.filter(t=>{const{name:e,required:n}=t;if(a.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:s,scaleKey:l,range:c}=t;return a.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=u[t]||{},{independent:a=!1,key:o=l||t,type:r=r?"identity":s}=i,i=K(i,["independent","key","type"]);return{name:t,values:e,scaleKey:a?Symbol("independent"):o,scale:Object.assign({type:r,range:c},i)}})});return[e,Object.assign(Object.assign({},l),{index:t,channels:o})]})}function n_(t,e,n){var r,{component:e=[],coordinates:i=[],title:a,theme:o}=e,[,s]=x6("component",n),n=t.filter(({guide:t})=>null!==t),l=[...e];a&&(t=s("title")["props"],{defaultPosition:e,defaultOrder:t,defaultSize:r}=t,o=function(t){var{size:t,text:e,subtitle:n,style:r,subtitleStyle:i}=t;if(t)return t;r=null!=(t=null==r?void 0:r.fontSize)?t:14,t=null!=(t=null==i?void 0:i.fontSize)?t:12,i=(null==i?void 0:i.spacing)||0;return(e?r+4:0)+(n?t+i:0)}(I({size:r},o,r="string"==typeof a?{text:a}:a)),l.push(Object.assign({type:"title",position:e,order:t,size:o},r)));for(const b of n){var c=function(t,e){var{name:t,guide:n,type:r}=t,n=n["type"];if(void 0!==n)return n;if("color"===t)switch(r){case"ordinal":return"legendCategory";case"linear":return"legendContinuous";default:return null}return LO(e)&&NO(e)||TO(e)||CO(e)?null:t.startsWith("x")?LO(e)?"axisY":"axisX":t.startsWith("y")?LO(e)?"axisX":"axisY":t.startsWith("position")&&!NO(e)?"axisY":null}(b,i);if(null!==c){var u=s(c)["props"],{defaultPosition:f,defaultSize:h,defaultOrder:d}=u,{guide:u,name:p,field:y}=b;for(const x of Array.isArray(u)?u:[u]){var g=function(t,e,n,r,i){n=["left","right","top","bottom","centerHorizontal","center"].includes(r.position)?r.position:n;{if("axisY"===e&&function(t){return void 0!==t.find(t=>"parallel"===t.type)}(i))return null===(t=/position(\d*)/g.exec(t))?n:(t=+t[1],LO(i)?0==t?"top":"centerVertical":0==t?n:"centerHorizontal");if("axisX"===e&&NO(i)&&!LO(i)||"axisY"===e&&NO(i)&&LO(i)||"axisY"===e&&CO(i)||"axisY"===e&&TO(i)||"axisY"===e&&jO(i))return"bottom"===r.position?"arcInner":"arc";if(NO(i)&&("axisX"===e||"axisY"===e))return"arcY";if(jO(i)&&"axisX"===e)return"arcY";if("axisX"===e&&function(t){return void 0!==t.find(t=>"reflect"===t.type)}(i)||"axisX"===e&&function(t){return void 0!==t.find(t=>"reflectY"===t.type)}(i))return"top";if("string"==typeof e&&e.startsWith("legend")&&NO(i)&&"center"===r.position)return"arcCenter"}return n}(p,c,f,x,i),{size:m=h,order:v=d}=x;l.push(Object.assign(Object.assign({title:y},x),{position:g,order:v,size:m,type:c,scale:b}))}}}return l}function r_(t,e,n,r){var[i]=x6("scale",r),[r]=x6("component",r),{scale:a,bbox:o}=t,t=K(t,["scale","bbox"]),i=a?i(a):null,{field:a,domain:s}=a||{},a={field:a,domain:s,bbox:o};return r(t)(i,a,e,n)}function i_(t,e){var t=function(t,e){var n=Yc(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,a={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom"]){var o="padding"+function(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}(l);if(void 0===a[o])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);a[o]=s}else a[o]=30}return a}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a}=t,{width:e,height:o,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:f=c,insetBottom:h=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:y=d,marginTop:g=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:o,insetLeft:u,insetTop:f,insetBottom:h,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:o-i-a-g-y,marginLeft:p,marginBottom:y,marginTop:g,marginRight:d,x:s,y:l})}function a_(t,e,n){var I=Yc(t,t=>t.position),{paddingLeft:t,paddingRight:n,paddingTop:r,paddingBottom:R,marginLeft:i,marginTop:a,marginBottom:B,marginRight:D,innerHeight:o,innerWidth:s,height:z,width:W}=n,t=t+i,i=r+a,r=n+D,a=R+B,H={top:[t,0,s,i,0,!0,jc],right:[W-r,i,r,o,1,!1,jc],bottom:[t,z-a,s,a,0,!1,jc],left:[0,i,t,o,1,!0,jc],centerHorizontal:[t,i,s,o,-1,null,null],centerVertical:[t,i,s,o,-1,null,null],arc:[t,i,s,o,-1,null,null],arcY:[t,i,s,o,-1,null,null],arcInner:[t,i,s,o,-1,null,null],center:[t,i,s,o,-1,null,null],arcCenter:[t,i,s,o,-1,null,null]};for(const[F,t]of I.entries()){var l=H[F];if("centerHorizontal"===F)!function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(t,e,l);else if("centerVertical"===F)!function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(t,e,l);else if("arc"===F){p=d=h=f=u=c=void 0;var c=t,u=l,[f,h,d,p]=u;for(let t=0;t<c.length;t++)c[t].bbox={x:f,y:h,width:d,height:p}}else if("arcY"===F){k=M=w=x=b=m=g=v=u=y=void 0;var y=t,u=e,[g,m,,v]=v=l,[b,x]=u.getCenter(),[u,w]=o_(u),M=x-w*(v=v/2),k=(w-u)*v;for(let t=0;t<y.length;t++)y[t].bbox={x:b+g,y:M+m,width:0,height:k}}else if("arcInner"===F){N=P=A=E=v=S=_=w=x=O=void 0;var O=t,x=e,[_,S,,w]=w=l,[v,E]=x.getCenter(),[x]=o_(x),A=x*(w=w/2),P=v-A,N=E-A;for(let t=0;t<O.length;t++)O[t].bbox={x:_+P,y:S+N,width:2*A,height:2*A}}else if("arcCenter"===F){Y=q=j=C=G=V=L=E=T=void 0;var T=t,E=e,[L,V,G,C]=L=l,[E]=o_(E),j=C/2*E/Math.sqrt(2),q=L+G/2,Y=V+C/2;for(let t=0;t<T.length;t++)T[t].bbox={x:q-j,y:Y-j,width:2*j,height:2*j}}else!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,y,g]=0===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],m=(n.sort((t,e)=>l(t.order,e.order)),s?u+p:u);for(let t=0,e=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[y]:g},e+=b*(s?-1:1)}}(t,l)}}function o_(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[t,e]}function s_(P,N,T,L){return ne(this,void 0,void 0,function*(){const[n]=x6("composition",T);var[t]=x6("interaction",T);const e=new Set(Object.keys(T).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(ff)),r=t=>{t=t.type;return"string"==typeof t&&e.has(t)?"mark":t};const i=t=>"standardView"===r(t);var a=t=>{var e;return i(t)?[t]:(e=r(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[P],u=[];c.length;){var f=c.shift();if(i(f)){var h=l.get(f),[h,d]=h?f_(h,f,T):yield c_(f,T),p=(s.set(h,f),o.push(h),d.flatMap(a));if(c.push(...p),p.every(i)){var y=yield Promise.all(p.map(t=>u_(t,T)));IO(h=(h=y).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),IO(h,"y");for(let t=0;t<p.length;t++){var g=p[t],m=y[t];l.set(g,m)}}}else{d="mark"===r(f)?f:yield m_(f,T),h=a(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}var v=P["on"];b6(v,g6.BEFORE_PAINT);const b=new Map,x=[];N.selectAll(w_(C)).data(o,t=>t.key).join(t=>t.append("g").attr("className",C).attr("id",t=>t.key).call(l_).each(function(t){h_(t,Q(this),x,T),b.set(t,this)}),t=>t.call(l_).each(function(t){h_(t,Q(this),x,T)}),t=>t.remove());var w=Array.from(b.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,a,o){return r=>ne(this,void 0,void 0,function*(){var[t,e]=yield c_(r,a);h_(t,i,[],a);for(const n of e)s_(n,i,a,o);return{options:r,view:t}})}(Q(e),T,L)}));for(const S of w){const P=S["options"];for(const E of function(t){var{interactions:t=[]}=t;return t}(P))t(E)(S,w)}const{width:M,height:k}=P;var O=[];for(const A of u){var _=new Promise(e=>ne(this,void 0,void 0,function*(){for(const t of A)yield s_(Object.assign({width:M,height:k},t),N,T,L);e()}));O.push(_)}L.animations=x,b6(v,g6.AFTER_PAINT);v=x.filter(ff).map(y_).map(t=>t.finished);return Promise.all([...v,...O])})}function l_(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function c_(t,e){return ne(this,void 0,void 0,function*(){return f_(yield u_(t,e),t,e)})}function u_(v,b){return ne(this,void 0,void 0,function*(){var[t]=x6("theme",b);const[i,a]=x6("mark",b);var{theme:e,marks:n,coordinates:r=[]}=v,o=t(g_(e)),s=new Map,l=[];for(const p of n){var c=yield m_(p,b);l.push(c)}for(const y of yield Promise.all(l.map(r=>ne(this,void 0,void 0,function*(){const{type:t=cf("G2Mark type is required."),key:n}=r;var e=a(t)["props"],{composite:e=!1}=e;return e?(yield i(r)(v)).map((t,e)=>Object.assign({key:n+"-"+e},t)):r}))).then(t=>t.flat())){var u,f=y["type"],f=a(f)["props"],f=yield e_(y,f,b);f&&([f,u]=f,s.set(f,u))}for(const g of Yc(Array.from(s.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var h=g.reduce((t,{scale:e})=>I(t,e),{}),d=g[0]["values"],d=Array.from(new Set(d.map(t=>t.field).filter(ff)));const v=I({guide:{title:0===d.length?void 0:d},field:d[0]},h);d=g[0]["name"];const m=FO(d,g.flatMap(({values:t})=>t.map(t=>t.value)),v,r,o,b);g.forEach(t=>t.scale=m)}return s})}function f_(t,e,n){var[r]=x6("mark",n);const[i]=x6("scale",n);var a,o,[s]=x6("theme",n),{key:l,frame:c=!1,theme:u,style:f={}}=e,s=s(g_(u)),u=Array.from(t.values()),u=Array.from(new Set(u.flatMap(t=>t.channels.map(t=>t.scale)))),u=n_(Array.from(u),e,n),h=i_(u,e),d=function(t,e,n){var[n]=x6("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new AO(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(h,e,n),e=c?I({mainlineWidth:1,mainStroke:"#000"},f):f,p=(a_(u,d,h),{}),y=[];for([a,o]of t.entries()){const{children:b,dataDomain:x,modifier:w,key:M}=a;var{index:g,channels:m}=o,v=z1(Object.fromEntries(m.map(({name:t,scale:e})=>[t,e])),t=>{var e=t["relations"],[e]=function(o){if(!o||!Array.isArray(o))return[lf,lf];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(e);return e(i(t))});Object.assign(p,v);const k=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(m,v),[O,_,S]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>ff(t)&&ff(e))&&(r.push(a),i.push(o))}return[r,i]}(r(a)(g,v,k,d));m=x||O.length;const E=w?w(_,m,h):[];g=O.map((t,e)=>{var n={points:_[e],transform:E[e],index:t,markKey:M};for(const[r,i]of Object.entries(k))n[r]=i[t],S&&(n["series"+Ls(r)]=S[e].map(t=>i[t]));return S&&(n.seriesIndex=S[e]),n}),m=(o.data=g,o.index=O,null==b?void 0:b(g,v,h));y.push(...m||[])}return[{layout:h,theme:s,coordinate:d,components:u,markState:t,key:l,scale:p,style:e},y]}function h_(U,X,$,Z){ne(this,void 0,void 0,function*(){const{components:I,theme:n,layout:t,markState:e,coordinate:r,key:i,style:R}=U,{width:B,height:D}=t,z=K(t,["x","y","width","height"]),a=["view","plot","main","content"];var o,s,l,c=a.map((t,e)=>e);const u=a.map(t=>hf(Object.assign({},n,R),t)),W=["a","margin","padding","inset"].map(t=>J(z,t)),f=t=>t.style("x",t=>g[t].x).style("y",t=>g[t].y).style("width",t=>g[t].width).style("height",t=>g[t].height).each(function(t){var e,n,r=Q(this),t=u[t];for([e,n]of Object.entries(t))r.style(e,n)});let h=0,d=0,p=B,y=D;const g=c.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=W[t];return h+=t,d+=e,p-=t+r,y-=e+n,{x:h,y:d,width:p,height:y}}),m=(X.selectAll(w_(at)).data(c.filter(t=>ff(u[t])),t=>a[t]).join(t=>t.append("rect").attr("className",at).style("zIndex",-2).call(f),t=>t.call(f),t=>t.remove()),X.selectAll(w_(rt)).data(I,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",rt).append(t=>r_(t,r,n,Z)),t=>t.each(function(t){var t=r_(t,r,n,Z)["attributes"],[e]=this.childNodes;e.update(Object.assign({},t))})),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{updateType:a,updateDuration:o=300,updateDelay:s=0,enterType:l,enterDuration:c=300,enterDelay:u=0,exitType:f,exitDuration:h=300,exitDelay:d=0}=r;for(const k of i){var{updateType:p=a,updateDuration:y=o,updateDelay:g=s,enterType:m=l,enterDuration:v=c,enterDelay:b=u,exitDuration:x=h,exitDelay:w=d,exitType:M=f}=k;void 0!==p&&!p||(e=Math.max(e,y+g),n=Math.min(n,g)),void 0!==M&&!M||(e=Math.max(e,x+w),n=Math.min(n,w)),void 0!==m&&!m||(e=Math.max(e,v+b),n=Math.min(n,b))}}return e===-1/0?null:[n,e-n]}(e)),v=X.selectAll(w_(nt)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",nt).call(v_).call(x_,Array.from(e.keys())),t=>t.call(x_,Array.from(e.keys())).call(t=>{if(!m)return v_(t);{const[l,c]=m;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}})).transitions();$.push(...v.flat());for([o,s]of e.entries()){var H=s["data"];const{key:i,class:_}=o,S=function(l,t,e,n){const[c]=x6("shape",n),u=l["data"],{defaultShape:f,data:r}=t,h=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:y,style:g={}}=l;return(t,e)=>{var{shape:n=f}=g,{shape:n=n,points:r,seriesIndex:i,index:a}=t,t=K(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:y,defaultShape:f,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=z1(g,t=>d_(t,o,s,u));return c(Object.assign(Object.assign({},e),{type:b_(l,n)}))(r,t,p,d,h)}}(o,s,U,Z),E=(b=o,l=s,p_("enter",b,l,U,Z)),A=(b=o,l=s,p_("update",b,l,U,Z)),P=(b=o,l=s,p_("exit",b,l,U,Z));var b=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(X,_,"element");const v=X.select("#"+i).selectAll(w_(et)).selectFacetAll(b).data(H,t=>t.key,t=>t.groupKey).join(t=>t.append(S).attr("className",et).transition(function(t){return E(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,i=c,n.__facet__&&(a=n.parentNode.parentNode,s=r.parentNode,[a,o]=i(a),[i,s]=i(s),a=`translate(${a-i}, ${o-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+a).trimStart(),r.append(n));var n,r,i,a,o=S(t,e),s=A(t,[this],[o]);return null===s&&uf(this,o),s})}),t=>t.transition(function(t){return P(t,[this])}).remove(),t=>t.append(S).attr("className",et).transition(function(t){var e=this["__fromElements__"],t=A(t,e,[this]);return new C1(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new C1([],this.__toData__,this.parentNode).append(S).attr("className",et).nodes();return A(t,[this],e)}).remove()).transitions();$.push(...v.flat())}{var x=U,w=X,M=Z,k,O;const[N]=x6("labelTransform",M),{markState:V,labelTransform:T}=x,G=w.select(w_(tt)).node(),L=new Map,C=new Map,q=Array.from(V.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=x6("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t}=t,t=z1(K(t,["formatter"]),t=>d_(t,r,e,l)),{shape:a=c,text:o}=t,t=K(t,["shape","text"]),i="string"==typeof i?ox(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,x,M),a=w.select("#"+r).selectAll(w_(et)).nodes();return n.flatMap((e,n)=>{const r=K(e,["transform"]);return a.flatMap(t=>{t=function(n,r,t){const{seriesIndex:e,seriesKey:i,points:a,key:o,index:s}=t.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(t);if(!e)return[Object.assign(Object.assign({},n),{key:o+"-"+r,bounds:l,index:s,points:a})];var t=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),c=e.map((t,e)=>Object.assign(Object.assign({},n),{key:i[e]+"-"+r,bounds:[a[e]],index:t,points:a}));return t?t(c):c}(r,n,t);return t.forEach(t=>{L.set(t,i),C.set(t,e)}),t})})}),j=Q(G).selectAll(w_(it)).data(q,t=>t.key).join(t=>t.append(t=>L.get(t)(t)).attr("className",it),t=>t.each(function(t){uf(this,L.get(t)(t))}),t=>t.remove()).nodes(),Y=Yc(j,t=>C.get(t.__data__)),F=x["coordinate"];for([k,O]of Y){var{transform:k=[]}=k;(function(t){return t.reduce((n,r)=>(t,...e)=>r(n(t,...e),...e),lf)})(k.map(N))(O,F)}T&&T(j,F)}})}function d_(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function p_(o,t,e,n,r){var[,i]=x6("shape",r);const[s]=x6("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${Ls(o)}Animation`;const{[e]:c}=i(b_(t,r)).props,{[o]:u={}}=a,f=J(t.animate||{},o);return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function y_(t){return t.finished.then(()=>{t.cancel()}),t}function g_(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function m_(r,i){return ne(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=K(r,["data"]);return null==e?r:([,{data:e}]=yield UO(0,{data:e},t),Object.assign({data:e},n))})}function v_(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function b_(t,e){t=t.type;return t+"."+e}function x_(t,e){const n=t=>void 0!==t.class?""+t.class:"";t.selectAll(w_(k)).data(e,t=>t.key).join(t=>t.append("g").attr("className",k).attr("id",t=>t.key).style("facet",n).style("fill","transparent"),t=>t.style("facet",n),t=>t.remove()),t.select(w_(tt)).node()||t.append("g").attr("className",tt)}function w_(...t){return t.map(t=>"."+t).join("")}function M_(t){for(var t=I({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];e.set(l,o),n.set(l,t),r.push(l)}}return t}function k_(t,e={},n){const{width:r=640,height:i=480,autoFit:a=!1,on:o}=t,s=M_(t),{canvas:l=(u=r,f=i,h=new v.Renderer,h.registerPlugin(new os),new F.Canvas({width:u,height:f,container:document.createElement("div"),renderer:h})),library:c=v6()}=e;var u,f,h;e.canvas=l,e.library=c,a&&!e.bindAutoFit&&([u,f={}]=[t,e],u.autoFit&&window.addEventListener("resize",__(u,f)),e.bindAutoFit=!0),l.resize(r,i),b6(o,g6.BEFORE_RENDER);const d=Q(l.document.documentElement);return l.ready.then(()=>s_(Object.assign(Object.assign({},s),{width:r,height:i}),d,c,e)).then(n).then(()=>b6(o,g6.AFTER_RENDER)),"string"==typeof(h=l.getConfig().container)?document.getElementById(h):h}function O_(t,e={}){var n,r=t["on"],i=e["canvas"];i&&i.destroy(),[i,t={}]=[t,e],i.autoFit&&window.removeEventListener("resize",__(i,t)),(e=r)&&(n?delete e[n]:e={})}const __=(i,a={})=>{return r=()=>{var{width:t,height:e,autoFit:n}=i,r=a["canvas"],{width:r,height:n}=mf(r.getConfig().container,n,t,e),t=Object.assign(Object.assign({},i),{width:r,height:n});t.width&&t.height&&k_(t,a)},o=300,function(){var t=this,e=arguments,n=s&&!l;clearTimeout(l),l=setTimeout(function(){l=null,s||r.apply(t,e)},o),n&&r.apply(t,e)};var r,o,s,l};function S_(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class p{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return S_(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return S_(this,t=>{e===t.type&&n.push(t)}),n}changeData(t){let e=this;for(;e&&e.parentNode;)e=e.parentNode;this.attr("data",t),e.render()}call(t,...e){return t(this.map(),...e),this}}function E_(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function A_(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function P_(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length?this.attr(r,t):((n=this.attr(r)||{})[t]=e,this.attr(r,n))}}function N_(t,{name:e,key:i=e}){t.prototype[e]=function(t,e){var n,r=this.attr(i)||{};return 0===arguments.length?r:1===arguments.length?r[t]:((n=r[t])?hs(e)?n.concat(e):n.push(e):r[t]=hs(e)?e:[e],this.attr(i,r))}}function y(r){return t=>{for(const n of r){var e=n["type"];"value"===e?E_(t,n):"array"===e?A_(t,n):"object"===e?P_(t,n):"node"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.append(n)}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"event"===e&&N_(t,n)}return t}}function T_(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}o=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"}];let L_=class extends p{constructor(){super({},"interval")}},C_=(L_=t([y(o)],L_),class extends p{constructor(){super({},"rect")}}),j_=(C_=t([y(o)],C_),class extends p{constructor(){super({},"point")}}),F_=(j_=t([y(o)],j_),class extends p{constructor(){super({},"area")}}),I_=(F_=t([y(o)],F_),class extends p{constructor(){super({},"line")}}),R_=(I_=t([y(o)],I_),class extends p{constructor(){super({},"cell")}}),B_=(R_=t([y(o)],R_),class extends p{constructor(){super({},"vector")}}),D_=(B_=t([y(o)],B_),class extends p{constructor(){super({},"link")}}),z_=(D_=t([y(o)],D_),class extends p{constructor(){super({},"polygon")}});z_=t([y(o)],z_);r=t([y(o)],class extends p{constructor(){super({},"image")}});let W_=class extends p{constructor(){super({},"text")}},H_=(W_=t([y(o)],W_),class extends p{constructor(){super({},"box")}}),V_=(H_=t([y(o)],H_),class extends p{constructor(){super({},"lineX")}}),G_=(V_=t([y(o)],V_),class extends p{constructor(){super({},"lineY")}}),q_=(G_=t([y(o)],G_),class extends p{constructor(){super({},"range")}}),Y_=(q_=t([y(o)],q_),class extends p{constructor(){super({},"rangeX")}}),U_=(Y_=t([y(o)],Y_),class extends p{constructor(){super({},"rangeY")}}),X_=(U_=t([y(o)],U_),class extends p{constructor(){super({},"connector")}}),$_=(X_=t([y(o)],X_),class extends p{constructor(){super({},"shape")}}),Z_=($_=t([y(o)],$_),class extends p{constructor(){super({},"sankey")}}),K_=(Z_=t([y([...o,{name:"layout",type:"value"}])],Z_),class extends p{constructor(){super({},"treemap")}}),J_=(K_=t([y([...o,{name:"layout",type:"value"}])],K_),class extends p{constructor(){super({},"boxplot")}}),Q_=(J_=t([y(o)],J_),class extends p{constructor(){super({},"pack")}}),tS=(Q_=t([y([...o,{name:"layout",type:"value"}])],Q_),class extends p{constructor(){super({},"forceGraph")}}),eS=(tS=t([y([...o,{name:"layout",type:"value"}])],tS),class extends p{constructor(){super({},"tree")}}),nS=(eS=t([y([...o,{name:"layout",type:"value"}])],eS),class extends p{constructor(){super({},"wordCloud")}});nS=t([y([...o,{name:"layout",type:"object"}])],nS);a={interval:L_,rect:C_,point:j_,area:F_,line:I_,cell:R_,vector:B_,link:D_,polygon:z_,image:r,text:W_,box:H_,lineX:V_,lineY:G_,range:q_,rangeX:Y_,rangeY:U_,connector:X_,sankey:Z_,treemap:K_,boxplot:J_,shape:$_,pack:Q_,forceGraph:tS,tree:eS,wordCloud:nS};let rS=class extends p{constructor(){super({},"view")}},iS=(rS=t([y([{type:"value",name:"data"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...T_(a)])],rS),class extends p{constructor(){super({},"spaceLayer")}}),aS=(iS=t([y([{type:"value",name:"data"},...T_(a)])],iS),class extends p{constructor(){super({},"spaceFlex")}}),oS=(aS=t([y([{type:"value",name:"data"},...T_(a)])],aS),class extends p{constructor(){super({},"facetRect")}}),sS=(oS=t([y([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...T_(a)])],oS),class extends p{constructor(){super({},"facetCircle")}}),lS=(sS=t([y([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...T_(a)])],sS),class extends p{constructor(){super({},"repeatMatrix")}}),cS=(lS=t([y([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...T_(a)])],lS),class extends p{constructor(){super({},"timingKeyframe")}}),uS=(cS=t([y([...T_(a)])],cS),class extends p{constructor(){super({},"geoView")}}),fS=(uS=t([y([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...T_(a)])],uS),class extends p{constructor(){super({},"geoPath")}});fS=t([y([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...T_(a)])],fS);var hS={view:rS,spaceLayer:iS,spaceFlex:aS,facetRect:oS,facetCircle:sS,repeatMatrix:lS,timingKeyframe:cS,geoView:uS,geoPath:fS};for(const yS of Object.values(hS))y(T_(hS))(yS);const dS=v6();function pS(t){return Object.assign(Object.assign({},t.value),{type:t.type})}e=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"theme",type:"object"},{name:"title",type:"object"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},{name:"on",type:"event"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},...T_(a),...Object.entries(hS).map(([t,e])=>({type:"container",name:t,ctor:e}))];g.Chart=class extends p{constructor(t={}){var e=t["container"];super(K(t,["container"]),"view"),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._context={library:dS}}render(){this._context.canvas||({width:r=640,height:a=480,renderer:o,plugins:t,autoFit:e}=this.options(),{width:e,height:n}=mf(this._container,e,r,a),this.width(e),this.height(n),this._context.canvas=([e,n,r,i=new v.Renderer,a=[]]=[document.createElement("div"),r,a,o,t],a.push(new os),a.forEach(t=>i.registerPlugin(t)),new F.Canvas({container:e,width:n,height:r,renderer:i})));var t,e,n,r,i,a,o=k_(this.options(),this._context);return o.parentNode!==this._container&&this._container.append(o),this}options(){var t,e=this,e=null!==(e=e).type?e:((t=e.children[e.children.length-1]).attr("width",e.attr("width")),t.attr("height",e.attr("height")),t.attr("paddingLeft",e.attr("paddingLeft")),t.attr("paddingTop",e.attr("paddingTop")),t.attr("paddingBottom",e.attr("paddingBottom")),t.attr("paddingRight",e.attr("paddingRight")),t.attr("insetLeft",e.attr("insetLeft")),t.attr("insetRight",e.attr("insetRight")),t.attr("insetBottom",e.attr("insetBottom")),t.attr("insetTop",e.attr("insetTop")),t.attr("marginLeft",e.attr("marginLeft")),t.attr("marginBottom",e.attr("marginBottom")),t.attr("marginTop",e.attr("marginTop")),t.attr("marginRight",e.attr("marginRight")),t.attr("autoFit",e.attr("autoFit")),t.attr("padding",e.attr("padding")),t.attr("margin",e.attr("margin")),t.attr("inset",e.attr("inset")),t),n=[e],r=new Map;for(r.set(e,pS(e));n.length;){const e=n.pop();var i=r.get(e);for(const s of e.children){var a=pS(s),{children:o=[]}=i;o.push(a),n.push(s),r.set(s,a),i.children=o}}return r.get(e)}node(){return this._container}context(){return this._context}destroy(){var t,e=this.options(),n=e["on"];b6(n,g6.BEFORE_DESTROY),O_(e,this._context),e=this._container,(t=e.parentNode)&&t.removeChild(e),b6(n,g6.AFTER_DESTROY)}clear(){var t=this.options(),e=t["on"];b6(e,g6.BEFORE_CLEAR),O_(t,this._context),b6(e,g6.AFTER_CLEAR)}forceFit(){var{width:t,height:e}=this.options(),{width:t,height:e}=mf(this._container,!0,t,e);this.changeSize(t,e)}changeSize(t,e){var{width:n,height:r,on:i}=this.options();if(n===t&&r===e)return this;b6(i,g6.BEFORE_CHANGE_SIZE),this.width(t),this.height(e),this.render(),b6(i,g6.AFTER_CHANGE_SIZE)}},g.Chart=t([y(e)],g.Chart),g.AREA_CLASS_NAME=at,g.COMPONENT_CLASS_NAME=rt,g.ELEMENT_CLASS_NAME=et,g.LABEL_CLASS_NAME=it,g.LABEL_LAYER_CLASS_NAME=tt,g.MAIN_LAYER_CLASS_NAME=k,g.PLOT_CLASS_NAME=nt,g.VIEW_CLASS_NAME=C,g.createLibrary=v6,g.destroy=O_,g.register=function(t,e){Object.assign(dS,{[t]:e})},g.render=k_,g.renderToMountedElement=function(t,e={},n){const{width:r=640,height:i=480,on:a}=t;var t=M_(t),{library:o=v6(),group:s=new F.Group}=e;if(function(t){if(!fs(t)){if(ss(t))return!t.length;var e,n=js(t);if("Map"===n||"Set"===n)return!t.size;if(Is(t))return!Object.keys(t).length;for(e in t)if(Vs.call(t,e))return}return 1}(null==s?void 0:s.parentElement))throw new Error("Unmounted group");var l=Q(s);return e.group=s,e.library=o,b6(a,g6.BEFORE_RENDER),s_(Object.assign(Object.assign({},t),{width:r,height:i}),l,o,e).then(n).then(()=>b6(a,g6.AFTER_RENDER)),s},Object.defineProperty(g,"__esModule",{value:!0})});
|
|
7
|
+
`}([h,d,f,s]))}c-=u,l+=1}return o}function fx(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function hx(t,e,n,r){var i,a,o,s,l,c,u,f,h,d=e["nodeName"],p=n["nodeName"],g=F.convertToPath(e),y=F.convertToPath(n);return d===p&&"path"!==d||(void 0===g||void 0===y)?(p=n,d=r,[o,l,s,h]=cx(i=e),[c,u,f,a]=(fx(p,i),cx(p)),o=[Object.assign({transform:`translate(${o-c}, ${l-u}) scale(${s/f}, ${h/a})`},ex(i,nx)),Object.assign({transform:"translate(0, 0) scale(1, 1)"},ex(p,nx))],p.animate(o,d)):(c=g,s="path"===(u=(l=t)["nodeName"])?l:(fx(u=new F.Path({style:Object.assign(Object.assign({},ex(l,nx)),{d:c})}),l),u),f=[Object.assign({path:g},ex(e,nx)),Object.assign({path:y},ex(n,nx))],h=s.animate(f,r),s.style.transform="scale(1, 1)",s.style.transform="none",h)}lx.props={};const dx=g=>(t,e,n,r,i)=>{[a="pack"]=[g.split];var a="function"==typeof a?a:ux,i=Q2(i,n,g),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[c]=e,hx(s,s,c,i);if(1===n&&1<o){var[s]=t;{var l=s,c=e,u=i,s=a;l.style.visibility="hidden";const d=s(l,c.length);return c.map((t,e)=>{return hx(t,new F.Path({style:Object.assign({path:d[e]},ex(l,nx))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,f=n,h=i;const p=(e=a)(f,o.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=f.style,e=f.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],h);return[...o.map((t,e)=>{return hx(t,t,new F.Path({style:{path:p[e],fill:f.style.fill}}),h)}),e]}}return null},px=(dx.props={},b=>{return F.CSS.registerProperty({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:F.PropertySyntax.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!vu(r))return rx(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:s=0,inset:l=0,fillOpacity:c,strokeOpacity:u,opacity:f}=e,{points:e,y:t,y1:h}=(Z(e,["radius","inset","fillOpacity","strokeOpacity","opacity"]),t);const d=a1().cornerRadius(s).padAngle(l*Math.PI/180),p=q1(r,e,[t,h]),{startAngle:g,endAngle:y}=p,m=new F.Path({}),v=t=>{m.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=F.convertToPath(m);return m.style.transform="none",t};s=[{waveInArcAngle:g+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:g+1e-4,fillOpacity:c,strokeOpacity:u,opacity:f,offset:.01},{waveInArcAngle:y,fillOpacity:c,strokeOpacity:u,opacity:f}],l=a.animate(s,Q2(i,n,b));return l.onframe=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},l.onfinish=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:y}))},l}}),gx=(px.props={},c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,t=[{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l}],{width:o,height:s}=a.getBoundingClientRect(),l=(a.setOrigin([o/2,s/2]),a.animate(t,Q2(i,n,c)));return l.finished.then(()=>a.setOrigin(0,0)),l}}),yx=c=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:l}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:l,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:l}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,l/2]),a.animate(o,Q2(i,n,c)));return t.finished.then(()=>a.setOrigin(0,0)),t}},mx=o=>(t,e,n,r,i)=>{var[t]=t,a=(null==(a=t.getTotalLength)?void 0:a.call(t))||0;return t.animate([{lineDash:[0,a]},{lineDash:[a,0]}],Q2(i,n,o))},vx=(mx.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new F.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=rx(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),bx=(vx.props={},l=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new F.Path({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=ax(l)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o});function xx(t){return Q(t).selectAll("."+et).nodes()}function wx(t){return Q(t).select("."+nt).node()}function kx(t,e){var{offsetX:e,offsetY:n}=e,{min:[t,r],max:[i,a]}=t.getBounds();return e<t||i<e||(n<r||a<n)?null:[e-t,n-r]}function Mx(t){return t&&0!==Object.keys(t).length?t:{highlightedLineWidth:1,highlightedStroke:"#000"}}function Ox(){return t=>t.__data__.color}function _x(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function Sx(t){t=Array.from(t.markState.keys());const n=new Map(t.map(t=>[t.key,t.data]));return t=>{var{index:t,markKey:e}=t.__data__;return n.get(e)[t]}}function Ex(o,s=(t,e)=>t){const l="__states__",c="__ordinal__",i=t=>{var{[l]:e=[],[c]:n={}}=t,e=e.reduce((t,e)=>Object.assign(Object.assign({},t),J(o,e)),n);if(0!==Object.keys(e).length){for(var[r,i]of Object.entries(e)){var a=t.getAttribute(r),i=s(i,t);t.setAttribute(r,i),r in n||(n[r]=a)}t[c]=n}},a=t=>{t[l]||(t[l]=[])};return{setState:(t,...e)=>{a(t),t[l]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[l].indexOf(r);-1!==r&&t[l].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[l].indexOf(e))}}function Ax(r,i){const a=new Map(r.map((t,e)=>[t,e]));return(t,e)=>{var n;return"function"!=typeof t?t:(n=a.get(e),t(i?i(e):e,n,i?r.map(i):r))}}function Tx(l,t){var{valueof:c=(t,e)=>t}=t,u=Z(t,["valueof"]);const f="element-link";return[(t,e)=>{if(!(t.length<=1)){var n=t.map(t=>[t,t.getBBox()]);n.sort(([,t],[,e])=>{var{x:t,y:n}=t,{x:e,y:r}=e;return t-e==0?n-r:t-e});for(let t=1;t<n.length;t++){var r=D0();const[o,s]=n[t-1];var[,i]=n[t],i=(r.moveTo(s.x+s.width,s.y),r.lineTo(i.x,i.y),r.lineTo(i.x,i.y+i.height),r.lineTo(s.x+s.width,s.y+s.height),r.closePath(),D1(u,t=>c(t,o))),{fill:a=o.getAttribute("fill")}=i,i=Z(i,["fill"]),r=new F.Path({className:f+(e?" "+e:""),style:Object.assign({d:r.toString(),fill:a},i)});l.appendChild(r)}}},t=>{t=t||f;for(const e of l.getElementsByClassName(t)||[])e.remove()}]}function Px(t,e){var{elements:n,datum:r,groupKey:i=t=>t,link:a=!1}=e,e=Z(e,["elements","datum","groupKey","link"]);const o=n(t),s=new Set(o),l=qc(o,i);n=Ax(o,r);const[c,u]=Tx(t,Object.assign({elements:o,valueof:n},J(e,"link"))),{setState:f,removeState:h}=Ex(e,n),d=t=>{t=t.target;if(s.has(t)){var t=i(t),t=l.get(t),e=new Set(t);for(const n of o)e.has(n)?f(n,"highlighted"):f(n,"unhighlighted");a&&c(t)}},p=t=>{t=t.target;if(s.has(t)){for(const e of o)h(e,"unhighlighted","highlighted");a&&u()}};return t.addEventListener("pointerover",d),t.addEventListener("pointerout",p),()=>{t.removeEventListener("pointerover",d),t.removeEventListener("pointerout",p)}}function Nx(n){return t=>{var{container:t,view:e}=t;return Px(t,Object.assign(Object.assign({},Mx(n)),{elements:xx,datum:Sx(e)}))}}function Lx(n={selectedLineWidth:1,selectedColor:"black"}){return t=>{var{container:t,view:e}=t;return Px(t,Object.assign(Object.assign({},Mx(n)),{elements:xx,datum:Sx(e),groupKey:_x(e)}))}}function Cx(n){return t=>{var{container:t,view:e}=t;return Px(t,Object.assign(Object.assign(Object.assign({},n),Mx(n)),{elements:xx,datum:Sx(e),groupKey:Ox()}))}}function jx(t,e){var{elements:n,datum:r,groupKey:l=t=>t,link:c=!1,single:u=!1}=e,e=Z(e,["elements","datum","groupKey","link","single"]);const f=n(t),h=new Set(f),d=qc(f,l);n=Ax(f,r);const[p,g]=Tx(t,Object.assign({elements:f,valueof:n},J(e,"link"))),{setState:y,removeState:i,hasState:m}=Ex(e,n),v=()=>{for(const t of f)i(t,"selected","unselected");c&&g()},a=t=>{t=t.target;if(!h.has(t))return v();if(u){var e=t;if(m(e,"selected"))v();else{var e=l(e),e=d.get(e),n=new Set(e);for(const i of f)n.has(i)?y(i,"selected"):y(i,"unselected");c&&(g(),p(e))}}else{e=t;var t=l(e),r=d.get(t);const a=new Set(r);if(m(e,"selected")){if(!f.some(t=>!a.has(t)&&m(t,"selected")))return v();for(const o of r)y(o,"unselected");c&&g(t)}else{e=r.some(t=>m(t,"selected"));for(const s of f)a.has(s)?y(s,"selected"):m(s,"selected")||y(s,"unselected");!e&&c&&p(r,t)}}};return t.addEventListener("click",a),()=>{t.removeEventListener("click",a)}}function Fx(n){return t=>{var{container:t,view:e}=t;return jx(t,Object.assign(Object.assign({},Mx(n)),{elements:xx,datum:Sx(e)}))}}function Ix(n){return t=>{var{container:t,view:e}=t;return jx(t,Object.assign(Object.assign({},Mx(n)),{elements:xx,datum:Sx(e),groupKey:_x(e)}))}}function Rx(n){return t=>{var{container:t,view:e}=t;return jx(t,Object.assign(Object.assign({},Mx(n)),{elements:xx,datum:Sx(e),groupKey:Ox()}))}}function Bx(t){var{wait:O=20,leading:_,trailing:S=!1,labelFormatter:E=t=>""+t}=t,A=Z(t,["wait","leading","trailing","labelFormatter"]);return t=>{const{options:e,view:n,container:r,update:i}=t,{markState:a,scale:o,coordinate:s}=n;t=function(t,e,r){var[t]=Array.from(t.entries()).filter(([t])=>t.type===e).map(([t])=>{const n=t["encode"];return Object.fromEntries(r.map(t=>{var e=n[t];return[t,e?e.value:void 0]}))});return t}(a,"line",["x","y","series"]);if(!t)return;const{y:h,x:d,series:l=[]}=t;t=h.map((t,e)=>e);const c=Kc(t.map(t=>d[t])),u=I({},e),f=u.marks.find(t=>"line"===t.type);t=ou(Yc(t,t=>ou(t,t=>+h[t])/lu(t,t=>+h[t]),t=>l[t]).values());I(f,{scale:{y:{domain:[1/t,t]}}});const p=wx(r),g=r.getElementsByClassName(et);const y=qc(r.getElementsByClassName(it),t=>t.__data__.key.split("-")[0]),m=new F.Line({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},J(A,"rule"))}),v=new F.Text({style:Object.assign({x:0,y:p.getAttribute("height"),text:"",fontSize:10},J(A,"label"))}),b=(m.append(v),p.appendChild(m),(t,e,n)=>{var[t]=t.invert(n),n=e.invert(t);return c[Ic(c,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",E(e))};let w;var k;const M=Js(t=>{t=kx(p,t);if(t){var{scale:e,coordinate:n}=w,{x:e,y:r}=e,i=b(n,e,t);x(t,i);for(const u of g){var{seriesIndex:a,key:o}=u.__data__,s=a[jc(t=>d[+t]).center(a,i)],l=[0,r.map(1)],s=[0,r.map(h[s]/h[a[0]])],[,a]=n.map(l),[,l]=n.map(s),c=a-l,s=(u.setAttribute("transform",`translate(0, ${c})`),y.get(o)||[]);for(const f of s)f.setAttribute("dy",c)}}},O,{leading:_,trailing:S});return k=[0,0],re(this,void 0,void 0,function*(){var t=o["x"];const n=b(s,t,k);x(k,n);t=function(t){var{transform:e=[]}=t,n=e.find(t=>"normalizeY"===t.type);return n||(e.push(n={type:"normalizeY"}),t.transform=e,n)}(f);t.groupBy="color",t.basis=(t,e)=>{return e[t[jc(t=>d[+t]).center(t,n)]]};for(const e of u.marks)e.animate=!1;t=yield i(u);w=t.view}),p.addEventListener("pointerenter",M),p.addEventListener("pointermove",M),p.addEventListener("pointerleave",M),()=>{m.remove(),p.removeEventListener("pointerenter",M),p.removeEventListener("pointermove",M),p.removeEventListener("pointerleave",M)}}}function Dx({wait:l=30,leading:c,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=wx(n),a=I({},e);for(const s of a.marks)s.animate=!1;const o=Js(t=>{var e,n,t=kx(i,t);t&&([t,e]=t,(n=function(t){var{coordinates:e=[]}=t,n=e.find(t=>"fisheye"===t.type);return n||(e.push(n={type:"fisheye"}),t.coordinates=e,n)}(a)).focusX=t,n.focusY=e,n.isVisual=!0,r(a))},l,{leading:c,trailing:u});return i.addEventListener("pointerenter",o),i.addEventListener("pointermove",o),i.addEventListener("pointerleave",o),()=>{i.removeEventListener("pointerenter",o),i.removeEventListener("pointermove",o),i.removeEventListener("pointerleave",o)}}}function zx(t,e,n,r){var i=t.tooltipElement||function(t,e,n){var{min:[r,i],max:[a,o]}=t.getBounds(),e=new lb({className:"tooltip",style:{x:e,y:n,container:{x:0,y:0},items:[],bounding:{x:r,y:i,width:a-r,height:o-i},position:"bottom-right",offset:[10,10],style:{".tooltip":{},".tooltip-title":{overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}}}});return t.getRootNode().defaultView.getConfig().container.appendChild(e.HTMLTooltipElement),e}(t,n,r),{items:e,title:a}=e;i.show(),i.update({x:n,y:r,items:e,title:a}),t.tooltipElement=i}function Gx(t){t=t.tooltipElement;t&&t.hide()}function Wx(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>uf(t)))}function Hx(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e||n}=t;return t}function Vx(n,a,o,t=n.map(t=>t.__data__)){e=t.map(t=>t.title);var e=Array.from(new Set(e)).filter(uf),t=t.flatMap((r,t)=>{var t=n[t],e=Z(r,["title"]);const i=Hx(t);return Object.entries(e).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=o[t].getOptions();return Object.assign({color:i,name:function(t,e){var{color:t,series:n}=t,{color:e,series:r}=e;return t&&t.invert?t.invert(e):n&&n.invert?n.invert(r):null}(o,r)||n,value:void 0===e?e:""+e},Wx(a({channel:t,value:e})))}).filter(({value:t})=>void 0!==t)});return Object.assign(Object.assign({},0<e.length&&{title:e.join(",")}),{items:t})}function qx(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function Yx(t,e){return void 0===t?e:t}function Ux(l,t){var{elements:e,wait:n=50,leading:r=!0,trailing:i=!1,scale:c,coordinate:u,showCrosshairs:f,item:h}=t,t=Z(t,["elements","wait","leading","trailing","scale","coordinate","showCrosshairs","item"]);const d=e(l),[,p]=function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return[n-t,r-e]}(l),g=new Map(d.map(t=>{var e=t["__data__"],e=e["seriesX"];return[t,Kc(e)]})),y=J(t,"crosshairs"),a=Js(t=>{const r=kx(l,t);var t=l.getBounds(),e=t.min[0],t=t.min[1];if(r){var n=d.map(t=>{var e=g.get(t),t=((t,n)=>{t=t.__data__;return Object.fromEntries(Object.entries(t).filter(([t])=>t.startsWith("series")).map(([t,e])=>{e=e[n];return[Rs(t.replace("series","")),e]}))})(t,((t,e)=>{var[t]=u.invert(t);return Ic(e,t)})(r,e)),{x:e,y:n}=t;return[t,u.map([e,n])]}),i=n.map(t=>t[0]),n=n.map(t=>t[1]),i=Vx(d,h,c,i);if(zx(l,i,r[0]+e,r[1]+t),f){i=l,e=n,n=(t=Object.assign(Object.assign({},y),{height:p}))["height"],t=Z(t,["height"]);const a=e=hu(e.map(t=>t[0])),o=e,s=n;(n=i.ruleY||(e=new F.Line({style:Object.assign({x1:a,x2:o,y1:0,y2:s,lineWidth:1,stroke:"#1b1e23",strokeOpacity:.5},t)}),i.appendChild(e),e)).style.x1=a,n.style.x2=o,n.style.y1=0,n.style.y2=s,i.ruleY=n}}},n,{leading:r,trailing:i}),o=()=>{var t;Gx(l),f&&(t=l).ruleY&&(t.ruleY.remove(),t.ruleY=void 0)};return l.addEventListener("pointerenter",a),l.addEventListener("pointermove",a),l.addEventListener("pointerleave",o),()=>{l.removeEventListener("pointerover",a),l.removeEventListener("pointerout",a),l.removeEventListener("pointerleave",o)}}function Xx(r,{elements:t,scale:i,wait:e=50,leading:n=!0,trailing:a=!1,groupKey:o=t=>t,item:s}){t=t(r);const l=new Set(t),c=qc(t,o),u=Js(t=>{var e,n=t["target"];l.has(n)&&(n=o(n),n=1===(n=c.get(n)).length?function(t,r,i){var e=(n=t["__data__"])["title"],n=Z(n,["title"]);const a=Hx(t);return t=Object.entries(n).filter(([t])=>t.startsWith("tooltip")).map(([t,e])=>{var{field:n,title:n=n}=i[t].getOptions();return Object.assign({color:a,name:n,value:void 0===e?e:""+e},Wx(r({channel:t,value:e})))}).filter(({value:t})=>void 0!==t),Object.assign(Object.assign({},e&&{title:e}),{items:t})}(n[0],s,i):Vx(n,s,i),{offsetX:t,offsetY:e}=t,zx(r,n,t,e))},e,{leading:n,trailing:a}),f=t=>{t=t.target;l.has(t)&&Gx(r)};return r.addEventListener("pointerover",u),r.addEventListener("pointermove",u),r.addEventListener("pointerout",f),()=>{r.removeEventListener("pointerover",u),r.removeEventListener("pointermove",u),r.removeEventListener("pointerout",f)}}function Kx(t){const{shared:o,showCrosshairs:s,series:l,item:c=()=>({})}=t,u=Z(t,["shared","showCrosshairs","series","name","item"]);return t=>{var{container:t,view:e}=t,{scale:n,markState:r,coordinate:i}=e,a=qx(r,"seriesTooltip"),r=qx(r,"showCrosshairs"),t=wx(t);return Yx(l,a)?Ux(t,Object.assign(Object.assign({},u),{elements:xx,scale:n,coordinate:i,showCrosshairs:Yx(s,r),item:c})):Xx(t,Object.assign(Object.assign({},u),{elements:xx,scale:n,coordinate:i,groupKey:o?_x(e):void 0,item:c}))}}function $x(n){return(t,...e)=>I({},n(t,...e),t)}function Zx(n){return(t,...e)=>I({},t,n(t,...e))}function Jx(t,e){var n;return t?Array.isArray(t)?t:({value:n=e}=t,t=Z(t,["value"]),Object.assign(Object.assign({},t),{value:n})):e}bx.props={};const Qx=()=>t=>{var e=t["children"];if(!Array.isArray(e))return[];const{x:n=0,y:r=0,width:i,height:a,data:o}=t;return e.map(t=>{var e=t["data"],t=Z(t,["data"]);return Object.assign(Object.assign({},t),{data:Jx(e,o),x:n,y:r,width:i,height:a})})},t5=(Qx.props={},()=>e=>{var n=e["children"];if(!Array.isArray(n))return[];var{direction:t="row",ratio:r=n.map(()=>1),padding:i=0,data:a}=e,[o,s,l,c]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),f=e[s]-i*(n.length-1);var h=r.map(t=>f*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<h.length;t+=1){var g=n[t],y=g["data"],g=Z(g,["data"]),y=Jx(y,a);d.push(Object.assign({[o]:p,[s]:h[t],[c]:e[c]||0,[l]:e[l],data:y},g)),p+=h[t]+i}return d}),e5=(t5.props={},()=>t=>{var e=t["children"],t=Z(t,["children"]);if(!Array.isArray(e))return[];const{data:a,scale:o={},axis:s={},legend:l={}}=t,n=Z(t,["data","scale","axis","legend"]);t=e.map(t=>{var{data:e,scale:n={},axis:r={},legend:i={}}=t,t=Z(t,["data","scale","axis","legend"]);return Object.assign({data:Jx(e,a),scale:I({},o,n),axis:!(!r||!s)&&I({},s,r),legend:!(!i||!l)&&I({},l,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),n5=(e5.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,data:v,coordinates:b,theme:x,component:w,interactions:k,x:M,y:O,key:_,frame:S,title:E,labelTransform:A}=t,t=Z(t,["width","height","paddingLeft","paddingRight","paddingTop","paddingBottom","padding","inset","insetLeft","insetTop","insetRight","insetBottom","margin","marginLeft","marginBottom","marginTop","marginRight","data","coordinates","theme","component","interactions","x","y","key","frame","title","labelTransform"]);return[{type:"standardView",x:M,y:O,key:_,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:l,insetLeft:c,insetTop:u,insetRight:f,insetBottom:h,paddingBottom:o,theme:x,coordinates:b,component:w,interactions:k,frame:S,title:E,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,marks:[Object.assign(Object.assign({},t),{key:_+"-0",data:v})]}]}),r5=(n5.props={},$x(t=>{const{encode:e,data:i,scale:a,shareSize:o=!1}=t;var{x:t,y:n}=e,r=(e,t)=>{if(void 0===e||!o)return{};const n=qc(i,t=>t[e]);var t=(null==(t=null===a||void 0===a?void 0:a[t])?void 0:t.domain)||Array.from(n.keys()),r=t.map(t=>n.has(t)?n.get(t).length:1);return{domain:t,flex:r}};return{scale:{x:Object.assign(Object.assign({paddingOuter:0,paddingInner:.1,guide:void 0===t?null:{position:"top"}},void 0===t&&{paddingInner:0}),r(t,"x")),y:Object.assign(Object.assign({range:[0,1],paddingOuter:0,paddingInner:.1,guide:void 0===n?null:{position:"right"}},void 0===n&&{paddingInner:0}),r(n,"y"))}}})),i5=$x(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:f={},scale:n={},legend:h={}}=r.shift();var s=f["color"],l=n["color"],c=h["color"];void 0!==s&&(i=s),void 0!==l&&(a=l),void 0!==c&&(o=c),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:I({},a,{domain:void 0!==(t=null==(t=null===n||void 0===n?void 0:n.color)?void 0:t.domain)?t:void 0!==i?Array.from(new Set(e.map(t=>t[i]))):void 0,type:"ordinal"})},legend:{color:I({title:i},o)}}}),a5=$x(()=>({animate:{enterType:"fadeIn"}})),o5=Zx(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),s5=Zx(()=>({type:"cell"})),l5=Zx(c=>{var t=c["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=c;const{x:n,y:r}=e,i=n?Array.from(new Set(t.map(t=>t[n]))):[],a=r?Array.from(new Set(t.map(t=>t[r]))):[];if(i.length&&a.length){var o=[];for(const s of i)for(const l of a)o.push({[n]:s,[r]:l});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),c5=Zx((t,c=function(t){t=t.points;return R1(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?u5(a,e):(t=e.length?void 0:null,I({title:r===i-1&&void 0,grid:t},a))}},k=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?u5(r,e):(n=e.length?void 0:null,I({title:0===t&&void 0,grid:n},r))}},M={})=>{const{data:e,encode:n,children:u,scale:r,x:O=0,y:_=0,shareData:f=!1}=t,S=e["value"],{x:E,y:A}=n;t=r.color;const T=t["domain"];return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:y,paddingTop:m}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=z1(t);const s=t.map(c);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const l=n.map(([n,r])=>t=>{var{[E]:t,[A]:e}=t,t=void 0===E||t===n,e=void 0===A||e===r;return t&&e}).map(t=>S.filter(t)),v=f?ou(l,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:E,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:A,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(u)?u:[u(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],p=b[c],g=l[c];return x[c].map(t=>{var{scale:e,key:n,facet:r=!0,axis:i={}}=t,t=Z(t,["scale","key","facet","axis","legend"]),a=null==(a=null==e?void 0:e.y)?void 0:a.guide,o=null==(o=null==e?void 0:e.x)?void 0:o.guide,s={x:{tickCount:E?5:void 0},y:{tickCount:A?5:void 0}},r=r?g:0===g.length?[]:S,l={color:{domain:T}},o={x:f5(o,w)(p,r),y:f5(a,k)(p,r)};return Object.assign(Object.assign({key:n+"-"+c,data:r,x:u+y+O,y:f+m+_,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:I(s,e,l),axis:I({},i,o),legend:!1},t),M)})})}}});function u5(t,e){return e.length?I({title:!1,tick:null,label:null},t):I({title:!1,tick:null,label:null,grid:null},t)}function f5(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const h5=()=>t=>{return[J2.of(t).call(s5).call(i5).call(a5).call(r5).call(o5).call(l5).call(c5).value()]},d5=(h5.props={},$x(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),p5=Zx(t=>{const{data:w,children:c,x:k=0,y:M=0}=t;return{children:(t,e,n)=>{const{x:r,y:i}=e,{paddingLeft:m,paddingTop:v}=n,a=r.getOptions()["domain"],o=i.getOptions()["domain"];e=z1(t);const s=t.map(({points:t})=>R1(t)),l=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=l.map(([t,e])=>({columnField:t,columnIndex:a.indexOf(t),columnValue:t,columnValuesLength:a.length,rowField:e,rowIndex:o.indexOf(e),rowValue:e,rowValuesLength:o.length})),x=b.map(t=>Array.isArray(c)?c:[c(t)].flat(1));return e.flatMap(c=>{const[u,f,h,d]=s[c],[p,g]=l[c],y=b[c];return x[c].map(t=>{var n,r,{scale:e,key:i,encode:a,axis:o}=t,t=Z(t,["scale","key","encode","axis"]),s=null==(s=null==e?void 0:e.y)?void 0:s.guide,l=null==(l=null==e?void 0:e.x)?void 0:l.guide,l={x:("function"==typeof(r=l)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return u5(r,e)})(y,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return u5(n,e)})(y,w)};return Object.assign({data:w,key:i+"-"+c,x:u+m+k,y:f+v+M,width:h,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:I({x:{facet:!1},y:{facet:!1}},e),axis:I({x:{tickCount:5},y:{tickCount:5}},o,l),legend:!1,encode:I({},a,{x:p,y:g})},t)})})}}}),g5=Zx(t=>{var e=t["encode"],t=Z(t,["encode"]),{position:n=[],x:r=n,y:i=[...n].reverse()}=e,n=Z(e,["position","x","y"]),a=[];for(const o of[r].flat(1))for(const s of[i].flat(1))a.push({$x:o,$y:s});return Object.assign(Object.assign({},t),{data:a,encode:Object.assign(Object.assign({},n),{x:"$x",y:"$y"}),scale:Object.assign(Object.assign({},1===[r].flat(1).length&&{x:{paddingInner:0}}),1===[i].flat(1).length&&{y:{paddingInner:0}})})});const y5=()=>t=>{return[J2.of(t).call(s5).call(i5).call(p5).call(g5).call(a5).call(o5).call(d5).value()]},m5=$x(t=>({scale:{x:{guide:{type:"axisX"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),v5=$x(t=>({coordinates:[{type:"polar"}]})),b5=t=>{var e=t["encode"],t=Z(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function x5(t){return t=>null}function w5(t){var t=t["points"],[t,e,n,r]=t,i=j1(t,r),t=C1(t,r),r=C1(e,n),r=(e=r,r=F1(r=t),e=F1(e),r<e?e-r:2*Math.PI-(r-e)),e=1/Math.sin(r/2),i=i/(1+e),a=i*Math.sqrt(2),[n,o]=n,t=I1(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const k5=()=>t=>{return[J2.of(t).call(s5).call(b5).call(i5).call(v5).call(l5).call(c5,w5,x5,x5,{frame:!1}).call(a5).call(o5).call(m5).value()]};const M5=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:l=1,direction:c="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],f=e.map(t=>Object.assign(Object.assign({},t),{key:n})).map(t=>{for(var e=a,n=o,r=[t];r.length;){var i=r.pop(),i=(i.animate=I({enterDuration:e,updateDuration:e,exitDuration:e,updateEasing:n,updateType:"morphing",updateFill:"both",exitType:"fadeOut"},i.animate||{}),i)["children"];Array.isArray(i)&&r.push(...i)}return t});return function*(){let t=0,e;for(;"infinite"===l||t<l;){n=c,a=t,o=u,s=void 0,s=[0,o],o=[1-o,1];var[n,r]="normal"===n?s:"reverse"===n?o:"alternate"===n?a%2==0?s:o:"reverse-alternate"===n?a%2==0?o:s:void 0;for(let t=n;t<r;t+=1){var i=Math.abs(t);e!==i&&(yield f[i]),e=i}t++}var a,o,s}};function O5(t,e){if(null!==t)return{type:"column",value:t,field:e}}function _5(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function S5(t,e){var n=[];for(const r of t)n[r]=e;return n}function E5(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function A5(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=E5(t,i);if(null!==n)return[n,r]}return[null,null]}function T5(t){return!(t instanceof Date)&&"object"==typeof t}M5.props={};const P5=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,I({},e,{encode:{y1:O5(S5(t,0))}})]};function N5(t,e,n){const r=n["encode"];if(null===t)return[e];n=t;const i=(Array.isArray(n)?n:[n]).map(t=>{return[t,null==(t=E5(r,t))?void 0:t[0]]}).filter(([,t])=>uf(t));return Array.from(qc(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function L5(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:Cc(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>D5(t=>r(e[t]))):"series"===t?F5:"value"===t?I5:"sum"===t?R5:"maxIndex"===t?B5:()=>null}function C5(t,e){for(const n of t)n.sort(e)}function j5(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function F5(t,e,n){return D5(t=>n[t])}function I5(t,e,n){return D5(t=>e[t])}function R5(t,n,e){t=z1(t),t=Array.from(qc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return D5(t=>r.get(e[t]))}function B5(t,n,e){t=z1(t),t=Array.from(qc(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,su(e,t=>n[t])]));return D5(t=>r.get(e[t]))}function D5(n){return(t,e)=>Cc(n(t),n(e))}P5.props={};const z5=(t={})=>{const{groupBy:T="x",orderBy:P=null,reverse:N=!1,y:L="y",y1:C="y1",series:j=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=E5(r,"y"),[s,l]=E5(r,"y1"),[r]=j?A5(r,"series","color"):E5(r,"color"),c=N5(T,t,e),n=L5(P)(n,a,r),u=(n&&C5(c,n),new Array(t.length)),f=new Array(t.length),h=new Array(t.length),d=[],p=[];for(const _ of c){N&&_.reverse();var g=s?+s[_[0]]:0,y=[],m=[];for(const S of _){var v=h[S]=+a[S]-g;v<0?m.push(S):0<=v&&y.push(S)}var b=0<y.length?y:m,x=0<m.length?m:y;let t=y.length-1,e=0;for(;0<t&&0===a[b[t]];)t--;for(;e<x.length-1&&0===a[x[e]];)e++;d.push(b[t]),p.push(x[e]);let n=g;for(const E of m.reverse()){var w=h[E];n=u[E]=(f[E]=n)+w}let r=g;for(const A of y){var k=h[A];0<k?r=u[A]=(f[A]=r)+k:u[A]=f[A]=r}}const M=new Set(d),O=new Set(p);r="y"===L?u:f,n="y"===C?u:f;return[t,I({},e,{encode:{y:O5(r,o),y1:O5(n,l)},style:Object.assign({first:(t,e)=>M.has(e),last:(t,e)=>O.has(e)},i)})]}};function G5(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}z5.props={};const W5=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(G5)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",z5({groupBy:r})(t,e,n))},H5=(W5.props={},(t={})=>{const{channel:i="x"}=t;return(t,e)=>{var n=e["encode"],r=n["title"];return void 0!==r?[t,e]:([r,n]=E5(n,i),[t,I({},e,{encode:{title:O5(r,n)}})])}}),V5=(H5.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,I({},e,{encode:{x:O5(S5(t,0))},scale:{x:{guide:null}}})]}),q5=(V5.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,I({},e,{encode:{y:O5(S5(t,0))},scale:{y:{guide:null}}})]}),Y5=(q5.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,I({},e,{encode:{size:_5(S5(t,3))}})]}),U5=(Y5.props={},()=>(t,e)=>{var n=e["encode"],r=n["key"],n=Z(n,["key"]);if(void 0!==r)return[t,e];const i=Object.values(n).map(({value:t})=>t);r=t.map(e=>i.filter(Array.isArray).map(t=>t[e]).join("-"));return[t,I({},e,{encode:{key:O5(r)}})]}),X5=(U5.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=E5(n,"color"),[t,I({},e,{encode:{series:O5(r,i)}})])}),K5=(X5.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(T5)?[t,e]:[t,I({},e,{encode:{y:O5(n)}})]}),$5=(K5.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(T5)?[t,e]:[t,I({},e,{encode:{x:O5(n)}})]}),Z5=($5.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=E5(n,"y"),[t,I({},e,{encode:{y1:O5([...r])}})])}),J5=(Z5.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=E5(n,"x"),[t,I({},e,{encode:{x1:O5([...r])}})])}),Q5=(J5.props={},t=>{const a=t["channel"];return(t,e)=>{const r=e["encode"];var n=r["tooltip"];if(void 0!==n)return[t,e];n=Array.isArray(a)?a:[a];let i=0;n=n.flatMap(e=>Object.entries(r).filter(([t])=>t.startsWith(e)).flatMap(([t])=>{var[e,n]=E5(r,t),t=[[t,O5(e)]];return e&&null!==n&&(t.push(["tooltip"+(0===i?"":i),O5(e,n)]),i++),t}));return[t,I({},e,{encode:Object.fromEntries(n)})]}}),tw=(Q5.props={},()=>(t,e)=>[t,I({scale:{x:{padding:0},y:{padding:0}}},e)]),ew=(tw.props={},()=>(t,e)=>{var{style:n={}}=e,r=Z(e,["data","style"]),{x:i,y:a}=n,n=Z(n,["x","y"]);return null==i||null==a?[t,e]:[[0],I({},r,{data:[0],cartesian:!0,encode:{x:O5([i||0]),y:O5([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),nw=(ew.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,I({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),rw=(nw.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(T5)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,I({},e,{encode:{x:O5(n),y:O5(r)}})])}),iw=(rw.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,I({},e,{encode:{series:_5(S5(t,void 0))}})]:[t,e]}),aw=(iw.props={},(t={})=>{const{groupBy:c="x",reverse:u=!1,orderBy:f,padding:h}=t;return Z(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=E5(r,"y"),[r]=A5(r,"series","color"),o=j5(r,i),i=N5(c,t,e),n=L5(f)(n,a,r),s=(n&&C5(i,n),new Array(t.length));for(const l of i){u&&l.reverse();for(let t=0;t<l.length;t++)s[l[t]]=o[t]}return[t,I({},e,{scale:{series:{domain:o,paddingInner:h}},encode:{series:O5(s)}})]}}),ow=(aw.props={},t=>{const{groupBy:p=["x"],reducer:g=(t,e)=>e[t[0]],orderBy:y=null,reverse:m=!1,duration:v}=t;return(n,t)=>{const e=t["encode"];var r=(Array.isArray(p)?p:[p]).map(t=>[t,E5(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,f]of r){var a=[];for(const n of i){var o=Array.from(qc(n,t=>f[t]).values());a.push(...o)}i=a}if(y){const[h]=E5(e,y);h&&i.sort((t,e)=>g(t,h)-g(e,h)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[S5(n,r)]:A5(e,"enterDuration",S5(n,r));var[l]=A5(e,"enterDelay",S5(n,0)),c=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=ou(n,t=>+s[t]);for(const d of n)c[d]=+l[d]+e;e+=u}return[n,I({},t,{encode:{enterDuration:_5(s),enterDelay:_5(c)}})]}});ow.props={};const sw=(t={})=>{const{groupBy:d="x",basis:p="max"}=t;return(e,t)=>{const n=t["encode"];var r,i=Z(n,["x"]),a=Object.entries(i).filter(([t])=>t.startsWith("y")).map(([t])=>[t,E5(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=N5(d,e,t),l="function"==typeof(r=p)?r:{min:(t,e)=>lu(t,t=>e[+t]),max:(t,e)=>ou(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>hu(t,t=>e[+t]),median:(t,e)=>du(t,t=>e[+t]),sum:(t,e)=>yu(t,t=>e[+t]),deviation:(t,e)=>Dc(t,t=>e[+t])}[r]||ou;for(const e of i){var c=l(e,o);for(const h of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,f]=s[t];f[h]=+u[h]/c}}return[e,I({},t,{encode:Object.fromEntries(s.map(([t,e])=>[t,O5(e,E5(n,t)[1])]))})]}};function lw(t,e,n){return null===t?[-.5,.5]:(t=j5(t,e),[-(e=new Bp({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function cw(t,e,n){return e*(1-t)+n*t}sw.props={};const uw=(t={})=>{const{padding:e=0,paddingX:l=e,paddingY:c=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=E5(n,"x"),[n]=E5(n,"y");const o=lw(a,r,l),s=lw(n,i,c);a=t.map(()=>cw(u(),...s)),r=t.map(()=>cw(u(),...o));return[t,I({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:O5(a),dx:O5(r)}})]}},fw=(uw.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=E5(n,"x");const i=lw(n,r,a);n=t.map(()=>cw(o(),...i));return[t,I({scale:{x:{padding:.5}}},e,{encode:{dx:O5(n)}})]}}),hw=(fw.props={},(t={})=>{const{groupBy:g="x"}=t;return(e,t)=>{const n=t["encode"];var r=Z(n,["x"]);const i=Object.entries(r).filter(([t])=>t.startsWith("y")).map(([t])=>[t,E5(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=N5(g,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[l,c]=zc(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(l+c)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var f=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,h]=i[t],[,d]=a[t];d[p]=+h[p]+f}}return[e,I({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,O5(e,E5(n,t)[1])]))})]}}),dw=(hw.props={},(t={})=>{const{groupBy:u="x",series:f=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=E5(n,"y");var[,i]=E5(n,"y1"),n=(f?A5(n,"series","color"):E5(n,"color"),N5(u,t,e)),a=new Array(t.length);for(const c of n){var o=c.map(t=>+r[t]);for(let n=0;n<c.length;n++){var s=c[n],l=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>l?l:r[s]}}return[t,I({},e,{encode:{y1:O5(a,i)}})]}});function pw(t,e){return[t[0]]}function gw(t,e){return[t[t.length-1]]}function yw(t,e){return[t[su(t,t=>e[t])]]}function mw(t,e){return[t[cu(t,t=>e[t])]]}dw.props={};const vw=(t={})=>{const{groupBy:s="series"}=t,l=Z(t,["groupBy"]);return(t,e)=>{var n=e["encode"],t=N5(s,t,e),[r,i]=Object.entries(l)[0];const[a]=E5(n,r),o="function"==typeof(n=i)?n:{first:pw,last:gw,max:yw,min:mw}[n]||pw;return[t.flatMap(t=>o(t,a)),e]}};function bw(t,e){return[t[0]]}function xw(t,e){return[t[t.length-1]]}function ww(t,e){return[t[su(t,t=>e[t])]]}function kw(t,e){return[t[cu(t,t=>e[t])]]}vw.props={};const Mw=(t={})=>{const{groupBy:s="series"}=t,l=Z(t,["groupBy"]);return(t,e)=>{var n=e["encode"],t=N5(s,t,e),[r,i]=Object.entries(l)[0];const[a]=E5(n,r),o="function"==typeof(n=i)?n:{first:bw,last:xw,max:ww,min:kw}[n]||bw;return[t.flatMap(t=>o(t,a)),e]}},Ow=(Mw.props={},(t={})=>{var e=t["selector"],t=Z(t,["selector"]);return Mw(Object.assign({x:e},t))}),_w=(Ow.props={},(t={})=>{var e=t["selector"],t=Z(t,["selector"]);return Mw(Object.assign({y:e},t))});function Sw(e){return t=>null===t?e:e+" of "+t}function Ew(){return[(t,e)=>hu(t,t=>+e[t]),Sw("mean")]}function Aw(){return[(t,e)=>du(t,t=>+e[t]),Sw("median")]}function Tw(){return[(t,e)=>ou(t,t=>+e[t]),Sw("max")]}function Pw(){return[(t,e)=>lu(t,t=>+e[t]),Sw("min")]}function Nw(){return[(t,e)=>t.length,Sw("count")]}function Lw(){return[(t,e)=>yu(t,t=>+e[t]),Sw("sum")]}function Cw(){return[(t,e)=>e[t[0]],Sw("first")]}function jw(){return[(t,e)=>e[t[t.length-1]],Sw("last")]}_w.props={};const Fw=(t={})=>{const a=t["groupBy"],c=Z(t,["groupBy"]);return(t,e)=>{const{data:o,encode:s}=e,l=a(t,e);var n,r,i;return l?(n=Object.entries(c).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:Ew,max:Tw,count:Nw,first:Cw,last:jw,sum:Lw,min:Pw,median:Aw}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=E5(s,t);return[t,O5(l.map(t=>n(t,null!==i&&void 0!==i?i:o)),(null==r?void 0:r(a))||a)]}),r=Object.keys(s).map(t=>{const[e,n]=E5(s,t);return[t,O5(l.map(t=>e[t[0]]),n)]}),i=l.map(t=>o[t[0]]),[z1(l),I({},e,{data:i,encode:Object.fromEntries([...r,...n])})]):[t,e]}},Iw=(Fw.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=Z(t,["channels"]);return Fw(Object.assign(Object.assign({},e),{groupBy:(t,e)=>N5(n,t,e)}))}),Rw=(Iw.props={},(t={})=>Iw(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),Bw=(Rw.props={},(t={})=>Iw(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),Dw=(Bw.props={},(t={})=>Iw(Object.assign(Object.assign({},t),{channels:["color"]})));function zw(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=Z(n,["reverse","slice","channel"]),o=e["encode"];const[s]=E5(o,a);var l,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=E5(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>ou(t,t=>+a[t]);if("min"===i)return t=>lu(t,t=>+a[t]);if("sum"===i)return t=>yu(t,t=>+a[t]);if("median"===i)return t=>du(t,t=>+a[t]);if("mean"===i)return t=>hu(t,t=>+a[t]);if("first"===i)return t=>a[t[0]];if("last"===i)return t=>a[t[t.length-1]];throw new Error("Unknown reducer: "+i)}(a,n,o),n=(o=t,c=t=>s[t],(2!==(l=n).length?Kc(Yc(o,l,c),([t,e],[n,r])=>Cc(e,r)||Cc(t,n)):Kc(qc(o,c),([t,e],[n,r])=>l(e,r)||Cc(t,n))).map(([t])=>t)),o=(r&&n.reverse(),"number"==typeof i?[0,i]:i),c=i?n.slice(...o):n;return[t,I(e,{scale:{[a]:{domain:c}}})]}Dw.props={};const Gw=(t={})=>{const{reverse:o=!1,slice:s,channel:l,ordinal:c=!0}=t,u=Z(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(c)return zw(t,e,Object.assign({reverse:o,slice:s,channel:l},u));{var n=Object.assign({reverse:o,slice:s,channel:l},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=E5(i,r);return i=Kc(t,t=>a[t]),n&&i.reverse(),[i,e]}}},Ww=(Gw.props={},(t={})=>Gw(Object.assign(Object.assign({},t),{channel:"x"}))),Hw=(Ww.props={},(t={})=>Gw(Object.assign(Object.assign({},t),{channel:"color"}))),Vw=(Hw.props={},(t={})=>Gw(Object.assign(Object.assign({},t),{channel:"y"})));Vw.props={};const qw=(t={})=>{const{field:o,channel:s="y",reducer:l="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=E5(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):E5(r,s)[0],r=Uc(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>yu(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(l,n),t=>i[t]).map(t=>t[1]);return[t,I({},e,{scale:{x:{flex:r}}})]}};function Yw(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let l=Math.ceil(Math.sqrt(e/(a/i))),c=i/l,u=Math.ceil(e/l),o=u*c;for(;o>a;)l+=1,c=i/l,u=Math.ceil(e/l),o=u*c;const f=a-u*c,h=u<=1?0:f/(u-1),[d,p]=u<=1?[(i-r*c)/(r-1),(a-c)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=R1(t),a=e%l,e=Math.floor(e/l),o=a*c,s=(u-e-1)*c+f,r=c/r,i=c/i;return`translate(${o-t+d*a}, ${s-n-h*e-p}) scale(${r}, ${i})`})}qw.props={};const Uw=()=>(t,e)=>[t,I({},e,{modifier:Yw,axis:!1})],Xw=(Uw.props={},"thresholds");function Kw(t){var[e,n]=zc(t);return Math.min(200,(t=t,Math.ceil((n-e)*Math.cbrt(Bc(t))/(3.49*Dc(t)))))}const $w=(t={})=>{const{groupChannels:s=["color"],binChannels:l=["x","y"]}=t,c=Z(t,["groupChannels","binChannels"]),u={};return Fw(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(c).filter(([t])=>!t.startsWith(Xw)))),Object.fromEntries(l.flatMap(e=>[[e,([t])=>+u[e].get(t).split(",")[0]],[e+"1",([t])=>+u[e].get(t).split(",")[1]]]))),{groupBy:(t,e)=>{const n=e["encode"],i=l.map(t=>{var[t]=E5(n,t);return t}),a=J(c,Xw),o=t.filter(e=>i.every(t=>uf(t[e]))),r=[...s.map(t=>{var[t]=E5(n,t);return t}).filter(uf).map(e=>t=>e[t]),...l.map((t,e)=>{const n=i[e];e=a[t]||Kw(n),e=au().thresholds(e).value(t=>+n[t])(o);const r=new Map(e.flatMap(t=>{var{x0:e,x1:n}=t;const r=e+","+n;return t.map(t=>[t,r])}));return u[t]=r,t=>r.get(t)})];return Array.from(qc(o,e=>r.map(t=>t(e)).join("-")).values())}}))},Zw=($w.props={},(t={})=>{var e=t["thresholds"];return $w(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});Zw.props={};const Jw=(t={})=>{const{groupBy:n,thresholds:o=2e3}=t,e=Z(t,["groupBy","thresholds"]);return Fw(Object.assign(Object.assign({},e),{groupBy:(t,e)=>{t=N5(n,t,e);return t.every(t=>t.length<=o)?null:t.flatMap(e=>{{var n=e,r=Math.max(1,Math.floor(e.length/o)),i=n.length,a=[];let t=0;for(;t<i;)a.push(n.slice(t,t+=r));return a}})}}))};Jw.props={};var ja="object"==typeof hn&&hn&&hn.Object===Object&&hn,Fa="object"==typeof self&&self&&self.Object===Object&&self,Ia=ja||Fa||Function("return this")(),Ba=Ia.Symbol,Ra=Object.prototype,Qw=Ra.hasOwnProperty,t3=Ra.toString,e3=Ba?Ba.toStringTag:void 0;var n3=Object.prototype.toString;var r3="[object Null]",i3="[object Undefined]",a3=Ba?Ba.toStringTag:void 0;function o3(t){if(null==t)return void 0===t?i3:r3;if(a3&&a3 in Object(t)){var e=t,n=Qw.call(e,e3),r=e[e3];try{var i=!(e[e3]=void 0)}catch(t){}var a=t3.call(e);return i&&(n?e[e3]=r:delete e[e3]),a}return n3.call(t)}function s3(t){return null!=t&&"object"==typeof t}var l3=Array.isArray;function c3(t){return t}var u3="[object AsyncFunction]",f3="[object Function]",h3="[object GeneratorFunction]",d3="[object Proxy]";function p3(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}var g3=/^(?:0|[1-9]\d*)$/;var y3=9007199254740991;function m3(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=y3}function v3(t){return null!=t&&m3(t.length)&&!function(t){var e;if(e=typeof t,null!=t&&("object"==e||"function"==e))return(e=o3(t))==f3||e==h3||e==u3||e==d3}(t)}var b3=Object.prototype;function x3(t){return s3(t)&&"[object Arguments]"==o3(t)}var Da=Object.prototype,w3=Da.hasOwnProperty,k3=Da.propertyIsEnumerable,M3=x3(function(){return arguments}())?x3:function(t){return s3(t)&&w3.call(t,"callee")&&!k3.call(t,"callee")};var c="object"==typeof y&&y&&!y.nodeType&&y,za=c&&"object"==typeof module&&module&&!module.nodeType&&module,Na=za&&za.exports===c?Ia.Buffer:void 0,O3=(Na?Na.isBuffer:void 0)||function(){return!1},_3={};_3["[object Float32Array]"]=_3["[object Float64Array]"]=_3["[object Int8Array]"]=_3["[object Int16Array]"]=_3["[object Int32Array]"]=_3["[object Uint8Array]"]=_3["[object Uint8ClampedArray]"]=_3["[object Uint16Array]"]=_3["[object Uint32Array]"]=!0,_3["[object Arguments]"]=_3["[object Array]"]=_3["[object ArrayBuffer]"]=_3["[object Boolean]"]=_3["[object DataView]"]=_3["[object Date]"]=_3["[object Error]"]=_3["[object Function]"]=_3["[object Map]"]=_3["[object Number]"]=_3["[object Object]"]=_3["[object RegExp]"]=_3["[object Set]"]=_3["[object String]"]=_3["[object WeakMap]"]=!1;var S3,ls="object"==typeof y&&y&&!y.nodeType&&y,E3=ls&&"object"==typeof module&&module&&!module.nodeType&&module,A3=E3&&E3.exports===ls&&ja.process,ps=function(){try{var t=E3&&E3.require&&E3.require("util").types;return t?t:A3&&A3.binding&&A3.binding("util")}catch(t){}}(),Ha=ps&&ps.isTypedArray,T3=Ha?(S3=Ha,function(t){return S3(t)}):function(t){return s3(t)&&m3(t.length)&&!!_3[o3(t)]},P3=Object.prototype.hasOwnProperty;function N3(t,e){var n,r,i,a,o=l3(t),s=!o&&M3(t),l=!o&&!s&&O3(t),c=!o&&!s&&!l&&T3(t),u=o||s||l||c,f=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],h=f.length;for(n in t)!e&&!P3.call(t,n)||u&&("length"==n||l&&("offset"==n||"parent"==n)||c&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||(a=void 0,a=typeof(r=n),(i=null==(i=h)?9007199254740991:i)&&("number"==a||"symbol"!=a&&g3.test(r))&&-1<r&&r%1==0&&r<i))||f.push(n);return f}L3=Object.keys,C3=Object;var L3,C3,j3=function(t){return L3(C3(t))},F3=Object.prototype.hasOwnProperty;function I3(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||b3))return j3(t);var e,n,r,i=[];for(r in Object(t))F3.call(t,r)&&"constructor"!=r&&i.push(r);return i}function R3(t){return(v3(t)?N3:I3)(t)}var B3,D3=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[B3?o:++r];if(!1===e(i[s],s,i))break}return t};G3=function(t,e){return t&&D3(t,e,R3)};function z3(t,e){if(null!=t){if(!v3(t))return G3(t,e);for(var n=t.length,r=W3?n:-1,i=Object(t);(W3?r--:++r<n)&&!1!==e(i[r],r,i););}return t}var G3,W3;function H3(t,e){(l3(t)?p3:z3)(t,"function"==typeof(t=e)?t:c3)}function V3(t,e,n){return e<=t&&t<=n}function q3(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function Y3(t,e,n){var r=!1,i=t.length;if(!(i<=2)){for(var a,o,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(o=u,((s=[e,n])[0]-(a=c)[0])*(o[1]-a[1])==(o[0]-a[0])*(s[1]-a[1])&&Math.min(a[0],o[0])<=s[0]&&s[0]<=Math.max(a[0],o[0])&&Math.min(a[1],o[1])<=s[1]&&s[1]<=Math.max(a[1],o[1]))return 1;0<q3(c[1]-n)!=0<q3(u[1]-n)&&q3(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}}function U3(t){for(var e,n,r=[],i=t.length,a=0;a<i-1;a++){var o=t[a],s=t[a+1];r.push({from:{x:o[0],y:o[1]},to:{x:s[0],y:s[1]}})}return 1<r.length&&(e=t[0],n=t[i-1],r.push({from:{x:n[0],y:n[1]},to:{x:e[0],y:e[1]}})),r}function X3(t,c){var u=!1;return H3(t,function(t){if(e=t.from,t=t.to,n=c.from,r=c.to,i=n.x-e.x,a=n.y-e.y,o=t.x-e.x,t=t.y-e.y,s=r.x-n.x,r=r.y-n.y,l=null,l=.001*(o*o+t*t)*(s*s+r*r)<(n=o*r-t*s)*n&&V3(r=(i*r-a*s)/n,0,1)&&V3((i*t-a*o)/n,0,1)?{x:e.x+r*o,y:e.y+r*t}:l)return!(u=!0);var e,n,r,i,a,o,s,l}),u}function K3(t){var e=t.map(function(t){return t[0]}),t=t.map(function(t){return t[1]});return{minX:Math.min.apply(null,e),maxX:Math.max.apply(null,e),minY:Math.min.apply(null,t),maxY:Math.max.apply(null,t)}}function $3(t){var{min:t,max:e}=t.getRenderBounds(),[t,n]=t,[e,r]=e;return[[t,n],[t,r],[e,r],[e,n]]}function Z3(t){return t.style.priority||0}const J3=()=>(n,t)=>{var r=[];n.sort((t,e)=>Cc(Z3(t),Z3(e)));for(let t=0;t<n.length;t++){var i=n[t];let e=!(i.style.visibility="visible");for(let t=0;t<r.length;t++){var a=r[t];if(function(e,n){if(!(e.length<2||n.length<2)){var r,i,a,t=K3(e),o=K3(n);if(t=t,!((o=o).minX>t.maxX||o.maxX<t.minX||o.minY>t.maxY||o.maxY<t.minY))return r=!1,H3(n,function(t){if(Y3(e,t[0],t[1]))return!(r=!0)}),r?1:(H3(e,function(t){if(Y3(n,t[0],t[1]))return!(r=!0)}),r||(i=U3(e),o=U3(n),a=!1,H3(o,function(t){if(X3(i,t))return!(a=!0)}),a))}}($3(i),$3(a))){i.style.visibility="hidden",e=!0;break}}e||r.push(i)}return n};function Q3(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const t4=t=>{const{maxIter:k=10,maxError:M=.1,padding:O=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,y]=Q3(),[m,v]=Q3();var a,o,s,l,[c,t]=Q3(),[u,n]=Q3();for(const b of i){var{min:r,max:f}=function(t){var t=t.cloneNode(!0),{min:e,max:n}=((e=t.getElementById("connector"))&&t.removeChild(e),t.getRenderBounds());return t.destroy(),{min:e,max:n}}(b);const[x,g]=r;var[r,f]=f;y(b,g),v(b,g),t(b,f-g),n(b,[x,r])}for(let t=0;t<k;t++){i.sort((t,e)=>Cc(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var h=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,l]]=[u(h),u(e)],!(a<l&&s<o));)t+=1;if(e){const g=m(h);var d=c(h),p=m(e),d=p-(g+d);d<O&&(d=(O-d)/2,r=Math.max(r,d),v(h,g-d),v(e,p+d))}}if(r<M)break}for(const w of i)w.style.y+=m(w)-g(w)}return i}},e4=t=>{const{edgeDistance:i=0}=t;return(t,e)=>{if(Mu(e)){var{x:n,width:r}=e.getOptions();const a=e.getCenter();e=hf(i,r);const o=n+e,s=n+r-e;t.forEach(t=>{var{x:e,x0:n,y0:r}=t.style,e=e<=a[0]?o-e:s-e,{x:e,y:i}=(t.style.x+=e,t.style),n=C1([n,r],a),r=C1([0,i],a),i=n[1]?n[0]*r[1]/n[1]+a[0]:e;t.style.connectorPoints=[[i-e,0]]})}return t}},n4=t=>(t,e)=>{if(Mu(e)){const a=e.getCenter(),o=t.reduce((t,e)=>{var{x0:e,y0:n,offset:r=0}=e.style;return Math.max(t,j1(a,[e,n])+r)},0);t.forEach(t=>{var{x0:e,y0:n,connector:r,connectorLength2:i=0}=t.style,e=I1([e-a[0],n-a[1]]),n=r?i*(Math.sin(e)<0?-1:1):0,r=a[0]+Math.sin(e)*o,i=a[1]-Math.cos(e)*o;t.style.x=r+n,t.style.y=i,t.style.connectorPoints=[[-n,0]]})}return t};var P=1e-6,r4=1e-12,E=Math.PI,i4=E/2,a4=E/4,o4=2*E,s4=180/E,l4=E/180,c4=Math.abs,u4=Math.atan,f4=Math.atan2,A=Math.cos,h4=Math.ceil,d4=Math.exp,p4=Math.log,g4=Math.pow,T=Math.sin,y4=Math.sign||function(t){return 0<t?1:t<0?-1:0},m4=Math.sqrt,v4=Math.tan;function b4(t){return 1<t?0:t<-1?E:Math.acos(t)}function x4(t){return 1<t?i4:t<-1?-i4:Math.asin(t)}function w4(){}function k4(t,e){t&&O4.hasOwnProperty(t.type)&&O4[t.type](t,e)}var M4={Feature:function(t,e){k4(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)k4(n[r].geometry,e)}},O4={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){_4(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)_4(n[r],e,0)},Polygon:function(t,e){S4(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)S4(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)k4(n[r],e)}};function _4(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function S4(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)_4(t[n],e,1);e.polygonEnd()}function E4(t,e){t&&M4.hasOwnProperty(t.type)?M4[t.type](t,e):k4(t,e)}function A4(t){return[f4(t[1],t[0]),x4(t[2])]}function T4(t){var e=t[0],t=t[1],n=A(t);return[n*A(e),n*T(e),T(t)]}function P4(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function N4(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function L4(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function C4(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function j4(t){var e=m4(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function F4(n,r){function t(t,e){return t=n(t,e),r(t[0],t[1])}return n.invert&&r.invert&&(t.invert=function(t,e){return(t=r.invert(t,e))&&n.invert(t[0],t[1])}),t}function I4(t,e){return[c4(t)>E?t+Math.round(-t/o4)*o4:t,e]}function R4(t,e,n){return(t%=o4)?e||n?F4(D4(t),z4(e,n)):D4(t):e||n?z4(e,n):I4}function B4(n){return function(t,e){return[E<(t+=n)?t-o4:t<-E?t+o4:t,e]}}function D4(t){var e=B4(t);return e.invert=B4(-t),e}function z4(t,e){var i=A(t),a=T(t),o=A(e),s=T(e);function n(t,e){var n=A(e),r=A(t)*n,t=T(t)*n,n=T(e),e=n*i+r*a;return[f4(t*o-e*s,r*i-n*a),x4(e*o+t*s)]}return n.invert=function(t,e){var n=A(e),r=A(t)*n,t=T(t)*n,n=T(e),e=n*o-t*s;return[f4(t*o+n*s,r*i+e*a),x4(e*i-r*a)]},n}function G4(t,e){(e=T4(e))[0]-=t,j4(e);t=b4(-e[1]);return((-e[2]<0?-t:t)+o4-P)%o4}function W4(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:w4,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function H4(t,e){return c4(t[0]-e[0])<P&&c4(t[1]-e[1])<P}function V4(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function q4(t,e,n,r,a){var o,i,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(H4(r,i)){if(!r[2]&&!i[2]){for(a.lineStart(),o=0;o<e;++o)a.point((r=t[o])[0],r[1]);return void a.lineEnd()}i[0]+=2*P}s.push(n=new V4(r,t,null,!0)),l.push(n.o=new V4(r,null,n,!1)),s.push(n=new V4(i,t,null,!1)),l.push(n.o=new V4(i,null,n,!0))}}),s.length){for(l.sort(e),Y4(s),Y4(l),o=0,i=l.length;o<i;++o)l[o].e=n=!n;for(var c,u,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,a.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,i=c.length;o<i;++o)a.point((u=c[o])[0],u[1]);else r(h.x,h.n.x,1,a);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;0<=o;--o)a.point((u=c[o])[0],u[1]);else r(h.x,h.p.x,-1,a);h=h.p}}while(c=(h=h.o).z,d=!d,!h.v);a.lineEnd()}}}function Y4(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function U4(t){return c4(t[0])<=E?t[0]:y4(t[0])*((c4(t[0])+E)%o4-E)}function X4(y,m,v,b){return function(s){var l,c,u,n=m(s),f=W4(),h=m(f),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=g,c=[],l=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,c=pu(c);var t=function(t,e){var n=U4(e),r=e[1],e=T(r),i=[T(n),-A(n),0],a=0,o=0,s=new Gc;1===e?r=i4+P:-1===e&&(r=-i4-P);for(var l=0,c=t.length;l<c;++l)if(f=(u=t[l]).length)for(var u,f,h=u[f-1],d=U4(h),p=h[1]/2+a4,g=T(p),y=A(p),m=0;m<f;++m,d=b,g=w,y=x,h=v){var v=u[m],b=U4(v),x=v[1]/2+a4,w=T(x),x=A(x),k=b-d,M=0<=k?1:-1,O=M*k,_=E<O,S=g*w;s.add(f4(S*M*T(O),y*x+S*A(O))),a+=_?k+M*o4:k,_^n<=d^n<=b&&(j4(S=N4(T4(h),T4(v))),j4(O=N4(i,S)),(M=(_^0<=k?-1:1)*x4(O[2]))<r||r===M&&(S[0]||S[1]))&&(o+=_^0<=k?1:-1)}return(a<-P||a<P&&s<-r4)^1&o}(l,b);c.length?(d||(s.polygonStart(),d=!0),q4(c,$4,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),c=l=null},sphere:function(){s.polygonStart(),s.lineStart(),v(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function r(t,e){y(t,e)&&s.point(t,e)}function t(t,e){n.point(t,e)}function i(){e.point=t,n.lineStart()}function a(){e.point=r,n.lineEnd()}function p(t,e){u.push([t,e]),h.point(t,e)}function o(){h.lineStart(),u=[]}function g(){p(u[0][0],u[0][1]),h.lineEnd();var t,e,n,r,i=h.clean(),a=f.result(),o=a.length;if(u.pop(),l.push(u),u=null,o)if(1&i){if(0<(e=(n=a[0]).length-1)){for(d||(s.polygonStart(),d=!0),s.lineStart(),t=0;t<e;++t)s.point((r=n[t])[0],r[1]);s.lineEnd()}}else 1<o&&2&i&&a.push(a.pop().concat(a.shift())),c.push(a.filter(K4))}return e}}function K4(t){return 1<t.length}function $4(t,e){return((t=t.x)[0]<0?t[1]-i4-P:i4-t[1])-((e=e.x)[0]<0?e[1]-i4-P:i4-e[1])}I4.invert=I4;var Z4=X4(function(){return 1},function(c){var u,f=NaN,h=NaN,d=NaN;return{lineStart:function(){c.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?E:-E,l=c4(t-f);c4(l-E)<P?(c.point(f,h=0<(h+e)/2?i4:-i4),c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),c.point(t,h),u=0):d!==s&&E<=l&&(c4(f-d)<P&&(f-=d*P),c4(t-s)<P&&(t-=s*P),l=h,i=e,o=T((n=f)-(r=t)),h=c4(o)>P?u4((T(l)*(a=A(i))*T(r)-T(i)*(r=A(l))*T(n))/(r*a*o)):(l+i)/2,c.point(d,h),c.lineEnd(),c.lineStart(),c.point(s,h),u=0),c.point(f=t,h=e),d=s},lineEnd:function(){c.lineEnd(),f=h=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*i4,r.point(-E,i),r.point(0,i),r.point(E,i),r.point(E,0),r.point(E,-i),r.point(0,-i),r.point(-E,-i),r.point(-E,0),r.point(-E,i)):c4(t[0]-e[0])>P?(t=t[0]<e[0]?E:-E,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-E,-i4]);function J4(d){var g=A(d),p=6*l4,f=0<g,h=c4(g)>P;function y(t,e){return A(t)*A(e)>g}function m(t,e,n){var r,i,a,o,s,l,c,u=[1,0,0],f=N4(T4(t),T4(e)),h=P4(f,f),d=f[0],p=h-d*d;return p?(r=N4(u,f),L4(u=C4(u,g*h/p),C4(f,-g*d/p)),(p=(f=P4(u,h=r))*f-(d=P4(h,h))*(P4(u,u)-1))<0?void 0:(L4(p=C4(h,(-f-(r=m4(p)))/d),u),p=A4(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(c=i,i=a,a=c),!(l=c4((s=a-i)-E)<P)&&e<o&&(c=o,o=e,e=c),(l||s<P?l?0<o+e^p[1]<(c4(p[0]-i)<P?o:e):o<=p[1]&&p[1]<=e:E<s^(i<=p[0]&&p[0]<=a))?(L4(c=C4(h,(-f+r)/d),u),[p,A4(c)]):void 0):p)):!n&&t}function v(t,e){var n=f?d:E-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return X4(y,function(a){var o,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(t,e){var n,r=[t,e],i=y(t,e),t=f?i?0:v(t,e):i?v(t+(t<0?E:-E),e):0;!o&&(c=l=i)&&a.lineStart(),i===l||(n=m(o,r))&&!H4(o,n)&&!H4(r,n)||(r[2]=1),i!==l?(u=0,i?(a.lineStart(),n=m(r,o),a.point(n[0],n[1])):(n=m(o,r),a.point(n[0],n[1],2),a.lineEnd()),o=n):h&&o&&f^i&&(t&s||!(e=m(r,o,!0))||(u=0,f?(a.lineStart(),a.point(e[0][0],e[0][1]),a.point(e[1][0],e[1][1]),a.lineEnd()):(a.point(e[1][0],e[1][1]),a.lineEnd(),a.lineStart(),a.point(e[0][0],e[0][1],3)))),!i||o&&H4(o,r)||a.point(r[0],r[1]),o=r,l=i,s=t},lineEnd:function(){l&&a.lineEnd(),o=null},clean:function(){return u|(c&&l)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var l=A(r),c=T(r),u=o*a;null==n?(n=r+o*o4,s=r-u/2):(n=G4(l,n),s=G4(l,s),(0<o?n<s:s<n)&&(n+=o*o4));for(var f,h=n;0<o?s<h:h<s;h-=u)f=A4([l,-c*A(h),-c*T(h)]),i.point(f[0],f[1])}},f?[0,-d]:[-E,d-E])}var Q4=1e9,tk=-Q4;function ek(m,v,b,x){function w(t,e){return m<=t&&t<=b&&v<=e&&e<=x}function k(t,e,n,r){var i=0,a=0;if(null==t||(i=o(t,n))!==(a=o(e,n))||s(t,e)<0^0<n)for(;r.point(0===i||3===i?m:b,1<i?x:v),(i=(i+n+4)%4)!==a;);else r.point(e[0],e[1])}function o(t,e){return c4(t[0]-m)<P?0<e?0:3:c4(t[0]-b)<P?0<e?2:1:c4(t[1]-v)<P?0<e?1:0:0<e?3:2}function M(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(r){var i,f,a,o,s,l,c,u,h,d,p,g=r,t=W4(),e={point:n,lineStart:function(){e.point=y,f&&f.push(a=[]);d=!0,h=!1,c=u=NaN},lineEnd:function(){i&&(y(o,s),l&&h&&t.rejoin(),i.push(t.result()));e.point=n,h&&g.lineEnd()},polygonStart:function(){g=t,i=[],f=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=f.length;e<n;++e)for(var r,i,a=f[e],o=1,s=a.length,l=a[0],c=l[0],u=l[1];o<s;++o)r=c,i=u,l=a[o],c=l[0],u=l[1],i<=x?x<u&&(u-i)*(m-r)<(c-r)*(x-i)&&++t:u<=x&&(c-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=pu(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),k(null,null,1,r),r.lineEnd()),n&&q4(i,M,t,k,r),r.polygonEnd());g=r,i=f=a=null}};function n(t,e){w(t,e)&&g.point(t,e)}function y(t,e){var n,r,i=w(t,e);f&&a.push([t,e]),d?(o=t,s=e,d=!1,(l=i)&&(g.lineStart(),g.point(t,e))):i&&h?g.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],l=0,c=1,u=e[0]-o,f=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<l)return;n<c&&(c=n)}else if(0<u){if(c<n)return;l<n&&(l=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(c<n)return;l<n&&(l=n)}else if(0<u){if(n<l)return;n<c&&(c=n)}if(n=r-s,f||!(0<n)){if(n/=f,f<0){if(n<l)return;n<c&&(c=n)}else if(0<f){if(c<n)return;l<n&&(l=n)}if(n=a-s,f||!(n<0)){if(n/=f,f<0){if(c<n)return;l<n&&(l=n)}else if(0<f){if(n<l)return;n<c&&(c=n)}return 0<l&&(t[0]=o+l*u,t[1]=s+l*f),c<1&&(e[0]=o+c*u,e[1]=s+c*f),1}}}}}(n=[c=Math.max(tk,Math.min(Q4,c)),u=Math.max(tk,Math.min(Q4,u))],r=[t=Math.max(tk,Math.min(Q4,t)),e=Math.max(tk,Math.min(Q4,e))],m,v,b,x)?i&&(g.lineStart(),g.point(t,e),p=!1):(h||(g.lineStart(),g.point(n[0],n[1])),g.point(r[0],r[1]),i||g.lineEnd(),p=!1),c=t,u=e,h=i}return e}}function nk(t,e,n){var r=gu(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function rk(t,e,n){var r=gu(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function ik(){return g=p=10,y=90,m=360,v=2.5,e.lines=function(){return t().map(function(t){return{type:"LineString",coordinates:t}})},e.outline=function(){return{type:"Polygon",coordinates:[h(a).concat(d(l).slice(1),h(i).reverse().slice(1),d(c).reverse().slice(1))]}},e.extent=function(t){return arguments.length?e.extentMajor(t).extentMinor(t):e.extentMinor()},e.extentMajor=function(t){return arguments.length?(a=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],i<a&&(t=a,a=i,i=t),l<c&&(t=c,c=l,l=t),e.precision(v)):[[a,c],[i,l]]},e.extentMinor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],n<r&&(t=r,r=n,n=t),o<s&&(t=s,s=o,o=t),e.precision(v)):[[r,s],[n,o]]},e.step=function(t){return arguments.length?e.stepMajor(t).stepMinor(t):e.stepMinor()},e.stepMajor=function(t){return arguments.length?(y=+t[0],m=+t[1],e):[y,m]},e.stepMinor=function(t){return arguments.length?(p=+t[0],g=+t[1],e):[p,g]},e.precision=function(t){return arguments.length?(v=+t,u=nk(s,o,90),f=rk(r,n,v),h=nk(c,l,90),d=rk(a,i,v),e):v},e.extentMajor([[-180,-90+P],[180,90-P]]).extentMinor([[-180,-80-P],[180,80+P]])();function e(){return{type:"MultiLineString",coordinates:t()}}function t(){return gu(h4(a/y)*y,i,y).map(h).concat(gu(h4(c/m)*m,l,m).map(d)).concat(gu(h4(r/p)*p,n,p).filter(function(t){return c4(t%y)>P}).map(u)).concat(gu(h4(s/g)*g,o,g).filter(function(t){return c4(t%m)>P}).map(f))}var n,r,i,a,o,s,l,c,u,f,h,d,p,g,y,m,v}var ak,ok,sk,lk,ck=t=>t,uk=new Gc,fk=new Gc,hk={point:w4,lineStart:w4,lineEnd:w4,polygonStart:function(){hk.lineStart=dk,hk.lineEnd=yk},polygonEnd:function(){hk.lineStart=hk.lineEnd=hk.point=w4,uk.add(c4(fk)),fk=new Gc},result:function(){var t=uk/2;return uk=new Gc,t}};function dk(){hk.point=pk}function pk(t,e){hk.point=gk,ak=sk=t,ok=lk=e}function gk(t,e){fk.add(lk*t-sk*e),sk=t,lk=e}function yk(){gk(ak,ok)}var mk=hk,vk=1/0,bk=vk,xk=-vk,wk=xk;var kk,Mk,Ok,_k,Sk={point:function(t,e){t<vk&&(vk=t);xk<t&&(xk=t);e<bk&&(bk=e);wk<e&&(wk=e)},lineStart:w4,lineEnd:w4,polygonStart:w4,polygonEnd:w4,result:function(){var t=[[vk,bk],[xk,wk]];return xk=wk=-(bk=vk=1/0),t}},Ek=0,Ak=0,Tk=0,Pk=0,Nk=0,Lk=0,Ck=0,jk=0,Fk=0,Ik={point:Rk,lineStart:Bk,lineEnd:Gk,polygonStart:function(){Ik.lineStart=Wk,Ik.lineEnd=Hk},polygonEnd:function(){Ik.point=Rk,Ik.lineStart=Bk,Ik.lineEnd=Gk},result:function(){var t=Fk?[Ck/Fk,jk/Fk]:Lk?[Pk/Lk,Nk/Lk]:Tk?[Ek/Tk,Ak/Tk]:[NaN,NaN];return Ek=Ak=Tk=Pk=Nk=Lk=Ck=jk=Fk=0,t}};function Rk(t,e){Ek+=t,Ak+=e,++Tk}function Bk(){Ik.point=Dk}function Dk(t,e){Ik.point=zk,Rk(Ok=t,_k=e)}function zk(t,e){var n=t-Ok,r=e-_k,n=m4(n*n+r*r);Pk+=n*(Ok+t)/2,Nk+=n*(_k+e)/2,Lk+=n,Rk(Ok=t,_k=e)}function Gk(){Ik.point=Rk}function Wk(){Ik.point=Vk}function Hk(){qk(kk,Mk)}function Vk(t,e){Ik.point=qk,Rk(kk=Ok=t,Mk=_k=e)}function qk(t,e){var n=t-Ok,r=e-_k,n=m4(n*n+r*r);Pk+=n*(Ok+t)/2,Nk+=n*(_k+e)/2,Lk+=n,Ck+=(n=_k*t-Ok*e)*(Ok+t),jk+=n*(_k+e),Fk+=3*n,Rk(Ok=t,_k=e)}var Yk=Ik;function Uk(t){this._context=t}Uk.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,o4)}},result:w4};var Xk,Kk,$k,Zk,Jk,Qk=new Gc,tM={point:w4,lineStart:function(){tM.point=eM},lineEnd:function(){Xk&&nM(Kk,$k),tM.point=w4},polygonStart:function(){Xk=!0},polygonEnd:function(){Xk=null},result:function(){var t=+Qk;return Qk=new Gc,t}};function eM(t,e){tM.point=nM,Kk=Zk=t,$k=Jk=e}function nM(t,e){Zk-=t,Jk-=e,Qk.add(m4(Zk*Zk+Jk*Jk)),Zk=t,Jk=e}var rM=tM;function iM(){this._string=[]}function aM(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function oM(e,n){var r,i,a=4.5;function o(t){return t&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),E4(t,r(i))),i.result()}return o.area=function(t){return E4(t,r(mk)),mk.result()},o.measure=function(t){return E4(t,r(rM)),rM.result()},o.bounds=function(t){return E4(t,r(Sk)),Sk.result()},o.centroid=function(t){return E4(t,r(Yk)),Yk.result()},o.projection=function(t){return arguments.length?(r=null==t?(e=null,ck):(e=t).stream,o):e},o.context=function(t){return arguments.length?(i=null==t?(n=null,new iM):new Uk(n=t),"function"!=typeof a&&i.pointRadius(a),o):n},o.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),o):a},o.projection(e).context(n)}function sM(r){return function(t){var e,n=new lM;for(e in r)n[e]=r[e];return n.stream=t,n}}function lM(){}function cM(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),E4(n,t.stream(Sk)),e(Sk.result()),null!=r&&t.clipExtent(r),t}function uM(i,a,t){return cM(i,function(t){var e=a[1][0]-a[0][0],n=a[1][1]-a[0][1],r=Math.min(e/(t[1][0]-t[0][0]),n/(t[1][1]-t[0][1])),e=+a[0][0]+(e-r*(t[1][0]+t[0][0]))/2,n=+a[0][1]+(n-r*(t[1][1]+t[0][1]))/2;i.scale(150*r).translate([e,n])},t)}function fM(t,e,n){return uM(t,[[0,0],e],n)}function hM(r,i,t){return cM(r,function(t){var e=+i,n=e/(t[1][0]-t[0][0]),e=(e-n*(t[1][0]+t[0][0]))/2,t=-n*t[0][1];r.scale(150*n).translate([e,t])},t)}function dM(i,a,t){return cM(i,function(t){var e=+a,n=e/(t[1][1]-t[0][1]),r=-n*t[0][0],e=(e-n*(t[1][1]+t[0][1]))/2;i.scale(150*n).translate([r,e])},t)}iM.prototype={_radius:4.5,_circle:aM(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=aM(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){var t;return this._string.length?(t=this._string.join(""),this._string=[],t):null}},lM.prototype={constructor:lM,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var pM=16,gM=A(30*l4);function yM(t,e){return+e?(E=t,A=e,function(r){var n,i,a,o,s,l,c,u,f,h,d,p,g={point:t,lineStart:e,lineEnd:m,polygonStart:function(){r.polygonStart(),g.lineStart=v},polygonEnd:function(){r.polygonEnd(),g.lineStart=e}};function t(t,e){t=E(t,e),r.point(t[0],t[1])}function e(){u=NaN,g.point=y,r.lineStart()}function y(t,e){var n=T4([t,e]),e=E(t,e);T(u,f,c,h,d,p,u=e[0],f=e[1],c=t,h=n[0],d=n[1],p=n[2],pM,r),r.point(u,f)}function m(){g.point=t,r.lineEnd()}function v(){e(),g.point=b,g.lineEnd=x}function b(t,e){y(n=t,e),i=u,a=f,o=h,s=d,l=p,g.point=y}function x(){T(u,f,c,h,d,p,i,a,n,o,s,l,pM,r),g.lineEnd=m,m()}return g}):(n=t,sM({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,E,A;function T(t,e,n,r,i,a,o,s,l,c,u,f,h,d){var p,g,y,m,v,b,x,w,k,M,O=o-t,_=s-e,S=O*O+_*_;4*A<S&&h--&&(y=a+f,x=x4(y/=m=m4((p=r+c)*p+(g=i+u)*g+y*y)),v=c4(c4(y)-1)<P||c4(n-l)<P?(n+l)/2:f4(g,p),b=(x=E(v,x))[0],x=x[1],A<(M=_*(w=b-t)-O*(k=x-e))*M/S||.3<c4((O*w+_*k)/S-.5)||r*c+i*u+a*f<gM)&&(T(t,e,n,r,i,a,b,x,v,p/=m,g/=m,y,h,d),d.point(b,x),T(b,x,v,p,g,y,o,s,l,c,u,f,h,d))}}var mM=sM({point:function(t,e){this.stream.point(t*l4,e*l4)}});function vM(t,n,r,i,a,e){var o,s,l,c,u,f,h,d,p,g,y,m;return e?(f=A(e),e=T(e),h=f*t,d=e*t,p=f/t,g=e/t,y=(e*r-f*n)/t,m=(e*n+f*r)/t,b.invert=function(t,e){return[i*(p*t-g*e+y),a*(m-g*t-p*e)]},b):(o=t,s=n,l=r,c=i,u=a,v.invert=function(t,e){return[(t-s)/o*c,(l-e)/o*u]},v);function v(t,e){return[s+o*(t*=c),l-o*(e*=u)]}function b(t,e){return[h*(t*=i)-d*(e*=a)+n,r-d*t-h*e]}}function bM(t){return xM(function(){return t})()}function xM(t){var e,r,n,i,a,o,s,l,c,u,f=150,h=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,x=1,w=1,k=null,M=Z4,O=null,_=ck,S=.5;function E(t){return l(t[0]*l4,t[1]*l4)}function A(t){return(t=l.invert(t[0],t[1]))&&[t[0]*s4,t[1]*s4]}function T(){var t=vM(f,0,0,x,w,b).apply(null,e(p,g)),t=vM(f,h-t[0],d-t[1],x,w,b);return r=R4(y,m,v),s=F4(e,t),l=F4(r,s),o=yM(s,S),P()}function P(){return c=u=null,E}return E.stream=function(t){return c&&u===t?c:c=mM((n=r,sM({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(M(o(_(u=t))))));var n},E.preclip=function(t){return arguments.length?(M=t,k=void 0,P()):M},E.postclip=function(t){return arguments.length?(_=t,O=n=i=a=null,P()):_},E.clipAngle=function(t){return arguments.length?(M=+t?J4(k=t*l4):(k=null,Z4),P()):k*s4},E.clipExtent=function(t){return arguments.length?(_=null==t?(O=n=i=a=null,ck):ek(O=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),P()):null==O?null:[[O,n],[i,a]]},E.scale=function(t){return arguments.length?(f=+t,T()):f},E.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],T()):[h,d]},E.center=function(t){return arguments.length?(p=t[0]%360*l4,g=t[1]%360*l4,T()):[p*s4,g*s4]},E.rotate=function(t){return arguments.length?(y=t[0]%360*l4,m=t[1]%360*l4,v=2<t.length?t[2]%360*l4:0,T()):[y*s4,m*s4,v*s4]},E.angle=function(t){return arguments.length?(b=t%360*l4,T()):b*s4},E.reflectX=function(t){return arguments.length?(x=t?-1:1,T()):x<0},E.reflectY=function(t){return arguments.length?(w=t?-1:1,T()):w<0},E.precision=function(t){return arguments.length?(o=yM(s,S=t*t),P()):m4(S)},E.fitExtent=function(t,e){return uM(E,t,e)},E.fitSize=function(t,e){return fM(E,t,e)},E.fitWidth=function(t,e){return hM(E,t,e)},E.fitHeight=function(t,e){return dM(E,t,e)},function(){return e=t.apply(this,arguments),E.invert=e.invert&&A,T()}}function wM(t){var e=0,n=E/3,r=xM(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*l4,n=t[1]*l4):[e*s4,n*s4]},t}function kM(t,e){var n,r,i,a=T(t),o=(a+T(e))/2;return c4(o)<P?(n=A(t),s.invert=function(t,e){return[t/n,x4(e*n)]},s):(i=m4(r=1+a*(2*o-a))/o,l.invert=function(t,e){var e=i-e,n=f4(t,c4(e))*y4(e);return e*o<0&&(n-=E*y4(t)*y4(e)),[n/o,x4((r-(t*t+e*e)*o*o)/(2*o))]},l);function s(t,e){return[t*n,T(e)/n]}function l(t,e){e=m4(r-2*o*T(e))/o;return[e*T(t*=o),i-e*A(t)]}}function MM(){return wM(kM).scale(155.424).center([0,33.6442])}function OM(){return MM().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function _M(i){return function(t,e){var n=A(t),r=A(e),n=i(n*r);return n===1/0?[2,0]:[n*r*T(t),n*T(e)]}}function SM(a){return function(t,e){var n=m4(t*t+e*e),r=a(n),i=T(r),r=A(r);return[f4(t*i,n*r),x4(n&&e*i/n)]}}var EM=_M(function(t){return m4(2/(1+t))});EM.invert=SM(function(t){return 2*x4(t/2)});var AM=_M(function(t){return(t=b4(t))&&t/T(t)});function TM(t,e){return[t,p4(v4((i4+e)/2))]}function PM(r){var i,a,o,s=bM(r),e=s.center,l=s.scale,n=s.translate,c=s.clipExtent,u=null;function f(){var e,t=E*l(),n=s((e=R4((e=s.rotate())[0]*l4,e[1]*l4,2<e.length?e[2]*l4:0),function(t){return(t=e.invert(t[0]*l4,t[1]*l4))[0]*=s4,t[1]*=s4,t}([0,0])));return c(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===TM?[[Math.max(n[0]-t,u),i],[Math.min(n[0]+t,a),o]]:[[u,Math.max(n[1]-t,i)],[a,Math.min(n[1]+t,o)]])}return s.scale=function(t){return(arguments.length?(l(t),f):l)()},s.translate=function(t){return(arguments.length?(n(t),f):n)()},s.center=function(t){return(arguments.length?(e(t),f):e)()},s.clipExtent=function(t){return arguments.length?(null==t?u=i=a=o=null:(u=+t[0][0],i=+t[0][1],a=+t[1][0],o=+t[1][1]),f()):null==u?null:[[u,i],[a,o]]},f()}function NM(t){return v4((i4+t)/2)}function LM(t,e){var n=A(t),i=t===e?T(t):p4(n/A(e))/p4(NM(e)/NM(t)),a=n*g4(NM(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=y4(i)*m4(t*t+e*e),r=f4(t,c4(e))*y4(e);return e*i<0&&(r-=E*y4(t)*y4(e)),[r/i,2*u4(g4(a/n,1/i))-i4]},r):TM;function r(t,e){0<a?e<-i4+P&&(e=-i4+P):i4-P<e&&(e=i4-P);e=a/g4(NM(e),i);return[e*T(i*t),a-e*A(i*t)]}}function CM(t,e){return[t,e]}function jM(t,e){var n=A(t),r=t===e?T(t):(n-A(e))/(e-t),i=n/r+t;return c4(r)<P?CM:(a.invert=function(t,e){var e=i-e,n=f4(t,c4(e))*y4(e);return e*r<0&&(n-=E*y4(t)*y4(e)),[n/r,i-y4(r)*m4(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*T(t),i-e*A(t)]}}AM.invert=SM(function(t){return t}),TM.invert=function(t,e){return[t,2*u4(d4(e))-i4]},CM.invert=CM;var FM=1.340264,IM=-.081106,RM=893e-6,BM=.003796,DM=m4(3)/2;function zM(t,e){var e=x4(DM*T(e)),n=e*e,r=n*n*n;return[t*A(e)/(DM*(FM+3*IM*n+r*(7*RM+9*BM*n))),e*(FM+IM*n+r*(RM+BM*n))]}function GM(t,e){var n=A(e),r=A(t)*n;return[n*T(t)/r,T(e)/r]}function WM(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function HM(t,e){return[A(e)*T(t),T(e)]}function VM(t,e){var n=A(e),r=1+A(t)*n;return[n*T(t)/r,T(e)/r]}function qM(t,e){return[p4(v4((i4+e)/2)),-t]}zM.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(FM+IM*i+a*(RM+BM*i))-e)/(FM+3*IM*i+a*(7*RM+9*BM*i)))*r)*i*i,!(c4(n)<r4));++o);return[DM*t*(FM+3*IM*i+a*(7*RM+9*BM*i))/A(r),x4(T(r)/DM)]},GM.invert=SM(u4),WM.invert=function(t,e){var n=e,r=25;do{var i=n*n,a=i*i}while(n-=a=(n*(1.007226+i*(.015085+a*(.028874*i-.044475-.005916*a)))-e)/(1.007226+i*(.045255+a*(.259866*i-.311325-.005916*11*a))),c4(a)>P&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},HM.invert=SM(x4),VM.invert=SM(function(t){return 2*u4(t)}),qM.invert=function(t,e){return[-e,2*u4(d4(t))-i4]};var YM=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=OM(),l=MM().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=MM().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function f(t){var e=t[0],t=t[1];return r=null,i.point(e,t),r||(a.point(e,t),r)||(o.point(e,t),r)}function h(){return e=n=null,f}return f.invert=function(t){var e=s.scale(),n=s.translate(),r=(t[0]-n[0])/e,n=(t[1]-n[1])/e;return(.12<=n&&n<.234&&-.425<=r&&r<-.214?l:.166<=n&&n<.234&&-.214<=r&&r<-.115?c:s).invert(t)},f.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),l.stream(t),c.stream(t)],i=r.length,e={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},f.precision=function(t){return arguments.length?(s.precision(t),l.precision(t),c.precision(t),h()):s.precision()},f.scale=function(t){return arguments.length?(s.scale(t),l.scale(.35*t),c.scale(t),f.translate(s.translate())):s.scale()},f.translate=function(t){var e,n,r;return arguments.length?(e=s.scale(),n=+t[0],r=+t[1],i=s.translate(t).clipExtent([[n-.455*e,r-.238*e],[n+.455*e,r+.238*e]]).stream(u),a=l.translate([n-.307*e,r+.201*e]).clipExtent([[n-.425*e+P,r+.12*e+P],[n-.214*e-P,r+.234*e-P]]).stream(u),o=c.translate([n-.205*e,r+.212*e]).clipExtent([[n-.214*e+P,r+.166*e+P],[n-.115*e-P,r+.234*e-P]]).stream(u),h()):s.translate()},f.fitExtent=function(t,e){return uM(f,t,e)},f.fitSize=function(t,e){return fM(f,t,e)},f.fitWidth=function(t,e){return hM(f,t,e)},f.fitHeight=function(t,e){return dM(f,t,e)},f.scale(1070)},geoAlbers:OM,geoAzimuthalEqualArea:function(){return bM(EM).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:EM,geoAzimuthalEquidistant:function(){return bM(AM).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:AM,geoConicConformal:function(){return wM(LM).scale(109.5).parallels([30,30])},geoConicConformalRaw:LM,geoConicEqualArea:MM,geoConicEqualAreaRaw:kM,geoConicEquidistant:function(){return wM(jM).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:jM,geoEqualEarth:function(){return bM(zM).scale(177.158)},geoEqualEarthRaw:zM,geoEquirectangular:function(){return bM(CM).scale(152.63)},geoEquirectangularRaw:CM,geoGnomonic:function(){return bM(GM).scale(144.049).clipAngle(60)},geoGnomonicRaw:GM,geoIdentity:function(){var r,i,e,n,a,o,s,l=1,c=0,u=0,f=1,h=1,d=0,p=null,g=1,y=1,m=sM({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=ck;function b(){return g=l*f,y=l*h,o=s=null,x}function x(t){var e,n=t[0]*g,t=t[1]*y;return d&&(e=t*r-n*i,n=n*r+t*i,t=e),[n+c,t+u]}return x.invert=function(t){var e,n=t[0]-c,t=t[1]-u;return d&&(e=t*r+n*i,n=n*r-t*i,t=e),[n/g,t/y]},x.stream=function(t){return o&&s===t?o:o=m(v(s=t))},x.postclip=function(t){return arguments.length?(v=t,p=e=n=a=null,b()):v},x.clipExtent=function(t){return arguments.length?(v=null==t?(p=e=n=a=null,ck):ek(p=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),b()):null==p?null:[[p,e],[n,a]]},x.scale=function(t){return arguments.length?(l=+t,b()):l},x.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],b()):[c,u]},x.angle=function(t){return arguments.length?(i=T(d=t%360*l4),r=A(d),b()):d*s4},x.reflectX=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.reflectY=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.fitExtent=function(t,e){return uM(x,t,e)},x.fitSize=function(t,e){return fM(x,t,e)},x.fitWidth=function(t,e){return hM(x,t,e)},x.fitHeight=function(t,e){return dM(x,t,e)},x},geoProjection:bM,geoProjectionMutator:xM,geoMercator:function(){return PM(TM).scale(961/o4)},geoMercatorRaw:TM,geoNaturalEarth1:function(){return bM(WM).scale(175.295)},geoNaturalEarth1Raw:WM,geoOrthographic:function(){return bM(HM).scale(249.5).clipAngle(90+P)},geoOrthographicRaw:HM,geoStereographic:function(){return bM(VM).scale(250).clipAngle(142)},geoStereographicRaw:VM,geoTransverseMercator:function(){var t=PM(qM),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],2<t.length?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:qM});function UM(t){return{type:"FeatureCollection",features:t.flatMap(t=>function(t){if(!t||!t.type)return null;var e={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featureCollection"}[t.type];if(!e)return null;return"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featureCollection"===e?t:void 0}(t).features)}}function XM(t,e,n,r){var i,a,o,s,l,c,{outline:e=(e=e.filter($M),e.find(t=>t.sphere)?{type:"Sphere"}:UM(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:c,y:l,width:a,height:s}=c=n,i.fitExtent([[c,l],[a,s]],o)):"fitWidth"===r&&(i=t,c=e,{width:l,height:a}=l=n,[[l,c],[s,o]]=oM(i.fitWidth(l,c)).bounds(c),o=Math.ceil(o-c),c=Math.min(Math.ceil(s-l),o),s=i.scale()*(c-1)/c,[l,c]=i.translate(),c+=(a-o)/2,i.scale(s).translate([l,c]).precision(.2))}function KM(t){var e=t["data"];return Array.isArray(e)?Object.assign(Object.assign({},t),{data:{value:e}}):(e=e["type"],"graticule10"===e?Object.assign(Object.assign({},t),{data:{value:[ik()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function $M(t){return"geoPath"===t.type}var ZM,ys=()=>t=>{var{children:e,projection:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,h=Z(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Ws(t);if(e=YM[e])return e;throw new Error("Unknown projection: "+t)}(r),p=e.map(KM);let g;return[Object.assign(Object.assign({},t),{type:"view",scale:{x:{type:"identity"},y:{type:"identity"}},axis:!1,coordinates:[{type:function(){return[["custom",(t,e,n,r)=>{const i=d();var a,o,s,l={x:t,y:e,width:n,height:r},c=(XM(i,p,l,h),i),l=h;for([o,s]of Object.entries(l))null!=(a=c[o])&&a.call(c,s);g=oM(i);const u=new Kp({domain:[t,t+n]}),f=new Kp({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),f.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),f.invert(e)],i.invert(t)):null;var e}}}]]}}],children:p.flatMap(t=>{return $M(t)?(e=t.style,Object.assign(Object.assign({},t),{type:"path",style:Object.assign(Object.assign({},e),{d:t=>g(t)})})):t;var e})})]},ks=(ys.props={},()=>t=>{var{data:e,scale:n,encode:r,style:i,animate:a,key:o}=t,t=Z(t,["type","data","scale","encode","style","animate","key"]);return[Object.assign(Object.assign({type:"geoView"},t),{children:[{type:"geoPath",key:o+"-0",data:{value:e},scale:n,encode:r,style:i,animate:a}]})]});ks.props={};const JM={"composition.geoView":ys,"composition.geoPath":ks};function QM(){return Object.assign({"data.fetch":Fh,"data.inline":Hh,"data.sortBy":Wh,"data.filter":Rh,"data.pick":zh,"data.rename":Gh,"data.subset":Dh,"data.fold":Ih,"data.custom":Vh,"data.map":qh,"data.cluster":xh,"data.tree":wh,"data.sankey":of,"data.arc":Kh,"data.wordCloud":gd,"data.join":md,"transform.maybeZeroY1":P5,"transform.maybeZeroX":V5,"transform.maybeStackY":W5,"transform.maybeTitle":H5,"transform.maybeSeries":X5,"transform.maybeZeroPadding":tw,"transform.stackY":z5,"transform.binX":Zw,"transform.bin":$w,"transform.dodgeX":aw,"transform.jitter":uw,"transform.jitterX":fw,"transform.symmetryY":hw,"transform.diffY":dw,"transform.stackEnter":ow,"transform.normalizeY":sw,"transform.select":vw,"transform.selectX":Ow,"transform.selectY":_w,"transform.groupX":Rw,"transform.groupY":Bw,"transform.groupColor":Dw,"transform.group":Iw,"transform.maybeSize":Y5,"transform.maybeZeroY":q5,"transform.maybeKey":U5,"transform.sortX":Ww,"transform.sortY":Vw,"transform.sortColor":Hw,"transform.flexX":qw,"transform.maybeTupleY":K5,"transform.maybeTupleX":$5,"transform.maybeIdentityY":Z5,"transform.maybeIdentityX":J5,"transform.maybeTuple":rw,"transform.maybeVisualPosition":ew,"transform.maybeFunctionAttribute":nw,"transform.maybeGradient":iw,"transform.maybeTooltip":Q5,"transform.pack":Uw,"transform.sample":Jw,"coordinate.cartesian":tl,"coordinate.polar":el,"coordinate.helix":nl,"coordinate.transpose":rl,"coordinate.theta":sl,"coordinate.reflect":il,"coordinate.reflectX":al,"coordinate.reflectY":ol,"coordinate.parallel":cl,"coordinate.fisheye":ul,"coordinate.fisheyeX":fl,"coordinate.fisheyeY":hl,"coordinate.radial":ll,"encode.constant":dl,"encode.field":gl,"encode.transform":pl,"encode.column":yl,"mark.interval":Nc,"mark.rect":Lc,"mark.line":Su,"mark.point":Eu,"mark.text":Au,"mark.cell":Tu,"mark.area":Pu,"mark.link":Nu,"mark.image":Lu,"mark.polygon":Cu,"mark.box":ju,"mark.vector":Fu,"mark.lineX":Ru,"mark.lineY":Iu,"mark.connector":Bu,"mark.range":Gu,"mark.rangeX":Wu,"mark.rangeY":Hu,"mark.sankey":df,"mark.path":pf,"mark.treemap":bf,"mark.pack":xf,"mark.boxplot":Tf,"mark.shape":Pf,"mark.forceGraph":vh,"mark.tree":kh,"mark.wordCloud":vd,"palette.category10":bd,"palette.category20":xd,"palette.sequentialBlue":wd,"palette.sequentialDarkBlue":kd,"palette.sequentialGreen":Md,"palette.sequentialDarkGreen":Od,"palette.sequentialGrey":_d,"palette.sequentialOrange":Sd,"palette.sequentialPink":Ed,"palette.sequentialRed":Ad,"palette.sequentialYellow":Td,"palette.sequentialPurple":Pd,"palette.sequentialYellowOrange":Nd,"palette.sequentialYellowGreen":Ld,"palette.sequentialPinkPurple":Cd,"palette.sequentialGreenBlue":jd,"palette.divergingGreenYellow":Fd,"palette.divergingRedBlue":Id,"palette.divergingGreenRed":Rd,"palette.divergingRedPurple":Bd,"scale.linear":k0,"scale.ordinal":M0,"scale.band":w0,"scale.identity":O0,"scale.point":_0,"scale.time":S0,"scale.log":E0,"scale.pow":A0,"scale.sqrt":L0,"scale.threshold":T0,"scale.quantile":P0,"scale.quantize":N0,"scale.sequential":C0,"shape.interval.rect":$1,"shape.interval.hollow":Z1,"shape.interval.funnel":J1,"shape.interval.pyramid":tg,"shape.rect.rect":$1,"shape.rect.hollow":Z1,"shape.cell.cell":$1,"shape.cell.hollow":Z1,"shape.line.line":ig,"shape.line.hv":og,"shape.line.vh":sg,"shape.line.hvh":lg,"shape.line.smooth":ag,"shape.point.bowtie":hg,"shape.point.cross":dg,"shape.point.diamond":pg,"shape.point.hexagon":gg,"shape.point.hollowBowtie":yg,"shape.point.hollowDiamond":mg,"shape.point.hollowHexagon":vg,"shape.point.hollow":bg,"shape.point.hollowSquare":xg,"shape.point.hollowTriangle":wg,"shape.point.hollowTriangleDown":kg,"shape.point.hyphen":Mg,"shape.point.line":Og,"shape.point.plus":_g,"shape.point.point":Sg,"shape.point.square":Eg,"shape.point.tick":Ag,"shape.point.triangle":Tg,"shape.point.triangleDown":Pg,"shape.text.text":Wb,"shape.area.area":Ub,"shape.area.smooth":Xb,"shape.area.step":Kb,"shape.link.smooth":Zb,"shape.link.vhv":Jb,"shape.link.arc":Qb,"shape.link.link":$b,"shape.image.image":t2,"shape.polygon.polygon":e2,"shape.polygon.ribbon":n2,"shape.box.box":r2,"shape.vector.vector":Ng,"shape.label.label":y2,"shape.text.badge":Vb,"shape.lineX.line":i2,"shape.lineY.line":i2,"shape.shape.shape":x2,"shape.connector.connector":s2,"shape.range.range":$1,"shape.rangeX.range":$1,"shape.rangeY.range":$1,"shape.path.path":v2,"shape.path.hollow":b2,"theme.light":w2,"theme.dark":O2,"component.axisX":Y2,"component.axisY":U2,"component.legendCategory":X2,"component.legendContinuous":K2,"component.title":Z2,"animation.scaleInX":rx,"animation.scaleOutX":ix,"animation.scaleInY":ax,"animation.scaleOutY":ox,"animation.waveIn":px,"animation.fadeIn":sx,"animation.fadeOut":lx,"animation.zoomIn":gx,"animation.zoomOut":yx,"animation.pathIn":mx,"animation.morphing":dx,"animation.growInX":vx,"animation.growInY":bx,"interaction.elementHighlight":Nx,"interaction.elementHighlightByX":Lx,"interaction.elementHighlightByColor":Cx,"interaction.elementSelect":Fx,"interaction.elementSelectByX":Ix,"interaction.elementSelectByColor":Rx,"interaction.fisheye":Dx,"interaction.chartIndex":Bx,"interaction.tooltip":Kx,"composition.spaceLayer":Qx,"composition.spaceFlex":t5,"composition.mark":n5,"composition.view":e5,"composition.facetRect":h5,"composition.repeatMatrix":y5,"composition.facetCircle":k5,"composition.timingKeyframe":M5,"labelTransform.hideOverlap":J3,"labelTransform.dodgeY":t4,"labelTransform.spider":e4,"labelTransform.surround":n4},JM)}function t6(t,e,...n){t&&(t[e]||[]).forEach(t=>{t.apply(this,n)})}function e6(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||lf("Unknown Component: "+t)};return[t=>{var e=t["type"],t=Z(t,["type"]);return r(e)(Object.assign({},t))},r]}function h(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}(ms=ZM=ZM||{}).BEFORE_RENDER="beforerender",ms.AFTER_RENDER="afterrender",ms.BEFORE_PAINT="beforepaint",ms.AFTER_PAINT="afterpaint",ms.BEFORE_CHANGE_DATA="beforechangedata",ms.AFTER_CHANGE_DATA="afterchangedata",ms.BEFORE_CLEAR="beforeclear",ms.AFTER_CLEAR="afterclear",ms.BEFORE_DESTROY="beforedestroy",ms.AFTER_DESTROY="afterdestroy",ms.BEFORE_CHANGE_SIZE="beforechangesize",ms.AFTER_CHANGE_SIZE="afterchangesize";cs=h("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),La=h("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),r=h("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Ea=h("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),e=h("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),ds=h("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Ka=h("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),fs=h("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),sb=h("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),hs=h("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function n6(t,e,n){(t.prototype=e.prototype=n).constructor=t}function r6(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function i6(){}var a6=1/.7,fc="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",us="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",o6=/^#([0-9a-f]{3,8})$/,s6=new RegExp(`^rgb\\(${fc},${fc},${fc}\\)$`),l6=new RegExp(`^rgb\\(${us},${us},${us}\\)$`),c6=new RegExp(`^rgba\\(${fc},${fc},${fc},${n}\\)$`),u6=new RegExp(`^rgba\\(${us},${us},${us},${n}\\)$`),f6=new RegExp(`^hsl\\(${n},${us},${us}\\)$`),h6=new RegExp(`^hsla\\(${n},${us},${us},${n}\\)$`),d6={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 p6(){return this.rgb().formatHex()}function g6(){return this.rgb().formatRgb()}function y6(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=o6.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?m6(e):3===n?new w6(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?v6(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?v6(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=s6.exec(t))?new w6(e[1],e[2],e[3],1):(e=l6.exec(t))?new w6(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=c6.exec(t))?v6(e[1],e[2],e[3],e[4]):(e=u6.exec(t))?v6(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=f6.exec(t))?E6(e[1],e[2]/100,e[3]/100,1):(e=h6.exec(t))?E6(e[1],e[2]/100,e[3]/100,e[4]):d6.hasOwnProperty(t)?m6(d6[t]):"transparent"===t?new w6(NaN,NaN,NaN,0):null}function m6(t){return new w6(t>>16&255,t>>8&255,255&t,1)}function v6(t,e,n,r){return new w6(t=r<=0?e=n=NaN:t,e,n,r)}function b6(t){return(t=t instanceof i6?t:y6(t))?new w6((t=t.rgb()).r,t.g,t.b,t.opacity):new w6}function x6(t,e,n,r){return 1===arguments.length?b6(t):new w6(t,e,n,null==r?1:r)}function w6(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function k6(){return"#"+S6(this.r)+S6(this.g)+S6(this.b)}function M6(){var t=O6(this.opacity);return(1===t?"rgb(":"rgba(")+_6(this.r)+`, ${_6(this.g)}, `+_6(this.b)+(1===t?")":`, ${t})`)}function O6(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function _6(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function S6(t){return((t=_6(t))<16?"0":"")+t.toString(16)}function E6(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new T6(t,e,n,r)}function A6(t){var e,n,r,i,a,o,s,l;return t instanceof T6?new T6(t.h,t.s,t.l,t.opacity):(t=t instanceof i6?t:y6(t))?t instanceof T6?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new T6(o,s,l,t.opacity)):new T6}function T6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function P6(t){return(t=(t||0)%360)<0?t+360:t}function N6(t){return Math.max(0,Math.min(1,t||0))}function L6(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}n6(i6,y6,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:p6,formatHex:p6,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return A6(this).formatHsl()},formatRgb:g6,toString:g6}),n6(w6,x6,r6(i6,{brighter(t){return t=null==t?a6:Math.pow(a6,t),new w6(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new w6(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new w6(_6(this.r),_6(this.g),_6(this.b),O6(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:k6,formatHex:k6,formatHex8:function(){return"#"+S6(this.r)+S6(this.g)+S6(this.b)+S6(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:M6,toString:M6})),n6(T6,function(t,e,n,r){return 1===arguments.length?A6(t):new T6(t,e,n,null==r?1:r)},r6(i6,{brighter(t){return t=null==t?a6:Math.pow(a6,t),new T6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new T6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,e=n+(n<.5?n:1-n)*e,n=2*n-e;return new w6(L6(240<=t?t-240:120+t,n,e),L6(t,n,e),L6(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new T6(P6(this.h),N6(this.s),N6(this.l),O6(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(){var t=O6(this.opacity);return(1===t?"hsl(":"hsla(")+P6(this.h)+`, ${100*N6(this.s)}%, ${100*N6(this.l)}%`+(1===t?")":`, ${t})`)}}));const C6=Math.PI/180,j6=180/Math.PI;var F6=1.78277,I6=-.29227,R6=-.90649,B6=1.97294,D6=B6*R6,z6=B6*F6,G6=F6*I6- -.14861*R6;function W6(t,e,n,r){return 1===arguments.length?(i=t)instanceof H6?new H6(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof w6?i:b6(i)).r/255,o=i.g/255,l=i.b/255,l=(B6*(o-(a=(G6*l+D6*a-z6*o)/(G6+D6-z6)))-I6*(o=l-a))/R6,new H6((l=(s=Math.sqrt(l*l+o*o)/(B6*a*(1-a)))?Math.atan2(l,o)*j6-120:NaN)<0?l+360:l,s,a,i.opacity)):new H6(t,e,n,null==r?1:r);var i,a,o,s,l}function H6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}n6(H6,W6,r6(i6,{brighter(t){return t=null==t?a6:Math.pow(a6,t),new H6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new H6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*C6,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new w6(255*(e+n*(-.14861*r+F6*t)),255*(e+n*(I6*r+R6*t)),255*(e+B6*r*n),this.opacity)}}));var V6=t=>()=>t;function q6(e,n){return function(t){return e+t*n}}function Y6(a){return 1==(a=+a)?U6:function(t,e){return e-t?(n=t,r=e,i=a,n=Math.pow(n,i),r=Math.pow(r,i)-n,i=1/i,function(t){return Math.pow(n+t*r,i)}):V6(isNaN(t)?e:t);var n,r,i}}function U6(t,e){var n=e-t;return n?q6(t,n):V6(isNaN(t)?e:t)}!function t(e){var o=Y6(e);function n(e,t){var n=o((e=x6(e)).r,(t=x6(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=U6(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=r(t),e.b=i(t),e.opacity=a(t),e+""}}return n.gamma=t,n}(1);X6=function(s){var l=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?l-(t=1):Math.floor(t*l),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<l-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/l)*l)+3*(n=t*t)-(e=n*t))*a+(4-6*n+3*e)*r+(1+3*t+3*n-3*e)*i+e*o)/6}};var X6,K6=function(t){for(var e,n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),o=0;o<n;++o)e=x6(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=X6(r),i=X6(i),a=X6(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function $6(s){return function t(o){function e(e,t){var n=s((e=W6(e)).h,(t=W6(t)).h),r=U6(e.s,t.s),i=U6(e.l,t.l),a=U6(e.opacity,t.opacity);return function(t){return e.h=n(t),e.s=r(t),e.l=i(Math.pow(t,o)),e.opacity=a(t),e+""}}return o=+o,e.gamma=t,e}(1)}$6(function(t,e){var n=e-t;return n?q6(t,180<n||n<-180?n-360*Math.round(n/360):n):V6(isNaN(t)?e:t)});var ka=$6(U6),o=t=>K6(t[t.length-1]),Ta=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(h),Aa=o(Ta),Pa=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(h),i=o(Pa),a=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(h),Ca=o(a),hn=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(h),Fa=o(hn),Ra=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(h),Ba=o(Ra),Da=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(h),za=o(Da),c=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(h),Ia=o(c),Na=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(h),ls=o(Na),ja=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(h),ps=o(ja),Ha=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(h),ys=o(Ha),ks=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(h),ms=o(ks),fc=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(h),us=o(fc),n=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(h),Z6=o(n),J6=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(h),Q6=o(J6),t8=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(h),e8=o(t8),n8=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(h),r8=o(n8),i8=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(h),a8=o(i8),o8=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(h),s8=o(o8),l8=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(h),c8=o(l8),u8=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(h),f8=o(u8),h8=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(h),d8=o(h8),p8=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(h),g8=o(p8),y8=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(h),m8=o(y8),v8=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(h),b8=o(v8),x8=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(h),w8=o(x8),k8=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(h),M8=o(k8),O8=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(h),o=o(O8);var _8=ka(W6(300,.5,0),W6(-240,.5,1)),S8=ka(W6(-100,.75,.35),W6(80,1.5,.8)),ka=ka(W6(260,.75,.35),W6(80,1.5,.8)),E8=W6();var A8=x6(),T8=Math.PI/3,P8=2*Math.PI/3;function N8(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var L8=N8(h("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),C8=N8(h("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),j8=N8(h("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),F8=N8(h("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),I8=Object.freeze({__proto__:null,schemeCategory10:cs,schemeAccent:La,schemeDark2:r,schemePaired:Ea,schemePastel1:e,schemePastel2:ds,schemeSet1:Ka,schemeSet2:fs,schemeSet3:sb,schemeTableau10:hs,interpolateBrBG:Aa,schemeBrBG:Ta,interpolatePRGn:i,schemePRGn:Pa,interpolatePiYG:Ca,schemePiYG:a,interpolatePuOr:Fa,schemePuOr:hn,interpolateRdBu:Ba,schemeRdBu:Ra,interpolateRdGy:za,schemeRdGy:Da,interpolateRdYlBu:Ia,schemeRdYlBu:c,interpolateRdYlGn:ls,schemeRdYlGn:Na,interpolateSpectral:ps,schemeSpectral:ja,interpolateBuGn:ys,schemeBuGn:Ha,interpolateBuPu:ms,schemeBuPu:ks,interpolateGnBu:us,schemeGnBu:fc,interpolateOrRd:Z6,schemeOrRd:n,interpolatePuBuGn:Q6,schemePuBuGn:J6,interpolatePuBu:e8,schemePuBu:t8,interpolatePuRd:r8,schemePuRd:n8,interpolateRdPu:a8,schemeRdPu:i8,interpolateYlGnBu:s8,schemeYlGnBu:o8,interpolateYlGn:c8,schemeYlGn:l8,interpolateYlOrBr:f8,schemeYlOrBr:u8,interpolateYlOrRd:d8,schemeYlOrRd:h8,interpolateBlues:g8,schemeBlues:p8,interpolateGreens:m8,schemeGreens:y8,interpolateGreys:b8,schemeGreys:v8,interpolatePurples:w8,schemePurples:x8,interpolateReds:M8,schemeReds:k8,interpolateOranges:o,schemeOranges:O8,interpolateCividis:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},interpolateCubehelixDefault:_8,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return E8.h=360*t-100,E8.s=1.5-1.5*e,E8.l=.8-.9*e,E8+""},interpolateWarm:S8,interpolateCool:ka,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,A8.r=255*(e=Math.sin(t))*e,A8.g=255*(e=Math.sin(t+T8))*e,A8.b=255*(e=Math.sin(t+P8))*e,A8+""},interpolateTurbo:function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},interpolateViridis:L8,interpolateMagma:C8,interpolateInferno:j8,interpolatePlasma:F8});function R8(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function B8(t,e,n,r,i){var a=t[0],t=t[1],o=D();return a=[a,t],(t=o)[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=a[0],t[7]=a[1],t[8]=1,t}function D8(t,e,n,r,i){var a=new Kp({range:[e,e+r]}),o=new Kp({range:[n,n+i]});return{transform:function(t){var e=t[0],t=t[1];return[a.map(e),o.map(t)]},untransform:function(t){var e=t[0],t=t[1];return[a.invert(e),o.invert(t)]}}}function z8(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function G8(t,e,n,r,i){return t[0]}function W8(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],l=new Kp({range:[s,t]}),c=new Kp({range:[a,o]}),u=1<(s=i/r)?1:s,f=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=c.map(e),t=l.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*f)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/f,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=R8(Math.atan2(t,e),a,o);return[c.invert(t),l.invert(n)]}}}function H8(t,e,n,r,i){return{transform:function(t){var e=t[0];return[t[1],e]},untransform:function(t){var e=t[0];return[t[1],e]}}}function V8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return $8.apply(void 0,Z8([[-1,-1]],e,!1))}function q8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return $8.apply(void 0,Z8([[-1,1]],e,!1))}function Y8(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return $8.apply(void 0,Z8([[1,-1]],e,!1))}function U8(t,e,n,r,i){var a,t=t[0],o=D();return o=o,t=t,a=Math.sin(t),t=Math.cos(t),o[0]=t,o[1]=a,o[2]=0,o[3]=-a,o[4]=t,o[5]=0,o[6]=0,o[7]=0,o[8]=1,o}function X8(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=(t[3]-s)/(+o/(2*Math.PI)+1),c=l/(2*Math.PI),u=new Kp({range:[s,s+.99*l]}),f=new Kp({range:[a,o]}),h=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=f.map(e),t=u.map(t);return[.5*(Math.cos(e)*(c*e+t)*h)+.5,.5*(Math.sin(e)*(c*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/h,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=R8(Math.atan2(t,e)+Math.floor(n/l)*Math.PI*2,a,o),e=n-c*t;return[f.invert(t),u.invert(e)]}}}function K8(t,e,n,r,i){var s=t[0],l=t[1],a=t[2],t=t[3],c=new Kp({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new $p({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,l]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=c.map(a);e.push(o,a)}return e},untransform:function(t){for(var e=[],n=0;n<t.length;n+=2){var r=t[n+1];e.push(c.invert(r))}return e}}}var $8=function(t,e,n,r,i){var a=t[0],t=t[1],o=D();return a=[a,t],(t=o)[0]=a[0],t[1]=0,t[2]=0,t[3]=0,t[4]=a[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},Z8=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function J8(t){return 1/Math.tan(t)}function Q8(t,e,n,r,i){var a=J8(t[0]);return{transform:function(t){var e=t[0],t=t[1];return[e+t*a,t]},untransform:function(t){var e=t[0],t=t[1];return[e-t*a,t]}}}function tO(t,e,n,r,i){var a=J8(t[0]);return{transform:function(t){var e=t[0];return[e,t[1]+e*a]},untransform:function(t){var e=t[0];return[e,t[1]-e*a]}}}function eO(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r,r=a?-1:1;return r*i*(n+1)/(n+i/((t-e)*r))+e}function nO(t,e,n,r,i){var a=t<e,i=(a?e-r:i-e)||i-r;return i/(i*(n+1)/(t-e)-n*(a?-1:1))+e}function rO(t,e,n){return n?new Kp({range:[0,1],domain:[0,e]}).map(t):t}function iO(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=rO(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[eO(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[nO(e,s,o,0,1),t]}}}function aO(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=rO(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],eO(t[1],s,o,0,1)]},untransform:function(t){return[t[0],nO(t[1],s,o,0,1)]}}}function oO(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=t[4],c=rO(a,r,t=void 0!==t&&t),u=rO(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[eO(e,c,s,0,1),eO(t,u,l,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[nO(e,c,s,0,1),nO(t,u,l,0,1)]}}}function sO(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],l=t[3],t=void 0!==(t=t[4])&&t,c=new Kp({range:[0,r]}),u=new Kp({range:[0,i]}),f=t?a:c.map(a),h=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=eO(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=c.map(e)-f,r=u.map(t)-h,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=nO(i,0,l,0,s),t=Math.atan2(r,n),i=f+e*Math.cos(t),r=h+e*Math.sin(t),[c.invert(i),u.invert(r)])}}}var lO=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,a=e.length;i<a;i++)!r&&i in e||((r=r||Array.prototype.slice.call(e,0,i))[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},cO=(uO.prototype.update=function(t){this.options=I({},this.options,t),this.recoordinate()},uO.prototype.clone=function(){return new uO(this.options)},uO.prototype.getOptions=function(){return this.options},uO.prototype.clear=function(){this.update({transformations:[]})},uO.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},uO.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},uO.prototype.transform=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.options.transformations;return this.update({transformations:lO(lO([],n,!0),[lO([],t,!0)],!1)}),this},uO.prototype.map=function(t){return this.output(t)},uO.prototype.invert=function(t){return this.input(t)},uO.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},uO.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?lO([],this.options.transformations,!0).reverse():this.options.transformations,n=t?function(t){return t.untransform}:function(t){return t.transform},r=[],a=[],i=function(t,e){return a.push((e=void 0===e?!0:e)?(i=t,function(t){for(var e=[],n=0;n<t.length-1;n+=2){var r=[t[n],t[n+1]],r=i(r);e.push.apply(e,r)}return e}):t);var i},o=0,s=e;o<s.length;o++){var l,c,u,f,h=s[o],d=h[0],h=h.slice(1),p=this.transformers[d];p&&(l=(f=this.options).x,c=f.y,u=f.width,f=f.height,p=p(lO([],h,!0),l,c,u,f),(h=p)instanceof Float32Array||h instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||$s,"parallel"!==d)))}return r.length&&i(this.createMatrixTransform(r,t)),function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t?e.reduce(function(e,n){return function(t){return n(e(t))}},t):$s}.apply(void 0,a)},uO.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,l,c,u,f,h,d,p=D();return e&&t.reverse(),t.forEach(function(t){return z(p,p,t)}),e&&(e=t=p,(d=new B(9))[0]=e[0],d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=e[6],d[7]=e[7],d[8]=e[8],d=(e=d)[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=(e=e[8])*a-o*l,h=d*c+n*(u=-e*i+o*s)+r*(f=l*i-a*s))&&(t[0]=c*(h=1/h),t[1]=(-e*n+r*l)*h,t[2]=(o*n-r*a)*h,t[3]=u*h,t[4]=(e*d-r*s)*h,t[5]=(-o*d+r*i)*h,t[6]=f*h,t[7]=(-l*d+n*s)*h,t[8]=(a*d-n*i)*h),function(t){t=[t[0],t[1],1];return Nt(t,t,p),[t[0],t[1]]}},uO);function uO(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:D8,translate:B8,custom:z8,matrix:G8,polar:W8,transpose:H8,scale:$8,"shear.x":Q8,"shear.y":tO,reflect:V8,"reflect.x":q8,"reflect.y":Y8,rotate:U8,helix:X8,parallel:K8,fisheye:oO,"fisheye.x":iO,"fisheye.y":aO,"fisheye.circular":sO},this.update(t)}function fO(t){return void 0!==t.find(t=>"polar"===t.type)}function hO(t){return void 0!==t.find(t=>"helix"===t.type)}function dO(t){return t.filter(({type:t})=>"transpose"===t).length%2==1}function pO(t){return void 0!==t.find(t=>"theta"===t.type)}function gO(t){return void 0!==t.find(t=>"radial"===t.type)}function yO(t,e,n,r,i,a){var o,{guide:s={}}=n,l=function(t,e,n){var{type:n,domain:r,range:i}=n;return void 0!==n?n:"string"==typeof i?"linear":2<(r||i||[]).length?wO(t):void 0===r?OO(e)?wO(t):_O(e)?"time":kO(t,i):OO([r])?wO(t):_O(e)?"time":kO(t,i)}(t,e,n);return"string"!=typeof l?n:(o=function(t,e,n){var r=n["domain"];if(void 0!==r)return r;var{domainMax:i,domainMin:a}=n;switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":case"quantize":case"threshold":var[o,s]=function(t,e){var{zero:e=!1}=e;let n=1/0,r=-1/0;for(const i of t)for(const a of i)uf(a)&&(n=Math.min(n,+a),r=Math.max(r,+a));return n===1/0?[]:e?[Math.min(0,n),r]:[n,r]}(e,n);return[a||o,i||s];case"band":case"ordinal":case"point":return MO(e);case"quantile":return function(t){return MO(t).sort()}(e);case"sequential":var[o,s]=function(t){let e=1/0,n=-1/0;for(const r of t)for(const i of r)uf(i)&&(e=Math.min(e,+i),n=Math.max(n,+i));return e===1/0?[]:[e<0?-n:e,n]}(e);return[a||o,i||s];default:return[]}}(l,e,n),Object.assign(Object.assign(Object.assign({},n),function(t,e,n,r){switch(t){case"linear":case"time":case"log":case"pow":case"sqrt":return function(t){var{interpolate:e=Sp,nice:n=!1,tickCount:r=10}=t;return Object.assign(Object.assign({},t),{interpolate:e,nice:n,tickCount:r})}(n);case"band":case"point":return function(t,e,n,r){if(void 0!==r.padding||void 0!==r.paddingInner||void 0!==r.paddingOuter)return Object.assign(Object.assign({},r),{unknown:NaN});var t=function(t,e,n){return"enterDelay"===e||"enterDuration"===e?0:"band"!==t?"point"===t?.5:0:pO(n)?0:.1}(t,e,n),{paddingInner:e=t,paddingOuter:n=t}=r;return Object.assign(Object.assign({},r),{paddingInner:e,paddingOuter:n,padding:t,unknown:NaN})}(t,e,r,n);case"sequential":return function(t){const{palette:e="ylGnBu",offset:n}=t,r=Ws(e),i=I8["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(l,t,n,r)),{domain:o,range:function(t,e,n,r,i,a,o){var s=r["range"];if("string"==typeof s)return s.split("-");if(void 0!==s)return s;var{rangeMin:l,rangeMax:c}=r;switch(t){case"linear":case"time":case"log":case"sqrt":var u=xO(n,r,i,a,o),[u,f]=function(t,e){return"enterDelay"===t?[0,1e3]:"enterDuration"==t?[300,1e3]:t.startsWith("y")||t.startsWith("position")?[1,0]:"color"===t?[e[0],function(t){return t[t.length-1]}(e)]:"opacity"!==t&&"size"===t?[1,10]:[0,1]}(e,u);return[l||u,c||f];case"band":case"point":return[l||0,c||1];case"ordinal":return xO(n,r,i,a,o);case"sequential":return;default:return[]}}(l,t,e,n,o,i,a),guide:s,name:t,type:l}))}function mO(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(vO)?zc(e):t.every(bO)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function vO(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function bO(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function xO(t,e,n,r,i){var[i]=e6("palette",i),{defaultCategory10:r,defaultCategory20:a}=r,t=(t=t.flat(),Array.from(new Set(t)).length<=r.length?r:a),{palette:r,offset:a}=e;return function(t,n,r=t=>t){if(!t)return null;const e=Ws(t),i=I8["scheme"+e],a=I8["interpolate"+e];if(!i&&!a)return null;if(i){if(!i.some(Array.isArray))return i;t=i[n.length];if(t)return t}return n.map((t,e)=>a(r(e/n.length)))}(r,n,a)||i({type:r||t})}function wO(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function kO(t,e){return"color"!==t||e?"linear":"sequential"}function MO(t){return Array.from(new Set(t.flat()))}function OO(t){return SO(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function _O(t){return SO(t,t=>t instanceof Date)}function SO(t,e){for(const n of t)if(n.some(e))return!0;return!1}function EO(t,e,n){var{encode:r={},scale:i={},transform:a=[]}=e,e=Z(e,["encode","scale","transform"]);return[t,Object.assign(Object.assign({},e),{encode:r,scale:i,transform:a})]}function AO(t,i,a){return re(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=e6("data",t),n=function(t){if(!t)return{type:"inline",value:null};if(Array.isArray(t))return{type:"inline",value:t};var{type:e="inline"}=t,t=Z(t,["type"]);return Object.assign(Object.assign({},t),{type:e})}(e),{transform:r=[]}=n,n=yield function(t){return t.reduce((n,r)=>e=>re(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),sf)}([Z(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?z1(n):[],Object.assign(Object.assign({},i),{data:n})]})}function TO(t,e,n){var r=e["encode"];if(!r)return[t,e];var i,a,o={};for([i,a]of Object.entries(r))if(Array.isArray(a))for(let t=0;t<a.length;t++)o[""+i+(0===t?"":t)]=a[t];else o[i]=a;return[t,Object.assign(Object.assign({},e),{encode:o})]}function PO(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=D1(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date)return;t=t.type;return uf(t)}(t)?t:(e=i,{type:"function"==typeof(n=t)?"transform":"string"!=typeof n||void 0===(null==(e=null==e?void 0:e[0])?void 0:e[n])?"constant":"field",value:t})}),[t,Object.assign(Object.assign({},e),{encode:a})]):[t,e]}function NO(t,e,n){var r=e["encode"];return r?(r=D1(r,(t,e)=>{var n=t["type"];return"constant"!==n||(n=e).startsWith("x")||n.startsWith("y")||n.startsWith("position")||"enterDelay"===n||"enterDuration"===n||"updateDelay"===n||"updateDuration"===n||"exitDelay"===n||"exitDuration"===n?t:Object.assign(Object.assign({},t),{visual:!0})}),[t,Object.assign(Object.assign({},e),{encode:r})]):[t,e]}function LO(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=e6("encode",t);return(t,e)=>void 0===e||void 0===t?null:Object.assign(Object.assign({},e),{type:"column",value:n(e)(t),field:function(t){var{type:t,value:e}=t;return"field"===t&&"string"==typeof e?e:null}(e)})}(n);n=D1(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function CO(l,t,e){var n,r=t["encode"],i=Z(t,["encode"]);return r?(n=(r=Object.entries(r)).filter(([,t])=>{t=t.value;return Array.isArray(t[0])}).flatMap(([n,t])=>{var r=[[n,new Array(l.length).fill(void 0)]];const i=t["value"],a=Z(t,["value"]);for(let e=0;e<i.length;e++){var o=i[e];if(Array.isArray(o))for(let t=0;t<o.length;t++){var s=r[t]||[""+n+t,new Array(l).fill(void 0)];s[1][e]=o[t],r[t]=s}}return r.map(([t,e])=>[t,Object.assign({type:"column",value:e},a)])}),r=Object.fromEntries([...r,...n]),[l,Object.assign(Object.assign({},i),{encode:r})]):[l,t]}function jO(t,e,n){const{axis:r={},legend:i={}}=e,a=(t,e)=>{return"boolean"==typeof t?t?{}:null:void 0===(t=t[e])||t?t:null};var o="object"==typeof r?Array.from(new Set(["x","y",...Object.keys(r)])):["x","y"];return I(e,{scale:Object.assign(Object.assign({},Object.fromEntries(o.map(t=>[t,{guide:a(r,t)}]))),{color:{guide:a(i,"color")},size:{guide:a(i,"size")}})}),[t,e]}function FO(t,e,n){var r=e["animate"];return r||void 0===r||I(e,{animate:{enterType:null,exitType:null,updateType:null}}),[t,e]}function IO(s,l,c){return re(this,void 0,void 0,function*(){var[t,e]=yield function(s,l,c){return re(this,void 0,void 0,function*(){var t=c["library"],[t]=e6("transform",t),{preInference:e=[],postInference:n=[]}=l,{transform:r=[]}=s,e=[EO,AO,TO,PO,NO,LO,CO,FO,jO,...e.map(t),...r.map(t),...n.map(t)];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,c);return[i,a]})}(s,l,{library:c});const{encode:n,scale:u,data:r}=e;if(!1===Array.isArray(r))return null;const i=l["channels"],a=Uc(Object.entries(n).filter(([,t])=>uf(t)),t=>t.map(([t,e])=>Object.assign({name:t},e)),([t])=>{const e=null==(n=/([^\d]+)\d*$/.exec(t))?void 0:n[1];var n=i.find(t=>t.name===e);return null!=n&&n.independent?t:e});var o=i.filter(t=>{const{name:e,required:n}=t;if(a.find(([t])=>t===e))return!0;if(n)throw new Error(`Missing encoding for channel: ${e}.`);return!1}).flatMap(t=>{const{name:e,scale:s,scaleKey:l,range:c}=t;return a.filter(([t])=>t.startsWith(e)).map(([t,e],n)=>{var r=e.some(t=>t.visual),i=u[t]||{},{independent:a=!1,key:o=l||t,type:r=r?"identity":s}=i,i=Z(i,["independent","key","type"]);return{name:t,values:e,scaleKey:a?Symbol("independent"):o,scale:Object.assign({type:r,range:c},i)}})});return[e,Object.assign(Object.assign({},l),{index:t,channels:o})]})}function RO(t,e,n){var r,{component:e=[],coordinates:i=[],title:a,theme:o}=e,[,s]=e6("component",n),n=t.filter(({guide:t})=>null!==t),l=[...e];a&&(t=s("title")["props"],{defaultPosition:e,defaultOrder:t,defaultSize:r}=t,o=function(t){var{size:t,text:e,subtitle:n,style:r,subtitleStyle:i}=t;if(t)return t;r=null!=(t=null==r?void 0:r.fontSize)?t:14,t=null!=(t=null==i?void 0:i.fontSize)?t:12,i=(null==i?void 0:i.spacing)||0;return(e?r+4:0)+(n?t+i:0)}(I({size:r},o,r="string"==typeof a?{text:a}:a)),l.push(Object.assign({type:"title",position:e,order:t,size:o},r)));for(const b of n){var c=function(t,e){var{name:t,guide:n,type:r}=t,n=n["type"];if(void 0!==n)return n;if("color"===t)switch(r){case"ordinal":return"legendCategory";case"linear":return"legendContinuous";default:return null}return dO(e)&&fO(e)||hO(e)||pO(e)?null:t.startsWith("x")?dO(e)?"axisY":"axisX":t.startsWith("y")?dO(e)?"axisX":"axisY":t.startsWith("position")&&!fO(e)?"axisY":null}(b,i);if(null!==c){var u=s(c)["props"],{defaultPosition:f,defaultSize:h,defaultOrder:d}=u,{guide:u,name:p,field:g}=b;for(const x of Array.isArray(u)?u:[u]){var y=function(t,e,n,r,i){n=["left","right","top","bottom","centerHorizontal","center"].includes(r.position)?r.position:n;{if("axisY"===e&&function(t){return void 0!==t.find(t=>"parallel"===t.type)}(i))return null===(t=/position(\d*)/g.exec(t))?n:(t=+t[1],dO(i)?0==t?"top":"centerVertical":0==t?n:"centerHorizontal");if("axisX"===e&&fO(i)&&!dO(i)||"axisY"===e&&fO(i)&&dO(i)||"axisY"===e&&pO(i)||"axisY"===e&&hO(i)||"axisY"===e&&gO(i))return"bottom"===r.position?"arcInner":"arc";if(fO(i)&&("axisX"===e||"axisY"===e))return"arcY";if(gO(i)&&"axisX"===e)return"arcY";if("axisX"===e&&function(t){return void 0!==t.find(t=>"reflect"===t.type)}(i)||"axisX"===e&&function(t){return void 0!==t.find(t=>"reflectY"===t.type)}(i))return"top";if("string"==typeof e&&e.startsWith("legend")&&fO(i)&&"center"===r.position)return"arcCenter"}return n}(p,c,f,x,i),{size:m=h,order:v=d}=x;l.push(Object.assign(Object.assign({title:g},x),{position:y,order:v,size:m,type:c,scale:b}))}}}return l}function BO(t,e,n,r){var[i]=e6("scale",r),[r]=e6("component",r),{scale:a,bbox:o}=t,t=Z(t,["scale","bbox"]),i=a?i(a):null,{field:a,domain:s}=a||{},a={field:a,domain:s,bbox:o};return r(t)(i,a,e,n)}function DO(t,e){var t=function(t,e){var n=qc(t,t=>t.position),{padding:t,paddingLeft:e=t,paddingRight:r=t,paddingBottom:i=t,paddingTop:t=t}=e,a={paddingBottom:i,paddingLeft:e,paddingTop:t,paddingRight:r};for(const l of["left","right","top","bottom"]){var o="padding"+function(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}(l);if(void 0===a[o])if(n.has(l)){const t=n.get(l);var s=t.reduce((t,{size:e})=>t+e,0);a[o]=s}else a[o]=30}return a}(t,e),{paddingLeft:n,paddingRight:r,paddingTop:i,paddingBottom:a}=t,{width:e,height:o,x:s=0,y:l=0,inset:c=0,insetLeft:u=c,insetTop:f=c,insetBottom:h=c,insetRight:c=c,margin:d=0,marginLeft:p=d,marginBottom:g=d,marginTop:y=d,marginRight:d=d}=e;return Object.assign(Object.assign({},t),{width:e,height:o,insetLeft:u,insetTop:f,insetBottom:h,insetRight:c,innerWidth:e-n-r-p-d,innerHeight:o-i-a-y-g,marginLeft:p,marginBottom:g,marginTop:y,marginRight:d,x:s,y:l})}function zO(t,e,n){var I=qc(t,t=>t.position),{paddingLeft:t,paddingRight:n,paddingTop:r,paddingBottom:R,marginLeft:i,marginTop:a,marginBottom:B,marginRight:D,innerHeight:o,innerWidth:s,height:z,width:G}=n,t=t+i,i=r+a,r=n+D,a=R+B,W={top:[t,0,s,i,0,!0,Cc],right:[G-r,i,r,o,1,!1,Cc],bottom:[t,z-a,s,a,0,!1,Cc],left:[0,i,t,o,1,!0,Cc],centerHorizontal:[t,i,s,o,-1,null,null],centerVertical:[t,i,s,o,-1,null,null],arc:[t,i,s,o,-1,null,null],arcY:[t,i,s,o,-1,null,null],arcInner:[t,i,s,o,-1,null,null],center:[t,i,s,o,-1,null,null],arcCenter:[t,i,s,o,-1,null,null]};for(const[F,t]of I.entries()){var l=W[F];if("centerHorizontal"===F)!function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var c=e[t];const r=l[t];var u=l[t+1]-r;c.bbox={x:r,y:i,width:u,height:a}}}(t,e,l);else if("centerVertical"===F)!function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),l=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var c=e[t];const i=l[t];var u=l[t+1]-i;c.bbox={x:r,y:i,width:a,height:u}}}(t,e,l);else if("arc"===F){p=d=h=f=u=c=void 0;var c=t,u=l,[f,h,d,p]=u;for(let t=0;t<c.length;t++)c[t].bbox={x:f,y:h,width:d,height:p}}else if("arcY"===F){M=k=w=x=b=m=y=v=u=g=void 0;var g=t,u=e,[y,m,,v]=v=l,[b,x]=u.getCenter(),[u,w]=GO(u),k=x-w*(v=v/2),M=(w-u)*v;for(let t=0;t<g.length;t++)g[t].bbox={x:b+y,y:k+m,width:0,height:M}}else if("arcInner"===F){P=T=A=E=v=S=_=w=x=O=void 0;var O=t,x=e,[_,S,,w]=w=l,[v,E]=x.getCenter(),[x]=GO(x),A=x*(w=w/2),T=v-A,P=E-A;for(let t=0;t<O.length;t++)O[t].bbox={x:_+T,y:S+P,width:2*A,height:2*A}}else if("arcCenter"===F){Y=q=j=C=V=H=L=E=N=void 0;var N=t,E=e,[L,H,V,C]=L=l,[E]=GO(E),j=C/2*E/Math.sqrt(2),q=L+V/2,Y=H+C/2;for(let t=0;t<N.length;t++)N[t].bbox={x:q-j,y:Y-j,width:2*j,height:2*j}}else!function(n,t){const[e,r,i,a,o,s,l]=t,[c,u,f,h,d,p,g,y]=0===o?["y",r,"x",e,"height",a,"width",i]:["x",e,"y",r,"width",i,"height",a],m=(n.sort((t,e)=>l(t.order,e.order)),s?u+p:u);for(let t=0,e=m;t<n.length;t++){var v=n[t],b=v["size"];v.bbox={[c]:s?e-b:e,[f]:h,[d]:b,[g]:y},e+=b*(s?-1:1)}}(t,l)}}function GO(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[t,e]}function WO(T,P,N,L){return re(this,void 0,void 0,function*(){const[n]=e6("composition",N);var[t]=e6("interaction",N);const e=new Set(Object.keys(N).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(uf)),r=t=>{t=t.type;return"string"==typeof t&&e.has(t)?"mark":t};const i=t=>"standardView"===r(t);var a=t=>{var e;return i(t)?[t]:(e=r(t),n({type:e})(t))},o=[];const s=new Map;for(var l=new Map,c=[T],u=[];c.length;){var f=c.shift();if(i(f)){var h=l.get(f),[h,d]=h?YO(h,f,N):yield VO(f,N),p=(s.set(h,f),o.push(h),d.flatMap(a));if(c.push(...p),p.every(i)){var g=yield Promise.all(p.map(t=>qO(t,N)));mO(h=(h=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),mO(h,"y");for(let t=0;t<p.length;t++){var y=p[t],m=g[t];l.set(y,m)}}}else{d="mark"===r(f)?f:yield JO(f,N),h=a(d);Array.isArray(h)?c.push(...h):"function"==typeof h&&u.push(h())}}var v=T["on"];t6(v,ZM.BEFORE_PAINT);const b=new Map,x=[];P.selectAll(n7(C)).data(o,t=>t.key).join(t=>t.append("g").attr("className",C).attr("id",t=>t.key).call(HO).each(function(t){UO(t,Q(this),x,N),b.set(t,this)}),t=>t.call(HO).each(function(t){UO(t,Q(this),x,N)}),t=>t.remove());var w=Array.from(b.entries()).map(([t,e])=>({view:t,container:e,options:s.get(t),update:function(i,a,o){return r=>re(this,void 0,void 0,function*(){var[t,e]=yield VO(r,a);UO(t,i,[],a);for(const n of e)WO(n,i,a,o);return{options:r,view:t}})}(Q(e),N,L)}));for(const S of w){const T=S["options"];for(const E of function(t){var{interactions:t=[]}=t;return t}(T))t(E)(S,w)}const{width:k,height:M}=T;var O=[];for(const A of u){var _=new Promise(e=>re(this,void 0,void 0,function*(){for(const t of A)yield WO(Object.assign({width:k,height:M},t),P,N,L);e()}));O.push(_)}L.animations=x,t6(v,ZM.AFTER_PAINT);v=x.filter(uf).map($O).map(t=>t.finished);return Promise.all([...v,...O])})}function HO(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function VO(t,e){return re(this,void 0,void 0,function*(){return YO(yield qO(t,e),t,e)})}function qO(v,b){return re(this,void 0,void 0,function*(){var[t]=e6("theme",b);const[i,a]=e6("mark",b);var{theme:e,marks:n,coordinates:r=[]}=v,o=t(ZO(e)),s=new Map,l=[];for(const p of n){var c=yield JO(p,b);l.push(c)}for(const g of yield Promise.all(l.map(r=>re(this,void 0,void 0,function*(){const{type:t=lf("G2Mark type is required."),key:n}=r;var e=a(t)["props"],{composite:e=!1}=e;return e?(yield i(r)(v)).map((t,e)=>Object.assign({key:n+"-"+e},t)):r}))).then(t=>t.flat())){var u,f=g["type"],f=a(f)["props"],f=yield IO(g,f,b);f&&([f,u]=f,s.set(f,u))}for(const y of qc(Array.from(s.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var h=y.reduce((t,{scale:e})=>I(t,e),{}),d=y[0]["values"],d=Array.from(new Set(d.map(t=>t.field).filter(uf)));const v=I({guide:{title:0===d.length?void 0:d},field:d[0]},h);d=y[0]["name"];const m=yO(d,y.flatMap(({values:t})=>t.map(t=>t.value)),v,r,o,b);y.forEach(t=>t.scale=m)}return s})}function YO(t,e,n){var[r]=e6("mark",n);const[i]=e6("scale",n);var a,o,[s]=e6("theme",n),{key:l,frame:c=!1,theme:u,style:f={}}=e,s=s(ZO(u)),u=Array.from(t.values()),u=Array.from(new Set(u.flatMap(t=>t.channels.map(t=>t.scale)))),u=RO(Array.from(u),e,n),h=DO(u,e),d=function(t,e,n){var[n]=e6("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:l,marginLeft:c,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new cO(Object.assign(Object.assign({},t),{x:a+c,y:o+u,width:i-a-s,height:r-l-o,transformations:e.map(n).flat()}))}(h,e,n),e=c?I({mainlineWidth:1,mainStroke:"#000"},f):f,p=(zO(u,d,h),{}),g=[];for([a,o]of t.entries()){const{children:b,dataDomain:x,modifier:w,key:k}=a;var{index:y,channels:m}=o,v=D1(Object.fromEntries(m.map(({name:t,scale:e})=>[t,e])),t=>{var e=t["relations"],[e]=function(o){if(!o||!Array.isArray(o))return[sf,sf];let s,l;return[t=>{s=t.map.bind(t),l=null==(e=t.invert)?void 0:e.bind(t);const r=o.filter(([t])=>"function"==typeof t);var e=o.filter(([t])=>"function"!=typeof t);const i=new Map(e);if(t.map=t=>{for(var[e,n]of r)if(e(t))return n;return i.has(t)?i.get(t):s(t)},l){const n=new Map(e.map(([t,e])=>[e,t])),a=new Map(r.map(([t,e])=>[e,t]));t.invert=t=>a.has(t)?t:n.has(t)?n.get(t):l(t)}return t},t=>(null!==s&&(t.map=s),null!==l&&(t.invert=l),t)]}(e);return e(i(t))});Object.assign(p,v);const M=function(t,e){var n={};for(const s of t){var{values:r,name:i}=s;const l=e[i];for(const c of r){var{name:a,value:o}=c;n[a]=o.map(t=>l.map(t))}}return n}(m,v),[O,_,S]=function([e,n,t]){if(t)return[e,n,t];var r=[],i=[];for(let t=0;t<e.length;t++){var a=e[t],o=n[t];o.every(([t,e])=>uf(t)&&uf(e))&&(r.push(a),i.push(o))}return[r,i]}(r(a)(y,v,M,d));m=x||O.length;const E=w?w(_,m,h):[];y=O.map((t,e)=>{var n={points:_[e],transform:E[e],index:t,markKey:k};for(const[r,i]of Object.entries(M))n[r]=i[t],S&&(n["series"+Ws(r)]=S[e].map(t=>i[t]));return S&&(n.seriesIndex=S[e]),n}),m=(o.data=y,o.index=O,null==b?void 0:b(y,v,h));g.push(...m||[])}return[{layout:h,theme:s,coordinate:d,components:u,markState:t,key:l,scale:p,style:e},g]}function UO(U,X,K,$){re(this,void 0,void 0,function*(){const{components:I,theme:n,layout:t,markState:e,coordinate:r,key:i,style:R}=U,{width:B,height:D}=t,z=Z(t,["x","y","width","height"]),a=["view","plot","main","content"];var o,s,l,c=a.map((t,e)=>e);const u=a.map(t=>ff(Object.assign({},n,R),t)),G=["a","margin","padding","inset"].map(t=>J(z,t)),f=t=>t.style("x",t=>y[t].x).style("y",t=>y[t].y).style("width",t=>y[t].width).style("height",t=>y[t].height).each(function(t){var e,n,r=Q(this),t=u[t];for([e,n]of Object.entries(t))r.style(e,n)});let h=0,d=0,p=B,g=D;const y=c.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=G[t];return h+=t,d+=e,p-=t+r,g-=e+n,{x:h,y:d,width:p,height:g}}),m=(X.selectAll(n7(at)).data(c.filter(t=>uf(u[t])),t=>a[t]).join(t=>t.append("rect").attr("className",at).style("zIndex",-2).call(f),t=>t.call(f),t=>t.remove()),X.selectAll(n7(rt)).data(I,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",rt).append(t=>BO(t,r,n,$)),t=>t.each(function(t){var t=BO(t,r,n,$)["attributes"],[e]=this.childNodes;e.update(Object.assign({},t))})),function(t){let e=-1/0,n=1/0;for(var[r,i]of t){var{animate:r={}}=r,i=i["data"],{updateType:a,updateDuration:o=300,updateDelay:s=0,enterType:l,enterDuration:c=300,enterDelay:u=0,exitType:f,exitDuration:h=300,exitDelay:d=0}=r;for(const M of i){var{updateType:p=a,updateDuration:g=o,updateDelay:y=s,enterType:m=l,enterDuration:v=c,enterDelay:b=u,exitDuration:x=h,exitDelay:w=d,exitType:k=f}=M;void 0!==p&&!p||(e=Math.max(e,g+y),n=Math.min(n,y)),void 0!==k&&!k||(e=Math.max(e,x+w),n=Math.min(n,w)),void 0!==m&&!m||(e=Math.max(e,v+b),n=Math.min(n,b))}}return e===-1/0?null:[n,e-n]}(e)),v=X.selectAll(n7(nt)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",nt).call(QO).call(e7,Array.from(e.keys())),t=>t.call(e7,Array.from(e.keys())).call(t=>{if(!m)return QO(t);{const[l,c]=m;t.transition(function(t){var{x:e,y:n,width:r,height:i}=this.style,{paddingLeft:t,paddingTop:a,innerWidth:o,innerHeight:s}=t;return this.animate([{x:e,y:n,width:r,height:i},{x:t,y:a,width:o,height:s}],{delay:l,duration:c,fill:"both"})})}})).transitions();K.push(...v.flat());for([o,s]of e.entries()){var W=s["data"];const{key:i,class:_}=o,S=function(l,t,e,n){const[c]=e6("shape",n),u=l["data"],{defaultShape:f,data:r}=t,h=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:g,style:y={}}=l;return(t,e)=>{var{shape:n=f}=y,{shape:n=n,points:r,seriesIndex:i,index:a}=t,t=Z(t,["shape","points","seriesIndex","index"]),t=Object.assign(Object.assign({},t),{shape:n,mark:g,defaultShape:f,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=D1(y,t=>XO(t,o,s,u));return c(Object.assign(Object.assign({},e),{type:t7(l,n)}))(r,t,p,d,h)}}(o,s,U,$),E=(b=o,l=s,KO("enter",b,l,U,$)),A=(b=o,l=s,KO("update",b,l,U,$)),T=(b=o,l=s,KO("exit",b,l,U,$));var b=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(X,_,"element");const v=X.select("#"+i).selectAll(n7(et)).selectFacetAll(b).data(W,t=>t.key,t=>t.groupKey).join(t=>t.append(S).attr("className",et).transition(function(t){return E(t,[this])}),e=>e.call(t=>{const l=t.parent(),c=function(n){const r=new Map;return t=>{var e;return r.has(t)?r.get(t):(e=n(t),r.set(t,e),e)}}(t=>{var[t,e]=t.getBounds().min;return[t,e]});e.transition(function(t,e){n=this,r=l,i=c,n.__facet__&&(a=n.parentNode.parentNode,s=r.parentNode,[a,o]=i(a),[i,s]=i(s),a=`translate(${a-i}, ${o-s})`,i=n.style.transform,n.style.transform=(("none"===i?"":i)+" "+a).trimStart(),r.append(n));var n,r,i,a,o=S(t,e),s=A(t,[this],[o]);return null===s&&cf(this,o),s})}),t=>t.transition(function(t){return T(t,[this])}).remove(),t=>t.append(S).attr("className",et).transition(function(t){var e=this["__fromElements__"],t=A(t,e,[this]);return new L1(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new L1([],this.__toData__,this.parentNode).append(S).attr("className",et).nodes();return A(t,[this],e)}).remove()).transitions();K.push(...v.flat())}{var x=U,w=X,k=$,M,O;const[P]=e6("labelTransform",k),{markState:H,labelTransform:N}=x,V=w.select(n7(tt)).node(),L=new Map,C=new Map,q=Array.from(H.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=e6("shape",r),l=t["data"],{data:i,defaultLabelShape:c}=e,u=i.map(t=>t.points),{theme:f,coordinate:h}=n;return t=>{const{index:e,points:n}=t,r=l[e];var{formatter:i=t=>""+t}=t,t=D1(Z(t,["formatter"]),t=>XO(t,r,e,l)),{shape:a=c,text:o}=t,t=Z(t,["shape","text"]),i="string"==typeof i?C2(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,h,f,u)}}(t,e,x,k),a=w.select("#"+r).selectAll(n7(et)).nodes();return n.flatMap((e,n)=>{const r=Z(e,["transform"]);return a.flatMap(t=>{t=function(n,r,t){const{seriesIndex:e,seriesKey:i,points:a,key:o,index:s}=t.__data__,l=function(t){const e=t.cloneNode(),n=t.getAnimations(),r=(e.style.visibility="hidden",n.forEach(t=>{t=t.effect.getKeyframes();e.attr(t[t.length-1])}),t.parentNode.appendChild(e),e.getLocalBounds()),{min:i,max:a}=(e.destroy(),r);return[i,a]}(t);if(!e)return[Object.assign(Object.assign({},n),{key:o+"-"+r,bounds:l,index:s,points:a})];var t=function(t){t=t.selector;if(!t)return null;if("function"==typeof t)return t;if("first"===t)return t=>[t[0]];if("last"===t)return t=>[t[t.length-1]];throw new Error("Unknown selector: "+t)}(n),c=e.map((t,e)=>Object.assign(Object.assign({},n),{key:i[e]+"-"+r,bounds:[a[e]],index:t,points:a}));return t?t(c):c}(r,n,t);return t.forEach(t=>{L.set(t,i),C.set(t,e)}),t})})}),j=Q(V).selectAll(n7(it)).data(q,t=>t.key).join(t=>t.append(t=>L.get(t)(t)).attr("className",it),t=>t.each(function(t){cf(this,L.get(t)(t))}),t=>t.remove()).nodes(),Y=qc(j,t=>C.get(t.__data__)),F=x["coordinate"];for([M,O]of Y){var{transform:M=[]}=M;(function(t){return t.reduce((n,r)=>(t,...e)=>r(n(t,...e),...e),sf)})(M.map(P))(O,F)}N&&N(j,F)}})}function XO(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function KO(o,t,e,n,r){var[,i]=e6("shape",r);const[s]=e6("animation",r);r=e.defaultShape;const{theme:a,coordinate:l}=n;e=`default${Ws(o)}Animation`;const{[e]:c}=i(t7(t,r)).props,{[o]:u={}}=a,f=J(t.animate||{},o);return(t,e,n)=>{var{[o+"Type"]:t,[o+"Delay"]:r,[o+"Duration"]:i,[o+"Easing"]:a}=t,t=Object.assign({type:t||c},f);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},l,u),Array.isArray(t)?t:[t]):null}}function $O(t){return t.finished.then(()=>{t.cancel()}),t}function ZO(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function JO(r,i){return re(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=Z(r,["data"]);return null==e?r:([,{data:e}]=yield AO(0,{data:e},t),Object.assign({data:e},n))})}function QO(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function t7(t,e){t=t.type;return t+"."+e}function e7(t,e){const n=t=>void 0!==t.class?""+t.class:"";t.selectAll(n7(L)).data(e,t=>t.key).join(t=>t.append("g").attr("className",L).attr("id",t=>t.key).style("facet",n).style("fill","transparent"),t=>t.style("facet",n),t=>t.remove()),t.select(n7(tt)).node()||t.append("g").attr("className",tt)}function n7(...t){return t.map(t=>"."+t).join("")}function r7(t){for(var t=I({},t),e=new Map([[t,null]]),n=new Map([[null,-1]]),r=[t];r.length;){var i,a,o=r.shift(),{children:s=[]}=(void 0===o.key&&(a=e.get(o),i=n.get(o),a=null===a?"0":a.key+"-"+i,o.key=a),o);if(Array.isArray(s))for(let t=0;t<s.length;t++){var l=s[t];e.set(l,o),n.set(l,t),r.push(l)}}return t}function i7(t,e={},n){const{width:r=640,height:i=480,autoFit:a=!1,on:o}=t,s=r7(t),{canvas:l=(u=r,f=i,h=new N.Renderer,h.registerPlugin(new Ps),new F.Canvas({width:u,height:f,container:document.createElement("div"),renderer:h})),library:c=QM()}=e;var u,f,h;e.canvas=l,e.library=c,a&&!e.bindAutoFit&&([u,f={}]=[t,e],u.autoFit&&window.addEventListener("resize",o7(u,f)),e.bindAutoFit=!0),l.resize(r,i),t6(o,ZM.BEFORE_RENDER);const d=Q(l.document.documentElement);return l.ready.then(()=>WO(Object.assign(Object.assign({},s),{width:r,height:i}),d,c,e)).then(n).then(()=>t6(o,ZM.AFTER_RENDER)),"string"==typeof(h=l.getConfig().container)?document.getElementById(h):h}function a7(t,e={}){var n,r=t["on"],i=e["canvas"];i&&i.destroy(),[i,t={}]=[t,e],i.autoFit&&window.removeEventListener("resize",o7(i,t)),(e=r)&&(n?delete e[n]:e={})}const o7=(i,a={})=>{return r=()=>{var{width:t,height:e,autoFit:n}=i,r=a["canvas"],{width:r,height:n}=yf(r.getConfig().container,n,t,e),t=Object.assign(Object.assign({},i),{width:r,height:n});t.width&&t.height&&i7(t,a)},o=300,function(){var t=this,e=arguments,n=s&&!l;clearTimeout(l),l=setTimeout(function(){l=null,s||r.apply(t,e)},o),n&&r.apply(t,e)};var r,o,s,l};function s7(t,e){for(var n=[t];n.length;){var r=n.pop(),r=(e&&e(r),r.children||[]);for(const i of r)n.push(i)}}class p{constructor(t={},e){this.parentNode=null,this.children=[],this.index=0,this.type=e,this.value=t}map(t=t=>t){t=t(this.value);return this.value=t,this}attr(e,n){return 1===arguments.length?this.value[e]:this.map(t=>(t[e]=n,t))}append(t){t=new t({});return t.children=[],t.parentNode=this,t.index=this.children.length,this.children.push(t),t}remove(){var t,e=this.parentNode;return e&&(e=e["children"],t=e.findIndex(t=>t===this),e.splice(t,1)),this}getNodeByKey(e){let n=null;return s7(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return s7(this,t=>{e===t.type&&n.push(t)}),n}changeData(t){let e=this;for(;e&&e.parentNode;)e=e.parentNode;this.attr("data",t),e.render()}call(t,...e){return t(this.map(),...e),this}}function l7(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function c7(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):Array.isArray(t)?this.attr(n,t):(t=[...this.attr(n)||[],t],this.attr(n,t))}}function u7(t,{name:e,key:r=e}){t.prototype[e]=function(t,e){var n;return 0===arguments.length?this.attr(r):1===arguments.length?this.attr(r,t):((n=this.attr(r)||{})[t]=e,this.attr(r,n))}}function f7(t,{name:e,key:i=e}){t.prototype[e]=function(t,e){var n,r=this.attr(i)||{};return 0===arguments.length?r:1===arguments.length?r[t]:((n=r[t])?Fs(e)?n.concat(e):n.push(e):r[t]=Fs(e)?e:[e],this.attr(i,r))}}function g(r){return t=>{for(const n of r){var e=n["type"];"value"===e?l7(t,n):"array"===e?c7(t,n):"object"===e?u7(t,n):"node"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.append(n)}}(t,n):"container"===e?function(t,{name:e,ctor:n}){t.prototype[e]=function(){return this.type=null,this.append(n)}}(t,n):"event"===e&&f7(t,n)}return t}}function h7(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}cs=[{name:"encode",type:"object"},{name:"scale",type:"object"},{name:"data",type:"value"},{name:"transform",type:"array"},{name:"style",type:"object"},{name:"animate",type:"object"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"label",type:"array",key:"labels"},{name:"axis",type:"object"},{name:"legend",type:"object"}];let d7=class extends p{constructor(){super({},"interval")}},p7=(d7=t([g(cs)],d7),class extends p{constructor(){super({},"rect")}}),g7=(p7=t([g(cs)],p7),class extends p{constructor(){super({},"point")}}),y7=(g7=t([g(cs)],g7),class extends p{constructor(){super({},"area")}}),m7=(y7=t([g(cs)],y7),class extends p{constructor(){super({},"line")}}),v7=(m7=t([g(cs)],m7),class extends p{constructor(){super({},"cell")}}),b7=(v7=t([g(cs)],v7),class extends p{constructor(){super({},"vector")}}),x7=(b7=t([g(cs)],b7),class extends p{constructor(){super({},"link")}}),w7=(x7=t([g(cs)],x7),class extends p{constructor(){super({},"polygon")}});w7=t([g(cs)],w7);La=t([g(cs)],class extends p{constructor(){super({},"image")}});let k7=class extends p{constructor(){super({},"text")}},M7=(k7=t([g(cs)],k7),class extends p{constructor(){super({},"box")}}),O7=(M7=t([g(cs)],M7),class extends p{constructor(){super({},"lineX")}}),_7=(O7=t([g(cs)],O7),class extends p{constructor(){super({},"lineY")}}),S7=(_7=t([g(cs)],_7),class extends p{constructor(){super({},"range")}}),E7=(S7=t([g(cs)],S7),class extends p{constructor(){super({},"rangeX")}}),A7=(E7=t([g(cs)],E7),class extends p{constructor(){super({},"rangeY")}}),T7=(A7=t([g(cs)],A7),class extends p{constructor(){super({},"connector")}}),P7=(T7=t([g(cs)],T7),class extends p{constructor(){super({},"shape")}}),N7=(P7=t([g(cs)],P7),class extends p{constructor(){super({},"sankey")}}),L7=(N7=t([g([...cs,{name:"layout",type:"value"}])],N7),class extends p{constructor(){super({},"treemap")}}),C7=(L7=t([g([...cs,{name:"layout",type:"value"}])],L7),class extends p{constructor(){super({},"boxplot")}}),j7=(C7=t([g(cs)],C7),class extends p{constructor(){super({},"pack")}}),F7=(j7=t([g([...cs,{name:"layout",type:"value"}])],j7),class extends p{constructor(){super({},"forceGraph")}}),I7=(F7=t([g([...cs,{name:"layout",type:"value"}])],F7),class extends p{constructor(){super({},"tree")}}),R7=(I7=t([g([...cs,{name:"layout",type:"value"}])],I7),class extends p{constructor(){super({},"wordCloud")}});R7=t([g([...cs,{name:"layout",type:"object"}])],R7);r={interval:d7,rect:p7,point:g7,area:y7,line:m7,cell:v7,vector:b7,link:x7,polygon:w7,image:La,text:k7,box:M7,lineX:O7,lineY:_7,range:S7,rangeX:E7,rangeY:A7,connector:T7,sankey:N7,treemap:L7,boxplot:C7,shape:P7,pack:j7,forceGraph:F7,tree:I7,wordCloud:R7};let B7=class extends p{constructor(){super({},"view")}},D7=(B7=t([g([{type:"value",name:"data"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"axis"},{type:"object",name:"legend"},...h7(r)])],B7),class extends p{constructor(){super({},"spaceLayer")}}),z7=(D7=t([g([{type:"value",name:"data"},...h7(r)])],D7),class extends p{constructor(){super({},"spaceFlex")}}),G7=(z7=t([g([{type:"value",name:"data"},...h7(r)])],z7),class extends p{constructor(){super({},"facetRect")}}),W7=(G7=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...h7(r)])],G7),class extends p{constructor(){super({},"facetCircle")}}),H7=(W7=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...h7(r)])],W7),class extends p{constructor(){super({},"repeatMatrix")}}),V7=(H7=t([g([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...h7(r)])],H7),class extends p{constructor(){super({},"timingKeyframe")}}),q7=(V7=t([g([...h7(r)])],V7),class extends p{constructor(){super({},"geoView")}}),Y7=(q7=t([g([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"legend"},...h7(r)])],q7),class extends p{constructor(){super({},"geoPath")}});Y7=t([g([{type:"value",name:"data"},{type:"value",name:"projection"},{type:"array",name:"coordinate",key:"coordinates"},{type:"array",name:"interaction",key:"interactions"},{type:"object",name:"theme"},{type:"object",name:"style"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},...h7(r)])],Y7);var U7={view:B7,spaceLayer:D7,spaceFlex:z7,facetRect:G7,facetCircle:W7,repeatMatrix:H7,timingKeyframe:V7,geoView:q7,geoPath:Y7};for(const $7 of Object.values(U7))g(h7(U7))($7);const X7=QM();function K7(t){return Object.assign(Object.assign({},t.value),{type:t.type})}Ea=[{name:"data",type:"value"},{name:"width",type:"value"},{name:"height",type:"value"},{name:"coordinate",type:"array",key:"coordinates"},{name:"interaction",type:"array",key:"interactions"},{name:"theme",type:"object"},{name:"title",type:"object"},{name:"key",type:"value"},{name:"transform",type:"array"},{name:"theme",type:"object"},{name:"on",type:"event"},{name:"scale",type:"object"},{name:"axis",type:"object"},{name:"legend",type:"object"},{name:"style",type:"object"},...h7(r),...Object.entries(U7).map(([t,e])=>({type:"container",name:t,ctor:e}))];y.Chart=class extends p{constructor(t={}){var e=t["container"];super(Z(t,["container"]),"view"),this._container=void 0===(t=e)?document.createElement("div"):"string"==typeof t?document.getElementById(t):t,this._context={library:X7}}render(){var t,e,n,r,i,a,o;return this._context.canvas||({width:i=640,height:o=480,renderer:t,plugins:e,autoFit:n}=this.options(),{width:n,height:r}=yf(this._container,n,i,o),this.width(n),this.height(r),this._context.canvas=([n,r,i,a=new N.Renderer,o=[]]=[this._container,i,o,t,e],o.push(new Ps),o.forEach(t=>a.registerPlugin(t)),new F.Canvas({container:n,width:r,height:i,renderer:a}))),i7(this.options(),this._context),this}options(){var t,e=this,e=null!==(e=e).type?e:((t=e.children[e.children.length-1]).attr("width",e.attr("width")),t.attr("height",e.attr("height")),t.attr("paddingLeft",e.attr("paddingLeft")),t.attr("paddingTop",e.attr("paddingTop")),t.attr("paddingBottom",e.attr("paddingBottom")),t.attr("paddingRight",e.attr("paddingRight")),t.attr("insetLeft",e.attr("insetLeft")),t.attr("insetRight",e.attr("insetRight")),t.attr("insetBottom",e.attr("insetBottom")),t.attr("insetTop",e.attr("insetTop")),t.attr("marginLeft",e.attr("marginLeft")),t.attr("marginBottom",e.attr("marginBottom")),t.attr("marginTop",e.attr("marginTop")),t.attr("marginRight",e.attr("marginRight")),t.attr("autoFit",e.attr("autoFit")),t.attr("padding",e.attr("padding")),t.attr("margin",e.attr("margin")),t.attr("inset",e.attr("inset")),t),n=[e],r=new Map;for(r.set(e,K7(e));n.length;){const e=n.pop();var i=r.get(e);for(const s of e.children){var a=K7(s),{children:o=[]}=i;o.push(a),n.push(s),r.set(s,a),i.children=o}}return r.get(e)}node(){return this._container}context(){return this._context}destroy(){var t,e=this.options(),n=e["on"];t6(n,ZM.BEFORE_DESTROY),a7(e,this._context),e=this._container,(t=e.parentNode)&&t.removeChild(e),t6(n,ZM.AFTER_DESTROY)}clear(){var t=this.options(),e=t["on"];t6(e,ZM.BEFORE_CLEAR),a7(t,this._context),t6(e,ZM.AFTER_CLEAR)}forceFit(){var{width:t,height:e}=this.options(),{width:t,height:e}=yf(this._container,!0,t,e);this.changeSize(t,e)}changeSize(t,e){var{width:n,height:r,on:i}=this.options();if(n===t&&r===e)return this;t6(i,ZM.BEFORE_CHANGE_SIZE),this.width(t),this.height(e),this.render(),t6(i,ZM.AFTER_CHANGE_SIZE)}},y.Chart=t([g(Ea)],y.Chart),y.AREA_CLASS_NAME=at,y.COMPONENT_CLASS_NAME=rt,y.ELEMENT_CLASS_NAME=et,y.LABEL_CLASS_NAME=it,y.LABEL_LAYER_CLASS_NAME=tt,y.MAIN_LAYER_CLASS_NAME=L,y.PLOT_CLASS_NAME=nt,y.VIEW_CLASS_NAME=C,y.createLibrary=QM,y.destroy=a7,y.register=function(t,e){Object.assign(X7,{[t]:e})},y.render=i7,y.renderToMountedElement=function(t,e={},n){const{width:r=640,height:i=480,on:a}=t;var t=r7(t),{library:o=QM(),group:s=new F.Group}=e;if(function(t){if(!js(t)){if(Ns(t))return!t.length;var e,n=Vs(t);if("Map"===n||"Set"===n)return!t.size;if(Ys(t))return!Object.keys(t).length;for(e in t)if(Ks.call(t,e))return}return 1}(null==s?void 0:s.parentElement))throw new Error("Unmounted group");var l=Q(s);return e.group=s,e.library=o,t6(a,ZM.BEFORE_RENDER),WO(Object.assign(Object.assign({},t),{width:r,height:i}),l,o,e).then(n).then(()=>t6(a,ZM.AFTER_RENDER)),s},Object.defineProperty(y,"__esModule",{value:!0})});
|