@antv/g2 5.0.0-beta.2 → 5.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/g2-lite.min.js +2 -2
- package/dist/g2.min.js +2 -2
- package/esm/spec/geometry.d.ts +1 -1
- package/esm/transform/sample.js.map +1 -1
- package/esm/transform/selectX.js +1 -1
- package/esm/transform/selectY.js +1 -1
- package/lib/spec/geometry.d.ts +1 -1
- package/lib/transform/sample.js.map +1 -1
- package/lib/transform/selectX.js +2 -2
- package/lib/transform/selectY.js +2 -2
- package/package.json +1 -1
- package/src/spec/geometry.ts +1 -7
- package/src/transform/sample.ts +1 -2
- package/src/transform/selectX.ts +1 -1
- package/src/transform/selectY.ts +1 -1
package/dist/g2.min.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={})}(this,function(h){"use strict";const f="main-layer",tt="label-layer",et="element",j="view",nt="plot",rt="component",it="label",at="area";function p(t,e,n,r,i){!function t(e,n,r,i,a){for(;r<i;){600<i-r&&(o=i-r+1,u=n-r+1,c=Math.log(o),s=.5*Math.exp(2*c/3),c=.5*Math.sqrt(c*s*(o-s)/o)*(u-o/2<0?-1:1),l=Math.max(r,Math.floor(n-u*s/o+c)),u=Math.min(i,Math.floor(n+(o-u)*s/o+c)),t(e,n,l,u,a));var o,s,c,l,u,h=e[n],f=r,d=i;for(I(e,r,n),0<a(e[i],h)&&I(e,r,i);f<d;){for(I(e,f,d),f++,d--;a(e[f],h)<0;)f++;for(;0<a(e[d],h);)d--}0===a(e[r],h)?I(e,r,d):I(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||D)}function I(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function D(t,e){return t<e?-1:e<t?1:0}class B{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(e){let n=this.data;var r=[];if(X(e,n))for(var i=this.toBBox,a=[];n;){for(let t=0;t<n.children.length;t++){var o=n.children[t],s=n.leaf?i(o):o;X(e,s)&&(n.leaf?r.push(o):U(e,s)?this._all(o,r):a.push(o))}n=a.pop()}return r}collides(e){let n=this.data;if(X(e,n))for(var r=[];n;){for(let t=0;t<n.children.length;t++){var i=n.children[t],a=n.leaf?this.toBBox(i):i;if(X(e,a)){if(n.leaf||U(e,a))return!0;r.push(i)}}n=r.pop()}return!1}load(e){if(e&&e.length)if(e.length<this._minEntries)for(let t=0;t<e.length;t++)this.insert(e[t]);else{let t=this._build(e.slice(),0,e.length-1,0);var n;this.data.children.length?this.data.height===t.height?this._splitRoot(this.data,t):(this.data.height<t.height&&(n=this.data,this.data=t,t=n),this._insert(t,this.data.height-t.height-1,!0)):this.data=t}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=$([]),this}remove(i,a){if(i){let t=this.data;var o=this.toBBox(i),s=[],c=[];let e,n,r;for(;t||s.length;){if(t||(t=s.pop(),n=s[s.length-1],e=c.pop(),r=!0),t.leaf){var l=function(e,n,r){if(!r)return n.indexOf(e);for(let t=0;t<n.length;t++)if(r(e,n[t]))return t;return-1}(i,t.children,a);if(-1!==l)return t.children.splice(l,1),s.push(t),this._condense(s),this}r||t.leaf||!U(t,o)?n?(e++,t=n.children[e],r=!1):t=null:(s.push(t),c.push(e),e=0,t=(n=t).children[0])}}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){for(var n=[];t;)(t.leaf?e:n).push(...t.children),t=n.pop();return e}_build(n,t,r,i){var e=r-t+1;let a=this._maxEntries,o;if(e<=a)G(o=$(n.slice(t,r+1)),this.toBBox);else{i||(i=Math.ceil(Math.log(e)/Math.log(a)),a=Math.ceil(e/Math.pow(a,i-1))),(o=$([])).leaf=!1,o.height=i;var s=Math.ceil(e/a),c=s*Math.ceil(Math.sqrt(a));K(n,t,r,c,this.compareMinX);for(let e=t;e<=r;e+=c){var l=Math.min(e+c-1,r);K(n,e,l,s,this.compareMinY);for(let t=e;t<=l;t+=s){var u=Math.min(t+s-1,l);o.children.push(this._build(n,t,u,i-1))}}G(o,this.toBBox)}return o}_chooseSubtree(i,a,t,o){for(;;){if(o.push(a),a.leaf||o.length-1===t)break;let e=1/0,n=1/0,r;for(let t=0;t<a.children.length;t++){var s=a.children[t],c=Y(s),l=(u=i,l=s,(Math.max(l.maxX,u.maxX)-Math.min(l.minX,u.minX))*(Math.max(l.maxY,u.maxY)-Math.min(l.minY,u.minY))-c);l<n?(n=l,e=c<e?c:e,r=s):l===n&&c<e&&(e=c,r=s)}a=r||a.children[0]}var u,l;return a}_insert(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),W(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)}_split(t,e){var n=t[e],r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r)),r=$(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,G(n,this.toBBox),G(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)}_splitRoot(t,e){this.data=$([t,e]),this.data.height=t.height+1,this.data.leaf=!1,G(this.data,this.toBBox)}_chooseSplitIndex(e,n,r){let i,a=1/0,o=1/0;for(let t=n;t<=r-n;t++){var s=z(e,0,t,this.toBBox),c=z(e,t,r,this.toBBox),l=(h=s,l=c,u=d=f=void 0,f=Math.max(h.minX,l.minX),d=Math.max(h.minY,l.minY),u=Math.min(h.maxX,l.maxX),h=Math.min(h.maxY,l.maxY),Math.max(0,u-f)*Math.max(0,h-d)),u=Y(s)+Y(c);l<a?(a=l,i=t,o=u<o?u:o):l===a&&u<o&&(o=u,i=t)}var h,l,f,d,u;return i||r-n}_chooseSplitAxis(t,e,n){var r=t.leaf?this.compareMinX:V,i=t.leaf?this.compareMinY:H;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)}_allDistMargin(e,n,r,t){e.children.sort(t);var i=this.toBBox,a=z(e,0,n,i),o=z(e,r-n,r,i);let s=q(a)+q(o);for(let t=n;t<r-n;t++){var c=e.children[t];W(a,e.leaf?i(c):c),s+=q(a)}for(let t=r-n-1;t>=n;t--){var l=e.children[t];W(o,e.leaf?i(l):l),s+=q(o)}return s}_adjustParentBBoxes(e,n,r){for(let t=r;0<=t;t--)W(n[t],e)}_condense(n){for(let t=n.length-1,e;0<=t;t--)0===n[t].children.length?0<t?(e=n[t-1].children).splice(e.indexOf(n[t]),1):this.clear():G(n[t],this.toBBox)}}function G(t,e){z(t,0,t.children.length,e,t)}function z(e,n,r,i,a){(a=a||$(null)).minX=1/0,a.minY=1/0,a.maxX=-1/0,a.maxY=-1/0;for(let t=n;t<r;t++){var o=e.children[t];W(a,e.leaf?i(o):o)}return a}function W(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function V(t,e){return t.minX-e.minX}function H(t,e){return t.minY-e.minY}function Y(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function q(t){return t.maxX-t.minX+(t.maxY-t.minY)}function U(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function X(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function $(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function K(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(p(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}var ot=1e-6,st="undefined"!=typeof Float32Array?Float32Array:Array;function ct(){var t=new st(9);return st!=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 lt=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],e=e[8],h=n[0],f=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]=h*r+f*o+d*l,t[1]=h*i+f*s+d*u,t[2]=h*a+f*c+d*e,t[3]=p*r+g*o+y*l,t[4]=p*i+g*s+y*u,t[5]=p*a+g*c+y*e,t[6]=m*r+v*o+n*l,t[7]=m*i+v*s+n*u,t[8]=m*a+v*c+n*e,t};function ut(){var t=new st(16);return st!=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 ht(t){var e=new st(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}function ft(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 dt(t,e,n,r,i,a,o,s,c,l,u,h,f,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]=c,t[8]=l,t[9]=u,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=g,t[15]=y,t}function pt(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 gt(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 yt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15],m=n*s-r*o,v=n*c-i*o,b=n*l-a*o,x=r*c-i*s,w=r*l-a*s,k=i*l-a*c,M=u*g-h*p,E=u*y-f*p,O=u*e-d*p,S=h*y-f*g,_=h*e-d*g,A=f*e-d*y,T=m*A-v*_+b*S+x*O-w*E+k*M;return T?(t[0]=(s*A-c*_+l*S)*(T=1/T),t[1]=(i*_-r*A-a*S)*T,t[2]=(g*k-y*w+e*x)*T,t[3]=(f*w-h*k-d*x)*T,t[4]=(c*O-o*A-l*E)*T,t[5]=(n*A-i*O+a*E)*T,t[6]=(y*b-p*k-e*v)*T,t[7]=(u*k-f*b+d*v)*T,t[8]=(o*_-s*O+l*M)*T,t[9]=(r*O-n*_-a*M)*T,t[10]=(p*w-g*b+e*m)*T,t[11]=(h*b-u*w-d*m)*T,t[12]=(s*E-o*S-c*M)*T,t[13]=(n*S-r*E+i*M)*T,t[14]=(g*v-p*x-y*m)*T,t[15]=(u*x-h*v+f*m)*T,t):null}function mt(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],t=t[15];return(e*o-n*a)*(h*t-f*g)-(e*s-r*a)*(u*t-f*p)+(e*c-i*a)*(u*g-h*p)+(n*s-r*o)*(l*t-f*d)-(n*c-i*o)*(l*g-h*d)+(r*c-i*s)*(l*p-u*d)}function vt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],h=e[8],f=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*h+w*g,t[1]=v*i+b*c+x*f+w*y,t[2]=v*a+b*l+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*h+w*g,t[5]=v*i+b*c+x*f+w*y,t[6]=v*a+b*l+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*h+w*g,t[9]=v*i+b*c+x*f+w*y,t[10]=v*a+b*l+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*h+w*g,t[13]=v*i+b*c+x*f+w*y,t[14]=v*a+b*l+x*d+w*m,t[15]=v*o+b*u+x*p+w*e,t}function bt(t,e,n){var r,i,a,o,s,c,l,u,h,f,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],c=e[5],l=e[6],u=e[7],h=e[8],f=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]=c,t[6]=l,t[7]=u,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*g+s*y+h*n+e[12],t[13]=i*g+c*y+f*n+e[13],t[14]=a*g+l*y+d*n+e[14],t[15]=o*g+u*y+p*n+e[15]),t}function xt(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 wt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],c=e[8],l=e[9],u=e[10],h=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+c*r,t[5]=a*n+l*r,t[6]=o*n+u*r,t[7]=s*n+h*r,t[8]=c*n-i*r,t[9]=l*n-a*r,t[10]=u*n-o*r,t[11]=h*n-s*r,t}function kt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],c=e[8],l=e[9],u=e[10],h=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-c*r,t[1]=a*n-l*r,t[2]=o*n-u*r,t[3]=s*n-h*r,t[8]=i*r+c*n,t[9]=a*r+l*n,t[10]=o*r+u*n,t[11]=s*r+h*n,t}function Mt(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 Et(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}function Ot(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,c=a+a,l=r*o,u=r*s,r=r*c,h=i*s,i=i*c,a=a*c,o=e*o,s=e*s,e=e*c;return t[0]=1-(h+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(l+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(l+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function St(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function _t(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],c=e[8],l=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(c,l,e),t}function At(t,e){var n=new st(3),r=(_t(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,c=e[4]*r,l=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+l+e,h=0;return 0<n?(h=2*Math.sqrt(1+n),t[3]=.25*h,t[0]=(u-i)/h,t[1]=(r-s)/h,t[2]=(o-c)/h):l<a&&e<a?(h=2*Math.sqrt(1+a-l-e),t[3]=(u-i)/h,t[0]=.25*h,t[1]=(o+c)/h,t[2]=(r+s)/h):e<l?(h=2*Math.sqrt(1+l-a-e),t[3]=(r-s)/h,t[0]=(o+c)/h,t[1]=.25*h,t[2]=(u+i)/h):(h=2*Math.sqrt(1+e-a-l),t[3]=(o-c)/h,t[0]=(r+s)/h,t[1]=(u+i)/h,t[2]=.25*h),t}function Tt(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],c=a+a,l=o+o,u=s+s,h=a*c,f=a*l,a=a*u,d=o*l,o=o*u,s=s*u,c=e*c,l=e*l,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=(f+e)*u,u=(a-l)*u,f=(f-e)*p,e=(1-(h+s))*p,s=(o+c)*p,p=(a+l)*r,a=(o-c)*r,l=(1-(h+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=f,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=l,t[11]=0,t[12]=n[0]+g-(m*g+f*y+p*i),t[13]=n[1]+y-(v*g+e*y+a*i),t[14]=n[2]+i-(u*g+s*y+l*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,c=r*a,r=r*o,l=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]=c+e,t[2]=l-o,t[3]=0,t[4]=c-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=l+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 Lt(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 Nt(t,e,n,r,i,a,o){var s=1/(e-n),c=1/(r-i),l=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*c,t[14]=(o+a)*l,t[15]=1,t}var Ct=Nt;function jt(t,e,n,r){var i,a,o,s,c=e[0],l=e[1],e=e[2],u=r[0],h=r[1],r=r[2],f=n[0],d=n[1],n=n[2];return Math.abs(c-f)<ot&&Math.abs(l-d)<ot&&Math.abs(e-n)<ot?pt(t):(f=c-f,d=l-d,n=e-n,i=h*(n*=s=1/Math.hypot(f,d,n))-r*(d*=s),r=r*(f*=s)-u*n,u=u*d-h*f,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,h=d*u-n*r,a=n*i-f*u,o=f*r-d*i,(s=Math.hypot(h,a,o))?(h*=s=1/s,a*=s,o*=s):o=a=h=0,t[0]=i,t[1]=h,t[2]=f,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*c+r*l+u*e),t[13]=-(h*c+a*l+o*e),t[14]=-(f*c+d*l+n*e),t[15]=1,t)}function Rt(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 Ft=Object.freeze({__proto__:null,create:ut,clone:ht,copy:ft,fromValues:function(t,e,n,r,i,a,o,s,c,l,u,h,f,d,p,g){var y=new st(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]=c,y[9]=l,y[10]=u,y[11]=h,y[12]=f,y[13]=d,y[14]=p,y[15]=g,y},set:dt,identity:pt,transpose:gt,invert:yt,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15];return t[0]=s*(f*e-d*y)-h*(c*e-l*y)+g*(c*d-l*f),t[1]=-(r*(f*e-d*y)-h*(i*e-a*y)+g*(i*d-a*f)),t[2]=r*(c*e-l*y)-s*(i*e-a*y)+g*(i*l-a*c),t[3]=-(r*(c*d-l*f)-s*(i*d-a*f)+h*(i*l-a*c)),t[4]=-(o*(f*e-d*y)-u*(c*e-l*y)+p*(c*d-l*f)),t[5]=n*(f*e-d*y)-u*(i*e-a*y)+p*(i*d-a*f),t[6]=-(n*(c*e-l*y)-o*(i*e-a*y)+p*(i*l-a*c)),t[7]=n*(c*d-l*f)-o*(i*d-a*f)+u*(i*l-a*c),t[8]=o*(h*e-d*g)-u*(s*e-l*g)+p*(s*d-l*h),t[9]=-(n*(h*e-d*g)-u*(r*e-a*g)+p*(r*d-a*h)),t[10]=n*(s*e-l*g)-o*(r*e-a*g)+p*(r*l-a*s),t[11]=-(n*(s*d-l*h)-o*(r*d-a*h)+u*(r*l-a*s)),t[12]=-(o*(h*y-f*g)-u*(s*y-c*g)+p*(s*f-c*h)),t[13]=n*(h*y-f*g)-u*(r*y-i*g)+p*(r*f-i*h),t[14]=-(n*(s*y-c*g)-o*(r*y-i*g)+p*(r*c-i*s)),t[15]=n*(s*f-c*h)-o*(r*f-i*h)+u*(r*c-i*s),t},determinant:mt,multiply:vt,translate:bt,scale:xt,rotate:function(t,e,n,r){var i,a,o,s,c,l,u,h,f,d,p,g,y,m,v,b,x,w,k,M,E=r[0],O=r[1],r=r[2],S=Math.hypot(E,O,r);return S<ot?null:(E*=S=1/S,O*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],c=e[3],l=e[4],u=e[5],h=e[6],f=e[7],d=e[8],p=e[9],g=e[10],y=e[11],v=E*O*(i=1-n)-r*S,b=O*O*i+n,x=r*O*i+E*S,w=E*r*i+O*S,k=O*r*i-E*S,M=r*r*i+n,t[0]=a*(n=E*E*i+n)+l*(m=O*E*i+r*S)+d*(r=r*E*i-O*S),t[1]=o*n+u*m+p*r,t[2]=s*n+h*m+g*r,t[3]=c*n+f*m+y*r,t[4]=a*v+l*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+h*b+g*x,t[7]=c*v+f*b+y*x,t[8]=a*w+l*k+d*M,t[9]=o*w+u*k+p*M,t[10]=s*w+h*k+g*M,t[11]=c*w+f*k+y*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:wt,rotateY:kt,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],c=e[4],l=e[5],u=e[6],h=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+c*r,t[1]=a*n+l*r,t[2]=o*n+u*r,t[3]=s*n+h*r,t[4]=c*n-i*r,t[5]=l*n-a*r,t[6]=u*n-o*r,t[7]=h*n-s*r,t},fromTranslation:Mt,fromScaling:Et,fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<ot?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:Ot,fromQuat2:function(t,e){var n=new st(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],h=r*r+i*i+a*a+o*o;return 0<h?(n[0]=2*(s*o+u*r+c*a-l*i)/h,n[1]=2*(c*o+u*i+l*r-s*a)/h,n[2]=2*(l*o+u*a+s*i-c*r)/h):(n[0]=2*(s*o+u*r+c*a-l*i),n[1]=2*(c*o+u*i+l*r-s*a),n[2]=2*(l*o+u*a+s*i-c*r)),Ot(t,e,n),t},getTranslation:St,getScaling:_t,getRotation:At,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),c=i*(h=a+a),i=i*(f=o+o),l=a*h,a=a*f,o=o*f,u=e*u,h=e*h,e=e*f,f=r[0],d=r[1],r=r[2];return t[0]=(1-(l+o))*f,t[1]=(c+e)*f,t[2]=(i-h)*f,t[3]=0,t[4]=(c-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+h)*r,t[9]=(a-u)*r,t[10]=(1-(s+l))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Tt,fromQuat:Pt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),c=1/(i-r),l=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*c,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*c,t[10]=(o+a)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*l,t[15]=0,t},perspectiveNO:Lt,perspective:Lt,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),c=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*c*.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:Nt,ortho:Ct,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),c=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*c,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)*c,t[14]=a*o,t[15]=1,t},lookAt:jt,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],c=i-n[0],l=a-n[1],n=e-n[2],u=c*c+l*l+n*n,h=(0<u&&(c*=u=1/Math.sqrt(u),l*=u,n*=u),s*n-r*l);return 0<(u=h*h+(r=r*c-o*n)*r+(o=o*l-s*c)*o)&&(h*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=h,t[1]=r,t[2]=o,t[3]=0,t[4]=l*o-n*r,t[5]=n*h-c*o,t[6]=c*r-l*h,t[7]=0,t[8]=c,t[9]=l,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:Rt,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],c=t[6],l=t[7],u=t[8],h=t[9],f=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],E=e[7],O=e[8],S=e[9],_=e[10],A=e[11],T=e[12],P=e[13],L=e[14],e=e[15];return Math.abs(n-m)<=ot*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=ot*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=ot*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=ot*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=ot*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-k)<=ot*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(c-M)<=ot*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(l-E)<=ot*Math.max(1,Math.abs(l),Math.abs(E))&&Math.abs(u-O)<=ot*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(h-S)<=ot*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(f-_)<=ot*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(d-A)<=ot*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-T)<=ot*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(g-P)<=ot*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(y-L)<=ot*Math.max(1,Math.abs(y),Math.abs(L))&&Math.abs(t-e)<=ot*Math.max(1,Math.abs(t),Math.abs(e))},mul:vt,sub:Rt});function m(){var t=new st(3);return st!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function It(t){var e=new st(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Dt(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function k(t,e,n){var r=new st(3);return r[0]=t,r[1]=e,r[2]=n,r}function Bt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Gt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function zt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Wt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Vt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Ht(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 Yt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function qt(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 Ut(t,e,n,r){var i=e[0],a=e[1],e=e[2];t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=e+r*(n[2]-e)}function Xt(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 $t(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 Kt(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)<=ot*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=ot*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=ot*Math.max(1,Math.abs(t),Math.abs(e))}var Zt=Wt,Jt=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],e=e[2]-t[2];return Math.hypot(n,r,e)},Qt=Dt;function te(){var t=new st(4);return st!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function ee(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 ne(){var t=new st(4);return st!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function re(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 ie(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],c=n[2],n=n[3];return t[0]=r*n+e*o+i*c-a*s,t[1]=i*n+e*s+a*o-r*c,t[2]=a*n+e*c+r*s-i*o,t[3]=e*n-r*o-i*s-a*c,t}function ae(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 oe(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(),te();var se=function(t,e,n,r){var i=new st(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ce=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},le=ie,ue=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 he(t,e){var n=new st(2);return n[0]=t,n[1]=e,n}function fe(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function de(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function pe(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function ge(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function ye(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function me(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}function ve(t,e){return t[0]*e[0]+t[1]*e[1]}function be(t,e){return t[0]===e[0]&&t[1]===e[1]}m(),k(1,0,0),k(0,1,0),ne(),ne(),ct();var xe=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function we(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}e=new st(2),st!=Float32Array&&(e[0]=0,e[1]=0);var ke=function(t,e){return(ke=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 Me(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}ke(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 Ee(t,o,s,c){return new(s=s||Promise)(function(n,e){function r(t){try{a(c.next(t))}catch(t){e(t)}}function i(t){try{a(c.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((c=c.apply(t,o||[])).next())})}function Oe(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 b(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 Se(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 _e={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 Te(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return Ae[e]===t.length-1&&"achlmqstvz".includes(e)})}function Pe(t){return Te(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function Le(t){return Pe(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function Ne(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 Ce(t){return 48<=t&&t<=57}function je(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 Re(t){var e,n,r,i,a,o=t.max,s=t.pathValue,c=t.index,l=s.charCodeAt(c),u=Ae[s[c].toLowerCase()];if(t.segmentStart=c,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}}(l)){if(t.index+=1,je(t),t.data=[],u)for(;;){for(var h=u;0<h;--h){if(97!=(32|l)||3!==h&&4!==h?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,c=!1,l=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(Ce(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&&Ce(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&Ce(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(l=!0,o+=1;Ce(i.charCodeAt(o));)o+=1,c=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(l&&!s&&!c)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&&Ce(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&Ce(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),je(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,je(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}Ne(t)}else t.err='[path-util]: Invalid path value "'+s[c]+'" is not a path command'}var Fe=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 Ie(t){var o,s,c,l;return Pe(t)?we(t):(t=function(t){if(Te(t))return we(t);var e=new Fe(t);for(je(e);e.index<e.max&&!e.err.length;)Re(e);return e.err||e.segments}(t),l=c=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",c=o,l=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=c,s=l;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(c=o,l=s)}return i}))}function De(t){if(Le(t))return we(t);for(var e,n,r,i,a,o,s,c=Ie(t),l=v({},_e),u=0;u<c.length;u+=1){c[u]=(e=c[u],n=l,s=o=f=a=h=i=r=void 0,r=e[0],i=n.x1,h=n.y1,a=n.x2,f=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],h]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*h-f,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(f=2*i-n.qx,a=2*h-n.qy,s=["Q",n.qx=f,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var h=c[u],f=h.length;l.x1=+h[f-2],l.y1=+h[f-1],l.x2=+h[f-4]||l.x1,l.y2=+h[f-3]||l.y1}return c}function Be(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Ge(t,e,n,r,i,a,o,s,c,l){var u=120*Math.PI/180,h=Math.PI/180*(+i||0),f=[],d=(l?(b=l[0],x=l[1],m=l[2],v=l[3]):(t=(g=Be(t,e,-h)).x,e=g.y,1<(d=(p=(t-(s=(g=Be(s,c,-h)).x))/2)*p/(n*n)+(g=(e-(c=g.y))/2)*g/(r*r))&&(n*=d=Math.sqrt(d),r*=d),d=n*n,y=r*r,m=(a=(a===o?-1:1)*Math.sqrt(Math.abs((d*y-d*g*g-y*p*p)/(d*g*g+y*p*p))))*n*g/r+(t+s)/2,v=a*-r*p/n+(e+c)/2,b=Math.asin(((e-v)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),x=Math.asin(((c-v)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),b=t<m?Math.PI-b:b,x=s<m?Math.PI-x:x,b<0&&(b=2*Math.PI+b),x<0&&(x=2*Math.PI+x),o&&x<b&&(b-=2*Math.PI),!o&&b<x&&(x-=2*Math.PI)),x-b),p=(Math.abs(d)>u&&(y=x,g=s,a=c,x=b+u*(o&&b<x?1:-1),f=Ge(s=m+n*Math.cos(x),c=v+r*Math.sin(x),n,r,i,0,o,g,a,[x,y,m,v])),d=x-b,Math.cos(b)),u=Math.sin(b),i=Math.cos(x),o=Math.sin(x),g=Math.tan(d/4),a=4/3*n*g,y=4/3*r*g,m=[t,e],v=[t+a*u,e-y*p],b=[s+a*o,c-y*i],x=[s,c];if(v[0]=2*m[0]-v[0],v[1]=2*m[1]-v[1],l)return v.concat(b,x,f);for(var w=[],k=0,M=(f=v.concat(b,x,f)).length;k<M;k+=1)w[k]=k%2?Be(f[k-1],f[k],h).y:Be(f[k],f[k+1],h).x;return w}function ze(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function We(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Ve(t,e,n,r,i){var a=We([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=ze([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 He(t,e,n,r){var t=[t,e],e=[n,r],i=ze(t,e,.5),e=ze(e,i,.5),a=ze(i,e,.5),o=ze(e,a,.5),s=ze(a,o,.5),t=Ve(t[0],t[1],i[0],i[1],a[0]).point,i=Ve(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Ye(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=we(t),e?[n,[]]:n;for(var r,i=De(t),a=v({},_e),o=[],s="",c=i.length,l=[],u=0;u<c;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var h=function(t,e){var n,r,i,a,o,s,c=t[0],l=t.slice(1).map(Number),u=l[0],h=l[1],f=e.x1,d=e.y1,p=e.x,g=e.y;switch("TQ".includes(c)||(e.qx=null,e.qy=null),c){case"M":return e.x=u,e.y=h,t;case"A":return s=[f,d].concat(l),["C"].concat(Ge(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=h,s=[f,d].concat(l),["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(He(f,d,u,h));case"Z":return f===p&&d===g?["C",f,d,p,g,p,g]:["C"].concat(He(f,d,p,g))}return t}(i[u],a),f=(i[u]=h,y=g=p=d=f=void 0,i),d=o,p=u;if(7<f[p].length){f[p].shift();for(var g=f[p],y=p;g.length;)d[p]="A",f.splice(y+=1,0,["C"].concat(g.splice(0,6)));f.splice(p,1)}c=i.length,"Z"===s&&l.push(u),r=(h=i[u]).length,a.x1=+h[r-2],a.y1=+h[r-1],a.x2=+h[r-4]||a.x1,a.y2=+h[r-3]||a.y1}return e?[i,l]:i}function qe(t,e){var n=t.x,t=t.y,r=e.x,e=e.y,i=n*r+t*e,a=Math.sqrt((Math.pow(n,2)+Math.pow(t,2))*(Math.pow(r,2)+Math.pow(e,2)));return(n*e-t*r<0?-1:1)*Math.acos(i/a)}function Ue(t,e,n,r,i,F,I,a,o,s,c){var l=c.bbox,D=void 0===l||l,l=c.length,B=void 0===l||l,l=c.sampleSize,u=void 0===l?30:l,h="number"==typeof s,f=t,d=e,p=0,g=[f,d,p],y=[f,d],m={x:0,y:0},v=[{x:f,y:d}];h&&s<=0&&(m={x:f,y:d});for(var b,x,w,k,M,E,O,S,_,A,T,P,L,N,C,j,R=0;R<=u;R+=1)b=t,x=e,w=n,k=r,M=i,E=F,O=I,S=a,_=o,A=R/u,P=j=C=N=L=P=T=void 0,P=Math.abs,L=Math.sin,N=Math.cos,C=Math.sqrt,j=Math.PI,w=P(w),P=P(k),k=j/180*((M%360+360)%360),f=(T=b===S&&x===_?{x:b,y:x}:0===w||0===P?Ve(b,x,S,_,A).point:(M=(b-S)/2,T=(x-_)/2,M={x:N(k)*M+L(k)*T,y:-L(k)*M+N(k)*T},1<(T=Math.pow(M.x,2)/Math.pow(w,2)+Math.pow(M.y,2)/Math.pow(P,2))&&(w*=C(T),P*=C(T)),T=(Math.pow(w,2)*Math.pow(P,2)-Math.pow(w,2)*Math.pow(M.y,2)-Math.pow(P,2)*Math.pow(M.x,2))/(Math.pow(w,2)*Math.pow(M.y,2)+Math.pow(P,2)*Math.pow(M.x,2)),E=(E!==O?1:-1)*C(T<0?0:T),C=w*M.y/P*E,T=-P*M.x/w*E,E=N(k)*C-L(k)*T+(b+S)/2,b=L(k)*C+N(k)*T+(x+_)/2,x=qe({x:1,y:0},S={x:(M.x-C)/w,y:(M.y-T)/P}),_=qe(S,{x:(-M.x-C)/w,y:(-M.y-T)/P}),!O&&0<_?_-=2*j:O&&_<0&&(_+=2*j),S=x+(_%=2*j)*A,C=w*N(S),M=P*L(S),{x:N(k)*C-L(k)*M+E,y:L(k)*C+N(k)*M+b})).x,d=T.y,D&&v.push({x:f,y:d}),B&&(p+=We(y,[f,d])),y=[f,d],h&&s<=p&&s>g[2]&&(O=(p-s)/(p-g[2]),m={x:y[0]*(1-O)+g[0]*O,y:y[1]*(1-O)+g[1]*O}),g=[f,d,p];return{length:p,point:m=h&&p<=s?{x:a,y:o}:m,min:{x:Math.min.apply(null,v.map(function(t){return t.x})),y:Math.min.apply(null,v.map(function(t){return t.y}))},max:{x:Math.max.apply(null,v.map(function(t){return t.x})),y:Math.max.apply(null,v.map(function(t){return t.y}))}}}function Xe(t,e,n,r,i,a,o,s,c,l){var u=l.bbox,h=void 0===u||u,u=l.length,f=void 0===u||u,u=l.sampleSize,d=void 0===u?10:u,p="number"==typeof c,g=t,y=e,m=0,v=[g,y,m],b=[g,y],x={x:0,y:0},w=[{x:g,y:y}];p&&c<=0&&(x={x:g,y:y});for(var k,M,E,O,S,_,A,T,P,L,N=0;N<=d;N+=1)k=t,M=e,E=n,O=r,S=i,_=a,A=o,T=s,L=void 0,L=1-(P=N/d),g=(k={x:Math.pow(L,3)*k+3*Math.pow(L,2)*P*E+3*L*Math.pow(P,2)*S+Math.pow(P,3)*A,y:Math.pow(L,3)*M+3*Math.pow(L,2)*P*O+3*L*Math.pow(P,2)*_+Math.pow(P,3)*T}).x,y=k.y,h&&w.push({x:g,y:y}),f&&(m+=We(b,[g,y])),b=[g,y],p&&c<=m&&c>v[2]&&(E=(m-c)/(m-v[2]),x={x:b[0]*(1-E)+v[0]*E,y:b[1]*(1-E)+v[1]*E}),v=[g,y,m];return{length:m,point:x=p&&m<=c?{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 $e(t,e,n,r,i,a,o,s){var c=s.bbox,l=void 0===c||c,c=s.length,u=void 0===c||c,c=s.sampleSize,h=void 0===c?10:c,f="number"==typeof o,d=t,p=e,g=0,y=[d,p,g],m=[d,p],v={x:0,y:0},b=[{x:d,y:p}];f&&o<=0&&(v={x:d,y:p});for(var x,w,k,M,E,O,S,_,A=0;A<=h;A+=1)x=t,w=e,k=n,M=r,E=i,O=a,_=void 0,_=1-(S=A/h),d=(x={x:Math.pow(_,2)*x+2*_*S*k+Math.pow(S,2)*E,y:Math.pow(_,2)*w+2*_*S*M+Math.pow(S,2)*O}).x,p=x.y,l&&b.push({x:d,y:p}),u&&(g+=We(m,[d,p])),m=[d,p],f&&o<=g&&o>y[2]&&(k=(g-o)/(g-y[2]),v={x:m[0]*(1-k)+y[0]*k,y:m[1]*(1-k)+y[1]*k}),y=[d,p,g];return{length:g,point:v=f&&g<=o?{x:i,y:a}:v,min:{x:Math.min.apply(null,b.map(function(t){return t.x})),y:Math.min.apply(null,b.map(function(t){return t.y}))},max:{x:Math.max.apply(null,b.map(function(t){return t.x})),y:Math.max.apply(null,b.map(function(t){return t.y}))}}}function Ke(t,e,n){for(var r,i,a,o=De(t),s="number"==typeof e,c=[],l=0,u=0,h=0,f=0,d=[],p=[],g=0,y={x:0,y:0},m=y,v=y,b=y,x=0,w=0,k=o.length;w<k;w+=1)c=(r="M"===(i=(a=o[w])[0]))?c:[l,u].concat(a.slice(1)),r?(m=y={x:h=a[1],y:f=a[2]},g=0,s&&e<.001&&(b=y)):"L"===i?(g=(r=Ve(c[0],c[1],c[2],c[3],(e||0)-x)).length,y=r.min,m=r.max,v=r.point):"A"===i?(g=(r=Ue(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],(e||0)-x,n||{})).length,y=r.min,m=r.max,v=r.point):"C"===i?(g=(r=Xe(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],(e||0)-x,n||{})).length,y=r.min,m=r.max,v=r.point):"Q"===i?(g=(r=$e(c[0],c[1],c[2],c[3],c[4],c[5],(e||0)-x,n||{})).length,y=r.min,m=r.max,v=r.point):"Z"===i&&(g=(r=Ve((c=[l,u,h,f])[0],c[1],c[2],c[3],(e||0)-x)).length,y=r.min,m=r.max,v=r.point),s&&x<e&&e<=x+g&&(b=v),p.push(m),d.push(y),x+=g,l=(r="Z"!==i?a.slice(-2):[h,f])[0],u=r[1];return{length:x,point:b=s&&x<=e?{x:l,y:u}:b,min:{x:Math.min.apply(null,d.map(function(t){return t.x})),y:Math.min.apply(null,d.map(function(t){return t.y}))},max:{x:Math.max.apply(null,p.map(function(t){return t.x})),y:Math.max.apply(null,p.map(function(t){return t.y}))}}}function Ze(t){return(l=c=s=0)<=Ye(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],c=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],l=3*((o-c)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(c-i)+o*(r+s/3)-a*(i+c/3))/20,n=t.slice(-2),s=n[0],c=n[1],l)}).reduce(function(t,e){return t+e},0);var s,c,l}function Je(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?Xe(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=ze(n,i,r),i=ze(i,a,r),a=ze(a,e,r),o=ze(n,i,r),i=ze(i,a,r),r=ze(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}var Qe=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},tn=function(t){return"function"==typeof t},_=function(t){return null==t},en={}.toString,nn=function(t,e){return en.call(t)==="[object "+e+"]"},rn=function(t){return Array.isArray?Array.isArray(t):nn(t,"Array")},an=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function on(t,e){if(t)if(rn(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(an(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var sn=function(t){return"object"==typeof t&&null!==t},cn=function(t){if(!sn(t)||!nn(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},ln=function(t){if(rn(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},un=function(t){if(rn(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},hn=function(t){return nn(t,"String")},fn=function(t,e,n){return t<e?e:n<t?n:t},dn=function(t){return nn(t,"Number")};var pn=function(t,e){return(t%e+e)%e},gn=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return on(n,function(t,e){tn(n)&&"prototype"===e||r.push(t)}),r};var yn=function(t){return nn(t,"Boolean")},mn=function(t){return void 0===t},vn=function(t){return t instanceof Element||t instanceof HTMLDocument};function bn(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function xn(t,e,n,r){return e&&bn(t,e),n&&bn(t,n),r&&bn(t,r),t}function wn(t){if("object"!=typeof t||null===t)return t;if(rn(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=wn(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=wn(t[i]):e[i]=t[i];return e}function kn(a,o){var s;if(tn(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 Mn=wn,En=5;function On(t,e){if(t===e)return!0;if(t&&e&&!hn(t)&&!hn(e)){if(Qe(t)||Qe(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=On(t[r],e[r]));r++);return n}if(sn(t)||sn(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=On(t[i[r]],e[i[r]]));r++);return n}}return!1}function Sn(t,e,n){for(var r=0,i=hn(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t}function _n(e,t){var n;return null!==e&&cn(e)?(n={},on(t,function(t){Nn.call(e,t)&&(n[t]=e[t])}),n):{}}function An(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,l=n.apply(s,c),o||(s=c=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,c=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,l=n.apply(s,c),o||(s=c=null)):o||!1===i.trailing||(o=setTimeout(a,e)),l}var o,s,c,l,u=0;return i=i||{},t.cancel=function(){clearTimeout(o),u=0,o=s=c=null},t}function Tn(){}var Pn=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||En,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&cn(o)?(cn(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):rn(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Ln=On,Nn=Object.prototype.hasOwnProperty;function Cn(t,e,n){(t.prototype=e.prototype=n).constructor=t}function jn(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function Rn(){}var e="\\s*([+-]?\\d+)\\s*",Fn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",In=/^#([0-9a-f]{3,8})$/,Dn=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),Bn=new RegExp("^rgb\\("+[n,n,n]+"\\)$"),Gn=new RegExp("^rgba\\("+[e,e,e,Fn]+"\\)$"),zn=new RegExp("^rgba\\("+[n,n,n,Fn]+"\\)$"),Wn=new RegExp("^hsl\\("+[Fn,n,n]+"\\)$"),Vn=new RegExp("^hsla\\("+[Fn,n,n,Fn]+"\\)$"),Hn={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 Yn(){return this.rgb().formatHex()}function qn(){return this.rgb().formatRgb()}function Un(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=In.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Xn(e):3===n?new Kn(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=Dn.exec(t))?new Kn(e[1],e[2],e[3],1):(e=Bn.exec(t))?new Kn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Gn.exec(t))?$n(e[1],e[2],e[3],e[4]):(e=zn.exec(t))?$n(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Wn.exec(t))?tr(e[1],e[2]/100,e[3]/100,1):(e=Vn.exec(t))?tr(e[1],e[2]/100,e[3]/100,e[4]):Hn.hasOwnProperty(t)?Xn(Hn[t]):"transparent"===t?new Kn(NaN,NaN,NaN,0):null}function Xn(t){return new Kn(t>>16&255,t>>8&255,255&t,1)}function $n(t,e,n,r){return new Kn(t=r<=0?e=n=NaN:t,e,n,r)}function Kn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Zn(){return"#"+Qn(this.r)+Qn(this.g)+Qn(this.b)}function Jn(){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 Qn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function tr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new nr(t,e,n,r)}function er(t){var e,n,r,i,a,o,s,c;return t instanceof nr?new nr(t.h,t.s,t.l,t.opacity):(t=t instanceof Rn?t:Un(t))?t instanceof nr?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,c=((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/=c<.5?a+i:2-a-i,o*=60):s=0<c&&c<1?0:o,new nr(o,s,c,t.opacity)):new nr}function nr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function rr(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 ir(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function ar(t,e){return Math.abs(t-e)<.001}function or(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 sr(t){return(t+2*Math.PI)%(2*Math.PI)}Cn(Rn,Un,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Yn,formatHex:Yn,formatHsl:function(){return er(this).formatHsl()},formatRgb:qn,toString:qn}),Cn(Kn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof Rn?i:Un(i))?new Kn((i=i.rgb()).r,i.g,i.b,i.opacity):new Kn:new Kn(t,e,n,null==r?1:r);var i},jn(Rn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Kn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Kn(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:Zn,formatHex:Zn,formatRgb:Jn,toString:Jn})),Cn(nr,function(t,e,n,r){return 1===arguments.length?er(t):new nr(t,e,n,null==r?1:r)},jn(Rn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new nr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new nr(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 Kn(rr(240<=t?t-240:120+t,n,e),rr(t,n,e),rr(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 cr={box:function(t,e,n,r){return or([t,n],[e,r])},length:ir,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?ir(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?ir(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){n=[n-t,r-e];return be(n,[0,0])?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(me(r=[-n[1],n[0]],r),Math.abs(ve([i-t,a-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function lr(t,e,n,r,i,a){for(var o=-1,s=1/0,c=[n,r],l=20,u=1/(l=a&&200<a?a/10:l),h=u/10,f=0;f<=l;f++){var d=f*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=ir(c[0],c[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&&!(h<1e-4);g++){var y=o-h,m=o+h,v=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=ir(c[0],c[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=ir(c[0],c[1],y[0],y[1]),m<=1&&v<s?(o=m,s=v):h*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function ur(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function hr(t,e,n){n=t+n-2*e;return ar(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function fr(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function dr(t,e,n,r,i,a,o){var s=ur(t,n,i,o),c=ur(e,r,a,o),l=cr.pointAt(t,e,n,r,o),n=cr.pointAt(n,r,i,a,o);return[[t,e,l.x,l.y,s,c],[s,c,n.x,n.y,i,a]]}function pr(t,e,n,r,i,a,o){return 0===o?(ir(t,e,n,r)+ir(n,r,i,a)+ir(t,e,i,a))/2:(e=(t=dr(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),pr.apply(void 0,e)+pr.apply(void 0,n))}var gr={box:function(t,e,n,r,i,a){var o=hr(t,n,i)[0],s=hr(e,r,a)[0],c=[t,i],l=[e,a];return void 0!==o&&c.push(ur(t,n,i,o)),void 0!==s&&l.push(ur(e,r,a,s)),or(c,l)},length:function(t,e,n,r,i,a){return pr(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return lr([t,n,i],[e,r,a],o,s,ur)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return ir(t.x,t.y,o,s)},interpolationAt:ur,pointAt:function(t,e,n,r,i,a,o){return{x:ur(t,n,i,o),y:ur(e,r,a,o)}},divide:dr,tangentAngle:function(t,e,n,r,i,a,o){t=fr(t,n,i,o),n=fr(e,r,a,o);return sr(Math.atan2(n,t))}};function yr(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 mr(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 vr(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 ar(r,0)?ar(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):ar(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 br(t,e,n,r,i,a,o,s,c){var l=yr(t,n,i,o,c),u=yr(e,r,a,s,c),h=cr.pointAt(t,e,n,r,c),n=cr.pointAt(n,r,i,a,c),r=cr.pointAt(i,a,o,s,c),i=cr.pointAt(h.x,h.y,n.x,n.y,c),a=cr.pointAt(n.x,n.y,r.x,r.y,c);return[[t,e,h.x,h.y,i.x,i.y,l,u],[l,u,a.x,a.y,r.x,r.y,o,s]]}function xr(t,e,n,r,i,a,o,s,c){if(0===c){for(var l=[t,n,i,o],u=[e,r,a,s],h=0,f=l.length,d=0;d<f;d++)h+=ir(l[d],u[d],l[(d+1)%f],u[(d+1)%f]);return h/2}t=br(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[c-1]),n=[].concat(t[1],[c-1]);return xr.apply(void 0,e)+xr.apply(void 0,n)}var wr={extrema:vr,box:function(t,e,n,r,i,a,o,s){for(var c=[t,o],l=[e,s],u=vr(t,n,i,o),h=vr(e,r,a,s),f=0;f<u.length;f++)c.push(yr(t,n,i,o,u[f]));for(var d=0;d<h.length;d++)l.push(yr(e,r,a,s,h[d]));return or(c,l)},length:function(t,e,n,r,i,a,o,s){return xr(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,c,l,u){return lr([t,n,i,o],[e,r,a,s],c,l,yr,u)},pointDistance:function(t,e,n,r,i,a,o,s,c,l,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,c,l,u);return ir(t.x,t.y,c,l)},interpolationAt:yr,pointAt:function(t,e,n,r,i,a,o,s,c){return{x:yr(t,n,i,o,c),y:yr(e,r,a,s,c)}},divide:br,tangentAngle:function(t,e,n,r,i,a,o,s,c){t=mr(t,n,i,o,c),n=mr(e,r,a,s,c);return sr(Math.atan2(n,t))}};function kr(t,e){t=Math.abs(t);return 0<e?t:-1*t}var Mr=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,c=Math.abs(n),l=Math.abs(r),u=o*o,h=s*s,f=Math.PI/4,d=0,p=0,g=0;g<4;g++){var d=o*Math.cos(f),p=s*Math.sin(f),y=(u-h)*Math.pow(Math.cos(f),3)/o,m=(h-u)*Math.pow(Math.sin(f),3)/s,v=d-y,b=p-m,y=c-y,m=l-m,x=Math.hypot(b,v),w=Math.hypot(m,y);f+=x*Math.asin((v*m-b*y)/(x*w))/Math.sqrt(u+h-d*d-p*p),f=Math.min(Math.PI/2,Math.max(0,f))}return{x:t+kr(d,n),y:e+kr(p,r)}};function Er(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function Or(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function Sr(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function _r(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var Ar={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),c=1/0,l=-1/0,u=[a,o],h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var f=s+h;a<o?a<f&&f<o&&u.push(f):o<f&&f<a&&u.push(f)}for(var d=0;d<u.length;d++){var p=Er(t,0,n,r,i,u[d]);p<c&&(c=p),l<p&&(l=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=Or(0,e,n,r,i,v[w]);k<y&&(y=k),m<k&&(m=k)}return{x:c,y:y,width:l-c,height:m-y}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,c){var s=_r(s-t,c-e,-i),c=s[0],s=s[1],c=Mr(0,0,n,r,c,s),l=(s=c.x,l=c.y,(Math.atan2(l*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(l<a?c=Sr(n,r,a):o<l&&(c=Sr(n,r,o)),_r(c.x,c.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,c){t=this.nearestPoint(t,e,n,r,i,a,o,s,c);return ir(t.x,t.y,s,c)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:Er(t,0,n,r,i,o),y:Or(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var c,o=(o-a)*s+a,s=(s=r,a=i,c=o,-1*n*Math.cos(a)*Math.sin(c)-s*Math.sin(a)*Math.cos(c)),i=(a=r,c=i,r=o,-1*n*Math.sin(c)*Math.sin(r)+a*Math.cos(c)*Math.cos(r));return sr(Math.atan2(i,s))}};function Tr(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=ir(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var Pr,Lr,Nr={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 or(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+=ir(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=Tr(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 c=r[s],l=c.from,u=c.to,c=c.length/i;if(a<=n&&n<=a+c){o=cr.pointAt(l[0],l[1],u[0],u[1],(n-a)/c);break}a+=c}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 c=r[s],l=r[s+1],c=cr.pointDistance(c[0],c[1],l[0],l[1],i,a);c<o&&(o=c)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=Tr(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var c=r[s],l=c.from,u=c.to,c=c.length/i;if(a<=n&&n<=a+c){o=Math.atan2(u[1]-l[1],u[0]-l[0]);break}a+=c}return o}},e={exports:{}};function Cr(){}function jr(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Rr(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new jr(n,r||t,i),r=Lr?Lr+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 Fr(t,e){0==--t._eventsCount?t._events=new Cr:delete t._events[e]}function Ir(){this._events=new Cr,this._eventsCount=0}n=e,Pr=Object.prototype.hasOwnProperty,Lr="~",Object.create&&(Cr.prototype=Object.create(null),(new Cr).__proto__||(Lr=!1)),Ir.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)Pr.call(t,e)&&n.push(Lr?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},Ir.prototype.listeners=function(t){var t=Lr?Lr+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},Ir.prototype.listenerCount=function(t){t=Lr?Lr+t:t,t=this._events[t];return t?t.fn?1:t.length:0},Ir.prototype.emit=function(t,e,n,r,i,a){var o=Lr?Lr+t:t;if(!this._events[o])return!1;var s,c=this._events[o],l=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,i),!0;case 6:return c.fn.call(c.context,e,n,r,i,a),!0}for(f=1,s=new Array(l-1);f<l;f++)s[f-1]=arguments[f];c.fn.apply(c.context,s)}else for(var u,h=c.length,f=0;f<h;f++)switch(c[f].once&&this.removeListener(t,c[f].fn,void 0,!0),l){case 1:c[f].fn.call(c[f].context);break;case 2:c[f].fn.call(c[f].context,e);break;case 3:c[f].fn.call(c[f].context,e,n);break;case 4:c[f].fn.call(c[f].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(l-1);u<l;u++)s[u-1]=arguments[u];c[f].fn.apply(c[f].context,s)}return!0},Ir.prototype.on=function(t,e,n){return Rr(this,t,e,n,!1)},Ir.prototype.once=function(t,e,n){return Rr(this,t,e,n,!0)},Ir.prototype.removeListener=function(t,e,n,r){t=Lr?Lr+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||Fr(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:Fr(this,t)}}else Fr(this,t);return this},Ir.prototype.removeAllListeners=function(t){return t?(t=Lr?Lr+t:t,this._events[t]&&Fr(this,t)):(this._events=new Cr,this._eventsCount=0),this},Ir.prototype.off=Ir.prototype.removeListener,Ir.prototype.addListener=Ir.prototype.on,Ir.prefixed=Lr,n.exports=Ir.EventEmitter=Ir;var r,Dr=e.exports,Fn="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};let Br=1;const Gr="object"==typeof self&&self.self==self?self:"object"==typeof Fn&&Fn.global==Fn?Fn:{},zr=Date.now();let Wr={},Vr=Date.now();const Hr=t=>"string"!=typeof t?t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const n=Date.now(),e=n-Vr,r=16<e?0:16-e,i=Br++;return Wr[i]=t,1<Object.keys(Wr).length||setTimeout(()=>{Vr=n;const e=Wr;Wr={},Object.keys(e).forEach(t=>e[t](Gr.performance&&"function"==typeof Gr.performance.now?Gr.performance.now():Date.now()-zr))},r),i}:""===t?Gr.requestAnimationFrame:Gr[t+"RequestAnimationFrame"],Yr=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],t=>!!Hr(t)),qr=Hr(Yr),Ur="string"!=typeof(n=Yr)?t=>{delete Wr[t]}:""===n?Gr.cancelAnimationFrame:Gr[n+"CancelAnimationFrame"]||Gr[n+"CancelRequestAnimationFrame"];Gr.requestAnimationFrame=qr,Gr.cancelAnimationFrame=Ur,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:qr,cancelAnimationFrame:Ur}),(e=r=r||{}).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 Xr,M,$r=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){Bt(this.center,t),Bt(this.halfExtents,e),Zt(this.min,this.center,this.halfExtents),zt(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){zt(this.center,e,t),Vt(this.center,this.center,.5),Zt(this.halfExtents,e,t),Vt(this.halfExtents,this.halfExtents,.5),Bt(this.min,t),Bt(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,c,l,u,h,f,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],h=r[1],o=r[2],c=(f=t.center)[0],g=f[1],f=f[2],l=(t=t.halfExtents)[0],(d=g-(u=t[1]))<(s=p-h)&&(s=d),(d=p+h)<(p=g+u)&&(d=p),(g=f-(h=t[2]))<(u=a-o)&&(u=g),(p=a+o)<(t=f+h)&&(p=t),e[0]=.5*((a=(g=c-l)<(a=n-i)?g:a)+(o=(o=n+i)<(f=c+l)?f: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],c=e[1],l=e[5],u=e[9],h=e[2],f=e[6],d=e[10],p=Math.abs(a),g=Math.abs(o),y=Math.abs(s),m=Math.abs(c),v=Math.abs(l),b=Math.abs(u),x=Math.abs(h),w=Math.abs(f),k=Math.abs(d);Gt(n,e[12]+a*i[0]+o*i[1]+s*i[2],e[13]+c*i[0]+l*i[1]+u*i[2],e[14]+h*i[0]+f*i[1]+d*i[2]),Gt(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=Zt(this.min,n,r),this.max=zt(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?Bt(m(),this.min):272===t.pnVertexFlag?k(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?k(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?k(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?k(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?k(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?k(this.max[0],this.max[1],this.min[2]):k(this.max[0],this.max[1],this.max[2])},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Bt(m(),this.max):272===t.pnVertexFlag?k(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?k(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?k(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?k(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?k(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?k(this.min[0],this.min[1],this.max[2]):k(this.min[0],this.min[1],this.min[2])},y}(),Kr=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||k(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 Yt(t,this.normal)-this.distance},e.normalize=function(){var t=1/Qt(this.normal);Vt(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),r=r/(r-this.distanceToPoint(e)),i=0<=r&&r<=1;return i&&n&&Ut(n,t,e,r),i},t}(),Zr=((n=Xr=Xr||{})[n.OUTSIDE=4294967295]="OUTSIDE",n[n.INSIDE=0]="INSIDE",n[n.INDETERMINATE=2147483647]="INDETERMINATE",function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Kr)}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],c=t[7],l=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],t=t[15];Gt(this.planes[0].normal,i-e,c-a,f-l),this.planes[0].distance=t-d,Gt(this.planes[1].normal,i+e,c+a,f+l),this.planes[1].distance=t+d,Gt(this.planes[2].normal,i+n,c+o,f+u),this.planes[2].distance=t+p,Gt(this.planes[3].normal,i-n,c-o,f-u),this.planes[3].distance=t-p,Gt(this.planes[4].normal,i-r,c-s,f-h),this.planes[4].distance=t-g,Gt(this.planes[5].normal,i+r,c+s,f+h),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),Jr=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}(),Qr=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}(),ti=((e=M=M||{}).GROUP="g",e.CIRCLE="circle",e.ELLIPSE="ellipse",e.IMAGE="image",e.RECT="rect",e.LINE="line",e.POLYLINE="polyline",e.POLYGON="polygon",e.TEXT="text",e.PATH="path",e.HTML="html",e.MESH="mesh",kn(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}));function ei(t){if(!t)throw new Error}function ni(t,e){if(t===e)throw new Error}function ri(t){return"function"==typeof t}var ii={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},ai=kn(function(t){var t=ti(t),e=ii[t];return(null==e?void 0:e.alias)||t}),oi={},si=0;var ci="undefined"!=typeof window&&void 0!==window.document;function li(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i)return(i=i.childNodes||[]).indexOf(t)-i.indexOf(e)}return n-r}function ui(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}function hi(t,e){if(ci)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var g,fi,di,pi,gi="Method not implemented.",yi="Use document.documentElement instead.",mi={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function E(){E=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function vi(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function bi(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){vi(r,e,n,i,a,"next",t)}function a(t){vi(r,e,n,i,a,"throw",t)}i(void 0)})}}function xi(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 wi(t,e,n){e&&xi(t.prototype,e),n&&xi(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function ki(){return(ki=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 s(t,e){t.prototype=Object.create(e.prototype),Mi(t.prototype.constructor=t,e)}function Mi(t,e){return(Mi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ei(t,e){if(null==t)return{};for(var n,r={},i=Object.keys(t),a=0;a<i.length;a++)n=i[a],0<=e.indexOf(n)||(r[n]=t[n]);return r}function Oi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Si(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 _i(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?Si(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)?Si(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.")}(n=g=g||{})[n.kUnknown=0]="kUnknown",n[n.kNumber=1]="kNumber",n[n.kPercentage=2]="kPercentage",n[n.kEms=3]="kEms",n[n.kPixels=4]="kPixels",n[n.kRems=5]="kRems",n[n.kDegrees=6]="kDegrees",n[n.kRadians=7]="kRadians",n[n.kGradians=8]="kGradians",n[n.kTurns=9]="kTurns",n[n.kMilliseconds=10]="kMilliseconds",n[n.kSeconds=11]="kSeconds",n[n.kInteger=12]="kInteger",(e=fi=fi||{})[e.kUNumber=0]="kUNumber",e[e.kUPercent=1]="kUPercent",e[e.kULength=2]="kULength",e[e.kUAngle=3]="kUAngle",e[e.kUTime=4]="kUTime",e[e.kUOther=5]="kUOther",(n=di=di||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo",(e=pi=pi||{})[e.kYes=0]="kYes",e[e.kNo=1]="kNo";function Ai(t){return t?"number"===t?g.kNumber:"percent"===t||"%"===t?g.kPercentage:(e=t,Ri.find(function(t){return t.name===e}).unit_type):g.kUnknown;var e}function Ti(t){var e=1;switch(t){case g.kPixels:case g.kDegrees:case g.kSeconds:break;case g.kMilliseconds:e=.001;break;case g.kRadians:e=180/Math.PI;break;case g.kGradians:e=.9;break;case g.kTurns:e=360}return e}function Pi(t){switch(t){case g.kNumber:case g.kInteger:return"";case g.kPercentage:return"%";case g.kEms:return"em";case g.kRems:return"rem";case g.kPixels:return"px";case g.kDegrees:return"deg";case g.kRadians:return"rad";case g.kGradians:return"grad";case g.kMilliseconds:return"ms";case g.kSeconds:return"s";case g.kTurns:return"turn"}return""}var Li,Ni,Ci,ji,Ri=[{name:"em",unit_type:g.kEms},{name:"px",unit_type:g.kPixels},{name:"deg",unit_type:g.kDegrees},{name:"rad",unit_type:g.kRadians},{name:"grad",unit_type:g.kGradians},{name:"ms",unit_type:g.kMilliseconds},{name:"s",unit_type:g.kSeconds},{name:"rem",unit_type:g.kRems},{name:"turn",unit_type:g.kTurns}],e=((n=Li=Li||{})[n.kUnknownType=0]="kUnknownType",n[n.kUnparsedType=1]="kUnparsedType",n[n.kKeywordType=2]="kKeywordType",n[n.kUnitType=3]="kUnitType",n[n.kSumType=4]="kSumType",n[n.kProductType=5]="kProductType",n[n.kNegateType=6]="kNegateType",n[n.kInvertType=7]="kInvertType",n[n.kMinType=8]="kMinType",n[n.kMaxType=9]="kMaxType",n[n.kClampType=10]="kClampType",n[n.kTransformType=11]="kTransformType",n[n.kPositionType=12]="kPositionType",n[n.kURLImageType=13]="kURLImageType",n[n.kColorType=14]="kColorType",n[n.kUnsupportedColorType=15]="kUnsupportedColorType",function(){function t(){}t.isAngle=function(t){return t===g.kDegrees||t===g.kRadians||t===g.kGradians||t===g.kTurns},t.isLength=function(t){return t>=g.kEms&&t<g.kDegrees},t.isRelativeUnit=function(t){return t===g.kPercentage||t===g.kEms||t===g.kRems},t.isTime=function(t){return t===g.kSeconds||t===g.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(di.kNo,pi.kNo,"")},e.isNumericValue=function(){return this.getType()>=Li.kUnitType&&this.getType()<=Li.kClampType},t}()),n=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}s(t,n);var e=t.prototype;return e.getType=function(){return Li.kColorType},e.to=function(t){return this},t}(e),Fi=((i=Ni=Ni||{})[i.Constant=0]="Constant",i[i.LinearGradient=1]="LinearGradient",i[i.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}s(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 Li.kColorType},t}(e)),Ii=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}s(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return Li.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(e);(i=Ci=Ci||{}).kAdd="+",i.kSubtract="-",i.kMultiply="*",i.kDivide="/",i.kMin="min",i.kMax="max",i.kClamp="clamp",i.kInvalid="",(i=ji=ji||{})[i.kLength=0]="kLength",i[i.kAngle=1]="kAngle",i[i.kTime=2]="kTime",i[i.kFrequency=3]="kFrequency",i[i.kResolution=4]="kResolution",i[i.kFlex=5]="kFlex",i[i.kPercent=6]="kPercent",i[i.kNumBaseTypes=7]="kNumBaseTypes";function Di(t){return"number"==typeof t?new qi(t,g.kNumber):t}var Bi=function(){function t(t,e){void 0===t&&(t=g.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=ji.kPercent,this.hasPercentHint=!1,this.exponents=new Array(ji.kNumBaseTypes).fill(0),t!==g.kNumber&&this.setExponent(function(t){switch(ni(t,g.kNumber),t){case g.kEms:case g.kPixels:case g.kRems:return ji.kLength;case g.kMilliseconds:case g.kSeconds:return ji.kTime;case g.kDegrees:case g.kRadians:case g.kGradians:case g.kTurns:return ji.kAngle;case g.kPercentage:return ji.kPercent;default:return ji.kLength}}(t),e)}var e=t.prototype;return e.applyPercentHint=function(t){ni(t,ji.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(ji.kPercent)),this.setExponent(ji.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},e.hasNonZeroEntries=function(){return 0<this.numNonZeroEntries},e.isOnlyNonZeroEntry=function(t,e){return ni(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 ni(t,ji.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},e.matchesPercentage=function(){return this.isOnlyNonZeroEntry(ji.kPercent,1)},e.matchesBaseTypePercentage=function(t){return ni(t,ji.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(ji.kPercent,1)},e.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},e.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(ji.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<ji.kNumBaseTypes;++a){var o=a;if(t.exponents[a]!==e.exponents[a]&&(o!==ji.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<ji.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t},t}(),i=function(n){function d(t){var e=n.call(this)||this;return e.type_=void 0,e.type_=t,e}s(d,n);var t=d.prototype;return t.getType=function(){return Li.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 Gi(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=Gi(e),i=(zi(Li.kSumType,r,this),Vi(r,Ci.kAdd));return i||Qi.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=Gi(e)).map(function(t){return t.negate()}),i=(zi(Li.kSumType,r,this),Vi(r,Ci.kAdd));return i||Qi.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=Gi(e),i=(zi(Li.kProductType,r,this),Hi(r));return i||ta.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=Gi(e)).map(function(t){return t.invert()}),i=(zi(Li.kProductType,r,this),Hi(r));return i||ta.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=Gi(e),i=(zi(Li.kMinType,r,this),Vi(r,Ci.kMin));return i||Zi.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=Gi(e),i=(zi(Li.kMaxType,r,this),Vi(r,Ci.kMax));return i||Ji.create(r)},t.to=function(t){var e=this.sumValue();return 0!==e.length&&1===e.length&&(e=Wi(e[0]))?(t="string"==typeof t?Ai(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(Ai(a)))return null}var o=this.sumValue();if(!o.length)return null;for(var s=[],c=_i(o);!(l=c()).done;){var l=Wi(l.value);if(!l)return null;s.push(l)}if(0===e.length)return s.sort(function(t,e){return t.unit-e.unit}),ei(!!(o=Qi.create(s))),o;for(var u=[],h=0,f=e;h<f.length;h++)!function(){var t=f[h],r=Ai(t),t=(ei(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 qi(t,r))}();if(s.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return Qi.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(ji.kLength);return e&&(t.length=e),(e=this.type_.exponent(ji.kAngle))&&(t.angle=e),(e=this.type_.exponent(ji.kTime))&&(t.time=e),(e=this.type_.exponent(ji.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(ji.kResolution))&&(t.resolution=e),(e=this.type_.exponent(ji.kFlex))&&(t.flex=e),(e=this.type_.exponent(ji.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case ji.kLength:return"length";case ji.kAngle:return"angle";case ji.kTime:return"time";case ji.kFrequency:return"frequency";case ji.kResolution:return"resolution";case ji.kFlex:return"flex";case ji.kPercent:return"percent"}return""}(this.type_.percentHint)),t},d.isValidUnit=function(t){return!!(t===g.kNumber||t==g.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t))},t.negate=function(){return Xi.create(this)},t.invert=function(){return Ui.create(this)},d}(e);function Gi(t){return t.map(Di)}function zi(t,e,n){ei(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function Wi(t){return 0===Object.keys(t.units).length?new qi(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new qi(t.value,Number(Object.keys(t.units)[0])):null}function Vi(t,e){ei(!!t.length);var n=t[0]instanceof qi?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var a=t[i]instanceof qi?t[i]:null;if(!a||a.unit!==n.unit)return null;e===Ci.kAdd?r+=a.value:e===Ci.kMax?r=Math.max(r,a.value):e===Ci.kMin&&(r=Math.min(r,a.value))}return new qi(r,n.unit)}function Hi(t){ei(!!t.length);for(var e=g.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof qi?t[r]:null;if(!i)return null;if(i.unit!==g.kNumber){if(e!==g.kNumber)return null;e=i.unit}n*=i.value}return new qi(n,e)}function Yi(t){switch(function(t){switch(t){case g.kNumber:case g.kInteger:return fi.kUNumber;case g.kPercentage:return fi.kUPercent;case g.kPixels:return fi.kULength;case g.kMilliseconds:case g.kSeconds:return fi.kUTime;case g.kDegrees:case g.kRadians:case g.kGradians:case g.kTurns:return fi.kUAngle;default:return fi.kUOther}}(t)){case fi.kUNumber:return g.kNumber;case fi.kULength:return g.kPixels;case fi.kUPercent:return g.kPercentage;case fi.kUTime:return g.kSeconds;case fi.kUAngle:return g.kDegrees;default:return g.kUnknown}}var qi=function(r){function n(t,e){var n,e="string"==typeof(e=void 0===e?g.kNumber:e)?Ai(e):e;return(n=r.call(this,new Bi(e))||this).unit=void 0,n.value=void 0,n.unit=e,n.value=t,n}s(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=Yi(this.unit))!==Yi(t)||e===g.kUnknown?null:(e=Ti(this.unit)/Ti(t),new n(this.value*e,t))},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return Li.kUnitType},t.sumValue=function(){var t,e,n=[],r={};return this.unit!==g.kNumber&&(r[t=this.unit,(e=Yi(t))===g.kUnknown?t:e]=1),n.push({value:this.value*Ti(this.unit),units:r}),n},t.negate=function(){return new n(-this.value,this.unit)},t.invert=function(){return this.unit===g.kNumber?0===this.value?null:new n(1/this.value,this.unit):Ui.create(this)},t.buildCSSText=function(t,e,n){switch(this.unit){case g.kUnknown:break;case g.kInteger:i=Number(this.value).toFixed(0);break;case g.kNumber:case g.kPercentage:case g.kEms:case g.kRems:case g.kPixels:case g.kDegrees:case g.kRadians:case g.kGradians:case g.kMilliseconds:case g.kSeconds:case g.kTurns:var r,i,a=this.value,o=Pi(this.unit);i=a<-999999||999999<a?(r=Pi(this.unit),!Number.isFinite(a)||Number.isNaN(a)?function(t,e){void 0===e&&(e="");return(Number.isFinite(t)?(ei(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e}(a,r):a+(r||"")):""+a+o}return n+=i},n}(i),e=function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.isUnitValue=function(){return!1},e}(i),Ui=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="invert",e.value=t,e}s(e,n),e.create=function(t){return new e(t,Bi.negateExponents(t.type_))};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return Li.kInvertType},t.equals=function(t){return t.getType()===Li.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==pi.kNo&&(n+=t===di.kYes?"(":"calc("),n=this.value.buildCSSText(di.kYes,pi.kNo,n+="1 / "),e===pi.kNo&&(n+=")"),n},e}(e),Xi=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="negate",e.value=t,e}s(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 Li.kNegateType},t.equals=function(t){return t.getType()===Li.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==pi.kNo&&(n+=t===di.kYes?"(":"calc("),n=this.value.buildCSSText(di.kYes,pi.kNo,n+="-"),e===pi.kNo&&(n+=")"),n},e}(e);function $i(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}function Ki(t){return oa[t]||(oa[t]=new Ii(t)),oa[t]}var i=function(n){function t(t,e){e=n.call(this,e)||this;return e.values=void 0,e.values=t,e}s(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}(e),Zi=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}s(e,i),e.create=function(t){return new e(t,$i(t,Bi.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Li.kMinType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=_i(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=_i(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(di.kYes,pi.kYes,n);return n+=")"},e}(i),Ji=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}s(e,i),e.create=function(t){return new e(t,$i(t,Bi.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Li.kMaxType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=_i(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=_i(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(di.kYes,pi.kYes,n);return n+=")"},e}(i),Qi=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}s(e,i),e.create=function(t){return new e(t,$i(t,Bi.add))},e.numericTypeFromUnitMap=function(n){var r=new Bi;return Object.keys(n).forEach(function(t){var e=n[t];r=Bi.multiply(r,new Bi(Number(t),e),!1),ei(!0)}),r},e.canCreateNumericTypeFromSumValue=function(t){var e=this,n=(ei(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return Bi.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 Li.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(ki({},e)):n[t].value+=e.value})}),e.canCreateNumericTypeFromSumValue(n)?n:null},t.buildCSSText=function(t,e,n){e==pi.kNo&&(n+=t===di.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(di.kYes,pi.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===Li.kNegateType?(n+=" - ",a.value):(n+=" + ",a)).buildCSSText(di.kYes,pi.kNo,n)}return e===pi.kNo&&(n+=")"),n},e}(i),ta=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}s(a,i),a.create=function(t){return new a(t,$i(t,Bi.multiply))},a.multiplyUnitMaps=function(n,r){return Object.keys(r).forEach(function(t){ni(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 Li.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==pi.kNo&&(n+=t===di.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(di.kYes,pi.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===Li.kInvertType?(n+=" / ",a.value):(n+=" * ",a)).buildCSSText(di.kYes,pi.kNo,n)}return e===pi.kNo&&(n+=")"),n},a}(i),ea=new qi(0,"px"),na=(new qi(1,"px"),new qi(0,"deg")),ra=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}s(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}(n),ia=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,t=t.syntax;w.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:t})},aa=new Ii("unset"),e=new Ii("initial"),i=new Ii("inherit"),oa={"":aa,unset:aa,initial:e,inherit:i},sa=new ra(0,0,0,0,!0),ca=new ra(0,0,0,0),la=kn(function(t,e,n,r){return new ra(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),ua=kn(function(t,e){return void 0===e&&(e=g.kNumber),new qi(t,e)},function(t,e){return""+t+(e=void 0===e?g.kNumber:e)}),ha=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,fa=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,da=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,pa=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var ga={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},ya=kn(function(t){t="angular"===t.type?Number(t.value):ga[t.value]||0;return ua(t,"deg")}),ma=kn(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:ua(n,i),cy:ua(r,a)}}),va=kn(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return Ns(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!=(f=r[i-1].length)?f:{type:"%",value:"100"},1<i&&(r[0].length=null!=(f=r[0].length)?f:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var c,l=null==(c=r[s].length)?void 0:c.value;if(!_(l)&&!_(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:""+(o+(Number(l)-o)*u/(s-a))};a=s,o=Number(l)}}var h,f=t.map(function(t){return{offset:ua(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 Fi(Ni.LinearGradient,{angle:n?ya(n):na,steps:f}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=ma(n[0].at)).cx,t=t.cy,n[0].style&&(h=(n=n[0].style).type,n=n.value,h="extent-keyword"===h?Ki(n):ua(n,h)),new Fi(Ni.RadialGradient,{cx:e,cy:t,size:h,steps:f})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=ha.exec(t);if(n)return r=(null==(r=n[2].match(pa))?void 0:r.map(function(t){return t.split(":")}))||[],[new Fi(Ni.LinearGradient,{angle:ua(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:ua(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=fa.exec(t);if(t)return t=(null==(t=t[4].match(pa))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:ua(50,"%"),cy:ua(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:ua(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!hn(n))return[new Fi(Ni.RadialGradient,n)]}else if("p"===e){var r=t;if(r=da.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}});function ba(t){return an(t)&&t.image}var xa=kn(function(t){var e;return ba(t)?ki({repetition:"repeat"},t):"transparent"===(t=_(t)?"":t)?ca:va(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=Un(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),la.apply(void 0,e))});function wa(t,e){if(t instanceof ra&&e instanceof ra)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(fn(e[n],0,255));return e[3]=fn(e[3],0,1),"rgba("+e.join(",")+")"}]}function ka(t,e){if(_(e))return ua(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return ua(Number(e),"px");if(0<="deg".search(t))return ua(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 ua(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var Ma=kn(function(t){return ka(new RegExp("px","g"),t)}),Ea=(kn(function(t){return ka(new RegExp("%","g"),t)}),kn(function(t){return dn(t)||isFinite(Number(t))?ua(Number(t),"px"):ka(new RegExp("px|%|em|rem","g"),t)})),Oa=kn(function(t){return ka(new RegExp("deg|rad|grad|turn","g"),t)});function Sa(t){var e=0;return t.unit===g.kDegrees?e=t.value:t.unit===g.kRadians?e=xs(Number(t.value)):t.unit===g.kTurns&&(e=360*Number(t.value)),e}function _a(t){return hn(t)?t.split(" ").map(function(t){return Ea(t)}):t.map(function(t){return Ea(t.toString())})}function Aa(t,e,n){var r;return t.unit===g.kPixels?Number(t.value):t.unit===g.kPercentage&&n?(n=n.nodeName===M.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,$r.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var Ta=function(t){return ka(/deg|rad|grad|turn|px|%/g,t)},Pa=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function La(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<Pa.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return Ta(t)||xa(t)})}),n.lastIndex===t.length)return r}return[]}function Na(t){return t.toString()}var Ca=kn(function(t){return"number"==typeof t?ua(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ua(Number(t)):ua(0)});function ja(t,e){return[t,e,Na]}function Ra(n,r){return function(t,e){return[t,e,function(t){return Na(fn(t,n,r))}]}}function Fa(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}kn(function(t){return(hn(t)?t.split(" "):t).map(Ca)});var Ia=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=De(e)}catch(t){n=De(""),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 c=t[s],l=(r=t[s+1],c[0]),u={command:l,prePoint:n,params:c,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(l){case"M":i=[c[1],c[2]],a=s;break;case"A":var h=function(t,e){var n=e[1],r=e[2],i=pn(bs(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],c=t[1],l=e[6],e=e[7],u=Math.cos(i)*(s-l)/2+Math.sin(i)*(c-e)/2,h=-1*Math.sin(i)*(s-l)/2+Math.cos(i)*(c-e)/2,f=u*u/(n*n)+h*h/(r*r);1<f&&(n*=Math.sqrt(f),r*=Math.sqrt(f));f=n*n*(h*h)+r*r*(u*u),f=f?Math.sqrt((n*n*(r*r)-f)/f):1;a===o&&(f*=-1);isNaN(f)&&(f=0);var d=r?f*n*h/r:0,f=n?f*-r*u/n:0,s=(s+l)/2+Math.cos(i)*d-Math.sin(i)*f,c=(c+e)/2+Math.sin(i)*d+Math.cos(i)*f,p=[(u-d)/n,(h-f)/r],u=[(-1*u-d)/n,(-1*h-f)/r],d=cc([1,0],p),h=cc(p,u);sc(p,u)<=-1&&(h=Math.PI);1<=sc(p,u)&&(h=0);0===o&&0<h&&(h-=2*Math.PI);1===o&&h<0&&(h+=2*Math.PI);return{cx:s,cy:c,rx:tc(t,[l,e])?0:n,ry:tc(t,[l,e])?0:r,startAngle:d,endAngle:d+h,xRotation:i,arcFlag:a,sweepFlag:o}}(n,c);u.arcParams=h}"Z"===l?(n=i,r=t[a+1]):(v=c.length,n=[c[v-2],c[v-1]]),r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&tc(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var f,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(l)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===l?(f=[c[1],c[2]],u.startTangent=[b[0]-f[0],b[1]-f[1]],u.endTangent=[n[0]-f[0],n[1]-f[1]]):"T"===l?(d=nc((f=e[s-1]).currentPoint,b),"Q"===f.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"===l?(d=[c[1],c[2]],p=[c[3],c[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"===l?(g=nc((p=e[s-1]).currentPoint,b),y=[c[1],c[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"===l&&(g=ac(u,0),b=g.x,y=g.y,l=ac(u,1,!1),m=l.x,l=l.y,u.startTangent=[b,y],u.endTangent=[m,l]),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,c=o.params,l=o.prePoint,u=void 0;switch(o.command){case"Q":u=gr.box(l[0],l[1],c[1],c[2],c[3],c[4]);break;case"C":u=wr.box(l[0],l[1],c[1],c[2],c[3],c[4],c[5],c[6]);break;case"A":var h=o.arcParams;u=Ar.box(h.cx,h.cy,h.rx,h.ry,h.xRotation,h.startAngle,h.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 f=un(n),d=un(r),p=ln(n),g=ln(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]===f?(b=ec(m,e),f-=b.xExtra):v[0]===p&&(b=ec(m,e),p+=b.xExtra),v[1]===d?(b=ec(m,e),d-=b.yExtra):v[1]===g&&(b=ec(m,e),g+=b.yExtra)}return{x:f,y:d,width:p-f,height:g-d}}(i,0),o=a.x,s=a.y,c=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(c)?c:0,height:Number.isFinite(a)?a:0}}},Da=kn(Ia);function Ba(t,e){t=(hn(t)?Da:Ia)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function Ga(t,e,n){var r,i,a,o,s,c,l,u,h,f=t.curve,d=e.curve,t=(f&&0!==f.length||(f=Ye(t.absolutePath,!1),t.curve=f),d&&0!==d.length||(d=Ye(e.absolutePath,!1),e.curve=d),[f,d]),f=Ze((t=f.length!==d.length?function t(e,n,r){var i,e=Je(e),n=Je(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,c=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,c=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/c||0,l=r||Math.max(a,o),u=[s,c],h=[l-a,l-o],r=[e,n].map(function(t,n){return t.l===l?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&h[n]&&t.l>=u[n],h[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],l)}(f,d):t)[0])!==Ze(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))}))):we(t[0]);return[f,(i=t[1],a=f,l=i.length-1,u=[],h=0,s=(o=i).length,c=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-=c),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){h+=We(i[(n+e)%l].slice(-2),a[e%l].slice(-2))}),u[n]=h,h=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function za(t,e){var n,r,i=hn(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=Nr.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=cr.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]}))),c=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=c),{points:i,totalLength:s,segments:a}}var Wa=null;function Va(t){return function(e){var n=0;return t.map(function(t){return t===Wa?e[n++]:t})}}function Ha(t){return t}var Ya={matrix:["NNNNNN",[Wa,Wa,0,0,Wa,Wa,0,0,0,0,1,0,Wa,Wa,0,1],Ha],matrix3d:["NNNNNNNNNNNNNNNN",Ha],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Va([Wa,Wa,new qi(1)]),Ha],scalex:["N",Va([Wa,new qi(1),new qi(1)]),Va([Wa,new qi(1)])],scaley:["N",Va([new qi(1),Wa,new qi(1)]),Va([new qi(1),Wa])],scalez:["N",Va([new qi(1),new qi(1),Wa])],scale3d:["NNN",Ha],skew:["Aa",null,Ha],skewx:["A",null,Va([Wa,na])],skewy:["A",null,Va([na,Wa])],translate:["Tt",Va([Wa,Wa,ea]),Ha],translatex:["T",Va([Wa,ea,ea]),Va([Wa,ea])],translatey:["T",Va([ea,Wa,ea]),Va([ea,Wa])],translatez:["L",Va([ea,ea,Wa])],translate3d:["TTL",Ha]};function qa(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=Ya[a];if(!o)return[];var s=e[2].split(","),c=o[0];if(c.length<s.length)return[];for(var l=[],u=0;u<c.length;u++){var h=s[u],f=c[u],d=void 0;if(void 0===(d=h?{A:function(t){return"0"===t.trim()?na:Oa(t)},N:Ca,T:Ea,L:Ma}[f.toUpperCase()](h):{a:na,n:l[0],t:ea}[f]))return[];l.push(d)}if(r.push({t:a,d:l}),n.lastIndex===t.length)return r}return[]}function Ua(t){switch(t.t){case"rotatex":return i=bs(Sa(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=bs(Sa(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=bs(Sa(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=bs(Sa(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=bs(Sa(t.d[0])),a=bs(Sa(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=bs(Sa(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=bs(Sa(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=Aa(t.d[0],0,null)||0,n=Aa(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Aa(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=Aa(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=Aa(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Aa(t.d[0],0,null)||0,n=Aa(t.d[1],0,null)||0,r=Aa(t.d[2],0,null)||0,1];case"perspective":a=Aa(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 Xa(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 $a(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}(Ms,t))return;if(ft(Es,Ms),Es[3]=0,Es[7]=0,Es[11]=0,Es[15]=1,Math.abs(mt(Es))<1e-8)return;var t=Ms[3],o=Ms[7],s=Ms[11],c=Ms[12],l=Ms[13],u=Ms[14],h=Ms[15];if(0!==t||0!==o||0!==s){if(Os[0]=t,Os[1]=o,Os[2]=s,Os[3]=h,!yt(Es,Es))return;gt(Es,Es),ee(i,Os,Es)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=c,e[1]=l,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,Ms),n[0]=Dt(d[0]),Ht(d[0],d[0]),r[0]=Yt(d[0],d[1]),_s(d[1],d[1],d[0],1,-r[0]),n[1]=Dt(d[1]),Ht(d[1],d[1]),r[0]/=n[1],r[1]=Yt(d[0],d[2]),_s(d[2],d[2],d[0],1,-r[1]),r[2]=Yt(d[1],d[2]),_s(d[2],d[2],d[1],1,-r[2]),n[2]=Dt(d[2]),Ht(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],qt(Ss,d[1],d[2]),Yt(d[0],Ss)<0)for(var f=0;f<3;f++)n[f]*=-1,d[f][0]*=-1,d[f][1]*=-1,d[f][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(Ua).reduce(Xa),e,n,r,i,a),[[e,n,r,a,i]]}var Ka=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 c=0;c<3;c++)a[3][s]+=t[c]*a[c][s];var l=r[0],u=r[1],h=r[2],r=r[3],f=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],h=(f[0][0]=1-2*(u*u+h*h),f[0][1]=2*(l*u-h*r),f[0][2]=2*(l*h+u*r),f[1][0]=2*(l*u+h*r),f[1][1]=1-2*(l*l+h*h),f[1][2]=2*(u*h-l*r),f[2][0]=2*(l*h-u*r),f[2][1]=2*(u*h+l*r),f[2][2]=1-2*(l*l+u*u),a=Za(a,f),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(h[2][1]=n[2],a=Za(a,h)),n[1]&&(h[2][1]=0,h[2][0]=n[0],a=Za(a,h)),n[0]&&(h[2][0]=0,h[1][0]=n[0],a=Za(a,h));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 Za(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 Ja(t){return t.toFixed(6).replace(".000000","")}function Qa(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=$a(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=$a(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=fn(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 Ka(t[0],t[1],t[2],e,t[4]).map(Ja).join(",")}])}function to(t){return t.replace(/[xy]/,"")}function eo(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var no=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function ro(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?ua(n):ua(n,t.unit)})})}(n)}var a=[],o=[],s=[];if(r.length!==i.length)var c=Qa(r,i),a=[c[0]],o=[c[1]],s=[["matrix",[c[2]]]];else for(var l=0;l<r.length;l++){var u=r[l].t,h=i[l].t,f=r[l].d,d=i[l].d,p=Ya[u],g=Ya[h],y=void 0;if(no(u,h)){var m=Qa([r[l]],[i[l]]);a.push(m[0]),o.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===h)y=u;else if(p[2]&&g[2]&&to(u)===to(h))y=to(u),f=p[2](f),d=g[2](d);else{if(!p[1]||!g[1]||eo(u)!==eo(h)){m=Qa(r,i);a=[m[0]],o=[m[1]],s=[["matrix",[m[2]]]];break}y=eo(u),f=p[1](f),d=g[1](d)}for(var v=[],b=[],x=[],w=0;w<f.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,c=Yi(t.unit),l=t.convertTo(c),c=e.convertTo(c);return l&&c?(o=l.value,s=c.value,a=Pi(t.unit)):(qi.isLength(t.unit)||qi.isLength(e.unit))&&(o=Aa(t,i,n),s=Aa(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(f[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&&(c=a,a=o,o=c),[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 io=kn(function(t){var e;return hn(t)?"text-anchor"===t?[ua(0,"px"),ua(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:[Ea(ao(e[0])),Ea(ao(e[1]))]):[ua(t[0]||0,"px"),ua(t[1]||0,"px")]});function ao(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var n=function(){function t(){this.parser=Oa,this.mixer=ja}return t.prototype.calculator=function(t,e,n,r){return Sa(n)},t}(),e=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ii&&(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}(),i=function(){function t(){this.parser=xa,this.mixer=wa}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ii?"none"===n.value?sa:ca:n},t}(),oo=function(){function t(){this.parser=La}return t.prototype.calculator=function(t,e,n){return n instanceof Ii?[]:n},t}();function so(t){t=t.parsedStyle.fontSize;return _(t)?null:t}function co(){this.parser=io}var lo,y,uo=function(){function t(){this.parser=Ea,this.mixer=ja}return t.prototype.calculator=function(t,e,n,r,i){if(!qi.isRelativeUnit(n.unit))return n.value;if(n.unit===g.kPercentage)return 0;if(n.unit===g.kEms){if(r.parentNode){var a=so(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===g.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=so(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),ho=function(){function t(){this.mixer=Fa}var e=t.prototype;return e.parser=function(t){t=_a(dn(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}(),fo=function(){function t(){this.mixer=Fa}var e=t.prototype;return e.parser=function(t){t=_a(dn(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}(),po=function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.postProcessor=function(t){var e,n,r;switch(t.nodeName){case M.CIRCLE:case M.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;_(a)||(c=a),_(i)||(l=i);break;case M.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,c=Math.min(i,o),l=Math.min(s,a),u=0;break;case M.RECT:case M.IMAGE:case M.GROUP:case M.HTML:case M.TEXT:case M.MESH:_(t.parsedStyle.x)||(c=t.parsedStyle.x),_(t.parsedStyle.y)||(l=t.parsedStyle.y)}t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&t.nodeName!==M.POLYGON&&(t.parsedStyle.defX=c||0,t.parsedStyle.defY=l||0),_(c)&&_(l)&&_(u)||(e=(r=t.getLocalPosition())[0],n=r[1],r=r[2],t.setLocalPosition(_(c)?e:c,_(l)?n:l,_(u)?r:u))},e}(uo),go=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof Ii?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),yo=function(){function t(){this.mixer=ja,this.parser=Ca}return t.prototype.calculator=function(t,e,n){return n.value},t}(),mo=function(){function t(){this.parser=Ca,this.mixer=Ra(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)!==M.LINE&&e!==M.PATH&&e!==M.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),vo=function(){function t(){this.parser=Ca,this.mixer=Ra(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),bo=function(){function t(){this.parser=Ba,this.mixer=Ga}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof Ii&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Qr(0,0,0,0)}:n},e.postProcessor=function(t){var e,n;t.nodeName===M.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))},t}(),xo=function(){function t(){this.parser=za}return t.prototype.postProcessor=function(t){var e,n;t.nodeName!==M.POLYGON&&t.nodeName!==M.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))},t}(),wo=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=Ra(0,1/0),t}return s(t,i),t}(uo),ko=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ii?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),a=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}(),Mo=function(){function t(){this.parser=qa,this.mixer=ro}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ii?[]:n},e.postProcessor=function(t){Ts(t.parsedStyle.transform,t)},t}(),Eo=function(){function t(){this.parser=Ca}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}(),Oo=function(){function t(){this.registry={},this.define(M.CIRCLE,Yo),this.define(M.ELLIPSE,Jo),this.define(M.RECT,ps),this.define(M.IMAGE,is),this.define(M.LINE,os),this.define(M.GROUP,ts),this.define(M.PATH,cs),this.define(M.POLYGON,us),this.define(M.POLYLINE,fs),this.define(M.TEXT,ys),this.define(M.HTML,ns)}var e=t.prototype;return e.define=function(t,e){this.registry[t]=e},e.get=function(t){return this.registry[t]},t}(),So=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 Jr,this.page=new Jr,this.canvas=new Jr,this.viewport=new Jr,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(gi)},wi(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}(),_o=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(Oi(n),e),n}return s(t,r),t}(So),Ao=function(){function t(){this.emitter=new Dr}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=yn(n)&&n||an(n)&&n.capture,n=an(n)&&n.once,s=ri(e)?void 0:e,c=!1,l="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],l=i,c=!0),t=o?t+"capture":t,e=ri(e)?e:e.handleEvent,c&&(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)===l&&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=yn(n)&&n||an(n)&&n.capture,i=ri(e)?void 0:e;return e=ri(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 _o(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!(t instanceof So))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}(),To=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}s(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(gi)},t.lookupNamespaceURI=function(t){throw new Error(gi)},t.lookupPrefix=function(t){throw new Error(gi)},t.normalize=function(){throw new Error(gi)},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 c=o.length-s.length,l=s.length-1;0<=l;l--){var u,h=s[l],f=o[c+l];if(f!==h)return(u=h.parentNode.childNodes).indexOf(h)<u.indexOf(f)?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)})},wi(d,[{key:"textContent",get:function(){var t="";this.nodeName===M.TEXT&&(t+=this.style.text);for(var e=_i(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===M.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===M.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}(Ao),Po=(To.DOCUMENT_POSITION_DISCONNECTED=1,To.DOCUMENT_POSITION_PRECEDING=2,To.DOCUMENT_POSITION_FOLLOWING=4,To.DOCUMENT_POSITION_CONTAINS=8,To.DOCUMENT_POSITION_CONTAINED_BY=16,To.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,function(e){function t(){var t=e.call(this)||this;t.defaultView=null,t.documentElement=void 0,t.timeline=void 0,t.ownerDocument=null,t.nodeName="document";try{t.timeline=new w.AnimationTimeline(Oi(t))}catch(t){}var r={};return Dc.forEach(function(t){var e=t.n,n=t.inh,t=t.d;n&&t&&(r[e]=ri(t)?t(M.GROUP):t)}),t.documentElement=new ts({id:"g-root",style:r}),t.documentElement.ownerDocument=Oi(t),t.documentElement.parentNode=Oi(t),t.childNodes=[t.documentElement],t}s(t,e);var n=t.prototype;return n.createElement=function(t,e){var n;return"svg"===t?this.documentElement:((n=this.defaultView.customElements.get(t))||(console.warn("Unsupported tagName: ",t),n="tspan"===t?ys:ts),(t=new n(e)).ownerDocument=this,t)},n.createElementNS=function(t,e,n){return this.createElement(e,n)},n.cloneNode=function(t){throw new Error(gi)},n.destroy=function(){try{this.documentElement.destroy(),this.timeline.destroy()}catch(t){}},n.elementsFromBBox=function(t,e,n,r){var t=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),i=[];return t.forEach(function(t){var t=t.id,t=w.displayObjectPool.getByEntity(t),e=t.parsedStyle.pointerEvents,e=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e);e&&!t.isVisible()||t.isCulled()||!t.isInteractive()||i.push(t)}),i.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),i},n.elementFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,n=n.y,i=this.defaultView.getConfig(),a=i.width,i=i.height;return r<0||n<0||a<r||i<n?null:(i=(a=this.defaultView.viewport2Client({x:r,y:n})).x,a=a.y,(t=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:n,clientX:i,clientY:a},picked:[]}).picked)&&t[0]||this.documentElement)},n.elementFromPoint=function(){var n=bi(E().mark(function t(e,n){var r,i,a,o,s,c;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,o=this.defaultView.getConfig(),a=o.width,o=o.height,r<0||i<0||a<r||o<i)return t.abrupt("return",null);t.next=4;break;case 4:return a=this.defaultView.viewport2Client({x:r,y:i}),o=a.x,s=a.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:o,clientY:s},picked:[]});case 7:return s=t.sent,c=s.picked,t.abrupt("return",c&&c[0]||this.documentElement);case 10:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.elementsFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,n=n.y,i=this.defaultView.getConfig(),a=i.width,i=i.height;return r<0||n<0||a<r||i<n?[]:(i=(a=this.defaultView.viewport2Client({x:r,y:n})).x,a=a.y,(t=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:n,clientX:i,clientY:a},picked:[]}).picked)[t.length-1]!==this.documentElement&&t.push(this.documentElement),t)},n.elementsFromPoint=function(){var n=bi(E().mark(function t(e,n){var r,i,a,o,s,c;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,o=this.defaultView.getConfig(),a=o.width,o=o.height,r<0||i<0||a<r||o<i)return t.abrupt("return",[]);t.next=4;break;case 4:return a=this.defaultView.viewport2Client({x:r,y:i}),o=a.x,s=a.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:o,clientY:s},picked:[]});case 7:return s=t.sent,(c=s.picked)[c.length-1]!==this.documentElement&&c.push(this.documentElement),t.abrupt("return",c);case 11:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.appendChild=function(t,e){throw new Error(yi)},n.insertBefore=function(t,e){throw new Error(yi)},n.removeChild=function(t,e){throw new Error(yi)},n.replaceChild=function(t,e,n){throw new Error(yi)},n.append=function(){throw new Error(yi)},n.prepend=function(){throw new Error(yi)},n.getElementById=function(t){return this.documentElement.getElementById(t)},n.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},n.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},n.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},n.querySelector=function(t){return this.documentElement.querySelector(t)},n.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},n.find=function(t){return this.documentElement.find(t)},n.findAll=function(t){return this.documentElement.findAll(t)},wi(t,[{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}}]),t}(To)),Lo=(lo=lo||{},lo[lo.Standard=0]="Standard",(Ko=y=y||{}).DESTROY="destroy",Ko.ATTR_MODIFIED="DOMAttrModified",Ko.INSERTED="DOMNodeInserted",Ko.REMOVED="removed",Ko.MOUNTED="DOMNodeInsertedIntoDocument",Ko.UNMOUNTED="DOMNodeRemovedFromDocument",Ko.BOUNDS_CHANGED="bounds-changed",Ko.RENDER_ORDER_CHANGED="render-order-changed",Ko.CULLED="culled",function(l){function t(t,e,n,r,i,a,o,s){var c=l.call(this,null)||this;return c.relatedNode=void 0,c.prevValue=void 0,c.newValue=void 0,c.attrName=void 0,c.attrChange=void 0,c.prevParsedValue=void 0,c.newParsedValue=void 0,c.relatedNode=e,c.prevValue=n,c.newValue=r,c.attrName=i,c.attrChange=a,c.prevParsedValue=o,c.newParsedValue=s,c.type=t,c}return s(t,l),t}(So)),No=(Lo.ADDITION=2,Lo.MODIFICATION=1,Lo.REMOVAL=3,0),Co=new Lo(y.INSERTED,null,"","","",0,"",""),jo=new Lo(y.REMOVED,null,"","","",0,"",""),Ro=new _o(y.DESTROY),Fo=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=No++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:lo.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:k(0,0,0),localRotation:se(0,0,0,1),localScale:k(1,1,1),localTransform:ut(),localSkew:he(0,0),position:k(0,0,0),rotation:se(0,0,0,1),scaling:k(1,1,1),worldTransform:ut(),origin:k(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:aa,opacity:aa,fillOpacity:aa,strokeOpacity:aa,fill:aa,stroke:aa,transform:aa,transformOrigin:aa,visibility:aa,pointerEvents:aa,lineWidth:aa,lineCap:aa,lineJoin:aa,increasedLineWidthForHitTesting:aa,fontSize:aa,fontFamily:aa,fontStyle:aa,fontWeight:aa,fontVariant:aa,textAlign:aa,textBaseline:aa,textTransform:aa,zIndex:aa,filter:aa,shadowType:aa},t.parsedStyle={},t.attributes={},t}s(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(gi)},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),Co.relatedNode=this,t.dispatchEvent(Co),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 jo.relatedNode=this,t.dispatchEvent(jo),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(Ro),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=ai(t),e=this.attributes[t],_(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(gi)},e.getAttributeNode=function(t){throw new Error(gi)},e.getAttributeNodeNS=function(t,e){throw new Error(gi)},e.hasAttributeNS=function(t,e){throw new Error(gi)},e.removeAttributeNS=function(t,e){throw new Error(gi)},e.removeAttributeNode=function(t){throw new Error(gi)},e.setAttributeNS=function(t,e,n){throw new Error(gi)},e.setAttributeNode=function(t){throw new Error(gi)},e.setAttributeNodeNS=function(t){throw new Error(gi)},e.toggleAttribute=function(t,e){throw new Error(gi)},wi(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}(To),Io=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).altKey=void 0,t.button=void 0,t.buttons=void 0,t.ctrlKey=void 0,t.metaKey=void 0,t.relatedTarget=void 0,t.shiftKey=void 0,t.client=new Jr,t.movement=new Jr,t.offset=new Jr,t.global=new Jr,t.screen=new Jr,t}s(t,i);var e=t.prototype;return e.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.initMouseEvent=function(){throw new Error(gi)},wi(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}}]),t}(So),Do=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).pointerId=void 0,t.width=0,t.height=0,t.isPrimary=!1,t.pointerType=void 0,t.pressure=void 0,t.tangentialPressure=void 0,t.tiltX=void 0,t.tiltY=void 0,t.twist=void 0,t}s(t,i);var e=t.prototype;return e.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e.clone=function(){return this.manager.clonePointerEvent(this)},t}(Io),Bo=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).deltaMode=void 0,t.deltaX=void 0,t.deltaY=void 0,t.deltaZ=void 0,t.DOM_DELTA_LINE=0,t.DOM_DELTA_PAGE=1,t.DOM_DELTA_PIXEL=2,t}return s(t,i),t.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},t}(Io),Go=new Lo(y.ATTR_MODIFIED,null,null,null,null,Lo.MODIFICATION,null,null),zo={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:""},Wo={anchor:[0,0],fill:sa,stroke:sa,transform:[],zIndex:0,filter:[],shadowType:"outer"},Vo=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],N=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||M.GROUP,r.config.style=ki({},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,Wo,r.config.initialParsedStyle),Object.assign(r.attributes,zo),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,Oi(r)),r}s(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=ki({},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:Vo}),e.dirty=!0},t.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=ai(t);mn(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&&(Go.relatedNode=this,Go.prevValue=i,Go.newValue=e,Go.attrName=t,Go.prevParsedValue=a,Go.newParsedValue=o,this.isMutationObserved?this.dispatchEvent(Go):(Go.target=this).ownerDocument.defaultView.dispatchEvent(Go,!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 Qr(n,e,r-n,t-e)},t.setOrigin=function(t,e,n){return w.sceneGraphService.setOrigin(this,vs(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,vs(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,vs(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,vs(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,vs(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=vs(t,e=e||t,n=n||t)),w.sceneGraphService.scaleLocal(this,t),this},t.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=vs(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 xs(ws(m(),w.sceneGraphService.getWorldTransform(this))[2])},t.getLocalEulerAngles=function(){return xs(ws(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 _(e)&&_(n)?w.sceneGraphService.rotateLocal(this,0,0,t):w.sceneGraphService.rotateLocal(this,t,e,n),this},t.rotate=function(t,e,n){return _(e)&&_(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?an(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=St(m(),t),n=e[0],e=e[1],r=_t(m(),t),i=r[0],r=r[1],t=At(ne(),t),t=ws(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,c=0,e=-e*a,a=i*r,i=0,r=t,t=n,n=1,l=new st(9);return l[0]=o,l[1]=s,l[2]=c,l[3]=e,l[4]=a,l[5]=i,l[6]=r,l[7]=t,l[8]=n,l},t.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},t.setMatrix=function(t){var t=ks(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=ks(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},wi(o,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),o}(Fo),Ho=["style"],Yo=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,Ho);return n.call(this,ki({type:M.CIRCLE,style:ki({cx:"",cy:"",r:""},e),initialParsedStyle:{anchor:[.5,.5]}},t))||this}return s(t,n),t}(N),qo=["style"],Uo=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,qo),e=n.call(this,ki({style:ki({x:"",y:""},e)},t))||this;return e.isCustomElement=!0,e}return s(t,n),t}(N),Xo={},$o=[],Ko=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return Xo[t]},e.getAll=function(){return Object.keys(Xo).map(function(t){return Xo[t]})},e.add=function(t,e){(Xo[t]=e).nodeName===M.HTML&&$o.push(e)},e.remove=function(t){var e=Xo[t];e&&(delete Xo[t],e.nodeName===M.HTML)&&(t=$o.indexOf(e),$o.splice(t,1))},e.getHTMLs=function(){return $o},t}(),Zo=["style"],Jo=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,Zo);return n.call(this,ki({type:M.ELLIPSE,style:ki({cx:"",cy:"",rx:"",ry:""},e),initialParsedStyle:{anchor:[.5,.5]}},t))||this}return s(t,n),t}(N),Qo=["style"],ts=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,Qo);return n.call(this,ki({type:M.GROUP,style:ki({x:"",y:"",width:"",height:""},e)},t))||this}return s(t,n),t}(N),es=["style"],ns=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,es),e=n.call(this,ki({type:M.HTML,style:ki({x:"",y:"",width:"auto",height:"auto",innerHTML:""},e)},t))||this;return e.cullable.enable=!1,e}s(t,n);var e=t.prototype;return e.getDomElement=function(){return this.parsedStyle.$el},e.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null==(r=this.ownerDocument)||null==(r=r.defaultView)?void 0:r.getContextService().getBoundingClientRect();return r?(t=n.left-r.left,r=n.top-r.top,(e=new $r).setMinMax(k(t,r,0),k(t+n.width,r+n.height,0)),e):null},e.getLocalBounds=function(){if(this.parentNode){var t,e=yt(ut(),this.parentNode.getWorldTransform()),n=this.getBounds();if(!$r.isEmpty(n))return(t=new $r).setFromTransformedAABB(n,e),t}return this.getBounds()},t}(N),rs=["style"],is=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,rs);return n.call(this,ki({type:M.IMAGE,style:ki({x:"",y:"",img:"",width:"",height:""},e)},t))||this}return s(t,n),t}(N),as=["style"],os=function(r){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,as),e=r.call(this,ki({type:M.LINE,style:ki({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,isBillboard:!1},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.parsedStyle),n=t.markerStart,t=t.markerEnd;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&(e.markerEndAngle=t.getLocalEulerAngles(),e.appendChild(t)),e.transformMarker(!0),e.transformMarker(!1),e}s(t,r);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i)&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))},e.transformMarker=function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,c=o.markerEnd,l=o.markerStartOffset,u=o.markerEndOffset,h=o.x1,f=o.x2,d=o.y1,p=o.y2,g=o.defX,o=o.defY,s=t?s:c;s&&s instanceof N&&(c=0,t=t?(r=h-g,i=d-o,e=f-h,n=p-d,a=l||0,this.markerStartAngle):(r=f-g,i=p-o,e=h-f,n=d-p,a=u||0,this.markerEndAngle),c=Math.atan2(n,e),s.setLocalEulerAngles(180*c/Math.PI+t),s.setLocalPosition(r+Math.cos(c)*a,i+Math.sin(c)*a))},e.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.x1,i=n.y1,a=n.x2,o=n.y2,s=n.defX,n=n.defY,r=cr.pointAt(r,i,a,o,t),i=r.x,a=r.y,o=Xt(m(),k(i-s,a-n,0),e?this.getWorldTransform():this.getLocalTransform());return new Jr(o[0],o[1])},e.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.getTotalLength=function(){var t=this.parsedStyle,e=t.x1,n=t.y1,r=t.x2,t=t.y2;return cr.length(e,n,r,t)},t}(N),ss=["style"],cs=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,ss),e=i.call(this,ki({type:M.PATH,style:ki({path:"",miterLimit:""},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&e.placeMarkerMid(t),r&&r instanceof N&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}s(t,i);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,c=o.markerEnd,l=o.markerStartOffset,u=o.markerEndOffset,h=o.defX,o=o.defY,s=t?s:c;s&&s instanceof N&&(c=0,h=t?(i=(t=this.getStartTangent())[0],e=(t=t[1])[0]-h,n=t[1]-o,r=i[0]-t[0],i=i[1]-t[1],a=l||0,this.markerStartAngle):(l=(t=this.getEndTangent())[0],e=(t=t[1])[0]-h,n=t[1]-o,r=l[0]-t[0],i=l[1]-t[1],a=u||0,this.markerEndAngle),c=Math.atan2(i,r),s.setLocalEulerAngles(180*c/Math.PI+h),s.setLocalPosition(e+Math.cos(c)*a,n+Math.sin(c)*a))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&t instanceof N)for(var a=1;a<n.length-1;a++){var o=n[a].currentPoint,s=o[0],o=o[1],c=1===a?t:t.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(s-r,o-i)}},e.getTotalLength=function(){return Qs(this)},e.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,n=Ke(n.path.absolutePath,t,v(v({},a),{bbox:!1,length:!0})).point,t=n.x,a=n.y,n=Xt(m(),k(t-r,a-i,0),e?this.getWorldTransform():this.getLocalTransform());return new Jr(n[0],n[1])},e.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*Qs(this),e)},e.getStartTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=[];return 1<n.length&&(t=n[0].currentPoint,e=n[1].currentPoint,r=[],(n=n[1].startTangent)?r.push([t[0]-n[0],t[1]-n[1]]):r.push([e[0],e[1]]),r.push([t[0],t[1]])),r},e.getEndTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=n.length,i=[];return 1<r&&(t=n[r-2].currentPoint,e=n[r-1].currentPoint,i=[],(n=n[r-1].endTangent)?i.push([e[0]-n[0],e[1]-n[1]]):i.push([t[0],t[1]]),i.push([e[0],e[1]])),i},t}(N),ls=["style"],us=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,ls),e=i.call(this,ki({type:M.POLYGON,style:ki({points:"",miterLimit:"",isClosed:!0},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&e.placeMarkerMid(t),r&&r instanceof N&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}s(t,i);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,c=o.markerEnd,l=o.markerStartOffset,u=o.markerEndOffset,h=o.points.points,f=o.defX,o=o.defY,s=t?s:c;s&&s instanceof N&&(i=h[c=0][0]-f,a=h[0][1]-o,l=t?(e=h[1][0]-h[0][0],n=h[1][1]-h[0][1],r=l||0,this.markerStartAngle):(t=h.length,n=this.style.isClosed?(e=h[t-1][0]-h[0][0],h[t-1][1]-h[0][1]):(i=h[t-1][0]-f,a=h[t-1][1]-o,e=h[t-2][0]-h[t-1][0],h[t-2][1]-h[t-1][1]),r=u||0,this.markerEndAngle),c=Math.atan2(n,e),s.setLocalEulerAngles(180*c/Math.PI+l),s.setLocalPosition(i+Math.cos(c)*r,a+Math.sin(c)*r))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&t instanceof N)for(var a=1;a<(this.style.isClosed?n.length:n.length-1);a++){var o=n[a][0]-r,s=n[a][1]-i,c=1===a?t:t.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(o,s)}},t}(N),hs=["style"],fs=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,hs);return n.call(this,ki({type:M.POLYLINE,style:ki({points:"",miterLimit:"",isClosed:!1},e)},t))||this}s(t,n);var e=t.prototype;return e.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.getPoint=function(n,t){void 0===t&&(t=!1);var e=this.parsedStyle,r=e.defX,i=e.defY,e=e.points,a=e.points,e=e.segments,o=0,s=0,e=(e.forEach(function(t,e){n>=t[0]&&n<=t[1]&&(o=(n-t[0])/(t[1]-t[0]),s=e)}),cr.pointAt(a[s][0],a[s][1],a[s+1][0],a[s+1][1],o)),a=e.x,e=e.y,a=Xt(m(),k(a-r,e-i,0),t?this.getWorldTransform():this.getLocalTransform());return new Jr(a[0],a[1])},e.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},t}(us),ds=["style"],ps=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,ds);return n.call(this,ki({type:M.RECT,style:ki({x:"",y:"",width:"",height:"",radius:""},e)},t))||this}return s(t,n),t}(N),gs=["style"],ys=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,gs);return n.call(this,ki({type:M.TEXT,style:ki({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},e)},t))||this}s(t,n);var e=t.prototype;return e.getComputedTextLength=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0},e.getLineBoundingRects=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]},e.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},t}(N);function ms(t){return void 0===t?0:360<t||t<-360?t%360:t}function vs(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dn(t)?k(t,e,n):Array.isArray(t)&&3===t.length?It(t):k(t[0],t[1]||e,t[2]||n)}function bs(t){return t*(Math.PI/180)}function xs(t){return t*(180/Math.PI)}function ws(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(l=_t(m(),r))[0],c=l[1],l=l[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/c,r[10]/l),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/c,r[5]/c)):(a=0,i=Math.atan2(r[4]/c,r[5]/c)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(l=e)[0],r=l[1],c=l[2],l=l[3],.499995*(n=s*s+(i=r*r)+(u=c*c)+(a=l*l))<(t=s*l-r*c)?(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*c-l*r)),o[1]=Math.atan2(2*(s*l+r*c),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+c*l),1-2*(i+u))),o);var n,r,i,a,o,s,c,l,u}function ks(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=xs(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var Ms=ut(),Es=ut(),Os=te(),d=[m(),m(),m()],Ss=m();function _s(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 As=ut();function Ts(t,c){var l,u;return t&&t.length&&(u=l=0,c?(l=c.parsedStyle.defX||0,u=c.parsedStyle.defY||0,c.resetLocalTransform(),c.setLocalPosition(l,u)):c=new N({}),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],c.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],c.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],c.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],c.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],c.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[ea,ea],c.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[ea],c.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[ea],c.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[ea],c.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[ea,ea,ea],c.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[na],c.rotateLocal(0,0,o[0].value)):"rotatex"===s?(o=t||[na],c.rotateLocal(o[0].value,0,0)):"rotatey"===s?(o=t||[na],c.rotateLocal(0,o[0].value,0)):"rotatez"===s?(o=t||[na],c.rotateLocal(0,0,o[0].value)):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],c.setLocalSkew(bs(o[0]),bs(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],c.setLocalSkew(bs(o[0]),c.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],c.setLocalSkew(c.getLocalSkew()[0],bs(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],c.setLocalTransform(dt(As,e,n,0,0,r,i,0,0,0,0,1,0,a+l,o+u,0,1))):"matrix3d"===s&&(dt.apply(Ft,[As].concat(t.map(function(t){return t.value}))),As[12]+=l,As[13]+=u,c.setLocalTransform(As)))})),c.getLocalTransform()}Ps={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]+\.?))/},Ls="";var Ps,Ls,Ns=function(t){return Ls=t,js()};function Cs(t){throw new Error(Ls+": "+t)}function js(){var t=Hs(Rs);return 0<Ls.length&&Cs("Invalid input not EOF"),t}function Rs(){return Fs("linear-gradient",Ps.linearGradient,Ds)||Fs("repeating-linear-gradient",Ps.repeatingLinearGradient,Ds)||Fs("radial-gradient",Ps.radialGradient,Bs)||Fs("repeating-radial-gradient",Ps.repeatingRadialGradient,Bs)||Fs("conic-gradient",Ps.conicGradient,Bs)}function Fs(n,t,r){return Is(t,function(t){var e=r();return e&&!Zs(Ps.comma)&&Cs("Missing comma before color stops"),{type:n,orientation:e,colorStops:Hs(Ys)}})}function Is(t,e){t=Zs(t);if(t)return Zs(Ps.startCall)||Cs("Missing ("),e=e(t),Zs(Ps.endCall)||Cs("Missing )"),e}function Ds(){return Ks("directional",Ps.sideOrCorner,1)||Ks("angular",Ps.angleValue,1)}function Bs(){var t,e,n=Gs();return n&&((t=[]).push(n),e=Ls,Zs(Ps.comma))&&((n=Gs())?t.push(n):Ls=e),t}function Gs(){var t,e=function(){var t=Ks("shape",/^(circle)/i,0);t&&(t.style=$s()||zs());return t}()||function(){var t=Ks("shape",/^(ellipse)/i,0);t&&(t.style=Us()||zs());return t}();return e?e.at=Ws():(t=zs())?(e=t,(t=Ws())&&(e.at=t)):(t=Vs())&&(e={type:"default-radial",at:t}),e}function zs(){return Ks("extent-keyword",Ps.extentKeywords,1)}function Ws(){var t;if(Ks("position",/^at/,0))return(t=Vs())||Cs("Missing positioning value"),t}function Vs(){var t={x:Us(),y:Us()};if(t.x||t.y)return{type:"position",value:t}}function Hs(t){var e=t(),n=[];if(e)for(n.push(e);Zs(Ps.comma);)(e=t())?n.push(e):Cs("One extra comma");return n}function Ys(){var t=Ks("hex",Ps.hexColor,1)||Is(Ps.rgbaColor,function(){return{type:"rgba",value:Hs(qs)}})||Is(Ps.rgbColor,function(){return{type:"rgb",value:Hs(qs)}})||Ks("literal",Ps.literalColor,0);return t||Cs("Expected color definition"),t.length=Us(),t}function qs(){return Zs(Ps.number)[1]}function Us(){return Ks("%",Ps.percentageValue,1)||Xs()||$s()}function Xs(){return Ks("position-keyword",Ps.positionKeywords,1)}function $s(){return Ks("px",Ps.pixelValue,1)||Ks("em",Ps.emValue,1)}function Ks(t,e,n){e=Zs(e);if(e)return{type:t,value:e[n]}}function Zs(t){var e=/^[\n\r\t\s]+/.exec(Ls),e=(e&&Js(e[0].length),t.exec(Ls));return e&&Js(e[0].length),e}function Js(t){Ls=Ls.substring(t)}function Qs(t){var e;return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=Ke(t.parsedStyle.path.absolutePath,void 0,v(v({},e),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function tc(t,e){return t[0]===e[0]&&t[1]===e[1]}function ec(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 nc(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function rc(t,e,n,r,i,a,o,s){var c,l,u;return e=Math.abs(e),n=Math.abs(n),r=bs(r=pn(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,l=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*l,y:-Math.sin(r)*u+Math.cos(r)*l},1<(l=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(l)*e,n=Math.sqrt(l)*n),l=(l=(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:l,i=(i!==a?1:-1)*Math.sqrt(l),l=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*l-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*l+Math.cos(r)*i+(t.y+o.y)/2},c=ic({x:1,y:0},o={x:(u.x-l)/e,y:(u.y-i)/n}),o=ic(o,{x:(-u.x-l)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),l=c+(o%=2*Math.PI)*s,u=e*Math.cos(l),i=n*Math.sin(l),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:c,ellipticalArcEndAngle:c+o,ellipticalArcAngle:l,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var ic=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 ac(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,c=rc({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=rc({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-c.x,o=i.y-c.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function oc(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function sc(t,e){return oc(t)*oc(e)?(t[0]*e[0]+t[1]*e[1])/(oc(t)*oc(e)):1}function cc(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(sc(t,e))}function lc(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,a=t*i,i=e*i,o=n-t,t=n+t,s=r-e,e=r+e;return[["M",o,r],["C",o,r-i,n-a,s,n,s],["C",n+a,s,t,r-i,t,r],["C",t,r+i,n+a,e,n,e],["C",n-a,e,o,r+i,o,r],["Z"]]}function uc(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,a,o,s,c,l,u,h,f,d=[];switch(t.nodeName){case M.LINE:var p=t.parsedStyle,d=[["M",p.x1,p.y1],["L",p.x2,p.y2]];break;case M.CIRCLE:var p=t.parsedStyle,g=p.r;d=lc(g,g,p.cx,p.cy);break;case M.ELLIPSE:var g=t.parsedStyle;d=lc(g.rx,g.ry,g.cx,g.cy);break;case M.POLYLINE:case M.POLYGON:p=t.parsedStyle.points;g=p.points,p=t.nodeName===M.POLYGON,g=g.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),p&&g.push(["Z"]),d=g;break;case M.RECT:var y=t.parsedStyle,m=y.width,v=y.height,b=y.x,x=y.y,y=y.radius,w=y&&y.some(function(t){return 0!==t});n=m,r=v,b=b,x=x,d=(w=w&&y.map(function(t){return fn(t,0,Math.min(Math.abs(m)/2,Math.abs(v)/2))}))?(s=(y=0<n?1:-1)+(o=0<r?1:-1)!=0?1:0,[["M",y*(i=w[0])+b,x],["L",n-y*(a=w[1])+b,x],a?["A",a,a,0,0,s,n+b,o*a+x]:null,["L",n+b,r-o*(a=w[2])+x],a?["A",a,a,0,0,s,n+b-y*a,r+x]:null,["L",b+y*(a=w[3]),r+x],a?["A",a,a,0,0,s,b,r+x-o*a]:null,["L",b,o*i+x],i?["A",i,i,0,0,s,y*i+b,x]:null,["Z"]].filter(function(t){return t})):[["M",b,x],["L",b+n,x],["L",b+n,x+r],["L",b,x+r],["Z"]];break;case M.PATH:w=t.parsedStyle.path.absolutePath;d=[].concat(w)}if(d.length)return c=d,l=e,u=(e=(e=t).parsedStyle).defX,h=void 0===u?0:u,f=void 0===(u=e.defY)?0:u,c.reduce(function(t,e){var n,r,i,a="";return"M"===e[0]||"L"===e[0]?(n=k(e[1]-h,e[2]-f,0),l&&Xt(n,n,l),a=""+e[0]+n[0]+","+n[1]):"Z"===e[0]?a=e[0]:"C"===e[0]?(n=k(e[1]-h,e[2]-f,0),r=k(e[3]-h,e[4]-f,0),i=k(e[5]-h,e[6]-f,0),l&&(Xt(n,n,l),Xt(r,r,l),Xt(i,i,l)),a=""+e[0]+n[0]+","+n[1]+","+r[0]+","+r[1]+","+i[0]+","+i[1]):"A"===e[0]?(n=k(e[6]-h,e[7]-f,0),l&&Xt(n,n,l),a=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+n[0]+","+n[1]):"Q"===e[0]&&(r=k(e[1]-h,e[2]-f,0),i=k(e[3]-h,e[4]-f,0),l&&(Xt(r,r,l),Xt(i,i,l)),a=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+"}"),t+a},"")}function hc(t,e,n){var r=!1,i=!1,e=!!e&&!e.isNone,n=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=e,i=n):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:"visible"!==t&&"all"!==t||(i=r=!0),[r,i]}function fc(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)}function dc(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)}function pc(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)}function gc(t){return Oc.setup(this,t),Oc.create(t)}function yc(t){return _c.setup(this,t),_c.create(t)}function mc(){throw new Error("tapAsync is not supported on a SyncHook")}function vc(){throw new Error("tapPromise is not supported on a SyncHook")}function bc(t){return Tc.setup(this,t),Tc.create(t)}function xc(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")}function wc(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")}function kc(t){return Lc.setup(this,t),Lc.create(t)}var Mc=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=void 0),this.name=void 0,this.taps=void 0,this.promise=void 0,this._promise=void 0,this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=fc,this.call=fc,this._callAsync=dc,this.callAsync=dc,this._promise=pc,this.promise=pc,this._x=void 0}var e=t.prototype;return e.compile=function(t){throw new Error("Abstract: should be overridden")},e._createCall=function(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})},e._tap=function(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)},e.tap=function(t,e){this._tap("sync",t,e)},e.tapAsync=function(t,e){this._tap("async",t,e)},e.tapPromise=function(t,e){this._tap("promise",t,e)},e._runRegisterInterceptors=function(t){for(var e=_i(this.interceptors);!(n=e()).done;){var n=n.value;n.register&&void 0!==(n=n.register(t))&&(t=n)}return t},e.withOptions=function(e){function n(t){return Object.assign({},e,"string"==typeof t?{name:t}:t)}var r=this;return{name:this.name,tap:function(t,e){return r.tap(n(t),e)},tapAsync:function(t,e){return r.tapAsync(n(t),e)},tapPromise:function(t,e){return r.tapPromise(n(t),e)},isUsed:function(){return r.isUsed()},withOptions:function(t){return r.withOptions(n(t))}}},e.isUsed=function(){return 0<this.taps.length||0<this.interceptors.length},e._resetCompilation=function(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise},e._insert=function(t){this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));for(var e,n=0,r=("number"==typeof t.stage&&(n=t.stage),this.taps.length);0<r;){r--;var i=this.taps[r],a=(this.taps[r+1]=i).stage||0;if(e){if(e.has(i.name)){e.delete(i.name);continue}if(0<e.size)continue}if(!(n<a)){r++;break}}this.taps[r]=t},t}(),Ec=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=_i(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,c=0;c<this.options.interceptors.length;c++){var l=this.options.interceptors[c];l.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(c)+".tap("+(l.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 h=(h=(h="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(h+=r("_result"+t)),i&&(h+=i()),o+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:h=h+"}\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,c=t.onDone,n=t.doneReturns,l=t.rethrowIfPossible;if(0===this.options.taps.length)return c();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),h=e||n,f="",d=c,p=0,r=function(t){function e(t){return t?"":c()}var n=t,r=(d!==c&&("sync"!==a.options.taps[n].type||20<p++)&&(p=0,f=(f+="function _next"+n+"() {\n")+d()+"}\n",d=function(){return(h?"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:l&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return f+=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,c=t.rethrowIfPossible,t=t.onTap,l=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:c});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")+l(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:c})},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}(),Oc=new(function(t){function e(){return t.apply(this,arguments)||this}return s(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}(Ec)),Sc=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).compile=gc,t._call=void 0,t.call=void 0,t}return s(t,n),t}(Mc),_c=new(function(t){function e(){return t.apply(this,arguments)||this}return s(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}(Ec)),Ac=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).compile=yc,t._call=void 0,t.call=void 0,t}return s(t,n),t}(Mc),Tc=new(function(t){function e(){return t.apply(this,arguments)||this}return s(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}(Ec)),Pc=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).tapAsync=mc,t.tapPromise=vc,t.compile=bc,t}return s(t,n),t}(Mc),Lc=new(function(t){function e(){return t.apply(this,arguments)||this}return s(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}(Ec)),Nc=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).tapAsync=xc,t.tapPromise=wc,t.compile=kc,t}return s(t,n),t}(Pc),Cc=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],jc=/([\"\'])[^\'\"]+\1/;var Rc,Fc,Ic,Dc=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:r.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:r.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:r.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:r.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:r.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:r.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:r.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:r.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:r.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:r.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:r.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:r.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:r.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:r.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:r.FILTER},{n:"clipPath",syntax:r.DEFINED_PATH},{n:"textPath",syntax:r.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:r.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"center":t===M.TEXT?"text-anchor":"left top"},l:!0,syntax:r.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:r.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:r.COORDINATE},{n:"cy",int:!0,d:"0",syntax:r.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:r.COORDINATE},{n:"y",int:!0,d:"0",syntax:r.COORDINATE},{n:"z",int:!0,d:"0",syntax:r.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:r.COORDINATE},{n:"y1",int:!0,l:!0,syntax:r.COORDINATE},{n:"z1",int:!0,l:!0,syntax:r.COORDINATE},{n:"x2",int:!0,l:!0,syntax:r.COORDINATE},{n:"y2",int:!0,l:!0,syntax:r.COORDINATE},{n:"z2",int:!0,l:!0,syntax:r.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:r.PATH,p:50},{n:"points",l:!0,syntax:r.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:r.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:r.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:r.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:r.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:r.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:r.NUMBER,d:function(t){return t===M.PATH||t===M.POLYGON||t===M.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:r.MARKER},{n:"markerEnd",syntax:r.MARKER},{n:"markerMid",syntax:r.MARKER},{n:"markerStartOffset",syntax:r.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:r.LENGTH,l:!0,int:!0,d:"0"}],Bc={},Gc=new WeakMap,zc={},Wc=kn(function(t){return t.sort(function(t,e){return zc[t]-zc[e]})}),Vc=m(),Hc=m(),Yc=m(),Mc=function(){function t(){var e=this;Dc.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){Bc[t]=e,zc[t]=e.p||0})},e.unregisterMetadata=function(t){delete Bc[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=ai(t);a||(n.attributes[e]=r[t]),!s&&null!=(t=Bc[e])&&t.l&&(s=!0)}),e||o.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),(o=Wc(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=Bc[t],i=e;return"unset"===(e=""!==e&&!_(e)?e:"unset")||"initial"===e||"inherit"===e?i=Ki(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=Ki(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=Bc[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof Ii){var c=e.value;if("initial"===(c="unset"===c?s&&!i?"inherit":"initial":c))_(r)||(e=this.parseProperty(t,ri(r)?r(n.nodeName):r,n));else if("inherit"===c)return s=this.tryToResolveProperty(n,t,{inherited:!0}),_(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 Ii?e.value:e}return a},e.postProcessProperty=function(t,e){var t=Bc[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e)},e.addUnresolveProperty=function(t,e){var n=Gc.get(t);n||(Gc.set(t,[]),n=Gc.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=Gc.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=Gc.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),Gc.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,c,l,u,h,f,d,p,g,y,m,v=w.geometryUpdaterFactory[t.nodeName];v&&((s=t.geometry).contentBounds||(s.contentBounds=new $r),s.renderBounds||(s.renderBounds=new $r),e=t.parsedStyle,d=(v=v.update(e,t)).width,f=v.height,p=void 0===(p=v.depth)?0:p,h=void 0===(h=v.offsetX)?0:h,m=void 0===(m=v.offsetY)?0:m,v=void 0===(v=v.offsetZ)?0:v,n=d<0,r=f<0,p=Gt(Vc,Math.abs(d)/2,Math.abs(f)/2,p/2),c=e.stroke,l=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===M.TEXT&&delete e.anchor,d=Gt(Hc,(1-2*(o&&o[0]||0))*d/2+h,(1-2*(o&&o[1]||0))*f/2+m,(1-2*(o&&o[2]||0))*p[2]+v),s.contentBounds.update(d,p),h=t.nodeName===M.POLYLINE||t.nodeName===M.POLYGON||t.nodeName===M.PATH?Math.SQRT2:.5,c&&!c.isNone&&zt(p,p,Gt(Yc,f=((l||0)+(u||0))*h,f,0)),s.renderBounds.update(d,p),g&&y&&"inner"!==y&&(v=(m=s.renderBounds).min,c=m.max,l=e.shadowBlur||0,u=e.shadowOffsetX||0,h=e.shadowOffsetY||0,f=v[0]-l+u,d=c[0]+l+u,p=v[1]-l+h,g=c[1]+l+h,v[0]=Math.min(v[0],f),c[0]=Math.max(c[0],d),v[1]=Math.min(v[1],p),c[1]=Math.max(c[1],g),s.renderBounds.setMinMax(v,c)),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,zt(s.renderBounds.halfExtents,s.renderBounds.halfExtents,k(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)*Aa(a[0],0,t),m=(r?-1:1)*Aa(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),w.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=Bc[t];return!!t&&t.inh},t}();(Ec=Rc=Rc||{})[Ec.ORBITING=0]="ORBITING",Ec[Ec.EXPLORING=1]="EXPLORING",Ec[Ec.TRACKING=2]="TRACKING",(Ec=Fc=Fc||{})[Ec.DEFAULT=0]="DEFAULT",Ec[Ec.ROTATIONAL=1]="ROTATIONAL",Ec[Ec.TRANSLATIONAL=2]="TRANSLATIONAL",Ec[Ec.CINEMATIC=3]="CINEMATIC",(Ec=Ic=Ic||{})[Ec.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",Ec[Ec.PERSPECTIVE=1]="PERSPECTIVE";var qc,Uc,Xc="updated",Ec=function(){function t(){this.canvas=void 0,this.eventEmitter=new Dr,this.matrix=ut(),this.right=k(1,0,0),this.up=k(0,1,0),this.forward=k(0,0,1),this.position=k(0,0,1),this.focalPoint=k(0,0,0),this.distanceVector=k(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=ut(),this.projectionMatrixInverse=ut(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=Rc.EXPLORING,this.trackingMode=Fc.DEFAULT,this.projectionMode=Ic.PERSPECTIVE,this.frustum=new Zr,this.orthoMatrix=ut()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===Ic.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===Rc.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Rc.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==Rc.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 yt(ut(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=Mt(ut(),[t,e,0]);this.jitteredProjectionMatrix=vt(ut(),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===Ic.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===Ic.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===Ic.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===Ic.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===Ic.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Ic.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=k(t.x-r,t.y-n,0),e=Yt(i,this.right)/Dt(this.right),r=Yt(i,this.up)/Dt(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=Ic.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(bs(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,c=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,c+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,c=(a=c)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(c+a)/(c-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(c-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,xt(this.projectionMatrix,this.projectionMatrix,k(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=Ic.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),Ct(this.projectionMatrix,s,n,r,e,i,a),xt(this.projectionMatrix,this.projectionMatrix,k(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=vs(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=k(0,1,0);return this.focalPoint=vs(t,e,n),this.trackingMode===Fc.CINEMATIC&&(t=(r=Wt(m(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=Dt(r),e=xs(Math.asin(e/r)),r=90+xs(Math.atan2(n,t)),kt(n=ut(),n,bs(r)),wt(n,n,bs(e)),i=Xt(m(),[0,1,0],n)),yt(this.matrix,jt(ut(),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=ms(t),this.computeMatrix(),this._getAxes(),this.type===Rc.ORBITING||this.type===Rc.EXPLORING?this._getPosition():this.type===Rc.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=ms(t),this.computeMatrix(),this._getAxes(),this.type===Rc.ORBITING||this.type===Rc.EXPLORING?this._getPosition():this.type===Rc.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=ms(t),this.computeMatrix(),this._getAxes(),this.type===Rc.ORBITING||this.type===Rc.EXPLORING?this._getPosition():this.type===Rc.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=re(ne(),[0,0,1],bs(this.roll)),e=(pt(this.matrix),re(ne(),[1,0,0],bs((this.rotateWorld&&this.type!==Rc.TRACKING||this.type===Rc.TRACKING?1:-1)*this.elevation))),n=re(ne(),[0,1,0],bs((this.rotateWorld&&this.type!==Rc.TRACKING||this.type===Rc.TRACKING?1:-1)*this.azimuth)),n=ie(ne(),n,e),n=ie(ne(),n,t),e=Pt(ut(),n);this.type===Rc.ORBITING||this.type===Rc.EXPLORING?(bt(this.matrix,this.matrix,this.focalPoint),vt(this.matrix,this.matrix,e),bt(this.matrix,this.matrix,[0,0,this.distance])):this.type===Rc.TRACKING&&(bt(this.matrix,this.matrix,this.position),vt(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=vs(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(){Bt(this.right,vs(ee(te(),[1,0,0,0],this.matrix))),Bt(this.up,vs(ee(te(),[0,1,0,0],this.matrix))),Bt(this.forward,vs(ee(te(),[0,0,1,0],this.matrix))),Ht(this.right,this.right),Ht(this.up,this.up),Ht(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=Dt(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===Rc.TRACKING||this.rotateWorld?(this.elevation=xs(Math.asin(e/r)),this.azimuth=xs(Math.atan2(-t,-n))):(this.elevation=-xs(Math.asin(e/r)),this.azimuth=-xs(Math.atan2(-t,-n)))},e._getPosition=function(){Bt(this.position,vs(ee(te(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;$t(this.distanceVector,[0,0,-this.distance],(t=ct(),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)),zt(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=Wt(m(),this.focalPoint,this.position),this.distance=Dt(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===Ic.ORTHOGRAPHIC&&(t=this.position,e=re(ne(),[0,0,1],-this.roll*Math.PI/180),Tt(this.orthoMatrix,e,k((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),k(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=vt(ut(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(Xc))},e.rotate=function(t,e,n){throw new Error(gi)},e.pan=function(t,e){throw new Error(gi)},e.dolly=function(t){throw new Error(gi)},e.createLandmark=function(t,e){throw new Error(gi)},e.gotoLandmark=function(t,e){throw new Error(gi)},t}(),$c=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),Kc=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),Zc=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}(),Jc=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),Qc=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}(),tl=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&&!hn(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),el=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,c=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&c&&r&&i&&!_(t)},e.update=function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,c=t.dx,l=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),c&&(r+=c),l&&(a+=l),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}(),nl=function(){function t(t,e){var f=this;this.globalRuntime=void 0,this.context=void 0,this.rootTarget=void 0,this.emitter=new Dr,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.pickHandler=void 0,this.tmpMatrix=ut(),this.tmpVec3=m(),this.onPointerDown=function(){var e=bi(E().mark(function t(e){var n,r;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Do){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createPointerEvent(e);case 4:n=t.sent,f.dispatchEvent(n,"pointerdown"),"touch"===n.pointerType?f.dispatchEvent(n,"touchstart"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(r=2===n.button,f.dispatchEvent(n,r?"rightdown":"mousedown")),f.trackingData(e.pointerId).pressTargetsByButton[e.button]=n.composedPath(),f.freeEvent(n);case 10:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerUp=function(){var e=bi(E().mark(function t(e){var n,r,i,a,o,s,c;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Do){t.next=2;break}return t.abrupt("return");case 2:return n=performance.now(),t.next=5,f.createPointerEvent(e);case 5:if(r=t.sent,f.dispatchEvent(r,"pointerup"),"touch"===r.pointerType?f.dispatchEvent(r,"touchend"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(i=2===r.button,f.dispatchEvent(r,i?"rightup":"mouseup")),i=f.trackingData(e.pointerId),s=f.findMountedTarget(i.pressTargetsByButton[e.button]),(c=s)&&!r.composedPath().includes(s)){for(a=s;a&&!r.composedPath().includes(a);)r.currentTarget=a,f.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?f.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(o=2===r.button,f.notifyTarget(r,o?"rightupoutside":"mouseupoutside")),To.isNode(a)&&(a=a.parentNode);delete i.pressTargetsByButton[e.button],c=a}c&&((s=f.clonePointerEvent(r,"click")).target=c,s.path=[],i.clicksByButton[e.button]||(i.clicksByButton[e.button]={clickCount:0,target:s.target,timeStamp:n}),(c=i.clicksByButton[e.button]).target===s.target&&n-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=s.target,c.timeStamp=n,s.detail=c.clickCount,null!=(c=r.detail)&&c.preventClick||("mouse"!==s.pointerType&&"touch"!==s.pointerType||f.dispatchEvent(s,"click"),f.dispatchEvent(s,"pointertap")),f.freeEvent(s)),f.freeEvent(r);case 14:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerMove=function(){var e=bi(E().mark(function t(e){var n,r,i,a,o,s,c,l,u,h;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Do){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createPointerEvent(e);case 4:if(n=t.sent,r="mouse"===n.pointerType||"pen"===n.pointerType,i=f.trackingData(e.pointerId),a=f.findMountedTarget(i.overTargets),i.overTargets&&a!==n.target)return c="mousemove"===e.type?"mouseout":"pointerout",t.next=12,f.createPointerEvent(e,c,a||void 0);t.next=23;break;case 12:if(o=t.sent,f.dispatchEvent(o,"pointerout"),r&&f.dispatchEvent(o,"mouseout"),n.composedPath().includes(a)){t.next=22;break}return t.next=18,f.createPointerEvent(e,"pointerleave",a||void 0);case 18:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&!n.composedPath().includes(s.target);)s.currentTarget=s.target,f.notifyTarget(s),r&&f.notifyTarget(s,"mouseleave"),To.isNode(s.target)&&(s.target=s.target.parentNode);f.freeEvent(s);case 22:f.freeEvent(o);case 23:if(a===n.target){t.next=38;break}c="mousemove"===e.type?"mouseover":"pointerover",l=f.clonePointerEvent(n,c),f.dispatchEvent(l,"pointerover"),r&&f.dispatchEvent(l,"mouseover"),u=a&&To.isNode(a)&&a.parentNode;case 29:if(u&&u!==(To.isNode(f.rootTarget)&&f.rootTarget.parentNode)){if(u===n.target)return t.abrupt("break",35);t.next=32}else t.next=35;break;case 32:u=u.parentNode,t.next=29;break;case 35:if(!u||u===(To.isNode(f.rootTarget)&&f.rootTarget.parentNode)){for((h=f.clonePointerEvent(n,"pointerenter")).eventPhase=h.AT_TARGET;h.target&&h.target!==a&&h.target!==(To.isNode(f.rootTarget)&&f.rootTarget.parentNode);)h.currentTarget=h.target,f.notifyTarget(h),r&&f.notifyTarget(h,"mouseenter"),To.isNode(h.target)&&(h.target=h.target.parentNode);f.freeEvent(h)}f.freeEvent(l);case 38:f.dispatchEvent(n,"pointermove"),"touch"===n.pointerType&&f.dispatchEvent(n,"touchmove"),r&&(f.dispatchEvent(n,"mousemove"),f.cursor=f.getCursor(n.target)),i.overTargets=n.composedPath(),f.freeEvent(n);case 43:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerOut=function(){var e=bi(E().mark(function t(e){var n,r,i,a,o;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Do){t.next=2;break}return t.abrupt("return");case 2:if((n=f.trackingData(e.pointerId)).overTargets)return r="mouse"===e.pointerType||"pen"===e.pointerType,i=f.findMountedTarget(n.overTargets),t.next=8,f.createPointerEvent(e,"pointerout",i||void 0);t.next=19;break;case 8:return a=t.sent,f.dispatchEvent(a),r&&f.dispatchEvent(a,"mouseout"),t.next=13,f.createPointerEvent(e,"pointerleave",i||void 0);case 13:for((o=t.sent).eventPhase=o.AT_TARGET;o.target&&o.target!==(To.isNode(f.rootTarget)&&f.rootTarget.parentNode);)o.currentTarget=o.target,f.notifyTarget(o),r&&f.notifyTarget(o,"mouseleave"),To.isNode(o.target)&&(o.target=o.target.parentNode);n.overTargets=null,f.freeEvent(a),f.freeEvent(o);case 19:f.cursor=null;case 20:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerOver=function(){var e=bi(E().mark(function t(e){var n,r,i,a;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Do){t.next=2;break}return t.abrupt("return");case 2:return n=f.trackingData(e.pointerId),t.next=5,f.createPointerEvent(e);case 5:for(r=t.sent,i="mouse"===r.pointerType||"pen"===r.pointerType,f.dispatchEvent(r,"pointerover"),i&&f.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(f.cursor=f.getCursor(r.target)),(a=f.clonePointerEvent(r,"pointerenter")).eventPhase=a.AT_TARGET;a.target&&a.target!==(To.isNode(f.rootTarget)&&f.rootTarget.parentNode);)a.currentTarget=a.target,f.notifyTarget(a),i&&f.notifyTarget(a,"mouseenter"),To.isNode(a.target)&&(a.target=a.target.parentNode);n.overTargets=r.composedPath(),f.freeEvent(r),f.freeEvent(a);case 16:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerUpOutside=function(){var e=bi(E().mark(function t(e){var n,r,i,a;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Do){t.next=2;break}return t.abrupt("return");case 2:return n=f.trackingData(e.pointerId),r=f.findMountedTarget(n.pressTargetsByButton[e.button]),t.next=6,f.createPointerEvent(e);case 6:if(i=t.sent,r){for(a=r;a;)i.currentTarget=a,f.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||"mouse"!==i.pointerType&&"pen"!==i.pointerType||f.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),To.isNode(a)&&(a=a.parentNode);delete n.pressTargetsByButton[e.button]}f.freeEvent(i);case 9:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onWheel=function(){var e=bi(E().mark(function t(e){var n;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Bo){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createWheelEvent(e);case 4:n=t.sent,f.dispatchEvent(n),f.freeEvent(n);case 7:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.globalRuntime=t,this.context=e}var e=t.prototype;return e.init=function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)},e.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new Jr(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.viewport2Client=function(t){var e=this.context.contextService.getBoundingClientRect();return new Jr(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.viewport2Canvas=function(t){var e=t.x,t=t.y,n=this.rootTarget.defaultView.getCamera(),r=this.context.config,i=r.width,r=r.height,a=n.getPerspectiveInverse(),n=n.getWorldTransform(),n=vt(this.tmpMatrix,n,a),a=Gt(this.tmpVec3,e/i*2-1,2*(1-t/r)-1,0);return Xt(a,a,n),new Jr(a[0],a[1])},e.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),e=e.getViewTransform(),n=vt(this.tmpMatrix,n,e),e=Gt(this.tmpVec3,t.x,t.y,0),t=(Xt(this.tmpVec3,this.tmpVec3,n),this.context.config),n=t.width,t=t.height;return new Jr((e[0]+1)/2*n,(1-(e[1]+1)/2)*t)},e.setPickHandler=function(t){this.pickHandler=t},e.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})},e.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for "+t.type)}},e.dispatchEvent=function(t,e,n){n?(t.eventPhase=t.AT_TARGET,n=this.rootTarget.defaultView||null,t.currentTarget=n,this.notifyListeners(t,e)):(t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e)),this.emitter.emit(e||t.type,t)},e.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;1<=r;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var a=i+1;a<n.length;a++)if(t.currentTarget=n[a],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)e.unshift(n.document);else{for(var r=0;r<2048&&t!==this.rootTarget;r++)To.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);n&&e.push(n)}return e},e.hitTest=function(){var e=bi(E().mark(function t(e){var n,r,i,a;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.viewportX,r=e.viewportY,a=this.context.config,i=a.width,a=a.height,n<0||r<0||i<n||a<r)return t.abrupt("return",null);t.next=4;break;case 4:return t.next=6,this.pickHandler(e);case 6:if(t.t1=t.sent,t.t1){t.next=9;break}t.t1=this.rootTarget;case 9:if(t.t0=t.t1,t.t0){t.next=12;break}t.t0=null;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.isNativeEventFromCanvas=function(t){var e=this.context.contextService.getDomElement(),n=null==(n=t.nativeEvent)?void 0:n.target;if(n){if(n===e)return!0;if(e&&e.contains)return e.contains(n)}return!!t.nativeEvent.composedPath&&-1<t.nativeEvent.composedPath().indexOf(e)},e.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e=_i(this.globalRuntime.displayObjectPool.getHTMLs());!(n=e()).done;){var n=n.value;if(-1<t.nativeEvent.composedPath().indexOf(n))return n}return null},e.pickTarget=function(){var e=bi(E().mark(function t(e){return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY}));case 1:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.createPointerEvent=function(){var r=bi(E().mark(function t(e,n,r){var i,a;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i=this.allocateEvent(Do),this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e,a=this.getExistedHTML(i),null==r?t.next=11:(t.t0=r,t.next=20);break;case 11:if(t.t1=a,t.t1)t.next=19;else{if(t.t2=this.isNativeEventFromCanvas(i),t.t2)return t.next=17,this.pickTarget(i);t.next=18}break;case 17:t.t2=t.sent;case 18:t.t1=t.t2;case 19:t.t0=t.t1;case 20:return i.target=t.t0,"string"==typeof n&&(i.type=n),t.abrupt("return",i);case 23:case"end":return t.stop()}},t,this)}));return function(t,e,n){return r.apply(this,arguments)}}(),e.createWheelEvent=function(){var e=bi(E().mark(function t(e){var n,r;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(Bo),this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,r=this.getExistedHTML(n),t.t0=r,t.t0)t.next=15;else{if(t.t1=this.isNativeEventFromCanvas(n),t.t1)return t.next=13,this.pickTarget(n);t.next=14}break;case 13:t.t1=t.sent;case 14:t.t0=t.t1;case 15:return n.target=t.t0,t.abrupt("return",n);case 17:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.cloneWheelEvent=function(t){var e=this.allocateEvent(Bo);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=t.type,e},e.clonePointerEvent=function(t,e){var n=this.allocateEvent(Do);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},e.copyPointerData=function(t,e){t instanceof Do&&e instanceof Do&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},e.copyMouseData=function(t,e){t instanceof Io&&e instanceof Io&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},e.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);t=this.eventPool.get(t).pop()||new t(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=[],t.target=null,t},e.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},e.notifyTarget=function(t,e){e=null!=(n=e)?n:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?e+"capture":e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},e.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;0<=n;n--){var r=t[n];if(!(r===this.rootTarget||To.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.getCursor=function(t){for(var e=t;e;){var n=Fo.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=To.isNode(e)&&e.parentNode}},t}(),rl=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}(),il=((ol=qc=qc||{})[ol.CAMERA_CHANGED=0]="CAMERA_CHANGED",ol[ol.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",ol[ol.NONE=2]="NONE",function(){function t(t,e){this.globalRuntime=void 0,this.context=void 0,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.renderOrderChangedEvent=new _o(y.RENDER_ORDER_CHANGED),this.hooks={init:new Sc,dirtycheck:new Nc(["object"]),cull:new Nc(["object","camera"]),beginFrame:new Pc([]),beforeRender:new Pc(["objectToRender"]),render:new Pc(["objectToRender"]),afterRender:new Pc(["objectToRender"]),endFrame:new Pc([]),destroy:new Pc([]),pick:new Ac(["result"]),pickSync:new Nc(["result"]),pointerDown:new Pc(["event"]),pointerUp:new Pc(["event"]),pointerMove:new Pc(["event"]),pointerOut:new Pc(["event"]),pointerOver:new Pc(["event"]),pointerWheel:new Pc(["event"]),pointerCancel:new Pc(["event"])},this.globalRuntime=t,this.context=e}var e=t.prototype;return e.init=function(){var t=bi(E().mark(function t(){var e;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=ki({},this.globalRuntime,this.context),this.context.renderingPlugins.forEach(function(t){t.apply(e)}),t.next=4,this.hooks.init.promise();case 4:this.inited=!0;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getStats=function(){return this.stats},e.disableDirtyRectangleRendering=function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(qc.CAMERA_CHANGED)},e.render=function(t){var e=this,n=(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.context.renderingContext);this.globalRuntime.sceneGraphService.syncHierarchy(n.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),n.renderReasons.size&&this.inited&&(this.renderDisplayObject(n.root,t,n),this.hooks.beginFrame.call(),n.renderListCurrentFrame.forEach(function(t){e.hooks.beforeRender.call(t),e.hooks.render.call(t),e.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),n.renderListCurrentFrame=[],n.renderReasons.clear())},e.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),a=i.enableDirtyCheck,i=i.enableCulling,a=(this.globalRuntime.styleValueRegistry.recalc(t),a?this.hooks.dirtycheck.call(t):t),a=(a&&(i=i?this.hooks.cull.call(a,this.context.camera):a)&&(this.stats.rendered++,n.renderListCurrentFrame.push(i)),t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++,t.sortable),i=!1;a.dirty&&(a.sorted=t.childNodes.slice().sort(li),a.dirty=!(i=!0)),(a.sorted||t.childNodes).forEach(function(t){r.renderDisplayObject(t,e,n)}),i&&t.forEach(function(t){r.renderOrderChangedEvent.target=t,r.renderOrderChangedEvent.detail={renderOrder:t.sortable.renderOrder},t.ownerDocument.defaultView.dispatchEvent(r.renderOrderChangedEvent,!0)})},e.destroy=function(){this.inited=!1,this.hooks.destroy.call()},e.dirtify=function(){this.context.renderingContext.renderReasons.add(qc.DISPLAY_OBJECT_CHANGED)},t}()),al=/\[\s*(.*)=(.*)\s*\]/,ol=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(al),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),!_(t))&&t.toString?t.toString():""},t}(),sl=function(){function t(t){var o,i,a,r,s,c,l,u,h,n,f,d,g=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new _o(y.BOUNDS_CHANGED),this.rotate=(o=ne(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(oe(r=ne(),e[0],e[1],e[2]),i=g.getRotation(t),a=g.getRotation(t.parentNode),ce(o,a),ae(o,o),ie(r,o,r),ie(n.localRotation,r,i),ue(n.localRotation,n.localRotation),g.dirtifyLocal(t,n)):g.rotateLocal(t,e)}),this.rotateLocal=(i=ne(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));n=t.transformable;oe(i,e[0],e[1],e[2]),le(n.localRotation,n.localRotation,i),g.dirtifyLocal(t,n)}),this.setEulerAngles=(a=ne(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(oe(n.localRotation,e[0],e[1],e[2]),r=g.getRotation(t.parentNode),ce(a,ae(ne(),r)),le(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=k(e,n,r));var i,a,o,s,c,l,u,h,f,d,p,n=t.transformable;Kt(e,m())||(i=r=e,a=n.localRotation,o=a[0],s=a[1],c=a[2],a=a[3],l=i[0],u=i[1],i=i[2],p=s*(d=o*u-s*l)-c*(f=c*l-o*i),c=c*(h=s*i-c*u)-o*d,o=o*f-s*h,f*=s=2*a,d*=s,c*=2,o*=2,r[0]=l+(h*=s)+(p*=2),r[1]=u+f+c,r[2]=i+d+o,zt(n.localPosition,n.localPosition,e),g.dirtifyLocal(t,n))},this.setPosition=(r=ut(),s=m(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Kt(g.getPosition(t),s)||(Bt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,ft(r,e.worldTransform),yt(r,r),Xt(n.localPosition,s,r)):Bt(n.localPosition,s),g.dirtifyLocal(t,n))}),this.setLocalPosition=(c=m(),function(t,e){var n=t.transformable;c[0]=e[0],c[1]=e[1],c[2]=e[2]||0,Kt(n.localPosition,c)||(Bt(n.localPosition,c),g.dirtifyLocal(t,n))}),this.translate=(l=m(),u=m(),h=m(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Kt(e="number"==typeof e?Gt(u,e,n,r):e,l)||(zt(h,g.getPosition(t),e),g.setPosition(t,h))}),this.setRotation=function(){var o=ne();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=se(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=g.getRotation(t.parentNode),ce(o,n),ae(o,o),ie(a.localRotation,o,e),ue(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=ut(),f=m(),d=se(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(Tt(t.localTransform,t.localRotation,t.localPosition,k(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=pt(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),vt(t.localTransform,t.localTransform,e)),e=Tt(n,d,f,t.localScale,t.origin),vt(t.localTransform,t.localTransform,e)):Tt(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,_(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=k(e,n,r));n=t.transformable;Kt(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=k(e,n,r));n=t.transformable;oe(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=k(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=k(e[0],e[1],e[2]||n.localScale[2]);Kt(e,n.localScale)||(Bt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=se(e,n,r,i));n=t.transformable;ce(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=he(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 Lo(y.ATTR_MODIFIED,t,n,n,e,Lo.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return St(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return At(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return _t(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=St(m(),e),r=At(ne(),e),e=_t(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 $r.isEmpty(e)?null:((n=n||new $r).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 $r},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 $r).update(t.center,t.halfExtents))}),e&&(t=ui(t))&&(t=t.style.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new $r)&&(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=ut(),r=(t.parentNode.transformable&&(n=yt(ut(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!$r.isEmpty(r))return(e=new $r).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=($r.isEmpty(i)||(r=new $r).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 Qr(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Qr((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?vt(e.worldTransform,n.worldTransform,e.localTransform):ft(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}(),cl={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]},ll=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,ul=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),hl=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),fl=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!hl.exec(e)&&!ul.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,cl.MetricsString+cl.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(cl.BaselineSymbol).width),s=cl.HeightMultiplier*o,o=o*cl.BaselineMultiplier|0,c=(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=c.length,l=4*a,u=0,h=0,f=!1,u=0;u<o;++u){for(var d=0;d<l;d+=4)if(255!==c[h+d]){f=!0;break}if(f)break;h+=l}for(n.ascent=o-u,h=r-l,f=!1,u=s;o<u;--u){for(var p=0;p<l;p+=4)if(255!==c[h+p]){f=!0;break}if(f)break;h-=l}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,c=e.textAlign,l=e.letterSpacing,u=e.textPath,h=(e.textPathSide,e.textPathStartOffset,e.leading),h=void 0===h?0:h,f=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=dn(e)&&e+"px"||"16px",a=hn(n)?n.split(","):[n],o=a.length-1;0<=o;o--){var s=a[o].trim();!jc.test(s)&&Cc.indexOf(s)<0&&(s='"'+s+'"'),a[o]=s}return r+" "+i+" "+t+" "+e+" "+a.join(",")}(e),d=this.measureFont(f,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=f,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)*l;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+h),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:f,width:r,height:i,lines:g,lineWidths:y,lineHeight:x+=h,maxLineWidth:m,fontProperties:d,lineMetrics:y.map(function(t,e){var n=0;return"center"===c||"middle"===c?n-=t/2:"right"!==c&&"end"!==c||(n-=t),new Qr(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,c=this.runtime.offscreenCanvas.getOrCreateContext(n),l=i+a,u="",h=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),f=0,d=0,p={},g=function(t){return r.getFromCache(t,a,p,c)},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<=++f){e.isOverflowing=!0;break}d=0,h[f]=""}else{if(0<d&&l<d+k){if(s<=f+1){if(e.isOverflowing=!0,0<y&&y<=l){for(var M=h[f].length,E=0,O=M,S=0;S<M;S++){var _=g(h[f][S]);if(l<E+_+y){O=S;break}E+=_}h[f]=(h[f]||"").slice(0,O)+u}break}if(d=0,h[++f]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(h=this.trimToBreakable(h),d=this.sumTextWidthByCache(h[f]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(h=this.trimByKinsokuShorui(h),d+=g(x||""))}d+=k,h[f]=(h[f]||"")+b}}return h.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=cl.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=cl.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||!ll.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(!ll.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={},$c=(tl=new tl,Qc=new Qc,(rw={})[M.CIRCLE]=new $c,rw[M.ELLIPSE]=new Kc,rw[M.RECT]=tl,rw[M.IMAGE]=tl,rw[M.GROUP]=tl,rw[M.LINE]=new Zc,rw[M.TEXT]=new el(w),rw[M.POLYLINE]=Qc,rw[M.POLYGON]=Qc,rw[M.PATH]=new Jc,rw[M.HTML]=null,rw[M.MESH]=null,rw),el=(Kc=new i,tl=new uo,(Zc={})[r.PERCENTAGE]=null,Zc[r.NUMBER]=new yo,Zc[r.ANGLE]=new n,Zc[r.DEFINED_PATH]=new e,Zc[r.PAINT]=Kc,Zc[r.COLOR]=Kc,Zc[r.FILTER]=new oo,Zc[r.LENGTH]=tl,Zc[r.LENGTH_PERCENTAGE]=tl,Zc[r.LENGTH_PERCENTAGE_12]=new ho,Zc[r.LENGTH_PERCENTAGE_14]=new fo,Zc[r.COORDINATE]=new po,Zc[r.OFFSET_DISTANCE]=new mo,Zc[r.OPACITY_VALUE]=new vo,Zc[r.PATH]=new bo,Zc[r.LIST_OF_POINTS]=new xo,Zc[r.SHADOW_BLUR]=new wo,Zc[r.TEXT]=new ko,Zc[r.TEXT_TRANSFORM]=new a,Zc[r.TRANSFORM]=new Mo,Zc[r.TRANSFORM_ORIGIN]=new co,Zc[r.Z_INDEX]=new Eo,Zc[r.MARKER]=new go,Zc),Qc=(w.CameraContribution=Ec,w.AnimationTimeline=null,w.EasingFunction=null,w.offscreenCanvas=new rl,w.displayObjectPool=new Ko,w.sceneGraphSelector=new ol,w.sceneGraphService=new sl(w),w.textService=new fl(w),w.geometryUpdaterFactory=$c,w.CSSPropertySyntaxFactory=el,w.styleValueRegistry=new Mc,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}()),Jc=function(){function t(t){this.plugins=[],this.config=void 0,this.config=ki({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(e){-1===this.plugins.findIndex(function(t){return t===e})&&this.plugins.push(e)},e.unregisterPlugin=function(e){var t=this.plugins.findIndex(function(t){return t===e});-1<t&&this.plugins.splice(t,1)},e.getPlugins=function(){return this.plugins},e.getPlugin=function(e){return this.plugins.find(function(t){return t.name===e})},e.getConfig=function(){return this.config},e.setConfig=function(t){Object.assign(this.config,t)},t}(),dl=function(){function a(t){this.strategies=void 0,this.strategies=t}return a.prototype.apply=function(t){var n=t.camera,e=t.renderingService,r=t.renderingContext,i=this.strategies;e.hooks.cull.tap(a.tag,function(e){var t;return e&&(t=e.cullable,0===i.length?t.visible=-1<r.unculledEntities.indexOf(e.entity):t.visible=i.every(function(t){return t.isVisible(n,e)}),!e.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new _o(y.CULLED)),null))}),e.hooks.afterRender.tap(a.tag,function(t){t.cullable.visibilityPlaneMask=-1})},a}(),pl=(dl.tag="Culling",function(){function n(){}return n.prototype.apply=function(t){var e=t.renderingService;e.hooks.dirtycheck.tap(n.tag,function(t){return t&&(t.renderable.dirty||e.disableDirtyRectangleRendering()?t:null)})},n}()),gl=(pl.tag="DirtyCheck",function(){function e(){var a=this;this.autoPreventDefault=!1,this.rootPointerEvent=new Do(null),this.rootWheelEvent=new Bo(null),this.context=void 0,this.onPointerMove=function(t){var e,n=null==(e=a.context.renderingContext.root)||null==(e=e.ownerDocument)?void 0:e.defaultView;if(!n.supportsTouchEvents||"touch"!==t.pointerType){for(var r=_i(a.normalizeToPointerEvent(t,n));!(i=r()).done;){var i=i.value,i=a.bootstrapEvent(a.rootPointerEvent,i,n);a.context.eventService.mapEvent(i)}a.setCursor(a.context.eventService.cursor)}}}var t=e.prototype;return t.apply=function(t){var a=this,t=(this.context=t).renderingService,o=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(){var e=bi(E().mark(function t(e){var n;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.context.renderingService.hooks.pick.promise({position:e,picked:[],topmost:!0});case 2:return n=t.sent,n=n.picked,t.abrupt("return",n[0]||null);case 5:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}()),t.hooks.pointerWheel.tap(e.tag,function(t){t=a.normalizeWheelEvent(t);a.context.eventService.mapEvent(t)}),t.hooks.pointerDown.tap(e.tag,function(t){if(!o.supportsTouchEvents||"touch"!==t.pointerType){var e=a.normalizeToPointerEvent(t,o);!a.autoPreventDefault||!e[0].isNormalized||!t.cancelable&&"cancelable"in t||t.preventDefault();for(var n=_i(e);!(r=n()).done;){var r=r.value,r=a.bootstrapEvent(a.rootPointerEvent,r,o);a.context.eventService.mapEvent(r)}a.setCursor(a.context.eventService.cursor)}}),t.hooks.pointerUp.tap(e.tag,function(t){if(!o.supportsTouchEvents||"touch"!==t.pointerType){var e=a.context.contextService.getDomElement(),n="outside";try{n=e&&t.target&&t.target!==e&&e.contains&&!e.contains(t.target)?"outside":""}catch(t){}for(var r=_i(a.normalizeToPointerEvent(t,o));!(i=r()).done;){var i=i.value,i=a.bootstrapEvent(a.rootPointerEvent,i,o);i.type+=n,a.context.eventService.mapEvent(i)}a.setCursor(a.context.eventService.cursor)}}),t.hooks.pointerMove.tap(e.tag,this.onPointerMove),t.hooks.pointerOver.tap(e.tag,this.onPointerMove),t.hooks.pointerOut.tap(e.tag,this.onPointerMove)},t.getViewportXY=function(t){var e,n=t.offsetX,r=t.offsetY,i=t.clientX,t=t.clientY;return t=!this.context.config.supportsCSSTransform||_(n)||_(r)?(e=(i=this.context.eventService.client2Viewport(new Jr(i,t))).x,i.y):(e=n,r),{x:e,y:t}},t.bootstrapEvent=function(t,e,n){t.view=n,t.originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var n=this.getViewportXY(e),r=n.x,n=n.y,r=(t.viewport.x=r,t.viewport.y=n,this.context.eventService.viewport2Canvas(t.viewport)),n=r.x,r=r.y;return t.canvas.x=n,t.canvas.y=r,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=mi[t.type]||t.type),t},t.normalizeWheelEvent=function(t){var e=this.rootWheelEvent,n=(this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ,this.getViewportXY(t)),r=n.x,n=n.y,r=(e.viewport.x=r,e.viewport.y=n,this.context.eventService.viewport2Canvas(e.viewport)),n=r.x,r=r.y;return e.canvas.x=n,e.canvas.y=r,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.setCursor=function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")},t.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];mn(i.button)&&(i.button=0),mn(i.buttons)&&(i.buttons=1),mn(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),mn(i.width)&&(i.width=i.radiusX||1),mn(i.height)&&(i.height=i.radiusY||1),mn(i.tiltX)&&(i.tiltX=0),mn(i.tiltY)&&(i.tiltY=0),mn(i.pointerType)&&(i.pointerType="touch"),mn(i.pointerId)&&(i.pointerId=i.identifier||0),mn(i.pressure)&&(i.pressure=i.force||.5),mn(i.twist)&&(i.twist=0),mn(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)?(mn((e=t).isPrimary)&&(e.isPrimary=!0),mn(e.width)&&(e.width=1),mn(e.height)&&(e.height=1),mn(e.tiltX)&&(e.tiltX=0),mn(e.tiltY)&&(e.tiltY=0),mn(e.pointerType)&&(e.pointerType="mouse"),mn(e.pointerId)&&(e.pointerId=1),mn(e.pressure)&&(e.pressure=.5),mn(e.twist)&&(e.twist=0),mn(e.tangentialPressure)&&(e.tangentialPressure=0),e.isNormalized=!0,n.push(e)):n.push(t);return n},e}()),yl=(gl.tag="Event",[M.CIRCLE,M.ELLIPSE,M.IMAGE,M.RECT,M.LINE,M.POLYLINE,M.POLYGON,M.TEXT,M.PATH,M.HTML]),ml=function(){function t(){}var e=t.prototype;return e.isVisible=function(t,e){var n,r,i=e.cullable;return!i.enable||(n=e.getRenderBounds(),!$r.isEmpty(n)&&(t=t.getFrustum(),r=null==(r=e.parentNode)||null==(r=r.cullable)?void 0:r.visibilityPlaneMask,i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,n,r||Xr.INDETERMINATE,t.planes),i.visible=i.visibilityPlaneMask!==Xr.OUTSIDE,i.visible))},e.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===Xr.OUTSIDE||n===Xr.INSIDE)return n;for(var i=Xr.INSIDE,a=-1<yl.indexOf(t.nodeName),o=0,s=r.length;o<s;++o){var c=1<<o;if(0!=(n&c)&&(!a||4!==o&&5!==o)){var l=r[o],u=l.normal,l=l.distance;if(Yt(u,e.getPositiveFarPoint(r[o]))+l<0)return Xr.OUTSIDE;Yt(u,e.getNegativeFarPoint(r[o]))+l<0&&(i|=c)}}return i},t}(),vl=function(){function l(){this.rBush=void 0,this.toSync=new Set}var t=l.prototype;return t.apply=function(t){function e(t){t.target.renderable.dirty=!0,o.dirtify()}function n(t){for(var e=t.detail.affectChildren,t=t.target,n=(e&&t.forEach(function(t){a.toSync.add(t)}),t);n;)n.renderable&&a.toSync.add(n),n=n.parentElement;o.dirtify()}function r(t){t=t.target,w.styleValueRegistry.recalc(t),w.sceneGraphService.dirtifyToRoot(t),o.dirtify()}function i(t){var e=(t=t.target).rBushNode;e.aabb&&a.rBush.remove(e.aabb),a.toSync.delete(t),w.sceneGraphService.dirtifyToRoot(t),o.dirtify()}var a=this,o=t.renderingService,s=t.renderingContext,t=t.rBushRoot,c=s.root.ownerDocument.defaultView;this.rBush=t;o.hooks.init.tapPromise(l.tag,bi(E().mark(function t(){return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:c.addEventListener(y.MOUNTED,r),c.addEventListener(y.UNMOUNTED,i),c.addEventListener(y.ATTR_MODIFIED,e),c.addEventListener(y.BOUNDS_CHANGED,n);case 4:case"end":return t.stop()}},t)}))),o.hooks.destroy.tap(l.tag,function(){c.removeEventListener(y.MOUNTED,r),c.removeEventListener(y.UNMOUNTED,i),c.removeEventListener(y.ATTR_MODIFIED,e),c.removeEventListener(y.BOUNDS_CHANGED,n)}),o.hooks.endFrame.tap(l.tag,function(){a.syncRTree()})},t.syncRTree=function(){var o=this,s=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(t){var e,n,r,i=t.rBushNode,a=(i&&i.aabb&&o.rBush.remove(i.aabb),t.getRenderBounds());a&&(e=(n=a.getMin())[0],n=n[1],r=(a=a.getMax())[0],a=a[1],i.aabb||(i.aabb={}),i.aabb.id=t.entity,i.aabb.minX=e,i.aabb.minY=n,i.aabb.maxX=r,i.aabb.maxY=a),!i.aabb||isNaN(i.aabb.maxX)||isNaN(i.aabb.maxX)||isNaN(i.aabb.minX)||isNaN(i.aabb.minY)||s.push(i.aabb)}),this.rBush.load(s),s.length=0,this.toSync.clear()},l}(),bl=(vl.tag="Prepare",(rw=Uc=Uc||{}).READY="ready",rw.BEFORE_RENDER="beforerender",rw.AFTER_RENDER="afterrender",rw.BEFORE_DESTROY="beforedestroy",rw.AFTER_DESTROY="afterdestroy",rw.RESIZE="resize",rw.DIRTY_RECTANGLE="dirtyrectangle",new _o(y.MOUNTED)),xl=new _o(y.UNMOUNTED),wl=new _o(Uc.BEFORE_RENDER),kl=new _o(Uc.AFTER_RENDER),Ml=function(k){function t(t){var e=k.call(this)||this,n=(e.document=void 0,e.customElements=void 0,e.requestAnimationFrame=void 0,e.cancelAnimationFrame=void 0,e.devicePixelRatio=void 0,e.supportsPointerEvents=void 0,e.supportsTouchEvents=void 0,e.isTouchEvent=void 0,e.isMouseEvent=void 0,e.Element=N,e.frameId=void 0,e.inited=!1,e.readyPromise=void 0,e.resolveReadyPromise=void 0,e.context={},e.document=new Po,e.document.defaultView=Oi(e),e.customElements=new Oo,t.container),r=t.canvas,i=t.offscreenCanvas,a=t.width,o=t.height,s=t.devicePixelRatio,c=t.renderer,l=t.background,u=t.cursor,h=t.document,f=t.requestAnimationFrame,d=t.cancelAnimationFrame,p=t.createImage,g=t.supportsPointerEvents,y=t.supportsTouchEvents,m=t.supportsCSSTransform,v=t.isTouchEvent,t=t.isMouseEvent,b=(b=n,x=Oi(e),b&&(b="string"==typeof b?b:b.id||si++,oi[b]&&oi[b].destroy(),oi[b]=x),a),x=o,w=s;return r&&(w=1<=(w=s||ci&&window.devicePixelRatio||1)?Math.ceil(w):1,b=a||("auto"===(a=hi(s=r,"width"))?s.offsetWidth:parseFloat(a))||r.width/w,x=o||("auto"===(a=hi(s=r,"height"))?s.offsetHeight:parseFloat(a))||r.height/w),e.devicePixelRatio=w,e.requestAnimationFrame=null!=f?f:qr.bind(globalThis),e.cancelAnimationFrame=null!=d?d:Ur.bind(globalThis),e.supportsTouchEvents=null!=y?y:"ontouchstart"in globalThis,e.supportsPointerEvents=null!=g?g:!!globalThis.PointerEvent,e.isTouchEvent=null!=v?v:function(t){return e.supportsTouchEvents&&t instanceof globalThis.TouchEvent},e.isMouseEvent=null!=t?t:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!e.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))},e.initRenderingContext({container:n,canvas:r,width:b,height:x,renderer:c,offscreenCanvas:i,devicePixelRatio:w,cursor:u||"default",background:l||"transparent",createImage:p,document:h,supportsCSSTransform:m}),e.initDefaultCamera(b,x),bi(E().mark(function t(){return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.initRenderer(c);case 2:e.dispatchEvent(new _o(Uc.READY)),e.readyPromise&&e.resolveReadyPromise();case 4:case"end":return t.stop()}},t)}))(),e}s(t,k);var e=t.prototype;return e.initRenderingContext=function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.initDefaultCamera=function(t,e){var n=this,r=new w.CameraContribution;r.setType(Rc.EXPLORING,Fc.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3),r.canvas=this,r.eventEmitter.on(Xc,function(){n.context.renderingContext.renderReasons.add(qc.CAMERA_CHANGED)}),this.context.camera=r},e.getConfig=function(){return this.context.config},e.getRoot=function(){return this.document.documentElement},e.getCamera=function(){return this.context.camera},e.getContextService=function(){return this.context.contextService},e.getEventService=function(){return this.context.eventService},e.getRenderingService=function(){return this.context.renderingService},e.getRenderingContext=function(){return this.context.renderingContext},e.getStats=function(){return this.getRenderingService().getStats()},e.destroy=function(t,e){void 0===t&&(t=!0),(e=void 0===e?!1:e)||this.dispatchEvent(new _o(Uc.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&this.document.destroy(),this.getRenderingService().destroy(),this.getContextService().destroy(),e||this.dispatchEvent(new _o(Uc.AFTER_DESTROY))},e.changeSize=function(t,e){this.resize(t,e)},e.resize=function(t,e){var n=this.context.config,n=(n.width=t,n.height=e,this.getContextService().resize(t,e),this.context.camera),r=n.getProjectionMode();n.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),r===Ic.ORTHOGRAPHIC?n.setOrthographic(t/-2,t/2,e/2,e/-2,n.getNear(),n.getFar()):n.setAspect(t/e),this.dispatchEvent(new _o(Uc.RESIZE,{width:t,height:e}))},e.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.removeChild=function(t){return this.document.documentElement.removeChild(t)},e.removeChildren=function(){this.document.documentElement.removeChildren()},e.destroyChildren=function(){this.document.documentElement.destroyChildren()},e.render=function(){this.dispatchEvent(wl),this.getRenderingService().render(this.getConfig()),this.dispatchEvent(kl)},e.run=function(){var e=this;(function t(){e.render(),e.frameId=requestAnimationFrame(t)})()},e.initRenderer=function(){var e=bi(E().mark(function t(e){return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}throw new Error("Renderer is required.");case 2:return this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new B,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new gl,new vl,new pl,new dl([new ml])),this.loadRendererContainerModule(e),this.context.contextService=new this.context.ContextService(ki({},w,this.context)),this.context.renderingService=new il(w,this.context),this.context.eventService=new nl(w,this.context),this.context.eventService.init(),t.next=14,this.context.contextService.init();case 14:return t.next=16,this.context.renderingService.init();case 16:this.inited=!0,this.getRoot().forEach(function(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0,t.dirty=!0)}),this.mountChildren(this.getRoot()),e.getConfig().enableAutoRendering&&this.run();case 20:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init()})},e.setRenderer=function(){var e=bi(E().mark(function t(e){var n,r;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((n=this.getConfig()).renderer===e)return t.abrupt("return");t.next=3;break;case 3:return r=n.renderer,n.renderer=e,this.destroy(!1,!0),[].concat(null==r?void 0:r.getPlugins()).reverse().forEach(function(t){t.destroy()}),t.next=9,this.initRenderer(e);case 9:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.setCursor=function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)},e.unmountChildren=function(t){var e=this;t.childNodes.forEach(function(t){e.unmountChildren(t)}),this.inited&&(t.isMutationObserved?t.dispatchEvent(xl):(xl.target=t,this.dispatchEvent(xl,!0)),t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1),t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()},e.mountChildren=function(t){var e=this;this.inited?t.isConnected||(t.ownerDocument=this.document,t.isConnected=!0,t.isMutationObserved?t.dispatchEvent(bl):(bl.target=t,this.dispatchEvent(bl,!0))):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName),t.childNodes.forEach(function(t){e.mountChildren(t)}),t.isCustomElement&&t.connectedCallback&&t.connectedCallback()},e.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},wi(t,[{key:"ready",get:function(){var e=this;return this.readyPromise||(this.readyPromise=new Promise(function(t){e.resolveReadyPromise=function(){t(e)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}}]),t}(Ao);function El(t,e){return(El=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}i=function(i){var t;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).landmarks=[],t.landmarkAnimationID=void 0,t}t=i,(n=e).prototype=Object.create(t.prototype),El(n.prototype.constructor=n,t);var n=e.prototype;return n.rotate=function(t,e,n){if(this.relElevation=ms(e),this.relAzimuth=ms(t),this.relRoll=ms(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===Rc.EXPLORING){e=re(ne(),[1,0,0],bs((this.rotateWorld?1:-1)*this.relElevation)),t=re(ne(),[0,1,0],bs((this.rotateWorld?1:-1)*this.relAzimuth)),n=re(ne(),[0,0,1],bs(this.relRoll)),t=ie(ne(),t,e),t=ie(ne(),t,n),e=Pt(ut(),t);bt(this.matrix,this.matrix,[0,0,-this.distance]),vt(this.matrix,this.matrix,e),bt(this.matrix,this.matrix,[0,0,this.distance])}else{if(90<Math.abs(this.elevation))return this;this.computeMatrix()}return this._getAxes(),this.type===Rc.ORBITING||this.type===Rc.EXPLORING?this._getPosition():this.type===Rc.TRACKING&&this._getFocalPoint(),this._update(),this},n.pan=function(t,e){t=vs(t,e,0),e=It(this.position);return zt(e,e,Vt(m(),this.right,t[0])),zt(e,e,Vt(m(),this.up,t[1])),this._setPosition(e),this.triggerUpdate(),this},n.dolly=function(t){var e=this.forward,n=It(this.position),t=(this.dollyingStep,this.distance+t*this.dollyingStep),t=Math.max(Math.min(t,this.maxDistance),this.minDistance)-this.distance;return n[0]+=t*e[0],n[1]+=t*e[1],n[2]+=t*e[2],this._setPosition(n),this.type===Rc.ORBITING||this.type===Rc.EXPLORING?this._getDistance():this.type===Rc.TRACKING&&zt(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},n.createLandmark=function(t,e){var e=e=void 0===e?{}:e,n=e.position,n=void 0===n?this.position:n,r=e.focalPoint,r=void 0===r?this.focalPoint:r,i=e.roll,e=e.zoom,a=new w.CameraContribution,n=(a.setType(this.type,void 0),a.setPosition(n[0],n[1]||this.position[1],n[2]||this.position[2]),a.setFocalPoint(r[0],r[1]||this.focalPoint[1],r[2]||this.focalPoint[2]),a.setRoll(i||this.roll),a.setZoom(e||this.zoom),{name:t,matrix:ht(a.getWorldTransform()),right:It(a.right),up:It(a.up),forward:It(a.forward),position:It(a.getPosition()),focalPoint:It(a.getFocalPoint()),distanceVector:It(a.getDistanceVector()),distance:a.getDistance(),dollyingStep:a.getDollyingStep(),azimuth:a.getAzimuth(),elevation:a.getElevation(),roll:a.getRoll(),relAzimuth:a.relAzimuth,relElevation:a.relElevation,relRoll:a.relRoll,zoom:a.getZoom()});return this.landmarks.push(n),n},n.gotoLandmark=function(e,t){var n,s,r,i,c,l,u,h,f,d,p,g,y=this,a=(void 0===t&&(t={}),hn(e)?this.landmarks.find(function(t){return t.name===e}):e);a&&(n=void 0===(n=(t=dn(t)?{duration:t}:t).easing)?"linear":n,r=t.duration,s=void 0===r?100:r,r=void 0===(r=t.easingFunction)?void 0:r,t=t.onfinish,i=void 0===t?void 0:t,c=.01,0===s?(this.syncFromLandmark(a),i&&i()):(void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID),l=a.position,u=a.focalPoint,h=a.zoom,f=a.roll,d=r||w.EasingFunction(n),g=function(){y.setFocalPoint(u),y.setPosition(l),y.setRoll(f),y.setZoom(h),y.computeMatrix(),y.triggerUpdate(),i&&i()},this.canvas.requestAnimationFrame(function t(e){var n,r,i,a,o,e=e-(p=void 0===p?e:p);s<e||(n=d(e/s),r=m(),i=m(),a=1,o=0,Ut(r,y.focalPoint,u,n),Ut(i,y.position,l,n),o=y.roll*(1-n)+f*n,a=y.zoom*(1-n)+h*n,y.setFocalPoint(r),y.setPosition(i),y.setRoll(o),y.setZoom(a),Jt(r,u)+Jt(i,l)<=c)?g():(y.computeMatrix(),y.triggerUpdate(),e<s&&(y.landmarkAnimationID=y.canvas.requestAnimationFrame(t)))})))},n.syncFromLandmark=function(t){this.matrix=ft(this.matrix,t.matrix),this.right=Bt(this.right,t.right),this.up=Bt(this.up,t.up),this.forward=Bt(this.forward,t.forward),this.position=Bt(this.position,t.position),this.focalPoint=Bt(this.focalPoint,t.focalPoint),this.distanceVector=Bt(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(Ec);function Ol(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 Sl(t,e,n){e&&Ol(t.prototype,e),n&&Ol(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function _l(t,e){return(_l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}w.CameraContribution=i;function Al(b,e,x,n){if(!(0<=b&&b<=1&&0<=x&&x<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===e&&x===n)return function(t){return t};for(var w=new(Jl?Float32Array:Array)(11),t=0;t<11;++t)w[t]=nu(.1*t,b,x);function r(t){for(var e=0,n=1;10!==n&&w[n]<=t;++n)e+=.1;var r=e+.1*((t-w[--n])/(w[n+1]-w[n])),i=ru(r,b,x);if(.001<=i){for(var a=t,o=r,s=b,c=x,l=0;l<$l;++l){var u=ru(o,s,c);if(0===u)return o;o-=(nu(o,s,c)-a)/u}return o}if(0===i)return r;for(var h,f,d=t,p=e,g=e+.1,y=b,m=x,v=0;0<(h=nu(f=p+(g-p)/2,y,m)-d)?g=f:p=f,Math.abs(h)>Kl&&++v<Zl;);return f}return function(t){return 0===t||1===t?t:nu(r(t),e,n)}}function Tl(t){return Math.pow(t,2)}function Pl(t){return Math.pow(t,3)}function Ll(t){return Math.pow(t,4)}function Nl(t){return Math.pow(t,5)}function Cl(t){return Math.pow(t,6)}function jl(t){return 1-Math.cos(t*Math.PI/2)}function Rl(t){return 1-Math.sqrt(1-t*t)}function Fl(t){return t*t*(3*t-2)}function Il(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}function Dl(t,e){var n=(e=e=void 0===e?[]:e)[0],e=void 0===(e=e[1])?.5:e,n=fn(Number(void 0===n?1:n),1,10),e=fn(Number(e),.1,2);return 0===t||1===t?t:-n*Math.pow(2,10*(t-1))*Math.sin((t-1-e/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/e)}function Bl(t,e,n){var r=(e=e=void 0===e?[]:e)[0],i=void 0===(i=e[1])?100:i,a=void 0===(a=e[2])?10:a,e=void 0===(e=e[3])?0:e,r=fn(void 0===r?1:r,.1,1e3),i=fn(i,.1,1e3),a=fn(a,.1,1e3),e=fn(e,.1,1e3),o=Math.sqrt(i/r),i=(a=a/(2*Math.sqrt(i*r)))<1?o*Math.sqrt(1-a*a):0,r=a<1?(a*o-e)/i:-e+o,e=n?n*t/1e3:t,e=a<1?Math.exp(-e*a*o)*(+Math.cos(i*e)+r*Math.sin(i*e)):(1+r*e)*Math.exp(-e*o);return 0===t||1===t?t:1-e}function Gl(t,e){var e=e=void 0===e?[]:e,n=void 0===(n=e[0])?10:n;return("start"==e[1]?Math.ceil:Math.floor)(fn(t,0,1)*n)/n}function zl(t,e){var n=(e=e=void 0===e?[]:e)[0],r=e[1],i=e[2],e=e[3];return Al(n,r,i,e)(t)}function Wl(r){return function(t,e,n){return 1-r(1-t,e=void 0===e?[]:e,n)}}function Vl(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?r(2*t,e,n)/2:1-r(-2*t+2,e,n)/2}}function Hl(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?(1-r(1-2*t,e,n))/2:(r(2*t-1,e,n)+1)/2}}function Yl(t){return t}var ql=function(i){var t,e;function n(t,e,n,r){t=i.call(this,t)||this;return t.currentTime=void 0,t.timelineTime=void 0,t.currentTime=n,t.timelineTime=r,t.target=e,t.type="finish",t.bubbles=!1,t.currentTarget=e,t.defaultPrevented=!1,t.eventPhase=t.AT_TARGET,t.timeStamp=Date.now(),t.currentTime=n,t.timelineTime=r,t}return e=i,(t=n).prototype=Object.create(e.prototype),_l(t.prototype.constructor=t,e),n}(So),Ul=0,Xl=function(){function t(t,e){this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._totalDuration=void 0,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,((this.effect=t).animation=this).timeline=e,this.id=""+Ul++,this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null==(t=this.effect)?void 0:t.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}var e=t.prototype;return e.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},e.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},e.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},e.finish=function(){this.updatePromises(),this._idle||(this.currentTime=0<this._playbackRate?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},e.updatePlaybackRate=function(t){this.playbackRate=t},e.targetAnimations=function(){var t;return(null==(t=this.effect)?void 0:t.target).getAnimations()},e.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},e.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},e.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},e.rewind=function(){if(0<=this.playbackRate)this.currentTime=0;else{if(!(this._totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}},e.persist=function(){throw new Error(gi)},e.addEventListener=function(t,e,n){throw new Error(gi)},e.removeEventListener=function(t,e,n){throw new Error(gi)},e.dispatchEvent=function(t){throw new Error(gi)},e.commitStyles=function(){throw new Error(gi)},e.ensureAlive=function(){var t;this.playbackRate<0&&0===this.currentTime?this._inEffect=!(null==(t=this.effect)||!t.update(-1)):this._inEffect=!(null==(t=this.effect)||!t.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},e.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=0<this._playbackRate?this._totalDuration:0),this.ensureAlive())},e.fireEvents=function(t){var e,n=this;this._isFinished?this._finishedFlag||(this.onfinish&&(e=new ql(null,this,this.currentTime,t),setTimeout(function(){n.onfinish&&n.onfinish(e)})),this._finishedFlag=!0):(this.onframe&&"running"===this.playState&&(t=new ql(null,this,this.currentTime,t),this.onframe(t)),this._finishedFlag=!1)},Sl(t,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var n=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(t,e){n.resolveReadyPromise=function(){t(n)},n.rejectReadyPromise=function(){e(new Error)}}),this.pending)||this.resolveReadyPromise(),this.readyPromise}},{key:"finished",get:function(){var n=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(t,e){n.resolveFinishedPromise=function(){t(n)},n.rejectFinishedPromise=function(){e(new Error)}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;t=Number(t),isNaN(t)||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))}},{key:"startTime",get:function(){return this._startTime},set:function(t){null!==t&&(this.updatePromises(),t=Number(t),isNaN(t)||this._paused||this._idle||(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()))}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){var e;t!==this._playbackRate&&(this.updatePromises(),e=this.currentTime,this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises())}},{key:"_isFinished",get:function(){return!this._idle&&(0<this._playbackRate&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}(),$l=4,Kl=1e-7,Zl=10,Jl="function"==typeof Float32Array,Ql=function(t,e){return 1-3*e+3*t},tu=function(t,e){return 3*e-6*t},eu=function(t){return 3*t},nu=function(t,e,n){return((Ql(e,n)*t+tu(e,n))*t+eu(e))*t},ru=function(t,e,n){return 3*Ql(e,n)*t*t+2*tu(e,n)*t+eu(e)},uo=Al(.42,0,1,1),iu={steps:Gl,"step-start":function(t){return Gl(t,[1,"start"])},"step-end":function(t){return Gl(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":zl,ease:function(t){return zl(t,[.25,.1,.25,1])},in:uo,out:Wl(uo),"in-out":Vl(uo),"out-in":Hl(uo),"in-quad":Tl,"out-quad":Wl(Tl),"in-out-quad":Vl(Tl),"out-in-quad":Hl(Tl),"in-cubic":Pl,"out-cubic":Wl(Pl),"in-out-cubic":Vl(Pl),"out-in-cubic":Hl(Pl),"in-quart":Ll,"out-quart":Wl(Ll),"in-out-quart":Vl(Ll),"out-in-quart":Hl(Ll),"in-quint":Nl,"out-quint":Wl(Nl),"in-out-quint":Vl(Nl),"out-in-quint":Hl(Nl),"in-expo":Cl,"out-expo":Wl(Cl),"in-out-expo":Vl(Cl),"out-in-expo":Hl(Cl),"in-sine":jl,"out-sine":Wl(jl),"in-out-sine":Vl(jl),"out-in-sine":Hl(jl),"in-circ":Rl,"out-circ":Wl(Rl),"in-out-circ":Vl(Rl),"out-in-circ":Hl(Rl),"in-back":Fl,"out-back":Wl(Fl),"in-out-back":Vl(Fl),"out-in-back":Hl(Fl),"in-bounce":Il,"out-bounce":Wl(Il),"in-out-bounce":Vl(Il),"out-in-bounce":Hl(Il),"in-elastic":Dl,"out-elastic":Wl(Dl),"in-out-elastic":Vl(Dl),"out-in-elastic":Hl(Dl),spring:Bl,"spring-in":Bl,"spring-out":Wl(Bl),"spring-in-out":Vl(Bl),"spring-out-in":Hl(Bl)},au=function(t){return("-"===(t=(t=t).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})).charAt(0)?t.substring(1):t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()};function ou(n,r){return function(t){var e;return 1<=t?1:(t+=r*(e=1/n))-t%e}}var yo="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",su=new RegExp("cubic-bezier\\("+yo+","+yo+","+yo+","+yo+"\\)"),cu=/steps\(\s*(\d+)\s*\)/,lu=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function uu(t){var e=su.exec(t);return e?Al.apply(void 0,e.slice(1).map(Number)):(e=cu.exec(t))?ou(Number(e[1]),0):(e=lu.exec(t))?ou(Number(e[1]),{start:1,middle:.5,end:0}[e[2]]):iu[au(t)]||iu.linear}function hu(t){return Math.abs((0!==(e=t).duration&&0!==e.iterations?("auto"===e.duration?0:Number(e.duration))*(null!=(e=e.iterations)?e:1):0)/(t.playbackRate||1));var e}var fu=0,du=1,pu=2,gu=3;function yu(t,e,n){l=t,i=n;var r,i,a,o,s,c=null===(c=e)?fu:(r=i.endTime,c<Math.min(i.delay,r)?du:c>=Math.min(i.delay+l+i.endDelay,r)?pu:gu),l=function(t,e,n,r,i){switch(r){case du:return"backwards"===e||"both"===e?0:null;case gu:return n-i;case pu:return"forwards"===e||"both"===e?t:null;case fu:return null}}(t,n.fill,e,c,n.delay);return null===l?null:(i="auto"===n.duration?0:n.duration,r=i,t=c,e=n.iterations,o=l,s=n.iterationStart,0===r?t!==du&&(s+=e):s+=o/r,e=t=s,o=n.iterationStart,s=c,a=n.iterations,l=l,i=i,e=o=0!==(o=e===1/0?o%1:e%1)||s!==pu||0===a||0===l&&0!==i?o:1,s=n.iterations,a=e,l=t,i=c===pu&&s===1/0?1/0:1===a?Math.floor(l)-1:Math.floor(l),o=n.direction,t=i,c=e,a="normal"===(s="normal"!==(s=o)&&"reverse"!==o&&(t=t,"alternate-reverse"===o&&(t+=1),s="normal",t!==1/0)&&t%2!=0?"reverse":s)?c:1-c,n.currentIteration=i,n.progress=a,n.easingFunction(a))}function mu(t,e,n){var a=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r]){var a;vu(i)&&(a={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:uu(t[r].easing)||e.easingFunction,value:t[r][i]},n[i]=n[i]||[],n[i].push(a))}return n}(t,e),o=function(t,e){var n,r=[];for(n in t)for(var i=t[n],a=0;a<i.length-1;a++){var o=a,s=a+1,c=i[o].computedOffset,l=i[s].computedOffset,u=c,h=l;0===a&&(u=-1/0,0===l)&&(s=o),a===i.length-2&&(h=1/0,1===c)&&(o=s),r.push({applyFrom:u,applyTo:h,startOffset:i[o].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[o].easingFunction,property:n,interpolation:function(t,e,n,r){var i=Bc[t];if(i&&i.syntax&&i.int){i=w.styleValueRegistry.getPropertySyntax(i.syntax);if(i){var a,o=w.styleValueRegistry.parseProperty(t,e,r),s=w.styleValueRegistry.parseProperty(t,n,r),o=w.styleValueRegistry.computeProperty(t,o,r),t=w.styleValueRegistry.computeProperty(t,s,r),s=i.mixer(o,t,r);if(s)return a=bu.apply(void 0,s),function(t){return 0===t?e:1===t?n:a(t)}}}return bu(!1,!0,function(t){return t?n:e})}(n,i[o].value,i[s].value,e)})}return r.sort(function(t,e){return t.startOffset-e.startOffset}),r}(a,n);return function(r,i){if(null!==i)o.filter(function(t){return i>=t.applyFrom&&i<t.applyTo}).forEach(function(t){var e=i-t.startOffset,n=t.endOffset-t.startOffset,e=0==n?0:t.easingFunction(e/n);r.style[t.property]=t.interpolation(e)});else for(var t in a)vu(t)&&(r.style[t]=null)}}function vu(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var bu=function(e,n,r){return function(t){return r(function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)&&e.length===n.length){for(var i=[],a=0;a<e.length;a++)i.push(t(e[a],n[a],r));return i}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(e,n,t))}};var xu=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Yl,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return Sl(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=uu(t),this._easing=t}}]),t}();function wu(t,i){if(null===t)return[];for(var e=(t=Array.isArray(t)?t:function(t){var e,n=[];for(e in t)if(!(e in["easing","offset","composite"]))for(var r,i=t[e],a=(i=Array.isArray(i)?i:[i]).length,o=0;o<a;o++)n[o]||(r={},"offset"in t&&(r.offset=Number(t.offset)),"easing"in t&&(r.easing=t.easing),"composite"in t&&(r.composite=t.composite),n[o]=r),void 0!==i[o]&&null!==i[o]&&(n[o][e]=i[o]);return n.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),n}(t)).map(function(t){var e,n={};for(e in null!=i&&i.composite&&(n.composite="auto"),t){var r=t[e];if("offset"===e){if(null!==r){if(r=Number(r),!isFinite(r))throw new Error("Keyframe offsets must be numbers.");if(r<0||1<r)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=r}}else if("composite"===e&&-1===["replace","add","accumulate","auto"].indexOf(r))throw new Error(r+" compositing is not supported");n[e]=r}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==i?void 0:i.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),n=!0,r=-1/0,a=0;a<e.length;a++){var o=e[a].offset;if(_(o))n=!1;else{if(o<r)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");r=o}}if(e=e.filter(function(t){return 0<=Number(t.offset)&&Number(t.offset)<=1}),!n)for(var s=e.length,c=(e[s-1].computedOffset=Number(null!=(t=e[s-1].offset)?t:1),1<s&&(e[0].computedOffset=Number(null!=(t=e[0].offset)?t:0)),0),l=Number(e[0].computedOffset),u=1;u<s;u++){var h=e[u].computedOffset;if(!_(h)&&!_(l)){for(var f=1;f<u-c;f++)e[c+f].computedOffset=l+(Number(h)-l)*f/(u-c);c=u,l=Number(h)}}return e}var ku="backwards|forwards|both|none".split("|"),Mu="reverse|alternate|alternate-reverse".split("|");function Eu(t,e){var n,r,i;return t=function(t){"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t});return t}(null!=(r=t)?r:{duration:"auto"}),n=t,r=e,i=new xu,r&&(i.fill="both",i.duration="auto"),"number"!=typeof n||isNaN(n)?void 0!==n&&Object.keys(n).forEach(function(t){void 0===n[t]||null===n[t]||"auto"===n[t]||!("number"!=typeof i[t]&&"duration"!==t||"number"==typeof n[t]&&!isNaN(n[t]))||"fill"===t&&-1===ku.indexOf(n[t])||"direction"===t&&-1===Mu.indexOf(n[t])||(i[t]=n[t])}):i.duration=n,i}var Ou=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=t,this.timing=Eu(n,!1),(this.timing.effect=this).timing.activeDuration=hu(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=wu(e,this.timing),this.interpolations=mu(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=yu(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=wu(t)},e.getComputedTiming=function(){return this.computedTiming},e.getTiming=function(){return this.timing},e.updateTiming=function(e){var n=this;Object.keys(e||{}).forEach(function(t){n.timing=e[t]})},t}();function Su(t,e){return Number(t.id)-Number(e.id)}n=function(){function t(t){var n=this;this.document=void 0,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.frameId=void 0,this.webAnimationsNextTick=function(t){n.currentTime=t,n.discardAnimations(),0===n.animations.length?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(e){var t=n.rafCallbacks;n.rafCallbacks=[],e<Number(n.currentTime)&&(e=Number(n.currentTime)),n.animations.sort(Su),n.animations=n.tick(e,!0,n.animations)[0],t.forEach(function(t){t[1](e)}),n.applyPendingEffects()},this.document=t}var e=t.prototype;return e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t,e,n){t=new Ou(t,e,n),e=new Xl(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},e.applyDirtiedAnimation=function(t){var e=this;this.inTick||(t.markTarget(),(t=t.targetAnimations()).sort(Su),this.tick(Number(this.currentTime),!1,t.slice())[1].forEach(function(t){t=e.animations.indexOf(t);-1!==t&&e.animations.splice(t,1)}),this.applyPendingEffects())},e.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},e.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},e.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){null!=t&&t.applyInterpolations()}),this.pendingEffects=[]},e.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},e.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},e.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},e.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},e.requestAnimationFrame=function(e){var n=this;return this.rAF(function(t){n.updateAnimationsPromises(),e(t),n.updateAnimationsPromises()})},e.tick=function(n,r,t){var i=this,a=(this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=n,this.ticking=!1,[]),o=[],s=[],c=[];return t.forEach(function(t){t.tick(n,r),t._inEffect?(o.push(t.effect),t.markTarget()):(a.push(t.effect),t.unmarkTarget()),t._needsTick&&(i.ticking=!0);var e=t._inEffect||t._needsTick;((t._inTimeline=e)?s:c).push(t)}),(t=this.pendingEffects).push.apply(t,a),(t=this.pendingEffects).push.apply(t,o),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,c]},t}();function _u(t,e){return(_u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Au(t,e){e=e.r;t.arc(e,e,e,0,2*Math.PI,!1)}function Tu(t,e){var n,r,i=e.rx,e=e.ry;t.ellipse?t.ellipse(i,e,i,e,0,0,2*Math.PI,!1):(n=e<i?i:e,r=e<i?1:i/e,e=e<i?e/i:1,t.save(),t.scale(r,e),t.arc(0,0,n,0,2*Math.PI))}function Pu(t,e){var n,r,i=e.x1,a=e.y1,o=e.x2,s=e.y2,c=e.defX,c=void 0===c?0:c,l=e.defY,l=void 0===l?0:l,u=e.markerStart,h=e.markerEnd,f=e.markerStartOffset,e=e.markerEndOffset,d=0,p=0,g=0,y=0,m=0;u&&u instanceof N&&f&&(n=o-i,r=s-a,m=Math.atan2(r,n),d=Math.cos(m)*(f||0),p=Math.sin(m)*(f||0)),h&&h instanceof N&&e&&(n=i-o,r=a-s,m=Math.atan2(r,n),g=Math.cos(m)*(e||0),y=Math.sin(m)*(e||0)),t.moveTo(i-c+d,a-l+p),t.lineTo(o-c+g,s-l+y)}function Lu(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,c=e.markerStartOffset,l=e.markerEndOffset,e=e.path,u=e.absolutePath,h=e.segments,f=0,d=0,p=0,g=0,e=0;i&&i instanceof N&&c&&(r=(i=i.parentNode.getStartTangent())[0],i=i[1],n=r[0]-i[0],r=r[1]-i[1],e=Math.atan2(r,n),f=Math.cos(e)*(c||0),d=Math.sin(e)*(c||0)),s&&s instanceof N&&l&&(c=(i=s.parentNode.getEndTangent())[0],s=i[1],n=c[0]-s[0],r=c[1]-s[1],e=Math.atan2(r,n),p=Math.cos(e)*(l||0),g=Math.sin(e)*(l||0));for(var y=0;y<u.length;y++){var m=u[y],v=m[0],b=u[y+1],x=0===y&&(0!==f||0!==d),w=(y===u.length-1||b&&("M"===b[0]||"Z"===b[0]))&&0!==p&&0!==g;switch(v){case"M":x?(t.moveTo(m[1]-a+f,m[2]-o+d),t.lineTo(m[1]-a,m[2]-o)):t.moveTo(m[1]-a,m[2]-o);break;case"L":w?t.lineTo(m[1]-a+p,m[2]-o+g):t.lineTo(m[1]-a,m[2]-o);break;case"Q":t.quadraticCurveTo(m[1]-a,m[2]-o,m[3]-a,m[4]-o),w&&t.lineTo(m[3]-a+p,m[4]-o+g);break;case"C":t.bezierCurveTo(m[1]-a,m[2]-o,m[3]-a,m[4]-o,m[5]-a,m[6]-o),w&&t.lineTo(m[5]-a+p,m[6]-o+g);break;case"A":var k,M,E=h[y].arcParams,O=E.cx,S=E.cy,_=E.rx,A=E.ry,T=E.startAngle,P=E.endAngle,L=E.xRotation,E=E.sweepFlag;t.ellipse?t.ellipse(O-a,S-o,_,A,L,T,P,!!(1-E)):(k=A<_?_:A,M=A<_?1:_/A,A=A<_?A/_:1,t.translate(O-a,S-o),t.rotate(L),t.scale(M,A),t.arc(0,0,k,T,P,!!(1-E)),t.scale(1/M,1/A),t.rotate(-L),t.translate(-(O-a),-(S-o))),w&&t.lineTo(m[6]-a+p,m[7]-o+g);break;case"Z":t.closePath()}}}function Nu(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,c=e.markerStartOffset,l=e.markerEndOffset,u=e.points.points,h=u.length,e=u[0][0]-a,f=u[0][1]-o,d=u[h-1][0]-a,p=u[h-1][1]-o,g=0,y=0,m=0,v=0,b=0;i&&i instanceof N&&c&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),g=Math.cos(b)*(c||0),y=Math.sin(b)*(c||0)),s&&s instanceof N&&l&&(n=u[h-1][0]-u[0][0],r=u[h-1][1]-u[0][1],b=Math.atan2(r,n),m=Math.cos(b)*(l||0),v=Math.sin(b)*(l||0)),t.moveTo(e+(g||m),f+(y||v));for(var x=1;x<h-1;x++){var w=u[x];t.lineTo(w[0]-a,w[1]-o)}t.lineTo(d,p)}function Cu(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,c=e.markerStartOffset,l=e.markerEndOffset,u=e.points.points,h=u.length,e=u[0][0]-a,f=u[0][1]-o,d=u[h-1][0]-a,p=u[h-1][1]-o,g=0,y=0,m=0,v=0,b=0;i&&i instanceof N&&c&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),g=Math.cos(b)*(c||0),y=Math.sin(b)*(c||0)),s&&s instanceof N&&l&&(n=u[h-2][0]-u[h-1][0],r=u[h-2][1]-u[h-1][1],b=Math.atan2(r,n),m=Math.cos(b)*(l||0),v=Math.sin(b)*(l||0)),t.moveTo(e+g,f+y);for(var x=1;x<h-1;x++){var w=u[x];t.lineTo(w[0]-a,w[1]-o)}t.lineTo(d+m,p+v)}function ju(t,e){var n,r,i,a,o=e.radius,s=e.width,e=e.height,c=s,l=e;o&&o.some(function(t){return 0!==t})?(n=(s=0<s?1:-1)+(e=0<e?1:-1)==0,r=(o=o.map(function(t){return fn(t,0,Math.min(Math.abs(c)/2,Math.abs(l)/2))}))[0],i=o[1],a=o[2],o=o[3],t.moveTo(s*r,0),t.lineTo(c-s*i,0),0!==i&&t.arc(c-s*i,e*i,i,-e*Math.PI/2,0<s?0:Math.PI,n),t.lineTo(c,l-e*a),0!==a&&t.arc(c-s*a,l-e*a,a,0<s?0:Math.PI,0<e?Math.PI/2:1.5*Math.PI,n),t.lineTo(s*o,l),0!==o&&t.arc(s*o,l-e*o,o,0<e?Math.PI/2:-Math.PI/2,0<s?Math.PI:0,n),t.lineTo(0,e*r),0!==r&&t.arc(s*r,e*r,r,0<s?Math.PI:0,0<e?1.5*Math.PI:Math.PI/2,n)):t.rect(0,0,c,l)}w.EasingFunction=uu,w.AnimationTimeline=n;var Ru=function(i){var t;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).name="canvas-path-generator",t}t=i,(n=e).prototype=Object.create(t.prototype),_u(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){(t={})[M.CIRCLE]=Au,t[M.ELLIPSE]=Tu,t[M.RECT]=ju,t[M.LINE]=Pu,t[M.POLYLINE]=Cu,t[M.POLYGON]=Nu,t[M.PATH]=Lu,t[M.TEXT]=void 0,t[M.GROUP]=void 0,t[M.IMAGE]=void 0,t[M.HTML]=void 0,t[M.MESH]=void 0;var t;this.context.pathGeneratorFactory=t},n.destroy=function(){delete this.context.pathGeneratorFactory},e}(Qc);function Fu(){Fu=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function Iu(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function Du(t,e){return(Du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Bu(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 Gu(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?Bu(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)?Bu(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.")}var zu=m(),Wu=m(),Vu=m(),Hu=ut(),Yu=function(){function s(){var o=this;this.canvasConfig=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.isHit=function(t,e,n,r){var i=o.pointInPathPickerFactory[t.nodeName];if(i){var n=yt(Hu,n),e=Xt(Wu,Gt(Vu,e[0],e[1],0),n),n=t.getGeometryBounds().halfExtents,a=t.parsedStyle.anchor;if(e[0]+=(a&&a[0]||0)*n[0]*2,e[1]+=(a&&a[1]||0)*n[1]*2,i(t,new Jr(e[0],e[1]),r,o.isPointInPath))return!0}return!1},this.isPointInPath=function(t,e){var n=w.offscreenCanvas.getOrCreateContext(o.canvasConfig.offscreenCanvas),r=o.pathGeneratorFactory[t.nodeName];return r&&(n.beginPath(),r(n,t.parsedStyle),n.closePath()),n.isPointInPath(e.x,e.y)}}var t=s.prototype;return t.apply=function(t){var n=this,e=t.config,r=t.renderingService,i=t.renderingContext,a=t.pathGeneratorFactory,t=t.pointInPathPickerFactory,o=(this.canvasConfig=e,this.pathGeneratorFactory=a,this.pointInPathPickerFactory=t,null==(e=i.root)?void 0:e.ownerDocument);r.hooks.pick.tapPromise(s.tag,function(){s=Fu().mark(function t(e){return Fu().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.pick(o,e));case 1:case"end":return t.stop()}},t)});var s,e=function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Iu(r,e,n,i,a,"next",t)}function a(t){Iu(r,e,n,i,a,"throw",t)}i(void 0)})};return function(t){return e.apply(this,arguments)}}()),r.hooks.pickSync.tap(s.tag,function(t){return n.pick(o,t)})},t.pick=function(t,e){for(var n=e.topmost,r=e.position,i=r.x,r=r.y,a=Gt(zu,i,r,0),o=[],s=Gu(t.elementsFromBBox(a[0],a[1],a[0],a[1]));!(c=s()).done;){var c=c.value,l=c.getWorldTransform();if(this.isHit(c,a,l,!1)){l=ui(c);if(l){l=l.parsedStyle.clipPath;if(this.isHit(l,a,l.getWorldTransform(),!0)){if(n)return e.picked=[c],e;o.push(c)}}else{if(n)return e.picked=[c],e;o.push(c)}}}return e.picked=o,e},s}();function qu(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Uu(t,e){return Math.abs(t-e)<.001}function Xu(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 $u(t){return(t+2*Math.PI)%(2*Math.PI)}Yu.tag="CanvasPicker";var Ku={box:function(t,e,n,r){return Xu([t,n],[e,r])},length:qu,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?qu(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?qu(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){n=[n-t,r-e];return be(n,[0,0])?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(me(r=[-n[1],n[0]],r),Math.abs(ve([i-t,a-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Zu(t,e,n,r,i,a){for(var o=-1,s=1/0,c=[n,r],l=20,u=1/(l=a&&200<a?a/10:l),h=u/10,f=0;f<=l;f++){var d=f*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=qu(c[0],c[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&&!(h<1e-4);g++){var y=o-h,m=o+h,v=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=qu(c[0],c[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=qu(c[0],c[1],y[0],y[1]),m<=1&&v<s?(o=m,s=v):h*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function Ju(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Qu(t,e,n){n=t+n-2*e;return Uu(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function th(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function eh(t,e,n,r,i,a,o){var s=Ju(t,n,i,o),c=Ju(e,r,a,o),l=Ku.pointAt(t,e,n,r,o),n=Ku.pointAt(n,r,i,a,o);return[[t,e,l.x,l.y,s,c],[s,c,n.x,n.y,i,a]]}function nh(t,e,n,r,i,a,o){return 0===o?(qu(t,e,n,r)+qu(n,r,i,a)+qu(t,e,i,a))/2:(e=(t=eh(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),nh.apply(void 0,e)+nh.apply(void 0,n))}var rh={box:function(t,e,n,r,i,a){var o=Qu(t,n,i)[0],s=Qu(e,r,a)[0],c=[t,i],l=[e,a];return void 0!==o&&c.push(Ju(t,n,i,o)),void 0!==s&&l.push(Ju(e,r,a,s)),Xu(c,l)},length:function(t,e,n,r,i,a){return nh(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return Zu([t,n,i],[e,r,a],o,s,Ju)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return qu(t.x,t.y,o,s)},interpolationAt:Ju,pointAt:function(t,e,n,r,i,a,o){return{x:Ju(t,n,i,o),y:Ju(e,r,a,o)}},divide:eh,tangentAngle:function(t,e,n,r,i,a,o){t=th(t,n,i,o),n=th(e,r,a,o);return $u(Math.atan2(n,t))}};function ih(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 ah(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 oh(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 Uu(r,0)?Uu(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Uu(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 sh(t,e,n,r,i,a,o,s,c){var l=ih(t,n,i,o,c),u=ih(e,r,a,s,c),h=Ku.pointAt(t,e,n,r,c),n=Ku.pointAt(n,r,i,a,c),r=Ku.pointAt(i,a,o,s,c),i=Ku.pointAt(h.x,h.y,n.x,n.y,c),a=Ku.pointAt(n.x,n.y,r.x,r.y,c);return[[t,e,h.x,h.y,i.x,i.y,l,u],[l,u,a.x,a.y,r.x,r.y,o,s]]}function ch(t,e,n,r,i,a,o,s,c){if(0===c){for(var l=[t,n,i,o],u=[e,r,a,s],h=0,f=l.length,d=0;d<f;d++)h+=qu(l[d],u[d],l[(d+1)%f],u[(d+1)%f]);return h/2}t=sh(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[c-1]),n=[].concat(t[1],[c-1]);return ch.apply(void 0,e)+ch.apply(void 0,n)}var lh={extrema:oh,box:function(t,e,n,r,i,a,o,s){for(var c=[t,o],l=[e,s],u=oh(t,n,i,o),h=oh(e,r,a,s),f=0;f<u.length;f++)c.push(ih(t,n,i,o,u[f]));for(var d=0;d<h.length;d++)l.push(ih(e,r,a,s,h[d]));return Xu(c,l)},length:function(t,e,n,r,i,a,o,s){return ch(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,c,l,u){return Zu([t,n,i,o],[e,r,a,s],c,l,ih,u)},pointDistance:function(t,e,n,r,i,a,o,s,c,l,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,c,l,u);return qu(t.x,t.y,c,l)},interpolationAt:ih,pointAt:function(t,e,n,r,i,a,o,s,c){return{x:ih(t,n,i,o,c),y:ih(e,r,a,s,c)}},divide:sh,tangentAngle:function(t,e,n,r,i,a,o,s,c){t=ah(t,n,i,o,c),n=ah(e,r,a,s,c);return $u(Math.atan2(n,t))}};function uh(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function hh(t,e,n,r,i,a){return t<=i&&i<=t+n&&e<=a&&a<=e+r}function fh(t,e,n,r,i,a,o,s){var c=(Math.atan2(s-e,o-t)+2*Math.PI)%(2*Math.PI),t={x:t+n*Math.cos(c),y:e+n*Math.sin(c)};return uh(t.x,t.y,o,s)<=a/2}function dh(t,e,n,r,i,a,o){var s=Math.min(t,n),c=Math.max(t,n),l=Math.min(e,r),u=Math.max(e,r),h=i/2;return s-h<=a&&a<=c+h&&l-h<=o&&o<=u+h&&Ku.pointToLine(t,e,n,r,a,o)<=i/2}function ph(t,e,n,r,i){var a=t.length;if(!(a<2)){for(var o=0;o<a-1;o++)if(dh(t[o][0],t[o][1],t[o+1][0],t[o+1][1],e,n,r))return!0;if(i){var i=t[0],s=t[a-1];if(dh(i[0],i[1],s[0],s[1],e,n,r))return!0}}return!1}var gh=1e-6;function yh(t){return Math.abs(t)<gh?0:t<0?-1:1}function mh(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var a,o,s,c=0;c<i;c++){var l=t[c],u=t[(c+1)%i];if(o=u,((s=[e,n])[0]-(a=l)[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!0;0<yh(l[1]-n)!=0<yh(u[1]-n)&&yh(e-(n-l[1])*(l[0]-u[0])/(l[1]-u[1])-l[0])<0&&(r=!r)}return r}function vh(t,e,n){for(var r=!1,i=0;i<t.length&&!(r=mh(t[i],e,n));i++);return r}function bh(t,e,n){var t=t.parsedStyle,r=t.r,i=t.fill,a=t.stroke,o=t.lineWidth,s=t.increasedLineWidthForHitTesting,t=t.pointerEvents,o=((o||0)+(s||0))/2,s=uh(r,r,e.x,e.y),e=hc(t,i,a),t=e[0],i=e[1];return t&&i||n?s<=r+o:t?s<=r:!!i&&r-o<=s&&s<=r+o}function xh(t,e,n,r){return t/(n*n)+e/(r*r)}function wh(t,e,n){var t=t.parsedStyle,r=t.rx,i=t.ry,a=t.fill,o=t.stroke,s=t.lineWidth,c=t.increasedLineWidthForHitTesting,t=t.pointerEvents,l=e.x,e=e.y,t=hc(t,a,o),a=t[0],o=t[1],t=((s||0)+(c||0))/2,s=(l-r)*(l-r),c=(e-i)*(e-i);return a&&o||n?xh(s,c,r+t,i+t)<=1:a?xh(s,c,r,i)<=1:!!o&&1<=xh(s,c,r-t,i-t)&&xh(s,c,r+t,i+t)<=1}function kh(t,e,n){var t=t.parsedStyle,r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.lineWidth,c=t.increasedLineWidthForHitTesting,l=t.defX,u=t.defY;return!(!hc(t.pointerEvents,t.fill,t.stroke)[1]&&!n||!s)&&dh(r,i,a,o,(s||0)+(c||0),e.x+(void 0===l?0:l),e.y+(void 0===u?0:u))}function Mh(t,e,n,r){var i=t.parsedStyle,a=i.lineWidth,o=i.increasedLineWidthForHitTesting,s=i.stroke,c=i.fill,l=i.defX,l=void 0===l?0:l,u=i.defY,u=void 0===u?0:u,h=i.path,i=hc(i.pointerEvents,c,s),c=i[0],s=i[1],i=h.segments,f=h.hasArc,d=h.polylines,h=h.polygons,p=Qs(t),g=!1;return c||n?f?r(t,e):vh(h,e.x+l,e.y+u)||vh(d,e.x+l,e.y+u):s||n?function(t,e,n,r,i){for(var a=!1,o=e/2,s=0;s<t.length;s++){var c=t[s],l=c.currentPoint,u=c.params,h=c.prePoint,f=c.box;if(!f||hh(f.x-o,f.y-o,f.width+e,f.height+e,n,r))switch(c.command){case"L":case"Z":if(a=dh(h[0],h[1],l[0],l[1],e,n,r))return!0;break;case"Q":if(a=rh.pointDistance(h[0],h[1],u[1],u[2],u[3],u[4],n,r)<=e/2)return!0;break;case"C":if(a=lh.pointDistance(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],n,r,i)<=e/2)return!0;break;case"A":c.cubicParams||(c.cubicParams=Ge(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var d=c.cubicParams,p=h,g=0;g<d.length;g+=6){var y=lh.pointDistance(p[0],p[1],d[g],d[g+1],d[g+2],d[g+3],d[g+4],d[g+5],n,r,i),p=[d[g+4],d[g+5]];if(a=y<=e/2)return!0}}}return a}(i,(a||0)+(o||0),e.x+l,e.y+u,p):g}function Eh(t,e,n){var t=t.parsedStyle,r=t.stroke,i=t.fill,a=t.lineWidth,o=t.increasedLineWidthForHitTesting,s=t.points,c=t.defX,c=void 0===c?0:c,l=t.defY,l=void 0===l?0:l,t=hc(t.pointerEvents,i,r),i=t[0],r=!1;return r=(r=t[1]||n?ph(s.points,(a||0)+(o||0),e.x+c,e.y+l,!0):r)||!i&&!n?r:mh(s.points,e.x+c,e.y+l)}function Oh(t,e,n){var t=t.parsedStyle,r=t.lineWidth,i=t.increasedLineWidthForHitTesting,a=t.points,o=t.defX,s=t.defY;return!(!hc(t.pointerEvents,t.fill,t.stroke)[1]&&!n||!r)&&ph(a.points,(r||0)+(i||0),e.x+(void 0===o?0:o),e.y+(void 0===s?0:s),!1)}function Sh(t,e,n,r){var i,a,o,s,c,l,u,h,f,d=t.parsedStyle,p=d.radius,g=d.fill,y=d.stroke,m=d.lineWidth,v=d.increasedLineWidthForHitTesting,b=d.width,x=d.height,d=hc(d.pointerEvents,g,y),g=d[0],y=d[1],d=(m||0)+(v||0);return p&&p.some(function(t){return 0!==t})?(m=!1,(y||n)&&(u=v=0,s=b,l=x,p=p.map(function(t){return fn(t,0,Math.min(Math.abs(b)/2,Math.abs(x)/2))}),f=d,i=e.x,a=e.y,h=p[0],o=p[1],c=p[2],p=p[3],m=dh(v+h,u,v+s-o,u,f,i,a)||dh(v+s,u+o,v+s,u+l-c,f,i,a)||dh(v+s-c,u+l,v+p,u+l,f,i,a)||dh(v,u+l-p,v,u+h,f,i,a)||fh(v+s-o,u+o,o,Math.PI,Math.PI,f,i,a)||fh(v+s-c,u+l-c,c,0,Math.PI,f,i,a)||fh(v+p,u+l-p,p,Math.PI,Math.PI,f,i,a)||fh(v+h,u+h,h,Math.PI,Math.PI,f,i,a)),m||!g&&!n?m:r(t,e)):(o=d/2,g&&y||n?hh(0-o,0-o,b+o,x+o,e.x,e.y):g?hh(0,0,b,x,e.x,e.y):!!y&&(c=s=0,l=b,p=x,v=d,u=e.x,h=e.y,hh(s-(f=v/2),c-f,l,v,u,h)||hh(s+l-f,c-f,v,p,u,h)||hh(s+f,c+p-f,l,v,u,h)||hh(s-f,c+f,v,p,u,h)))}var _h=function(i){var t;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).name="canvas-picker",t}t=i,(n=e).prototype=Object.create(t.prototype),Du(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){function t(){return!0}(e={})[M.CIRCLE]=bh,e[M.ELLIPSE]=wh,e[M.RECT]=Sh,e[M.LINE]=kh,e[M.POLYLINE]=Oh,e[M.POLYGON]=Eh,e[M.PATH]=Mh,e[M.TEXT]=t,e[M.GROUP]=null,e[M.IMAGE]=t,e[M.HTML]=null,e[M.MESH]=null;var e;this.context.pointInPathPickerFactory=e,this.addRenderingPlugin(new Yu)},n.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(Qc);function Ah(){Ah=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function Th(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function Ph(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Th(r,e,n,i,a,"next",t)}function a(t){Th(r,e,n,i,a,"throw",t)}i(void 0)})}}function Lh(){return(Lh=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 Nh(t,e){return(Nh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Ch=function(){function r(t){this.canvasRendererPluginOptions=void 0,this.context=void 0,this.pathGeneratorFactory=void 0,this.rBush=void 0,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=ut(),this.dprMatrix=ut(),this.tmpMat4=ut(),this.vec3a=m(),this.vec3b=m(),this.vec3c=m(),this.vec3d=m(),this.canvasRendererPluginOptions=t}var t=r.prototype;return t.apply=function(t){function a(t){(t=t.target.rBushNode).aabb&&u.removedRBushNodeAABBs.push(t.aabb)}function o(t){(t=t.target.rBushNode).aabb&&u.removedRBushNodeAABBs.push(t.aabb)}function l(t,e){t.isVisible()&&!t.isCulled()&&(u.renderDisplayObject(t,e,u.context,u.restoreStack),u.saveDirtyAABB(t)),(t.sortable.sorted||t.childNodes).forEach(function(t){l(t,e)})}var u=this,h=(this.context=t).config,f=t.camera,c=t.renderingService,d=t.renderingContext,e=t.rBushRoot,n=t.pathGeneratorFactory,p=(this.rBush=e,this.pathGeneratorFactory=n,t.contextService),g=d.root.ownerDocument.defaultView;c.hooks.init.tapPromise(r.tag,Ph(Ah().mark(function t(){var e,n,r,i;return Ah().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:g.addEventListener(y.UNMOUNTED,a),g.addEventListener(y.CULLED,o),e=p.getDPR(),n=h.width,r=h.height,i=p.getContext(),u.clearRect(i,0,0,n*e,r*e,h.background);case 6:case"end":return t.stop()}},t)}))),c.hooks.destroy.tap(r.tag,function(){g.removeEventListener(y.UNMOUNTED,a),g.removeEventListener(y.CULLED,o)}),c.hooks.beginFrame.tap(r.tag,function(){var t=p.getContext(),e=p.getDPR(),n=h.width,r=h.height,i=u.canvasRendererPluginOptions,a=i.dirtyObjectNumThreshold,i=i.dirtyObjectRatioThreshold,o=c.getStats(),s=o.total,o=o.rendered,s=o/s;u.clearFullScreen=c.disableDirtyRectangleRendering()||a<o&&i<s,t&&(t.resetTransform(),u.clearFullScreen)&&u.clearRect(t,0,0,n*e,r*e,h.background)});c.hooks.endFrame.tap(r.tag,function(){var e=p.getContext(),t=p.getDPR();if(Et(u.dprMatrix,k(t,t,1)),vt(u.vpMatrix,u.dprMatrix,f.getOrthoMatrix()),u.clearFullScreen)l(d.root,e);else{t=u.safeMergeAABB.apply(u,[u.mergeDirtyAABBs(u.renderQueue)].concat(u.removedRBushNodeAABBs.map(function(t){var e=t.minX,n=t.minY,r=t.maxX,t=t.maxY,i=new $r;return i.setMinMax(k(e,n,0),k(r,t,0)),i})));if(u.removedRBushNodeAABBs=[],$r.isEmpty(t))return void(u.renderQueue=[]);var n=u.convertAABB2Rect(t),r=n.x,i=n.y,a=n.width,n=n.height,o=Xt(u.vec3a,k(r,i,0),u.vpMatrix),s=Xt(u.vec3b,k(r+a,i,0),u.vpMatrix),c=Xt(u.vec3c,k(r,i+n,0),u.vpMatrix),r=Xt(u.vec3d,k(r+a,i+n,0),u.vpMatrix),a=Math.min(o[0],s[0],r[0],c[0]),i=Math.min(o[1],s[1],r[1],c[1]),n=Math.max(o[0],s[0],r[0],c[0]),o=Math.max(o[1],s[1],r[1],c[1]),s=Math.floor(a),r=Math.floor(i),c=Math.ceil(n-a),n=Math.ceil(o-i);e.save(),u.clearRect(e,s,r,c,n,h.background),e.beginPath(),e.rect(s,r,c,n),e.clip(),e.setTransform(u.vpMatrix[0],u.vpMatrix[1],u.vpMatrix[4],u.vpMatrix[5],u.vpMatrix[12],u.vpMatrix[13]),h.renderer.getConfig().enableDirtyRectangleRenderingDebug&&g.dispatchEvent(new _o(Uc.DIRTY_RECTANGLE,{dirtyRect:{x:s,y:r,width:c,height:n}})),u.searchDirtyObjects(t).sort(function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}).forEach(function(t){t&&t.isVisible()&&!t.isCulled()&&u.renderDisplayObject(t,e,u.context,u.restoreStack)}),e.restore(),u.renderQueue.forEach(function(t){u.saveDirtyAABB(t)}),u.renderQueue=[]}u.restoreStack.forEach(function(){e.restore()}),u.restoreStack=[]}),c.hooks.render.tap(r.tag,function(t){u.clearFullScreen||u.renderQueue.push(t)})},t.clearRect=function(t,e,n,r,i,a){t.clearRect(e,n,r,i),a&&(t.fillStyle=a,t.fillRect(e,n,r,i))},t.renderDisplayObject=function(t,e,n,r){var i,a=t.nodeName,o=r[r.length-1],o=(!o||t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINS||(e.restore(),r.pop()),this.context.styleRendererFactory[a]),a=this.pathGeneratorFactory[a],s=t.parsedStyle.clipPath;s&&(this.applyWorldTransform(e,s),i=this.pathGeneratorFactory[s.nodeName])&&(e.save(),r.push(t),e.beginPath(),i(e,s.parsedStyle),e.closePath(),e.clip()),o&&(this.applyWorldTransform(e,t),e.save(),this.applyAttributesToContext(e,t)),a&&(e.beginPath(),a(e,t.parsedStyle),t.nodeName!==M.LINE)&&t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&e.closePath(),o&&(o.render(e,t.parsedStyle,t,n,this),e.restore()),t.renderable.dirty=!1},t.convertAABB2Rect=function(t){var e=t.getMin(),t=t.getMax(),n=Math.floor(e[0]),e=Math.floor(e[1]);return{x:n,y:e,width:Math.ceil(t[0])-n,height:Math.ceil(t[1])-e}},t.mergeDirtyAABBs=function(t){var n=new $r;return t.forEach(function(t){var e=t.getRenderBounds(),e=(n.add(e),t.renderable.dirtyRenderBounds);e&&n.add(e)}),n},t.searchDirtyObjects=function(t){var e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return this.rBush.search({minX:n,minY:e,maxX:r,maxY:t}).map(function(t){t=t.id;return w.displayObjectPool.getByEntity(t)})},t.saveDirtyAABB=function(t){var e=t.renderable,t=(e.dirtyRenderBounds||(e.dirtyRenderBounds=new $r),t.getRenderBounds());t&&e.dirtyRenderBounds.update(t.center,t.halfExtents)},t.applyAttributesToContext=function(t,e){var n=e.parsedStyle,r=n.stroke,i=n.fill,a=n.opacity,o=n.lineDash,n=n.lineDashOffset;o&&t.setLineDash(o),_(n)||(t.lineDashOffset=n),_(a)||(t.globalAlpha*=a),_(r)||Array.isArray(r)||r.isNone||(t.strokeStyle=e.attributes.stroke),_(i)||Array.isArray(i)||i.isNone||(t.fillStyle=e.attributes.fill)},t.applyWorldTransform=function(t,e,n){var r=0,i=0,a=(e.parsedStyle||{}).anchor,o=a&&a[0]||0,a=a&&a[1]||0;0===o&&0===a||(r=-o*((o=e.getGeometryBounds())&&2*o.halfExtents[0]||0),i=-a*(o&&2*o.halfExtents[1]||0)),n?(ft(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,bt(this.tmpMat4,this.tmpMat4,this.vec3a),vt(this.tmpMat4,n,this.tmpMat4)):(ft(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,bt(this.tmpMat4,this.tmpMat4,this.vec3a)),vt(this.tmpMat4,this.vpMatrix,this.tmpMat4),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},t.safeMergeAABB=function(){for(var e=new $r,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){e.add(t)}),e},r}(),jh=(Ch.tag="CanvasRenderer",function(){function t(t){this.imagePool=void 0,this.imagePool=t}var e=t.prototype;return e.render=function(t,e,n,r,i){var a=e.fill,o=e.fillRule,s=e.opacity,c=e.fillOpacity,l=e.stroke,u=e.strokeOpacity,h=e.lineWidth,f=e.lineCap,d=e.lineJoin,p=e.shadowType,g=e.shadowColor,y=e.shadowBlur,m=e.filter,e=e.miterLimit,v=!_(a)&&!a.isNone,b=!_(l)&&!l.isNone&&0<h,x=0===a.alpha,m=!(!m||!m.length),g=!_(g)&&0<y,y=n.nodeName,p="inner"===p,y=b&&g&&(y===M.PATH||y===M.LINE||y===M.POLYLINE||x||p);v&&(t.globalAlpha=s*c,y||Rh(n,t,g),this.fill(t,n,a,o,r,i),y||this.clearShadowAndFilter(t,m,g)),b&&(t.globalAlpha=s*u,t.lineWidth=h,_(e)||(t.miterLimit=e),_(f)||(t.lineCap=f),_(d)||(t.lineJoin=d),y&&(p&&(t.globalCompositeOperation="source-atop"),Rh(n,t,!0),p)&&(this.stroke(t,n,l,r,i),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,m,!0)),this.stroke(t,n,l,r,i))},e.clearShadowAndFilter=function(t,e,n){n&&(t.shadowColor="transparent",t.shadowBlur=0),e&&(n=t.filter,!_(n))&&-1<n.indexOf("drop-shadow")&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")},e.fill=function(e,n,t,r,i,a){var o=this;Array.isArray(t)?t.forEach(function(t){e.fillStyle=o.getColor(t,n,e),e.fill(r)}):(ba(t)&&(e.fillStyle=this.getPattern(t,n,e,i,a)),e.fill(r))},e.stroke=function(e,n,t,r,i){var a=this;Array.isArray(t)?t.forEach(function(t){e.strokeStyle=a.getColor(t,n,e),e.stroke()}):(ba(t)&&(e.strokeStyle=this.getPattern(t,n,e,r,i)),e.stroke())},e.getPattern=function(t,e,n,r,i){var a,o,s,c,l,u,h;return t.image instanceof ps&&(a=(o=t.image.parsedStyle).width,o=o.height,s=r.contextService.getDPR(),c=r.config.offscreenCanvas,(l=w.offscreenCanvas.getOrCreateCanvas(c)).width=a*s,l.height=o*s,u=w.offscreenCanvas.getOrCreateContext(c),h=[],t.image.forEach(function(t){i.renderDisplayObject(t,u,r,h)}),h.forEach(function(){u.restore()})),this.imagePool.getOrCreatePatternSync(t,n,l,s,function(){e.renderable.dirty=!0,r.renderingService.dirtify()})},e.getColor=function(t,e,n){var r;return t.type!==Ni.LinearGradient&&t.type!==Ni.RadialGradient||(r=(e=e.getGeometryBounds())&&2*e.halfExtents[0]||1,e=e&&2*e.halfExtents[1]||1,r=this.imagePool.getOrCreateGradient(Lh({type:t.type},t.value,{width:r,height:e}),n)),r},t}());function Rh(t,e,n){var r=t.parsedStyle,i=r.filter,a=r.shadowColor,o=r.shadowBlur,s=r.shadowOffsetX,r=r.shadowOffsetY;i&&i.length&&(e.filter=t.style.filter),n&&(e.shadowColor=a.toString(),e.shadowBlur=o||0,e.shadowOffsetX=s||0,e.shadowOffsetY=r||0)}var Fh=function(){function t(t){this.imagePool=void 0,this.imagePool=t}return t.prototype.render=function(t,e,n){var r=e.width,i=e.height,a=e.img,o=e.shadowColor,e=e.shadowBlur,a=hn(a)?this.imagePool.getImageSync(a):(r=r||a.width,i=i||a.height,a);if(a){Rh(n,t,!_(o)&&0<e);try{t.drawImage(a,0,0,r,i)}catch(t){}}},t}(),Ih=function(){function t(){}var e=t.prototype;return e.render=function(t,e,n){var r=e.lineWidth,i=e.textAlign,a=e.textBaseline,o=e.lineJoin,s=e.miterLimit,c=e.letterSpacing,l=e.stroke,u=e.fill,h=e.fillOpacity,f=e.strokeOpacity,d=e.opacity,p=e.metrics,g=e.dx,y=e.dy,m=e.shadowColor,e=e.shadowBlur,v=p.font,b=p.lines,x=p.height,w=p.lineHeight,k=p.lineMetrics,M=(t.font=v,t.lineWidth=r,t.textAlign="middle"===i?"center":i,t.textBaseline=a,t.lineJoin=o,_(s)||(t.miterLimit=s),0),E=("middle"===a?M=-x/2-w/2:"bottom"===a||"alphabetic"===a||"ideographic"===a?M=-x:"top"!==a&&"hanging"!==a||(M=-w),g||0);M+=y||0,Rh(n,t,!_(m)&&0<e);for(var O=0;O<b.length;O++){var S=r/2+E;M+=w,_(l)||l.isNone||!r||this.drawLetterSpacing(t,b[O],k[O],i,S,M,c,h,f,d,!0),_(u)||this.drawLetterSpacing(t,b[O],k[O],i,S,M,c,h,f,d)}},e.drawLetterSpacing=function(t,e,n,r,i,a,o,s,c,l,u){if(void 0===u&&(u=!1),0===o)u?this.strokeText(t,e,i,a,c):this.fillText(t,e,i,a,s,l);else{for(var h=t.textAlign,f=(t.textAlign="left",i),d=("center"===r||"middle"===r?f=i-n.width/2:"right"!==r&&"end"!==r||(f=i-n.width),Array.from(e)),p=t.measureText(e).width,g=0;g<d.length;++g){var y=d[g];u?this.strokeText(t,y,f,a,c):this.fillText(t,y,f,a,s,l),f+=p-(y=t.measureText(e.substring(g+1)).width)+o,p=y}t.textAlign=h}},e.fillText=function(t,e,n,r,i,a){var o,s=!_(i)&&1!==i;s&&(o=t.globalAlpha,t.globalAlpha=i*a),t.fillText(e,n,r),s&&(t.globalAlpha=o)},e.strokeText=function(t,e,n,r,i){var a,o=!_(i)&&1!==i;o&&(a=t.globalAlpha,t.globalAlpha=i),t.strokeText(e,n,r),o&&(t.globalAlpha=a)},t}(),Dh=function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="canvas-renderer",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),Nh(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){var t,e=Lh({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,r=new jh(n),n=((t={})[M.CIRCLE]=r,t[M.ELLIPSE]=r,t[M.RECT]=r,t[M.IMAGE]=new Fh(n),t[M.TEXT]=new Ih,t[M.LINE]=r,t[M.POLYLINE]=r,t[M.POLYGON]=r,t[M.PATH]=r,t[M.GROUP]=void 0,t[M.HTML]=void 0,t[M.MESH]=void 0,t);this.context.defaultStyleRendererFactory=n,this.context.styleRendererFactory=n,this.addRenderingPlugin(new Ch(e))},r.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(Qc);function Bh(){Bh=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function Gh(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function zh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Gh(r,e,n,i,a,"next",t)}function a(t){Gh(r,e,n,i,a,"throw",t)}i(void 0)})}}function Wh(t,e){return(Wh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Vh=function(){function r(){this.context=void 0}return r.prototype.apply=function(t){function i(t){e.hooks.pointerWheel.call(t)}var a=this,e=t.renderingService,n=t.renderingContext,o=(this.context=t,n.root.ownerDocument.defaultView),s=function(t){e.hooks.pointerMove.call(t)},c=function(t){e.hooks.pointerUp.call(t)},l=function(t){e.hooks.pointerDown.call(t)},u=function(t){e.hooks.pointerOver.call(t)},h=function(t){e.hooks.pointerOut.call(t)},f=function(t){e.hooks.pointerCancel.call(t)};e.hooks.init.tapPromise(r.tag,zh(Bh().mark(function t(){var r;return Bh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=a.context.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(r.style.msContentZooming="none",r.style.msTouchAction="none"):o.supportsPointerEvents&&(r.style.touchAction="none"),o.supportsPointerEvents?(n=r,globalThis.document.addEventListener("pointermove",s,!0),n.addEventListener("pointerdown",l,!0),n.addEventListener("pointerleave",h,!0),n.addEventListener("pointerover",u,!0),globalThis.addEventListener("pointerup",c,!0)):(n=r,globalThis.document.addEventListener("mousemove",s,!0),n.addEventListener("mousedown",l,!0),n.addEventListener("mouseout",h,!0),n.addEventListener("mouseover",u,!0),globalThis.addEventListener("mouseup",c,!0)),o.supportsTouchEvents&&((e=r).addEventListener("touchstart",l,!0),e.addEventListener("touchend",c,!0),e.addEventListener("touchmove",s,!0),e.addEventListener("touchcancel",f,!0)),r.addEventListener("wheel",i,{passive:!0,capture:!0});case 5:case"end":return t.stop()}var e,n},t)}))),e.hooks.destroy.tap(r.tag,function(){var t,e,n=a.context.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="",n.style.msTouchAction=""):o.supportsPointerEvents&&(n.style.touchAction=""),o.supportsPointerEvents?(t=n,globalThis.document.removeEventListener("pointermove",s,!0),t.removeEventListener("pointerdown",l,!0),t.removeEventListener("pointerleave",h,!0),t.removeEventListener("pointerover",u,!0),globalThis.removeEventListener("pointerup",c,!0)):(t=n,globalThis.document.removeEventListener("mousemove",s,!0),t.removeEventListener("mousedown",l,!0),t.removeEventListener("mouseout",h,!0),t.removeEventListener("mouseover",u,!0),globalThis.removeEventListener("mouseup",c,!0)),o.supportsTouchEvents&&((e=n).removeEventListener("touchstart",l,!0),e.removeEventListener("touchend",c,!0),e.removeEventListener("touchmove",s,!0),e.removeEventListener("touchcancel",f,!0)),n.removeEventListener("wheel",i,!0)})},r}(),Hh=(Vh.tag="DOMInteraction",function(i){var t;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).name="dom-interaction",t}t=i,(n=e).prototype=Object.create(t.prototype),Wh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new Vh)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Qc));function Yh(){Yh=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function qh(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function Uh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){qh(r,e,n,i,a,"next",t)}function a(t){qh(r,e,n,i,a,"throw",t)}i(void 0)})}}function Xh(t,e){return(Xh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var $h=function(){function d(){this.context=void 0,this.$camera=void 0}var t=d.prototype;return t.joinTransformMatrix=function(t){return"matrix("+[t[0],t[1],t[4],t[5],t[12],t[13]].join(",")+")"},t.apply=function(t){function i(t,e){e.style.transform=s.joinTransformMatrix(t.getWorldTransform())}function e(t){var e,n,r=t.target;r.nodeName===M.HTML&&(s.$camera||(s.$camera=s.createCamera(c)),e=s.getOrCreateEl(r),s.$camera.appendChild(e),n=r.ownerDocument.documentElement.attributes,Object.keys(n).forEach(function(t){e.style[t]=n[t]}),Object.keys(r.attributes).forEach(function(t){s.updateAttribute(t,r)}),i(r,e))}function n(t){(t=t.target).nodeName===M.HTML&&s.$camera&&(t=s.getOrCreateEl(t))&&t.remove()}function r(t){var e=t.target;e.nodeName===M.HTML&&(t=t.attrName,s.updateAttribute(t,e))}function a(t){var e;(t=t.target).nodeName===M.HTML&&(e=s.getOrCreateEl(t),i(t,e))}function o(){var t,e;s.$camera&&(t=(e=s.context.config).width,e=e.height,s.$camera.style.width=(t||0)+"px",s.$camera.style.height=(e||0)+"px")}var s=this,c=t.camera,l=t.renderingContext,u=t.renderingService,h=t.displayObjectPool,f=(this.context=t,l.root.ownerDocument.defaultView);u.hooks.init.tapPromise(d.tag,Uh(Yh().mark(function t(){return Yh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:h.getHTMLs().length&&(s.$camera=s.createCamera(c)),f.addEventListener(Uc.RESIZE,o),f.addEventListener(y.MOUNTED,e),f.addEventListener(y.UNMOUNTED,n),f.addEventListener(y.ATTR_MODIFIED,r),f.addEventListener(y.BOUNDS_CHANGED,a);case 6:case"end":return t.stop()}},t)}))),u.hooks.endFrame.tap(d.tag,function(){s.$camera&&l.renderReasons.has(qc.CAMERA_CHANGED)&&(s.$camera.style.transform=s.joinTransformMatrix(c.getOrthoMatrix()))}),u.hooks.destroy.tap(d.tag,function(){s.$camera&&s.$camera.remove(),f.removeEventListener(Uc.RESIZE,o),f.removeEventListener(y.MOUNTED,e),f.removeEventListener(y.UNMOUNTED,n),f.removeEventListener(y.ATTR_MODIFIED,r),f.removeEventListener(y.BOUNDS_CHANGED,a)})},t.getId=function(t){return t.id||"g-html-"+t.entity},t.createCamera=function(t){var e,n,r=this.context.config,i=r.document,a=r.width,r=r.height,o=this.context.contextService.getDomElement(),s=o.parentNode;return s?((n=s.querySelector("#"+(e="g-canvas-camera")))||((n=i=(i||document).createElement("div")).id=e,i.style.position="absolute",i.style.left=(o.offsetLeft||0)+"px",i.style.top=(o.offsetTop||0)+"px",i.style.transformOrigin="left top",i.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),i.style.overflow="hidden",i.style.pointerEvents="none",i.style.width=(a||0)+"px",i.style.height=(r||0)+"px",s.appendChild(i)),n):null},t.getOrCreateEl=function(t){var e=this.context.config.document,n=this.getId(t),r=this.$camera.querySelector("#"+n);return r||(r=(e||document).createElement("div"),(t.parsedStyle.$el=r).id=n,t.name&&r.setAttribute("name",t.name),t.className&&(r.className=t.className),r.style.position="absolute",r.style.left="0px",r.style.top="0px",r.style["will-change"]="transform",r.style.transform=this.joinTransformMatrix(t.getWorldTransform())),r},t.updateAttribute=function(t,e){var n=this.getOrCreateEl(e);switch(t){case"innerHTML":var r=e.parsedStyle.innerHTML;hn(r)?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"transformOrigin":r=e.parsedStyle.transformOrigin;n.style["transform-origin"]=r[0].value+" "+r[1].value;break;case"width":r=e.computedStyleMap().get("width");n.style.width=r.toString();break;case"height":r=e.computedStyleMap().get("height");n.style.height=r.toString();break;case"zIndex":r=e.parsedStyle.zIndex;n.style["z-index"]=""+r;break;case"visibility":r=e.parsedStyle.visibility;n.style.visibility=r;break;case"pointerEvents":r=e.parsedStyle.pointerEvents;n.style.pointerEvents=r;break;case"opacity":r=e.parsedStyle.opacity;n.style.opacity=""+r;break;case"fill":var r=e.parsedStyle.fill,i="";r instanceof ra?i=r.isNone?"transparent":e.getAttribute("fill"):Array.isArray(r)?i=e.getAttribute("fill"):ba(r),n.style.background=i;break;case"stroke":r=e.parsedStyle.stroke,i="";r instanceof ra?i=r.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(r)?i=e.getAttribute("stroke"):ba(r),n.style["border-color"]=i,n.style["border-style"]="solid";break;case"lineWidth":r=e.parsedStyle.lineWidth;n.style["border-width"]=(r||0)+"px";break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":i=e.style.filter;n.style.filter=i}},d}(),Kh=($h.tag="HTMLRendering",function(i){var t;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).name="html-renderer",t}t=i,(n=e).prototype=Object.create(t.prototype),Xh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new $h)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Qc));function Zh(){Zh=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function Jh(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function Qh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Jh(r,e,n,i,a,"next",t)}function a(t){Jh(r,e,n,i,a,"throw",t)}i(void 0)})}}function tf(t,e){return(tf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var ef="undefined"!=typeof Float32Array?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var nf=function(){function t(t){this.canvasConfig=void 0,this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=t}var e=t.prototype;return e.getImageSync=function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then(function(){e&&e()}),this.imageCache[t]},e.getOrCreateImage=function(r){var i,a=this;return this.imageCache[r]?Promise.resolve(this.imageCache[r]):(i=this.canvasConfig.createImage,new Promise(function(t,e){var n;i?n=i(r):ci&&(n=new window.Image),n&&(n.onload=function(){t(n)},n.onerror=function(t){e(t)},n.crossOrigin="Anonymous",n.src=r,a.imageCache[r]=n)}))},e.getOrCreatePatternSync=function(t,e,n,r,i){var a,o,s,c,l=this.generatePatternKey(t);return l&&this.patternCache[l]?this.patternCache[l]:(c=t.image,s=t.repetition,t=t.transform,a=!1,hn(c)?o=this.getImageSync(c,i):n?(o=n,a=!0):o=c,(i=o&&e.createPattern(o,s))&&(e=t?Ts(qa(t)):(n=new ef(16),ef!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0),n[0]=1,n[5]=1,n[10]=1,n[15]=1,(c=n)[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=1,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=1,c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c),a&&(s=o=e,n=(t=[1/r,1/r,1])[0],c=t[1],t=t[2],o[0]=s[0]*n,o[1]=s[1]*n,o[2]=s[2]*n,o[3]=s[3]*n,o[4]=s[4]*c,o[5]=s[5]*c,o[6]=s[6]*c,o[7]=s[7]*c,o[8]=s[8]*t,o[9]=s[9]*t,o[10]=s[10]*t,o[11]=s[11]*t,o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),i.setTransform({a:e[0],b:e[1],c:e[4],d:e[5],e:e[12],f:e[13]})),l&&i&&(this.patternCache[l]=i),i)},e.getOrCreateGradient=function(t,e){var r,n,i,a,o,s=this.generateGradientKey(t),c=t.type,l=t.steps,u=t.width,h=t.height,f=t.angle,d=t.cx,p=t.cy,t=t.size;return this.gradientCache[s]||(r=null,c===Ni.LinearGradient?(n=u,i=h,f=bs((f=f).value),a=0+n/2,o=0+i/2,n=Math.abs(n*Math.cos(f))+Math.abs(i*Math.sin(f)),i={x1:a-Math.cos(f)*n/2,y1:o-Math.sin(f)*n/2,x2:a+Math.cos(f)*n/2,y2:o+Math.sin(f)*n/2},r=e.createLinearGradient(i.x1,i.y1,i.x2,i.y2)):c===Ni.RadialGradient&&(a=u,o=h,f=p,n=t,c=(i=d).value,u=f.value,i.unit===g.kPercentage&&(c=i.value/100*a),f.unit===g.kPercentage&&(u=f.value/100*o),i=Math.max(We([0,0],[c,u]),We([0,o],[c,u]),We([a,o],[c,u]),We([a,0],[c,u])),n&&(n instanceof qi?i=n.value:n instanceof Ii&&("closest-side"===n.value?i=Math.min(c,a-c,u,o-u):"farthest-side"===n.value?i=Math.max(c,a-c,u,o-u):"closest-corner"===n.value&&(i=Math.min(We([0,0],[c,u]),We([0,o],[c,u]),We([a,o],[c,u]),We([a,0],[c,u]))))),r=e.createRadialGradient(p=(h={x:c,y:u,r:i}).x,t=h.y,0,p,t,h.r)),r&&(l.forEach(function(t){var e,n=t.offset,t=t.color;n.unit===g.kPercentage&&null!=(e=r)&&e.addColorStop(n.value/100,t.toString())}),this.gradientCache[s]=r)),this.gradientCache[s]},e.generateGradientKey=function(t){var e=t.type,n=t.width,r=t.height,i=t.steps,a=t.angle,o=t.cx,s=t.cy,t=t.size;return"gradient-"+e+"-"+((null==a?void 0:a.toString())||0)+"-"+((null==o?void 0:o.toString())||0)+"-"+((null==s?void 0:s.toString())||0)+"-"+((null==t?void 0:t.toString())||0)+"-"+n+"-"+r+"-"+i.map(function(t){return""+t.offset+t.color}).join("-")},e.generatePatternKey=function(t){var e=t.image,t=t.repetition;return hn(e)?"pattern-"+e+"-"+t:e instanceof ps?"pattern-"+e.entity+"-"+t:void 0},t}(),rf=function(){function s(){}return s.prototype.apply=function(t){function e(t){var e=t.target,t=e.nodeName,n=e.attributes;t===M.IMAGE&&(t=n.img,hn(t))&&a.getImageSync(t,function(){e.renderable.dirty=!0,r.dirtify()})}function n(t){var e=t.target,n=t.attrName,t=t.newValue;e.nodeName===M.IMAGE&&"img"===n&&hn(t)&&a.getOrCreateImage(t).then(function(){e.renderable.dirty=!0,r.dirtify()})}var r=t.renderingService,i=t.renderingContext,a=t.imagePool,o=i.root.ownerDocument.defaultView;r.hooks.init.tapPromise(s.tag,Qh(Zh().mark(function t(){return Zh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o.addEventListener(y.MOUNTED,e),o.addEventListener(y.ATTR_MODIFIED,n);case 2:case"end":return t.stop()}},t)}))),r.hooks.destroy.tap(s.tag,function(){o.removeEventListener(y.MOUNTED,e),o.removeEventListener(y.ATTR_MODIFIED,n)})},s}(),af=(rf.tag="LoadImage",function(i){var t;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).name="image-loader",t}t=i,(n=e).prototype=Object.create(t.prototype),tf(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.context.imagePool=new nf(this.context.config),this.addRenderingPlugin(new rf)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Qc));function of(){of=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function sf(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function cf(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){sf(r,e,n,i,a,"next",t)}function a(t){sf(r,e,n,i,a,"throw",t)}i(void 0)})}}function lf(t,e){t.prototype=Object.create(e.prototype),uf(t.prototype.constructor=t,e)}function uf(t,e){return(uf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var hf=function(){function t(t){this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.renderingContext=t.renderingContext,this.canvasConfig=t.config}var e=t.prototype;return e.init=function(){var t=cf(of().mark(function t(){var e,n;return of().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=this.canvasConfig,e=n.container,(n=n.canvas)?(this.$canvas=n,e&&n.parentElement!==e&&e.appendChild(n),this.$container=n.parentElement,this.canvasConfig.container=this.$container):e&&(this.$container=hn(e)?document.getElementById(e):e,this.$container)&&(n=document.createElement("canvas"),this.$container.appendChild(n),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=n),this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getContext=function(){return this.context},e.getDomElement=function(){return this.$canvas},e.getDPR=function(){return this.dpr},e.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},e.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},e.resize=function(t,e){var n=1<=(n=this.canvasConfig.devicePixelRatio||ci&&window.devicePixelRatio||1)?Math.ceil(n):1;this.dpr=n,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*e,n=this.$canvas,t=t,e=e,ci)&&n.style&&(n.style.width=t+"px",n.style.height=e+"px"),this.renderingContext.renderReasons.add(qc.CAMERA_CHANGED)},e.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},e.toDataURL=function(){var e=cf(of().mark(function t(e){var n,r;return of().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=(r=e=void 0===e?{}:e).type,r=r.encoderOptions,t.abrupt("return",this.context.canvas.toDataURL(n,r));case 3:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),t}(),ff=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).name="canvas-context-register",t}lf(t,i);var e=t.prototype;return e.init=function(){this.context.ContextService=hf},e.destroy=function(){delete this.context.ContextService},t}(Qc),df=function(e){function t(t){t=e.call(this,t)||this;return t.registerPlugin(new ff),t.registerPlugin(new af),t.registerPlugin(new Ru),t.registerPlugin(new Dh),t.registerPlugin(new Hh),t.registerPlugin(new _h),t.registerPlugin(new Kh),t}return lf(t,e),t}(Jc);function pf(){pf=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function gf(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function yf(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){gf(r,e,n,i,a,"next",t)}function a(t){gf(r,e,n,i,a,"throw",t)}i(void 0)})}}function mf(){return(mf=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 vf(t,e){return(vf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bf(t){return Ef(t,"Function")}var xf=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,c,l,u=t.target,h=u===d,f=h&&i?d:u.closest&&u.closest("[draggable=true]");f&&(e=function(){var e=yf(pf().mark(function t(e){var n,r,i;return pf().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=We([e.clientX,e.clientY],s),n<=m||r<=y)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",f.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-l[0],e.dy=e.clientY-l[1],f.dispatchEvent(e),l=[e.clientX,e.clientY],h){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),c!==i&&(c&&(e.type="dragleave",(e.target=c).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),c=i)&&(e.type="dragover",(e.target=c).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],c=null,l=[t.clientX,t.clientY],r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),c&&(t.type="drop",(t.target=c).dispatchEvent(t)),t.type="dragend",f.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,yf(pf().mark(function t(){return pf().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}(),wf=(xf.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),vf(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new xf(mf({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},e}(Qc)),kf=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Mf={}.toString,Ef=function(t,e){return Mf.call(t)==="[object "+e+"]"},Of=function(t){return null==t},Sf=function(t){return Array.isArray?Array.isArray(t):Ef(t,"Array")};function _f(t){if(!Tf(t)||!Ef(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 Af(t){return(t=Nf(t)).charAt(0).toLowerCase()+t.substring(1)}var Tf=function(t){return"object"==typeof t&&null!==t},Pf=function(t){return Ef(t,"Number")},Lf=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){bf(n)&&"prototype"===e||r.push(t)};if(e)if(Sf(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},Nf=function(t){return Of(t)?"":t.toString()},Cf=function(t){t=Nf(t);return t.charAt(0).toUpperCase()+t.substring(1)},jf={}.toString,Rf=function(t){return jf.call(t).replace(/^\[object /,"").replace(/]$/,"")},Ff=Object.prototype,If=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ff)};var Df=5;var R=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||Df,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&_f(o)?(_f(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Sf(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Bf=function(t,e){if(!kf(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},Gf=Object.prototype.hasOwnProperty;function zf(t){return t}var Wf,Vf=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,l=n.apply(s,c),o||(s=c=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,c=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,l=n.apply(s,c),o||(s=c=null)):o||!1===i.trailing||(o=setTimeout(a,e)),l}var o,s,c,l,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=c=null},t};function Hf(t){return Of(t)?0:(kf(t)?t:Object.keys(t)).length}!function(a,o){var s;if(bf(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(Wf=Wf||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),Wf.measureText(Ef(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],Lf(e=void 0===e?{}:e)).join("")});const Yf=()=>[["cartesian"]],qf=(Yf.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]]),Uf=(qf.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]]),Xf=(Uf.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),$f=(Xf.props={},()=>[["translate",.5,.5],["reflect"],["translate",-.5,-.5]]),Kf=($f.props={},()=>[["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Zf=(Kf.props={},()=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5]]),Jf=(Zf.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[...Xf(),...qf({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),Qf=(Jf.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["transpose"],...$f(),...qf({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),td=(Qf.props={},()=>[["parallel",0,1,0,1]]),ed=(td.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),nd=(ed.props={},({focusX:t=0,distortionX:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),rd=(nd.props={},({focusY:t=0,distortionY:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),id=(rd.props={},({value:e})=>t=>t.map(()=>e)),ad=(id.props={},({value:e})=>t=>t.map(e)),od=(ad.props={},({value:e})=>t=>t.map(t=>t[e])),sd=(od.props={},({value:t})=>()=>t);function cd(t,e){return t.parent===e.parent?1:2}function ld(t,e){return t+e.x}function ud(t,e){return Math.max(t,e.y)}function hd(){var s=cd,c=1,l=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(ld,0)/e.length,t.y=1+n.reduce(ud,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)*c,t.y=(e.y-t.y)*l}:function(t){t.x=(t.x-a)/(o-a)*c,t.y=(1-(e.y?t.y/e.y:1))*l})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,c=+t[0],l=+t[1],e):u?null:[c,l]},e.nodeSize=function(t){return arguments.length?(u=!0,c=+t[0],l=+t[1],e):u?[c,l]:null},e}function fd(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 dd(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=gd)):void 0===e&&(e=pd);for(var n,r,i,a,o,t=new vd(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 vd(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(md)}function pd(t){return t.children}function gd(t){return Array.isArray(t)?t[1]:null}function yd(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function md(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function vd(t){this.data=t,this.depth=this.height=0,this.parent=null}function bd(t){return null==t?null:xd(t)}function xd(t){if("function"!=typeof t)throw new Error;return t}function wd(){return 0}function kd(t){return function(){return t}}sd.props={},vd.prototype=dd.prototype={constructor:vd,count:function(){return this.eachAfter(fd)},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=[],c=-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,++c,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 dd(this).eachBefore(yd)},[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 Md=4294967296;function Ed(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&&Sd(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 Ad(t[0],t[1]);case 3:return Td(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(_d(e,t))return[e];for(n=0;n<t.length;++n)if(Od(e,t[n])&&_d(Ad(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(Od(Ad(t[n],t[r]),e)&&Od(Ad(t[n],e),t[r])&&Od(Ad(t[r],e),t[n])&&_d(Td(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function Od(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 Sd(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 _d(t,e){for(var n=0;n<e.length;++n)if(!Sd(t,e[n]))return;return 1}function Ad(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,c=e-t,l=Math.sqrt(o*o+s*s);return{x:(n+i+o/l*c)/2,y:(r+a+s/l*c)/2,r:(l+t+e)/2}}function Td(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,c=n.y,n=n.r,l=r-a,u=r-s,h=i-o,f=i-c,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-c*c+n*n,e=u*h-l*f,g=(h*o-f*a)/(2*e)-r,s=(f*d-h*p)/e,c=(u*a-l*o)/(2*e)-i,n=(l*p-u*d)/e,f=s*s+n*n-1,h=2*(t+g*s+c*n),a=g*g+c*c-t*t,o=-(1e-6<Math.abs(f)?(h+Math.sqrt(h*h-4*f*a))/(2*f):a/h);return{x:r+g+s*o,y:i+c+n*o,r:o}}function Pd(t,e,n){var r,i,a,o,s=t.x-e.x,c=t.y-e.y,l=s*s+c*c;l?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(l+o-i)/(2*l),a=Math.sqrt(Math.max(0,o/l-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(l+i-o)/(2*l),a=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Ld(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 Nd(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 Cd(t){this._=t,this.next=null,this.previous=null}function jd(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,c,l,u,h,f,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;Pd(r,d,i=t[2]),d=new Cd(d),r=new Cd(r),i=new Cd(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(c=3;c<a;++c){Pd(d._,r._,i=t[c]),i=new Cd(i),l=r.next,u=d.previous,h=r._.r,f=d._.r;do{if(h<=f){if(Ld(l._,i._)){r=l,(d.next=r).previous=d,--c;continue t}h+=l._.r,l=l.next}else{if(Ld(u._,i._)){((d=u).next=r).previous=d,--c;continue t}f+=u._.r,u=u.previous}}while(l!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=Nd(d);(i=i.next)!==r;)(s=Nd(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=Ed(d,e),c=0;c<a;++c)(d=t[c]).x-=i.x,d.y-=i.y;return i.r}function Rd(t){return Math.sqrt(t.value)}function Fd(){var n=null,r=1,i=1,a=wd;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Md)/Md}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Id(n)).eachAfter(Dd(a,.5,e)).eachBefore(Bd(1)):t.eachBefore(Id(Rd)).eachAfter(Dd(wd,1,e)).eachAfter(Dd(a,t.r/Math.min(r,i),e)).eachBefore(Bd(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=bd(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:kd(+t),e):a},e}function Id(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Dd(o,s,c){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=jd(e,c),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function Bd(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 Gd(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 zd(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,l=t.value&&(r-e)/t.value;++s<c;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*l}var Wd={depth:-1},Vd={},Hd={};function Yd(t){return t.id}function qd(t){return t.parentId}function Ud(){var y,m=Yd,v=qd;function e(n){var e,t,r,i,a,o,s,c,l=Array.from(n),u=m,h=v,f=new Map;if(null!=y){const p=l.map((t,e)=>{t=y(t,e,n),e=(t=""+t).length;return"/"===(t=$d(t,e-1)&&!$d(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(Xd);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(Xd(r)),l.push(Hd));u=(t,e)=>p[e],h=(t,e)=>g[e]}for(r=0,e=l.length;r<e;++r)t=l[r],o=l[r]=new vd(t),null!=(s=u(t,r,n))&&(s+="")&&(c=o.id=s,f.set(c,f.has(c)?Vd:o)),null!=(s=h(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=l[r]).parent){if(!(a=f.get(s)))throw new Error("missing: "+s);if(a===Vd)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===Hd&&1===i.children.length;)i=i.children[0],--e;for(let t=l.length-1;0<=t&&(o=l[t]).data===Hd;--t)o.data=null}if(i.parent=Wd,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(md),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(m=bd(t),e):m},e.parentId=function(t){return arguments.length?(v=bd(t),e):v},e.path=function(t){return arguments.length?(y=bd(t),e):y},e}function Xd(t){let e=t.length;if(e<2)return"";for(;1<--e&&!$d(t,e););return t.slice(0,e)}function $d(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function Kd(t,e){return t.parent===e.parent?1:2}function Zd(t){var e=t.children;return e?e[0]:t.t}function Jd(t){var e=t.children;return e?e[e.length-1]:t.t}function Qd(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 tp(){var f=Kd,c=1,l=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 Qd(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 Qd(r[i],i)),n.parent=e;return(t.parent=new Qd(null,0)).children=[t],t}(t);return s.eachAfter(h),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:f(e,n)/2,i=s-e.x,a=c/(n.x+s+i),o=l/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function h(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,c=s.length;0<=--c;)(i=s[c]).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+f(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+f(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],c=i.m,l=a.m,u=o.m,h=s.m;o=Jd(o),i=Zd(i),o&&i;)s=Zd(s),(a=Jd(a)).a=t,0<(r=o.z+u-i.z-c+f(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),c+=r,l+=r),u+=o.m,c+=i.m,h+=s.m,l+=a.m;o&&!Jd(a)&&(a.t=o,a.m+=u-l),i&&!Zd(s)&&(s.t=i,s.m+=c-h,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*=c,t.y=t.depth*l}return e.separation=function(t){return arguments.length?(f=t,e):f},e.size=function(t){return arguments.length?(u=!1,c=+t[0],l=+t[1],e):u?null:[c,l]},e.nodeSize=function(t){return arguments.length?(u=!0,c=+t[0],l=+t[1],e):u?[c,l]:null},e}function ep(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,l=t.value&&(i-n)/t.value;++s<c;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*l}Qd.prototype=Object.create(vd.prototype);e=(1+Math.sqrt(5))/2;function np(t,e,n,r,i,a){for(var o,s,c,l,u,h,f,d,p,g,y,m=[],v=e.children,b=0,x=0,w=v.length,k=e.value;b<w;){for(c=i-n,l=a-r;!(u=v[x++].value)&&x<w;);for(y=(h=f=u)*u*(g=Math.max(l/c,c/l)/(k*t)),p=Math.max(f/y,y/h);x<w;++x){if(u+=s=v[x].value,s<h&&(h=s),f<s&&(f=s),y=u*u*g,p<(d=Math.max(f/y,y/h))){u-=s;break}p=d}m.push(o={value:u,dice:c<l,children:v.slice(b,x)}),o.dice?zd(o,n,r,i,k?r+=l*u/k:a):ep(o,n,r,k?n+=c*u/k:i,a),k-=u,b=x}return m}var rp=function e(a){function t(t,e,n,r,i){np(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(e);function ip(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(c=g[e]).x0=i,c.y0=a,c.x1=o,void(c.y1=s);var c=y[e],l=r/2+c,u=e+1,h=n-1;for(;u<h;){var f=u+h>>>1;y[f]<l?u=1+f:h=f}l-y[u-1]<y[u]-l&&e+1<u&&--u;var c=y[u]-c,d=r-c;{var p;s-a<o-i?(t(e,u,c,i,a,p=r?(i*d+o*c)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,c,i,a,o,p=r?(a*d+s*c)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function ap(t,e,n,r,i){(1&t.depth?ep:zd)(t,e,n,r,i)}var op=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,c,l,u=-1,h=a.length,f=t.value;++u<h;){for(s=(o=a[u]).children,c=o.value=0,l=s.length;c<l;++c)o.value+=s[c].value;o.dice?zd(o,e,n,r,f?n+=(i-n)*o.value/f:i):ep(o,e,n,f?e+=(r-e)*o.value/f:r,i),f-=o.value}else t._squarify=a=np(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(e);function sp(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 cp(t={}){return[...sp(t),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function lp(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function up(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function hp(t={}){return sp(t)}function fp(){return[{type:"maybeKey"}]}function dp(t,e){return t.getBandWidth(t.invert(e))}function pp(t,e,n={}){const{x:a,y:o,series:s}=e,{x:c,y:l,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:h=r,bandOffsetY:f=r}={}}=n,d=!(null===c||void 0===c||!c.getBandWidth),p=!(null===l||void 0===l||!l.getBandWidth),g=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?dp(c,a[e]):0;var r=p?dp(l,o[e]):0,e=g&&s?(dp(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+h*n+e,i+f*r]}:t=>t}function gp(t){return parseFloat(t)/100}function yp(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?gp(e)*o:+e,"string"==typeof t?gp(t)*s:+t]]})]}function mp(e){return"function"==typeof e?e:t=>t[e]}function vp(t,e){return Array.from(t,mp(e))}function bp(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=vp(t,e),o=vp(t,n),s=vp(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 xp(t,e){return t.getBandWidth(t.invert(e))}const wp=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:c,size:r}=n,l=e.x,u=e.series,[h]=i.getSize(),f=r?r.map(t=>+t/h):null,d=r?(t,e,n)=>{t+=e/2,e=f[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=xp(l,a[t]),n=e*(u?xp(u,null===c||void 0===c?void 0:c[t]):1),e=(+(null===c||void 0===c?void 0:c[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))})]};wp.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...cp({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:[...fp(),...up()],interaction:{shareTooltip:!0}};const kp=()=>(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 Mp(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Ep(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=Mp,o=(t,e)=>Mp(n(t),e),(t,e)=>n(t)-e):(a=n===Mp||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Op,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 Op(){return 0}kp.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...cp({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...fp(),...up()],interaction:{shareTooltip:!0}};Kc=Ep(Mp).right;const Sp=Ep(function(t){return null===t?NaN:+t}).center;var _p=Kc;function Ap(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 Tp(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 Pp(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 Lp{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 Np 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(Cp(this,t))}has(t){return super.has(Cp(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 Cp({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function jp(t){return t}function Rp(t,...e){return Dp(t,jp,jp,e)}function Fp(t,e,...n){return Dp(t,jp,e,n)}function Ip(t,e,...n){return Dp(t,Array.from,e,n)}function Dp(t,u,h,f){return function t(e,n){if(n>=f.length)return h(e);var r=new Np,i=f[n++];let a=-1;for(const c of e){var o=i(c,++a,e),s=r.get(o);s?s.push(c):r.set(o,[c])}for(const[l,e]of r)r.set(l,t(e,n));return u(r)}(t,0)}function Bp(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=zp(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>zp(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Gp(n))}function Gp(r=Mp){if(r===Mp)return zp;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 zp(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var Wp=Array.prototype.slice;function Vp(t){return()=>t}var Hp=Math.sqrt(50),Yp=Math.sqrt(10),qp=Math.sqrt(2);function Up(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?(Hp<=n?10:Yp<=n?5:qp<=n?2:1)*Math.pow(10,t):-Math.pow(10,-t)/(Hp<=n?10:Yp<=n?5:qp<=n?2:1)}function Xp(t){return Math.ceil(Math.log(Ap(t))/Math.LN2)+1}function $p(){var m=jp,v=Pp,b=Xp;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],c=o[1],l=b(i,s,c);if(!Array.isArray(l)){var o=c,u=+l;if(v===Pp&&([s,c]=function(t,e,n){let r;for(;;){var i=Up(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,c,u)),(l=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=Up(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,c,u))[0]<=s&&(n=Up(s,c,u)),l[l.length-1]>=c)if(c<=o&&v===Pp){const n=Up(s,c,u);isFinite(n)&&(0<n?c=(Math.floor(c/n)+1)*n:n<0&&(c=(Math.ceil(c*-n)+1)/-n))}else l.pop()}for(var h=l.length,f=0,d=h;l[f]<=s;)++f;for(;l[d-1]>c;)--d;(f||d<h)&&(l=l.slice(f,d),h=d-f);var p,g,y=new Array(h+1);for(a=0;a<=h;++a)(p=y[a]=[]).x0=0<a?l[a-1]:s,p.x1=a<h?l[a]:c;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=c&&y[Math.min(h,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<=c&&(g=Math.floor((s-e)*n),y[Math.min(h,g+(l[g]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=c&&y[_p(l,e,0,h)].push(t[a]);return y}return e.value=function(t){return arguments.length?(m="function"==typeof t?t:Vp(t),e):m},e.domain=function(t){return arguments.length?(v="function"==typeof t?t:Vp([t[0],t[1]]),e):v},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:Vp(Array.isArray(t)?Wp.call(t):t),e):b},e}function Kp(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 Zp(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 Jp(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 Qp(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 t0(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function e0(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?Jp(t):1<=e?Kp(t):(n=(n-1)*e,(r=Kp(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?zp:Gp(s);a<o;){600<o-a&&(c=o-a+1,l=i-a+1,h=Math.log(c),u=.5*Math.exp(2*h/3),h=.5*Math.sqrt(h*u*(c-u)/c)*(l-c/2<0?-1:1),n(r,i,Math.max(a,Math.floor(i-l*u/c+h)),Math.min(o,Math.floor(i+(c-l)*u/c+h)),s));var c,l,u,h,f=r[i];let t=a,e=o;for(t0(r,a,i),0<s(r[o],f)&&t0(r,a,o);t<e;){for(t0(r,t,e),++t,--e;s(r[t],f)<0;)++t;for(;0<s(r[e],f);)--e}0===s(r[a],f)?t0(r,a,e):t0(r,++e,o),e<=i&&(a=e+1),i<=e&&(o=e-1)}return r}(t,e=Math.floor(n)).subarray(0,e+1)))+(Jp(t.subarray(e+1))-r)*(n-e))}function n0(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 r0(t,e){return e0(t,.5,e)}function i0(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function a0(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 o0(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 s0(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function c0(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function l0(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function u0(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function h0(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function f0(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function d0(t){return u0(t)||c0(t)}const p0=(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(Rp(t,t=>a[t]).values()):[t],c=t.map(t=>t[0]);const l=((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[c,Array.from(t,t=>t.map(t=>r.map([+o[t]+l,+s[t]+u]))),t]},g0=(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})]},y0=()=>(t,e,n,r)=>{return(h0(r)?g0:p0)(t,e,n,r)};y0.props={defaultShape:"line",defaultLabelShape:"label",channels:[...cp({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...fp(),...up(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,showCrosshairs:!0}};const m0=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:c,dx:l,dy:u}=n,[h,f]=o.getSize(),d=pp(e,n,g),p=t=>{var e=+((null===l||void 0===l?void 0:l[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,c?Array.from(t,t=>{var[e,n]=p(t),r=+c[t],i=r/h,r=r/f,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))])]};m0.props={defaultShape:"hollow",defaultLabelShape:"label",channels:[...cp({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:[...fp(),{type:"maybeSize"},...lp()]};const v0=s=>{const{cartesian:c=!1}=s;return c?yp:(t,e,n,r)=>{if(c)return yp(t,0,n,r);const{x:i,y:a}=n,o=pp(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};v0.props={defaultShape:"text",defaultLabelShape:"label",channels:[...cp({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:[...fp(),...lp()]};const b0=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,c=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=c.getBandWidth(c.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))})]};b0.props={defaultShape:"cell",defaultLabelShape:"label",channels:[...cp({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...fp(),...lp()]};const x0=()=>(t,e,n,a)=>{const{x:o,y:s,y1:c,series:r}=n;n=r?Array.from(Rp(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],+c[i]])}return r}),n]};x0.props={defaultShape:"area",defaultLabelShape:"label",channels:[...cp({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:[...fp(),...up()],interaction:{shareTooltip:!0,seriesTooltip:!0,showCrosshairs:!0}};const w0=l=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,c=pp(e,n,l);e=t.map(t=>[r.map(c([+i[t],+a[t]],t)),r.map(c([+o[t],+s[t]],t))]);return[t,e]};w0.props={defaultShape:"link",defaultLabelShape:"label",channels:[...cp({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...fp(),...lp()]};const k0=s=>{var t=s["cartesian"];return t?yp:(t,e,n,r)=>{const{x:i,y:a}=n,o=pp(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};k0.props={defaultShape:"image",defaultLabelShape:"label",channels:[...cp({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...fp(),...lp()]};const M0=()=>(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]};M0.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[...cp({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...fp(),...lp()]};const E0=()=>(t,e,n,s)=>{const{x:c,y:l,y1:u,y2:h,y3:f,y4:d,series:p}=n,g=e.x,y=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+c[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=+c[t]+e+n/2,[t,r,i,a,o]=[+l[t],+u[t],+h[t],+f[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))})]},O0=(E0.props={defaultShape:"box",defaultLabelShape:"label",channels:[...cp({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroX"}],postInference:[...fp(),...up()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:c}=n,[l,u]=i.getSize();n=t.map(t=>{var e=+c[t]/180*Math.PI,n=+s[t],r=n/l,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]});O0.props={defaultShape:"vector",defaultLabelShape:"label",channels:[...cp({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...fp(),...lp()]};const S0=()=>(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))})]};S0.props={defaultShape:"line",defaultLabelShape:"label",channels:[...hp({shapes:["line"]}),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...fp()]};const _0=()=>(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))})]};_0.props={defaultShape:"line",defaultLabelShape:"label",channels:[...hp({shapes:["line"]}),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...fp()]};const A0=(...t)=>w0(...t);function T0(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 P0(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=T0("x",r,n,e.x),o=T0("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))})]}}A0.props={defaultShape:"connector",defaultLabelShape:"label",channels:[...hp({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...fp()]};const L0=()=>P0();L0.props={defaultShape:"range",defaultLabelShape:"label",channels:[...hp({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...fp()]};const N0=()=>P0({extendY:!0});N0.props={defaultShape:"range",defaultLabelShape:"label",channels:[...hp({shapes:["range"]}),{name:"x",required:!0}],preInference:[],postInference:[...fp()]};const C0=()=>P0({extendX:!0});function j0(t){return t.target.depth}function R0(t,e){return t.sourceLinks.length?t.depth:e-1}function F0(t){return function(){return t}}function I0(t,e){return B0(t.source,e.source)||t.index-e.index}function D0(t,e){return B0(t.target,e.target)||t.index-e.index}function B0(t,e){return t.y0-e.y0}function G0(t){return t.value}function z0(t){return t.index}function W0(t){return t.nodes}function V0(t){return t.links}function H0(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function Y0({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 q0(){let x=0,w=0,k=1,M=1,E=24,O=8,S,_=z0,A=R0,T,P,L,N=W0,C=V0,j=6;function e(e){e={nodes:N(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=>[_(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=H0(g,n)),"object"!=typeof r&&(r=t.target=H0(g,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=L)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(L),r.sort(L)}t=e.nodes;for(const y of t)y.value=void 0===y.fixedValue?Math.max(o0(y.sourceLinks,G0),o0(y.targetLinks,G0)):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,c=Math.max(Kp(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=T.call(null,s,c)}}{var l=(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>l)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(Kp(t,t=>t.depth)+1,0),n=(k-x-E)/(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+E,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(O,(M-w)/(Kp(u,t=>t.length)-1)),u),h=Jp(t,t=>(M-w-(t.length-1)*S)/o0(t,G0));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*h,e=v.y1+S;for(const b of v.sourceLinks)b.width=b.value*h}e=(M-e+S)/(m.length+1);for(let t=0;t<m.length;++t){var f=m[t];f.y0+=e*(t+1),f.y1+=e*(t+1)}!function(t){if(void 0===L)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(D0),n.sort(I0)}(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 l of o){let t=0,e=0;for(var{target:s,value:c}of l.sourceLinks){c=c*(s.layer-l.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}(l,s)*c,e+=c}0<e&&(a=(t/e-l.y0)*r,l.y0+=a,l.y1+=a,F(l))}void 0===P&&o.sort(B0),o.length&&R(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 l of o){let t=0,e=0;for(var{source:s,value:c}of l.targetLinks){c=c*(l.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,l)*c,e+=c}0<e&&(a=(t/e-l.y0)*r,l.y0+=a,l.y1+=a,F(l))}void 0===P&&o.sort(B0),o.length&&R(o,i)}}(u,d,p)}return Y0(e),e}function R(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 F({sourceLinks:t,targetLinks:e}){if(void 0===L){for(const{source:{sourceLinks:t}}of e)t.sort(D0);for(const{target:{targetLinks:e}}of t)e.sort(I0)}}return e.update=function(t){return Y0(t),t},e.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:F0(t),e):_},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:F0(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?(E=+t,e):E},e.nodePadding=function(t){return arguments.length?(O=S=+t,e):O},e.nodes=function(t){return arguments.length?(N="function"==typeof t?t:F0(t),e):N},e.links=function(t){return arguments.length?(C="function"==typeof t?t:F0(t),e):C},e.linkSort=function(t){return arguments.length?(L=t,e):L},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}C0.props={defaultShape:"range",defaultLabelShape:"label",channels:[...hp({shapes:["range"]}),{name:"y",required:!0}],preInference:[],postInference:[...fp()]};const U0={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},X0={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?Jp(t.sourceLinks,j0)-1:0},justify:R0};const $0=h=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:c,linkSort:l,iterations:u}=Object.assign({},U0,h),c=q0().nodeSort(n).linkSort(l).links(c).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(l=typeof(n=r))?X0[n]||R0:"function"==l?n:R0).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&c.nodeId(e),c(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 K0(t){return t}function Z0(t=""){throw new Error(t)}function J0(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 Q0(t){return null!=t&&!Number.isNaN(t)}function J(t,e){return tg(t,e)||{}}function tg(t,n){t=Object.entries(t).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Af(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function eg(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}$0.props={};const ng=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:c}=bp(t,e),l=J(e,"node"),e=J(e,"link"),{key:u=t=>t.key,color:h=u}=l,{links:i,nodes:t}=$0(Object.assign(Object.assign(Object.assign({},m),{nodeId:mp(u)}),i))({links:t,nodes:c});const f=J(r,"label"),{text:d=u,spacing:p=5}=f,g=Z(f,["text","spacing"]);return[R({},v,{data:t,encode:Object.assign(Object.assign({},l),{color:h}),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}),R({},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})]}},rg=(ng.props={composite:!0},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);rg.props={defaultShape:"path",defaultLabelShape:"label",channels:[...cp({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[],postInference:[...fp()]};const ig=t=>t?parseInt(t):0;function ag(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||ig(t.width),e=e.clientHeight||ig(t.height),{width:(i={width:i-(ig(t.paddingLeft)+ig(t.paddingRight)),height:e-(ig(t.paddingLeft)+ig(t.paddingRight))}).width,height:i.height}):{width:n,height:r}}function og(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:c=o,marginTop:l=o,marginBottom:o=o,inset:u=0,insetLeft:h=u,insetRight:f=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-c-h-f,height:t-a-n-l-o-d-u}}function sg(t,e,n){const r=n["value"];var o,i,a,s,c,l,u,h,f,d,n=function(t,e){var n={treemapBinary:ip,treemapDice:zd,treemapSlice:ep,treemapSliceDice:ap,treemapSquarify:rp,treemapResquarify:op};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?Ud().path(p):Ud():dd)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(y),c=[0],i&&t.eachBefore(Gd),t}function y(t){var e=c[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=c[t.depth+1]=l(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=h(t)-e)<n&&(n=i=(n+i)/2),(a-=f(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=rp,i=!1,s=a=1,c=[0],d=f=h=u=l=wd,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=xd(t),g):o},g.padding=function(t){return arguments.length?g.paddingInner(t).paddingOuter(t):g.paddingInner()},g.paddingInner=function(t){return arguments.length?(l="function"==typeof t?t:kd(+t),g):l},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:kd(+t),g):u},g.paddingRight=function(t){return arguments.length?(h="function"==typeof t?t:kd(+t),g):h},g.paddingBottom=function(t){return arguments.length?(f="function"==typeof t?t:kd(+t),g):f},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:kd(+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 cg=u=>t=>{var{width:t,height:e}=og(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[]}=u,c=Z(u,["data","encode","scale","style","layout","labels"]),l={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=sg(n,R({},l,o),r),n=J(a,"label");return[R({},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]},c),{axis:!1}))]},lg=(cg.props={composite:!0},u=>t=>{var{width:t,height:e}=og(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[]}=u,c=Z(u,["data","encode","scale","style","layout","labels"]),l={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=(Sf(t)?Ud().path(e.path):dd)(t);return r?n.sum(t=>t[r]).sort(e.sort):n.count(),Fd().size(e.size).padding(e.padding)(n),n.descendants()})(n,R({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),R({},l.encode,r)),t=J(a,"label");return[R({},l,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]},c),{axis:!1}))]});function ug(t,e){return Jp(t,t=>e[t])}function hg(t,e){return Kp(t,t=>e[t])}function fg(t,e){const n=2.5*dg(t,e)-1.5*gg(t,e);return Jp(t,t=>e[t]>=n?e[t]:NaN)}function dg(t,e){return e0(t,.25,t=>e[t])}function pg(t,e){return e0(t,.5,t=>e[t])}function gg(t,e){return e0(t,.75,t=>e[t])}function yg(t,e){const n=2.5*gg(t,e)-1.5*dg(t,e);return Kp(t,t=>e[t]<=n?e[t]:NaN)}function mg(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(Rp(t,t=>a[+t]).values()).flatMap(t=>{const e=fg(t,i),n=yg(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}lg.props={composite:!0};const vg=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:dg,y2:pg,y3:gg};return r?[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:ug},a),{y4:hg})],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:fg},a),{y4:yg})],encode:Object.assign(Object.assign({},e),i),style:r},{type:"point",data:t,transform:[{type:mg}],encode:e,style:Object.assign({},n)}])},bg=(vg.props={composite:!0},s=>{var t=s["cartesian"];return t?yp:(t,e,n,r)=>{const{x:i,y:a}=n,o=pp(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function xg(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,c,l,u,h,f,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(d){for(;d.length;)if((l=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,!(d=(i=d)[h=u<<1|l]))return i[h]=p,t;if(s=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===s&&n===c)p.next=d,i?i[h]=p:t._root=p;else{for(;i=i?i[h]=new Array(4):t._root=new Array(4),(l=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,(h=u<<1|l)==(f=(o<=c)<<1|a<=s););i[f]=d,i[h]=p}}else t._root=p}return t}function wg(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function kg(t){return t[0]}function Mg(t){return t[1]}function Eg(t,e,n){e=new Og(null==e?kg:e,null==n?Mg:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function Og(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 Sg(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}bg.props={defaultShape:"shape",defaultLabelShape:"label",channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};oo=Eg.prototype=Og.prototype;function _g(t){return function(){return t}}function Ag(t){return 1e-6*(t()-.5)}function Tg(t){return t.index}function Pg(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function Lg(l){var u,h,a,o,f,d,s=Tg,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=_g(30),p=1;function e(t){for(var e=0,n=l.length;e<p;++e)for(var r,i,a,o,s,c=0;c<n;++c)r=(i=l[c]).source,a=(i=i.target).x+i.vx-r.x-r.vx||Ag(d),o=i.y+i.vy-r.y-r.vy||Ag(d),a*=s=((s=Math.sqrt(a*a+o*o))-h[c])/s*t*u[c],o*=s,i.vx-=a*(s=f[c]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=l.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=l[i]).index=i,"object"!=typeof t.source&&(t.source=Pg(r,t.source)),"object"!=typeof t.target&&(t.target=Pg(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,f=new Array(n);i<n;++i)t=l[i],f[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),c(),h=new Array(n),g()}}function c(){if(a)for(var t=0,e=l.length;t<e;++t)u[t]=+n(l[t],t,l)}function g(){if(a)for(var t=0,e=l.length;t<e;++t)h[t]=+r(l[t],t,l)}return null==l&&(l=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(l=t,i(),e):l},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:_g(+t),c(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:_g(+t),g(),e):r},e}oo.copy=function(){var t,e,n=new Og(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]=Sg(e));else n._root=Sg(r);return n},oo.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return xg(this.cover(e,n),e,n,t)},oo.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,c=-1/0,l=-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),c<e&&(c=e),(a[u]=n)<s&&(s=n),l<n&&(l=n));if(!(c<o||l<s))for(this.cover(o,s).cover(c,l),u=0;u<r;++u)xg(this,i[u],a[u],t[u]);return this},oo.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,c=i-n||1,l=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=l,l=o,c*=2,s){case 0:i=n+c,a=r+c;break;case 1:n=i-c,a=r+c;break;case 2:i=n+c,r=a-c;break;case 3:n=i-c,r=a-c}this._root&&this._root.length&&(this._root=l)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},oo.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},oo.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]]},oo.find=function(t,e,n){var r,i,a,o,s,c,l,u,h=this._x0,f=this._y0,d=this._x1,p=this._y1,g=[],y=this._root;for(y&&g.push(new wg(y,h,f,d,p)),null==n?n=1/0:(h=t-n,f=e-n,d=t+n,p=e+n,n*=n);r=g.pop();)!(y=r.node)||(s=r.x0)>d||(c=r.y0)>p||(o=r.x1)<h||(i=r.y1)<f||(y.length?(g.push(new wg(y[3],a=(s+o)/2,l=(c+i)/2,o,i),new wg(y[2],s,l,a,i),new wg(y[1],a,c,o,l),new wg(y[0],s,c,a,l)),(i=(l<=e)<<1|a<=t)&&(r=g[g.length-1],g[g.length-1]=g[g.length-1-i],g[g.length-1-i]=r)):(c=(o=t-+this._x.call(null,y.data))*o+(s=e-+this._y.call(null,y.data))*s)<n&&(h=t-(l=Math.sqrt(n=c)),f=e-l,d=t+l,p=e+l,u=y.data));return u},oo.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,c,l,u,h,f=this._root,d=this._x0,p=this._y0,g=this._x1,y=this._y1;if(f){if(f.length)for(;;){if((c=a>=(s=(d+g)/2))?d=s:g=s,(l=o>=(s=(p+y)/2))?p=s:y=s,!(f=(e=f)[u=l<<1|c]))return this;if(!f.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,h=u)}for(;f.data!==t;)if(!(f=(r=f).next))return this;(i=f.next)&&delete f.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[h]=f:this._root=f)):this._root=i}}return this},oo.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},oo.root=function(){return this._root},oo.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},oo.visit=function(t){var e,n,r,i,a,o,s,c=[],l=this._root;for(l&&c.push(new wg(l,this._x0,this._y0,this._x1,this._y1));a=c.pop();)!t(l=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&l.length&&(o=(n+i)/2,s=(r+a)/2,(e=l[3])&&c.push(new wg(e,o,s,i,a)),(e=l[2])&&c.push(new wg(e,n,s,o,a)),(e=l[1])&&c.push(new wg(e,o,r,i,s)),e=l[0])&&c.push(new wg(e,n,r,o,s));return this},oo.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new wg(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,c,l,u,h=e.node;h.length&&(a=e.x0,o=e.y0,l=(a+(s=e.x1))/2,u=(o+(c=e.y1))/2,(i=h[0])&&n.push(new wg(i,a,o,l,u)),(i=h[1])&&n.push(new wg(i,l,o,s,u)),(i=h[2])&&n.push(new wg(i,a,u,l,c)),i=h[3])&&n.push(new wg(i,l,u,s,c)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},oo.x=function(t){return arguments.length?(this._x=t,this):this._x},oo.y=function(t){return arguments.length?(this._y=t,this):this._y};var Ng={value:()=>{}};function Cg(){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 jg(r)}function jg(t){this._=t}function Rg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ng,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}jg.prototype=Cg.prototype={constructor:jg,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]=Rg(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Rg(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 jg(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 Fg,Ig,Dg=0,Bg=0,Gg=0,zg=1e3,Wg=0,Vg=0,Hg=0,Yg="object"==typeof performance&&performance.now?performance:Date,qg="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ug(){return Vg||(qg(Xg),Vg=Yg.now()+Hg)}function Xg(){Vg=0}function $g(){this._call=this._time=this._next=null}function Kg(t,e,n){var r=new $g;return r.restart(t,e,n),r}function Zg(){Vg=(Wg=Yg.now())+Hg,Dg=Bg=0;try{Ug(),++Dg;for(var t,e=Fg;e;)0<=(t=Vg-e._time)&&e._call.call(void 0,t),e=e._next;--Dg}finally{for(var n,r,i=Fg,a=1/(Dg=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:Fg=r);Ig=n,Qg(a),Vg=0}}function Jg(){var t=Yg.now(),e=t-Wg;zg<e&&(Hg-=e,Wg=t)}function Qg(t){Dg||(Bg=Bg&&clearTimeout(Bg),24<t-Vg?(t<1/0&&(Bg=setTimeout(Zg,t-Yg.now()-Hg)),Gg=Gg&&clearInterval(Gg)):(Gg||(Wg=Yg.now(),Gg=setInterval(Jg,zg)),Dg=1,qg(Zg)))}$g.prototype=Kg.prototype={constructor:$g,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Ug():+n)+(null==e?0:+e),this._next||Ig===this||(Ig?Ig._next=this:Fg=this,Ig=this),this._call=t,this._time=n,Qg()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qg())}};const t1=4294967296;function e1(t){return t.x}function n1(t){return t.y}var r1=10,i1=Math.PI*(3-Math.sqrt(5));function a1(c){var a,o=1,e=.001,s=1-Math.pow(e,1/300),l=0,u=.6,h=new Map,t=Kg(i),n=Cg("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%t1)/t1}();function i(){f(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function f(t){var e,n,r=c.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(l-o)*s,h.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=c[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=c.length;r<i;++r)(n=c[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=r1*Math.sqrt(.5+r),e=r*i1,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(c,r),t}return null==c&&(c=[]),d(),a={tick:f,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(c=t,d(),h.forEach(p),a):c},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?(l=+t,a):l},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,h.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?h.delete(t):h.set(t,p(e)),a):h.get(t)},find:function(t,e,n){var r,i,a,o=0,s=c.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=c[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 o1(t,e,n){var i,c,l,u,h,r,f,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,F=(r=_g(-30),d=(f=1)/0,p=.81,g.initialize=function(t,e){i=t,l=e,I()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:_g(+t),I(),g):r},g.distanceMin=function(t){return arguments.length?(f=t*t,g):Math.sqrt(f)},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=Eg(i,e1,n1).visitAfter(D);for(u=t,e=0;e<n;++e)c=i[e],r.visit(B)}function I(){if(i){var t,e,n=i.length;for(h=new Array(n),t=0;t<n;++t)e=i[t],h[e.index]=+r(e,t,i)}}function D(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+=h[e.data.index],e=e.next;);t.value=o}function B(t,e,n,r){if(!t.value)return!0;var i=t.x-c.x,a=t.y-c.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=Ag(l))*i),0===a&&(s+=(a=Ag(l))*a),s<f&&(s=Math.sqrt(f*s)),c.vx+=i*t.value*u/s,c.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==c||t.next)&&(0===i&&(s+=(i=Ag(l))*i),0===a&&(s+=(a=Ag(l))*a),s<f)&&(s=Math.sqrt(f*s));t.data!==c&&(o=h[t.data.index]*u/s,c.vx+=i*o,c.vy+=a*o),t=t.next;);}var y,m,v,b,x,w,k,M,E,O,S,_,A,T,n=Lg(a).id(mp(n)),P=("function"==typeof o&&F.strength(o),"function"==typeof s&&n.strength(s),a1(t).force("link",n).force("charge",F));function L(t){for(var e,n=0,r=m.length;n<r;++n)(e=m[n]).vy+=(b[n]-e.y)*v[n]*t}function N(){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+=(E[n]-e.x)*M[n]*t}function j(){if(k){var t,e=k.length;for(M=new Array(e),E=new Array(e),t=0;t<e;++t)M[t]=isNaN(E[t]=+w(k[t],t,k))?0:+O(k[t],t,k)}}function R(){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-_)*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==_&&(_=0),R.initialize=function(t){A=t},R.x=function(t){return arguments.length?(S=+t,R):S},R.y=function(t){return arguments.length?(_=+t,R):_},R.strength=function(t){return arguments.length?(T=+t,R):T},R)):P.force("x",(O=_g(.1),"function"!=typeof w&&(w=_g(null==w?0:+w)),C.initialize=function(t){k=t,j()},C.strength=function(t){return arguments.length?(O="function"==typeof t?t:_g(+t),j(),C):O},C.x=function(t){return arguments.length?(w="function"==typeof t?t:_g(+t),j(),C):w},C)).force("y",(x=_g(.1),"function"!=typeof y&&(y=_g(null==y?0:+y)),L.initialize=function(t){m=t,N()},L.strength=function(t){return arguments.length?(x="function"==typeof t?t:_g(+t),N(),L):x},L.y=function(t){return arguments.length?(y="function"==typeof t?t:_g(+t),N(),L):y},L)),P.stop();var G=Math.ceil(Math.log(P.alphaMin())/Math.log(1-P.alphaDecay()));for(let t=0;t<G;t++)P.tick();return{nodesData:t,linksData:a}}const s1=h=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=h,c=J(e,"node"),l=J(e,"link"),{links:t,nodes:u}=bp(t,e),{nodesData:t,linksData:u}=o1({links:t,nodes:u},R({},{joint:!0},i),e);return[R({},{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:l,labels:o,style:J(r,"link"),animate:"object"==typeof s?J(s,"link"):s}),R({},{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({},c),scale:n,style:J(r,"node"),labels:[Object.assign(Object.assign({},{text:""}),J(r,"label")),...a],animate:"object"==typeof s?J(s,"node"):s})]},c1=(s1.props={composite:!0},h=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=dd(t,t=>t.children).sum(t=>t[e]).sort(i),c=h();c.size([1,1]),n&&c.nodeSize(n),r&&c.separation(r),c(t);const l=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,l.push(t)});c=t.links();return c.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:l,edges:c}}),l1=t=>c1(hd)(t),u1=(l1.props={},t=>c1(tp)(t)),h1=(u1.props={},l=>{const u={sortBy:(t,e)=>e.value-t.value},h={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},f={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={}}=l,c=null==e?void 0:e.value,{nodes:i,edges:c}=u1(Object.assign(Object.assign(Object.assign({},u),i),{field:c}))(t);return[R({},f,{data:c,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}),R({},h,{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})]}});h1.props={composite:!0};var f1={},d1={},p1=34,g1=10,y1=13;function m1(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function v1(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 b1(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function x1(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+b1(-e,6):9999<e?"+"+b1(e,6):b1(e,4))+"-"+b1(t.getUTCMonth()+1,2)+"-"+b1(t.getUTCDate(),2)+(a?"T"+b1(n,2)+":"+b1(r,2)+":"+b1(i,2)+"."+b1(a,3)+"Z":i?"T"+b1(n,2)+":"+b1(r,2)+":"+b1(i,2)+"Z":r||n?"T"+b1(n,2)+":"+b1(r,2)+"Z":"")}function w1(r){var e=new RegExp('["'+r+"\n\r]"),h=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,c=!1;function l(){if(s)return d1;if(c)return c=!1,f1;var t,e,n=a;if(r.charCodeAt(n)===p1){for(;a++<i&&r.charCodeAt(a)!==p1||r.charCodeAt(++a)===p1;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===g1?c=!0:e===y1&&(c=!0,r.charCodeAt(a)===g1)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===g1)c=!0;else if(e===y1)c=!0,r.charCodeAt(a)===g1&&++a;else if(e!==h)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===g1&&--i,r.charCodeAt(i-1)===y1&&--i;(e=l())!==d1;){for(var u=[];e!==f1&&e!==d1;)u.push(e),e=l();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?x1(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=m1(n=t),function(t,e){return r(i(t),e,n)}):m1(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?v1(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?v1(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function k1(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;M1&&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 M1=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),E1=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>Ee(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),w1(i).parse(t,a?k1:K0);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};E1.props={};const O1=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},[])}};O1.props={};const S1=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)};function _1(t,e,n){return Math.min(n,Math.max(e,t))}S1.props={};const A1=i=>t=>{const{fields:e=[]}=i;let{start:n=0,end:r=t.length}=i;n=_1(n,0,t.length-1),r=_1(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),{}))},T1=(A1.props={},t=>{t=t.fields;return A1({fields:t})});T1.props={};const P1=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};P1.props={};const L1=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))}},N1=(L1.props={},t=>{const e=t["value"];return()=>e}),C1=(N1.props={},t=>{const{callback:e=K0}=t;return t=>e(t)}),j1=(C1.props={},t=>{const{callback:e=K0}=t;return t=>Array.isArray(t)?t.map(e):t});j1.props={};var R1=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 F1={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 I1(t){const{y:l,thickness:u,weight:h,marginRatio:f,id:d,source:p,target:g,sourceWeight:y,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},F1),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=Rp(r,t=>t.source),a=Rp(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=o0(e,t=>t.sourceWeight)+o0(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:R1[v])&&r.sort(n),!(n=(r=e).length))throw Z0("Invalid nodes: it's empty!");if(h){const o=f/(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-f),e.height=u;var n=o+t,r=n+e.width,i=l-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 c=1/n;r.forEach((t,e)=>{t.x=(e+.5)*c,t.y=l})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!h)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=[l,l,l,l]});const s=Rp(e,t=>t.source),c=Rp(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=c.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 D1=e=>t=>I1(e)(t),B1=(D1.props={},Math.PI/180),G1=64,z1=2048;function W1(t){return t.text}function V1(){return"serif"}function H1(){return"normal"}function Y1(t){return t.value}function q1(){return 90*~~(2*Math.random())}function U1(){return 1}function X1(){}function $1(t,o,r,s){if(!o.sprite){var c=t.context,l=t.ratio;c.clearRect(0,0,(G1<<5)/l,z1/l);let i=0,a=0,n=0;var u,h,f,d,e=r.length;for(--s;++s<e;){o=r[s],c.save(),c.font=o.style+" "+o.weight+" "+~~((o.size+1)/l)+"px "+o.font;let t=c.measureText(o.text+"m").width*l,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*B1),f=Math.cos(o.rotate*B1),u=t*f,h=t*d,f=e*f,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(h+f),Math.abs(h-f))):t=t+31>>5<<5,e>n&&(n=e),i+t>=G1<<5&&(i=0,a+=n,n=0),a+e>=z1)break;c.translate((i+(t>>1))/l,(a+(e>>1))/l),o.rotate&&c.rotate(o.rotate*B1),c.fillText(o.text,0,0),o.padding&&(c.lineWidth=2*o.padding,c.strokeText(o.text,0,0)),c.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=c.getImageData(0,0,(G1<<5)/l,z1/l).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)*(G1<<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 K1(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Z1(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function J1(){return document.createElement("canvas")}function Q1(t){return"function"==typeof t?t:function(){return t}}const ty={archimedean:K1,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 ey(){let b=[256,256],r=W1,i=V1,p=Y1,g=H1,y=q1,m=U1,x=K1,w=Math.random,v=X1,k=[],M=null,E=1/0;const O=H1,S=J1,_={};return _.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=(G1<<5)/e,t.height=z1/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),c=_.board||Z1((b[0]>>5)*b[1]),l=k.length,u=[],h=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=O.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 f=-1,d=_.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<E&&++f<l;){var i=h[f];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,$1(s,i,h,f),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 c,l=-s,u,h;for(;(c=o(l+=s))&&(u=~~c[0],h=~~c[1],!(Math.min(Math.abs(u),Math.abs(h))>=a));)if(t.x=n+u,t.y=r+h,!(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,c=t.y1-t.y0;let l=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<c;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[l+t])return 1;l+=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 f=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=f[e*d+t])>>>y:0);r+=p}return delete t.sprite,1}return}(c,i,d)&&(v.call(null,"word",{cloud:_,word:i}),u.push(i),d?_.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)}_._tags=u,_._bounds=d,f>=l&&(_.stop(),v.call(null,"end",{cloud:_,words:u,bounds:d}))}return M&&clearInterval(M),M=setInterval(n,0),n(),_},_.stop=function(){return M&&(clearInterval(M),M=null),_},_.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=Z1((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),c=e*n+t<<2,c=250<=o[c]&&250<=o[1+c]&&250<=o[2+c]?1<<31-t%32:0;a[s]|=c}_.board=a,_.hasImage=!0}},_.timeInterval=function(t){E=null==t?1/0:t},_.words=function(t){k=t},_.size=function(t=[]){b=[+t[0],+t[1]]},_.text=function(t){r=Q1(t)},_.font=function(t){i=Q1(t)},_.fontWeight=function(t){g=Q1(t)},_.rotate=function(t){y=Q1(t)},_.spiral=function(t){x=ty[t]||t},_.fontSize=function(t){p=Q1(t)},_.padding=function(t){m=Q1(t)},_.random=function(t){w=Q1(t)},_.on=function(t){v=Q1(t)},_}const ny={size:[500,500],fontSize:[14,28]};function ry(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 iy=f=>h=>Ee(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},ny,f),e=ey(),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 Ee(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=h.map(t=>t.value),n=t,t=[Jp(e),Kp(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",ry,e.createMask),e.words([...h]),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:c,y:l}]=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:c,y:n?o:l})),t});function ay(e){return"string"==typeof e?t=>t[e]:e}iy.props={};const oy=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=ay(r),c=ay(t),l=Fp(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=l.get(c(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})};oy.props={};const sy=u=>l=>Ee(void 0,void 0,void 0,function*(){var{width:t,height:e}=og(l),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=Z(u,["data","encode","scale","style","layout"]),c={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 iy(Object.assign(Object.assign({},c),o))(e);return[R({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]}),cy=(sy.props={composite:!0},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),ly=(cy.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),uy=(ly.props={},()=>["#95F0FF","#78D3F8","#5AB8DB","#3A9DBF","#0A82A4","#00698A","#005170","#003958","#002440"]),hy=(uy.props={},()=>["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]),fy=(hy.props={},()=>["#9DF5CA","#61DDAA","#42C090","#19A576","#008A5D","#006F45","#00562F","#003E19","#002800"]),dy=(fy.props={},()=>["#8CF4F2","#6FD8D6","#52BCBA","#31A09F","#008685","#006C6C","#005354","#003B3D","#002627"]),py=(dy.props={},()=>["#D0E4FF","#B4C8ED","#99ADD1","#7E92B5","#65789B","#4C6080","#334867","#1B324F","#021D38"]),gy=(py.props={},()=>["#FFC771","#FFAB57","#F6903D","#D77622","#B85C00","#9B4300","#7D2A00","#601000","#450000"]),yy=(gy.props={},()=>["#FFC2EC","#FFA6D0","#F08BB4","#D37099","#B65680","#9A3C67","#7E214F","#630038","#490022"]),my=(yy.props={},()=>["#FFBB95","#FF9E7B","#FF8362","#E8684A","#C84D32","#AA311C","#8C1104","#6F0000","#510000"]),vy=(my.props={},()=>["#FFD83B","#F6BD16","#D7A100","#B98700","#9C6E00","#7F5600","#633F00","#482900","#2F1400"]),by=(vy.props={},()=>["#FFCCFF","#EBB0FF","#CE95F5","#B27AD8","#9661BC","#7B48A1","#613086","#48186C","#2E0054"]),xy=(by.props={},()=>["#FDEDBE","#FFDF80","#FFCB33","#FFB200","#FF8C00","#FF6500","#E6450F","#B22C00","#661900"]),wy=(xy.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),ky=(wy.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),My=(ky.props={},()=>["#D2EDC8","#A9DACC","#75C6D1","#42B3D5","#3993C2","#3073AE","#27539B","#1E3388","#171E6D"]),Ey=(My.props={},()=>["#003F7F","#004C99","#0059B2","#0072E5","#1A8CFF","#4DA6FF","#80BFFF","#B3D9FF","#EAE9EB","#FFD5B1","#FFC08C","#FFAB66","#FF963E","#F17F0B","#D16A0C","#A45411","#794012"]),Oy=(Ey.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#E0F2EB","#66D8FF","#1AC5FF","#007FFF","#0059FF","#0040FF","#002CB2","#FFDF80","#001F7F"]),Sy=(Oy.props={},()=>["#014c63","#10686c","#168575","#16a37e","#0bc286","#65cf9b","#96dcb0","#c1e8c5","#F2EAEA","#FFC5AC","#FFA884","#FF895D","#FF6836","#F3470D","#D13808","#A4300C","#7A270E"]),_y=(Sy.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#FFE2DC","#EAACFF","#DD78FF","#C53FFF","#A700FF","#8500FF","#620BE1","#3607C2","#27029A"]);function Ay(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Ty(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Py(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var c=Math.floor((a+o)/2);s(t[c])>e?o=c:a=c+1}return a}_y.props={};const Ly=Math.sqrt(50),Ny=Math.sqrt(10),Cy=Math.sqrt(2);function jy(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>=Ly?10:n>=Ny?5:n>=Cy?2:1)*10**t:-(10**-t)/(n>=Ly?10:n>=Ny?5:n>=Cy?2:1)}function Ry(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>=Ly?r*=10:n>=Ny?r*=5:n>=Cy&&(r*=2),e<t?-r:r}const Fy=(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=jy(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=jy(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=jy(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},Iy=36e5,Dy=864e5,By=7*Dy;Dy,Dy;function Gy(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},c=(t,e)=>{e&&i(t,e),n(t)};const l=(t,e)=>{t=new Date(+t-1);return c(t,e),s(t,e),c(t),t};return{ceil:l,floor:(t,e)=>{t=new Date(+t);return c(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?l(t,n):l(t);+o<+e;s(o,a),c(o))i.push(new Date(+o));return i},duration:t}}tl=Gy(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),ho=Gy(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),fo=Gy(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),po=Gy(Iy,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Iy*e)},t=>t.getHours()),mo=Gy(Dy,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Dy*e)},t=>t.getDate()-1);const zy=Gy(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=Gy(By,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+By*e)},t=>{var e=zy.floor(t),t=new Date(+t);return Math.floor((+t-+e)/By)}),bo=Gy(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 Wy={millisecond:tl,second:ho,minute:fo,hour:po,day:mo,week:vo,month:zy,year:bo};xo=Gy(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),wo=Gy(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),ko=Gy(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),a=Gy(Iy,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Iy*e)},t=>t.getUTCHours()),Mo=Gy(Dy,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Dy*e)},t=>t.getUTCDate()-1);const Vy=Gy(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());Eo=Gy(By,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+By*e)},t=>{var e=Vy.floor(t),t=new Date(+t);return Math.floor((+t-+e)/By)}),go=Gy(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 Hy={millisecond:xo,second:wo,minute:ko,hour:a,day:Mo,week:Eo,month:Vy,year:go};function Yy(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?Hy:Wy;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,c=r||(e-t)/n,l=i.length,u=Py(i,c,0,l,s);let h;return h=u===l?[a,Ry(t/a.duration,e/a.duration,n)]:u?([l,a]=c/s(i[u-1])<s(i[u])/c?i[u-1]:i[u],[l,r?Math.ceil(r/l.duration):a]):[o,Math.max(Ry(t,e,n),1)]}const qy=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Yy(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function Uy(t){return null!=t&&!Number.isNaN(t)}const Xy=e=>t=>-e(-t),$y=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?Xy(t):t},Ky=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?Xy(n):n},Zy=(t,e,n,r)=>{var i=t<0,a=$y(r,i),r=Ky(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 Jy(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 Pf(t)?Math.round(t):t}):i;this.output=Ay(a,r,e,t)},t.prototype.invert=void 0}}var Qy,Zc={exports:{}},rl={exports:{}},tm=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))},em=Array.prototype.concat,nm=Array.prototype.slice,rm=rl.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];tm(i)?e=em.call(e,nm.call(i)):e.push(i)}return e},im=(rm.wrap=function(t){return function(){return t(rm(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]}),am=rl.exports,om=Object.hasOwnProperty,sm=Object.create(null);for(Qy in im)om.call(im,Qy)&&(sm[im[Qy]]=Qy);var cm=Zc.exports={to:{},get:{}};function lm(t,e,n){return Math.min(Math.max(e,t),n)}function um(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}cm.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=cm.get.hsl(t),n="hsl";break;case"hwb":e=cm.get.hwb(t),n="hwb";break;default:e=cm.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},cm.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]:om.call(im,e[1])?((i=im[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]=lm(i[n],0,255);return i[3]=lm(i[3],0,1),i},cm.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,lm(parseFloat(t[2]),0,100),lm(parseFloat(t[3]),0,100),lm(isNaN(e)?1:e,0,1)]):null},cm.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,lm(parseFloat(t[2]),0,100),lm(parseFloat(t[3]),0,100),lm(isNaN(e)?1:e,0,1)]):null},cm.to.hex=function(){var t=am(arguments);return"#"+um(t[0])+um(t[1])+um(t[2])+(t[3]<1?um(Math.round(255*t[3])):"")},cm.to.rgb=function(){var t=am(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]+")"},cm.to.rgb.percent=function(){var t=am(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]+")"},cm.to.hsl=function(){var t=am(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},cm.to.hwb=function(){var t=am(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},cm.to.keyword=function(t){return sm[t.slice(0,3)]};var hm=Zc.exports;function fm(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 dm(t){var e,n,r,t=hm.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*fm(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*fm(n,r,e),255*fm(n,r,e-1/3),t]):null):null}const pm=(e,n)=>t=>e*(1-t)+n*t,gm=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return pm(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const c=dm(n),l=dm(r);return null===c||null===l?c?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=c[t],i=l[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})`}}},ym=(t,e)=>{const n=pm(t,e);return t=>Math.round(n(t))};function mm({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function vm(t){return"object"==typeof t?t.valueOf():t}class bm extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=vm,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(mm({map:this.map,initKey:this.initKey},t))}has(t){return super.has(mm({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 xm{constructor(t){this.options=R({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=R({},this.options,t),this.rescale(t)}rescale(t){}}const wm=Symbol("defaultUnknown");function km(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function Mm(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==wm)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function Em(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class Om extends xm{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:wm}}map(t){return 0===this.domainIndexMap.size&&km(this.domainIndexMap,this.getDomain(),this.domainKey),Mm({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&km(this.rangeIndexMap,this.getRange(),this.rangeKey),Mm({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=Em(e),this.rangeKey=Em(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 Om(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 Sm(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var c=e.length,l=0<(l=(t=c)-(u=a).length)?[...u,...new Array(l).fill(1)]:l<0?u.slice(0,t):u,[t,u]=n,u=u-t,h=u/(2/c*r+1-1/c*i);const f=h*i/c;h-=c*f;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(l),p=h/d.reduce((t,e)=>t+e);var l=new bm(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new bm(e.map((t,e)=>{e=d[e]*p+f;return[t,o?Math.floor(e):e]})),h=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(h-h/c*i))*s;let y=o?Math.round(t):t;var m=new Array(c);for(let t=0;t<c;t+=1){m[t]=(v=y,Math.round(1e12*v)/1e12);var v=e[t];y+=g.get(v)}return{valueBandWidth:l,valueStep:g,adjustedRange:m}}class _m extends Om{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:wm,flex:[]}}clone(){return new _m(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 Sm(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,c=n[0];return n=n[1]-c,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),c+=(n-o*(e-r))*a,s=o*(1-r),i&&(c=Math.round(c),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>c+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 Am=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=jy(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 Tm(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const Pm=[1,5,2,2.5,4,3],Lm=100*Number.EPSILON;const Nm=(n,r,t=5,i=!0,a=Pm,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 c,l,u,h,f,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=(h=m,f=a,d=y,p=void 0,p=Hf(f),1-Bf(f,h)/(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=(E=r,k=w*(e-1),(E-=n)<k?1-((k-E)/2)**2/(.1*E)**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,E=Math.ceil(n/w)*y;if(M<=E){var O=E-M;for(let t=0;t<=O;t+=1){var S=(M+t)*(w/y),_=S+w*(e-1),A=w,T=function(t,e,n,r,i,a){var o=Hf(e),e=Bf(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<Lm||a-t<Lm)&&r<=0&&0<=i?1:s)}(m,a,y,S,_,A),P=1-.5*((r-_)**2+(n-S)**2)/(.1*(r-n))**2,L=(c=e,L=n,c=(c-1)/(_-(N=S)),l=((l=s)-1)/(Math.max(_,r)-Math.min(L,N)),2-Math.max(c/l,l/c)),N=o[0]*T+o[1]*P+o[2]*L+ +o[3];g.score<N&&(!i||S<=n&&r<=_)&&(g.lmin=S,g.lmax=_,g.lstep=A,g.score=N)}}t+=1}e+=1}}y+=1}var t=Tm(g.lmax),e=Tm(g.lmin),C=Tm(g.lstep),j=Math.floor((t=(t-e)/C,Math.round(1e12*t)/1e12))+1,R=new Array(j);R[0]=Tm(e);for(let t=1;t<j;t+=1)R[t]=Tm(R[t-1]+C);return R};class Cm extends xm{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Nm}}map(t){return Uy(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Cm(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return Pf(t)&&Pf(r)?n(t,r,e):[]}}const jm=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return Ay(o=t<r?(a=Ty(t,r),n(e,i)):(a=Ty(r,t),n(i,e)),a)},Rm=(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,c=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=Ty(s[t],s[t+1]),o[t]=e(c[t],c[t+1]);return t=>{var e=Py(r,t,1,i)-1,n=a[e];return Ay(o[e],n)(t)}},Fm=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?Rm:jm)(t,e,r?ym:n)};class Im extends xm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:pm,tickCount:5}}map(t){return Uy(t)?this.output(t):this.options.unknown}invert(t){return Uy(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 Fy}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 zf}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=Fm(n.map(t),r,a,i);this.output=Ay(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=Fm(i,r.map(t),pm);this.input=Ay(e,n,i)}}class Dm extends Im{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:gm,tickMethod:Am,tickCount:5}}chooseTransforms(){return[zf,zf]}clone(){return new Dm(this.options)}}class Bm extends _m{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:wm,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new Bm(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const Gm=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class zm extends Im{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:gm,tickMethod:Am,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[zf,zf]:(t=.5===r?Gm:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new zm(this.options)}}class Wm extends zm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:gm,tickMethod:Am,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new Wm(this.options)}}class Vm extends xm{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return Uy(t)?(t=Py(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 Vm(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const Hm=(t,e,n,r=10)=>{var i=t<0,a=Ky(r,i),o=$y(r,i),s=e<t,c=s?e:t,l=s?t:e;let u=o(c),h=o(l),f=[];if(!(r%1)&&h-u<n){if(u=Math.floor(u),h=Math.ceil(h),i)for(;u<=h;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(l<p)break;c<=p&&f.push(p)}}else for(;u<=h;u+=1){var g=a(u);for(let t=1;t<r;t+=1){var y=g*t;if(l<y)break;c<=y&&f.push(y)}}2*f.length<n&&(f=Am(c,l,n))}else f=Am(u,h,Math.min(h-u,n)).map(a);return s?f.reverse():f};class Ym extends Im{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:gm,tickMethod:Hm,tickCount:5}}chooseNice(){return Zy}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[$y(t,e),Ky(t,e)]}clone(){return new Ym(this.options)}}class qm extends Vm{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Nm}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=Fy(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 qm(this.options)}}function Um(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 Xm extends Vm{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Nm}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=Um(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 Xm(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var $m=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,Km=/\[([^]*?)\]/gm;function Zm(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function Jm(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 Qm(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var tv,Ko=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ol=["January","February","March","April","May","June","July","August","September","October","November","December"],sl=Zm(ol,3),ev=Jm({},{dayNamesShort:Zm(Ko,3),dayNames:Ko,monthNamesShort:sl,monthNames:ol,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),nv={D:function(t){return String(t.getDate())},DD:function(t){return Qm(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Qm(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 Qm(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 Qm(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Qm(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Qm(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Qm(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Qm(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Qm(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Qm(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Qm(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?"-":"+")+Qm(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+Qm(Math.floor(Math.abs(t)/60),2)+":"+Qm(Math.abs(t)%60,2)}},rv={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 iv=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Yy(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function av(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class ov extends Im{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:iv,interpolate:pm,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return qy}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?Hy:Wy,s=t?av:zf;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=rv.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=rv[t]||t).replace(Km,function(t,e){return r.push(e),"@@@"}),Jm(Jm({},ev),n));return(t=t.replace($m,function(t){return nv[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new ov(this.options)}}var sv;let cv=tv=class extends Dm{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:zf,tickMethod:Am,tickCount:5}}constructor(t){super(t)}clone(){return new tv(this.options)}};cv=tv=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}([Jy(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return Ay(pm(0,1),Ty(t,e))})],cv);let lv=sv=class extends Dm{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:zf,tickMethod:Am,tickCount:5}}constructor(t){super(t)}clone(){return new sv(this.options)}};lv=sv=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}([Jy(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=Ay(pm(0,.5),Ty(e,n)),a=Ay(pm(.5,1),Ty(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],lv);const uv=t=>new _m(t),hv=(uv.props={},t=>new Dm(t)),fv=(hv.props={},t=>new Om(t)),dv=(fv.props={},t=>new Cm(t)),pv=(dv.props={},t=>new Bm(t)),gv=(pv.props={},t=>new ov(t)),yv=(gv.props={},t=>new Ym(t)),mv=(yv.props={},t=>new zm(t)),vv=(mv.props={},t=>new Vm(t)),bv=(vv.props={},t=>new Xm(t)),xv=(bv.props={},t=>new qm(t)),wv=(xv.props={},t=>new Wm(t)),kv=(wv.props={},t=>new cv(t)),Mv=(kv.props={},Math.PI),Ev=2*Mv,Ov=1e-6,Sv=Ev-Ov;function _v(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Av(){return new _v}function Tv(t){return function(){return t}}_v.prototype=Av.prototype={constructor:_v,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,c=this._y1,l=(n=+n)-(t=+t),u=(r=+r)-(e=+e),h=s-t,f=c-e,d=h*h+f*f;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):d>Ov&&(Math.abs(f*l-u*h)>Ov&&i?(o=l*l+u*u,r=(n=n-s)*n+(s=r-c)*s,c=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((Mv-Math.acos((o+d-r)/(2*c*a)))/2))/a,r=o/c,Math.abs(d-1)>Ov&&(this._+="L"+(t+d*h)+","+(e+d*f)),this._+="A"+i+","+i+",0,0,"+ +(h*s<f*n)+","+(this._x1=t+r*l)+","+(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),c=t+o,l=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"+c+","+l:(Math.abs(this._x1-c)>Ov||Math.abs(this._y1-l)>Ov)&&(this._+="L"+c+","+l),n&&((a=a<0?a%Ev+Ev:a)>Sv?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=c)+","+(this._y1=l):a>Ov&&(this._+="A"+n+","+n+",0,"+ +(a>=Mv)+","+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 Pv=Math.abs,Lv=Math.atan2,Nv=Math.cos,Cv=Math.max,jv=Math.min,Rv=Math.sin,Fv=Math.sqrt,Iv=1e-12,Dv=Math.PI,Bv=Dv/2,Gv=2*Dv;function zv(t){return 1<=t?Bv:t<=-1?-Bv:Math.asin(t)}function Wv(t){return t.innerRadius}function Vv(t){return t.outerRadius}function Hv(t){return t.startAngle}function Yv(t){return t.endAngle}function qv(t){return t&&t.padAngle}function Uv(t,e,n,r,i,a,o){var s=t-n,c=e-r,o=(o?a:-a)/Fv(s*s+c*c),c=o*c,o=-o*s,s=t+c,t=e+o,e=n+c,n=r+o,r=(s+e)/2,l=(t+n)/2,u=e-s,h=n-t,f=u*u+h*h,a=i-a,s=s*n-e*t,n=(h<0?-1:1)*Fv(Cv(0,a*a*f-s*s)),e=(s*h-u*n)/f,t=(-s*u-h*n)/f,d=(s*h+u*n)/f,s=(-s*u+h*n)/f,u=e-r,h=t-l,n=d-r,f=s-l;return n*n+f*f<u*u+h*h&&(e=d,t=s),{cx:e,cy:t,x01:-c,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function Xv(){var A=Wv,T=Vv,P=Tv(0),L=null,N=Hv,C=Yv,j=qv,R=null;function e(){var t,e,n,r,i,a,o,s,c,l,u,h,f,d,p,g,y,m,v,b,x,w,k=+A.apply(this,arguments),M=+T.apply(this,arguments),E=N.apply(this,arguments)-Bv,O=C.apply(this,arguments)-Bv,S=Pv(O-E),_=E<O;if(R=R||(t=Av()),M<k&&(e=M,M=k,k=e),M>Iv?S>Gv-Iv?(R.moveTo(M*Nv(E),M*Rv(E)),R.arc(0,0,M,E,O,!_),k>Iv&&(R.moveTo(k*Nv(O),k*Rv(O)),R.arc(0,0,k,O,E,_))):(r=e=E,i=n=O,o=a=S,f=(u=j.apply(this,arguments)/2)>Iv&&(L?+L.apply(this,arguments):Fv(k*k+M*M)),w=x=s=jv(Pv(M-k)/2,+P.apply(this,arguments)),f>Iv&&(h=zv(f/k*Rv(u)),f=zv(f/M*Rv(u)),(a-=2*h)>Iv?(r+=h*=_?1:-1,i-=h):(a=0,r=i=(E+O)/2),(o-=2*f)>Iv?(e+=f*=_?1:-1,n-=f):(o=0,e=n=(E+O)/2)),u=M*Nv(e),h=M*Rv(e),f=k*Nv(i),E=k*Rv(i),s>Iv&&(d=M*Nv(n),p=M*Rv(n),g=k*Nv(r),y=k*Rv(r),S<Dv)&&(O=function(t,e,n,r,i,a,o,s){var c=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(c*c<Iv))return[t+(c=(o*(e-a)-s*(t-i))/c)*n,e+c*r]}(u,h,g,y,d,p,f,E))&&(S=u-O[0],v=h-O[1],b=d-O[0],m=p-O[1],v=1/Rv((1<(S=(S*b+v*m)/(Fv(S*S+v*v)*Fv(b*b+m*m)))?0:S<-1?Dv:Math.acos(S))/2),b=Fv(O[0]*O[0]+O[1]*O[1]),x=jv(s,(k-b)/(v-1)),w=jv(s,(M-b)/(1+v))),o>Iv?w>Iv?(c=Uv(g,y,u,h,M,w,_),l=Uv(d,p,f,E,M,w,_),R.moveTo(c.cx+c.x01,c.cy+c.y01),w<s?R.arc(c.cx,c.cy,w,Lv(c.y01,c.x01),Lv(l.y01,l.x01),!_):(R.arc(c.cx,c.cy,w,Lv(c.y01,c.x01),Lv(c.y11,c.x11),!_),R.arc(0,0,M,Lv(c.cy+c.y11,c.cx+c.x11),Lv(l.cy+l.y11,l.cx+l.x11),!_),R.arc(l.cx,l.cy,w,Lv(l.y11,l.x11),Lv(l.y01,l.x01),!_))):(R.moveTo(u,h),R.arc(0,0,M,e,n,!_)):R.moveTo(u,h),k>Iv&&a>Iv?x>Iv?(c=Uv(f,E,d,p,k,-x,_),l=Uv(u,h,g,y,k,-x,_),R.lineTo(c.cx+c.x01,c.cy+c.y01),x<s?R.arc(c.cx,c.cy,x,Lv(c.y01,c.x01),Lv(l.y01,l.x01),!_):(R.arc(c.cx,c.cy,x,Lv(c.y01,c.x01),Lv(c.y11,c.x11),!_),R.arc(0,0,k,Lv(c.cy+c.y11,c.cx+c.x11),Lv(l.cy+l.y11,l.cx+l.x11),_),R.arc(l.cx,l.cy,x,Lv(l.y11,l.x11),Lv(l.y01,l.x01),!_))):R.arc(0,0,k,i,r,_):R.lineTo(f,E)):R.moveTo(0,0),R.closePath(),t)return R=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +T.apply(this,arguments))/2,e=(+N.apply(this,arguments)+ +C.apply(this,arguments))/2-Dv/2;return[Nv(e)*t,Rv(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:Tv(+t),e):A},e.outerRadius=function(t){return arguments.length?(T="function"==typeof t?t:Tv(+t),e):T},e.cornerRadius=function(t){return arguments.length?(P="function"==typeof t?t:Tv(+t),e):P},e.padRadius=function(t){return arguments.length?(L=null==t?null:"function"==typeof t?t:Tv(+t),e):L},e.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:Tv(+t),e):N},e.endAngle=function(t){return arguments.length?(C="function"==typeof t?t:Tv(+t),e):C},e.padAngle=function(t){return arguments.length?(j="function"==typeof t?t:Tv(+t),e):j},e.context=function(t){return arguments.length?(R=null==t?null:t,e):R},e}function $v(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Kv(t){this._context=t}function Zv(t){return new Kv(t)}function Jv(t){return t[0]}function Qv(t){return t[1]}function tb(o,s){var c=Tv(!0),l=null,u=Zv,h=null;function e(t){var e,n,r,i=(t=$v(t)).length,a=!1;for(null==l&&(h=u(r=Av())),e=0;e<=i;++e)!(e<i&&c(n=t[e],e,t))===a&&((a=!a)?h.lineStart():h.lineEnd()),a&&h.point(+o(n,e,t),+s(n,e,t));if(r)return h=null,r+""||null}return o="function"==typeof o?o:void 0===o?Jv:Tv(o),s="function"==typeof s?s:void 0===s?Qv:Tv(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:Tv(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:Tv(+t),e):s},e.defined=function(t){return arguments.length?(c="function"==typeof t?t:Tv(!!t),e):c},e.curve=function(t){return arguments.length?(u=t,null!=l&&(h=u(l)),e):u},e.context=function(t){return arguments.length?(null==t?l=h=null:h=u(l=t),e):l},e}function eb(u,h,f){var d=null,p=Tv(!0),g=null,y=Zv,m=null;function e(t){var e,n,r,i,a,o=(t=$v(t)).length,s=!1,c=new Array(o),l=new Array(o);for(null==g&&(m=y(a=Av())),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(c[r],l[r]);m.lineEnd(),m.areaEnd()}s&&(c[e]=+u(i,e,t),l[e]=+h(i,e,t),m.point(d?+d(i,e,t):c[e],f?+f(i,e,t):l[e]))}if(a)return m=null,a+""||null}function t(){return tb().defined(p).curve(y).context(g)}return u="function"==typeof u?u:void 0===u?Jv:Tv(+u),h="function"==typeof h?h:Tv(void 0===h?0:+h),f="function"==typeof f?f:void 0===f?Qv:Tv(+f),e.x=function(t){return arguments.length?(u="function"==typeof t?t:Tv(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:Tv(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:Tv(+t),e):d},e.y=function(t){return arguments.length?(h="function"==typeof t?t:Tv(+t),f=null,e):h},e.y0=function(t){return arguments.length?(h="function"==typeof t?t:Tv(+t),e):h},e.y1=function(t){return arguments.length?(f=null==t?null:"function"==typeof t?t:Tv(+t),e):f},e.lineX0=e.lineY0=function(){return t().x(u).y(h)},e.lineY1=function(){return t().x(u).y(f)},e.lineX1=function(){return t().x(d).y(h)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:Tv(!!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}Kv.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 nb=ib(Zv);function rb(t){this._curve=t}function ib(e){function t(t){return new rb(e(t))}return t._curve=e,t}function ab(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(ib(t)):e()._curve},t}function ob(){}function sb(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 cb(t,e){this._context=t,this._k=(1-e)/6}function lb(t,e){this._context=t,this._k=(1-e)/6}function ub(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,c=t._y2;t._l01_a>Iv&&(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>Iv&&(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,c=(c*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,c,t._x2,t._y2)}function hb(t,e){this._context=t,this._alpha=e}rb.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))}},cb.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:sb(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:sb(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 cb(t,n)}return t.tension=function(t){return e(+t)},t}(0),lb.prototype={areaStart:ob,areaEnd:ob,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:sb(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 lb(t,n)}return t.tension=function(t){return e(+t)},t}(0),hb.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:ub(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 fb=function e(n){function t(t){return n?new hb(t,n):new cb(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function db(t,e){this._context=t,this._alpha=e}db.prototype={areaStart:ob,areaEnd:ob,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:ub(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 pb=function e(n){function t(t){return n?new db(t,n):new lb(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function gb(t){this._context=t}function yb(t){return new gb(t)}function mb(t,e){this._context=t,this._t=e}function vb(t){return new mb(t,.5)}function bb(t){return new mb(t,0)}function xb(t){return new mb(t,1)}function Q(t){return new wb([t],null,t,t.ownerDocument)}gb.prototype={areaStart:ob,areaEnd:ob,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))}},mb.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 wb{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 wb(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new wb(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 wb([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 wb(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 wb(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 wb([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],c=new Set,l=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])),h=Rp(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var f=e[t],d=n(f,t),p=r(f,t);if(l.has(d)){var g=l.get(d);g.__data__=f,g.__facet__=!1,a.push(g),o.delete(g),l.delete(d)}else if(u.has(d)){g=u.get(d);g.__data__=f,g.__facet__=!0,a.push(g),u.delete(d)}else if(h.has(d)){const Rp=h.get(d);s.push([f,Rp]);for(const y of Rp)o.delete(y);h.delete(d)}else l.has(p)?((d=l.get(p)).__toData__?d.__toData__.push(f):d.__toData__=[f],c.add(d),o.delete(d)):i.push(f)}var t=[new wb([],i,this._parent,this._document),new wb(a,null,this._parent,this._document),new wb(o,null,this._parent,this._document),new wb([],s,this._parent,this._document),new wb(c,null,this._parent,this._document)];return new wb(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new wb(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=wb.registry[t])?new e:Z0("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 wb([],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 kb([t,e],[n,r]){return[t-n,e-r]}function Mb([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function Eb([t,e]){return Math.atan2(e,t)}function Ob([t,e]){return Eb([t,e])+Math.PI/2}function Sb(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 _b([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function Ab(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function Tb(t){return t.map((t,e)=>e)}function F(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function Pb(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*Mb(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 Lb(t,e,n,r,i){e=Eb(kb(r,e))+Math.PI,n=Eb(kb(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function Nb(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=Tb(a),[r,o]=Pp(t,t=>a[t]);const s=new Dm({domain:[r,o],range:[0,100]}),c=t=>s.map(a[t]);r={between:t=>`${e[t]} ${c(t)}%`,start:t=>0===t?`${e[t]} ${c(t)}%`:`${e[t-1]} ${c(t)}%, ${e[t]} ${c(t)}%`,end:t=>t===e.length-1?`${e[t]} ${c(t)}%`:`${e[t]} ${c(t)}%, ${e[t+1]} ${c(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>c(t)-c(e)).map(r[i]||r.between).join(",")})`}function Cb(t){var[t,e,n,r]=t;return[r,t,e,n]}function jb(t,e,n){var[e,r,,i]=s0(t)?Cb(e):e,[n,a]=n,t=t.getCenter(),o=Ob(kb(e,t)),r=Ob(kb(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:Mb(i,t),outerRadius:Mb(e,t)}}function Rb(t,e,n,r){var i=t["defaultColor"],t=t[e]||{};return Object.assign({},{fill:i,stroke:i},t[n]||t[r])}function Fb(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function Ib(t,e){return c0(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}wb.registry={g:ts,rect:ps,circle:Yo,path:cs,text:ys,ellipse:Jo,image:is,line:os,polygon:us,polyline:fs,html:ns};const Db=P=>{const{colorAttribute:L,first:N=!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=Rb(r,i,a,o),i=L,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:c=o,radiusTopRight:l=o,radiusBottomRight:u=o,radiusBottomLeft:h=o,innerRadius:f=0,innerRadiusTopLeft:d=f,innerRadiusTopRight:p=f,innerRadiusBottomRight:g=f,innerRadiusBottomLeft:f=f,inset:y=0,insetLeft:m=y,insetRight:v=y,insetBottom:b=y,insetTop:x=y,lineWidth:i="stroke"===L||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(!c0(n)&&!u0(n)){var[M,,E]=!!s0(n)?Cb(t):t;const[T,_]=M;var[E,M]=kb(E,M),O=(0<E?T:T+E)+m,S=(0<M?_:_+M)+x,E=Math.abs(E)-(m+v),m=Math.abs(M)-(x+b);return Q(new ps({})).call(F,r).style("lineWidth",i).style("x",O).style("y",S).style("width",E).style("height",m).style("stroke",void 0===s?a:s).style(Fb(P),k).style(L,a).style("radius",[N?c:d,N?l:p,C?u:g,C?h:f]).call(F,w).node()}const{y:_,y1:A}=e;v=n.getCenter(),M=jb(n,t,[_,A]),x=Xv().cornerRadius(o).padAngle(y*Math.PI/180);return Q(new cs({})).call(F,r).style("path",x(M)).style("transform",`translate(${v[0]}, ${v[1]})`).style("stroke",a||s).style("lineWidth",i).style(L,a).style(Fb(P),k).call(F,j).node()}},Bb=(Db.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>Db(Object.assign({colorAttribute:"fill"},t))),Gb=(Bb.props=Object.assign({},Db.props),t=>Db(Object.assign({colorAttribute:"stroke"},t)));Gb.props=Object.assign({},Db.props);const zb=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(s0(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,c=Z(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return Db(Object.assign({colorAttribute:"fill"},c))(t,e,n,r,i,...a)}};function Wb(t,e,n){var[t,r,i,a]=t;if(s0(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]}zb.props=Object.assign({},Db.props);const Vb=t=>zb(Object.assign({adjustPoints:Wb},t));function Hb(t){const e="function"==typeof t?t:t.render;return class extends Uo{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}Vb.props=Object.assign({},Db.props);const Yb=Hb(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;Q(t).maybeAppend("line",()=>new cs({})).style("d",e).call(F,r),Q(t).maybeAppend("line1",()=>new cs({})).style("d",n).call(F,i)});const qb=t=>{const{curve:h,gradient:f=!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=Rb(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:c}=e,a=f&&a?Nb(a,s,c,f,d):r,s=Ib(n,e),c=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),y);let l;if(c0(n)){const u=n.getCenter();l=n=>ab(tb().curve(nb)).angle((t,e)=>Ob(kb(n[e],u))).radius((t,e)=>Mb(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(h)(n)}else l=tb().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(h);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(c,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?Q(new cs({})).style("d",l(r)).call(F,c):a&&!g?Q(new cs({})).style("d",l(t)).call(F,c):Q(new Yb).style("style1",Object.assign(Object.assign({},c),o)).style("style2",c).style("d1",e.map(l).join(",")).style("d2",l(t))).node()}},Ub=(qb.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=c0(n)?yb:Zv;return qb(Object.assign({curve:i},a))(t,e,n,r)}),Xb=(Ub.props=Object.assign({},qb.props),t=>{const{alpha:a=.5}=t,o=Z(t,["alpha"]);return(t,e,n,r)=>{var i=c0(n)?pb:fb;return qb(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),$b=(Xb.props=Object.assign({},qb.props),t=>qb(Object.assign({curve:xb},t))),Kb=($b.props=Object.assign({},qb.props),t=>qb(Object.assign({curve:bb},t))),Zb=(Kb.props=Object.assign({},qb.props),t=>qb(Object.assign({curve:vb},t)));function Jb(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"]]}Zb.props=Object.assign({},qb.props);var Qb,t2=Object.freeze({__proto__:null,point:Jb,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 o=f=>{const{colorAttribute:d,symbol:t,mode:p="auto"}=f,g=Z(f,["colorAttribute","symbol","mode"]),y=t2[t]||Jb;return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=Rb(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:c}=e,[l,u]=1===(l=t).length?l[0]:([[l,h],[u,i]]=l,[(l+u)/2,(h+i)/2]),h=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||f0(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 cs).call(F,r).style("d",y(l,u,h)).style("lineWidth",a).style("transform",o).style("stroke",s).style(Fb(f),c).style(d,s).call(F,g).node()}},e2=(o.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>o(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),n2=(e2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),r2=(n2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),i2=(r2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),a2=(i2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),o2=(a2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),s2=(o2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),c2=(s2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),l2=(c2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),u2=(l2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),h2=(u2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),f2=(h2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),d2=(f2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),p2=(d2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),g2=(p2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"point"},t))),y2=(g2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"square"},t))),m2=(y2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),v2=(m2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),b2=(v2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),x2=(b2.props=Object.assign({},o.props),t=>{const{arrowSize:h="40%"}=t,f=Z(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=Rb(r,e,i,a),{fill:e,stroke:i}=r,a=Z(r,["fill","stroke"]),[r,t]=t,[c,l]=Pb(r,t,{arrowSize:h}),u=Av();return u.moveTo(...r),u.lineTo(...t),u.moveTo(...t),u.lineTo(...c),u.moveTo(...t),u.lineTo(...l),Q(new cs).call(F,a).style("d",u.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(F,f).node()}});function w2(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,w2)}function k2(){this.constructor=Qb}x2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},Qb=w2,fl=Error,k2.prototype=fl.prototype,Qb.prototype=new k2,w2.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 M2;function E2(t,e,n,r){var i,a,o,s=O2(r=void 0===r?"...":r,n),c=hn(t)?t:_(i=t)?"":i.toString(),l=e,u=[];if(O2(t,n)<=e)return t;for(;;){if(a=c.substr(0,16),l<(o=O2(a,n))+s)break;if(u.push(a),l-=o,!(c=c.substr(16)))return u.join("")}for(;;){if(a=c.substr(0,1),l<(o=O2(a,n))+s)break;if(u.push(a),l-=o,!(c=c.substr(1)))return u.join("")}return"".concat(u.join("")).concat(r)}var O2=kn(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(M2=M2||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(n,"px"),r].join(" "),M2.measureText(hn(t)?t:"").width},function(t,e){return b([t],x(gn(e=void 0===e?{}:e)),!1).join("")});function S2(t,e){return"string"==typeof t?O2(t,e):t}function _2(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 A2(t,e){e=Math.pow(10,e);return~~(t*e)/e}function T2(t){if(dn(t))return[t,t,t,t];if(rn(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 P2=["default","active","selected","disabled","inactive"],L2={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function N2(t){var e;return t?null==t?void 0:t.default:(e=Mn(t)||{},P2.forEach(function(t){t in e&&delete e[t]}),e)}function C2(t,e,n){return void 0===n&&(n=!1),e?(e=Sn(t,e),n?Pn({},N2(t),e):e):N2(t)||{}}function j2(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 R2(t,e){for(var n=[],r=t,i=0;i<e.length;i++){var a=e[i];n.push(j2(r,a)),r=j2(r,a,!0)}return n.push(r),n}function F2(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 I2(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];(c=n(o,i)).__data__=o,null!==a&&(c.__fromElements__=a),this._parent.appendChild(c),r.push(c)}return new O(r,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var s=this._elements[i],c=n(o=s.__data__,i);s.appendChild(c),r.push(c)}return new O(r,null,r[0],this._document)},O.prototype.maybeAppend=function(t,e){e=Se(this,D2,"m",B2).call(this,t.startsWith("#")?t:"#".concat(t),e);return e.attr("id",t),e},O.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=Se(this,D2,"m",B2).call(this,t.startsWith(".")?t:".".concat(t),e);return e.attr("className",t),e},O.prototype.maybeAppendByName=function(t,e){e=Se(this,D2,"m",B2).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),c=[],l=new Set,u=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),h=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),f=Rp(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(h.has(g))(x=h.get(g)).__data__=p,x.__facet__=!0,o.push(x),h.delete(g);else if(f.has(g)){var m=f.get(g);c.push([p,m]);try{r=void 0;for(var v=Oe(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}}f.delete(g)}else u.has(y)?((x=u.get(y)).__toData__?x.__toData__.push(p):x.__toData__=[p],l.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([],c,this._parent,this._document),new O(l,null,this._parent,this._document)];return new O(this._elements,null,this._parent,this._document,w)},O.prototype.merge=function(t){var e=b(b([],x(this._elements),!1),x(t._elements),!1),t=b(b([],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,b([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},D2=new WeakSet,B2=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:ts,rect:ps,circle:Yo,path:cs,text:ys,ellipse:Jo,image:is,line:os,polygon:us,polyline:fs,html:ns};var D2,B2,G2=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=[]),D2.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 S(t,e){var n,r;if(e)try{for(var i=Oe(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=x(a.value,2),s=o[0],c=o[1];t.style(s,c)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function A(t){return new G2([t],null,t,t.ownerDocument)}function z2(t,e,n){return t.querySelector(e)?A(t).select(e):A(t).append(n)}function W2(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 V2(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 H2(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 Y2(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}function q2(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)X2(t,e[r]);return t}var U2=5,X2=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=U2),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?cn(t)?(cn(r[e])||(n[e]={}),a<o?X2(r[e],t,a+1,o):n[e]=i[e]):rn(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function $2(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 K2(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function Z2(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 J2(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 Q2,tx=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function ex(t){return hn(t)||dn(t)?new ys({style:{text:String(t)}}):t}function nx(t){return t*Math.PI/180}function rx(t){return Number((180*t/Math.PI).toPrecision(5))}function ix(t,e){var t=(t instanceof N?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 ax(t,e){if(e)try{var o=t instanceof N?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 N?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 ox(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}function sx(t,e){return tn(t)?t.apply(void 0,b([],x(e),!1)):t}function cx(t,e,n,r){void 0===r&&(r=!0),t?n(e):r&&e.node().removeChildren()}function lx(){return null!==Q2&&Q2.apply(this,arguments)||this}function ux(e,n){return Me(t,r=Uo),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(Pn({},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,q2({},{style:n},t))||this;return t.descriptor=e,t}var r}Me(lx,Q2=Uo);function hx(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 fx(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 dx(t,e){"text"===t.node().nodeName&&t.call(S,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:"..."})}function px(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)}Me(yx,gx=Uo),yx.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)},yx.prototype.update=function(t){this.attr(q2({},this.attributes,t=void 0===t?{}:t)),null!=(t=this.render)&&t.call(this,this.attributes,this)},yx.prototype.clear=function(){this.removeChildren()},yx.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},yx.prototype.attributeChangedCallback=function(){},yx.prototype.bindEvents=function(t,e){};var gx,$c=yx;function yx(t){return gx.call(this,t)||this}function mx(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 vx(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function bx(t,e,n){return[["M",t-n,e],["L",t+n,e]]}el=mx,Mc=bx;function xx(t){n="default",an(e=t)&&e instanceof Image?n="image":tn(e)?n="symbol":hn(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}Me(Mx,wx=$c),Mx.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"]),c=xx(a);c?z2(e,".".concat(c,"-marker"),c).attr("className","marker ".concat(c,"-marker")).call(function(t){var e,n;"image"===c?(e=2*o,t.style("img",a).style("width",e).style("height",e).style("x",-o).style("y",-o)):(e=o/2,n=tn(a)?a:Mx.getSymbol(a),t.style("path",null==n?void 0:n(r,i,e)).call(S,s))}):(null!=(n=this.querySelector(".marker"))&&n.remove(),this.removeChildren())},Mx.MARKER_SYMBOL_MAP=new Map,Mx.registerSymbol=function(t,e){Mx.MARKER_SYMBOL_MAP.set(t,e)},Mx.getSymbol=function(t){return Mx.MARKER_SYMBOL_MAP.get(t)};var wx,kx=Mx;function Mx(){return null!==wx&&wx.apply(this,arguments)||this}kx.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]]}),kx.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),kx.registerSymbol("line",vx),kx.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),kx.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]]}),kx.registerSymbol("circle",mx),kx.registerSymbol("point",el),kx.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"]]}),kx.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"]]}),kx.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"]]}),kx.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),kx.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"]]}),kx.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"]]}),kx.registerSymbol("line",vx),kx.registerSymbol("dot",bx),kx.registerSymbol("dash",Mc),kx.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]]}),kx.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]]}),kx.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]]}),kx.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]]}),kx.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]]});Me(Sx,Ex=$c),Sx.prototype.render=function(t,e){var n,r,i=t.padding,a=t.marker,o=t.text,s=t.textStyle,c=t.radius,l=t.backgroundStyle,u=t.spacing,h=t.align,t=t.verticalAlign,i=x(T2(void 0===i?0:i),4),f=i[0],d=i[1],p=i[2],i=i[3],g=z2(e,".tag-content","g").attr("className","tag-content").node(),y=z2(g,".tag-marker",function(){return new kx({})}).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=(z2(g,".tag-text","text").attr("className","tag-text").style("fontFamily","sans-serif").style("fontSize",12).style("x",m).style("y",y).style("text",_(o)?"":"".concat(o)).call(S,s).style("textBaseline","middle").call(function(t){o||t.remove()}),u=i,m=f,y=h||"start",s=t||"top",t=(h=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]),h.setLocalPosition([n,r]),g.getLocalBounds());z2(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]-f).style("width",null!==l?i+d+2*y.halfExtents[0]:0).style("height",null!==l?f+p+2*y.halfExtents[1]:0).style("radius",null!=c?c:2).style("fill","#fafafa").style("stroke","#d9d9d9").style("lineWidth",1).call(S,l)},Sx.defaultOptions={type:Sx.tag="tag",style:{padding:4,spacing:4}};var Ex,Ox=Sx;function Sx(t){return Ex.call(this,Pn({},Sx.defaultOptions,t))||this}var _x,Ax,Tx={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}}},Px={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"}}}},Lx={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}};function Nx(t){var n=_x.call(this,q2({},Nx.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 Cx(t){return Ax.call(this,Pn({},Cx.defaultOptions,t))||this}Me(Nx,_x=$c),Object.defineProperty(Nx.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(Nx.prototype,"text",{get:function(){var t,e=this.attributes.text;return""===e?e:(t=this.textAvailableWidth,E2(e,t))},enumerable:!1,configurable:!0}),Object.defineProperty(Nx.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=mn(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(Nx.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),Nx.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=Pn({},Sn(Tx,[n,e]),C2(Sn(Px,[t,e]),r),C2(Sn(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in Lx[e]&&(i[t]=Sn(Lx,[e,t]))}),Object.keys(Lx.strict[e]).forEach(function(t){i[t]=Sn(Lx,["strict",e,t])}),Pn(i,C2(Sn(this.attributes,e),"disabled"))),i},Nx.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(T2(n),4)),i=(n[0],n[1]),a=(n[2],n[3]),o=this.buttonHeight,s=this.getStyle("markerStyle"),c=this.markerSize,n=z2(e,".marker",function(){return new kx({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(v(v({},s),{symbol:r,x:a+c/2,y:o/2,size:c}))}).node().getLocalBounds(),l=this.text,l=void 0===l?"":l,u=this.getStyle("textStyle"),n=(this.textShape=z2(e,".text","text").attr("className","text").style("x",c?n.max[0]+t:a).style("y",o/2).style("text",l).style("textAlign","left").style("textBaseline","middle").call(S,u).node(),this.textShape.getLocalBounds()),l=this.getStyle("buttonStyle");z2(e,".background","rect").attr("className","background").style("zIndex",-1).call(S,l).style("height",o).style("width",a+(c?c+t:0)+2*n.halfExtents[0]+i).node()},Nx.prototype.update=function(t){this.attr(Pn({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},Nx.prototype.setState=function(t){this.update({state:t})},Nx.prototype.hide=function(){this.style.visibility="hidden"},Nx.prototype.show=function(){this.style.visibility="visible"},Nx.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},Nx.defaultOptions={type:Nx.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:{}}}},Me(Cx,Ax=$c),Cx.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,c=t.textStyle,i=t.padding,l=t.width,u=t.separator,t=x(T2(void 0===i?0:i),3),i=t[0],h=t[1],t=t[2],f=z2(e,".container","g").attr("className","container").style("x",n+t).style("y",r+i),d=0,p=0,g=(f.node().removeChildren(),this),a=0;a<s.length;a++)!function(t){var e,n=s[t],r=new Ox({className:"breadcrumb-item",style:v(v({x:d,y:p,text:_(n.text)?n.id:n.text,textStyle:c},_n(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(f.append(function(){return r}),r.getLocalBounds()),a=2*i.halfExtents[0],i=2*i.halfExtents[1],a=(d+=a,_(l)||l-h<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 ys({className:"".concat(Cx.tag,"-separator"),id:"".concat(Cx.tag,"-separator-").concat(t),style:v(v(v(v({},L2),{x:d+n,y:p+i/2}),a),{text:o,textAlign:"end",textBaseline:"middle"})}),f.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(a)},Cx.prototype.update=function(t){this.attr(Pn({},this.attributes,t)),this.render(this.attributes,this)},Cx.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)})},Cx.defaultOptions={type:Cx.tag="breadcrumb",style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:v(v({},L2),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};Me(Fx,jx=N),Fx.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},Fx.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},Fx.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()},Fx.prototype.createLines=function(t){var e=this;t.forEach(function(t){e.linesGroup.appendChild(new cs({name:"line",style:t}))})},Fx.prototype.createAreas=function(t){var e=this;t.forEach(function(t){e.areasGroup.appendChild(new cs({name:"area",style:t}))})};var jx,Rx=Fx;function Fx(t){var e=this,n=t.style,t=Z(t,["style"]);return(e=jx.call(this,Pn({},{type:"lines",style:{width:0,height:0}},v({style:n},t)))||this).linesGroup=new ts({name:"lines"}),e.appendChild(e.linesGroup),e.areasGroup=new ts({name:"areas"}),e.appendChild(e.areasGroup),e.render(),e}Me(Bx,Ix=N),Bx.prototype.render=function(){var e=this;this.attributes.columns.forEach(function(t){t.forEach(function(t){e.columnsGroup.appendChild(new ps({name:"column",style:t}))})})},Bx.prototype.update=function(t){this.attr(Pn({},this.attributes,t)),t.columns&&(this.clear(),this.render())},Bx.prototype.clear=function(){this.removeChildren()};var Ix,Dx=Bx;function Bx(t){var e=this,n=t.style,t=Z(t,["style"]);return(e=Ix.call(this,Pn({},{type:"column",style:{width:0,height:0}},v({style:n},t)))||this).columnsGroup=new ts({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function Gx(t){return 0===t.length?[0,0]:[un(function(t,e){if(rn(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=tn(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return un(t)||0})),ln(function(t,e){if(rn(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=tn(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return ln(t)||0}))]}function zx(t){for(var e=Mn(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 Wx(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,c,l=function(t,e,n,r){var i,a=[],o=!!r;if(o){l=r[0],u=r[1];for(var s=0,c=t.length;s<c;s+=1)var l=de([0,0],l,x=t[s]),u=pe([0,0],u,x)}for(var s=0,h=t.length;s<h;s+=1){var f,d,p,g,y,m,v,b,x=t[s];0!==s||n?s!==h-1||n?(f=t[[s?s-1:h-1,s-1][n?0:1]],d=t[n?(s+1)%h:s+1],m=ge(m=xe([0,0],d,f),m,e),0!==(y=(p=ye(x,f))+(g=ye(x,d)))&&(p/=y,g/=y),y=ge([0,0],m,-p),m=ge([0,0],m,g),v=fe([0,0],x,y),b=de([0,0],b=fe([0,0],x,m),pe([0,0],d,x)),b=pe([0,0],b,de([0,0],d,x)),v=de([0,0],v=fe([0,0],x,y=ge([0,0],y=xe([0,0],b,x),-p/g)),pe([0,0],f,x)),v=pe([0,0],v,de([0,0],f,x)),b=fe([0,0],x,m=ge([0,0],m=xe([0,0],x,v),g/p)),o&&(v=de([0,0],v=pe([0,0],v,l),u),b=de([0,0],b=pe([0,0],b,l),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,h=[],i=0;i<u-1;i+=1)o=l[2*i],s=l[2*i+1],h.push(["C",o[0],o[1],s[0],s[1],(c=r[i+1])[0],c[1]]);return e&&(o=l[u],s=l[u+1],h.push(["C",o[0],o[1],s[0],s[1],(c=r[0])[0],c[1]])),h}function Vx(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return b([e===n?"M":"L"],x(t),!1)});return e?t.reverse():t}function Hx(t,e){if(void 0===e&&(e=!1),t.length<=2)return Vx(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];Ln(a,n.slice(-2))||n.push.apply(n,b([],x(a),!1))}var o=Wx(n,!1);return e?o.unshift(b(["M"],x(t[r-1]),!1)):o.unshift(b(["M"],x(t[0]),!1)),o}function Yx(t,e,n){t=Mn(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}Me(Xx,qx=$c),Object.defineProperty(Xx.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=Mn(t),dn(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(Xx.prototype,"data",{get:function(){return this.attributes.isStack?zx(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(Xx.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(Xx.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(Xx.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(Xx.prototype,"linesCfg",{get:function(){var t,n,r,i,a,e,o,s,c,l=this,u=this.attributes,h=u.areaStyle,f=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),fn(r.map(t),a,i)]})}),e=[],h&&(g=this.baseline,e=f?(p?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=Hx(o),c=void 0,c=0===i?Yx(s,e,n):(a=Hx(t[i-1],!0),o=o[0],a[0][0]="L",b(b(b([],x(s),!1),x(a),!1),[b(["M"],x(o),!1),["Z"]],!1));r.push(c)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=Vx(t[i]),s=void 0,s=0===i?Yx(o,e,n):((a=Vx(t[i-1],!0))[0][0]="L",b(b(b([],x(o),!1),x(a),!1),[["Z"]],!1));r.push(s)}return r})(t,u,g):(o=p,s=u,c=g,t.map(function(t){return Yx((o?Hx:Vx)(t),s,c)}))),{lines:t.map(function(t,e){return v({stroke:l.getColor(e),path:(p?Hx:Vx)(t)},d)}),areas:e.map(function(t,e){return v({path:t,fill:l.getColor(e)},h)})})},enumerable:!1,configurable:!0}),Object.defineProperty(Xx.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=zx(s));var e=this.createScales(s),c=e.x,l=e.y,e=x(Gx(s),2),n=e[0],e=e[1],u=new Dm({domain:[0,e-(0<n?0:n)],range:[0,t]}),h=c.getBandWidth(),f=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=h/s.length;return v(v({fill:i.getColor(r)},o),a?{x:c.map(e),y:l.map(t),width:h,height:u.map(f[r][e])}:{x:c.map(e)+n*r,y:0<=t?l.map(t):l.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),Xx.prototype.render=function(t,e){this.containerShape=z2(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=z2(e,".".concat(r),function(){return new("line"===n?Rx:Dx)({className:r,style:i})}).call(S,i).node()},Xx.prototype.update=function(t){this.attr(Pn({},this.attributes,t)),this.render(this.attributes,this)},Xx.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},Xx.prototype.getColor=function(t){var e=this.attributes.color;return rn(e)?e[t%e.length]:tn(e)?e.call(null,t):e},Xx.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,c=s.width,s=s.height,l=x(Gx(t),2),u=l[0],l=l[1];return{type:n,x:"line"===n?new Dm({domain:[0,t[0].length-1],range:[0,c]}):new _m({domain:t[0].map(function(t,e){return e}),range:[0,c],paddingInner:r?i:0}),y:new Dm({domain:[null!=o?o:u,null!=e?e:l],range:[s,0],nice:a})}},Xx.tag="sparkline",Xx.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 qx,Ux=Xx;function Xx(t){return qx.call(this,Pn({},Xx.defaultOptions,t))||this}var $x=ux({render:function(t,e){function n(t,e,n,r,i){z2(h,"line-".concat(t),"line").attr("className","line-".concat(t)).style("x1",e).style("y1",n).style("x2",r).style("y2",i).style("stroke",h.style.stroke).style("strokeOpacity",h.style.strokeOpacity).style("lineWidth",h.style.lineWidth)}var r=t.size,i=t.radius,a=t.stroke,o=t.fill,s=t.lineWidth,c=t.orient,l=t.fillOpacity,t=t.strokeOpacity,r=void 0===r?10:r,u=2.4*r,h=z2(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",l||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,l=2/3*r,a=.25*u,s=.75*u;n(0,o,a,o,s),n(0,l,a,l,s),h.setOrigin(r/2,u/2),"vertical"===c?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}});Me(tw,Kx=$c),tw.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"),A(i).selectAll(".handle-icon").data(a?[a]:[],function(t){return t}).join(function(t){return t.append(function(t){return"symbol"===t?new kx({className:r,name:"icon",style:n}):new $x({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={}),z2(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 Kx,Zx,Jx,Qx=tw;function tw(){return null!==Kx&&Kx.apply(this,arguments)||this}function ew(t){var a=Zx.call(this,Pn({},ew.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(I2(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(I2(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 _o("valueChanged",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}function nw(t){var o=Jx.call(this,Pn({},nw.defaultOptions,t))||this;return o.onValueChanged=function(t){var e=o.style.value;t!==e&&(e=new _o("scroll",t={detail:{oldValue:t,value:e}}),o.dispatchEvent(e),e=new _o("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(I2(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(I2(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(I2(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}Me(ew,Zx=$c),Object.defineProperty(ew.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.getSafetyValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(ew.prototype,"names",{get:function(){return this.getAttribute("names")},set:function(t){this.setAttribute("names",t)},enumerable:!1,configurable:!0}),Object.defineProperty(ew.prototype,"backgroundShapeCfg",{get:function(){return v(v({cursor:"crosshair",zIndex:0},this.availableSpace),this.getStyle("backgroundStyle"))},enumerable:!1,configurable:!0}),Object.defineProperty(ew.prototype,"sparklineShapeCfg",{get:function(){var t=this.attributes,t=(t.orient,t.sparkline),e=t.padding,t=Z(t,["padding"]),e=x(T2(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(ew.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.padding,n=t.width,t=t.height,e=x(T2(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}),ew.prototype.getValues=function(){return this.values},ew.prototype.setValues=function(t){this.values=t,this.update({values:t})},ew.prototype.getNames=function(){return this.names},ew.prototype.setNames=function(t){this.names=t},ew.prototype.render=function(t,e){function n(e){var t="slider-".concat(e,"-handle");return z2(a,".".concat(t),function(){return new Qx({className:t})}).call(function(t){t.node().update(r.getHandleShapeCfg(e))}).node()}var r=this,i=t.backgroundStyle,t=t.selectionStyle,e=z2(e,".slider-background","rect").attr("className","slider-background").style("cursor","crosshair").style("fill","#416180").style("fillOpacity",.05).call(S,this.availableSpace).call(S,C2(i)).node(),a=(z2(this.backgroundShape=e,".slider-sparkline",function(){return new Ux({})}).attr("className","slider-sparkline").call(function(t){t.node().update(r.sparklineShapeCfg)}),z2(e,".slider-foreground","g").attr("className","slider-foreground").node());this.selectionShape=z2(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,C2(t)||{}).node();this.startHandle=n("start"),this.endHandle=n("end")},ew.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],c=t-s;return t<s&&(s=(n=x([t,s],2))[0],t=n[1]),r-i<c?[i,r]:s<i?o===i&&a===t?[i,t]:[i,c+i]:r<t?a===r&&o===s?[s,r]:[r-c,r]:[A2(s,e),A2(t,e)]},ew.prototype.getStyle=function(t,e,n){return void 0===e&&(e="default"),n?this.getHandleCfg(n):C2(Sn(this.attributes,t),e,!0)},ew.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}])},ew.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])}},ew.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,c=this.getHandleSize(t),l=this.getSafetyValues(),u=this.availableSpace,h=u.width,u=u.height,f=this.calcMask(),d=f.x,p=f.y,g=f.width,f=f.height,r=x("start"===t?[r[0],l[0]]:[r[1],l[1]],2),l=s(r[0],r[1]),s=new ys({style:v(v({},a),{text:l})}),r=W2(s),a=r.width,r=r.height,s=(s.destroy(),0),y=0,c=c/2,m="center";return"horizontal"===i?(e=(i=o+c)+a/2,m="start"===t?(s=0<(n=d-i-a)?-e:e,0<n?"end":"start"):(s=(n=a<h-d-g-i)?e:-e,n?"start":"end")):(a=o+c,y="start"===t?r<p-c?-a:a:r<u-p-f-c?a:-a),{x:s,y:y,text:l,textAlign:m}},ew.prototype.getHandleTextShapeCfg=function(t){var e=this.getHandleCfg(t).textStyle;return v(v({},e),this.calcHandleText(t))},ew.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)},ew.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)}},ew.prototype.getHandleCfg=function(t){var e=Sn(this.attributes,"handle"),n=e.start,r=e.end,e=Z(e,["start","end"]),i={};return"start"===t?i=n:"end"===t&&(i=r),Pn({},e,i)},ew.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))},ew.prototype.getOrientVal=function(t){var t=x(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},ew.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])},ew.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},ew.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"))},ew.defaultOptions={type:ew.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}}},Me(nw,Jx=$c),Object.defineProperty(nw.prototype,"padding",{get:function(){return T2(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(nw.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(nw.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(nw.prototype,"thumbRadius",{get:function(){var t=this.attributes.isRound,e=this.availableSpace,n=e.width,e=e.height,r=Sn(this.attributes,["thumbStyle","default","radius"]);return t?r||this.getOrientVal([e,n])/2:0},enumerable:!1,configurable:!0}),nw.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=z2(e,".track","rect").attr("className","track").style("width",null!=n?n:10).style("height",null!=r?r:200).call(S,C2(i)).node(),n=this.valueOffset(o||0),r=this.availableSpace;this.thumbShape=z2(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,C2(a)).node(),this.trackShape=e},nw.prototype.getValue=function(){return this.style.value},nw.prototype.setValue=function(t){var e=this.style,n=e.value,r=e.min,e=e.max;this.update({value:fn(t,r,e)}),this.onValueChanged(n)},nw.prototype.setOffset=function(t){var e=this.getValue();this.setValue(this.valueOffset(t,!0)+e)},nw.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*fn(t,i,n)},nw.prototype.getStyle=function(t,e){return void 0===e&&(e="default"),C2(Sn(this.attributes,t),e)},nw.prototype.bindEvents=function(){this.trackShape.addEventListener("click",this.onTrackClick),this.thumbShape.addEventListener("mousedown",this.onDragStart),this.thumbShape.addEventListener("touchstart",this.onDragStart),this.onHover()},nw.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},nw.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)},nw.defaultOptions={type:nw.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 rw={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 cs({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:[]}},iw=(Pn({},rw,{style:{type:"arc"}}),Pn({},rw,{style:{}}),hx({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 aw(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 ow(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=x(t,2);return[t[0],sx(t[1],e)]}))}function sw(t,e){return e&&tn(e)?t.filter(e):t}function cw(t){return t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},"")}function lw(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)?cw(r):e?(i=H2(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)},"")):""):cw(t)}function uw(t,e,n){function r(t,e){return"".concat(c," ").concat(t," ").concat(l," ").concat(e," ").concat(s)}var i=n.type,a=n.connect,o=n.center,s=n.closed?" Z":"",n=x([lw(t,n),lw(e.slice().reverse(),n,!0)],2),c=n[0],l=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([H2(e,o),H2(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 hw(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 c=x([e[s].points,e[s+1].points],2),c=uw(c[0],c[1],n);o.push({path:c,fill:a[s%a.length]})}A(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),aw(this,e,o,t)}).attr("className","grid-region")},function(t){return t.each(function(t,e){this.attr(t),aw(this,e,o,t)})},function(t){return t.remove()})}}Me(pw,fw=$c),pw.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:b(b([],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:lw(t.points,r)}}),A(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})),aw(this,e,a,v({path:t},i))}).attr("className","grid-line")},function(t){return t.each(function(t,e){this.attr(t),aw(this,e,a,t)})},function(t){return t.remove()}),hw(e,o,t)};var fw,dw=pw;function pw(){return null!==fw&&fw.apply(this,arguments)||this}var gw=kn(function(t,e){var e=x(e.angleRange,2),n=e[0];return(e[1]-n)*t+n},function(t,e){return b([t],x(e.angleRange),!1).join()}),yw=kn(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),me([0,0],[(r=x([i[0]-r,i[1]-n],2))[0],r[1]])):(i=nx(gw(t,e)),[-Math.sin(i),Math.cos(i)])},function(t,e){var n="linear"===(n=e).type?b(b([],x(n.startPos),!1),x(n.endPos),!1):b(b(b([],x(n.angleRange),!1),x(n.center),!1),[n.radius],!1);return"arc"===e.type&&n.push(t),n.join()});function mw(t,e,n){var t=yw(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 vw=kn(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 b(b([t],x(e.startPos),!1),x(e.endPos),!1).join()}),bw=kn(function(t,e){var n=e.radius,r=x(e.center,2),i=r[0],r=r[1],t=nx(gw(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return b(b(b([t],x(e.angleRange),!1),[e.radius],!1),x(e.center),!1).join()});function xw(t,e){return("linear"===e.type?vw:bw)(t,e)}function ww(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(iw.line.name," ").concat(t)).call(S,v(v({},o),{x1:n,y1:r,x2:i,y2:e}))}var n,r,i,s=t.startPos,c=t.endPos,l=t.truncRange,u=t.lineExtension,h=x([s,c],2),f=x(h[0],2),d=f[0],f=f[1],h=x(h[1],2),p=h[0],h=h[1],c=x(u?(s=x([s=s,c=c,u=void 0===(u=u)?[0,0]:u],3),u=(c=x(s[0],2))[0],c=c[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-c],2))[0],n=g[1],c=Math.sqrt(Math.pow(u,2)+Math.pow(n,2)),y=(g=x([-y/c,s/c],2))[0],s=g[1],[y*u,y*n,s*u,s*n]):new Array(4).fill(0),4),g=c[0],y=c[1],u=c[2],s=c[3];a.node().removeChildren();l?(c=(n=x(l,2))[0],l=n[1],i=(c=x([d+(p-d)*c,f+(h-f)*c],2))[0],c=c[1],r=(l=x([d+(p-d)*l,f+(h-f)*l],2))[0],l=l[1],e(iw.lineFirst.name,[[d+g,f+y],[i,c]]),e(iw.lineSecond.name,[[r,l],[p+u,h+s]]),i=a,t.truncRange,t.truncShape,t.lineExtension,i.select(iw.lineFirst.class).node(),i.select(iw.lineSecond.class).node()):e("axis-line",[[d+g,f+y],[p+u,h+s]])}function kw(t,e,n){var r,i,a,o,s,c,l,u,h,f,d,p,g,y=e.type;"linear"===y?ww(t,e,n):(r=t,a=n,u=(l=x((i=e).angleRange,2))[0],l=l[1],o=(s=x(i.center,2))[0],s=s[1],i=i.radius,console.assert(u<l,"end angle should be greater than start angle"),(360==(c=l-u)?r.maybeAppendByClassName(iw.line,"circle").style("cx",o).style("cy",s).style("r",i):(d=(p=x([i,i],2))[0],p=p[1],h=(g=x([u*Math.PI/180,l*Math.PI/180],2))[0],g=g[1],f=(h=x([o+i*Math.cos(h),s+i*Math.sin(h)],2))[0],h=h[1],s=(o=x([o+i*Math.cos(g),s+i*Math.sin(g)],2))[0],i=o[1],g=180<c?1:0,o=l<u?0:1,c="M".concat(f,",").concat(h,",A").concat(d,",").concat(p,",0,").concat(g,",").concat(o,",").concat(s,",").concat(i),r.maybeAppendByClassName(iw.line,"path").style("path",c))).call(S,a)),l=t,u=y,f=n,d=(h=e).lineArrow,p=e.truncRange,g=void 0===(g=e.lineArrowOffset)?0:g,h=e.lineArrowSize,d&&(A(d=ex(d)).call(S,v({},f)),px(d,h,!0),("arc"!==u&&p?l.select(iw.lineSecond.class):l.select(iw.line.class)).style("markerEnd",d).style("markerEndOffset",-g))}function Mw(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function Ew(t,r){var e=r.gridLength,i=void 0===e?0:e;return t.map(function(t){var t=t.value,e=x(xw(t,r),2),n=e[0],e=e[1],t=x(ge([0,0],mw(t,r.gridDirection,r),i),2);return{points:[[n,e],[n+t[0],e+t[1]]]}})}function Ow(t,e,n,r){var i=r.type,a=r.closed,o=r.areaFill,s=r.connect,c=Mw(n),l=sw(e,n.gridFilter),e="segment"===i?Ew(l,n):function(t,o,e){var s,c,l=e.controlAngles;if(!(e=Mw(o)))throw new Error("grid center is not provid");if(t.length<2)throw new Error("Invalid grid data");if(l&&0!==l.length)return e=x(e,2),s=e[0],c=e[1],t.map(function(t){var t=x(xw(t.value,o),2),e=t[0],t=t[1],n=x([e-s,t-c],2),r=n[0],i=n[1],a=[[e,t]];return l.forEach(function(t){var t=nx(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+c])}),{points:a}});throw new Error("Invalid gridControlAngles")}(l,n,r);t.maybeAppendByClassName(iw.grid,function(){return new dw({})}).update(v(v({type:i,connect:s,closed:a,center:c},r),{items:e,areaFill:tn(o)?l.map(function(t,e){return sx(o,[t,e,l])}):o}))}Object.defineProperty(_w.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(_w.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(_w.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(_w.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(_w.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(_w.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),_w.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},_w.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},_w.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},_w.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])},_w.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),c=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+c,t*r+s*i+e],[s*r-t*o+c,t*r+s*o+e],[s*a-t*o+c,t*a+s*o+e],[s*a-t*i+c,t*a+s*i+e]].flat(1)},_w.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},_w.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},_w.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var Sw=_w;function _w(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 Aw(t,l){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=l,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!=(c=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<c)&&(n=s*i-t*r)<0!=e&&c<o!=e&&c<n!=e;var e,n,r,i,a,o,s,c})}function Tw(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],c=2*i[0],i=2*i[1],a=a[1],l=o[0],o=o[1],u=0,h=0,f=s,d=a,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,g=e.style.textBaseline,u=+e.style.dx,h=+e.style.dy,"center"===p?f=(s+l)/2:"right"!==p&&"end"!==p||(f=l),"middle"===g?d=(a+o)/2:"bottom"!==g&&"baseline"!==g||(d=o)),x(n,4)),l=p[0],g=void 0===l?0:l,o=p[1],n=void 0===o?0:o,l=p[2],o=p[3];return t.set((u+=s)-(void 0===o?n:o),(h+=a)-g,u+c+n,h+i+(void 0===l?g:l)),e.setEulerAngles(r),t.rotatedPoints(nx(r),f,d)}function Pw(t,a){var o;return b([],x(t.reduce(function(t,e,n){return n&&o&&(n=o,r=e,i=a,n=Tw(new Sw,n,i),Aw(r=Tw(new Sw,r,i),[n[0],n[1],n[2],n[3]])||Aw(r,[n[0],n[1],n[4],n[5]])||Aw(r,[n[4],n[5],n[6],n[7]])||Aw(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 Lw=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 Nw=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,c,l,u=Lw,h=2,f=t.slice(),d=t.slice(),p=Date.now(),g=Math.min.apply(Math,b([1],x(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==yw(0,n)[1]&&0!==yw(0,n)[0]||(n=V2(t[0]).left,t=V2(t[i-1]).right,t=Math.abs(t-n)||1,h=Math.max(Math.floor(i*g/t),h)),a&&(s=f.splice(0,1)[0]),o&&(c=f.splice(-1,1)[0],f.reverse());Pw((c?b(b([c],x(d),!1),[s],!1):b([s],x(d),!1)).filter(function(t){return tx(t)}),null==e?void 0:e.margin).length;)if((c&&!s&&h%2==0||c&&s)&&f.splice(0,1).forEach(r.hide),d=u(((l=f).forEach(r.show),l),{seq:h}),h++,200<Date.now()-p)return}}],["rotate",function(t,e,n,r){function i(){return Pw(t,s).length<1}function a(n){t.forEach(function(t,e){e=rn(n)?n[e]:n;_(e)||r.rotate(t,e)})}var o=void 0===(c=e.optionalAngles)?[0,45,90]:c,s=e.margin,c=e.recoverWhenFailed,e=t.map(function(t){return+(ix(t,"rotate")||0)});if(!i()){for(var l=0;l<o.length;l++)if(a(o[l]),i())return;c&&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,c=e.maxLength,l=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}),h=S2(l,e)||1,f=S2(s,e)||1,d=S2(c,e),p=(!_(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);f+h<m;m-=h){var v=function(e){return g.forEach(function(t){r.ellipsis(t,e,o)}),(g=Pw(t,u)).length<1||300<Date.now()-p?{value:void 0}:void 0}(m);if("object"==typeof v)return v.value}}]]);function Cw(i,a,o){var t=a.labelTransforms,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e,n=t.type,r=Nw.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 jw(t){for(var e=t;e<0;)e+=360;return e%360}var Rw=kn(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 b(b([],x(t),!1),x(e),!1).join()});function Fw(t,e){return mw(t,e.labelDirection,e)}function Iw(t,e,n){var r,i=n.labelAlign,e=ix(e,"rotate");return e?+e%180:(e=0,r=Fw(t.value,n),t=yw(t.value,n),"horizontal"===i?0:(e="perpendicular"===i?Rw([1,0],r):Rw([t[0]<0?-1:1,0],t),ox(n=((n=rx(e))+360)%180,-90,90)||(n+=180),n))}function Dw(t,e,n){e.setLocalEulerAngles(+t);t=function(t,e,n){var r=n.type,i=n.labelAlign,t=Fw(t,n),n=jw(e),e=jw(rx(Rw([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":ox(n,90,270)?ox(e,90,270)?"start":"end":ox(e,90,270)?"end":"start";if(0===e){if(ox(n,0,90,!1,!0))return"start";if(ox(n,0,90)||ox(n,270,360))return"start"}if(90===e){if(ox(n,0,90,!1,!0))return"start";if(ox(n,90,180)||ox(n,270,360))return"end"}if(270===e){if(ox(n,0,90,!1,!0))return"end";if(ox(n,90,180)||ox(n,270,360))return"start"}if(180===e){if(90===n)return"start";if(ox(n,0,90)||ox(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)&&A(n).style("textAlign",t)}function Bw(t,e,n,r){var i=r.showTick,a=r.tickLength,o=r.tickDirection,s=r.labelDirection,c=sx(r.labelSpacing,[t,e,n]),s=x([Fw(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(fe([0,0],ge([0,0],s[0],c+(1===s[1]?sx(i?a:0,[t,e,n]):0)),xw(t.value,r)),2);return{x:o[0],y:o[1]}}function Gw(t,e,n,r,i){var a=i.labelFormatter,o=Fw(e.value,i),i=function(){return ex(e.label||"")};return hn(a)?i=function(){return ex(a)}:tn(a)&&(i=function(){return ex(sx(a,[e,n,r,o]))}),t.append(i).attr("className",iw.labelItem.name)}function zw(t,e,n,r,i,a){var o=null==(o=r.getElementsByClassName(iw.labelItem.toString()))?void 0:o[0],a=x(F2(ow(a,[t,e,n])),2),s=a[0],a=a[1],c=a.transform,a=Z(a,["transform"]);"text"===(null==o?void 0:o.nodeName)&&A(o).call(S,v({fontSize:12,fontFamily:"sans-serif",fontWeight:"normal",textBaseline:"middle"},s)),r.attr(v(v({},Bw(t,e,n,i)),a)),ax(r,c),Dw(Iw(t,r,i),r,i)}function Ww(n){Cw(this.node().childNodes,n,{hide:function(t){t.style.visibility="hidden"},show:function(t){t.style.visibility="visible"},rotate:function(t,e){Dw(+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 Vw(t,e){return mw(t,e.tickDirection,e)}var Hw=kn(function(t,e){t=x(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return b(b([],x(t),!1),[e],!1).join()});function Yw(t,e,n,r,i){var a=i.tickFormatter,o=Vw(e.value,i),i="line";return a instanceof N?i=function(){return a}:tn(a)&&(i=function(){return sx(a,[e,n,r,o])}),t.append(i).attr("className",iw.tickItem.name)}function qw(t,e,n,r,i,a,o){var s=Vw(t.value,a),c=(u=t,h=e,f=n,s=s,c=(a=a).tickLength,l=(a=x(xw(u.value,a),2))[0],a=a[1],s=x(Hw(s,sx(c,[u,h,f])),2),u=(c=x(s[0],2))[0],h=c[1],f=x(s[1],2),{x:l,y:a,x1:u,x2:f[0],y1:h,y2:f[1]}),s=c.x1,l=c.x2,a=c.y1,u=c.y2,h=c.x,f=c.y,c=x(F2(ow(o,[t,e,n])),2),o=c[0],t=c[1];"line"===r.node().nodeName&&r.call(S,v({x1:s,x2:l,y1:a,y2:u},o)),i.attr(v({x:h,y:f},t)),S(r,o)}var Uw={text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"left-top"},Xw=hx({text:"text"},"title");function $w(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}).join(""):2<t.length?t[0]:t}function Kw(t,e){var n,r;try{for(var i=Oe(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=x(a.value,2),s=o[0],c=o[1];t.node().attr(s)||t.style(s,c)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}Me(Qw,Zw=$c),Qw.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(Xw.text.class);if(!a)return{x:0,y:0,width:+e,height:+n};var a=a.getBBox().height,i=x(T2(i),3),o=i[0],i=i[2],s=x([0,+n-a],2),c=s[0],s=s[1],r=$w(r);if("i"===r)return{x:0,y:c,width:+e,height:+n};r.includes("t")&&(c=(o=x([a+o,+n-a-o],2))[0],s=o[1]),r.includes("b")&&(s=x([+n-a-i],1)[0]);o=x(T2(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:c+r,width:+e-t[0],height:s-t[1]}},Qw.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(F2(a),2),s=o[0],t=(o[1],t=(o=t).width,c=o.height,o=o.position,n=x([+t/2,+c/2],2),u=(n=x([+n[0],+n[1],"center","middle"],4))[0],r=n[1],i=n[2],n=n[3],(o=$w(o)).includes("l")&&(u=(l=x([0,"start"],2))[0],i=l[1]),o.includes("r")&&(u=(l=x([+t,"end"],2))[0],i=l[1]),o.includes("t")&&(r=(t=x([0,"top"],2))[0],n=t[1]),o.includes("b")&&(r=(l=x([+c,"bottom"],2))[0],n=l[1]),{x:u,y:r,textAlign:i,textBaseline:n}),o=t.x,c=t.y,l=t.textAlign,u=t.textBaseline;a.text?A(e).maybeAppendByClassName(Xw.text,"text").call(S,s).call(Kw,{x:o,y:c,textAlign:l,textBaseline:u}):e.removeChildren()};var Zw,Jw=Qw;function Qw(t){return Zw.call(this,q2({},{style:Uw},t=void 0===t?{}:t))||this}function tk(t,e,n){var r,i,a,o,s,t=t.select(iw.mainGroup.class);return t=t,e=e,r=(n=n).titlePosition,n=void 0===(n=n.titleSpacing)?0:n,r=$w(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 ek(t,e,n,r){var i,a,o,s;n.title&&(a=(t=x((t=t,i=(a=n).title,a=t.maybeAppendByClassName(iw.title,function(){return ex(i)}),[t,a]),2))[0],t=t[1],a=a,e=e,n=n,o=(r=x(F2(r=r),2))[0],r=r[1],s=void 0===(s=r.transform)?"":s,r=Z(r,["transform"]),t.call(S,o),e=(o=tk(e,a,n)).x,n=o.y,a.node().attr(r),a.node().setPosition(e,n),ax(t,s))}var nk,rk=ux({render:function(n,e){var t=fx(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),c=(t.truncShape,t.showLine),l=(t.lineExtension,t.lineArrow,t.lineArrowOffset,t.lineArrowSize,t.showTick),u=(t.tickDirection,t.tickLength,t.tickFilter,t.tickFormatter,t.showLabel),h=(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(R2("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),f=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=(cx(h,A(e).maybeAppendByClassName(iw.gridGroup,"g"),function(t){Ow(t,m,n,y)}),A(e).maybeAppendByClassName(iw.mainGroup,"g")),r=(cx(c,t.maybeAppendByClassName(iw.lineGroup,"g"),function(t){kw(t,n,d)}),t.maybeAppendByClassName(iw.tickGroup,"g")),i=(cx(l,r,function(t){var r,i,a;t=t,i=p,a=sw(m,(r=n).tickFilter),t.selectAll(".axis-tick").data(a).join(function(t){return t.append("g").attr("className",iw.tick.name).each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Yw.apply(void 0,b(b([A(this)],x(t),!1),[a,r],!1));qw.apply(void 0,b(b([],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=Yw.apply(void 0,b(b([A(this)],x(t),!1),[a,r],!1));qw.apply(void 0,b(b([],x(t),!1),[a,n,this,r,i],!1))})},function(t){return t.remove()})}),t.maybeAppendByClassName(iw.labelGroup,"g")),a=(cx(u,i,function(t){var e,r,i,a;e=t,i=g,a=sw(m,(r=n).labelFilter),e.selectAll(iw.label.class).data(a).join(function(t){return t.append("g").attr("className",iw.label.name).each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];Gw.apply(void 0,b(b([A(this)],x(t),!1),[a,r],!1)),zw.apply(void 0,b(b([],x(t),!1),[a,this,r,i],!1))}).call(function(){Ww.call(e,r)})},function(t){return t.each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=A(this);n.node().removeChildren(),Gw.apply(void 0,b(b([n],x(t),!1),[a,r],!1)),zw.apply(void 0,b(b([],x(t),!1),[a,this,r,i],!1))}).call(function(){Ww.call(e,r)})},function(t){return t.remove()})}),A(e).maybeAppendByClassName(iw.titleGroup,"g"));cx(o,a,function(t){ek(t,A(e),n,f)})}},v({},rw.style)),ik={pageViews:[],effect:"linear",duration:200,orient:"horizontal",initPage:0,loop:!1,buttonPath:[["M",(Ao=0)-(Ec=6),(i=0)-Ec],["L",Ao+Ec,i],["L",Ao-Ec,i+Ec],["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},ak=hx({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"),ok=(Me(sk,nk=$c),Object.defineProperty(sk.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,b([],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(sk.prototype,"currPage",{get:function(){return this._currPage},enumerable:!1,configurable:!0}),Object.defineProperty(sk.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}),sk.prototype.setVisiblePages=function(n){this.attributes.pageViews.forEach(function(t,e){n.includes(e)?t.attr("visibility","visible"):t.attr("visibility","hidden")})},sk.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,c=e.getBBox(),l=c.width,c=c.height,l=Math.max(a,o,l),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[l/2,-s-r],[l/2,0],[l/2,c+r]],textAlign:"center"},a=x(i.offset,3),o=x(a[0],2),s=o[0],l=o[1],c=x(a[1],2),r=c[0],o=c[1],c=x(a[2],2),a=c[0],c=c[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,l),n.setLocalPosition(r,o),e.setLocalPosition(a,c)},sk.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(ak.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},sk.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]},sk.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)},sk.prototype.renderController=function(t){var e,n,r,i=this,a=this.attributes,o=a.controllerSpacing,a=a.pageViews,s=this.pageShape,c=s.pageWidth,s=s.pageHeight;a.length<2||(n=(a=x(R2(this.attributes,["button","pageNum"]),2))[0],a=a[1],r=(n=x(F2(n),2))[0],n=n[1],e=t.maybeAppendByClassName(ak.prevBtnGroup,"g").call(S,n),this.prevBtnGroup=e.node(),e.maybeAppendByClassName(ak.prevBtn,"path").attr("className","btn"),n=t.maybeAppendByClassName(ak.nextBtnGroup,"g").call(S,n),this.nextBtnGroup=n.node(),n.maybeAppendByClassName(ak.nextBtn,"path").attr("className","btn"),t.selectAll(".btn").call(S,r),r=t.maybeAppendByClassName(ak.pageInfoGroup,"g"),this.pageInfoGroup=r.node(),r.maybeAppendByClassName(ak.pageInfo,"text").style("text","").call(S,v(v({},L2),a)),this.updatePageInfo(),t.node().setLocalPosition(c+o,s/2),e.on("click",function(){i.prev()}),n.on("click",function(){i.next()}))},sk.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,c=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([c.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}},sk.prototype.prev=function(){var t=this.attributes,e=t.loop,t=t.pageViews.length,n=this.currPage,e=e?(n-1+t)%t:fn(n-1,0,t);return this.goTo(e)},sk.prototype.next=function(){var t=this.attributes,e=t.loop,t=t.pageViews.length,n=this.currPage,e=e?(n+1)%t:fn(n+1,0,t);return this.goTo(e)},sk.prototype.render=function(t,e){var n=this,r=t.pageViews,t=t.initPage,i=(this.clipPath=A(e).maybeAppendByClassName(ak.clipPath,function(){return new ps({style:{x:0,y:0,width:0,height:0}})}),A(e).maybeAppendByClassName(ak.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(ak.playWindow,"g").node(),this.playWindow.removeChildren(),r.forEach(function(t){return n.playWindow.appendChild(t)}),this.setVisiblePages([t]),A(e).maybeAppendByClassName(ak.controller,"g"));this.renderController(i),this.goTo(t)},sk);function sk(t){t=nk.call(this,q2({},{style:ik},t))||this;return t._currPage=0,t.finishedPromise=null,t.resolveFinishedPromise=null,t.playState="idle",t}function ck(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}kx.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"]]}),kx.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]]}),kx.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 lk,uk=hx({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"),hk={span:[1,1],marker:"path",markerD:mx(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"},fk=(Me(dk,lk=$c),Object.defineProperty(dk.prototype,"showValue",{get:function(){var t=this.attributes.value;return!!t&&(hn(t)||dn(t)?""!==t:""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(dk.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(dk.prototype,"span",{get:function(){var t,e=this.attributes;return"span"in e?(t=(e=x(T2(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(dk.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(dk.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=x(T2(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(dk.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}),dk.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,i=n.markerSize,a=j2(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(uk.markerGroup,"g"),cx(!!r,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(uk.marker,r).call(S,v({anchor:"0.5 0.5"},a)),px(e.markerGroup.node(),i,!0)})},dk.prototype.renderLabel=function(t){var e=this.attributes.label,n=j2(this.attributes,"label");this.labelGroup=t.maybeAppendByClassName(uk.labelGroup,"g"),this.labelGroup.maybeAppendByClassName(uk.label,function(){return ex(e)}).call(S,n)},dk.prototype.renderValue=function(t){var e=this,n=this.attributes.value,r=j2(this.attributes,"value");this.valueGroup=t.maybeAppendByClassName(uk.valueGroup,"g"),cx(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(uk.value,function(){return ex(n)}).call(S,r)})},dk.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=j2(this.attributes,"background");this.background=t.maybeAppendByClassName(uk.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(uk.background,"rect").call(S,v({width:n,height:e},r))},dk.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(S,{x:i,y:r}),this.labelGroup.call(S,{x:a,y:r}),dx(this.labelGroup.select(uk.label.class),e),this.showValue&&(this.valueGroup.call(S,{x:t,y:r}),dx(this.valueGroup.select(uk.value.class),n))},dk.prototype.render=function(t,e){e=A(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()},dk);function dk(t){return lk.call(this,q2({},{style:hk},t))||this}function pk(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var gk,yk=hx({itemPage:"item-page",navigator:"navigator",pageView:"page-view",item:"item"},"items"),mk={data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orient:"horizontal",click:Tn,mouseenter:Tn,mouseleave:Tn},vk=(Me(bk,gk=$c),Object.defineProperty(bk.prototype,"attrs",{get:function(){return fx(this.attributes)},enumerable:!1,configurable:!0}),Object.defineProperty(bk.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(bk.prototype,"renderData",{get:function(){var t=this.attrs,a=t.data,o=t.layout,s=j2(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],sx(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),bk.prototype.getGridLayout=function(){var u=this,t=this.attrs,h=t.orient,f=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"===h&&a.reverse(),x(a,2)),o=a[0],a=a[1],s=(f-g-(m-1)*p)/m,t=t.getBBox().height,c=x([0,0],2),l=c[0],c=c[1];return b="horizontal"===h?(l=(n=x([b,o*(t+d)],2))[0],c=n[1],a===m-1?0:b+s+p):(l=(n=x([a*(s+p),b],2))[0],c=n[1],o===y-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:l,y:c}})},bk.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],c=r[1],r=x([e-t,n],2),l=r[0],u=r[1],e=x([0,0,0,0,0,0,0,0],8),h=e[0],f=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<=l&&pk(g,function(t){return t<c})?(r=x([m+r,v,i],3),h=r[0],f=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&&pk(y,function(t){return t<s})?(r=x([m,v,n],3),h=r[0],f=r[1],m=r[2]):(i=x([0,0,n,0,d+1,0,0,0],8),h=i[0],f=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:h,y:f,page:d,index:e,pageIndex:p++,row:y,col:g++}})},Object.defineProperty(bk.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}),bk.prototype.ifHorizontal=function(t,e){return ck(this.attrs.orient,t,e)},bk.prototype.renderItems=function(){var t=this.attrs,e=t.click,n=t.mouseenter,r=t.mouseleave,i=(this.items=[],this.itemsCache.removeChildren(),this.items);A(this.itemsCache).selectAll(yk.itemPage.class).data(this.renderData).join(function(t){return t.append(function(t){t=t.style,t=new fk({style:t});return i.push(t),t}).attr("className",yk.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"},bk.prototype.adjustLayout=function(){var n,u=this.items,t=this.itemsLayout;A(this.pageViews).selectAll(yk.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",yk.itemPage.name).each(function(t){var l=this;t.items.forEach(function(t){var n,r,i,e=t.x,a=t.y,o=t.index,s=t.width,c=t.height,o=l.appendChild(u[o]);n=t,r=o,(i=hn(t="__data__")?t.split("."):t).forEach(function(t,e){e<i.length-1?(an(r[t])||(r[t]=dn(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:c})})})},function(t){return t},function(t){return t.remove()}),this.removeChild(this.itemsCache)},bk.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=j2(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}:{},c=v(v(v({},o),r),{orient:n,pageViews:this.pageViews.children});t.maybeAppendByClassName(yk.navigator,function(){return new ok({style:c})}).update(o)},bk.prototype.render=function(t,e){e=A(e);this.renderItems(),this.adjustLayout(),this.renderNavigator(e)},bk);function bk(t){t=gk.call(this,q2({},{style:mk},t))||this;return t.items=[],t.itemsCache=new ts,t.pageViews=new ts({className:yk.pageView.name}),t.navigatorShape=[0,0],t}var xk,uo={style:{padding:0,orient:"horizontal",backgroundFill:"transparent",titleText:"",showTitle:!0,titleSpacing:4,titlePosition:"left-top",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12}},wk=Pn({},uo,{style:{type:"category",items:[],maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!1}}),kk=Pn({},uo,{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"}}),Mk=hx({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"),Ek=(Me(Ok,xk=$c),Ok.prototype.renderTitle=function(t,e,n){var r=this.attributes.showTitle,i=x(F2(j2(this.attributes,"title")),2),a=i[0],i=i[1];this.titleGroup=t.maybeAppendByClassName(Mk.titleGroup,"g").call(S,i),cx(!!r,this.titleGroup,function(t){t.maybeAppendByClassName(Mk.title,function(){return new Jw({style:v({width:e,height:n},a)})}).update(a)})},Ok.prototype.renderItems=function(t,e,n){var r=this,i=x(R2(this.attributes,["title"]),2),i=x(F2(i[1]),2),a=i[0],i=i[1],o=v(v({},a),{width:e,height:n});this.itemsGroup=t.maybeAppendByClassName(Mk.itemsGroup,"g").call(S,i),this.itemsGroup.maybeAppendByClassName(Mk.items,function(){return new vk({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)})},Ok.prototype.adjustLayout=function(){var t,e;this.attributes.showTitle&&(t=(e=this.titleGroup.select(Mk.title.class).node().getAvailableSpace()).x,e=e.y,this.itemsGroup.node().setLocalPosition(t,e))},Object.defineProperty(Ok.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?[(e=this.titleGroup.select(Mk.title.class).node().getAvailableSpace()).width,e.height]:[n,t]},enumerable:!1,configurable:!0}),Ok.prototype.render=function(t,e){var n=t.width,t=t.height,e=A(e);this.renderTitle(e,n,t),this.renderItems.apply(this,b([e],x(this.availableSpace),!1)),this.adjustLayout()},Ok);function Ok(t){return xk.call(this,q2({},wk,t))||this}var Sk,_k={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"},Ak=hx({background:"background",labelGroup:"label-group",label:"label"},"indicator"),Tk=(Me(Pk,Sk=$c),Pk.prototype.renderBackground=function(){var t=this.style,e=t.position,t=x(T2(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=j2(this.attributes,"background");this.background=A(this.group).maybeAppendByClassName(Ak.background,"path").call(S,n).style("path",o),this.group.appendChild(this.label.node())},Pk.prototype.renderLabel=function(){var t=this.attributes,e=t.value,n=t.formatter,t=x(F2(j2(this.attributes,"label")),2),r=t[0],t=t[1];this.label=A(this.group).maybeAppendByClassName(Ak.labelGroup,"g").call(S,t),e&&this.label.maybeAppendByClassName(Ak.label,function(){return ex(n(e))}).style("text",n(e).toString()).selectAll("text").call(S,v(v({},L2),r))},Pk.prototype.adjustLayout=function(){var t=x(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},Pk.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):[b(["M"],x(t[0]),!1),b(["L"],x(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},Pk.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,b([],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],c=o[3],o=o[4];return n?(this.point=[a,r-e],[["M",s,r],["L",t,r],["L",a,r-e],["L",c,r],["L",o,r]]):(this.point=[i+e,a],[["M",i,s],["L",i,t],["L",i+e,a],["L",i,c],["L",i,o]])},Pk.prototype.bindEvents=function(){this.label.on(y.BOUNDS_CHANGED,this.renderBackground)},Pk.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},Pk);function Pk(t){void 0===t&&(t={});t=Sk.call(this,q2({},{style:v({visibility:"hidden"},_k)},t))||this;return t.point=[0,0],t.group=t.appendChild(new ts({})),t}var Lk=hx({marker:"marker",labelGroup:"labelGroup",label:"label"},"handle"),Nk=ux({render:function(t,e){var a,o=t.orient,n=t.visibility,r=t.spacing,s=void 0===r?0:r,r=t.showLabel,c=t.formatter,i=t.markerSymbol,i=void 0===i?ck(o,"horizontalHandle","verticalHandle"):i,t=x(R2(t,["label","marker"]),2),l=t[0],t=t[1],u=l.text,h=Z(l,["text"]);i&&"hidden"!==n?(l=v({symbol:i},t),a=A(e).maybeAppend(Lk.marker.name,function(){return new kx({})}).update(l),cx(r,A(e).maybeAppendByClassName(Lk.labelGroup,"g"),function(t){var t=t.maybeAppendByClassName(Lk.label,"text").call(S,v({text:c(u).toString()},h)),e=a.node().getBBox(),n=e.width,e=e.height,e=x(ck(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(Lk.marker.class))&&n.remove(),null!=(i=e.querySelector(Lk.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 Ck(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 jk=hx({backgroundGroup:"background-group",background:"background",ribbonGroup:"ribbon-group",ribbon:"ribbon",clipPath:"clip-path"},"ribbon");function Rk(t){var e=t.orient,n=t.size,t=t.len;return ck(e,[t,n],[n,t])}function Fk(t){var e=t.type,t=x(Rk(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 Ik(t){var e,n,i,a,r=t.orient,o=t.color,s=t.block,t=t.blocks,c=(e=tn(o)?new Array(20).fill(0).map(function(t,e,n){return o(e/(n.length-1))}):o).length;return c?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/(c-1),":").concat(e)},"l(".concat(ck(r,"0","270"),")")):""}function Dk(t,e,n){var r,i,a,o=Ik(e),t=t.maybeAppendByClassName(jk.ribbon,"path").call(S,v({path:Fk(e),fill:o},n)),n=t.maybeAppendByClassName(jk.clipPath,"path").call(S,{path:(n=(o=e).orient,(e=o.range)?(i=(o=x(Rk(o),2))[0],o=o[1],r=(e=x(e,2))[0],e=e[1],a=ck(n,r*i,0),r=ck(n,0,r*o),i=ck(n,e*i,i),[["M",a,r],["L",a,a=ck(n,o,e*o)],["L",i,a],["L",i,r],["Z"]]):[])}).node();t.style("clip-path",n)}var Bk,Gk,zk,Wk,Vk=ux({render:function(t,e){var n,r=x(R2(t,["ribbon","background"]),2),i=r[0],r=r[1],a=A(e).maybeAppendByClassName(jk.backgroundGroup,"g");n=t,r=r,a.maybeAppendByClassName(jk.background,"path").call(S,v({path:Fk(n)},r)),Dk(A(e).maybeAppendByClassName(jk.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"})),Hk=kn(function(t){return{min:Math.min.apply(Math,b([],x(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,b([],x(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),Yk=(Me(qk,Bk=$c),qk.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(R2(fx(t),["title","label","indicator","ribbon","handle"]),5)),s=t[0],c=(t[1],t[2]),l=t[3],t=(t[4],A(e).maybeAppendByClassName(Mk.title,function(){return new Jw({style:v({width:r,height:i},s)})})),a=(cx(a,A(e),function(t){}),t.node().getAvailableSpace()),t=a.x,u=a.y,a=(a.width,a.height,A(e).maybeAppendByClassName(Mk.contentGroup,"g").call(S,{x:t,y:u})),h=a.maybeAppendByClassName(Mk.ribbonGroup,"g");this.renderRibbon(h,l),this.handlesGroup=h.maybeAppendByClassName(Mk.handlesGroup,"g"),this.renderHandles(),this.renderIndicator(a,c),cx(o,A(e).maybeAppendByClassName(Mk.labelGroup,"g").call(S,{x:t,y:u}),function(t){n.renderLabel(t)})},Object.defineProperty(qk.prototype,"range",{get:function(){var t=this.attributes.data;return Hk(t)},enumerable:!1,configurable:!0}),Object.defineProperty(qk.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(qk.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(qk.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}),qk.prototype.ifHorizontal=function(t,e){return ck(this.style.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},qk.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(Mk.ribbon,function(){return new Vk({})}).update(v({type:r,orient:i,color:a,block:o,blocks:n.length-1,range:this.ribbonRange},e))},qk.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")},qk.prototype.renderHandle=function(t,e){var n=this.attributes.orient,r=j2(this.attributes,"handle"),r=(r.formatter,Z(r,["formatter"])),n=this.handlesGroup.maybeAppendByClassName(Mk.prefix("".concat(t,"-handle")),function(){return new Nk({})}).call(S,v({orient:n,labelText:e},r));return this.setHandlePosition(t,e),n},qk.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(Mk.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"})},qk.prototype.renderIndicator=function(t,e){this.indicator=t.maybeAppendByClassName(Mk.indicator,function(){return new Tk({style:e})}).update(e)},Object.defineProperty(qk.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(qk.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}),qk.prototype.renderLabel=function(t){var e=this.attributes,n=e.ribbonSize,e=e.ribbonLen,r=j2(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],c=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(Mk.label,function(){return new rk({style:c})}).call(S,c).node();s.attr("labelFormatter",a),s.attr("labelFilter",o)},qk.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)},qk.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=fn(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,b([],x(n),!1))):this.hideIndicator()},qk.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.style("visibility","hidden")},qk.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},qk.prototype.setSelection=function(t,e){this.updateSelection(t,e)},qk.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,c=x(this.selection,2),l=c[0],c=c[1],t=x([t,e],2),e=t[0],t=t[1],n=(n&&(e+=l,t+=c),this.range),l=n.min,c=n.max,u=x((n=[l,c],l=[e,t],c=this.selection,void 0===r&&(r=4),i=(n=x(n,2))[0],n=n[1],a=(l=x(l,2))[0],l=l[1],o=(c=x(c,2))[0],c=c[1],l=(a=x([a,l],2))[0],s=(a=a[1])-l,a<l&&(l=(u=x([a,l],2))[0],a=u[1]),n-i<s?[i,n]:l<i?o===i&&c===a?[i,a]:[i,s+i]:n<a?c===n&&o===l?[l,n]:[n-s,n]:[A2(l,r),A2(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(qk.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 mn(t)?A2(.01*(e-n),0):t},enumerable:!1,configurable:!0}),qk.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?Ck(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},qk.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,b([],x(I2(t)),!1));return fn(this.getOffset(i-a,!0)+r,r,n)},qk.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)},qk.prototype.dispatchSelection=function(){var t=new _o("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},qk.prototype.dispatchIndicated=function(t,e){t=new _o("indicated",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([J2(100)],qk.prototype,"dispatchSelection",null),t([J2(100)],qk.prototype,"dispatchIndicated",null),qk);function qk(t){var a=Bk.call(this,q2({},kk,t))||this;return a.eventToOffsetScale=new Dm({}),a._ribbonScale=new Dm({}),a.onHovering=function(t){var e=a.attributes,n=e.data,e=e.block,t=(t.stopPropagation(),a.getValueByCanvasPoint(t));e?(e=Ck(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 Uk(t){Gk||(Gk=document.createElement("table"),Wk=document.createElement("tr"),zk=/^\s*<(\w+|!)[^>]*>/,Wk={tr:document.createElement("tbody"),tbody:Gk,thead:Gk,tfoot:Gk,td:Wk,th:Wk,"*":document.createElement("div")});var e=zk.test(t)&&RegExp.$1,e=(e&&e in Wk||(e="*"),Wk[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 Xk,yo="tooltip",$k="tooltip-title",Kk="tooltip-list",n="tooltip-list-item",Jc="tooltip-list-item-name",Qc="tooltip-list-item-marker",e="tooltip-list-item-name-label",Kc="tooltip-list-item-value",oo="tooltip-crosshair-x",tl="tooltip-crosshair-y",ho={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},po=((fo={})[".".concat(yo)]={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"},fo[".".concat($k)]={color:"rgba(0, 0, 0, 0.45)"},fo[".".concat(Kk)]={margin:"0px","list-style-type":"none",padding:"0px"},fo[".".concat(n)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},fo[".".concat(Qc)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},fo[".".concat(Jc)]={display:"flex","align-items":"center","max-width":"216px"},fo[".".concat(e)]=v({flex:1},ho),fo[".".concat(Kc)]=v({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},ho),fo[".".concat(oo)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},fo[".".concat(tl)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},fo),Zk=(Me(Jk,Xk=$c),Object.defineProperty(Jk.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Object.defineProperty(Jk.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(Jk.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(Jk.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(Jk.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes.template.item,r=[];return this.items.forEach(function(t){var n;r.push(Uk((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(Jk.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return hn(t)?Y2(t):vn(t)?t:tn(t)?Y2(t(this.attributes.items)):void 0},enumerable:!1,configurable:!0}),Jk.prototype.render=function(t,e){this.updateHTMLTooltipElement(),this.updatePosition()},Jk.prototype.update=function(t){this.attr(Pn({},this.attributes,t)),this.render(this.attributes,this)},Jk.prototype.clear=function(){this.element.innerHTML=""},Jk.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},Jk.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},Jk.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},Jk.prototype.initShape=function(){var t=this.attributes.template.container;this.element=Uk(t),!this.id&&""===this.id||this.element.setAttribute("id",this.id)},Jk.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($k)[0].innerHTML=t,i=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=Kk,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];b([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},Jk.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,c=t.height,l=[-s/2,-c/2];return e.forEach(function(t){var e=x(l,2),n=e[0],e=e[1],t=x(o[t],2),r=t[0],t=t[1];l=[n+(s/2+i)*r,e+(c/2+a)*t]}),l},Jk.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")},Jk.prototype.updatePosition=function(){this.throttleUpdatePosition()},Jk.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=x(t,2),c=t[0],t=t[1],l=this.attributes,u=l.x,h=l.y,f=l.autoPosition,l=l.bounding;return f?(e=(f=this.element).offsetWidth,f=f.offsetHeight,h=(u=x([u+c,h+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=l.x,i=l.y,a={left:h<s,right:s+l.width<h+e,top:u<i,bottom:i+l.height<u+f},o=[],n.split("-").forEach(function(t){o.push(a[t]?r[t]:t)}),s=o.join("-"),this.getRelativeOffsetFromCursor(s)):[c,t]},Jk.prototype.filter=function(t){var e=this.attributes.filterBy;return e?t.filter(e):t},Jk.prototype.sort=function(t){var e=this.attributes.sortBy;return e?t.sort(e):t},Jk.tag="tooltip",Jk.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(yo,'"></div>'),title:'<div class="'.concat($k,'"></div>'),item:'<li class="'.concat(n,'" data-index={index}>\n <span class="').concat(Jc,'">\n <span class="').concat(Qc,'" style="background:{color}"></span>\n <span class="').concat(e,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(Kc,'" title="{value}">{value}</span>\n </li>')},style:po}},Jk);function Jk(t){var e=Xk.call(this,Pn({},Jk.defaultOptions,t))||this;return e.visibility="visible",e.throttleUpdatePosition=An(function(){e.setOffsetPosition(e.autoPosition(e.getRelativeOffsetFromCursor()))},e.attributes.throttleFrequency,{}),e.visibility=e.attributes.visibility,e.initShape(),e.render(e.attributes,e),e}var Qk,t5={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 e5(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 n5(t){return Qk.call(this,Pn({},n5.defaultOptions,t))||this}Me(n5,Qk=$c),n5.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=z2(e,".switch-content","g").attr("className","switch-content").node(),c=e.getLocalBounds(),n=Sn(t5,n,t5.default),l=n.sizeStyle,u=n.tagStyle,h=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",f=l,d=o?t:s,p=((t||s)&&z2(e,".switch-tag",function(){return new Ox({})}).attr("className","switch-tag").call(function(t){var e,t=t.node(),n=(t.update(Pn({cursor:h,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]+l.radius,r=r[1]-n[1],n=Math.max(i+l.height+2,l.width);f=v(v({},l),{width:n}),t.update((t={x:c.min[0],y:c.min[1],width:n,height:f.height},n={width:i,height:r},i=f.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}))}),z2(e,".switch-background","rect").attr("className","switch-background").style("zIndex",(e.style.zIndex||0)-1).style("x",c.min[0]).style("y",c.min[1]).style("fill",n).style("cursor",h).style("fillOpacity",r?.4:1).call(S,f).node()),g=z2(e,".switch-background-stroke","rect").attr("className","switch-background-stroke").style("zIndex",(e.style.zIndex||0)-2).style("x",c.min[0]).style("y",c.min[1]).style("stroke",n).style("lineWidth",0).call(S,f).node();z2(e,".switch-handle","rect").attr("className","switch-handle").style("fill","#fff").style("cursor",h).call(function(t){var e,t=t.node(),n=e5(p,a,o),r=e5(p,a,!o);t.attr("x")&&!Ln(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},n5.defaultOptions={type:n5.tag="switch",style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var r5,i5,a5,o5,mo={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},vo=q2({},mo,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),bo=q2({},mo,{type:"circle",defaultRadius:0}),xo=q2({},mo,{type:"polygon",defaultRadius:0,startAngle:0}),wo=(Me(s5,r5=$c),Object.defineProperty(s5.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(s5.prototype,"tagCfg",{get:function(){var t=j2(this.attributes,"tag");return t.position,Z(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(s5.prototype,"crosshairCfg",{get:function(){var t=j2(this.attributes,"line");return v(v({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),s5.prototype.render=function(t,e){var n=this,e=z2(e,".crosshair-group","g").attr("className","crosshair-group").node();this.shapesGroup=e,this.tagShape=z2(e,".crosshair-tag",function(){return new Ox({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=z2(e,".crosshair-path","path").attr("className","crosshair-path").call(S,this.crosshairCfg).node(),this.adjustLayout()},s5.prototype.update=function(t){this.attr(Pn({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},s5.prototype.setPointer=function(t){this.pointer=t},s5.tag="crosshair-base",s5.defaultOptions={style:mo},s5);function s5(t){return r5.call(this,Pn({},s5.defaultOptions,t))||this}function c5(t){return i5.call(this,q2({},c5.defaultOptions,t))||this}function l5(t){return a5.call(this,q2({},l5.defaultOptions,t))||this}function u5(t){return o5.call(this,q2({},u5.defaultOptions,t))||this}Me(c5,i5=wo),Object.defineProperty(c5.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(c5.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(c5.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(c5.prototype,"tagShapeSpace",{get:function(){var t=W2(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),c5.prototype.update=function(t){i5.prototype.update.call(this,t)},c5.prototype.setPointer=function(t){i5.prototype.setPointer.call(this,t),this.adjustPosition()},c5.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},c5.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},c5.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)},c5.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()},c5.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},c5.tag="line-crosshair",c5.defaultOptions={style:vo},t([J2(20)],c5.prototype,"setPointer",null),Me(l5,a5=wo),Object.defineProperty(l5.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),l5.prototype.update=function(t){a5.prototype.update.call(this,t)},l5.prototype.setPointer=function(t){var t=x(t,2),e=t[0],t=t[1],e=(a5.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})},l5.prototype.adjustLayout=function(){this.tagShape.hide()},l5.prototype.createCirclePath=function(t){var e=this.attributes,n=x(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return mx(r,n,t||e)},l5.tag="circle-crosshair",l5.defaultOptions={style:bo},t([J2(20)],l5.prototype,"setPointer",null),Me(u5,o5=wo),Object.defineProperty(u5.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),u5.prototype.update=function(t){o5.prototype.update.call(this,t)},Object.defineProperty(u5.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,c=o.sides,l=2*Math.PI/c,u=[1,0],h=[],f=0;f<c;f+=1)h.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+l*f,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 h},enumerable:!1,configurable:!0}),u5.prototype.setPointer=function(t){var t=x(t,2),e=t[0],t=t[1],e=(o5.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=Z2(n,[t,e])/Z2(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},u5.prototype.adjustLayout=function(){this.tagShape.hide()},u5.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(ge([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},u5.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,c,t=x(t,2),l=t[0],u=t[1],h=this.points,t=x(this.attributes.center,2),f=t[0],d=t[1],p=1;p<=h.length;p+=1){var g=x(h[p-1],2),y=g[0],g=g[1],m=x(h[p%h.length],2),v=m[0],m=m[1],y=(i=[f,d],y=[y+f,g+d],g=[v+f,m+d],c=s=o=a=m=v=void 0,m=(r=x(r=[l,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],c=[],(g-y)*(a-m)==(i-r)*(s-o)?(i-r)*(o-m)==(y-r)*(a-m)&&($2(m,a,r,i,o,y)&&K2(c,o,y),$2(m,a,r,i,s,g)&&K2(c,s,g),$2(o,s,y,g,m,r)&&K2(c,m,r),$2(o,s,y,g,a,i))&&K2(c,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&&(c[0]=m+g*(a-m),c[1]=r+g*(i-r))),c);0!==y.length&&(e=(s=x(y,2))[0],n=s[1])}return[e,n]},u5.tag="polygon-crosshair",u5.defaultOptions={style:xo},t([J2(20)],u5.prototype,"setPointer",null);Me(p5,h5=N),Object.defineProperty(p5.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&rn(t)?t.map(function(t){return rn(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(p5.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(p5.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(p5.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(p5.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(p5.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(p5.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}),p5.prototype.update=function(t){var e=this;this.attr(q2({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new cs({style:t}))})},p5.prototype.clear=function(){this.removeChildren()},p5.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]},p5.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]]},p5.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]]},p5.prototype.getWavyPath=function(t){return[]},p5.tag="decoration",p5.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var h5,f5,d5=p5;function p5(t){t=h5.call(this,q2({},p5.defaultOptions,t))||this;return t.update({}),t}function g5(t){t=f5.call(this,q2({},g5.defaultOptions,t))||this;return t.init(),t}Me(g5,f5=$c),Object.defineProperty(g5.prototype,"textWidth",{get:function(){var e=this;return ln(this.renderText.split("\n").map(function(t){return O2(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(g5.prototype,"textHeight",{get:function(){return W2(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(g5.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(g5.prototype,"height",{get:function(){var t=this.attributes.height;return dn(t)&&0!==t?t:W2(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(g5.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(g5.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return _2(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(g5.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:_2(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(g5.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 E2(t,dn(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(g5.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&dn(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(g5.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(g5.prototype,"font",{get:function(){return _n(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(g5.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(g5.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(g5.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(g5.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return v(v(v({},L2),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(g5.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(g5.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(g5.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 q2({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(g5.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),g5.prototype.init=function(){this.initShape(),this.update({})},g5.prototype.update=function(t){this.attr(q2({},this.attributes,t)),this.render()},g5.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 d5({style:t}))})},g5.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},g5.prototype.initShape=function(){this.backgroundShape=new ps({name:"background",style:{width:0,height:0}}),this.decorationGroup=new ts({name:"decoration-group"}),this.textShape=new ys({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},g5.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&dn(n)&&"clip"===e&&(this.clipRect=new ps({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},g5.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;dn(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},g5.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})},g5.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},g5.defaultOptions={type:g5.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 y5,ko=v(v({},L2),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),m5={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"}},v5={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function b5(t){return y5.call(this,Pn({},b5.defaultOptions,t))||this}Me(b5,y5=$c),b5.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,z2(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=xn({},this.checked?m5.selected:m5.default,r),r=xn({},v5,i),t=(this.checkboxBoxShape=z2(a,".checkbox-box","rect").attr("className","checkbox-box").style("zIndex",(a.style.zIndex||0)-1).call(S,e).node(),z2(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;z2(a,".checkbox-label","text").attr("className","checkbox-label").style("x",e).style("y",r).call(S,n)},b5.defaultOptions={type:b5.tag="checkbox",style:{x:0,y:0,label:v({text:""},ko),spacing:4,checked:!1}};var x5="gui-poptip",w5="gui-poptip-arrow",k5="gui-poptip-text",M5=((a={})[".".concat(x5)]={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"},a[".".concat(k5)]={"text-align":"center"},a[".".concat(x5,"[data-position='top']")]={transform:"translate(-50%, -100%)"},a[".".concat(x5,"[data-position='left']")]={transform:"translate(-100%, -50%)"},a[".".concat(x5,"[data-position='right']")]={transform:"translate(0, -50%)"},a[".".concat(x5,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},a[".".concat(x5,"[data-position='top-left']")]={transform:"translate(0,-100%)"},a[".".concat(x5,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},a[".".concat(x5,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},a[".".concat(x5,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},a[".".concat(x5,"[data-position='right-top']")]={transform:"translate(0, 0)"},a[".".concat(x5,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},a[".".concat(x5,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},a[".".concat(x5,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},a[".".concat(w5)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},a[".".concat(x5,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},a["[data-position='top'] .".concat(w5)]={bottom:"-2px"},a[".".concat(x5,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},a["[data-position='left'] .".concat(w5)]={right:"-2px"},a[".".concat(x5,"[data-position='right']")]={transform:"translate(5px, -50%)"},a["[data-position='right'] .".concat(w5)]={left:"-2px"},a[".".concat(x5,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},a["[data-position='bottom'] .".concat(w5)]={top:"-2px"},a[".".concat(x5,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},a["[data-position='top-left'] .".concat(w5)]={left:"10px",bottom:"-2px"},a[".".concat(x5,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},a["[data-position='top-right'] .".concat(w5)]={right:"10px",bottom:"-2px"},a[".".concat(x5,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},a["[data-position='left-top'] .".concat(w5)]={right:"-2px",top:"8px"},a[".".concat(x5,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},a["[data-position='left-bottom'] .".concat(w5)]={right:"-2px",bottom:"8px"},a[".".concat(x5,"[data-position='right-top']")]={transform:"translate(5px, 0)"},a["[data-position='right-top'] .".concat(w5)]={left:"-2px",top:"8px"},a[".".concat(x5,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},a["[data-position='right-bottom'] .".concat(w5)]={left:"-2px",bottom:"8px"},a[".".concat(x5,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},a["[data-position='bottom-left'] .".concat(w5)]={top:"-2px",left:"8px"},a[".".concat(x5,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},a["[data-position='bottom-right'] .".concat(w5)]={top:"-2px",right:"8px"},a),E5=void 0;var O5;function S5(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function _5(t){var n,r;return n=S5,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(E5,t)}(t)}function A5(t){t=O5.call(this,Pn({style:{id:"gui-poptip"}},A5.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}Me(A5,O5=$c),Object.defineProperty(A5.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),A5.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},A5.prototype.update=function(t){this.attr(Pn({},this.style,t)),this.render(this.attributes,this)},A5.prototype.bind=function(s,c){var l,t,e,u=this;s&&(l=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=l,i=(c&&(o=(i="function"==typeof c?c.call(null,t):c).html,a=i.target,i=Z(i,["html","target"]),n=xn({},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,c=a.width,l=a.height;switch(r){case"top":return i?[o+c/2,s]:[t,s];case"left":return i?[o,s+l/2]:[o,e];case"bottom":return i?[o+c/2,s+l]:[t,s+l];case"right":return i?[o+c,s+l/2]:[o+c,e];case"top-right":case"right-top":return[o+c,s];case"left-bottom":case"bottom-left":return[o,s+l];case"right-bottom":case"bottom-right":return[o+c,s+l];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]))},A5.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))},A5.prototype.clear=function(){this.container.innerHTML=""},A5.prototype.destroy=function(){var t,e=this;b([],x(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},A5.prototype.showTip=function(t,e,n){var r,i=Sn(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(k5)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},A5.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},A5.prototype.getContainer=function(){return this.container},A5.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(x5).concat(t?" ".concat(t):"")},A5.prototype.initShape=function(){var t=this,e=this.style.id;this.container=_5(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},A5.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(w5,'"></span>'));t.innerHTML=n,hn(r)?t.innerHTML+=r:r&&vn(r)&&t.appendChild(r),e&&(t.getElementsByClassName(k5)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},A5.prototype.applyStyles=function(){var t,e=q2({},M5,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))},A5.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")},A5.tag="poptip",A5.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:M5,template:'<div class="'.concat(k5,'"></div>')}};function T5(r,t,e,n){var[[t,i],[a,o]]=t,[s,c]=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 tb()([[0,0],[s,c]]);s=[[t-a,i-o]].concat(e).concat([[0,0]]);const l=[n[0]-a,n[1]-o],[u,h]=s;return c=l,t=u,i=h,e=Mb(c,t),t=Mb(t,i),i=Mb(i,c),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]-l[1])*+u[1]/(u[0]-l[0]);return e[0]<l[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),tb()(s)}const P5=Hb(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:c,endMarker:l,coordCenter:u}=e,e=Z(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),h=J(e,"background"),f=h["padding"],h=Z(h,["padding"]),d=J(e,"connector"),{points:p=[]}=d,d=Z(d,["points"]),i=[[+i,+a],[+n,+r]],a=Q(t).maybeAppend("text","text").call(F,e).node(),n=T5(Q(t).maybeAppend("background","rect").style("zIndex",-1).call(F,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,c]=t,[s,l]=s;return a.setEulerAngles(o),{x:t-i,y:c-e,width:2*s+i+n,height:2*l+e+r}}(a,f)).call(F,o?h:{}).node(),i,p,u),r=c&&new kx({id:"startMarker",style:Object.assign({x:0,y:0},J(e,"startMarker"))}),a=l&&new kx({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(F,s?d:{})}),L5=t=>{const c=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Rb(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 P5).style("x",i).style("y",o).call(F,r).style("transform",s+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(F,a).call(F,c).node()}};L5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const N5=Hb(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 kx({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());Q(t).maybeAppend("text","text").style("x",i).style("y",a).call(F,e)}),C5=t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Rb(r,i,a,o),{color:i,text:a=""}=e,o={text:String(a),stroke:i,fill:i},[[e,a]]=t;return Q(new N5).call(F,r).style("x",e).style("y",a).call(F,o).call(F,s).node()}},j5=(C5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},Hb(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;Q(t).maybeAppend("connect-path",()=>new cs({})).style("d",n).call(F,i),Q(t).maybeAppend("area-path",()=>new cs({})).style("d",e).call(F,r)}));const R5=t=>{const{curve:u,gradient:c=!1,defined:h=t=>!Number.isNaN(t)&&null!=t,connectNulls:f=!1}=t,d=Z(t,["curve","gradient","defined","connectNulls"]);return(t,e,l,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=Rb(n,r,i,a),r=n["fill"],i=Z(n,["fill"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=Ib(l,e),n=c&&n?Nb(n,r,o,c):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 c=e.length/2;for(let t=0;t<c;t++){var l,u,h=e[t],f=e[t+c];[...h,...f].some(t=>!n(t))?o=!0:(r.push(h),i.push(f),o&&s&&(o=!1,[l,u]=s,a.push([l,h,u,f])),s=[h,f])}return[r.concat(i),a]}(t,h),a=J(s,"connect"),i=!!o.length,n=t=>Q(new cs({})).style("d",t).call(F,s).node();return c0(l)?(e=t=>{const n=l.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=eb().curve(nb),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,c=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 ab(a())},delete t.lineX0,t.lineEndAngle=function(){return ab(o())},delete t.lineX1,t.lineInnerRadius=function(){return ab(s())},delete t.lineY0,t.lineOuterRadius=function(){return ab(c())},delete t.lineY1,t.curve=function(t){return arguments.length?e(ib(t)):e()._curve},t.angle((t,e)=>Ob(kb(r[e],n))).outerRadius((t,e)=>Mb(r[e],n)).innerRadius((t,e)=>Mb(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(h)).curve(u)(i);var e,a,o,s,c},!i||f&&!Object.keys(a).length?n(e(r)):i&&!f?n(e(t)):Q(new j5).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 eb().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)},!i||f&&!Object.keys(a).length?n(e(r)):i&&!f?n(e(t)):Q(new j5).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},F5=(R5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=c0(n)?yb:Zv;return R5(Object.assign({curve:i},a))(t,e,n,r)}),I5=(F5.props=Object.assign({},R5.props),t=>{const{alpha:a=.5}=t,o=Z(t,["alpha"]);return(t,e,n,r)=>{var i=c0(n)?pb:fb;return R5(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),D5=(I5.props=Object.assign({},R5.props),i=>(t,e,n,r)=>R5(Object.assign({curve:vb},i))(t,e,n,r)),B5=(D5.props=Object.assign({},R5.props),t=>{const c=t["arrowSize"],l=Z(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=Rb(r,a,o,s),a=r["stroke"],o=Z(r,["stroke"]),{color:s=a,transform:r}=e,[e,a]=t,t=Av();return t.moveTo(...e),t.lineTo(...a),c&&([e,i]=Pb(e,a,{arrowSize:c}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),Q(new cs).call(F,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(F,l).node()}}),G5=(B5.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=Rb(r,i,a,o),i=r["stroke"],a=Z(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=Av();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 cs).call(F,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(F,s).node()}});G5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const z5=t=>{const{cornerRatio:u=1/3}=t,h=Z(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:c}=e,r=Rb(r,o,s,c),o=r["stroke"],s=Z(r,["stroke"]),{color:c=o,transform:r}=e,[e,o]=t,l=(t=e,e=o,o=n,n=u,a=Av(),c0(o)?(i=Mb(t,l=o.getCenter()),i=(Mb(e,l)-i)*n+i,a.moveTo(t[0],t[1]),Lb(a,t,e,l,i)):s0(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 cs).call(F,s).style("d",l.toString()).style("stroke",c).style("transform",r).call(F,h).node()}},W5=(z5.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=Rb(r,i,a,o),i=r["stroke"],a=Z(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=Av();return t.moveTo(e[0],e[1]),c0(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):Lb(t,e,i,_b(e,i),Mb(e,i)/2),Q(new cs).call(F,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(F,s).node()}}),V5=(W5.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=Rb(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:c=e}=u,[[t,l]]=t,t=t-Number(s)/2,s=l-Number(c)/2;return Q(new is).call(F,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(F,u).node()}});V5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const H5=t=>{const c=Z(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=Rb(r,e,i,a),{fill:e,stroke:i}=r,a=Z(r,["fill","stroke"]),r=function(i,t){const a=Av();if(c0(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>Mb(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?Lb(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 cs).call(F,a).style("d",r.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(F,c).node()}};H5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Y5=t=>{const c=Z(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=Rb(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=Av();return c0(e)?(n=Mb(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),Lb(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),Lb(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 cs).call(F,a).style("d",r.toString()).style("fill",o||e).style("stroke",o||i).style("transform",s).call(F,c).node()}};Y5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const q5=t=>{const y=Z(t,[]);return(t,e,n,r)=>{var i,a,o,s,c,l,u,{mark:e,shape:h,defaultShape:f,color:d,transform:p}=e,r=Rb(r,e,h,f),{fill:e,stroke:h}=r,f=Z(r,["fill","stroke"]),g=(r=t,t=n,n=Av(),c0(t)?([i,a]=t=t.getCenter(),o=Eb(kb(r[0],t)),s=Eb(kb(r[1],t)),g=Mb(t,r[2]),c=Mb(t,r[3]),l=Mb(t,r[8]),u=Mb(t,r[10]),t=Mb(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,c,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,l,o,s),n.arc(i,a,l,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 cs).call(F,f).style("d",g.toString()).style("stroke",h).style("fill",d||e).style("transform",p).call(F,y).node()}};q5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const U5=t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Rb(r,i,a,o),{stroke:i,lineWidth:a}=r,o=Z(r,["stroke","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,c0(t=n)?(t=t.getCenter(),Xv()({startAngle:0,endAngle:2*Math.PI,outerRadius:Mb(a[0],t),innerRadius:Mb(a[1],t)})):tb().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,c0(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return Q(new cs({})).call(F,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(F,s).node()}};function X5(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}U5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const $5=Hb(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,tb().x(t=>t[0]).y(t=>t[1])(n));Q(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new kx({className:"marker",style:Object.assign(Object.assign({},i),{symbol:X5})}):null).call(F,e)});const K5=t=>{const{offset:s=0,connectLength1:c}=t,l=Z(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Rb(r,i,a,o),{fill:i,stroke:a=i,connectLength1:o=c}=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(s0(t)){const c=n;var t=e+c,s=t+r;return[[t,i],[s,i],[s,o],[a+c,o]]}const c=-n;return t=i+c,[[e,t],[e,s=t+-r],[a,s],[a,o+c]]}(n,t,s,o);return Q(new $5).call(F,i).style("points",n).style("stroke",r||a).style("transform",e).call(F,l).node()}};function Z5(t,e,a,n){var r=a["bounds"];const[[o,s],[i,c]]=r,l=i-o,u=c-s;r=t=>{var{x:e,y:n}=t,r=eg(a.x,l),i=eg(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:l,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:l/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:l/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:l,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:l,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:l/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function J5(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:c,outerRadius:l,startAngle:u,endAngle:h}=jb(e,i,[t,n]),f="inside"===r?(u+h)/2:h;e=tM(f,a,o),t=(()=>{var[t,e]=i,n=c+.5*(l-c),[n,t]="inside"===r?Q5(s,f,n):_b(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function Q5(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function tM(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function eM(r,t,e,n){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,connector:c=!0,connectorLength2:l=0,connectorDistance:u=0,radius:h=.5,offset:f=0}=e,d=jb(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?h:1,{innerRadius:e,outerRadius:n}=d,n=e+(n-e)*t;return[n,n+f]})();const y=0<Math.sin(g)?1:-1;var[e,t,...m]=((t,e)=>{var[t,n]=Q5(p,g,t),[e,r]=Q5(p,g,e),i=c?y*l:0;return[[t,n],[e+i,r],[-i,0]]})(e,t),m={connector:c,connectorPoints:m,dx:c?+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||l0(n),t=tM(g,o,s),"inside"===e?{textAlign:"center",textBaseline:"middle",rotate:t}:{textAlign:v?"start":"end",textBaseline:"middle",rotate:t})),m)}function nM(t,e,n,r){var i=n["bounds"];return 1===i.length?([i]=i=(i=n).bounds,{x:i[0],y:i[1]}):(l0(r)?J5:d0(r)?eM:Z5)(t,e,n,r)}K5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var rM=Object.freeze({__proto__:null,top:nM,bottom:nM,right:nM,left:nM,topLeft:nM,topRight:nM,bottomLeft:nM,bottomRight:nM,inside:nM,outside:nM,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=Zp(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(c=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=c(e-1),c=Eb(kb(c(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${c}deg)`,textAlign:"center",textBaseline:"middle"}}});function iM(t,e,n,r){var i=e["position"],i=(a=n,void 0!==(i=i)?i:d0(a)?"inside":s0(a)?"right":"top"),a=r["inside"===i?"innerLabel":"label"],r=Object.assign({},a,e),e=rM[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 aM=t=>(t,e,n,r)=>{var i=e["text"],a=Z(e,["text","x","y"]),t=iM(t,e,n,r),{rotate:e=0,transform:r=""}=t,t=Z(t,["rotate","transform"]);return Q(new P5).call(F,t).style("text",""+i).style("transform",r+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(F,a).node()},oM=(aM.props={},t=>{const s=t["colorAttribute"],c=Z(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Z(Rb(r,i,a,o),["stroke"]),{d:i,color:a}=e;return Q(new cs).call(F,r).style("d",i).style(s,a).call(F,c).node()}}),sM=(oM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>oM(Object.assign({colorAttribute:"fill"},t))),cM=(sM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>oM(Object.assign({fill:"none",colorAttribute:"stroke"},t))),lM=(cM.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}))}}),uM=(lM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),hM=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:uM.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:uM.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:uM.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:uM.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:uM.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:uM.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:uM.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:uM.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:uM.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:uM.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:uM.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:uM.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:uM.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:uM.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,tickStroke:uM.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:uM.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:uM.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0]},legend:{padding:8,showTitle:!1,titleFill:uM.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:uM.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:uM.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:uM.BLACK,navButtonFillOpacity:.45,navPageNumFill:uM.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:uM.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:uM.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:uM.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:uM.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:uM.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:uM.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:uM.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railHeight:16,railFill:uM.STROKE,railFillOpacity:.05,railForegroundFill:e,railForegroundFillOpacity:.15,handleHeight:24,handleWidth:10,handleFill:"#f7f7f7",handleFillOpacity:1,handleStroke:uM.BLACK,handleStrokeOpacity:.25,handleLineWidth:1,handleRadius:2,textFill:uM.BLACK,textFillOpacity:.45,textFontSize:12,textFontWeight:"normal"},scrollbar:{},title:{fill:uM.BLACK,fillOpacity:.85,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:uM.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)},fM=(hM.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),dM="#416180",pM=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:fM.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:fM.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:fM.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:dM,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:dM,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:dM,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:dM,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:dM,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:dM,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:dM,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:dM,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:dM,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:fM.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:fM.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:fM.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,tickStroke:fM.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:fM.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:fM.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0]},legend:{padding:8,showTitle:!1,titleFill:fM.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:fM.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:fM.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:fM.BLACK,navButtonFillOpacity:.45,navPageNumFill:fM.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:fM.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:fM.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:fM.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:fM.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:fM.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:fM.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:fM.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railHeight:16,railFill:dM,railFillOpacity:.05,railForegroundFill:e,railForegroundFillOpacity:.15,handleHeight:24,handleWidth:10,handleFill:"#f7f7f7",handleFillOpacity:1,handleStroke:fM.BLACK,handleStrokeOpacity:.25,handleLineWidth:1,handleRadius:2,textFill:fM.BLACK,textFillOpacity:.45,textFontSize:12,textFontWeight:"normal"},scrollbar:{},title:{fill:fM.BLACK,fillOpacity:.85,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:fM.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)};function gM(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)]}pM.props={};var yM,mM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function vM(t){var e;if(e=mM.exec(t))return new bM({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 bM(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 xM(t,e){var n,e=gM(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+""}vM.prototype=bM.prototype,bM.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 wM={"%":(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)=>xM(100*t,e),r:xM,s:function(t,e){var n,r,i=gM(t,e);return i?(n=i[0],(i=(i=i[1])-(yM=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")+gM(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 kM(t){return t}var MM,EM,OM=Array.prototype.map,SM=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _M(t){var e,s,c,k=void 0===t.grouping||void 0===t.thousands?kM:(s=OM.call(t.grouping,Number),c=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(c)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",M=void 0===t.decimal?".":t.decimal+"",E=void 0===t.numerals?kM:(e=OM.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",O=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var l=(t=vM(t)).fill,u=t.align,h=t.sign,e=t.symbol,f=t.zero,d=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):wM[m]||(void 0===g&&(g=12),y=!0,m="g"),(f||"0"===l&&"="===u)&&(f=!0,l="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?a:"",x=wM[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&&"+"!==h?!1:o)?"("===h?h:O:"-"===h||"("===h?"":h)+i,a=("s"===m?SM[8+yM/3]:"")+a+(o&&"("===h?")":""),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&&!f&&(t=k(t,1/0));var s=i.length+t.length+a.length,c=s<d?new Array(d-s+1).join(l):"";switch(p&&f&&(t=k(c+t,c.length?d-a.length:1/0),c=""),u){case"<":t=i+t+a+c;break;case"=":t=i+c+t+a;break;case"^":t=c.slice(0,s=c.length>>1)+i+t+a+c.slice(s);break;default:t=c+i+t+a}return E(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=vM(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=gM(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=SM[8+e/3];return function(t){return n(r*t)+i}}}}function AM(t,e,n){return t.querySelector(e)?Q(t).select(e):Q(t).append(n)}function TM(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function PM(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function LM(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 c,t=(i=a).getTicks?i.getTicks():t?([l,c]=Pp(e,t=>+t),i=i.getOptions()["tickCount"],t(l,c,i)):e,l=r?t.filter(r):t;const u=(null==(c=a.getFormatter)?void 0:c.call(a))||n,h=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 Dm({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),f=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return f0(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new Dm({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new Dm({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return c0(s)||s0(s)?(i=l.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=h(a.map(t)+i);return{value:s0(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:u(t,e,n),id:String(e)}}),l0(s)&&"arcY"===o?i.map(t=>{var e=t["value"],t=Z(t,["value"]);return Object.assign({value:1-e},t)}):i):l.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:f(h(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 NM(t,e,n){var r;return!(c0(r=e)&&s0(r)||h0(e))&&(void 0===t?!!n.getTicks:t)}function CM(t,e,n,r,i){var a=function(t,e){var[e,n]=PM(e);return"bottom"===t||"top"===t?n:e}(t,r),[,r]=r.getCenter(),{x:o,y:s,width:c,height:l}=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+c,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+c,s],endPos:[o+c,s+l],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+l],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+c,s+l],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+l],endPos:[o+c,s+l],titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive",showLine:"centerVertical"===t||void 0})}Mo=_M({thousands:",",grouping:[3],currency:["$",""]}),MM=Mo.format,Mo.formatPrefix;const jM=t=>{const{position:l,labelFormatter:u=t=>""+t,tickFilter:h,tickCount:f,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=LM(t,e,f,u,h,d,l,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,c]=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]=PM(r),n={titleFillOpacity:0,titlePosition:"inner",showLine:!1,showTick:!0,gridLength:(n-e)*(Math.min(i,a)/2)};return"arcInner"===t?(PM(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"})}(l,s,c,n),c=r["axis"];return new rk({style:R({},c,s,Object.assign({type:"arc",center:i,radius:t,angleRange:[e,o],data:a,title:TM(p),showGrid:g},y))})}},RM=t=>{const{position:i,labelFormatter:e=t=>""+t}=t;var n="string"==typeof e?MM(e):e;const a=Object.assign(Object.assign({},t),{labelFormatter:n});return(t,e,n,r)=>("arc"===i||"arcInner"===i?jM:s=>{const{position:c,title:l,labelFormatter:u=t=>""+t,direction:h="left",tickCount:f,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=LM(t,e,f,u,d,p,c,n),a=NM(m,n,t),i=CM(c,h,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:TM(l),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 rk({style:Object.assign({},r,i)})}})(a)(t,e,n,r)},FM=(RM.props={defaultPosition:"left",defaultSize:45,defaultOrder:0},t=>RM(t)),IM=(FM.props=Object.assign(Object.assign({},RM.props),{defaultPosition:"bottom"}),t=>RM(t));IM.props=Object.assign(Object.assign({},RM.props),{defaultPosition:"left"});const DM=t=>{const{position:u,labelFormatter:h=t=>""+t,dx:f=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:h(t),value:"",color:e.map(t)})),[c,l]=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+f,y:a+d,orient:["right","left","arcCenter"].includes(u)?"vertical":"horizontal",width:o,height:s,gridCol:l,gridRow:c,rowPadding:0,colPadding:8,titleText:TM(p),itemMarkerFill:t=>t?t.color:"#fff"},{legend:i={}}=r;return new Ek({style:Object.assign({},i,t,m)})}},BM=(DM.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},t=>{const c=t["title"],l=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 Yk({style:Object.assign({},r,{x:i,y:a,width:400,height:300,data:[{value:o},{value:s}],titleText:TM(c),titleFontSize:12,ribbonLen:120,ribbonSize:12,ribbonColor:t.map(t=>e.map(t)),showHandle:!1,showIndicator:!1,labelAlign:"value"},l)})}}),GM=(BM.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},EM={render(t,e){const{text:n,style:r,subtitle:i,subtitleStyle:a}=t;t=AM(e,".title","text").attr("className","title").style("fontSize",14).style("textBaseline","top").style("text",n).call(F,r||{}).node().getLocalBounds();AM(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 Uo{constructor(t){super(t),this.descriptor=EM}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(R({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}}),zM=t=>{const{text:a,style:o,subtitle:s,subtitleStyle:c}=t;return(t,e,n,r)=>{var{x:e,y:i}=e.bbox;return new GM({style:R({},{style:r.title,subtitleStyle:r.subtitle},{x:e,y:i,style:o,text:a,subtitle:s,subtitleStyle:c})})}};zM.props={defaultPosition:"top",defaultOrder:2,defaultSize:30};class WM{constructor(t){this.$value=t}static of(t){return new WM(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function VM(t,e,n){return WM.of({}).call(HM,t).call(HM,e).call(HM,n).value()}function HM(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function YM(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const qM=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],UM=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:c,opacity:l}=a.style,[r,t]=s0(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:c,opacity:l,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:c,opacity:l}],o=(a.setOrigin(r),a.animate(t,VM(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},XM=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:c,opacity:l}=a.style,[r,t]=s0(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:c,opacity:l,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],c=(a.setOrigin(r),a.animate(s,VM(i,n,u)));return c.finished.then(()=>a.setOrigin(0,0)),c}},$M=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:c,opacity:l}=a.style,[r,t]=s0(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:c,opacity:l,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:c,opacity:l}],o=(a.setOrigin(r),a.animate(t,VM(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},KM=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:c,opacity:l}=a.style,[r,t]=s0(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:c,opacity:l,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],c=(a.setOrigin(r),a.animate(s,VM(i,n,u)));return c.finished.then(()=>a.setOrigin(0,0)),c}},ZM=c=>(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}],VM(i,n,c))},JM=(ZM.props={},c=>(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}],VM(i,n,c))});function QM(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function tE(t,e){var[n,r,i,t]=QM(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let c=0,l=e;for(;0<l;){var u=Math.min(l,a),h=i/u;for(let t=0;t<u;t++){var f=n+t*h,d=r+c*s;o.push(function(t){var[t,e,n,r]=t;return`
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={})}(this,function(h){"use strict";const f="main-layer",tt="label-layer",et="element",j="view",nt="plot",rt="component",it="label",at="area";function p(t,e,n,r,i){!function t(e,n,r,i,a){for(;r<i;){600<i-r&&(o=i-r+1,u=n-r+1,c=Math.log(o),s=.5*Math.exp(2*c/3),c=.5*Math.sqrt(c*s*(o-s)/o)*(u-o/2<0?-1:1),l=Math.max(r,Math.floor(n-u*s/o+c)),u=Math.min(i,Math.floor(n+(o-u)*s/o+c)),t(e,n,l,u,a));var o,s,c,l,u,h=e[n],f=r,d=i;for(I(e,r,n),0<a(e[i],h)&&I(e,r,i);f<d;){for(I(e,f,d),f++,d--;a(e[f],h)<0;)f++;for(;0<a(e[d],h);)d--}0===a(e[r],h)?I(e,r,d):I(e,++d,i),d<=n&&(r=d+1),n<=d&&(i=d-1)}}(t,e,n||0,r||t.length-1,i||B)}function I(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function B(t,e){return t<e?-1:e<t?1:0}class D{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(e){let n=this.data;var r=[];if(X(e,n))for(var i=this.toBBox,a=[];n;){for(let t=0;t<n.children.length;t++){var o=n.children[t],s=n.leaf?i(o):o;X(e,s)&&(n.leaf?r.push(o):U(e,s)?this._all(o,r):a.push(o))}n=a.pop()}return r}collides(e){let n=this.data;if(X(e,n))for(var r=[];n;){for(let t=0;t<n.children.length;t++){var i=n.children[t],a=n.leaf?this.toBBox(i):i;if(X(e,a)){if(n.leaf||U(e,a))return!0;r.push(i)}}n=r.pop()}return!1}load(e){if(e&&e.length)if(e.length<this._minEntries)for(let t=0;t<e.length;t++)this.insert(e[t]);else{let t=this._build(e.slice(),0,e.length-1,0);var n;this.data.children.length?this.data.height===t.height?this._splitRoot(this.data,t):(this.data.height<t.height&&(n=this.data,this.data=t,t=n),this._insert(t,this.data.height-t.height-1,!0)):this.data=t}return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=$([]),this}remove(i,a){if(i){let t=this.data;var o=this.toBBox(i),s=[],c=[];let e,n,r;for(;t||s.length;){if(t||(t=s.pop(),n=s[s.length-1],e=c.pop(),r=!0),t.leaf){var l=function(e,n,r){if(!r)return n.indexOf(e);for(let t=0;t<n.length;t++)if(r(e,n[t]))return t;return-1}(i,t.children,a);if(-1!==l)return t.children.splice(l,1),s.push(t),this._condense(s),this}r||t.leaf||!U(t,o)?n?(e++,t=n.children[e],r=!1):t=null:(s.push(t),c.push(e),e=0,t=(n=t).children[0])}}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){for(var n=[];t;)(t.leaf?e:n).push(...t.children),t=n.pop();return e}_build(n,t,r,i){var e=r-t+1;let a=this._maxEntries,o;if(e<=a)G(o=$(n.slice(t,r+1)),this.toBBox);else{i||(i=Math.ceil(Math.log(e)/Math.log(a)),a=Math.ceil(e/Math.pow(a,i-1))),(o=$([])).leaf=!1,o.height=i;var s=Math.ceil(e/a),c=s*Math.ceil(Math.sqrt(a));K(n,t,r,c,this.compareMinX);for(let e=t;e<=r;e+=c){var l=Math.min(e+c-1,r);K(n,e,l,s,this.compareMinY);for(let t=e;t<=l;t+=s){var u=Math.min(t+s-1,l);o.children.push(this._build(n,t,u,i-1))}}G(o,this.toBBox)}return o}_chooseSubtree(i,a,t,o){for(;;){if(o.push(a),a.leaf||o.length-1===t)break;let e=1/0,n=1/0,r;for(let t=0;t<a.children.length;t++){var s=a.children[t],c=H(s),l=(u=i,l=s,(Math.max(l.maxX,u.maxX)-Math.min(l.minX,u.minX))*(Math.max(l.maxY,u.maxY)-Math.min(l.minY,u.minY))-c);l<n?(n=l,e=c<e?c:e,r=s):l===n&&c<e&&(e=c,r=s)}a=r||a.children[0]}var u,l;return a}_insert(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),W(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)}_split(t,e){var n=t[e],r=n.children.length,i=this._minEntries,i=(this._chooseSplitAxis(n,i,r),this._chooseSplitIndex(n,i,r)),r=$(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,G(n,this.toBBox),G(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)}_splitRoot(t,e){this.data=$([t,e]),this.data.height=t.height+1,this.data.leaf=!1,G(this.data,this.toBBox)}_chooseSplitIndex(e,n,r){let i,a=1/0,o=1/0;for(let t=n;t<=r-n;t++){var s=z(e,0,t,this.toBBox),c=z(e,t,r,this.toBBox),l=(h=s,l=c,u=d=f=void 0,f=Math.max(h.minX,l.minX),d=Math.max(h.minY,l.minY),u=Math.min(h.maxX,l.maxX),h=Math.min(h.maxY,l.maxY),Math.max(0,u-f)*Math.max(0,h-d)),u=H(s)+H(c);l<a?(a=l,i=t,o=u<o?u:o):l===a&&u<o&&(o=u,i=t)}var h,l,f,d,u;return i||r-n}_chooseSplitAxis(t,e,n){var r=t.leaf?this.compareMinX:V,i=t.leaf?this.compareMinY:Y;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)}_allDistMargin(e,n,r,t){e.children.sort(t);var i=this.toBBox,a=z(e,0,n,i),o=z(e,r-n,r,i);let s=q(a)+q(o);for(let t=n;t<r-n;t++){var c=e.children[t];W(a,e.leaf?i(c):c),s+=q(a)}for(let t=r-n-1;t>=n;t--){var l=e.children[t];W(o,e.leaf?i(l):l),s+=q(o)}return s}_adjustParentBBoxes(e,n,r){for(let t=r;0<=t;t--)W(n[t],e)}_condense(n){for(let t=n.length-1,e;0<=t;t--)0===n[t].children.length?0<t?(e=n[t-1].children).splice(e.indexOf(n[t]),1):this.clear():G(n[t],this.toBBox)}}function G(t,e){z(t,0,t.children.length,e,t)}function z(e,n,r,i,a){(a=a||$(null)).minX=1/0,a.minY=1/0,a.maxX=-1/0,a.maxY=-1/0;for(let t=n;t<r;t++){var o=e.children[t];W(a,e.leaf?i(o):o)}return a}function W(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function V(t,e){return t.minX-e.minX}function Y(t,e){return t.minY-e.minY}function H(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function q(t){return t.maxX-t.minX+(t.maxY-t.minY)}function U(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function X(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function $(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function K(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(p(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}var ot=1e-6,st="undefined"!=typeof Float32Array?Float32Array:Array;function ct(){var t=new st(9);return st!=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 lt=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],e=e[8],h=n[0],f=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]=h*r+f*o+d*l,t[1]=h*i+f*s+d*u,t[2]=h*a+f*c+d*e,t[3]=p*r+g*o+y*l,t[4]=p*i+g*s+y*u,t[5]=p*a+g*c+y*e,t[6]=m*r+v*o+n*l,t[7]=m*i+v*s+n*u,t[8]=m*a+v*c+n*e,t};function ut(){var t=new st(16);return st!=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 ht(t){var e=new st(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}function ft(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 dt(t,e,n,r,i,a,o,s,c,l,u,h,f,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]=c,t[8]=l,t[9]=u,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=g,t[15]=y,t}function pt(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 gt(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 yt(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15],m=n*s-r*o,v=n*c-i*o,b=n*l-a*o,x=r*c-i*s,w=r*l-a*s,k=i*l-a*c,M=u*g-h*p,E=u*y-f*p,O=u*e-d*p,S=h*y-f*g,_=h*e-d*g,A=f*e-d*y,T=m*A-v*_+b*S+x*O-w*E+k*M;return T?(t[0]=(s*A-c*_+l*S)*(T=1/T),t[1]=(i*_-r*A-a*S)*T,t[2]=(g*k-y*w+e*x)*T,t[3]=(f*w-h*k-d*x)*T,t[4]=(c*O-o*A-l*E)*T,t[5]=(n*A-i*O+a*E)*T,t[6]=(y*b-p*k-e*v)*T,t[7]=(u*k-f*b+d*v)*T,t[8]=(o*_-s*O+l*M)*T,t[9]=(r*O-n*_-a*M)*T,t[10]=(p*w-g*b+e*m)*T,t[11]=(h*b-u*w-d*m)*T,t[12]=(s*E-o*S-c*M)*T,t[13]=(n*S-r*E+i*M)*T,t[14]=(g*v-p*x-y*m)*T,t[15]=(u*x-h*v+f*m)*T,t):null}function mt(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],t=t[15];return(e*o-n*a)*(h*t-f*g)-(e*s-r*a)*(u*t-f*p)+(e*c-i*a)*(u*g-h*p)+(n*s-r*o)*(l*t-f*d)-(n*c-i*o)*(l*g-h*d)+(r*c-i*s)*(l*p-u*d)}function vt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],h=e[8],f=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*h+w*g,t[1]=v*i+b*c+x*f+w*y,t[2]=v*a+b*l+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*h+w*g,t[5]=v*i+b*c+x*f+w*y,t[6]=v*a+b*l+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*h+w*g,t[9]=v*i+b*c+x*f+w*y,t[10]=v*a+b*l+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*h+w*g,t[13]=v*i+b*c+x*f+w*y,t[14]=v*a+b*l+x*d+w*m,t[15]=v*o+b*u+x*p+w*e,t}function bt(t,e,n){var r,i,a,o,s,c,l,u,h,f,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],c=e[5],l=e[6],u=e[7],h=e[8],f=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]=c,t[6]=l,t[7]=u,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*g+s*y+h*n+e[12],t[13]=i*g+c*y+f*n+e[13],t[14]=a*g+l*y+d*n+e[14],t[15]=o*g+u*y+p*n+e[15]),t}function xt(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 wt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],c=e[8],l=e[9],u=e[10],h=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+c*r,t[5]=a*n+l*r,t[6]=o*n+u*r,t[7]=s*n+h*r,t[8]=c*n-i*r,t[9]=l*n-a*r,t[10]=u*n-o*r,t[11]=h*n-s*r,t}function kt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],c=e[8],l=e[9],u=e[10],h=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-c*r,t[1]=a*n-l*r,t[2]=o*n-u*r,t[3]=s*n-h*r,t[8]=i*r+c*n,t[9]=a*r+l*n,t[10]=o*r+u*n,t[11]=s*r+h*n,t}function Mt(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 Et(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}function Ot(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,c=a+a,l=r*o,u=r*s,r=r*c,h=i*s,i=i*c,a=a*c,o=e*o,s=e*s,e=e*c;return t[0]=1-(h+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(l+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(l+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function St(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function _t(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],c=e[8],l=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(c,l,e),t}function At(t,e){var n=new st(3),r=(_t(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,c=e[4]*r,l=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+l+e,h=0;return 0<n?(h=2*Math.sqrt(1+n),t[3]=.25*h,t[0]=(u-i)/h,t[1]=(r-s)/h,t[2]=(o-c)/h):l<a&&e<a?(h=2*Math.sqrt(1+a-l-e),t[3]=(u-i)/h,t[0]=.25*h,t[1]=(o+c)/h,t[2]=(r+s)/h):e<l?(h=2*Math.sqrt(1+l-a-e),t[3]=(r-s)/h,t[0]=(o+c)/h,t[1]=.25*h,t[2]=(u+i)/h):(h=2*Math.sqrt(1+e-a-l),t[3]=(o-c)/h,t[0]=(r+s)/h,t[1]=(u+i)/h,t[2]=.25*h),t}function Tt(t,e,n,r,i){var a=e[0],o=e[1],s=e[2],e=e[3],c=a+a,l=o+o,u=s+s,h=a*c,f=a*l,a=a*u,d=o*l,o=o*u,s=s*u,c=e*c,l=e*l,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=(f+e)*u,u=(a-l)*u,f=(f-e)*p,e=(1-(h+s))*p,s=(o+c)*p,p=(a+l)*r,a=(o-c)*r,l=(1-(h+d))*r;return t[0]=m,t[1]=v,t[2]=u,t[3]=0,t[4]=f,t[5]=e,t[6]=s,t[7]=0,t[8]=p,t[9]=a,t[10]=l,t[11]=0,t[12]=n[0]+g-(m*g+f*y+p*i),t[13]=n[1]+y-(v*g+e*y+a*i),t[14]=n[2]+i-(u*g+s*y+l*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,c=r*a,r=r*o,l=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]=c+e,t[2]=l-o,t[3]=0,t[4]=c-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=l+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 Lt(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 Nt(t,e,n,r,i,a,o){var s=1/(e-n),c=1/(r-i),l=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*c,t[14]=(o+a)*l,t[15]=1,t}var Ct=Nt;function jt(t,e,n,r){var i,a,o,s,c=e[0],l=e[1],e=e[2],u=r[0],h=r[1],r=r[2],f=n[0],d=n[1],n=n[2];return Math.abs(c-f)<ot&&Math.abs(l-d)<ot&&Math.abs(e-n)<ot?pt(t):(f=c-f,d=l-d,n=e-n,i=h*(n*=s=1/Math.hypot(f,d,n))-r*(d*=s),r=r*(f*=s)-u*n,u=u*d-h*f,(s=Math.hypot(i,r,u))?(i*=s=1/s,r*=s,u*=s):u=r=i=0,h=d*u-n*r,a=n*i-f*u,o=f*r-d*i,(s=Math.hypot(h,a,o))?(h*=s=1/s,a*=s,o*=s):o=a=h=0,t[0]=i,t[1]=h,t[2]=f,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*c+r*l+u*e),t[13]=-(h*c+a*l+o*e),t[14]=-(f*c+d*l+n*e),t[15]=1,t)}function Rt(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 Ft=Object.freeze({__proto__:null,create:ut,clone:ht,copy:ft,fromValues:function(t,e,n,r,i,a,o,s,c,l,u,h,f,d,p,g){var y=new st(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]=c,y[9]=l,y[10]=u,y[11]=h,y[12]=f,y[13]=d,y[14]=p,y[15]=g,y},set:dt,identity:pt,transpose:gt,invert:yt,adjoint:function(t,e){var n=e[0],r=e[1],i=e[2],a=e[3],o=e[4],s=e[5],c=e[6],l=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],y=e[14],e=e[15];return t[0]=s*(f*e-d*y)-h*(c*e-l*y)+g*(c*d-l*f),t[1]=-(r*(f*e-d*y)-h*(i*e-a*y)+g*(i*d-a*f)),t[2]=r*(c*e-l*y)-s*(i*e-a*y)+g*(i*l-a*c),t[3]=-(r*(c*d-l*f)-s*(i*d-a*f)+h*(i*l-a*c)),t[4]=-(o*(f*e-d*y)-u*(c*e-l*y)+p*(c*d-l*f)),t[5]=n*(f*e-d*y)-u*(i*e-a*y)+p*(i*d-a*f),t[6]=-(n*(c*e-l*y)-o*(i*e-a*y)+p*(i*l-a*c)),t[7]=n*(c*d-l*f)-o*(i*d-a*f)+u*(i*l-a*c),t[8]=o*(h*e-d*g)-u*(s*e-l*g)+p*(s*d-l*h),t[9]=-(n*(h*e-d*g)-u*(r*e-a*g)+p*(r*d-a*h)),t[10]=n*(s*e-l*g)-o*(r*e-a*g)+p*(r*l-a*s),t[11]=-(n*(s*d-l*h)-o*(r*d-a*h)+u*(r*l-a*s)),t[12]=-(o*(h*y-f*g)-u*(s*y-c*g)+p*(s*f-c*h)),t[13]=n*(h*y-f*g)-u*(r*y-i*g)+p*(r*f-i*h),t[14]=-(n*(s*y-c*g)-o*(r*y-i*g)+p*(r*c-i*s)),t[15]=n*(s*f-c*h)-o*(r*f-i*h)+u*(r*c-i*s),t},determinant:mt,multiply:vt,translate:bt,scale:xt,rotate:function(t,e,n,r){var i,a,o,s,c,l,u,h,f,d,p,g,y,m,v,b,x,w,k,M,E=r[0],O=r[1],r=r[2],S=Math.hypot(E,O,r);return S<ot?null:(E*=S=1/S,O*=S,r*=S,S=Math.sin(n),n=Math.cos(n),a=e[0],o=e[1],s=e[2],c=e[3],l=e[4],u=e[5],h=e[6],f=e[7],d=e[8],p=e[9],g=e[10],y=e[11],v=E*O*(i=1-n)-r*S,b=O*O*i+n,x=r*O*i+E*S,w=E*r*i+O*S,k=O*r*i-E*S,M=r*r*i+n,t[0]=a*(n=E*E*i+n)+l*(m=O*E*i+r*S)+d*(r=r*E*i-O*S),t[1]=o*n+u*m+p*r,t[2]=s*n+h*m+g*r,t[3]=c*n+f*m+y*r,t[4]=a*v+l*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+h*b+g*x,t[7]=c*v+f*b+y*x,t[8]=a*w+l*k+d*M,t[9]=o*w+u*k+p*M,t[10]=s*w+h*k+g*M,t[11]=c*w+f*k+y*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:wt,rotateY:kt,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],c=e[4],l=e[5],u=e[6],h=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+c*r,t[1]=a*n+l*r,t[2]=o*n+u*r,t[3]=s*n+h*r,t[4]=c*n-i*r,t[5]=l*n-a*r,t[6]=u*n-o*r,t[7]=h*n-s*r,t},fromTranslation:Mt,fromScaling:Et,fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<ot?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:Ot,fromQuat2:function(t,e){var n=new st(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],c=e[5],l=e[6],u=e[7],h=r*r+i*i+a*a+o*o;return 0<h?(n[0]=2*(s*o+u*r+c*a-l*i)/h,n[1]=2*(c*o+u*i+l*r-s*a)/h,n[2]=2*(l*o+u*a+s*i-c*r)/h):(n[0]=2*(s*o+u*r+c*a-l*i),n[1]=2*(c*o+u*i+l*r-s*a),n[2]=2*(l*o+u*a+s*i-c*r)),Ot(t,e,n),t},getTranslation:St,getScaling:_t,getRotation:At,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),c=i*(h=a+a),i=i*(f=o+o),l=a*h,a=a*f,o=o*f,u=e*u,h=e*h,e=e*f,f=r[0],d=r[1],r=r[2];return t[0]=(1-(l+o))*f,t[1]=(c+e)*f,t[2]=(i-h)*f,t[3]=0,t[4]=(c-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+h)*r,t[9]=(a-u)*r,t[10]=(1-(s+l))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Tt,fromQuat:Pt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),c=1/(i-r),l=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*c,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*c,t[10]=(o+a)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*l,t[15]=0,t},perspectiveNO:Lt,perspective:Lt,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),c=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*c*.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:Nt,ortho:Ct,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),c=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*c,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)*c,t[14]=a*o,t[15]=1,t},lookAt:jt,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],c=i-n[0],l=a-n[1],n=e-n[2],u=c*c+l*l+n*n,h=(0<u&&(c*=u=1/Math.sqrt(u),l*=u,n*=u),s*n-r*l);return 0<(u=h*h+(r=r*c-o*n)*r+(o=o*l-s*c)*o)&&(h*=u=1/Math.sqrt(u),r*=u,o*=u),t[0]=h,t[1]=r,t[2]=o,t[3]=0,t[4]=l*o-n*r,t[5]=n*h-c*o,t[6]=c*r-l*h,t[7]=0,t[8]=c,t[9]=l,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:Rt,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],c=t[6],l=t[7],u=t[8],h=t[9],f=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],E=e[7],O=e[8],S=e[9],_=e[10],A=e[11],T=e[12],P=e[13],L=e[14],e=e[15];return Math.abs(n-m)<=ot*Math.max(1,Math.abs(n),Math.abs(m))&&Math.abs(r-v)<=ot*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=ot*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=ot*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=ot*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-k)<=ot*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(c-M)<=ot*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(l-E)<=ot*Math.max(1,Math.abs(l),Math.abs(E))&&Math.abs(u-O)<=ot*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(h-S)<=ot*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(f-_)<=ot*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(d-A)<=ot*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-T)<=ot*Math.max(1,Math.abs(p),Math.abs(T))&&Math.abs(g-P)<=ot*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(y-L)<=ot*Math.max(1,Math.abs(y),Math.abs(L))&&Math.abs(t-e)<=ot*Math.max(1,Math.abs(t),Math.abs(e))},mul:vt,sub:Rt});function m(){var t=new st(3);return st!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function It(t){var e=new st(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function Bt(t){var e=t[0],n=t[1],t=t[2];return Math.hypot(e,n,t)}function k(t,e,n){var r=new st(3);return r[0]=t,r[1]=e,r[2]=n,r}function Dt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Gt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function zt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Wt(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function Vt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function Yt(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 Ht(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function qt(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 Ut(t,e,n,r){var i=e[0],a=e[1],e=e[2];t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=e+r*(n[2]-e)}function Xt(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 $t(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 Kt(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)<=ot*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=ot*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=ot*Math.max(1,Math.abs(t),Math.abs(e))}var Zt=Wt,Jt=function(t,e){var n=e[0]-t[0],r=e[1]-t[1],e=e[2]-t[2];return Math.hypot(n,r,e)},Qt=Bt;function te(){var t=new st(4);return st!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function ee(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 ne(){var t=new st(4);return st!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function re(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 ie(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],c=n[2],n=n[3];return t[0]=r*n+e*o+i*c-a*s,t[1]=i*n+e*s+a*o-r*c,t[2]=a*n+e*c+r*s-i*o,t[3]=e*n-r*o-i*s-a*c,t}function ae(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 oe(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(),te();var se=function(t,e,n,r){var i=new st(4);return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i},ce=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},le=ie,ue=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 he(t,e){var n=new st(2);return n[0]=t,n[1]=e,n}function fe(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function de(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function pe(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function ge(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function ye(t,e){var n=e[0]-t[0],e=e[1]-t[1];return Math.hypot(n,e)}function me(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}function ve(t,e){return t[0]*e[0]+t[1]*e[1]}function be(t,e){return t[0]===e[0]&&t[1]===e[1]}m(),k(1,0,0),k(0,1,0),ne(),ne(),ct();var xe=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};function we(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}e=new st(2),st!=Float32Array&&(e[0]=0,e[1]=0);var ke=function(t,e){return(ke=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 Me(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}ke(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 Ee(t,o,s,c){return new(s=s||Promise)(function(n,e){function r(t){try{a(c.next(t))}catch(t){e(t)}}function i(t){try{a(c.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((c=c.apply(t,o||[])).next())})}function Oe(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 b(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 Se(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 _e={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 Te(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return Ae[e]===t.length-1&&"achlmqstvz".includes(e)})}function Pe(t){return Te(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function Le(t){return Pe(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function Ne(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 Ce(t){return 48<=t&&t<=57}function je(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 Re(t){var e,n,r,i,a,o=t.max,s=t.pathValue,c=t.index,l=s.charCodeAt(c),u=Ae[s[c].toLowerCase()];if(t.segmentStart=c,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}}(l)){if(t.index+=1,je(t),t.data=[],u)for(;;){for(var h=u;0<h;--h){if(97!=(32|l)||3!==h&&4!==h?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,c=!1,l=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(Ce(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&&Ce(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&Ce(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(l=!0,o+=1;Ce(i.charCodeAt(o));)o+=1,c=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(l&&!s&&!c)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&&Ce(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&Ce(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),je(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,je(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}Ne(t)}else t.err='[path-util]: Invalid path value "'+s[c]+'" is not a path command'}var Fe=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 Ie(t){var o,s,c,l;return Pe(t)?we(t):(t=function(t){if(Te(t))return we(t);var e=new Fe(t);for(je(e);e.index<e.max&&!e.err.length;)Re(e);return e.err||e.segments}(t),l=c=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",c=o,l=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=c,s=l;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(c=o,l=s)}return i}))}function Be(t){if(Le(t))return we(t);for(var e,n,r,i,a,o,s,c=Ie(t),l=v({},_e),u=0;u<c.length;u+=1){c[u]=(e=c[u],n=l,s=o=f=a=h=i=r=void 0,r=e[0],i=n.x1,h=n.y1,a=n.x2,f=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],h]:"V"===r?s=["L",i,e[1]]:"S"===r?(e=2*h-f,s=["C",n.x1=2*i-a,n.y1=e].concat(o)):"T"===r?(f=2*i-n.qx,a=2*h-n.qy,s=["Q",n.qx=f,n.qy=a].concat(o)):"Q"===r&&(e=o[0],i=o[1],n.qx=e,n.qy=i),s);var h=c[u],f=h.length;l.x1=+h[f-2],l.y1=+h[f-1],l.x2=+h[f-4]||l.x1,l.y2=+h[f-3]||l.y1}return c}function De(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Ge(t,e,n,r,i,a,o,s,c,l){var u=120*Math.PI/180,h=Math.PI/180*(+i||0),f=[],d=(l?(b=l[0],x=l[1],m=l[2],v=l[3]):(t=(g=De(t,e,-h)).x,e=g.y,1<(d=(p=(t-(s=(g=De(s,c,-h)).x))/2)*p/(n*n)+(g=(e-(c=g.y))/2)*g/(r*r))&&(n*=d=Math.sqrt(d),r*=d),d=n*n,y=r*r,m=(a=(a===o?-1:1)*Math.sqrt(Math.abs((d*y-d*g*g-y*p*p)/(d*g*g+y*p*p))))*n*g/r+(t+s)/2,v=a*-r*p/n+(e+c)/2,b=Math.asin(((e-v)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),x=Math.asin(((c-v)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),b=t<m?Math.PI-b:b,x=s<m?Math.PI-x:x,b<0&&(b=2*Math.PI+b),x<0&&(x=2*Math.PI+x),o&&x<b&&(b-=2*Math.PI),!o&&b<x&&(x-=2*Math.PI)),x-b),p=(Math.abs(d)>u&&(y=x,g=s,a=c,x=b+u*(o&&b<x?1:-1),f=Ge(s=m+n*Math.cos(x),c=v+r*Math.sin(x),n,r,i,0,o,g,a,[x,y,m,v])),d=x-b,Math.cos(b)),u=Math.sin(b),i=Math.cos(x),o=Math.sin(x),g=Math.tan(d/4),a=4/3*n*g,y=4/3*r*g,m=[t,e],v=[t+a*u,e-y*p],b=[s+a*o,c-y*i],x=[s,c];if(v[0]=2*m[0]-v[0],v[1]=2*m[1]-v[1],l)return v.concat(b,x,f);for(var w=[],k=0,M=(f=v.concat(b,x,f)).length;k<M;k+=1)w[k]=k%2?De(f[k-1],f[k],h).y:De(f[k],f[k+1],h).x;return w}function ze(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function We(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Ve(t,e,n,r,i){var a=We([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=ze([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 Ye(t,e,n,r){var t=[t,e],e=[n,r],i=ze(t,e,.5),e=ze(e,i,.5),a=ze(i,e,.5),o=ze(e,a,.5),s=ze(a,o,.5),t=Ve(t[0],t[1],i[0],i[1],a[0]).point,i=Ve(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function He(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=we(t),e?[n,[]]:n;for(var r,i=Be(t),a=v({},_e),o=[],s="",c=i.length,l=[],u=0;u<c;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var h=function(t,e){var n,r,i,a,o,s,c=t[0],l=t.slice(1).map(Number),u=l[0],h=l[1],f=e.x1,d=e.y1,p=e.x,g=e.y;switch("TQ".includes(c)||(e.qx=null,e.qy=null),c){case"M":return e.x=u,e.y=h,t;case"A":return s=[f,d].concat(l),["C"].concat(Ge(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=h,s=[f,d].concat(l),["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(Ye(f,d,u,h));case"Z":return f===p&&d===g?["C",f,d,p,g,p,g]:["C"].concat(Ye(f,d,p,g))}return t}(i[u],a),f=(i[u]=h,y=g=p=d=f=void 0,i),d=o,p=u;if(7<f[p].length){f[p].shift();for(var g=f[p],y=p;g.length;)d[p]="A",f.splice(y+=1,0,["C"].concat(g.splice(0,6)));f.splice(p,1)}c=i.length,"Z"===s&&l.push(u),r=(h=i[u]).length,a.x1=+h[r-2],a.y1=+h[r-1],a.x2=+h[r-4]||a.x1,a.y2=+h[r-3]||a.y1}return e?[i,l]:i}function qe(t,e){var n=t.x,t=t.y,r=e.x,e=e.y,i=n*r+t*e,a=Math.sqrt((Math.pow(n,2)+Math.pow(t,2))*(Math.pow(r,2)+Math.pow(e,2)));return(n*e-t*r<0?-1:1)*Math.acos(i/a)}function Ue(t,e,n,r,i,F,I,a,o,s,c){var l=c.bbox,B=void 0===l||l,l=c.length,D=void 0===l||l,l=c.sampleSize,u=void 0===l?30:l,h="number"==typeof s,f=t,d=e,p=0,g=[f,d,p],y=[f,d],m={x:0,y:0},v=[{x:f,y:d}];h&&s<=0&&(m={x:f,y:d});for(var b,x,w,k,M,E,O,S,_,A,T,P,L,N,C,j,R=0;R<=u;R+=1)b=t,x=e,w=n,k=r,M=i,E=F,O=I,S=a,_=o,A=R/u,P=j=C=N=L=P=T=void 0,P=Math.abs,L=Math.sin,N=Math.cos,C=Math.sqrt,j=Math.PI,w=P(w),P=P(k),k=j/180*((M%360+360)%360),f=(T=b===S&&x===_?{x:b,y:x}:0===w||0===P?Ve(b,x,S,_,A).point:(M=(b-S)/2,T=(x-_)/2,M={x:N(k)*M+L(k)*T,y:-L(k)*M+N(k)*T},1<(T=Math.pow(M.x,2)/Math.pow(w,2)+Math.pow(M.y,2)/Math.pow(P,2))&&(w*=C(T),P*=C(T)),T=(Math.pow(w,2)*Math.pow(P,2)-Math.pow(w,2)*Math.pow(M.y,2)-Math.pow(P,2)*Math.pow(M.x,2))/(Math.pow(w,2)*Math.pow(M.y,2)+Math.pow(P,2)*Math.pow(M.x,2)),E=(E!==O?1:-1)*C(T<0?0:T),C=w*M.y/P*E,T=-P*M.x/w*E,E=N(k)*C-L(k)*T+(b+S)/2,b=L(k)*C+N(k)*T+(x+_)/2,x=qe({x:1,y:0},S={x:(M.x-C)/w,y:(M.y-T)/P}),_=qe(S,{x:(-M.x-C)/w,y:(-M.y-T)/P}),!O&&0<_?_-=2*j:O&&_<0&&(_+=2*j),S=x+(_%=2*j)*A,C=w*N(S),M=P*L(S),{x:N(k)*C-L(k)*M+E,y:L(k)*C+N(k)*M+b})).x,d=T.y,B&&v.push({x:f,y:d}),D&&(p+=We(y,[f,d])),y=[f,d],h&&s<=p&&s>g[2]&&(O=(p-s)/(p-g[2]),m={x:y[0]*(1-O)+g[0]*O,y:y[1]*(1-O)+g[1]*O}),g=[f,d,p];return{length:p,point:m=h&&p<=s?{x:a,y:o}:m,min:{x:Math.min.apply(null,v.map(function(t){return t.x})),y:Math.min.apply(null,v.map(function(t){return t.y}))},max:{x:Math.max.apply(null,v.map(function(t){return t.x})),y:Math.max.apply(null,v.map(function(t){return t.y}))}}}function Xe(t,e,n,r,i,a,o,s,c,l){var u=l.bbox,h=void 0===u||u,u=l.length,f=void 0===u||u,u=l.sampleSize,d=void 0===u?10:u,p="number"==typeof c,g=t,y=e,m=0,v=[g,y,m],b=[g,y],x={x:0,y:0},w=[{x:g,y:y}];p&&c<=0&&(x={x:g,y:y});for(var k,M,E,O,S,_,A,T,P,L,N=0;N<=d;N+=1)k=t,M=e,E=n,O=r,S=i,_=a,A=o,T=s,L=void 0,L=1-(P=N/d),g=(k={x:Math.pow(L,3)*k+3*Math.pow(L,2)*P*E+3*L*Math.pow(P,2)*S+Math.pow(P,3)*A,y:Math.pow(L,3)*M+3*Math.pow(L,2)*P*O+3*L*Math.pow(P,2)*_+Math.pow(P,3)*T}).x,y=k.y,h&&w.push({x:g,y:y}),f&&(m+=We(b,[g,y])),b=[g,y],p&&c<=m&&c>v[2]&&(E=(m-c)/(m-v[2]),x={x:b[0]*(1-E)+v[0]*E,y:b[1]*(1-E)+v[1]*E}),v=[g,y,m];return{length:m,point:x=p&&m<=c?{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 $e(t,e,n,r,i,a,o,s){var c=s.bbox,l=void 0===c||c,c=s.length,u=void 0===c||c,c=s.sampleSize,h=void 0===c?10:c,f="number"==typeof o,d=t,p=e,g=0,y=[d,p,g],m=[d,p],v={x:0,y:0},b=[{x:d,y:p}];f&&o<=0&&(v={x:d,y:p});for(var x,w,k,M,E,O,S,_,A=0;A<=h;A+=1)x=t,w=e,k=n,M=r,E=i,O=a,_=void 0,_=1-(S=A/h),d=(x={x:Math.pow(_,2)*x+2*_*S*k+Math.pow(S,2)*E,y:Math.pow(_,2)*w+2*_*S*M+Math.pow(S,2)*O}).x,p=x.y,l&&b.push({x:d,y:p}),u&&(g+=We(m,[d,p])),m=[d,p],f&&o<=g&&o>y[2]&&(k=(g-o)/(g-y[2]),v={x:m[0]*(1-k)+y[0]*k,y:m[1]*(1-k)+y[1]*k}),y=[d,p,g];return{length:g,point:v=f&&g<=o?{x:i,y:a}:v,min:{x:Math.min.apply(null,b.map(function(t){return t.x})),y:Math.min.apply(null,b.map(function(t){return t.y}))},max:{x:Math.max.apply(null,b.map(function(t){return t.x})),y:Math.max.apply(null,b.map(function(t){return t.y}))}}}function Ke(t,e,n){for(var r,i,a,o=Be(t),s="number"==typeof e,c=[],l=0,u=0,h=0,f=0,d=[],p=[],g=0,y={x:0,y:0},m=y,v=y,b=y,x=0,w=0,k=o.length;w<k;w+=1)c=(r="M"===(i=(a=o[w])[0]))?c:[l,u].concat(a.slice(1)),r?(m=y={x:h=a[1],y:f=a[2]},g=0,s&&e<.001&&(b=y)):"L"===i?(g=(r=Ve(c[0],c[1],c[2],c[3],(e||0)-x)).length,y=r.min,m=r.max,v=r.point):"A"===i?(g=(r=Ue(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],(e||0)-x,n||{})).length,y=r.min,m=r.max,v=r.point):"C"===i?(g=(r=Xe(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],(e||0)-x,n||{})).length,y=r.min,m=r.max,v=r.point):"Q"===i?(g=(r=$e(c[0],c[1],c[2],c[3],c[4],c[5],(e||0)-x,n||{})).length,y=r.min,m=r.max,v=r.point):"Z"===i&&(g=(r=Ve((c=[l,u,h,f])[0],c[1],c[2],c[3],(e||0)-x)).length,y=r.min,m=r.max,v=r.point),s&&x<e&&e<=x+g&&(b=v),p.push(m),d.push(y),x+=g,l=(r="Z"!==i?a.slice(-2):[h,f])[0],u=r[1];return{length:x,point:b=s&&x<=e?{x:l,y:u}:b,min:{x:Math.min.apply(null,d.map(function(t){return t.x})),y:Math.min.apply(null,d.map(function(t){return t.y}))},max:{x:Math.max.apply(null,p.map(function(t){return t.x})),y:Math.max.apply(null,p.map(function(t){return t.y}))}}}function Ze(t){return(l=c=s=0)<=He(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],c=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],l=3*((o-c)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(c-i)+o*(r+s/3)-a*(i+c/3))/20,n=t.slice(-2),s=n[0],c=n[1],l)}).reduce(function(t,e){return t+e},0);var s,c,l}function Je(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?Xe(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=ze(n,i,r),i=ze(i,a,r),a=ze(a,e,r),o=ze(n,i,r),i=ze(i,a,r),r=ze(o,i,r),[["C"].concat(n,o,r),["C"].concat(i,a,e)]):[t,t]:[t];return{s:t,ss:n,l:s}})}var Qe=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},tn=function(t){return"function"==typeof t},_=function(t){return null==t},en={}.toString,nn=function(t,e){return en.call(t)==="[object "+e+"]"},rn=function(t){return Array.isArray?Array.isArray(t):nn(t,"Array")},an=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function on(t,e){if(t)if(rn(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(an(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var sn=function(t){return"object"==typeof t&&null!==t},cn=function(t){if(!sn(t)||!nn(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},ln=function(t){if(rn(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},un=function(t){if(rn(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},hn=function(t){return nn(t,"String")},fn=function(t,e,n){return t<e?e:n<t?n:t},dn=function(t){return nn(t,"Number")};var pn=function(t,e){return(t%e+e)%e},gn=Object.values?function(t){return Object.values(t)}:function(n){var r=[];return on(n,function(t,e){tn(n)&&"prototype"===e||r.push(t)}),r};var yn=function(t){return nn(t,"Boolean")},mn=function(t){return void 0===t},vn=function(t){return t instanceof Element||t instanceof HTMLDocument};function bn(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function xn(t,e,n,r){return e&&bn(t,e),n&&bn(t,n),r&&bn(t,r),t}function wn(t){if("object"!=typeof t||null===t)return t;if(rn(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=wn(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=wn(t[i]):e[i]=t[i];return e}function kn(a,o){var s;if(tn(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 Mn=wn,En=5;function On(t,e){if(t===e)return!0;if(t&&e&&!hn(t)&&!hn(e)){if(Qe(t)||Qe(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=On(t[r],e[r]));r++);return n}if(sn(t)||sn(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=On(t[i[r]],e[i[r]]));r++);return n}}return!1}function Sn(t,e,n){for(var r=0,i=hn(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t}function _n(e,t){var n;return null!==e&&cn(e)?(n={},on(t,function(t){Nn.call(e,t)&&(n[t]=e[t])}),n):{}}function An(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,l=n.apply(s,c),o||(s=c=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,c=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,l=n.apply(s,c),o||(s=c=null)):o||!1===i.trailing||(o=setTimeout(a,e)),l}var o,s,c,l,u=0;return i=i||{},t.cancel=function(){clearTimeout(o),u=0,o=s=c=null},t}function Tn(){}var Pn=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||En,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&cn(o)?(cn(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):rn(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Ln=On,Nn=Object.prototype.hasOwnProperty;function Cn(t,e,n){(t.prototype=e.prototype=n).constructor=t}function jn(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function Rn(){}var e="\\s*([+-]?\\d+)\\s*",Fn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",In=/^#([0-9a-f]{3,8})$/,Bn=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),Dn=new RegExp("^rgb\\("+[n,n,n]+"\\)$"),Gn=new RegExp("^rgba\\("+[e,e,e,Fn]+"\\)$"),zn=new RegExp("^rgba\\("+[n,n,n,Fn]+"\\)$"),Wn=new RegExp("^hsl\\("+[Fn,n,n]+"\\)$"),Vn=new RegExp("^hsla\\("+[Fn,n,n,Fn]+"\\)$"),Yn={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 Hn(){return this.rgb().formatHex()}function qn(){return this.rgb().formatRgb()}function Un(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=In.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Xn(e):3===n?new Kn(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=Bn.exec(t))?new Kn(e[1],e[2],e[3],1):(e=Dn.exec(t))?new Kn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Gn.exec(t))?$n(e[1],e[2],e[3],e[4]):(e=zn.exec(t))?$n(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Wn.exec(t))?tr(e[1],e[2]/100,e[3]/100,1):(e=Vn.exec(t))?tr(e[1],e[2]/100,e[3]/100,e[4]):Yn.hasOwnProperty(t)?Xn(Yn[t]):"transparent"===t?new Kn(NaN,NaN,NaN,0):null}function Xn(t){return new Kn(t>>16&255,t>>8&255,255&t,1)}function $n(t,e,n,r){return new Kn(t=r<=0?e=n=NaN:t,e,n,r)}function Kn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Zn(){return"#"+Qn(this.r)+Qn(this.g)+Qn(this.b)}function Jn(){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 Qn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function tr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new nr(t,e,n,r)}function er(t){var e,n,r,i,a,o,s,c;return t instanceof nr?new nr(t.h,t.s,t.l,t.opacity):(t=t instanceof Rn?t:Un(t))?t instanceof nr?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,c=((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/=c<.5?a+i:2-a-i,o*=60):s=0<c&&c<1?0:o,new nr(o,s,c,t.opacity)):new nr}function nr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function rr(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 ir(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function ar(t,e){return Math.abs(t-e)<.001}function or(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 sr(t){return(t+2*Math.PI)%(2*Math.PI)}Cn(Rn,Un,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Hn,formatHex:Hn,formatHsl:function(){return er(this).formatHsl()},formatRgb:qn,toString:qn}),Cn(Kn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof Rn?i:Un(i))?new Kn((i=i.rgb()).r,i.g,i.b,i.opacity):new Kn:new Kn(t,e,n,null==r?1:r);var i},jn(Rn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Kn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Kn(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:Zn,formatHex:Zn,formatRgb:Jn,toString:Jn})),Cn(nr,function(t,e,n,r){return 1===arguments.length?er(t):new nr(t,e,n,null==r?1:r)},jn(Rn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new nr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new nr(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 Kn(rr(240<=t?t-240:120+t,n,e),rr(t,n,e),rr(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 cr={box:function(t,e,n,r){return or([t,n],[e,r])},length:ir,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?ir(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?ir(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){n=[n-t,r-e];return be(n,[0,0])?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(me(r=[-n[1],n[0]],r),Math.abs(ve([i-t,a-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function lr(t,e,n,r,i,a){for(var o=-1,s=1/0,c=[n,r],l=20,u=1/(l=a&&200<a?a/10:l),h=u/10,f=0;f<=l;f++){var d=f*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=ir(c[0],c[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&&!(h<1e-4);g++){var y=o-h,m=o+h,v=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=ir(c[0],c[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=ir(c[0],c[1],y[0],y[1]),m<=1&&v<s?(o=m,s=v):h*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function ur(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function hr(t,e,n){n=t+n-2*e;return ar(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function fr(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function dr(t,e,n,r,i,a,o){var s=ur(t,n,i,o),c=ur(e,r,a,o),l=cr.pointAt(t,e,n,r,o),n=cr.pointAt(n,r,i,a,o);return[[t,e,l.x,l.y,s,c],[s,c,n.x,n.y,i,a]]}function pr(t,e,n,r,i,a,o){return 0===o?(ir(t,e,n,r)+ir(n,r,i,a)+ir(t,e,i,a))/2:(e=(t=dr(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),pr.apply(void 0,e)+pr.apply(void 0,n))}var gr={box:function(t,e,n,r,i,a){var o=hr(t,n,i)[0],s=hr(e,r,a)[0],c=[t,i],l=[e,a];return void 0!==o&&c.push(ur(t,n,i,o)),void 0!==s&&l.push(ur(e,r,a,s)),or(c,l)},length:function(t,e,n,r,i,a){return pr(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return lr([t,n,i],[e,r,a],o,s,ur)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return ir(t.x,t.y,o,s)},interpolationAt:ur,pointAt:function(t,e,n,r,i,a,o){return{x:ur(t,n,i,o),y:ur(e,r,a,o)}},divide:dr,tangentAngle:function(t,e,n,r,i,a,o){t=fr(t,n,i,o),n=fr(e,r,a,o);return sr(Math.atan2(n,t))}};function yr(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 mr(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 vr(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 ar(r,0)?ar(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):ar(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 br(t,e,n,r,i,a,o,s,c){var l=yr(t,n,i,o,c),u=yr(e,r,a,s,c),h=cr.pointAt(t,e,n,r,c),n=cr.pointAt(n,r,i,a,c),r=cr.pointAt(i,a,o,s,c),i=cr.pointAt(h.x,h.y,n.x,n.y,c),a=cr.pointAt(n.x,n.y,r.x,r.y,c);return[[t,e,h.x,h.y,i.x,i.y,l,u],[l,u,a.x,a.y,r.x,r.y,o,s]]}function xr(t,e,n,r,i,a,o,s,c){if(0===c){for(var l=[t,n,i,o],u=[e,r,a,s],h=0,f=l.length,d=0;d<f;d++)h+=ir(l[d],u[d],l[(d+1)%f],u[(d+1)%f]);return h/2}t=br(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[c-1]),n=[].concat(t[1],[c-1]);return xr.apply(void 0,e)+xr.apply(void 0,n)}var wr={extrema:vr,box:function(t,e,n,r,i,a,o,s){for(var c=[t,o],l=[e,s],u=vr(t,n,i,o),h=vr(e,r,a,s),f=0;f<u.length;f++)c.push(yr(t,n,i,o,u[f]));for(var d=0;d<h.length;d++)l.push(yr(e,r,a,s,h[d]));return or(c,l)},length:function(t,e,n,r,i,a,o,s){return xr(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,c,l,u){return lr([t,n,i,o],[e,r,a,s],c,l,yr,u)},pointDistance:function(t,e,n,r,i,a,o,s,c,l,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,c,l,u);return ir(t.x,t.y,c,l)},interpolationAt:yr,pointAt:function(t,e,n,r,i,a,o,s,c){return{x:yr(t,n,i,o,c),y:yr(e,r,a,s,c)}},divide:br,tangentAngle:function(t,e,n,r,i,a,o,s,c){t=mr(t,n,i,o,c),n=mr(e,r,a,s,c);return sr(Math.atan2(n,t))}};function kr(t,e){t=Math.abs(t);return 0<e?t:-1*t}var Mr=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,c=Math.abs(n),l=Math.abs(r),u=o*o,h=s*s,f=Math.PI/4,d=0,p=0,g=0;g<4;g++){var d=o*Math.cos(f),p=s*Math.sin(f),y=(u-h)*Math.pow(Math.cos(f),3)/o,m=(h-u)*Math.pow(Math.sin(f),3)/s,v=d-y,b=p-m,y=c-y,m=l-m,x=Math.hypot(b,v),w=Math.hypot(m,y);f+=x*Math.asin((v*m-b*y)/(x*w))/Math.sqrt(u+h-d*d-p*p),f=Math.min(Math.PI/2,Math.max(0,f))}return{x:t+kr(d,n),y:e+kr(p,r)}};function Er(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function Or(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function Sr(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function _r(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var Ar={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),c=1/0,l=-1/0,u=[a,o],h=2*-Math.PI;h<=2*Math.PI;h+=Math.PI){var f=s+h;a<o?a<f&&f<o&&u.push(f):o<f&&f<a&&u.push(f)}for(var d=0;d<u.length;d++){var p=Er(t,0,n,r,i,u[d]);p<c&&(c=p),l<p&&(l=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=Or(0,e,n,r,i,v[w]);k<y&&(y=k),m<k&&(m=k)}return{x:c,y:y,width:l-c,height:m-y}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,c){var s=_r(s-t,c-e,-i),c=s[0],s=s[1],c=Mr(0,0,n,r,c,s),l=(s=c.x,l=c.y,(Math.atan2(l*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(l<a?c=Sr(n,r,a):o<l&&(c=Sr(n,r,o)),_r(c.x,c.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,c){t=this.nearestPoint(t,e,n,r,i,a,o,s,c);return ir(t.x,t.y,s,c)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:Er(t,0,n,r,i,o),y:Or(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var c,o=(o-a)*s+a,s=(s=r,a=i,c=o,-1*n*Math.cos(a)*Math.sin(c)-s*Math.sin(a)*Math.cos(c)),i=(a=r,c=i,r=o,-1*n*Math.sin(c)*Math.sin(r)+a*Math.cos(c)*Math.cos(r));return sr(Math.atan2(i,s))}};function Tr(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=ir(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var Pr,Lr,Nr={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 or(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+=ir(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=Tr(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 c=r[s],l=c.from,u=c.to,c=c.length/i;if(a<=n&&n<=a+c){o=cr.pointAt(l[0],l[1],u[0],u[1],(n-a)/c);break}a+=c}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 c=r[s],l=r[s+1],c=cr.pointDistance(c[0],c[1],l[0],l[1],i,a);c<o&&(o=c)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=Tr(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var c=r[s],l=c.from,u=c.to,c=c.length/i;if(a<=n&&n<=a+c){o=Math.atan2(u[1]-l[1],u[0]-l[0]);break}a+=c}return o}},e={exports:{}};function Cr(){}function jr(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Rr(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new jr(n,r||t,i),r=Lr?Lr+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 Fr(t,e){0==--t._eventsCount?t._events=new Cr:delete t._events[e]}function Ir(){this._events=new Cr,this._eventsCount=0}n=e,Pr=Object.prototype.hasOwnProperty,Lr="~",Object.create&&(Cr.prototype=Object.create(null),(new Cr).__proto__||(Lr=!1)),Ir.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)Pr.call(t,e)&&n.push(Lr?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},Ir.prototype.listeners=function(t){var t=Lr?Lr+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},Ir.prototype.listenerCount=function(t){t=Lr?Lr+t:t,t=this._events[t];return t?t.fn?1:t.length:0},Ir.prototype.emit=function(t,e,n,r,i,a){var o=Lr?Lr+t:t;if(!this._events[o])return!1;var s,c=this._events[o],l=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,i),!0;case 6:return c.fn.call(c.context,e,n,r,i,a),!0}for(f=1,s=new Array(l-1);f<l;f++)s[f-1]=arguments[f];c.fn.apply(c.context,s)}else for(var u,h=c.length,f=0;f<h;f++)switch(c[f].once&&this.removeListener(t,c[f].fn,void 0,!0),l){case 1:c[f].fn.call(c[f].context);break;case 2:c[f].fn.call(c[f].context,e);break;case 3:c[f].fn.call(c[f].context,e,n);break;case 4:c[f].fn.call(c[f].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(l-1);u<l;u++)s[u-1]=arguments[u];c[f].fn.apply(c[f].context,s)}return!0},Ir.prototype.on=function(t,e,n){return Rr(this,t,e,n,!1)},Ir.prototype.once=function(t,e,n){return Rr(this,t,e,n,!0)},Ir.prototype.removeListener=function(t,e,n,r){t=Lr?Lr+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||Fr(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:Fr(this,t)}}else Fr(this,t);return this},Ir.prototype.removeAllListeners=function(t){return t?(t=Lr?Lr+t:t,this._events[t]&&Fr(this,t)):(this._events=new Cr,this._eventsCount=0),this},Ir.prototype.off=Ir.prototype.removeListener,Ir.prototype.addListener=Ir.prototype.on,Ir.prefixed=Lr,n.exports=Ir.EventEmitter=Ir;var r,Br=e.exports,Fn="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};let Dr=1;const Gr="object"==typeof self&&self.self==self?self:"object"==typeof Fn&&Fn.global==Fn?Fn:{},zr=Date.now();let Wr={},Vr=Date.now();const Yr=t=>"string"!=typeof t?t=>{if("function"!=typeof t)throw new TypeError(t+" is not a function");const n=Date.now(),e=n-Vr,r=16<e?0:16-e,i=Dr++;return Wr[i]=t,1<Object.keys(Wr).length||setTimeout(()=>{Vr=n;const e=Wr;Wr={},Object.keys(e).forEach(t=>e[t](Gr.performance&&"function"==typeof Gr.performance.now?Gr.performance.now():Date.now()-zr))},r),i}:""===t?Gr.requestAnimationFrame:Gr[t+"RequestAnimationFrame"],Hr=((t,e)=>{let n=0;for(;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}})(["","webkit","moz","ms","o"],t=>!!Yr(t)),qr=Yr(Hr),Ur="string"!=typeof(n=Hr)?t=>{delete Wr[t]}:""===n?Gr.cancelAnimationFrame:Gr[n+"CancelAnimationFrame"]||Gr[n+"CancelRequestAnimationFrame"];Gr.requestAnimationFrame=qr,Gr.cancelAnimationFrame=Ur,"undefined"!=typeof module&&module.exports&&(module.exports={requestAnimationFrame:qr,cancelAnimationFrame:Ur}),(e=r=r||{}).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 Xr,M,$r=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){Dt(this.center,t),Dt(this.halfExtents,e),Zt(this.min,this.center,this.halfExtents),zt(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){zt(this.center,e,t),Vt(this.center,this.center,.5),Zt(this.halfExtents,e,t),Vt(this.halfExtents,this.halfExtents,.5),Dt(this.min,t),Dt(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,c,l,u,h,f,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],h=r[1],o=r[2],c=(f=t.center)[0],g=f[1],f=f[2],l=(t=t.halfExtents)[0],(d=g-(u=t[1]))<(s=p-h)&&(s=d),(d=p+h)<(p=g+u)&&(d=p),(g=f-(h=t[2]))<(u=a-o)&&(u=g),(p=a+o)<(t=f+h)&&(p=t),e[0]=.5*((a=(g=c-l)<(a=n-i)?g:a)+(o=(o=n+i)<(f=c+l)?f: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],c=e[1],l=e[5],u=e[9],h=e[2],f=e[6],d=e[10],p=Math.abs(a),g=Math.abs(o),y=Math.abs(s),m=Math.abs(c),v=Math.abs(l),b=Math.abs(u),x=Math.abs(h),w=Math.abs(f),k=Math.abs(d);Gt(n,e[12]+a*i[0]+o*i[1]+s*i[2],e[13]+c*i[0]+l*i[1]+u*i[2],e[14]+h*i[0]+f*i[1]+d*i[2]),Gt(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=Zt(this.min,n,r),this.max=zt(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?Dt(m(),this.min):272===t.pnVertexFlag?k(this.min[0],this.min[1],this.max[2]):257===t.pnVertexFlag?k(this.min[0],this.max[1],this.min[2]):256===t.pnVertexFlag?k(this.min[0],this.max[1],this.max[2]):17===t.pnVertexFlag?k(this.max[0],this.min[1],this.min[2]):16===t.pnVertexFlag?k(this.max[0],this.min[1],this.max[2]):1===t.pnVertexFlag?k(this.max[0],this.max[1],this.min[2]):k(this.max[0],this.max[1],this.max[2])},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Dt(m(),this.max):272===t.pnVertexFlag?k(this.max[0],this.max[1],this.min[2]):257===t.pnVertexFlag?k(this.max[0],this.min[1],this.max[2]):256===t.pnVertexFlag?k(this.max[0],this.min[1],this.min[2]):17===t.pnVertexFlag?k(this.min[0],this.max[1],this.max[2]):16===t.pnVertexFlag?k(this.min[0],this.max[1],this.min[2]):1===t.pnVertexFlag?k(this.min[0],this.min[1],this.max[2]):k(this.min[0],this.min[1],this.min[2])},y}(),Kr=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||k(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 Ht(t,this.normal)-this.distance},e.normalize=function(){var t=1/Qt(this.normal);Vt(this.normal,this.normal,t),this.distance*=t},e.intersectsLine=function(t,e,n){var r=this.distanceToPoint(t),r=r/(r-this.distanceToPoint(e)),i=0<=r&&r<=1;return i&&n&&Ut(n,t,e,r),i},t}(),Zr=((n=Xr=Xr||{})[n.OUTSIDE=4294967295]="OUTSIDE",n[n.INSIDE=0]="INSIDE",n[n.INDETERMINATE=2147483647]="INDETERMINATE",function(){function t(t){if(this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Kr)}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],c=t[7],l=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],t=t[15];Gt(this.planes[0].normal,i-e,c-a,f-l),this.planes[0].distance=t-d,Gt(this.planes[1].normal,i+e,c+a,f+l),this.planes[1].distance=t+d,Gt(this.planes[2].normal,i+n,c+o,f+u),this.planes[2].distance=t+p,Gt(this.planes[3].normal,i-n,c-o,f-u),this.planes[3].distance=t-p,Gt(this.planes[4].normal,i-r,c-s,f-h),this.planes[4].distance=t-g,Gt(this.planes[5].normal,i+r,c+s,f+h),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),Jr=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}(),Qr=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}(),ti=((e=M=M||{}).GROUP="g",e.CIRCLE="circle",e.ELLIPSE="ellipse",e.IMAGE="image",e.RECT="rect",e.LINE="line",e.POLYLINE="polyline",e.POLYGON="polygon",e.TEXT="text",e.PATH="path",e.HTML="html",e.MESH="mesh",kn(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})}));function ei(t){if(!t)throw new Error}function ni(t,e){if(t===e)throw new Error}function ri(t){return"function"==typeof t}var ii={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},ai=kn(function(t){var t=ti(t),e=ii[t];return(null==e?void 0:e.alias)||t}),oi={},si=0;var ci="undefined"!=typeof window&&void 0!==window.document;function li(t,e){var n=Number(t.style.zIndex),r=Number(e.style.zIndex);if(n===r){var i=t.parentNode;if(i)return(i=i.childNodes||[]).indexOf(t)-i.indexOf(e)}return n-r}function ui(t){var e,n=t;do{if(null==(e=n.style)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}function hi(t,e){if(ci)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var g,fi,di,pi,gi="Method not implemented.",yi="Use document.documentElement instead.",mi={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function E(){E=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function vi(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function bi(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){vi(r,e,n,i,a,"next",t)}function a(t){vi(r,e,n,i,a,"throw",t)}i(void 0)})}}function xi(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 wi(t,e,n){e&&xi(t.prototype,e),n&&xi(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function ki(){return(ki=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 s(t,e){t.prototype=Object.create(e.prototype),Mi(t.prototype.constructor=t,e)}function Mi(t,e){return(Mi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ei(t,e){if(null==t)return{};for(var n,r={},i=Object.keys(t),a=0;a<i.length;a++)n=i[a],0<=e.indexOf(n)||(r[n]=t[n]);return r}function Oi(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Si(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 _i(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?Si(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)?Si(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.")}(n=g=g||{})[n.kUnknown=0]="kUnknown",n[n.kNumber=1]="kNumber",n[n.kPercentage=2]="kPercentage",n[n.kEms=3]="kEms",n[n.kPixels=4]="kPixels",n[n.kRems=5]="kRems",n[n.kDegrees=6]="kDegrees",n[n.kRadians=7]="kRadians",n[n.kGradians=8]="kGradians",n[n.kTurns=9]="kTurns",n[n.kMilliseconds=10]="kMilliseconds",n[n.kSeconds=11]="kSeconds",n[n.kInteger=12]="kInteger",(e=fi=fi||{})[e.kUNumber=0]="kUNumber",e[e.kUPercent=1]="kUPercent",e[e.kULength=2]="kULength",e[e.kUAngle=3]="kUAngle",e[e.kUTime=4]="kUTime",e[e.kUOther=5]="kUOther",(n=di=di||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo",(e=pi=pi||{})[e.kYes=0]="kYes",e[e.kNo=1]="kNo";function Ai(t){return t?"number"===t?g.kNumber:"percent"===t||"%"===t?g.kPercentage:(e=t,Ri.find(function(t){return t.name===e}).unit_type):g.kUnknown;var e}function Ti(t){var e=1;switch(t){case g.kPixels:case g.kDegrees:case g.kSeconds:break;case g.kMilliseconds:e=.001;break;case g.kRadians:e=180/Math.PI;break;case g.kGradians:e=.9;break;case g.kTurns:e=360}return e}function Pi(t){switch(t){case g.kNumber:case g.kInteger:return"";case g.kPercentage:return"%";case g.kEms:return"em";case g.kRems:return"rem";case g.kPixels:return"px";case g.kDegrees:return"deg";case g.kRadians:return"rad";case g.kGradians:return"grad";case g.kMilliseconds:return"ms";case g.kSeconds:return"s";case g.kTurns:return"turn"}return""}var Li,Ni,Ci,ji,Ri=[{name:"em",unit_type:g.kEms},{name:"px",unit_type:g.kPixels},{name:"deg",unit_type:g.kDegrees},{name:"rad",unit_type:g.kRadians},{name:"grad",unit_type:g.kGradians},{name:"ms",unit_type:g.kMilliseconds},{name:"s",unit_type:g.kSeconds},{name:"rem",unit_type:g.kRems},{name:"turn",unit_type:g.kTurns}],e=((n=Li=Li||{})[n.kUnknownType=0]="kUnknownType",n[n.kUnparsedType=1]="kUnparsedType",n[n.kKeywordType=2]="kKeywordType",n[n.kUnitType=3]="kUnitType",n[n.kSumType=4]="kSumType",n[n.kProductType=5]="kProductType",n[n.kNegateType=6]="kNegateType",n[n.kInvertType=7]="kInvertType",n[n.kMinType=8]="kMinType",n[n.kMaxType=9]="kMaxType",n[n.kClampType=10]="kClampType",n[n.kTransformType=11]="kTransformType",n[n.kPositionType=12]="kPositionType",n[n.kURLImageType=13]="kURLImageType",n[n.kColorType=14]="kColorType",n[n.kUnsupportedColorType=15]="kUnsupportedColorType",function(){function t(){}t.isAngle=function(t){return t===g.kDegrees||t===g.kRadians||t===g.kGradians||t===g.kTurns},t.isLength=function(t){return t>=g.kEms&&t<g.kDegrees},t.isRelativeUnit=function(t){return t===g.kPercentage||t===g.kEms||t===g.kRems},t.isTime=function(t){return t===g.kSeconds||t===g.kMilliseconds};var e=t.prototype;return e.toString=function(){return this.buildCSSText(di.kNo,pi.kNo,"")},e.isNumericValue=function(){return this.getType()>=Li.kUnitType&&this.getType()<=Li.kClampType},t}()),n=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}s(t,n);var e=t.prototype;return e.getType=function(){return Li.kColorType},e.to=function(t){return this},t}(e),Fi=((i=Ni=Ni||{})[i.Constant=0]="Constant",i[i.LinearGradient=1]="LinearGradient",i[i.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}s(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 Li.kColorType},t}(e)),Ii=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}s(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return Li.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(e);(i=Ci=Ci||{}).kAdd="+",i.kSubtract="-",i.kMultiply="*",i.kDivide="/",i.kMin="min",i.kMax="max",i.kClamp="clamp",i.kInvalid="",(i=ji=ji||{})[i.kLength=0]="kLength",i[i.kAngle=1]="kAngle",i[i.kTime=2]="kTime",i[i.kFrequency=3]="kFrequency",i[i.kResolution=4]="kResolution",i[i.kFlex=5]="kFlex",i[i.kPercent=6]="kPercent",i[i.kNumBaseTypes=7]="kNumBaseTypes";function Bi(t){return"number"==typeof t?new qi(t,g.kNumber):t}var Di=function(){function t(t,e){void 0===t&&(t=g.kNumber),void 0===e&&(e=1),this.exponents=[],this.numNonZeroEntries=0,this.percentHint=ji.kPercent,this.hasPercentHint=!1,this.exponents=new Array(ji.kNumBaseTypes).fill(0),t!==g.kNumber&&this.setExponent(function(t){switch(ni(t,g.kNumber),t){case g.kEms:case g.kPixels:case g.kRems:return ji.kLength;case g.kMilliseconds:case g.kSeconds:return ji.kTime;case g.kDegrees:case g.kRadians:case g.kGradians:case g.kTurns:return ji.kAngle;case g.kPercentage:return ji.kPercent;default:return ji.kLength}}(t),e)}var e=t.prototype;return e.applyPercentHint=function(t){ni(t,ji.kPercent),this.setExponent(t,this.exponent(t)+this.exponent(ji.kPercent)),this.setExponent(ji.kPercent,0),this.percentHint=t,this.hasPercentHint=!0},e.hasNonZeroEntries=function(){return 0<this.numNonZeroEntries},e.isOnlyNonZeroEntry=function(t,e){return ni(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 ni(t,ji.kPercent),this.isOnlyNonZeroEntry(t,1)&&!this.hasPercentHint},e.matchesPercentage=function(){return this.isOnlyNonZeroEntry(ji.kPercent,1)},e.matchesBaseTypePercentage=function(t){return ni(t,ji.kPercent),this.isOnlyNonZeroEntry(t,1)||this.isOnlyNonZeroEntry(ji.kPercent,1)},e.matchesNumber=function(){return!this.hasNonZeroEntries()&&!this.hasPercentHint},e.matchesNumberPercentage=function(){return!this.hasNonZeroEntries()||this.isOnlyNonZeroEntry(ji.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<ji.kNumBaseTypes;++a){var o=a;if(t.exponents[a]!==e.exponents[a]&&(o!==ji.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<ji.kNumBaseTypes;++r){var i=r;t.setExponent(i,t.exponent(i)+e.exponent(i))}}return t},t}(),i=function(n){function d(t){var e=n.call(this)||this;return e.type_=void 0,e.type_=t,e}s(d,n);var t=d.prototype;return t.getType=function(){return Li.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 Gi(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=Gi(e),i=(zi(Li.kSumType,r,this),Vi(r,Ci.kAdd));return i||Qi.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=Gi(e)).map(function(t){return t.negate()}),i=(zi(Li.kSumType,r,this),Vi(r,Ci.kAdd));return i||Qi.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=Gi(e),i=(zi(Li.kProductType,r,this),Yi(r));return i||ta.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=Gi(e)).map(function(t){return t.invert()}),i=(zi(Li.kProductType,r,this),Yi(r));return i||ta.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=Gi(e),i=(zi(Li.kMinType,r,this),Vi(r,Ci.kMin));return i||Zi.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=Gi(e),i=(zi(Li.kMaxType,r,this),Vi(r,Ci.kMax));return i||Ji.create(r)},t.to=function(t){var e=this.sumValue();return 0!==e.length&&1===e.length&&(e=Wi(e[0]))?(t="string"==typeof t?Ai(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(Ai(a)))return null}var o=this.sumValue();if(!o.length)return null;for(var s=[],c=_i(o);!(l=c()).done;){var l=Wi(l.value);if(!l)return null;s.push(l)}if(0===e.length)return s.sort(function(t,e){return t.unit-e.unit}),ei(!!(o=Qi.create(s))),o;for(var u=[],h=0,f=e;h<f.length;h++)!function(){var t=f[h],r=Ai(t),t=(ei(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 qi(t,r))}();if(s.some(function(t){return!!t}))throw new Error("There were leftover terms that were not converted");return Qi.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(ji.kLength);return e&&(t.length=e),(e=this.type_.exponent(ji.kAngle))&&(t.angle=e),(e=this.type_.exponent(ji.kTime))&&(t.time=e),(e=this.type_.exponent(ji.kFrequency))&&(t.frequency=e),(e=this.type_.exponent(ji.kResolution))&&(t.resolution=e),(e=this.type_.exponent(ji.kFlex))&&(t.flex=e),(e=this.type_.exponent(ji.kPercent))&&(t.percent=e),this.type_.hasPercentHint&&(t.percentHint=function(t){switch(t){case ji.kLength:return"length";case ji.kAngle:return"angle";case ji.kTime:return"time";case ji.kFrequency:return"frequency";case ji.kResolution:return"resolution";case ji.kFlex:return"flex";case ji.kPercent:return"percent"}return""}(this.type_.percentHint)),t},d.isValidUnit=function(t){return!!(t===g.kNumber||t==g.kPercentage||this.isLength(t)||this.isAngle(t)||this.isTime(t))},t.negate=function(){return Xi.create(this)},t.invert=function(){return Ui.create(this)},d}(e);function Gi(t){return t.map(Bi)}function zi(t,e,n){ei(!!n),n.getType()===t?e.unshift.apply(e,n.numericValues()):e.unshift(n)}function Wi(t){return 0===Object.keys(t.units).length?new qi(t.value):1===Object.keys(t.units).length&&1===t.units[Object.keys(t.units)[0]]?new qi(t.value,Number(Object.keys(t.units)[0])):null}function Vi(t,e){ei(!!t.length);var n=t[0]instanceof qi?t[0]:null;if(!n)return null;for(var r=n.value,i=1;i<t.length;i++){var a=t[i]instanceof qi?t[i]:null;if(!a||a.unit!==n.unit)return null;e===Ci.kAdd?r+=a.value:e===Ci.kMax?r=Math.max(r,a.value):e===Ci.kMin&&(r=Math.min(r,a.value))}return new qi(r,n.unit)}function Yi(t){ei(!!t.length);for(var e=g.kNumber,n=1,r=0;r<t.length;r++){var i=t[r]instanceof qi?t[r]:null;if(!i)return null;if(i.unit!==g.kNumber){if(e!==g.kNumber)return null;e=i.unit}n*=i.value}return new qi(n,e)}function Hi(t){switch(function(t){switch(t){case g.kNumber:case g.kInteger:return fi.kUNumber;case g.kPercentage:return fi.kUPercent;case g.kPixels:return fi.kULength;case g.kMilliseconds:case g.kSeconds:return fi.kUTime;case g.kDegrees:case g.kRadians:case g.kGradians:case g.kTurns:return fi.kUAngle;default:return fi.kUOther}}(t)){case fi.kUNumber:return g.kNumber;case fi.kULength:return g.kPixels;case fi.kUPercent:return g.kPercentage;case fi.kUTime:return g.kSeconds;case fi.kUAngle:return g.kDegrees;default:return g.kUnknown}}var qi=function(r){function n(t,e){var n,e="string"==typeof(e=void 0===e?g.kNumber:e)?Ai(e):e;return(n=r.call(this,new Di(e))||this).unit=void 0,n.value=void 0,n.unit=e,n.value=t,n}s(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=Hi(this.unit))!==Hi(t)||e===g.kUnknown?null:(e=Ti(this.unit)/Ti(t),new n(this.value*e,t))},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return Li.kUnitType},t.sumValue=function(){var t,e,n=[],r={};return this.unit!==g.kNumber&&(r[t=this.unit,(e=Hi(t))===g.kUnknown?t:e]=1),n.push({value:this.value*Ti(this.unit),units:r}),n},t.negate=function(){return new n(-this.value,this.unit)},t.invert=function(){return this.unit===g.kNumber?0===this.value?null:new n(1/this.value,this.unit):Ui.create(this)},t.buildCSSText=function(t,e,n){switch(this.unit){case g.kUnknown:break;case g.kInteger:i=Number(this.value).toFixed(0);break;case g.kNumber:case g.kPercentage:case g.kEms:case g.kRems:case g.kPixels:case g.kDegrees:case g.kRadians:case g.kGradians:case g.kMilliseconds:case g.kSeconds:case g.kTurns:var r,i,a=this.value,o=Pi(this.unit);i=a<-999999||999999<a?(r=Pi(this.unit),!Number.isFinite(a)||Number.isNaN(a)?function(t,e){void 0===e&&(e="");return(Number.isFinite(t)?(ei(Number.isNaN(t)),"NaN"):0<t?"infinity":"-infinity")+e}(a,r):a+(r||"")):""+a+o}return n+=i},n}(i),e=function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.isUnitValue=function(){return!1},e}(i),Ui=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="invert",e.value=t,e}s(e,n),e.create=function(t){return new e(t,Di.negateExponents(t.type_))};var t=e.prototype;return t.clone=function(){return new e(this.value,this.type_)},t.getType=function(){return Li.kInvertType},t.equals=function(t){return t.getType()===Li.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==pi.kNo&&(n+=t===di.kYes?"(":"calc("),n=this.value.buildCSSText(di.kYes,pi.kNo,n+="1 / "),e===pi.kNo&&(n+=")"),n},e}(e),Xi=function(n){function e(t,e){e=n.call(this,e)||this;return e.value=void 0,e.operator="negate",e.value=t,e}s(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 Li.kNegateType},t.equals=function(t){return t.getType()===Li.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==pi.kNo&&(n+=t===di.kYes?"(":"calc("),n=this.value.buildCSSText(di.kYes,pi.kNo,n+="-"),e===pi.kNo&&(n+=")"),n},e}(e);function $i(t,e){for(var n=t[0].type_,r=1;r<t.length;r++)n=e(n,t[r].type_,!1);return n}function Ki(t){return oa[t]||(oa[t]=new Ii(t)),oa[t]}var i=function(n){function t(t,e){e=n.call(this,e)||this;return e.values=void 0,e.values=t,e}s(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}(e),Zi=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}s(e,i),e.create=function(t){return new e(t,$i(t,Di.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Li.kMinType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=_i(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=_i(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(di.kYes,pi.kYes,n);return n+=")"},e}(i),Ji=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}s(e,i),e.create=function(t){return new e(t,$i(t,Di.add))};var t=e.prototype;return t.clone=function(){return new e(this.values,this.type_)},t.getType=function(){return Li.kMaxType},t.sumValue=function(){var t=this.numericValues()[0].sumValue();if(!t.length)return null;for(var e=_i(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=_i(this.numericValues());!(r=a()).done;)i||(n+=", "),i=!1,n=r.value.buildCSSText(di.kYes,pi.kYes,n);return n+=")"},e}(i),Qi=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}s(e,i),e.create=function(t){return new e(t,$i(t,Di.add))},e.numericTypeFromUnitMap=function(n){var r=new Di;return Object.keys(n).forEach(function(t){var e=n[t];r=Di.multiply(r,new Di(Number(t),e),!1),ei(!0)}),r},e.canCreateNumericTypeFromSumValue=function(t){var e=this,n=(ei(!!t.length),this.numericTypeFromUnitMap(t[0].units));return t.every(function(t){return Di.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 Li.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(ki({},e)):n[t].value+=e.value})}),e.canCreateNumericTypeFromSumValue(n)?n:null},t.buildCSSText=function(t,e,n){e==pi.kNo&&(n+=t===di.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(di.kYes,pi.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===Li.kNegateType?(n+=" - ",a.value):(n+=" + ",a)).buildCSSText(di.kYes,pi.kNo,n)}return e===pi.kNo&&(n+=")"),n},e}(i),ta=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}s(a,i),a.create=function(t){return new a(t,$i(t,Di.multiply))},a.multiplyUnitMaps=function(n,r){return Object.keys(r).forEach(function(t){ni(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 Li.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==pi.kNo&&(n+=t===di.kYes?"(":"calc(");var r=this.numericValues();n=r[0].buildCSSText(di.kYes,pi.kNo,n);for(var i=1;i<r.length;i++){var a=r[i];n=(a.getType()===Li.kInvertType?(n+=" / ",a.value):(n+=" * ",a)).buildCSSText(di.kYes,pi.kNo,n)}return e===pi.kNo&&(n+=")"),n},a}(i),ea=new qi(0,"px"),na=(new qi(1,"px"),new qi(0,"deg")),ra=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}s(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}(n),ia=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,t=t.syntax;w.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:t})},aa=new Ii("unset"),e=new Ii("initial"),i=new Ii("inherit"),oa={"":aa,unset:aa,initial:e,inherit:i},sa=new ra(0,0,0,0,!0),ca=new ra(0,0,0,0),la=kn(function(t,e,n,r){return new ra(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),ua=kn(function(t,e){return void 0===e&&(e=g.kNumber),new qi(t,e)},function(t,e){return""+t+(e=void 0===e?g.kNumber:e)}),ha=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,fa=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,da=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,pa=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var ga={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},ya=kn(function(t){t="angular"===t.type?Number(t.value):ga[t.value]||0;return ua(t,"deg")}),ma=kn(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:ua(n,i),cy:ua(r,a)}}),va=kn(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return Ns(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!=(f=r[i-1].length)?f:{type:"%",value:"100"},1<i&&(r[0].length=null!=(f=r[0].length)?f:{type:"%",value:"0"}),0),o=Number(r[0].length.value),s=1;s<i;s++){var c,l=null==(c=r[s].length)?void 0:c.value;if(!_(l)&&!_(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:""+(o+(Number(l)-o)*u/(s-a))};a=s,o=Number(l)}}var h,f=t.map(function(t){return{offset:ua(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 Fi(Ni.LinearGradient,{angle:n?ya(n):na,steps:f}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=ma(n[0].at)).cx,t=t.cy,n[0].style&&(h=(n=n[0].style).type,n=n.value,h="extent-keyword"===h?Ki(n):ua(n,h)),new Fi(Ni.RadialGradient,{cx:e,cy:t,size:h,steps:f})):void 0});var e=t[0];if("("===t[1]||"("===t[2])if("l"===e){var n=ha.exec(t);if(n)return r=(null==(r=n[2].match(pa))?void 0:r.map(function(t){return t.split(":")}))||[],[new Fi(Ni.LinearGradient,{angle:ua(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:ua(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=fa.exec(t);if(t)return t=(null==(t=t[4].match(pa))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:ua(50,"%"),cy:ua(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:ua(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!hn(n))return[new Fi(Ni.RadialGradient,n)]}else if("p"===e){var r=t;if(r=da.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}});function ba(t){return an(t)&&t.image}var xa=kn(function(t){var e;return ba(t)?ki({repetition:"repeat"},t):"transparent"===(t=_(t)?"":t)?ca:va(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=Un(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),la.apply(void 0,e))});function wa(t,e){if(t instanceof ra&&e instanceof ra)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(fn(e[n],0,255));return e[3]=fn(e[3],0,1),"rgba("+e.join(",")+")"}]}function ka(t,e){if(_(e))return ua(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return ua(Number(e),"px");if(0<="deg".search(t))return ua(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 ua(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var Ma=kn(function(t){return ka(new RegExp("px","g"),t)}),Ea=(kn(function(t){return ka(new RegExp("%","g"),t)}),kn(function(t){return dn(t)||isFinite(Number(t))?ua(Number(t),"px"):ka(new RegExp("px|%|em|rem","g"),t)})),Oa=kn(function(t){return ka(new RegExp("deg|rad|grad|turn","g"),t)});function Sa(t){var e=0;return t.unit===g.kDegrees?e=t.value:t.unit===g.kRadians?e=xs(Number(t.value)):t.unit===g.kTurns&&(e=360*Number(t.value)),e}function _a(t){return hn(t)?t.split(" ").map(function(t){return Ea(t)}):t.map(function(t){return Ea(t.toString())})}function Aa(t,e,n){var r;return t.unit===g.kPixels?Number(t.value):t.unit===g.kPercentage&&n?(n=n.nodeName===M.GROUP?n.getLocalBounds():n.getGeometryBounds(),r=0,$r.isEmpty(n)||(r=2*n.halfExtents[e]),Number(t.value)/100*r):0}var Ta=function(t){return ka(/deg|rad|grad|turn|px|%/g,t)},Pa=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function La(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<Pa.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return Ta(t)||xa(t)})}),n.lastIndex===t.length)return r}return[]}function Na(t){return t.toString()}var Ca=kn(function(t){return"number"==typeof t?ua(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?ua(Number(t)):ua(0)});function ja(t,e){return[t,e,Na]}function Ra(n,r){return function(t,e){return[t,e,function(t){return Na(fn(t,n,r))}]}}function Fa(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}kn(function(t){return(hn(t)?t.split(" "):t).map(Ca)});var Ia=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=Be(e)}catch(t){n=Be(""),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 c=t[s],l=(r=t[s+1],c[0]),u={command:l,prePoint:n,params:c,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(l){case"M":i=[c[1],c[2]],a=s;break;case"A":var h=function(t,e){var n=e[1],r=e[2],i=pn(bs(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],c=t[1],l=e[6],e=e[7],u=Math.cos(i)*(s-l)/2+Math.sin(i)*(c-e)/2,h=-1*Math.sin(i)*(s-l)/2+Math.cos(i)*(c-e)/2,f=u*u/(n*n)+h*h/(r*r);1<f&&(n*=Math.sqrt(f),r*=Math.sqrt(f));f=n*n*(h*h)+r*r*(u*u),f=f?Math.sqrt((n*n*(r*r)-f)/f):1;a===o&&(f*=-1);isNaN(f)&&(f=0);var d=r?f*n*h/r:0,f=n?f*-r*u/n:0,s=(s+l)/2+Math.cos(i)*d-Math.sin(i)*f,c=(c+e)/2+Math.sin(i)*d+Math.cos(i)*f,p=[(u-d)/n,(h-f)/r],u=[(-1*u-d)/n,(-1*h-f)/r],d=cc([1,0],p),h=cc(p,u);sc(p,u)<=-1&&(h=Math.PI);1<=sc(p,u)&&(h=0);0===o&&0<h&&(h-=2*Math.PI);1===o&&h<0&&(h+=2*Math.PI);return{cx:s,cy:c,rx:tc(t,[l,e])?0:n,ry:tc(t,[l,e])?0:r,startAngle:d,endAngle:d+h,xRotation:i,arcFlag:a,sweepFlag:o}}(n,c);u.arcParams=h}"Z"===l?(n=i,r=t[a+1]):(v=c.length,n=[c[v-2],c[v-1]]),r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&tc(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var f,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(l)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===l?(f=[c[1],c[2]],u.startTangent=[b[0]-f[0],b[1]-f[1]],u.endTangent=[n[0]-f[0],n[1]-f[1]]):"T"===l?(d=nc((f=e[s-1]).currentPoint,b),"Q"===f.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"===l?(d=[c[1],c[2]],p=[c[3],c[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"===l?(g=nc((p=e[s-1]).currentPoint,b),y=[c[1],c[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"===l&&(g=ac(u,0),b=g.x,y=g.y,l=ac(u,1,!1),m=l.x,l=l.y,u.startTangent=[b,y],u.endTangent=[m,l]),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,c=o.params,l=o.prePoint,u=void 0;switch(o.command){case"Q":u=gr.box(l[0],l[1],c[1],c[2],c[3],c[4]);break;case"C":u=wr.box(l[0],l[1],c[1],c[2],c[3],c[4],c[5],c[6]);break;case"A":var h=o.arcParams;u=Ar.box(h.cx,h.cy,h.rx,h.ry,h.xRotation,h.startAngle,h.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 f=un(n),d=un(r),p=ln(n),g=ln(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]===f?(b=ec(m,e),f-=b.xExtra):v[0]===p&&(b=ec(m,e),p+=b.xExtra),v[1]===d?(b=ec(m,e),d-=b.yExtra):v[1]===g&&(b=ec(m,e),g+=b.yExtra)}return{x:f,y:d,width:p-f,height:g-d}}(i,0),o=a.x,s=a.y,c=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(c)?c:0,height:Number.isFinite(a)?a:0}}},Ba=kn(Ia);function Da(t,e){t=(hn(t)?Ba:Ia)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function Ga(t,e,n){var r,i,a,o,s,c,l,u,h,f=t.curve,d=e.curve,t=(f&&0!==f.length||(f=He(t.absolutePath,!1),t.curve=f),d&&0!==d.length||(d=He(e.absolutePath,!1),e.curve=d),[f,d]),f=Ze((t=f.length!==d.length?function t(e,n,r){var i,e=Je(e),n=Je(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,c=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,c=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/c||0,l=r||Math.max(a,o),u=[s,c],h=[l-a,l-o],r=[e,n].map(function(t,n){return t.l===l?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&h[n]&&t.l>=u[n],h[n]-=i?1:0,i?t.ss:[t.s]}).flat()});return r[0].length===r[1].length?r:t(r[0],r[1],l)}(f,d):t)[0])!==Ze(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))}))):we(t[0]);return[f,(i=t[1],a=f,l=i.length-1,u=[],h=0,s=(o=i).length,c=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-=c),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){h+=We(i[(n+e)%l].slice(-2),a[e%l].slice(-2))}),u[n]=h,h=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function za(t,e){var n,r,i=hn(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=Nr.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=cr.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]}))),c=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=c),{points:i,totalLength:s,segments:a}}var Wa=null;function Va(t){return function(e){var n=0;return t.map(function(t){return t===Wa?e[n++]:t})}}function Ya(t){return t}var Ha={matrix:["NNNNNN",[Wa,Wa,0,0,Wa,Wa,0,0,0,0,1,0,Wa,Wa,0,1],Ya],matrix3d:["NNNNNNNNNNNNNNNN",Ya],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Va([Wa,Wa,new qi(1)]),Ya],scalex:["N",Va([Wa,new qi(1),new qi(1)]),Va([Wa,new qi(1)])],scaley:["N",Va([new qi(1),Wa,new qi(1)]),Va([new qi(1),Wa])],scalez:["N",Va([new qi(1),new qi(1),Wa])],scale3d:["NNN",Ya],skew:["Aa",null,Ya],skewx:["A",null,Va([Wa,na])],skewy:["A",null,Va([na,Wa])],translate:["Tt",Va([Wa,Wa,ea]),Ya],translatex:["T",Va([Wa,ea,ea]),Va([Wa,ea])],translatey:["T",Va([ea,Wa,ea]),Va([ea,Wa])],translatez:["L",Va([ea,ea,Wa])],translate3d:["TTL",Ya]};function qa(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=Ha[a];if(!o)return[];var s=e[2].split(","),c=o[0];if(c.length<s.length)return[];for(var l=[],u=0;u<c.length;u++){var h=s[u],f=c[u],d=void 0;if(void 0===(d=h?{A:function(t){return"0"===t.trim()?na:Oa(t)},N:Ca,T:Ea,L:Ma}[f.toUpperCase()](h):{a:na,n:l[0],t:ea}[f]))return[];l.push(d)}if(r.push({t:a,d:l}),n.lastIndex===t.length)return r}return[]}function Ua(t){switch(t.t){case"rotatex":return i=bs(Sa(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=bs(Sa(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=bs(Sa(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=bs(Sa(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=bs(Sa(t.d[0])),a=bs(Sa(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=bs(Sa(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=bs(Sa(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=Aa(t.d[0],0,null)||0,n=Aa(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Aa(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=Aa(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=Aa(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=Aa(t.d[0],0,null)||0,n=Aa(t.d[1],0,null)||0,r=Aa(t.d[2],0,null)||0,1];case"perspective":a=Aa(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 Xa(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 $a(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}(Ms,t))return;if(ft(Es,Ms),Es[3]=0,Es[7]=0,Es[11]=0,Es[15]=1,Math.abs(mt(Es))<1e-8)return;var t=Ms[3],o=Ms[7],s=Ms[11],c=Ms[12],l=Ms[13],u=Ms[14],h=Ms[15];if(0!==t||0!==o||0!==s){if(Os[0]=t,Os[1]=o,Os[2]=s,Os[3]=h,!yt(Es,Es))return;gt(Es,Es),ee(i,Os,Es)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=c,e[1]=l,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,Ms),n[0]=Bt(d[0]),Yt(d[0],d[0]),r[0]=Ht(d[0],d[1]),_s(d[1],d[1],d[0],1,-r[0]),n[1]=Bt(d[1]),Yt(d[1],d[1]),r[0]/=n[1],r[1]=Ht(d[0],d[2]),_s(d[2],d[2],d[0],1,-r[1]),r[2]=Ht(d[1],d[2]),_s(d[2],d[2],d[1],1,-r[2]),n[2]=Bt(d[2]),Yt(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],qt(Ss,d[1],d[2]),Ht(d[0],Ss)<0)for(var f=0;f<3;f++)n[f]*=-1,d[f][0]*=-1,d[f][1]*=-1,d[f][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(Ua).reduce(Xa),e,n,r,i,a),[[e,n,r,a,i]]}var Ka=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 c=0;c<3;c++)a[3][s]+=t[c]*a[c][s];var l=r[0],u=r[1],h=r[2],r=r[3],f=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],h=(f[0][0]=1-2*(u*u+h*h),f[0][1]=2*(l*u-h*r),f[0][2]=2*(l*h+u*r),f[1][0]=2*(l*u+h*r),f[1][1]=1-2*(l*l+h*h),f[1][2]=2*(u*h-l*r),f[2][0]=2*(l*h-u*r),f[2][1]=2*(u*h+l*r),f[2][2]=1-2*(l*l+u*u),a=Za(a,f),[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);n[2]&&(h[2][1]=n[2],a=Za(a,h)),n[1]&&(h[2][1]=0,h[2][0]=n[0],a=Za(a,h)),n[0]&&(h[2][0]=0,h[1][0]=n[0],a=Za(a,h));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 Za(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 Ja(t){return t.toFixed(6).replace(".000000","")}function Qa(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=$a(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=$a(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=fn(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 Ka(t[0],t[1],t[2],e,t[4]).map(Ja).join(",")}])}function to(t){return t.replace(/[xy]/,"")}function eo(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var no=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function ro(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?ua(n):ua(n,t.unit)})})}(n)}var a=[],o=[],s=[];if(r.length!==i.length)var c=Qa(r,i),a=[c[0]],o=[c[1]],s=[["matrix",[c[2]]]];else for(var l=0;l<r.length;l++){var u=r[l].t,h=i[l].t,f=r[l].d,d=i[l].d,p=Ha[u],g=Ha[h],y=void 0;if(no(u,h)){var m=Qa([r[l]],[i[l]]);a.push(m[0]),o.push(m[1]),s.push(["matrix",[m[2]]])}else{if(u===h)y=u;else if(p[2]&&g[2]&&to(u)===to(h))y=to(u),f=p[2](f),d=g[2](d);else{if(!p[1]||!g[1]||eo(u)!==eo(h)){m=Qa(r,i);a=[m[0]],o=[m[1]],s=[["matrix",[m[2]]]];break}y=eo(u),f=p[1](f),d=g[1](d)}for(var v=[],b=[],x=[],w=0;w<f.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,c=Hi(t.unit),l=t.convertTo(c),c=e.convertTo(c);return l&&c?(o=l.value,s=c.value,a=Pi(t.unit)):(qi.isLength(t.unit)||qi.isLength(e.unit))&&(o=Aa(t,i,n),s=Aa(e,i,n),a="px"),[o,s,function(t){return(t=r?Math.max(t,0):t)+a}]}(f[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&&(c=a,a=o,o=c),[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 io=kn(function(t){var e;return hn(t)?"text-anchor"===t?[ua(0,"px"),ua(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:[Ea(ao(e[0])),Ea(ao(e[1]))]):[ua(t[0]||0,"px"),ua(t[1]||0,"px")]});function ao(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var n=function(){function t(){this.parser=Oa,this.mixer=ja}return t.prototype.calculator=function(t,e,n,r){return Sa(n)},t}(),e=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ii&&(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}(),i=function(){function t(){this.parser=xa,this.mixer=wa}return t.prototype.calculator=function(t,e,n,r){return n instanceof Ii?"none"===n.value?sa:ca:n},t}(),oo=function(){function t(){this.parser=La}return t.prototype.calculator=function(t,e,n){return n instanceof Ii?[]:n},t}();function so(t){t=t.parsedStyle.fontSize;return _(t)?null:t}function co(){this.parser=io}var lo,y,uo=function(){function t(){this.parser=Ea,this.mixer=ja}return t.prototype.calculator=function(t,e,n,r,i){if(!qi.isRelativeUnit(n.unit))return n.value;if(n.unit===g.kPercentage)return 0;if(n.unit===g.kEms){if(r.parentNode){var a=so(r.parentNode);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}if(n.unit===g.kRems){if(null!=r&&null!=(a=r.ownerDocument)&&a.documentElement){a=so(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),ho=function(){function t(){this.mixer=Fa}var e=t.prototype;return e.parser=function(t){t=_a(dn(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}(),fo=function(){function t(){this.mixer=Fa}var e=t.prototype;return e.parser=function(t){t=_a(dn(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}(),po=function(t){function e(){return t.apply(this,arguments)||this}return s(e,t),e.prototype.postProcessor=function(t){var e,n,r;switch(t.nodeName){case M.CIRCLE:case M.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;_(a)||(c=a),_(i)||(l=i);break;case M.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,c=Math.min(i,o),l=Math.min(s,a),u=0;break;case M.RECT:case M.IMAGE:case M.GROUP:case M.HTML:case M.TEXT:case M.MESH:_(t.parsedStyle.x)||(c=t.parsedStyle.x),_(t.parsedStyle.y)||(l=t.parsedStyle.y)}t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&t.nodeName!==M.POLYGON&&(t.parsedStyle.defX=c||0,t.parsedStyle.defY=l||0),_(c)&&_(l)&&_(u)||(e=(r=t.getLocalPosition())[0],n=r[1],r=r[2],t.setLocalPosition(_(c)?e:c,_(l)?n:l,_(u)?r:u))},e}(uo),go=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof Ii?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),yo=function(){function t(){this.mixer=ja,this.parser=Ca}return t.prototype.calculator=function(t,e,n){return n.value},t}(),mo=function(){function t(){this.parser=Ca,this.mixer=Ra(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)!==M.LINE&&e!==M.PATH&&e!==M.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),vo=function(){function t(){this.parser=Ca,this.mixer=Ra(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),bo=function(){function t(){this.parser=Da,this.mixer=Ga}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof Ii&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Qr(0,0,0,0)}:n},e.postProcessor=function(t){var e,n;t.nodeName===M.PATH&&(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(void 0===e?0:e,void 0===n?0:n))},t}(),xo=function(){function t(){this.parser=za}return t.prototype.postProcessor=function(t){var e,n;t.nodeName!==M.POLYGON&&t.nodeName!==M.POLYLINE||(e=(n=t.parsedStyle).defX,n=n.defY,t.setLocalPosition(e,n))},t}(),wo=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=Ra(0,1/0),t}return s(t,i),t}(uo),ko=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ii?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),a=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}(),Mo=function(){function t(){this.parser=qa,this.mixer=ro}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Ii?[]:n},e.postProcessor=function(t){Ts(t.parsedStyle.transform,t)},t}(),Eo=function(){function t(){this.parser=Ca}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}(),Oo=function(){function t(){this.registry={},this.define(M.CIRCLE,Ho),this.define(M.ELLIPSE,Jo),this.define(M.RECT,ps),this.define(M.IMAGE,is),this.define(M.LINE,os),this.define(M.GROUP,ts),this.define(M.PATH,cs),this.define(M.POLYGON,us),this.define(M.POLYLINE,fs),this.define(M.TEXT,ys),this.define(M.HTML,ns)}var e=t.prototype;return e.define=function(t,e){this.registry[t]=e},e.get=function(t){return this.registry[t]},t}(),So=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 Jr,this.page=new Jr,this.canvas=new Jr,this.viewport=new Jr,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(gi)},wi(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}(),_o=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(Oi(n),e),n}return s(t,r),t}(So),Ao=function(){function t(){this.emitter=new Br}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=yn(n)&&n||an(n)&&n.capture,n=an(n)&&n.once,s=ri(e)?void 0:e,c=!1,l="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],l=i,c=!0),t=o?t+"capture":t,e=ri(e)?e:e.handleEvent,c&&(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)===l&&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=yn(n)&&n||an(n)&&n.capture,i=ri(e)?void 0:e;return e=ri(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 _o(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!(t instanceof So))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}(),To=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}s(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(gi)},t.lookupNamespaceURI=function(t){throw new Error(gi)},t.lookupPrefix=function(t){throw new Error(gi)},t.normalize=function(){throw new Error(gi)},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 c=o.length-s.length,l=s.length-1;0<=l;l--){var u,h=s[l],f=o[c+l];if(f!==h)return(u=h.parentNode.childNodes).indexOf(h)<u.indexOf(f)?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)})},wi(d,[{key:"textContent",get:function(){var t="";this.nodeName===M.TEXT&&(t+=this.style.text);for(var e=_i(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===M.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===M.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}(Ao),Po=(To.DOCUMENT_POSITION_DISCONNECTED=1,To.DOCUMENT_POSITION_PRECEDING=2,To.DOCUMENT_POSITION_FOLLOWING=4,To.DOCUMENT_POSITION_CONTAINS=8,To.DOCUMENT_POSITION_CONTAINED_BY=16,To.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32,function(e){function t(){var t=e.call(this)||this;t.defaultView=null,t.documentElement=void 0,t.timeline=void 0,t.ownerDocument=null,t.nodeName="document";try{t.timeline=new w.AnimationTimeline(Oi(t))}catch(t){}var r={};return Bc.forEach(function(t){var e=t.n,n=t.inh,t=t.d;n&&t&&(r[e]=ri(t)?t(M.GROUP):t)}),t.documentElement=new ts({id:"g-root",style:r}),t.documentElement.ownerDocument=Oi(t),t.documentElement.parentNode=Oi(t),t.childNodes=[t.documentElement],t}s(t,e);var n=t.prototype;return n.createElement=function(t,e){var n;return"svg"===t?this.documentElement:((n=this.defaultView.customElements.get(t))||(console.warn("Unsupported tagName: ",t),n="tspan"===t?ys:ts),(t=new n(e)).ownerDocument=this,t)},n.createElementNS=function(t,e,n){return this.createElement(e,n)},n.cloneNode=function(t){throw new Error(gi)},n.destroy=function(){try{this.documentElement.destroy(),this.timeline.destroy()}catch(t){}},n.elementsFromBBox=function(t,e,n,r){var t=this.defaultView.context.rBushRoot.search({minX:t,minY:e,maxX:n,maxY:r}),i=[];return t.forEach(function(t){var t=t.id,t=w.displayObjectPool.getByEntity(t),e=t.parsedStyle.pointerEvents,e=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(e);e&&!t.isVisible()||t.isCulled()||!t.isInteractive()||i.push(t)}),i.sort(function(t,e){return e.sortable.renderOrder-t.sortable.renderOrder}),i},n.elementFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,n=n.y,i=this.defaultView.getConfig(),a=i.width,i=i.height;return r<0||n<0||a<r||i<n?null:(i=(a=this.defaultView.viewport2Client({x:r,y:n})).x,a=a.y,(t=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:t,y:e,viewportX:r,viewportY:n,clientX:i,clientY:a},picked:[]}).picked)&&t[0]||this.documentElement)},n.elementFromPoint=function(){var n=bi(E().mark(function t(e,n){var r,i,a,o,s,c;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,o=this.defaultView.getConfig(),a=o.width,o=o.height,r<0||i<0||a<r||o<i)return t.abrupt("return",null);t.next=4;break;case 4:return a=this.defaultView.viewport2Client({x:r,y:i}),o=a.x,s=a.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:o,clientY:s},picked:[]});case 7:return s=t.sent,c=s.picked,t.abrupt("return",c&&c[0]||this.documentElement);case 10:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.elementsFromPointSync=function(t,e){var n=this.defaultView.canvas2Viewport({x:t,y:e}),r=n.x,n=n.y,i=this.defaultView.getConfig(),a=i.width,i=i.height;return r<0||n<0||a<r||i<n?[]:(i=(a=this.defaultView.viewport2Client({x:r,y:n})).x,a=a.y,(t=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:t,y:e,viewportX:r,viewportY:n,clientX:i,clientY:a},picked:[]}).picked)[t.length-1]!==this.documentElement&&t.push(this.documentElement),t)},n.elementsFromPoint=function(){var n=bi(E().mark(function t(e,n){var r,i,a,o,s,c;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(i=this.defaultView.canvas2Viewport({x:e,y:n}),r=i.x,i=i.y,o=this.defaultView.getConfig(),a=o.width,o=o.height,r<0||i<0||a<r||o<i)return t.abrupt("return",[]);t.next=4;break;case 4:return a=this.defaultView.viewport2Client({x:r,y:i}),o=a.x,s=a.y,t.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:e,y:n,viewportX:r,viewportY:i,clientX:o,clientY:s},picked:[]});case 7:return s=t.sent,(c=s.picked)[c.length-1]!==this.documentElement&&c.push(this.documentElement),t.abrupt("return",c);case 11:case"end":return t.stop()}},t,this)}));return function(t,e){return n.apply(this,arguments)}}(),n.appendChild=function(t,e){throw new Error(yi)},n.insertBefore=function(t,e){throw new Error(yi)},n.removeChild=function(t,e){throw new Error(yi)},n.replaceChild=function(t,e,n){throw new Error(yi)},n.append=function(){throw new Error(yi)},n.prepend=function(){throw new Error(yi)},n.getElementById=function(t){return this.documentElement.getElementById(t)},n.getElementsByName=function(t){return this.documentElement.getElementsByName(t)},n.getElementsByTagName=function(t){return this.documentElement.getElementsByTagName(t)},n.getElementsByClassName=function(t){return this.documentElement.getElementsByClassName(t)},n.querySelector=function(t){return this.documentElement.querySelector(t)},n.querySelectorAll=function(t){return this.documentElement.querySelectorAll(t)},n.find=function(t){return this.documentElement.find(t)},n.findAll=function(t){return this.documentElement.findAll(t)},wi(t,[{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}}]),t}(To)),Lo=(lo=lo||{},lo[lo.Standard=0]="Standard",(Ko=y=y||{}).DESTROY="destroy",Ko.ATTR_MODIFIED="DOMAttrModified",Ko.INSERTED="DOMNodeInserted",Ko.REMOVED="removed",Ko.MOUNTED="DOMNodeInsertedIntoDocument",Ko.UNMOUNTED="DOMNodeRemovedFromDocument",Ko.BOUNDS_CHANGED="bounds-changed",Ko.RENDER_ORDER_CHANGED="render-order-changed",Ko.CULLED="culled",function(l){function t(t,e,n,r,i,a,o,s){var c=l.call(this,null)||this;return c.relatedNode=void 0,c.prevValue=void 0,c.newValue=void 0,c.attrName=void 0,c.attrChange=void 0,c.prevParsedValue=void 0,c.newParsedValue=void 0,c.relatedNode=e,c.prevValue=n,c.newValue=r,c.attrName=i,c.attrChange=a,c.prevParsedValue=o,c.newParsedValue=s,c.type=t,c}return s(t,l),t}(So)),No=(Lo.ADDITION=2,Lo.MODIFICATION=1,Lo.REMOVAL=3,0),Co=new Lo(y.INSERTED,null,"","","",0,"",""),jo=new Lo(y.REMOVED,null,"","","",0,"",""),Ro=new _o(y.DESTROY),Fo=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=No++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:lo.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:k(0,0,0),localRotation:se(0,0,0,1),localScale:k(1,1,1),localTransform:ut(),localSkew:he(0,0),position:k(0,0,0),rotation:se(0,0,0,1),scaling:k(1,1,1),worldTransform:ut(),origin:k(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:aa,opacity:aa,fillOpacity:aa,strokeOpacity:aa,fill:aa,stroke:aa,transform:aa,transformOrigin:aa,visibility:aa,pointerEvents:aa,lineWidth:aa,lineCap:aa,lineJoin:aa,increasedLineWidthForHitTesting:aa,fontSize:aa,fontFamily:aa,fontStyle:aa,fontWeight:aa,fontVariant:aa,textAlign:aa,textBaseline:aa,textTransform:aa,zIndex:aa,filter:aa,shadowType:aa},t.parsedStyle={},t.attributes={},t}s(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(gi)},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),Co.relatedNode=this,t.dispatchEvent(Co),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 jo.relatedNode=this,t.dispatchEvent(jo),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(Ro),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=ai(t),e=this.attributes[t],_(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(gi)},e.getAttributeNode=function(t){throw new Error(gi)},e.getAttributeNodeNS=function(t,e){throw new Error(gi)},e.hasAttributeNS=function(t,e){throw new Error(gi)},e.removeAttributeNS=function(t,e){throw new Error(gi)},e.removeAttributeNode=function(t){throw new Error(gi)},e.setAttributeNS=function(t,e,n){throw new Error(gi)},e.setAttributeNode=function(t){throw new Error(gi)},e.setAttributeNodeNS=function(t){throw new Error(gi)},e.toggleAttribute=function(t,e){throw new Error(gi)},wi(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}(To),Io=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).altKey=void 0,t.button=void 0,t.buttons=void 0,t.ctrlKey=void 0,t.metaKey=void 0,t.relatedTarget=void 0,t.shiftKey=void 0,t.client=new Jr,t.movement=new Jr,t.offset=new Jr,t.global=new Jr,t.screen=new Jr,t}s(t,i);var e=t.prototype;return e.getModifierState=function(t){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(t)},e.initMouseEvent=function(){throw new Error(gi)},wi(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}}]),t}(So),Bo=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).pointerId=void 0,t.width=0,t.height=0,t.isPrimary=!1,t.pointerType=void 0,t.pressure=void 0,t.tangentialPressure=void 0,t.tiltX=void 0,t.tiltY=void 0,t.twist=void 0,t}s(t,i);var e=t.prototype;return e.getCoalescedEvents=function(){return"pointermove"===this.type||"mousemove"===this.type||"touchmove"===this.type?[this]:[]},e.getPredictedEvents=function(){throw new Error("getPredictedEvents is not supported!")},e.clone=function(){return this.manager.clonePointerEvent(this)},t}(Io),Do=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).deltaMode=void 0,t.deltaX=void 0,t.deltaY=void 0,t.deltaZ=void 0,t.DOM_DELTA_LINE=0,t.DOM_DELTA_PAGE=1,t.DOM_DELTA_PIXEL=2,t}return s(t,i),t.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},t}(Io),Go=new Lo(y.ATTR_MODIFIED,null,null,null,null,Lo.MODIFICATION,null,null),zo={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:""},Wo={anchor:[0,0],fill:sa,stroke:sa,transform:[],zIndex:0,filter:[],shadowType:"outer"},Vo=["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting","fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"],N=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||M.GROUP,r.config.style=ki({},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,Wo,r.config.initialParsedStyle),Object.assign(r.attributes,zo),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,Oi(r)),r}s(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=ki({},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:Vo}),e.dirty=!0},t.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=ai(t);mn(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&&(Go.relatedNode=this,Go.prevValue=i,Go.newValue=e,Go.attrName=t,Go.prevParsedValue=a,Go.newParsedValue=o,this.isMutationObserved?this.dispatchEvent(Go):(Go.target=this).ownerDocument.defaultView.dispatchEvent(Go,!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 Qr(n,e,r-n,t-e)},t.setOrigin=function(t,e,n){return w.sceneGraphService.setOrigin(this,vs(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,vs(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,vs(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,vs(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,vs(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=vs(t,e=e||t,n=n||t)),w.sceneGraphService.scaleLocal(this,t),this},t.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=vs(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 xs(ws(m(),w.sceneGraphService.getWorldTransform(this))[2])},t.getLocalEulerAngles=function(){return xs(ws(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 _(e)&&_(n)?w.sceneGraphService.rotateLocal(this,0,0,t):w.sceneGraphService.rotateLocal(this,t,e,n),this},t.rotate=function(t,e,n){return _(e)&&_(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?an(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=St(m(),t),n=e[0],e=e[1],r=_t(m(),t),i=r[0],r=r[1],t=At(ne(),t),t=ws(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,c=0,e=-e*a,a=i*r,i=0,r=t,t=n,n=1,l=new st(9);return l[0]=o,l[1]=s,l[2]=c,l[3]=e,l[4]=a,l[5]=i,l[6]=r,l[7]=t,l[8]=n,l},t.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},t.setMatrix=function(t){var t=ks(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=ks(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},wi(o,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),o}(Fo),Yo=["style"],Ho=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,Yo);return n.call(this,ki({type:M.CIRCLE,style:ki({cx:"",cy:"",r:""},e),initialParsedStyle:{anchor:[.5,.5]}},t))||this}return s(t,n),t}(N),qo=["style"],Uo=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,qo),e=n.call(this,ki({style:ki({x:"",y:""},e)},t))||this;return e.isCustomElement=!0,e}return s(t,n),t}(N),Xo={},$o=[],Ko=function(){function t(){}var e=t.prototype;return e.getByEntity=function(t){return Xo[t]},e.getAll=function(){return Object.keys(Xo).map(function(t){return Xo[t]})},e.add=function(t,e){(Xo[t]=e).nodeName===M.HTML&&$o.push(e)},e.remove=function(t){var e=Xo[t];e&&(delete Xo[t],e.nodeName===M.HTML)&&(t=$o.indexOf(e),$o.splice(t,1))},e.getHTMLs=function(){return $o},t}(),Zo=["style"],Jo=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,Zo);return n.call(this,ki({type:M.ELLIPSE,style:ki({cx:"",cy:"",rx:"",ry:""},e),initialParsedStyle:{anchor:[.5,.5]}},t))||this}return s(t,n),t}(N),Qo=["style"],ts=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,Qo);return n.call(this,ki({type:M.GROUP,style:ki({x:"",y:"",width:"",height:""},e)},t))||this}return s(t,n),t}(N),es=["style"],ns=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,es),e=n.call(this,ki({type:M.HTML,style:ki({x:"",y:"",width:"auto",height:"auto",innerHTML:""},e)},t))||this;return e.cullable.enable=!1,e}s(t,n);var e=t.prototype;return e.getDomElement=function(){return this.parsedStyle.$el},e.getBoundingClientRect=function(){return this.parsedStyle.$el.getBoundingClientRect()},e.getClientRects=function(){return[this.getBoundingClientRect()]},e.getBounds=function(){var t,e,n=this.getBoundingClientRect(),r=null==(r=this.ownerDocument)||null==(r=r.defaultView)?void 0:r.getContextService().getBoundingClientRect();return r?(t=n.left-r.left,r=n.top-r.top,(e=new $r).setMinMax(k(t,r,0),k(t+n.width,r+n.height,0)),e):null},e.getLocalBounds=function(){if(this.parentNode){var t,e=yt(ut(),this.parentNode.getWorldTransform()),n=this.getBounds();if(!$r.isEmpty(n))return(t=new $r).setFromTransformedAABB(n,e),t}return this.getBounds()},t}(N),rs=["style"],is=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,rs);return n.call(this,ki({type:M.IMAGE,style:ki({x:"",y:"",img:"",width:"",height:""},e)},t))||this}return s(t,n),t}(N),as=["style"],os=function(r){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,as),e=r.call(this,ki({type:M.LINE,style:ki({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0,isBillboard:!1},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.parsedStyle),n=t.markerStart,t=t.markerEnd;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&(e.markerEndAngle=t.getLocalEulerAngles(),e.appendChild(t)),e.transformMarker(!0),e.transformMarker(!1),e}s(t,r);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"x1"===t||"y1"===t||"x2"===t||"y2"===t||"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i)&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))},e.transformMarker=function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,c=o.markerEnd,l=o.markerStartOffset,u=o.markerEndOffset,h=o.x1,f=o.x2,d=o.y1,p=o.y2,g=o.defX,o=o.defY,s=t?s:c;s&&s instanceof N&&(c=0,t=t?(r=h-g,i=d-o,e=f-h,n=p-d,a=l||0,this.markerStartAngle):(r=f-g,i=p-o,e=h-f,n=d-p,a=u||0,this.markerEndAngle),c=Math.atan2(n,e),s.setLocalEulerAngles(180*c/Math.PI+t),s.setLocalPosition(r+Math.cos(c)*a,i+Math.sin(c)*a))},e.getPoint=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.x1,i=n.y1,a=n.x2,o=n.y2,s=n.defX,n=n.defY,r=cr.pointAt(r,i,a,o,t),i=r.x,a=r.y,o=Xt(m(),k(i-s,a-n,0),e?this.getWorldTransform():this.getLocalTransform());return new Jr(o[0],o[1])},e.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.getTotalLength=function(){var t=this.parsedStyle,e=t.x1,n=t.y1,r=t.x2,t=t.y2;return cr.length(e,n,r,t)},t}(N),ss=["style"],cs=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,ss),e=i.call(this,ki({type:M.PATH,style:ki({path:"",miterLimit:""},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&e.placeMarkerMid(t),r&&r instanceof N&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}s(t,i);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"path"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,c=o.markerEnd,l=o.markerStartOffset,u=o.markerEndOffset,h=o.defX,o=o.defY,s=t?s:c;s&&s instanceof N&&(c=0,h=t?(i=(t=this.getStartTangent())[0],e=(t=t[1])[0]-h,n=t[1]-o,r=i[0]-t[0],i=i[1]-t[1],a=l||0,this.markerStartAngle):(l=(t=this.getEndTangent())[0],e=(t=t[1])[0]-h,n=t[1]-o,r=l[0]-t[0],i=l[1]-t[1],a=u||0,this.markerEndAngle),c=Math.atan2(i,r),s.setLocalEulerAngles(180*c/Math.PI+h),s.setLocalPosition(e+Math.cos(c)*a,n+Math.sin(c)*a))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.path.segments,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),t&&t instanceof N)for(var a=1;a<n.length-1;a++){var o=n[a].currentPoint,s=o[0],o=o[1],c=1===a?t:t.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(s-r,o-i)}},e.getTotalLength=function(){return Qs(this)},e.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,n=Ke(n.path.absolutePath,t,v(v({},a),{bbox:!1,length:!0})).point,t=n.x,a=n.y,n=Xt(m(),k(t-r,a-i,0),e?this.getWorldTransform():this.getLocalTransform());return new Jr(n[0],n[1])},e.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*Qs(this),e)},e.getStartTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=[];return 1<n.length&&(t=n[0].currentPoint,e=n[1].currentPoint,r=[],(n=n[1].startTangent)?r.push([t[0]-n[0],t[1]-n[1]]):r.push([e[0],e[1]]),r.push([t[0],t[1]])),r},e.getEndTangent=function(){var t,e,n=this.parsedStyle.path.segments,r=n.length,i=[];return 1<r&&(t=n[r-2].currentPoint,e=n[r-1].currentPoint,i=[],(n=n[r-1].endTangent)?i.push([e[0]-n[0],e[1]-n[1]]):i.push([t[0],t[1]]),i.push([e[0],e[1]])),i},t}(N),ls=["style"],us=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,ls),e=i.call(this,ki({type:M.POLYGON,style:ki({points:"",miterLimit:"",isClosed:!0},e)},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&n instanceof N&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&t instanceof N&&e.placeMarkerMid(t),r&&r instanceof N&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}s(t,i);var e=t.prototype;return e.attributeChangedCallback=function(t,e,n,r,i){"points"===t?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):"markerStartOffset"===t||"markerEndOffset"===t?(this.transformMarker(!0),this.transformMarker(!1)):"markerStart"===t?(r&&r instanceof N&&(this.markerStartAngle=0,r.remove()),i&&i instanceof N&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&r instanceof N&&(this.markerEndAngle=0,r.remove()),i&&i instanceof N&&(this.markerEndAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!1))):"markerMid"===t&&this.placeMarkerMid(i)},e.transformMarker=function(t){var e,n,r,i,a,o=this.parsedStyle,s=o.markerStart,c=o.markerEnd,l=o.markerStartOffset,u=o.markerEndOffset,h=o.points.points,f=o.defX,o=o.defY,s=t?s:c;s&&s instanceof N&&(i=h[c=0][0]-f,a=h[0][1]-o,l=t?(e=h[1][0]-h[0][0],n=h[1][1]-h[0][1],r=l||0,this.markerStartAngle):(t=h.length,n=this.style.isClosed?(e=h[t-1][0]-h[0][0],h[t-1][1]-h[0][1]):(i=h[t-1][0]-f,a=h[t-1][1]-o,e=h[t-2][0]-h[t-1][0],h[t-2][1]-h[t-1][1]),r=u||0,this.markerEndAngle),c=Math.atan2(n,e),s.setLocalEulerAngles(180*c/Math.PI+l),s.setLocalPosition(i+Math.cos(c)*r,a+Math.sin(c)*r))},e.placeMarkerMid=function(t){var e=this.parsedStyle,n=e.points.points,r=e.defX,i=e.defY;if(this.markerMidList.forEach(function(t){t.remove()}),this.markerMidList=[],t&&t instanceof N)for(var a=1;a<(this.style.isClosed?n.length:n.length-1);a++){var o=n[a][0]-r,s=n[a][1]-i,c=1===a?t:t.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(o,s)}},t}(N),hs=["style"],fs=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,hs);return n.call(this,ki({type:M.POLYLINE,style:ki({points:"",miterLimit:"",isClosed:!1},e)},t))||this}s(t,n);var e=t.prototype;return e.getTotalLength=function(){return this.parsedStyle.points.totalLength},e.getPointAtLength=function(t,e){return void 0===e&&(e=!1),this.getPoint(t/this.getTotalLength(),e)},e.getPoint=function(n,t){void 0===t&&(t=!1);var e=this.parsedStyle,r=e.defX,i=e.defY,e=e.points,a=e.points,e=e.segments,o=0,s=0,e=(e.forEach(function(t,e){n>=t[0]&&n<=t[1]&&(o=(n-t[0])/(t[1]-t[0]),s=e)}),cr.pointAt(a[s][0],a[s][1],a[s+1][0],a[s+1][1],o)),a=e.x,e=e.y,a=Xt(m(),k(a-r,e-i,0),t?this.getWorldTransform():this.getLocalTransform());return new Jr(a[0],a[1])},e.getStartTangent=function(){var t=this.parsedStyle.points.points,e=[];return e.push([t[1][0],t[1][1]]),e.push([t[0][0],t[0][1]]),e},e.getEndTangent=function(){var t=this.parsedStyle.points.points,e=t.length-1,n=[];return n.push([t[e-1][0],t[e-1][1]]),n.push([t[e][0],t[e][1]]),n},t}(us),ds=["style"],ps=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,ds);return n.call(this,ki({type:M.RECT,style:ki({x:"",y:"",width:"",height:"",radius:""},e)},t))||this}return s(t,n),t}(N),gs=["style"],ys=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Ei(t,gs);return n.call(this,ki({type:M.TEXT,style:ki({x:"",y:"",text:"",fontSize:"",fontFamily:"",fontStyle:"",fontWeight:"",fontVariant:"",textAlign:"",textBaseline:"",textTransform:"",fill:"black",letterSpacing:"",lineHeight:"",miterLimit:"",wordWrap:!1,wordWrapWidth:0,leading:0,dx:"",dy:""},e)},t))||this}s(t,n);var e=t.prototype;return e.getComputedTextLength=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.maxLineWidth)||0},e.getLineBoundingRects=function(){var t;return(null==(t=this.parsedStyle.metrics)?void 0:t.lineMetrics)||[]},e.isOverflowing=function(){return!!this.parsedStyle.isOverflowing},t}(N);function ms(t){return void 0===t?0:360<t||t<-360?t%360:t}function vs(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),dn(t)?k(t,e,n):Array.isArray(t)&&3===t.length?It(t):k(t[0],t[1]||e,t[2]||n)}function bs(t){return t*(Math.PI/180)}function xs(t){return t*(180/Math.PI)}function ws(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(l=_t(m(),r))[0],c=l[1],l=l[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/c,r[10]/l),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/c,r[5]/c)):(a=0,i=Math.atan2(r[4]/c,r[5]/c)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(l=e)[0],r=l[1],c=l[2],l=l[3],.499995*(n=s*s+(i=r*r)+(u=c*c)+(a=l*l))<(t=s*l-r*c)?(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*c-l*r)),o[1]=Math.atan2(2*(s*l+r*c),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+c*l),1-2*(i+u))),o);var n,r,i,a,o,s,c,l,u}function ks(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=xs(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var Ms=ut(),Es=ut(),Os=te(),d=[m(),m(),m()],Ss=m();function _s(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 As=ut();function Ts(t,c){var l,u;return t&&t.length&&(u=l=0,c?(l=c.parsedStyle.defX||0,u=c.parsedStyle.defY||0,c.resetLocalTransform(),c.setLocalPosition(l,u)):c=new N({}),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],c.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],c.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],c.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],c.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],c.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[ea,ea],c.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[ea],c.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[ea],c.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[ea],c.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[ea,ea,ea],c.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[na],c.rotateLocal(0,0,o[0].value)):"rotatex"===s?(o=t||[na],c.rotateLocal(o[0].value,0,0)):"rotatey"===s?(o=t||[na],c.rotateLocal(0,o[0].value,0)):"rotatez"===s?(o=t||[na],c.rotateLocal(0,0,o[0].value)):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],c.setLocalSkew(bs(o[0]),bs(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],c.setLocalSkew(bs(o[0]),c.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],c.setLocalSkew(c.getLocalSkew()[0],bs(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],c.setLocalTransform(dt(As,e,n,0,0,r,i,0,0,0,0,1,0,a+l,o+u,0,1))):"matrix3d"===s&&(dt.apply(Ft,[As].concat(t.map(function(t){return t.value}))),As[12]+=l,As[13]+=u,c.setLocalTransform(As)))})),c.getLocalTransform()}Ps={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]+\.?))/},Ls="";var Ps,Ls,Ns=function(t){return Ls=t,js()};function Cs(t){throw new Error(Ls+": "+t)}function js(){var t=Ys(Rs);return 0<Ls.length&&Cs("Invalid input not EOF"),t}function Rs(){return Fs("linear-gradient",Ps.linearGradient,Bs)||Fs("repeating-linear-gradient",Ps.repeatingLinearGradient,Bs)||Fs("radial-gradient",Ps.radialGradient,Ds)||Fs("repeating-radial-gradient",Ps.repeatingRadialGradient,Ds)||Fs("conic-gradient",Ps.conicGradient,Ds)}function Fs(n,t,r){return Is(t,function(t){var e=r();return e&&!Zs(Ps.comma)&&Cs("Missing comma before color stops"),{type:n,orientation:e,colorStops:Ys(Hs)}})}function Is(t,e){t=Zs(t);if(t)return Zs(Ps.startCall)||Cs("Missing ("),e=e(t),Zs(Ps.endCall)||Cs("Missing )"),e}function Bs(){return Ks("directional",Ps.sideOrCorner,1)||Ks("angular",Ps.angleValue,1)}function Ds(){var t,e,n=Gs();return n&&((t=[]).push(n),e=Ls,Zs(Ps.comma))&&((n=Gs())?t.push(n):Ls=e),t}function Gs(){var t,e=function(){var t=Ks("shape",/^(circle)/i,0);t&&(t.style=$s()||zs());return t}()||function(){var t=Ks("shape",/^(ellipse)/i,0);t&&(t.style=Us()||zs());return t}();return e?e.at=Ws():(t=zs())?(e=t,(t=Ws())&&(e.at=t)):(t=Vs())&&(e={type:"default-radial",at:t}),e}function zs(){return Ks("extent-keyword",Ps.extentKeywords,1)}function Ws(){var t;if(Ks("position",/^at/,0))return(t=Vs())||Cs("Missing positioning value"),t}function Vs(){var t={x:Us(),y:Us()};if(t.x||t.y)return{type:"position",value:t}}function Ys(t){var e=t(),n=[];if(e)for(n.push(e);Zs(Ps.comma);)(e=t())?n.push(e):Cs("One extra comma");return n}function Hs(){var t=Ks("hex",Ps.hexColor,1)||Is(Ps.rgbaColor,function(){return{type:"rgba",value:Ys(qs)}})||Is(Ps.rgbColor,function(){return{type:"rgb",value:Ys(qs)}})||Ks("literal",Ps.literalColor,0);return t||Cs("Expected color definition"),t.length=Us(),t}function qs(){return Zs(Ps.number)[1]}function Us(){return Ks("%",Ps.percentageValue,1)||Xs()||$s()}function Xs(){return Ks("position-keyword",Ps.positionKeywords,1)}function $s(){return Ks("px",Ps.pixelValue,1)||Ks("em",Ps.emValue,1)}function Ks(t,e,n){e=Zs(e);if(e)return{type:t,value:e[n]}}function Zs(t){var e=/^[\n\r\t\s]+/.exec(Ls),e=(e&&Js(e[0].length),t.exec(Ls));return e&&Js(e[0].length),e}function Js(t){Ls=Ls.substring(t)}function Qs(t){var e;return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=Ke(t.parsedStyle.path.absolutePath,void 0,v(v({},e),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function tc(t,e){return t[0]===e[0]&&t[1]===e[1]}function ec(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 nc(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}function rc(t,e,n,r,i,a,o,s){var c,l,u;return e=Math.abs(e),n=Math.abs(n),r=bs(r=pn(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,l=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*l,y:-Math.sin(r)*u+Math.cos(r)*l},1<(l=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(l)*e,n=Math.sqrt(l)*n),l=(l=(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:l,i=(i!==a?1:-1)*Math.sqrt(l),l=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*l-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*l+Math.cos(r)*i+(t.y+o.y)/2},c=ic({x:1,y:0},o={x:(u.x-l)/e,y:(u.y-i)/n}),o=ic(o,{x:(-u.x-l)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),l=c+(o%=2*Math.PI)*s,u=e*Math.cos(l),i=n*Math.sin(l),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:c,ellipticalArcEndAngle:c+o,ellipticalArcAngle:l,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var ic=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 ac(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,c=rc({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=rc({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-c.x,o=i.y-c.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function oc(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function sc(t,e){return oc(t)*oc(e)?(t[0]*e[0]+t[1]*e[1])/(oc(t)*oc(e)):1}function cc(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(sc(t,e))}function lc(t,e,n,r){var i=(-1+Math.sqrt(2))/3*4,a=t*i,i=e*i,o=n-t,t=n+t,s=r-e,e=r+e;return[["M",o,r],["C",o,r-i,n-a,s,n,s],["C",n+a,s,t,r-i,t,r],["C",t,r+i,n+a,e,n,e],["C",n-a,e,o,r+i,o,r],["Z"]]}function uc(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,a,o,s,c,l,u,h,f,d=[];switch(t.nodeName){case M.LINE:var p=t.parsedStyle,d=[["M",p.x1,p.y1],["L",p.x2,p.y2]];break;case M.CIRCLE:var p=t.parsedStyle,g=p.r;d=lc(g,g,p.cx,p.cy);break;case M.ELLIPSE:var g=t.parsedStyle;d=lc(g.rx,g.ry,g.cx,g.cy);break;case M.POLYLINE:case M.POLYGON:p=t.parsedStyle.points;g=p.points,p=t.nodeName===M.POLYGON,g=g.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),p&&g.push(["Z"]),d=g;break;case M.RECT:var y=t.parsedStyle,m=y.width,v=y.height,b=y.x,x=y.y,y=y.radius,w=y&&y.some(function(t){return 0!==t});n=m,r=v,b=b,x=x,d=(w=w&&y.map(function(t){return fn(t,0,Math.min(Math.abs(m)/2,Math.abs(v)/2))}))?(s=(y=0<n?1:-1)+(o=0<r?1:-1)!=0?1:0,[["M",y*(i=w[0])+b,x],["L",n-y*(a=w[1])+b,x],a?["A",a,a,0,0,s,n+b,o*a+x]:null,["L",n+b,r-o*(a=w[2])+x],a?["A",a,a,0,0,s,n+b-y*a,r+x]:null,["L",b+y*(a=w[3]),r+x],a?["A",a,a,0,0,s,b,r+x-o*a]:null,["L",b,o*i+x],i?["A",i,i,0,0,s,y*i+b,x]:null,["Z"]].filter(function(t){return t})):[["M",b,x],["L",b+n,x],["L",b+n,x+r],["L",b,x+r],["Z"]];break;case M.PATH:w=t.parsedStyle.path.absolutePath;d=[].concat(w)}if(d.length)return c=d,l=e,u=(e=(e=t).parsedStyle).defX,h=void 0===u?0:u,f=void 0===(u=e.defY)?0:u,c.reduce(function(t,e){var n,r,i,a="";return"M"===e[0]||"L"===e[0]?(n=k(e[1]-h,e[2]-f,0),l&&Xt(n,n,l),a=""+e[0]+n[0]+","+n[1]):"Z"===e[0]?a=e[0]:"C"===e[0]?(n=k(e[1]-h,e[2]-f,0),r=k(e[3]-h,e[4]-f,0),i=k(e[5]-h,e[6]-f,0),l&&(Xt(n,n,l),Xt(r,r,l),Xt(i,i,l)),a=""+e[0]+n[0]+","+n[1]+","+r[0]+","+r[1]+","+i[0]+","+i[1]):"A"===e[0]?(n=k(e[6]-h,e[7]-f,0),l&&Xt(n,n,l),a=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+n[0]+","+n[1]):"Q"===e[0]&&(r=k(e[1]-h,e[2]-f,0),i=k(e[3]-h,e[4]-f,0),l&&(Xt(r,r,l),Xt(i,i,l)),a=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+"}"),t+a},"")}function hc(t,e,n){var r=!1,i=!1,e=!!e&&!e.isNone,n=!!n&&!n.isNone;return"visiblepainted"===t||"painted"===t||"auto"===t?(r=e,i=n):"visiblefill"===t||"fill"===t?r=!0:"visiblestroke"===t||"stroke"===t?i=!0:"visible"!==t&&"all"!==t||(i=r=!0),[r,i]}function fc(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)}function dc(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)}function pc(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)}function gc(t){return Oc.setup(this,t),Oc.create(t)}function yc(t){return _c.setup(this,t),_c.create(t)}function mc(){throw new Error("tapAsync is not supported on a SyncHook")}function vc(){throw new Error("tapPromise is not supported on a SyncHook")}function bc(t){return Tc.setup(this,t),Tc.create(t)}function xc(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")}function wc(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")}function kc(t){return Lc.setup(this,t),Lc.create(t)}var Mc=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e=void 0),this.name=void 0,this.taps=void 0,this.promise=void 0,this._promise=void 0,this._args=t,this.name=e,this.taps=[],this.interceptors=[],this._call=fc,this.call=fc,this._callAsync=dc,this.callAsync=dc,this._promise=pc,this.promise=pc,this._x=void 0}var e=t.prototype;return e.compile=function(t){throw new Error("Abstract: should be overridden")},e._createCall=function(t){return this.compile({taps:this.taps,interceptors:this.interceptors,args:this._args,type:t})},e._tap=function(t,e,n){if("string"==typeof e)e={name:e.trim()};else if("object"!=typeof e||null===e)throw new Error("Invalid tap options");if("string"!=typeof e.name||""===e.name)throw new Error("Missing name for tap");e=Object.assign({type:t,fn:n},e),e=this._runRegisterInterceptors(e),this._insert(e)},e.tap=function(t,e){this._tap("sync",t,e)},e.tapAsync=function(t,e){this._tap("async",t,e)},e.tapPromise=function(t,e){this._tap("promise",t,e)},e._runRegisterInterceptors=function(t){for(var e=_i(this.interceptors);!(n=e()).done;){var n=n.value;n.register&&void 0!==(n=n.register(t))&&(t=n)}return t},e.withOptions=function(e){function n(t){return Object.assign({},e,"string"==typeof t?{name:t}:t)}var r=this;return{name:this.name,tap:function(t,e){return r.tap(n(t),e)},tapAsync:function(t,e){return r.tapAsync(n(t),e)},tapPromise:function(t,e){return r.tapPromise(n(t),e)},isUsed:function(){return r.isUsed()},withOptions:function(t){return r.withOptions(n(t))}}},e.isUsed=function(){return 0<this.taps.length||0<this.interceptors.length},e._resetCompilation=function(){this.call=this._call,this.callAsync=this._callAsync,this.promise=this._promise},e._insert=function(t){this._resetCompilation(),"string"==typeof t.before?e=new Set([t.before]):Array.isArray(t.before)&&(e=new Set(t.before));for(var e,n=0,r=("number"==typeof t.stage&&(n=t.stage),this.taps.length);0<r;){r--;var i=this.taps[r],a=(this.taps[r+1]=i).stage||0;if(e){if(e.has(i.name)){e.delete(i.name);continue}if(0<e.size)continue}if(!(n<a)){r++;break}}this.taps[r]=t},t}(),Ec=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=_i(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,c=0;c<this.options.interceptors.length;c++){var l=this.options.interceptors[c];l.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(c)+".tap("+(l.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 h=(h=(h="")+(r?"(function(_err"+t+", _result"+t+") {\n":"(function(_err"+t+") {\n")+("if(_err"+t+") {\n"))+n("_err"+t)+"} else {\n";r&&(h+=r("_result"+t)),i&&(h+=i()),o+="_fn"+t+"("+this.args({before:u.context?"_context":void 0,after:h=h+"}\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,c=t.onDone,n=t.doneReturns,l=t.rethrowIfPossible;if(0===this.options.taps.length)return c();for(var u=this.options.taps.findIndex(function(t){return"sync"!==t.type}),h=e||n,f="",d=c,p=0,r=function(t){function e(t){return t?"":c()}var n=t,r=(d!==c&&("sync"!==a.options.taps[n].type||20<p++)&&(p=0,f=(f+="function _next"+n+"() {\n")+d()+"}\n",d=function(){return(h?"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:l&&(u<0||n<u)});d=function(){return i}},i=this.options.taps.length-1;0<=i;i--)r(i);return f+=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,c=t.rethrowIfPossible,t=t.onTap,l=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:c});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")+l(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:c})},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}(),Oc=new(function(t){function e(){return t.apply(this,arguments)||this}return s(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}(Ec)),Sc=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).compile=gc,t._call=void 0,t.call=void 0,t}return s(t,n),t}(Mc),_c=new(function(t){function e(){return t.apply(this,arguments)||this}return s(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}(Ec)),Ac=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).compile=yc,t._call=void 0,t.call=void 0,t}return s(t,n),t}(Mc),Tc=new(function(t){function e(){return t.apply(this,arguments)||this}return s(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}(Ec)),Pc=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).tapAsync=mc,t.tapPromise=vc,t.compile=bc,t}return s(t,n),t}(Mc),Lc=new(function(t){function e(){return t.apply(this,arguments)||this}return s(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}(Ec)),Nc=function(n){function t(t,e){return(t=n.call(this,t=void 0===t?[]:t,e=void 0===e?void 0:e)||this).tapAsync=xc,t.tapPromise=wc,t.compile=kc,t}return s(t,n),t}(Pc),Cc=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],jc=/([\"\'])[^\'\"]+\1/;var Rc,Fc,Ic,Bc=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:r.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:r.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:r.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:r.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:r.PAINT},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:r.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:r.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:r.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:r.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:r.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:r.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:r.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:r.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:r.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:r.FILTER},{n:"clipPath",syntax:r.DEFINED_PATH},{n:"textPath",syntax:r.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:r.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"center":t===M.TEXT?"text-anchor":"left top"},l:!0,syntax:r.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===M.CIRCLE||t===M.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:r.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:r.COORDINATE},{n:"cy",int:!0,d:"0",syntax:r.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:r.COORDINATE},{n:"y",int:!0,d:"0",syntax:r.COORDINATE},{n:"z",int:!0,d:"0",syntax:r.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:r.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:r.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:r.COORDINATE},{n:"y1",int:!0,l:!0,syntax:r.COORDINATE},{n:"z1",int:!0,l:!0,syntax:r.COORDINATE},{n:"x2",int:!0,l:!0,syntax:r.COORDINATE},{n:"y2",int:!0,l:!0,syntax:r.COORDINATE},{n:"z2",int:!0,l:!0,syntax:r.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:r.PATH,p:50},{n:"points",l:!0,syntax:r.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:r.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:r.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:r.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:r.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:r.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:r.NUMBER,d:function(t){return t===M.PATH||t===M.POLYGON||t===M.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:r.MARKER},{n:"markerEnd",syntax:r.MARKER},{n:"markerMid",syntax:r.MARKER},{n:"markerStartOffset",syntax:r.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:r.LENGTH,l:!0,int:!0,d:"0"}],Dc={},Gc=new WeakMap,zc={},Wc=kn(function(t){return t.sort(function(t,e){return zc[t]-zc[e]})}),Vc=m(),Yc=m(),Hc=m(),Mc=function(){function t(){var e=this;Bc.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){Dc[t]=e,zc[t]=e.p||0})},e.unregisterMetadata=function(t){delete Dc[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=ai(t);a||(n.attributes[e]=r[t]),!s&&null!=(t=Dc[e])&&t.l&&(s=!0)}),e||o.forEach(function(t){n.computedStyle[t]=i.parseProperty(t,n.attributes[t],n)}),(o=Wc(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=Dc[t],i=e;return"unset"===(e=""!==e&&!_(e)?e:"unset")||"initial"===e||"inherit"===e?i=Ki(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=Ki(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=Dc[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof Ii){var c=e.value;if("initial"===(c="unset"===c?s&&!i?"inherit":"initial":c))_(r)||(e=this.parseProperty(t,ri(r)?r(n.nodeName):r,n));else if("inherit"===c)return s=this.tryToResolveProperty(n,t,{inherited:!0}),_(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 Ii?e.value:e}return a},e.postProcessProperty=function(t,e){var t=Dc[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e)},e.addUnresolveProperty=function(t,e){var n=Gc.get(t);n||(Gc.set(t,[]),n=Gc.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=Gc.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=Gc.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),Gc.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,c,l,u,h,f,d,p,g,y,m,v=w.geometryUpdaterFactory[t.nodeName];v&&((s=t.geometry).contentBounds||(s.contentBounds=new $r),s.renderBounds||(s.renderBounds=new $r),e=t.parsedStyle,d=(v=v.update(e,t)).width,f=v.height,p=void 0===(p=v.depth)?0:p,h=void 0===(h=v.offsetX)?0:h,m=void 0===(m=v.offsetY)?0:m,v=void 0===(v=v.offsetZ)?0:v,n=d<0,r=f<0,p=Gt(Vc,Math.abs(d)/2,Math.abs(f)/2,p/2),c=e.stroke,l=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===M.TEXT&&delete e.anchor,d=Gt(Yc,(1-2*(o&&o[0]||0))*d/2+h,(1-2*(o&&o[1]||0))*f/2+m,(1-2*(o&&o[2]||0))*p[2]+v),s.contentBounds.update(d,p),h=t.nodeName===M.POLYLINE||t.nodeName===M.POLYGON||t.nodeName===M.PATH?Math.SQRT2:.5,c&&!c.isNone&&zt(p,p,Gt(Hc,f=((l||0)+(u||0))*h,f,0)),s.renderBounds.update(d,p),g&&y&&"inner"!==y&&(v=(m=s.renderBounds).min,c=m.max,l=e.shadowBlur||0,u=e.shadowOffsetX||0,h=e.shadowOffsetY||0,f=v[0]-l+u,d=c[0]+l+u,p=v[1]-l+h,g=c[1]+l+h,v[0]=Math.min(v[0],f),c[0]=Math.max(c[0],d),v[1]=Math.min(v[1],p),c[1]=Math.max(c[1],g),s.renderBounds.setMinMax(v,c)),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,zt(s.renderBounds.halfExtents,s.renderBounds.halfExtents,k(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)*Aa(a[0],0,t),m=(r?-1:1)*Aa(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),w.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=Dc[t];return!!t&&t.inh},t}();(Ec=Rc=Rc||{})[Ec.ORBITING=0]="ORBITING",Ec[Ec.EXPLORING=1]="EXPLORING",Ec[Ec.TRACKING=2]="TRACKING",(Ec=Fc=Fc||{})[Ec.DEFAULT=0]="DEFAULT",Ec[Ec.ROTATIONAL=1]="ROTATIONAL",Ec[Ec.TRANSLATIONAL=2]="TRANSLATIONAL",Ec[Ec.CINEMATIC=3]="CINEMATIC",(Ec=Ic=Ic||{})[Ec.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",Ec[Ec.PERSPECTIVE=1]="PERSPECTIVE";var qc,Uc,Xc="updated",Ec=function(){function t(){this.canvas=void 0,this.eventEmitter=new Br,this.matrix=ut(),this.right=k(1,0,0),this.up=k(0,1,0),this.forward=k(0,0,1),this.position=k(0,0,1),this.focalPoint=k(0,0,0),this.distanceVector=k(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=ut(),this.projectionMatrixInverse=ut(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=Rc.EXPLORING,this.trackingMode=Fc.DEFAULT,this.projectionMode=Ic.PERSPECTIVE,this.frustum=new Zr,this.orthoMatrix=ut()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===Ic.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===Rc.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Rc.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==Rc.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 yt(ut(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=Mt(ut(),[t,e,0]);this.jitteredProjectionMatrix=vt(ut(),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===Ic.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===Ic.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===Ic.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===Ic.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===Ic.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Ic.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=k(t.x-r,t.y-n,0),e=Ht(i,this.right)/Bt(this.right),r=Ht(i,this.up)/Bt(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=Ic.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(bs(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,c=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,c+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,c=(a=c)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(c+a)/(c-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(c-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,xt(this.projectionMatrix,this.projectionMatrix,k(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=Ic.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),Ct(this.projectionMatrix,s,n,r,e,i,a),xt(this.projectionMatrix,this.projectionMatrix,k(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=vs(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=k(0,1,0);return this.focalPoint=vs(t,e,n),this.trackingMode===Fc.CINEMATIC&&(t=(r=Wt(m(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=Bt(r),e=xs(Math.asin(e/r)),r=90+xs(Math.atan2(n,t)),kt(n=ut(),n,bs(r)),wt(n,n,bs(e)),i=Xt(m(),[0,1,0],n)),yt(this.matrix,jt(ut(),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=ms(t),this.computeMatrix(),this._getAxes(),this.type===Rc.ORBITING||this.type===Rc.EXPLORING?this._getPosition():this.type===Rc.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=ms(t),this.computeMatrix(),this._getAxes(),this.type===Rc.ORBITING||this.type===Rc.EXPLORING?this._getPosition():this.type===Rc.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=ms(t),this.computeMatrix(),this._getAxes(),this.type===Rc.ORBITING||this.type===Rc.EXPLORING?this._getPosition():this.type===Rc.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=re(ne(),[0,0,1],bs(this.roll)),e=(pt(this.matrix),re(ne(),[1,0,0],bs((this.rotateWorld&&this.type!==Rc.TRACKING||this.type===Rc.TRACKING?1:-1)*this.elevation))),n=re(ne(),[0,1,0],bs((this.rotateWorld&&this.type!==Rc.TRACKING||this.type===Rc.TRACKING?1:-1)*this.azimuth)),n=ie(ne(),n,e),n=ie(ne(),n,t),e=Pt(ut(),n);this.type===Rc.ORBITING||this.type===Rc.EXPLORING?(bt(this.matrix,this.matrix,this.focalPoint),vt(this.matrix,this.matrix,e),bt(this.matrix,this.matrix,[0,0,this.distance])):this.type===Rc.TRACKING&&(bt(this.matrix,this.matrix,this.position),vt(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=vs(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(){Dt(this.right,vs(ee(te(),[1,0,0,0],this.matrix))),Dt(this.up,vs(ee(te(),[0,1,0,0],this.matrix))),Dt(this.forward,vs(ee(te(),[0,0,1,0],this.matrix))),Yt(this.right,this.right),Yt(this.up,this.up),Yt(this.forward,this.forward)},e._getAngles=function(){var t=this.distanceVector[0],e=this.distanceVector[1],n=this.distanceVector[2],r=Bt(this.distanceVector);0===r?(this.elevation=0,this.azimuth=0):this.type===Rc.TRACKING||this.rotateWorld?(this.elevation=xs(Math.asin(e/r)),this.azimuth=xs(Math.atan2(-t,-n))):(this.elevation=-xs(Math.asin(e/r)),this.azimuth=-xs(Math.atan2(-t,-n)))},e._getPosition=function(){Dt(this.position,vs(ee(te(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;$t(this.distanceVector,[0,0,-this.distance],(t=ct(),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)),zt(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=Wt(m(),this.focalPoint,this.position),this.distance=Bt(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===Ic.ORTHOGRAPHIC&&(t=this.position,e=re(ne(),[0,0,1],-this.roll*Math.PI/180),Tt(this.orthoMatrix,e,k((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),k(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=vt(ut(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(Xc))},e.rotate=function(t,e,n){throw new Error(gi)},e.pan=function(t,e){throw new Error(gi)},e.dolly=function(t){throw new Error(gi)},e.createLandmark=function(t,e){throw new Error(gi)},e.gotoLandmark=function(t,e){throw new Error(gi)},t}(),$c=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),Kc=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),Zc=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}(),Jc=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),Qc=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}(),tl=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&&!hn(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),el=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,c=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&c&&r&&i&&!_(t)},e.update=function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,c=t.dx,l=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),c&&(r+=c),l&&(a+=l),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}(),nl=function(){function t(t,e){var f=this;this.globalRuntime=void 0,this.context=void 0,this.rootTarget=void 0,this.emitter=new Br,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.pickHandler=void 0,this.tmpMatrix=ut(),this.tmpVec3=m(),this.onPointerDown=function(){var e=bi(E().mark(function t(e){var n,r;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Bo){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createPointerEvent(e);case 4:n=t.sent,f.dispatchEvent(n,"pointerdown"),"touch"===n.pointerType?f.dispatchEvent(n,"touchstart"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(r=2===n.button,f.dispatchEvent(n,r?"rightdown":"mousedown")),f.trackingData(e.pointerId).pressTargetsByButton[e.button]=n.composedPath(),f.freeEvent(n);case 10:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerUp=function(){var e=bi(E().mark(function t(e){var n,r,i,a,o,s,c;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Bo){t.next=2;break}return t.abrupt("return");case 2:return n=performance.now(),t.next=5,f.createPointerEvent(e);case 5:if(r=t.sent,f.dispatchEvent(r,"pointerup"),"touch"===r.pointerType?f.dispatchEvent(r,"touchend"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(i=2===r.button,f.dispatchEvent(r,i?"rightup":"mouseup")),i=f.trackingData(e.pointerId),s=f.findMountedTarget(i.pressTargetsByButton[e.button]),(c=s)&&!r.composedPath().includes(s)){for(a=s;a&&!r.composedPath().includes(a);)r.currentTarget=a,f.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType?f.notifyTarget(r,"touchendoutside"):"mouse"!==r.pointerType&&"pen"!==r.pointerType||(o=2===r.button,f.notifyTarget(r,o?"rightupoutside":"mouseupoutside")),To.isNode(a)&&(a=a.parentNode);delete i.pressTargetsByButton[e.button],c=a}c&&((s=f.clonePointerEvent(r,"click")).target=c,s.path=[],i.clicksByButton[e.button]||(i.clicksByButton[e.button]={clickCount:0,target:s.target,timeStamp:n}),(c=i.clicksByButton[e.button]).target===s.target&&n-c.timeStamp<200?++c.clickCount:c.clickCount=1,c.target=s.target,c.timeStamp=n,s.detail=c.clickCount,null!=(c=r.detail)&&c.preventClick||("mouse"!==s.pointerType&&"touch"!==s.pointerType||f.dispatchEvent(s,"click"),f.dispatchEvent(s,"pointertap")),f.freeEvent(s)),f.freeEvent(r);case 14:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerMove=function(){var e=bi(E().mark(function t(e){var n,r,i,a,o,s,c,l,u,h;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Bo){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createPointerEvent(e);case 4:if(n=t.sent,r="mouse"===n.pointerType||"pen"===n.pointerType,i=f.trackingData(e.pointerId),a=f.findMountedTarget(i.overTargets),i.overTargets&&a!==n.target)return c="mousemove"===e.type?"mouseout":"pointerout",t.next=12,f.createPointerEvent(e,c,a||void 0);t.next=23;break;case 12:if(o=t.sent,f.dispatchEvent(o,"pointerout"),r&&f.dispatchEvent(o,"mouseout"),n.composedPath().includes(a)){t.next=22;break}return t.next=18,f.createPointerEvent(e,"pointerleave",a||void 0);case 18:for((s=t.sent).eventPhase=s.AT_TARGET;s.target&&!n.composedPath().includes(s.target);)s.currentTarget=s.target,f.notifyTarget(s),r&&f.notifyTarget(s,"mouseleave"),To.isNode(s.target)&&(s.target=s.target.parentNode);f.freeEvent(s);case 22:f.freeEvent(o);case 23:if(a===n.target){t.next=38;break}c="mousemove"===e.type?"mouseover":"pointerover",l=f.clonePointerEvent(n,c),f.dispatchEvent(l,"pointerover"),r&&f.dispatchEvent(l,"mouseover"),u=a&&To.isNode(a)&&a.parentNode;case 29:if(u&&u!==(To.isNode(f.rootTarget)&&f.rootTarget.parentNode)){if(u===n.target)return t.abrupt("break",35);t.next=32}else t.next=35;break;case 32:u=u.parentNode,t.next=29;break;case 35:if(!u||u===(To.isNode(f.rootTarget)&&f.rootTarget.parentNode)){for((h=f.clonePointerEvent(n,"pointerenter")).eventPhase=h.AT_TARGET;h.target&&h.target!==a&&h.target!==(To.isNode(f.rootTarget)&&f.rootTarget.parentNode);)h.currentTarget=h.target,f.notifyTarget(h),r&&f.notifyTarget(h,"mouseenter"),To.isNode(h.target)&&(h.target=h.target.parentNode);f.freeEvent(h)}f.freeEvent(l);case 38:f.dispatchEvent(n,"pointermove"),"touch"===n.pointerType&&f.dispatchEvent(n,"touchmove"),r&&(f.dispatchEvent(n,"mousemove"),f.cursor=f.getCursor(n.target)),i.overTargets=n.composedPath(),f.freeEvent(n);case 43:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerOut=function(){var e=bi(E().mark(function t(e){var n,r,i,a,o;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Bo){t.next=2;break}return t.abrupt("return");case 2:if((n=f.trackingData(e.pointerId)).overTargets)return r="mouse"===e.pointerType||"pen"===e.pointerType,i=f.findMountedTarget(n.overTargets),t.next=8,f.createPointerEvent(e,"pointerout",i||void 0);t.next=19;break;case 8:return a=t.sent,f.dispatchEvent(a),r&&f.dispatchEvent(a,"mouseout"),t.next=13,f.createPointerEvent(e,"pointerleave",i||void 0);case 13:for((o=t.sent).eventPhase=o.AT_TARGET;o.target&&o.target!==(To.isNode(f.rootTarget)&&f.rootTarget.parentNode);)o.currentTarget=o.target,f.notifyTarget(o),r&&f.notifyTarget(o,"mouseleave"),To.isNode(o.target)&&(o.target=o.target.parentNode);n.overTargets=null,f.freeEvent(a),f.freeEvent(o);case 19:f.cursor=null;case 20:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerOver=function(){var e=bi(E().mark(function t(e){var n,r,i,a;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Bo){t.next=2;break}return t.abrupt("return");case 2:return n=f.trackingData(e.pointerId),t.next=5,f.createPointerEvent(e);case 5:for(r=t.sent,i="mouse"===r.pointerType||"pen"===r.pointerType,f.dispatchEvent(r,"pointerover"),i&&f.dispatchEvent(r,"mouseover"),"mouse"===r.pointerType&&(f.cursor=f.getCursor(r.target)),(a=f.clonePointerEvent(r,"pointerenter")).eventPhase=a.AT_TARGET;a.target&&a.target!==(To.isNode(f.rootTarget)&&f.rootTarget.parentNode);)a.currentTarget=a.target,f.notifyTarget(a),i&&f.notifyTarget(a,"mouseenter"),To.isNode(a.target)&&(a.target=a.target.parentNode);n.overTargets=r.composedPath(),f.freeEvent(r),f.freeEvent(a);case 16:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onPointerUpOutside=function(){var e=bi(E().mark(function t(e){var n,r,i,a;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Bo){t.next=2;break}return t.abrupt("return");case 2:return n=f.trackingData(e.pointerId),r=f.findMountedTarget(n.pressTargetsByButton[e.button]),t.next=6,f.createPointerEvent(e);case 6:if(i=t.sent,r){for(a=r;a;)i.currentTarget=a,f.notifyTarget(i,"pointerupoutside"),"touch"===i.pointerType||"mouse"!==i.pointerType&&"pen"!==i.pointerType||f.notifyTarget(i,2===i.button?"rightupoutside":"mouseupoutside"),To.isNode(a)&&(a=a.parentNode);delete n.pressTargetsByButton[e.button]}f.freeEvent(i);case 9:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.onWheel=function(){var e=bi(E().mark(function t(e){var n;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e instanceof Do){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,f.createWheelEvent(e);case 4:n=t.sent,f.dispatchEvent(n),f.freeEvent(n);case 7:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),this.globalRuntime=t,this.context=e}var e=t.prototype;return e.init=function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel)},e.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new Jr(t.x-((null==e?void 0:e.left)||0),t.y-((null==e?void 0:e.top)||0))},e.viewport2Client=function(t){var e=this.context.contextService.getBoundingClientRect();return new Jr(t.x+((null==e?void 0:e.left)||0),t.y+((null==e?void 0:e.top)||0))},e.viewport2Canvas=function(t){var e=t.x,t=t.y,n=this.rootTarget.defaultView.getCamera(),r=this.context.config,i=r.width,r=r.height,a=n.getPerspectiveInverse(),n=n.getWorldTransform(),n=vt(this.tmpMatrix,n,a),a=Gt(this.tmpVec3,e/i*2-1,2*(1-t/r)-1,0);return Xt(a,a,n),new Jr(a[0],a[1])},e.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),e=e.getViewTransform(),n=vt(this.tmpMatrix,n,e),e=Gt(this.tmpVec3,t.x,t.y,0),t=(Xt(this.tmpVec3,this.tmpVec3,n),this.context.config),n=t.width,t=t.height;return new Jr((e[0]+1)/2*n,(1-(e[1]+1)/2)*t)},e.setPickHandler=function(t){this.pickHandler=t},e.addEventMapping=function(t,e){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:e,priority:0}),this.mappingTable[t].sort(function(t,e){return t.priority-e.priority})},e.mapEvent=function(t){if(this.rootTarget){var e=this.mappingTable[t.type];if(e)for(var n=0,r=e.length;n<r;n++)e[n].fn(t);else console.warn("[EventService]: Event mapping not defined for "+t.type)}},e.dispatchEvent=function(t,e,n){n?(t.eventPhase=t.AT_TARGET,n=this.rootTarget.defaultView||null,t.currentTarget=n,this.notifyListeners(t,e)):(t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,e)),this.emitter.emit(e||t.type,t)},e.propagate=function(t,e){if(t.target){var n=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var r=n.length-1;1<=r;r--)if(t.currentTarget=n[r],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,e),!t.propagationStopped&&!t.propagationImmediatelyStopped){var i=n.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var a=i+1;a<n.length;a++)if(t.currentTarget=n[a],this.notifyTarget(t,e),t.propagationStopped||t.propagationImmediatelyStopped)return}}},e.propagationPath=function(t){var e=[t],n=this.rootTarget.defaultView||null;if(n&&n===t)e.unshift(n.document);else{for(var r=0;r<2048&&t!==this.rootTarget;r++)To.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);n&&e.push(n)}return e},e.hitTest=function(){var e=bi(E().mark(function t(e){var n,r,i,a;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=e.viewportX,r=e.viewportY,a=this.context.config,i=a.width,a=a.height,n<0||r<0||i<n||a<r)return t.abrupt("return",null);t.next=4;break;case 4:return t.next=6,this.pickHandler(e);case 6:if(t.t1=t.sent,t.t1){t.next=9;break}t.t1=this.rootTarget;case 9:if(t.t0=t.t1,t.t0){t.next=12;break}t.t0=null;case 12:return t.abrupt("return",t.t0);case 13:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.isNativeEventFromCanvas=function(t){var e=this.context.contextService.getDomElement(),n=null==(n=t.nativeEvent)?void 0:n.target;if(n){if(n===e)return!0;if(e&&e.contains)return e.contains(n)}return!!t.nativeEvent.composedPath&&-1<t.nativeEvent.composedPath().indexOf(e)},e.getExistedHTML=function(t){if(t.nativeEvent.composedPath)for(var e=_i(this.globalRuntime.displayObjectPool.getHTMLs());!(n=e()).done;){var n=n.value;if(-1<t.nativeEvent.composedPath().indexOf(n))return n}return null},e.pickTarget=function(){var e=bi(E().mark(function t(e){return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY}));case 1:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.createPointerEvent=function(){var r=bi(E().mark(function t(e,n,r){var i,a;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:i=this.allocateEvent(Bo),this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.nativeEvent=e.nativeEvent,i.originalEvent=e,a=this.getExistedHTML(i),null==r?t.next=11:(t.t0=r,t.next=20);break;case 11:if(t.t1=a,t.t1)t.next=19;else{if(t.t2=this.isNativeEventFromCanvas(i),t.t2)return t.next=17,this.pickTarget(i);t.next=18}break;case 17:t.t2=t.sent;case 18:t.t1=t.t2;case 19:t.t0=t.t1;case 20:return i.target=t.t0,"string"==typeof n&&(i.type=n),t.abrupt("return",i);case 23:case"end":return t.stop()}},t,this)}));return function(t,e,n){return r.apply(this,arguments)}}(),e.createWheelEvent=function(){var e=bi(E().mark(function t(e){var n,r;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=this.allocateEvent(Do),this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e,r=this.getExistedHTML(n),t.t0=r,t.t0)t.next=15;else{if(t.t1=this.isNativeEventFromCanvas(n),t.t1)return t.next=13,this.pickTarget(n);t.next=14}break;case 13:t.t1=t.sent;case 14:t.t0=t.t1;case 15:return n.target=t.t0,t.abrupt("return",n);case 17:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.trackingData=function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]},e.cloneWheelEvent=function(t){var e=this.allocateEvent(Do);return e.nativeEvent=t.nativeEvent,e.originalEvent=t.originalEvent,this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.target=t.target,e.path=t.composedPath().slice(),e.type=t.type,e},e.clonePointerEvent=function(t,e){var n=this.allocateEvent(Bo);return n.nativeEvent=t.nativeEvent,n.originalEvent=t.originalEvent,this.copyPointerData(t,n),this.copyMouseData(t,n),this.copyData(t,n),n.target=t.target,n.path=t.composedPath().slice(),n.type=null!=e?e:n.type,n},e.copyPointerData=function(t,e){t instanceof Bo&&e instanceof Bo&&(e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist)},e.copyMouseData=function(t,e){t instanceof Io&&e instanceof Io&&(e.altKey=t.altKey,e.button=t.button,e.buttons=t.buttons,e.ctrlKey=t.ctrlKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.client.copyFrom(t.client),e.movement.copyFrom(t.movement),e.canvas.copyFrom(t.canvas),e.screen.copyFrom(t.screen),e.global.copyFrom(t.global),e.offset.copyFrom(t.offset))},e.copyWheelData=function(t,e){e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ},e.copyData=function(t,e){e.isTrusted=t.isTrusted,e.timeStamp=performance.now(),e.type=t.type,e.detail=t.detail,e.view=t.view,e.page.copyFrom(t.page),e.viewport.copyFrom(t.viewport)},e.allocateEvent=function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);t=this.eventPool.get(t).pop()||new t(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=[],t.target=null,t},e.freeEvent=function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var e=t.constructor;this.eventPool.has(e)||this.eventPool.set(e,[]),this.eventPool.get(e).push(t)},e.notifyTarget=function(t,e){e=null!=(n=e)?n:t.type;var n=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?e+"capture":e;this.notifyListeners(t,n),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,e)},e.notifyListeners=function(t,e){var n=t.currentTarget.emitter,r=n._events[e];if(r)if("fn"in r)r.once&&n.removeListener(e,r.fn,void 0,!0),r.fn.call(t.currentTarget||r.context,t);else for(var i=0;i<r.length&&!t.propagationImmediatelyStopped;i++)r[i].once&&n.removeListener(e,r[i].fn,void 0,!0),r[i].fn.call(t.currentTarget||r[i].context,t)},e.findMountedTarget=function(t){if(!t)return null;for(var e=t[t.length-1],n=t.length-2;0<=n;n--){var r=t[n];if(!(r===this.rootTarget||To.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.getCursor=function(t){for(var e=t;e;){var n=Fo.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=To.isNode(e)&&e.parentNode}},t}(),rl=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}(),il=((ol=qc=qc||{})[ol.CAMERA_CHANGED=0]="CAMERA_CHANGED",ol[ol.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",ol[ol.NONE=2]="NONE",function(){function t(t,e){this.globalRuntime=void 0,this.context=void 0,this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.renderOrderChangedEvent=new _o(y.RENDER_ORDER_CHANGED),this.hooks={init:new Sc,dirtycheck:new Nc(["object"]),cull:new Nc(["object","camera"]),beginFrame:new Pc([]),beforeRender:new Pc(["objectToRender"]),render:new Pc(["objectToRender"]),afterRender:new Pc(["objectToRender"]),endFrame:new Pc([]),destroy:new Pc([]),pick:new Ac(["result"]),pickSync:new Nc(["result"]),pointerDown:new Pc(["event"]),pointerUp:new Pc(["event"]),pointerMove:new Pc(["event"]),pointerOut:new Pc(["event"]),pointerOver:new Pc(["event"]),pointerWheel:new Pc(["event"]),pointerCancel:new Pc(["event"])},this.globalRuntime=t,this.context=e}var e=t.prototype;return e.init=function(){var t=bi(E().mark(function t(){var e;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=ki({},this.globalRuntime,this.context),this.context.renderingPlugins.forEach(function(t){t.apply(e)}),t.next=4,this.hooks.init.promise();case 4:this.inited=!0;case 5:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getStats=function(){return this.stats},e.disableDirtyRectangleRendering=function(){return!this.context.config.renderer.getConfig().enableDirtyRectangleRendering||this.context.renderingContext.renderReasons.has(qc.CAMERA_CHANGED)},e.render=function(t){var e=this,n=(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.context.renderingContext);this.globalRuntime.sceneGraphService.syncHierarchy(n.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),n.renderReasons.size&&this.inited&&(this.renderDisplayObject(n.root,t,n),this.hooks.beginFrame.call(),n.renderListCurrentFrame.forEach(function(t){e.hooks.beforeRender.call(t),e.hooks.render.call(t),e.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),n.renderListCurrentFrame=[],n.renderReasons.clear())},e.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),a=i.enableDirtyCheck,i=i.enableCulling,a=(this.globalRuntime.styleValueRegistry.recalc(t),a?this.hooks.dirtycheck.call(t):t),a=(a&&(i=i?this.hooks.cull.call(a,this.context.camera):a)&&(this.stats.rendered++,n.renderListCurrentFrame.push(i)),t.renderable.dirty=!1,t.sortable.renderOrder=this.zIndexCounter++,this.stats.total++,t.sortable),i=!1;a.dirty&&(a.sorted=t.childNodes.slice().sort(li),a.dirty=!(i=!0)),(a.sorted||t.childNodes).forEach(function(t){r.renderDisplayObject(t,e,n)}),i&&t.forEach(function(t){r.renderOrderChangedEvent.target=t,r.renderOrderChangedEvent.detail={renderOrder:t.sortable.renderOrder},t.ownerDocument.defaultView.dispatchEvent(r.renderOrderChangedEvent,!0)})},e.destroy=function(){this.inited=!1,this.hooks.destroy.call()},e.dirtify=function(){this.context.renderingContext.renderReasons.add(qc.DISPLAY_OBJECT_CHANGED)},t}()),al=/\[\s*(.*)=(.*)\s*\]/,ol=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(al),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),!_(t))&&t.toString?t.toString():""},t}(),sl=function(){function t(t){var o,i,a,r,s,c,l,u,h,n,f,d,g=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new _o(y.BOUNDS_CHANGED),this.rotate=(o=ne(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(oe(r=ne(),e[0],e[1],e[2]),i=g.getRotation(t),a=g.getRotation(t.parentNode),ce(o,a),ae(o,o),ie(r,o,r),ie(n.localRotation,r,i),ue(n.localRotation,n.localRotation),g.dirtifyLocal(t,n)):g.rotateLocal(t,e)}),this.rotateLocal=(i=ne(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));n=t.transformable;oe(i,e[0],e[1],e[2]),le(n.localRotation,n.localRotation,i),g.dirtifyLocal(t,n)}),this.setEulerAngles=(a=ne(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=k(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(oe(n.localRotation,e[0],e[1],e[2]),r=g.getRotation(t.parentNode),ce(a,ae(ne(),r)),le(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=k(e,n,r));var i,a,o,s,c,l,u,h,f,d,p,n=t.transformable;Kt(e,m())||(i=r=e,a=n.localRotation,o=a[0],s=a[1],c=a[2],a=a[3],l=i[0],u=i[1],i=i[2],p=s*(d=o*u-s*l)-c*(f=c*l-o*i),c=c*(h=s*i-c*u)-o*d,o=o*f-s*h,f*=s=2*a,d*=s,c*=2,o*=2,r[0]=l+(h*=s)+(p*=2),r[1]=u+f+c,r[2]=i+d+o,zt(n.localPosition,n.localPosition,e),g.dirtifyLocal(t,n))},this.setPosition=(r=ut(),s=m(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Kt(g.getPosition(t),s)||(Dt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,ft(r,e.worldTransform),yt(r,r),Xt(n.localPosition,s,r)):Dt(n.localPosition,s),g.dirtifyLocal(t,n))}),this.setLocalPosition=(c=m(),function(t,e){var n=t.transformable;c[0]=e[0],c[1]=e[1],c[2]=e[2]||0,Kt(n.localPosition,c)||(Dt(n.localPosition,c),g.dirtifyLocal(t,n))}),this.translate=(l=m(),u=m(),h=m(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Kt(e="number"==typeof e?Gt(u,e,n,r):e,l)||(zt(h,g.getPosition(t),e),g.setPosition(t,h))}),this.setRotation=function(){var o=ne();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=se(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=g.getRotation(t.parentNode),ce(o,n),ae(o,o),ie(a.localRotation,o,e),ue(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=ut(),f=m(),d=se(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(Tt(t.localTransform,t.localRotation,t.localPosition,k(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=pt(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),vt(t.localTransform,t.localTransform,e)),e=Tt(n,d,f,t.localScale,t.origin),vt(t.localTransform,t.localTransform,e)):Tt(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,_(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=k(e,n,r));n=t.transformable;Kt(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=k(e,n,r));n=t.transformable;oe(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=k(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=k(e[0],e[1],e[2]||n.localScale[2]);Kt(e,n.localScale)||(Dt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=se(e,n,r,i));n=t.transformable;ce(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(e=he(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 Lo(y.ATTR_MODIFIED,t,n,n,e,Lo.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return St(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return At(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return _t(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=St(m(),e),r=At(ne(),e),e=_t(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 $r.isEmpty(e)?null:((n=n||new $r).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 $r},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 $r).update(t.center,t.halfExtents))}),e&&(t=ui(t))&&(t=t.style.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new $r)&&(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=ut(),r=(t.parentNode.transformable&&(n=yt(ut(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!$r.isEmpty(r))return(e=new $r).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=($r.isEmpty(i)||(r=new $r).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 Qr(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Qr((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?vt(e.worldTransform,n.worldTransform,e.localTransform):ft(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}(),cl={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]},ll=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,ul=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),hl=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),fl=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!hl.exec(e)&&!ul.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,cl.MetricsString+cl.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(cl.BaselineSymbol).width),s=cl.HeightMultiplier*o,o=o*cl.BaselineMultiplier|0,c=(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=c.length,l=4*a,u=0,h=0,f=!1,u=0;u<o;++u){for(var d=0;d<l;d+=4)if(255!==c[h+d]){f=!0;break}if(f)break;h+=l}for(n.ascent=o-u,h=r-l,f=!1,u=s;o<u;--u){for(var p=0;p<l;p+=4)if(255!==c[h+p]){f=!0;break}if(f)break;h-=l}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,c=e.textAlign,l=e.letterSpacing,u=e.textPath,h=(e.textPathSide,e.textPathStartOffset,e.leading),h=void 0===h?0:h,f=function(t){for(var e=t.fontSize,n=t.fontFamily,r=t.fontStyle,i=t.fontVariant,t=t.fontWeight,e=dn(e)&&e+"px"||"16px",a=hn(n)?n.split(","):[n],o=a.length-1;0<=o;o--){var s=a[o].trim();!jc.test(s)&&Cc.indexOf(s)<0&&(s='"'+s+'"'),a[o]=s}return r+" "+i+" "+t+" "+e+" "+a.join(",")}(e),d=this.measureFont(f,n),p=(0===d.fontSize&&(d.fontSize=r,d.ascent=r),this.runtime.offscreenCanvas.getOrCreateContext(n));p.font=f,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)*l;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+h),w=0;return"middle"===s?w=-i/2:"bottom"===s||"alphabetic"===s||"ideographic"===s?w=-i:"top"!==s&&"hanging"!==s||(w=0),{font:f,width:r,height:i,lines:g,lineWidths:y,lineHeight:x+=h,maxLineWidth:m,fontProperties:d,lineMetrics:y.map(function(t,e){var n=0;return"center"===c||"middle"===c?n-=t/2:"right"!==c&&"end"!==c||(n-=t),new Qr(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,c=this.runtime.offscreenCanvas.getOrCreateContext(n),l=i+a,u="",h=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),f=0,d=0,p={},g=function(t){return r.getFromCache(t,a,p,c)},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<=++f){e.isOverflowing=!0;break}d=0,h[f]=""}else{if(0<d&&l<d+k){if(s<=f+1){if(e.isOverflowing=!0,0<y&&y<=l){for(var M=h[f].length,E=0,O=M,S=0;S<M;S++){var _=g(h[f][S]);if(l<E+_+y){O=S;break}E+=_}h[f]=(h[f]||"").slice(0,O)+u}break}if(d=0,h[++f]="",this.isBreakingSpace(b))continue;this.canBreakInLastChar(b)||(h=this.trimToBreakable(h),d=this.sumTextWidthByCache(h[f]||"",p)),this.shouldBreakByKinsokuShorui(b,w)&&(h=this.trimByKinsokuShorui(h),d+=g(x||""))}d+=k,h[f]=(h[f]||"")+b}}return h.join("\n")},e.isBreakingSpace=function(t){return"string"==typeof t&&0<=cl.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=cl.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||!ll.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(!ll.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={},$c=(tl=new tl,Qc=new Qc,(sw={})[M.CIRCLE]=new $c,sw[M.ELLIPSE]=new Kc,sw[M.RECT]=tl,sw[M.IMAGE]=tl,sw[M.GROUP]=tl,sw[M.LINE]=new Zc,sw[M.TEXT]=new el(w),sw[M.POLYLINE]=Qc,sw[M.POLYGON]=Qc,sw[M.PATH]=new Jc,sw[M.HTML]=null,sw[M.MESH]=null,sw),el=(Kc=new i,tl=new uo,(Zc={})[r.PERCENTAGE]=null,Zc[r.NUMBER]=new yo,Zc[r.ANGLE]=new n,Zc[r.DEFINED_PATH]=new e,Zc[r.PAINT]=Kc,Zc[r.COLOR]=Kc,Zc[r.FILTER]=new oo,Zc[r.LENGTH]=tl,Zc[r.LENGTH_PERCENTAGE]=tl,Zc[r.LENGTH_PERCENTAGE_12]=new ho,Zc[r.LENGTH_PERCENTAGE_14]=new fo,Zc[r.COORDINATE]=new po,Zc[r.OFFSET_DISTANCE]=new mo,Zc[r.OPACITY_VALUE]=new vo,Zc[r.PATH]=new bo,Zc[r.LIST_OF_POINTS]=new xo,Zc[r.SHADOW_BLUR]=new wo,Zc[r.TEXT]=new ko,Zc[r.TEXT_TRANSFORM]=new a,Zc[r.TRANSFORM]=new Mo,Zc[r.TRANSFORM_ORIGIN]=new co,Zc[r.Z_INDEX]=new Eo,Zc[r.MARKER]=new go,Zc),Qc=(w.CameraContribution=Ec,w.AnimationTimeline=null,w.EasingFunction=null,w.offscreenCanvas=new rl,w.displayObjectPool=new Ko,w.sceneGraphSelector=new ol,w.sceneGraphService=new sl(w),w.textService=new fl(w),w.geometryUpdaterFactory=$c,w.CSSPropertySyntaxFactory=el,w.styleValueRegistry=new Mc,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}()),Jc=function(){function t(t){this.plugins=[],this.config=void 0,this.config=ki({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1},t)}var e=t.prototype;return e.registerPlugin=function(e){-1===this.plugins.findIndex(function(t){return t===e})&&this.plugins.push(e)},e.unregisterPlugin=function(e){var t=this.plugins.findIndex(function(t){return t===e});-1<t&&this.plugins.splice(t,1)},e.getPlugins=function(){return this.plugins},e.getPlugin=function(e){return this.plugins.find(function(t){return t.name===e})},e.getConfig=function(){return this.config},e.setConfig=function(t){Object.assign(this.config,t)},t}(),dl=function(){function a(t){this.strategies=void 0,this.strategies=t}return a.prototype.apply=function(t){var n=t.camera,e=t.renderingService,r=t.renderingContext,i=this.strategies;e.hooks.cull.tap(a.tag,function(e){var t;return e&&(t=e.cullable,0===i.length?t.visible=-1<r.unculledEntities.indexOf(e.entity):t.visible=i.every(function(t){return t.isVisible(n,e)}),!e.isCulled()&&e.isVisible()?e:(e.dispatchEvent(new _o(y.CULLED)),null))}),e.hooks.afterRender.tap(a.tag,function(t){t.cullable.visibilityPlaneMask=-1})},a}(),pl=(dl.tag="Culling",function(){function n(){}return n.prototype.apply=function(t){var e=t.renderingService;e.hooks.dirtycheck.tap(n.tag,function(t){return t&&(t.renderable.dirty||e.disableDirtyRectangleRendering()?t:null)})},n}()),gl=(pl.tag="DirtyCheck",function(){function e(){var a=this;this.autoPreventDefault=!1,this.rootPointerEvent=new Bo(null),this.rootWheelEvent=new Do(null),this.context=void 0,this.onPointerMove=function(t){var e,n=null==(e=a.context.renderingContext.root)||null==(e=e.ownerDocument)?void 0:e.defaultView;if(!n.supportsTouchEvents||"touch"!==t.pointerType){for(var r=_i(a.normalizeToPointerEvent(t,n));!(i=r()).done;){var i=i.value,i=a.bootstrapEvent(a.rootPointerEvent,i,n);a.context.eventService.mapEvent(i)}a.setCursor(a.context.eventService.cursor)}}}var t=e.prototype;return t.apply=function(t){var a=this,t=(this.context=t).renderingService,o=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(){var e=bi(E().mark(function t(e){var n;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.context.renderingService.hooks.pick.promise({position:e,picked:[],topmost:!0});case 2:return n=t.sent,n=n.picked,t.abrupt("return",n[0]||null);case 5:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}()),t.hooks.pointerWheel.tap(e.tag,function(t){t=a.normalizeWheelEvent(t);a.context.eventService.mapEvent(t)}),t.hooks.pointerDown.tap(e.tag,function(t){if(!o.supportsTouchEvents||"touch"!==t.pointerType){var e=a.normalizeToPointerEvent(t,o);!a.autoPreventDefault||!e[0].isNormalized||!t.cancelable&&"cancelable"in t||t.preventDefault();for(var n=_i(e);!(r=n()).done;){var r=r.value,r=a.bootstrapEvent(a.rootPointerEvent,r,o);a.context.eventService.mapEvent(r)}a.setCursor(a.context.eventService.cursor)}}),t.hooks.pointerUp.tap(e.tag,function(t){if(!o.supportsTouchEvents||"touch"!==t.pointerType){var e=a.context.contextService.getDomElement(),n="outside";try{n=e&&t.target&&t.target!==e&&e.contains&&!e.contains(t.target)?"outside":""}catch(t){}for(var r=_i(a.normalizeToPointerEvent(t,o));!(i=r()).done;){var i=i.value,i=a.bootstrapEvent(a.rootPointerEvent,i,o);i.type+=n,a.context.eventService.mapEvent(i)}a.setCursor(a.context.eventService.cursor)}}),t.hooks.pointerMove.tap(e.tag,this.onPointerMove),t.hooks.pointerOver.tap(e.tag,this.onPointerMove),t.hooks.pointerOut.tap(e.tag,this.onPointerMove)},t.getViewportXY=function(t){var e,n=t.offsetX,r=t.offsetY,i=t.clientX,t=t.clientY;return t=!this.context.config.supportsCSSTransform||_(n)||_(r)?(e=(i=this.context.eventService.client2Viewport(new Jr(i,t))).x,i.y):(e=n,r),{x:e,y:t}},t.bootstrapEvent=function(t,e,n){t.view=n,t.originalEvent=null,t.nativeEvent=e,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);var n=this.getViewportXY(e),r=n.x,n=n.y,r=(t.viewport.x=r,t.viewport.y=n,this.context.eventService.viewport2Canvas(t.viewport)),n=r.x,r=r.y;return t.canvas.x=n,t.canvas.y=r,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=e.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=mi[t.type]||t.type),t},t.normalizeWheelEvent=function(t){var e=this.rootWheelEvent,n=(this.transferMouseData(e,t),e.deltaMode=t.deltaMode,e.deltaX=t.deltaX,e.deltaY=t.deltaY,e.deltaZ=t.deltaZ,this.getViewportXY(t)),r=n.x,n=n.y,r=(e.viewport.x=r,e.viewport.y=n,this.context.eventService.viewport2Canvas(e.viewport)),n=r.x,r=r.y;return e.canvas.x=n,e.canvas.y=r,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.nativeEvent=t,e.type=t.type,e},t.transferMouseData=function(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null},t.setCursor=function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")},t.normalizeToPointerEvent=function(t,e){var n=[];if(e.isTouchEvent(t))for(var r=0;r<t.changedTouches.length;r++){var i=t.changedTouches[r];mn(i.button)&&(i.button=0),mn(i.buttons)&&(i.buttons=1),mn(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),mn(i.width)&&(i.width=i.radiusX||1),mn(i.height)&&(i.height=i.radiusY||1),mn(i.tiltX)&&(i.tiltX=0),mn(i.tiltY)&&(i.tiltY=0),mn(i.pointerType)&&(i.pointerType="touch"),mn(i.pointerId)&&(i.pointerId=i.identifier||0),mn(i.pressure)&&(i.pressure=i.force||.5),mn(i.twist)&&(i.twist=0),mn(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)?(mn((e=t).isPrimary)&&(e.isPrimary=!0),mn(e.width)&&(e.width=1),mn(e.height)&&(e.height=1),mn(e.tiltX)&&(e.tiltX=0),mn(e.tiltY)&&(e.tiltY=0),mn(e.pointerType)&&(e.pointerType="mouse"),mn(e.pointerId)&&(e.pointerId=1),mn(e.pressure)&&(e.pressure=.5),mn(e.twist)&&(e.twist=0),mn(e.tangentialPressure)&&(e.tangentialPressure=0),e.isNormalized=!0,n.push(e)):n.push(t);return n},e}()),yl=(gl.tag="Event",[M.CIRCLE,M.ELLIPSE,M.IMAGE,M.RECT,M.LINE,M.POLYLINE,M.POLYGON,M.TEXT,M.PATH,M.HTML]),ml=function(){function t(){}var e=t.prototype;return e.isVisible=function(t,e){var n,r,i=e.cullable;return!i.enable||(n=e.getRenderBounds(),!$r.isEmpty(n)&&(t=t.getFrustum(),r=null==(r=e.parentNode)||null==(r=r.cullable)?void 0:r.visibilityPlaneMask,i.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(e,n,r||Xr.INDETERMINATE,t.planes),i.visible=i.visibilityPlaneMask!==Xr.OUTSIDE,i.visible))},e.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===Xr.OUTSIDE||n===Xr.INSIDE)return n;for(var i=Xr.INSIDE,a=-1<yl.indexOf(t.nodeName),o=0,s=r.length;o<s;++o){var c=1<<o;if(0!=(n&c)&&(!a||4!==o&&5!==o)){var l=r[o],u=l.normal,l=l.distance;if(Ht(u,e.getPositiveFarPoint(r[o]))+l<0)return Xr.OUTSIDE;Ht(u,e.getNegativeFarPoint(r[o]))+l<0&&(i|=c)}}return i},t}(),vl=function(){function l(){this.rBush=void 0,this.toSync=new Set}var t=l.prototype;return t.apply=function(t){function e(t){t.target.renderable.dirty=!0,o.dirtify()}function n(t){for(var e=t.detail.affectChildren,t=t.target,n=(e&&t.forEach(function(t){a.toSync.add(t)}),t);n;)n.renderable&&a.toSync.add(n),n=n.parentElement;o.dirtify()}function r(t){t=t.target,w.styleValueRegistry.recalc(t),w.sceneGraphService.dirtifyToRoot(t),o.dirtify()}function i(t){var e=(t=t.target).rBushNode;e.aabb&&a.rBush.remove(e.aabb),a.toSync.delete(t),w.sceneGraphService.dirtifyToRoot(t),o.dirtify()}var a=this,o=t.renderingService,s=t.renderingContext,t=t.rBushRoot,c=s.root.ownerDocument.defaultView;this.rBush=t;o.hooks.init.tapPromise(l.tag,bi(E().mark(function t(){return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:c.addEventListener(y.MOUNTED,r),c.addEventListener(y.UNMOUNTED,i),c.addEventListener(y.ATTR_MODIFIED,e),c.addEventListener(y.BOUNDS_CHANGED,n);case 4:case"end":return t.stop()}},t)}))),o.hooks.destroy.tap(l.tag,function(){c.removeEventListener(y.MOUNTED,r),c.removeEventListener(y.UNMOUNTED,i),c.removeEventListener(y.ATTR_MODIFIED,e),c.removeEventListener(y.BOUNDS_CHANGED,n)}),o.hooks.endFrame.tap(l.tag,function(){a.syncRTree()})},t.syncRTree=function(){var o=this,s=[];Array.from(this.toSync).filter(function(t){return t.isConnected}).forEach(function(t){var e,n,r,i=t.rBushNode,a=(i&&i.aabb&&o.rBush.remove(i.aabb),t.getRenderBounds());a&&(e=(n=a.getMin())[0],n=n[1],r=(a=a.getMax())[0],a=a[1],i.aabb||(i.aabb={}),i.aabb.id=t.entity,i.aabb.minX=e,i.aabb.minY=n,i.aabb.maxX=r,i.aabb.maxY=a),!i.aabb||isNaN(i.aabb.maxX)||isNaN(i.aabb.maxX)||isNaN(i.aabb.minX)||isNaN(i.aabb.minY)||s.push(i.aabb)}),this.rBush.load(s),s.length=0,this.toSync.clear()},l}(),bl=(vl.tag="Prepare",(sw=Uc=Uc||{}).READY="ready",sw.BEFORE_RENDER="beforerender",sw.AFTER_RENDER="afterrender",sw.BEFORE_DESTROY="beforedestroy",sw.AFTER_DESTROY="afterdestroy",sw.RESIZE="resize",sw.DIRTY_RECTANGLE="dirtyrectangle",new _o(y.MOUNTED)),xl=new _o(y.UNMOUNTED),wl=new _o(Uc.BEFORE_RENDER),kl=new _o(Uc.AFTER_RENDER),Ml=function(k){function t(t){var e=k.call(this)||this,n=(e.document=void 0,e.customElements=void 0,e.requestAnimationFrame=void 0,e.cancelAnimationFrame=void 0,e.devicePixelRatio=void 0,e.supportsPointerEvents=void 0,e.supportsTouchEvents=void 0,e.isTouchEvent=void 0,e.isMouseEvent=void 0,e.Element=N,e.frameId=void 0,e.inited=!1,e.readyPromise=void 0,e.resolveReadyPromise=void 0,e.context={},e.document=new Po,e.document.defaultView=Oi(e),e.customElements=new Oo,t.container),r=t.canvas,i=t.offscreenCanvas,a=t.width,o=t.height,s=t.devicePixelRatio,c=t.renderer,l=t.background,u=t.cursor,h=t.document,f=t.requestAnimationFrame,d=t.cancelAnimationFrame,p=t.createImage,g=t.supportsPointerEvents,y=t.supportsTouchEvents,m=t.supportsCSSTransform,v=t.isTouchEvent,t=t.isMouseEvent,b=(b=n,x=Oi(e),b&&(b="string"==typeof b?b:b.id||si++,oi[b]&&oi[b].destroy(),oi[b]=x),a),x=o,w=s;return r&&(w=1<=(w=s||ci&&window.devicePixelRatio||1)?Math.ceil(w):1,b=a||("auto"===(a=hi(s=r,"width"))?s.offsetWidth:parseFloat(a))||r.width/w,x=o||("auto"===(a=hi(s=r,"height"))?s.offsetHeight:parseFloat(a))||r.height/w),e.devicePixelRatio=w,e.requestAnimationFrame=null!=f?f:qr.bind(globalThis),e.cancelAnimationFrame=null!=d?d:Ur.bind(globalThis),e.supportsTouchEvents=null!=y?y:"ontouchstart"in globalThis,e.supportsPointerEvents=null!=g?g:!!globalThis.PointerEvent,e.isTouchEvent=null!=v?v:function(t){return e.supportsTouchEvents&&t instanceof globalThis.TouchEvent},e.isMouseEvent=null!=t?t:function(t){return!globalThis.MouseEvent||t instanceof globalThis.MouseEvent&&(!e.supportsPointerEvents||!(t instanceof globalThis.PointerEvent))},e.initRenderingContext({container:n,canvas:r,width:b,height:x,renderer:c,offscreenCanvas:i,devicePixelRatio:w,cursor:u||"default",background:l||"transparent",createImage:p,document:h,supportsCSSTransform:m}),e.initDefaultCamera(b,x),bi(E().mark(function t(){return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.initRenderer(c);case 2:e.dispatchEvent(new _o(Uc.READY)),e.readyPromise&&e.resolveReadyPromise();case 4:case"end":return t.stop()}},t)}))(),e}s(t,k);var e=t.prototype;return e.initRenderingContext=function(t){this.context.config=t,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}},e.initDefaultCamera=function(t,e){var n=this,r=new w.CameraContribution;r.setType(Rc.EXPLORING,Fc.DEFAULT).setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0).setOrthographic(t/-2,t/2,e/2,e/-2,.1,1e3),r.canvas=this,r.eventEmitter.on(Xc,function(){n.context.renderingContext.renderReasons.add(qc.CAMERA_CHANGED)}),this.context.camera=r},e.getConfig=function(){return this.context.config},e.getRoot=function(){return this.document.documentElement},e.getCamera=function(){return this.context.camera},e.getContextService=function(){return this.context.contextService},e.getEventService=function(){return this.context.eventService},e.getRenderingService=function(){return this.context.renderingService},e.getRenderingContext=function(){return this.context.renderingContext},e.getStats=function(){return this.getRenderingService().getStats()},e.destroy=function(t,e){void 0===t&&(t=!0),(e=void 0===e?!1:e)||this.dispatchEvent(new _o(Uc.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&this.document.destroy(),this.getRenderingService().destroy(),this.getContextService().destroy(),e||this.dispatchEvent(new _o(Uc.AFTER_DESTROY))},e.changeSize=function(t,e){this.resize(t,e)},e.resize=function(t,e){var n=this.context.config,n=(n.width=t,n.height=e,this.getContextService().resize(t,e),this.context.camera),r=n.getProjectionMode();n.setPosition(t/2,e/2,500).setFocalPoint(t/2,e/2,0),r===Ic.ORTHOGRAPHIC?n.setOrthographic(t/-2,t/2,e/2,e/-2,n.getNear(),n.getFar()):n.setAspect(t/e),this.dispatchEvent(new _o(Uc.RESIZE,{width:t,height:e}))},e.appendChild=function(t,e){return this.document.documentElement.appendChild(t,e)},e.insertBefore=function(t,e){return this.document.documentElement.insertBefore(t,e)},e.removeChild=function(t){return this.document.documentElement.removeChild(t)},e.removeChildren=function(){this.document.documentElement.removeChildren()},e.destroyChildren=function(){this.document.documentElement.destroyChildren()},e.render=function(){this.dispatchEvent(wl),this.getRenderingService().render(this.getConfig()),this.dispatchEvent(kl)},e.run=function(){var e=this;(function t(){e.render(),e.frameId=requestAnimationFrame(t)})()},e.initRenderer=function(){var e=bi(E().mark(function t(e){return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e){t.next=2;break}throw new Error("Renderer is required.");case 2:return this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new D,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new gl,new vl,new pl,new dl([new ml])),this.loadRendererContainerModule(e),this.context.contextService=new this.context.ContextService(ki({},w,this.context)),this.context.renderingService=new il(w,this.context),this.context.eventService=new nl(w,this.context),this.context.eventService.init(),t.next=14,this.context.contextService.init();case 14:return t.next=16,this.context.renderingService.init();case 16:this.inited=!0,this.getRoot().forEach(function(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0,t.dirty=!0)}),this.mountChildren(this.getRoot()),e.getConfig().enableAutoRendering&&this.run();case 20:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.loadRendererContainerModule=function(t){var e=this;t.getPlugins().forEach(function(t){t.context=e.context,t.init()})},e.setRenderer=function(){var e=bi(E().mark(function t(e){var n,r;return E().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if((n=this.getConfig()).renderer===e)return t.abrupt("return");t.next=3;break;case 3:return r=n.renderer,n.renderer=e,this.destroy(!1,!0),[].concat(null==r?void 0:r.getPlugins()).reverse().forEach(function(t){t.destroy()}),t.next=9,this.initRenderer(e);case 9:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),e.setCursor=function(t){this.getConfig().cursor=t,this.getContextService().applyCursorStyle(t)},e.unmountChildren=function(t){var e=this;t.childNodes.forEach(function(t){e.unmountChildren(t)}),this.inited&&(t.isMutationObserved?t.dispatchEvent(xl):(xl.target=t,this.dispatchEvent(xl,!0)),t!==this.document.documentElement&&(t.ownerDocument=null),t.isConnected=!1),t.isCustomElement&&t.disconnectedCallback&&t.disconnectedCallback()},e.mountChildren=function(t){var e=this;this.inited?t.isConnected||(t.ownerDocument=this.document,t.isConnected=!0,t.isMutationObserved?t.dispatchEvent(bl):(bl.target=t,this.dispatchEvent(bl,!0))):console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",t.nodeName),t.childNodes.forEach(function(t){e.mountChildren(t)}),t.isCustomElement&&t.connectedCallback&&t.connectedCallback()},e.client2Viewport=function(t){return this.getEventService().client2Viewport(t)},e.viewport2Client=function(t){return this.getEventService().viewport2Client(t)},e.viewport2Canvas=function(t){return this.getEventService().viewport2Canvas(t)},e.canvas2Viewport=function(t){return this.getEventService().canvas2Viewport(t)},e.getPointByClient=function(t,e){return this.client2Viewport({x:t,y:e})},e.getClientByPoint=function(t,e){return this.viewport2Client({x:t,y:e})},wi(t,[{key:"ready",get:function(){var e=this;return this.readyPromise||(this.readyPromise=new Promise(function(t){e.resolveReadyPromise=function(){t(e)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}}]),t}(Ao);function El(t,e){return(El=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}i=function(i){var t;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).landmarks=[],t.landmarkAnimationID=void 0,t}t=i,(n=e).prototype=Object.create(t.prototype),El(n.prototype.constructor=n,t);var n=e.prototype;return n.rotate=function(t,e,n){if(this.relElevation=ms(e),this.relAzimuth=ms(t),this.relRoll=ms(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===Rc.EXPLORING){e=re(ne(),[1,0,0],bs((this.rotateWorld?1:-1)*this.relElevation)),t=re(ne(),[0,1,0],bs((this.rotateWorld?1:-1)*this.relAzimuth)),n=re(ne(),[0,0,1],bs(this.relRoll)),t=ie(ne(),t,e),t=ie(ne(),t,n),e=Pt(ut(),t);bt(this.matrix,this.matrix,[0,0,-this.distance]),vt(this.matrix,this.matrix,e),bt(this.matrix,this.matrix,[0,0,this.distance])}else{if(90<Math.abs(this.elevation))return this;this.computeMatrix()}return this._getAxes(),this.type===Rc.ORBITING||this.type===Rc.EXPLORING?this._getPosition():this.type===Rc.TRACKING&&this._getFocalPoint(),this._update(),this},n.pan=function(t,e){t=vs(t,e,0),e=It(this.position);return zt(e,e,Vt(m(),this.right,t[0])),zt(e,e,Vt(m(),this.up,t[1])),this._setPosition(e),this.triggerUpdate(),this},n.dolly=function(t){var e=this.forward,n=It(this.position),t=(this.dollyingStep,this.distance+t*this.dollyingStep),t=Math.max(Math.min(t,this.maxDistance),this.minDistance)-this.distance;return n[0]+=t*e[0],n[1]+=t*e[1],n[2]+=t*e[2],this._setPosition(n),this.type===Rc.ORBITING||this.type===Rc.EXPLORING?this._getDistance():this.type===Rc.TRACKING&&zt(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},n.createLandmark=function(t,e){var e=e=void 0===e?{}:e,n=e.position,n=void 0===n?this.position:n,r=e.focalPoint,r=void 0===r?this.focalPoint:r,i=e.roll,e=e.zoom,a=new w.CameraContribution,n=(a.setType(this.type,void 0),a.setPosition(n[0],n[1]||this.position[1],n[2]||this.position[2]),a.setFocalPoint(r[0],r[1]||this.focalPoint[1],r[2]||this.focalPoint[2]),a.setRoll(i||this.roll),a.setZoom(e||this.zoom),{name:t,matrix:ht(a.getWorldTransform()),right:It(a.right),up:It(a.up),forward:It(a.forward),position:It(a.getPosition()),focalPoint:It(a.getFocalPoint()),distanceVector:It(a.getDistanceVector()),distance:a.getDistance(),dollyingStep:a.getDollyingStep(),azimuth:a.getAzimuth(),elevation:a.getElevation(),roll:a.getRoll(),relAzimuth:a.relAzimuth,relElevation:a.relElevation,relRoll:a.relRoll,zoom:a.getZoom()});return this.landmarks.push(n),n},n.gotoLandmark=function(e,t){var n,s,r,i,c,l,u,h,f,d,p,g,y=this,a=(void 0===t&&(t={}),hn(e)?this.landmarks.find(function(t){return t.name===e}):e);a&&(n=void 0===(n=(t=dn(t)?{duration:t}:t).easing)?"linear":n,r=t.duration,s=void 0===r?100:r,r=void 0===(r=t.easingFunction)?void 0:r,t=t.onfinish,i=void 0===t?void 0:t,c=.01,0===s?(this.syncFromLandmark(a),i&&i()):(void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID),l=a.position,u=a.focalPoint,h=a.zoom,f=a.roll,d=r||w.EasingFunction(n),g=function(){y.setFocalPoint(u),y.setPosition(l),y.setRoll(f),y.setZoom(h),y.computeMatrix(),y.triggerUpdate(),i&&i()},this.canvas.requestAnimationFrame(function t(e){var n,r,i,a,o,e=e-(p=void 0===p?e:p);s<e||(n=d(e/s),r=m(),i=m(),a=1,o=0,Ut(r,y.focalPoint,u,n),Ut(i,y.position,l,n),o=y.roll*(1-n)+f*n,a=y.zoom*(1-n)+h*n,y.setFocalPoint(r),y.setPosition(i),y.setRoll(o),y.setZoom(a),Jt(r,u)+Jt(i,l)<=c)?g():(y.computeMatrix(),y.triggerUpdate(),e<s&&(y.landmarkAnimationID=y.canvas.requestAnimationFrame(t)))})))},n.syncFromLandmark=function(t){this.matrix=ft(this.matrix,t.matrix),this.right=Dt(this.right,t.right),this.up=Dt(this.up,t.up),this.forward=Dt(this.forward,t.forward),this.position=Dt(this.position,t.position),this.focalPoint=Dt(this.focalPoint,t.focalPoint),this.distanceVector=Dt(this.distanceVector,t.distanceVector),this.azimuth=t.azimuth,this.elevation=t.elevation,this.roll=t.roll,this.relAzimuth=t.relAzimuth,this.relElevation=t.relElevation,this.relRoll=t.relRoll,this.dollyingStep=t.dollyingStep,this.distance=t.distance,this.zoom=t.zoom},e}(Ec);function Ol(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 Sl(t,e,n){e&&Ol(t.prototype,e),n&&Ol(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function _l(t,e){return(_l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}w.CameraContribution=i;function Al(b,e,x,n){if(!(0<=b&&b<=1&&0<=x&&x<=1))throw new Error("bezier x values must be in [0, 1] range");if(b===e&&x===n)return function(t){return t};for(var w=new(Jl?Float32Array:Array)(11),t=0;t<11;++t)w[t]=nu(.1*t,b,x);function r(t){for(var e=0,n=1;10!==n&&w[n]<=t;++n)e+=.1;var r=e+.1*((t-w[--n])/(w[n+1]-w[n])),i=ru(r,b,x);if(.001<=i){for(var a=t,o=r,s=b,c=x,l=0;l<$l;++l){var u=ru(o,s,c);if(0===u)return o;o-=(nu(o,s,c)-a)/u}return o}if(0===i)return r;for(var h,f,d=t,p=e,g=e+.1,y=b,m=x,v=0;0<(h=nu(f=p+(g-p)/2,y,m)-d)?g=f:p=f,Math.abs(h)>Kl&&++v<Zl;);return f}return function(t){return 0===t||1===t?t:nu(r(t),e,n)}}function Tl(t){return Math.pow(t,2)}function Pl(t){return Math.pow(t,3)}function Ll(t){return Math.pow(t,4)}function Nl(t){return Math.pow(t,5)}function Cl(t){return Math.pow(t,6)}function jl(t){return 1-Math.cos(t*Math.PI/2)}function Rl(t){return 1-Math.sqrt(1-t*t)}function Fl(t){return t*t*(3*t-2)}function Il(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*e-2)/22-t,2)}function Bl(t,e){var n=(e=e=void 0===e?[]:e)[0],e=void 0===(e=e[1])?.5:e,n=fn(Number(void 0===n?1:n),1,10),e=fn(Number(e),.1,2);return 0===t||1===t?t:-n*Math.pow(2,10*(t-1))*Math.sin((t-1-e/(2*Math.PI)*Math.asin(1/n))*(2*Math.PI)/e)}function Dl(t,e,n){var r=(e=e=void 0===e?[]:e)[0],i=void 0===(i=e[1])?100:i,a=void 0===(a=e[2])?10:a,e=void 0===(e=e[3])?0:e,r=fn(void 0===r?1:r,.1,1e3),i=fn(i,.1,1e3),a=fn(a,.1,1e3),e=fn(e,.1,1e3),o=Math.sqrt(i/r),i=(a=a/(2*Math.sqrt(i*r)))<1?o*Math.sqrt(1-a*a):0,r=a<1?(a*o-e)/i:-e+o,e=n?n*t/1e3:t,e=a<1?Math.exp(-e*a*o)*(+Math.cos(i*e)+r*Math.sin(i*e)):(1+r*e)*Math.exp(-e*o);return 0===t||1===t?t:1-e}function Gl(t,e){var e=e=void 0===e?[]:e,n=void 0===(n=e[0])?10:n;return("start"==e[1]?Math.ceil:Math.floor)(fn(t,0,1)*n)/n}function zl(t,e){var n=(e=e=void 0===e?[]:e)[0],r=e[1],i=e[2],e=e[3];return Al(n,r,i,e)(t)}function Wl(r){return function(t,e,n){return 1-r(1-t,e=void 0===e?[]:e,n)}}function Vl(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?r(2*t,e,n)/2:1-r(-2*t+2,e,n)/2}}function Yl(r){return function(t,e,n){return void 0===e&&(e=[]),t<.5?(1-r(1-2*t,e,n))/2:(r(2*t-1,e,n)+1)/2}}function Hl(t){return t}var ql=function(i){var t,e;function n(t,e,n,r){t=i.call(this,t)||this;return t.currentTime=void 0,t.timelineTime=void 0,t.currentTime=n,t.timelineTime=r,t.target=e,t.type="finish",t.bubbles=!1,t.currentTarget=e,t.defaultPrevented=!1,t.eventPhase=t.AT_TARGET,t.timeStamp=Date.now(),t.currentTime=n,t.timelineTime=r,t}return e=i,(t=n).prototype=Object.create(e.prototype),_l(t.prototype.constructor=t,e),n}(So),Ul=0,Xl=function(){function t(t,e){this.effect=void 0,this.timeline=void 0,this.id=void 0,this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this.oldPlayState=void 0,this._holdTime=void 0,this.readyPromise=void 0,this.finishedPromise=void 0,this.resolveReadyPromise=void 0,this.rejectReadyPromise=void 0,this.resolveFinishedPromise=void 0,this.rejectFinishedPromise=void 0,this.onfinish=void 0,this.oncancel=void 0,this.onframe=void 0,this._currentTime=0,this._startTime=void 0,this._playbackRate=1,this._totalDuration=void 0,this._inEffect=void 0,this._inTimeline=!0,this.onremove=void 0,((this.effect=t).animation=this).timeline=e,this.id=""+Ul++,this._inEffect=!!this.effect.update(0),this._totalDuration=Number(null==(t=this.effect)?void 0:t.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}var e=t.prototype;return e.updatePromises=function(){var t=this.oldPlayState,e=this.pending?"pending":this.playState;return this.readyPromise&&e!==t&&("idle"===e?(this.rejectReadyPromise(),this.readyPromise=void 0):"pending"===t?this.resolveReadyPromise():"pending"===e&&(this.readyPromise=void 0)),this.finishedPromise&&e!==t&&("idle"===e?(this.rejectFinishedPromise(),this.finishedPromise=void 0):"finished"===e?this.resolveFinishedPromise():"finished"===t&&(this.finishedPromise=void 0)),this.oldPlayState=e,this.readyPromise||this.finishedPromise},e.play=function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),-1===this.timeline.animations.indexOf(this)&&this.timeline.animations.push(this),this.updatePromises()},e.pause=function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._isFinished||this._paused||this._idle?this._idle&&(this.rewind(),this._idle=!1):this.currentTimePending=!0,this._startTime=null,this._paused=!0,this.updatePromises()},e.finish=function(){this.updatePromises(),this._idle||(this.currentTime=0<this._playbackRate?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.cancel=function(){this.updatePromises(),this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises())},e.reverse=function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),null!==t&&(this.currentTime=t),this.updatePromises()},e.updatePlaybackRate=function(t){this.playbackRate=t},e.targetAnimations=function(){var t;return(null==(t=this.effect)?void 0:t.target).getAnimations()},e.markTarget=function(){var t=this.targetAnimations();-1===t.indexOf(this)&&t.push(this)},e.unmarkTarget=function(){var t=this.targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)},e.tick=function(t,e){this._idle||this._paused||(null===this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this.currentTimePending=!1,this.fireEvents(t))},e.rewind=function(){if(0<=this.playbackRate)this.currentTime=0;else{if(!(this._totalDuration<1/0))throw new Error("Unable to rewind negative playback rate animation with infinite duration");this.currentTime=this._totalDuration}},e.persist=function(){throw new Error(gi)},e.addEventListener=function(t,e,n){throw new Error(gi)},e.removeEventListener=function(t,e,n){throw new Error(gi)},e.dispatchEvent=function(t){throw new Error(gi)},e.commitStyles=function(){throw new Error(gi)},e.ensureAlive=function(){var t;this.playbackRate<0&&0===this.currentTime?this._inEffect=!(null==(t=this.effect)||!t.update(-1)):this._inEffect=!(null==(t=this.effect)||!t.update(this.currentTime)),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,this.timeline.animations.push(this))},e.tickCurrentTime=function(t,e){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=0<this._playbackRate?this._totalDuration:0),this.ensureAlive())},e.fireEvents=function(t){var e,n=this;this._isFinished?this._finishedFlag||(this.onfinish&&(e=new ql(null,this,this.currentTime,t),setTimeout(function(){n.onfinish&&n.onfinish(e)})),this._finishedFlag=!0):(this.onframe&&"running"===this.playState&&(t=new ql(null,this,this.currentTime,t),this.onframe(t)),this._finishedFlag=!1)},Sl(t,[{key:"pending",get:function(){return null===this._startTime&&!this._paused&&0!==this.playbackRate||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var n=this;return this.readyPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(t,e){n.resolveReadyPromise=function(){t(n)},n.rejectReadyPromise=function(){e(new Error)}}),this.pending)||this.resolveReadyPromise(),this.readyPromise}},{key:"finished",get:function(){var n=this;return this.finishedPromise||(-1===this.timeline.animationsWithPromises.indexOf(this)&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(t,e){n.resolveFinishedPromise=function(){t(n)},n.rejectFinishedPromise=function(){e(new Error)}}),"finished"===this.playState&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(t){var e;t=Number(t),isNaN(t)||(this.timeline.restart(),this._paused||null===this._startTime||(this._startTime=Number(null==(e=this.timeline)?void 0:e.currentTime)-t/this.playbackRate),this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this)))}},{key:"startTime",get:function(){return this._startTime},set:function(t){null!==t&&(this.updatePromises(),t=Number(t),isNaN(t)||this._paused||this._idle||(this._startTime=t,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()))}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(t){var e;t!==this._playbackRate&&(this.updatePromises(),e=this.currentTime,this._playbackRate=t,this.startTime=null,"paused"!==this.playState&&"idle"!==this.playState&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),null!==e&&(this.currentTime=e),this.updatePromises())}},{key:"_isFinished",get:function(){return!this._idle&&(0<this._playbackRate&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||"running"===this.playState||!this._finishedFlag}}]),t}(),$l=4,Kl=1e-7,Zl=10,Jl="function"==typeof Float32Array,Ql=function(t,e){return 1-3*e+3*t},tu=function(t,e){return 3*e-6*t},eu=function(t){return 3*t},nu=function(t,e,n){return((Ql(e,n)*t+tu(e,n))*t+eu(e))*t},ru=function(t,e,n){return 3*Ql(e,n)*t*t+2*tu(e,n)*t+eu(e)},uo=Al(.42,0,1,1),iu={steps:Gl,"step-start":function(t){return Gl(t,[1,"start"])},"step-end":function(t){return Gl(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":zl,ease:function(t){return zl(t,[.25,.1,.25,1])},in:uo,out:Wl(uo),"in-out":Vl(uo),"out-in":Yl(uo),"in-quad":Tl,"out-quad":Wl(Tl),"in-out-quad":Vl(Tl),"out-in-quad":Yl(Tl),"in-cubic":Pl,"out-cubic":Wl(Pl),"in-out-cubic":Vl(Pl),"out-in-cubic":Yl(Pl),"in-quart":Ll,"out-quart":Wl(Ll),"in-out-quart":Vl(Ll),"out-in-quart":Yl(Ll),"in-quint":Nl,"out-quint":Wl(Nl),"in-out-quint":Vl(Nl),"out-in-quint":Yl(Nl),"in-expo":Cl,"out-expo":Wl(Cl),"in-out-expo":Vl(Cl),"out-in-expo":Yl(Cl),"in-sine":jl,"out-sine":Wl(jl),"in-out-sine":Vl(jl),"out-in-sine":Yl(jl),"in-circ":Rl,"out-circ":Wl(Rl),"in-out-circ":Vl(Rl),"out-in-circ":Yl(Rl),"in-back":Fl,"out-back":Wl(Fl),"in-out-back":Vl(Fl),"out-in-back":Yl(Fl),"in-bounce":Il,"out-bounce":Wl(Il),"in-out-bounce":Vl(Il),"out-in-bounce":Yl(Il),"in-elastic":Bl,"out-elastic":Wl(Bl),"in-out-elastic":Vl(Bl),"out-in-elastic":Yl(Bl),spring:Dl,"spring-in":Dl,"spring-out":Wl(Dl),"spring-in-out":Vl(Dl),"spring-out-in":Yl(Dl)},au=function(t){return("-"===(t=(t=t).replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})).charAt(0)?t.substring(1):t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()};function ou(n,r){return function(t){var e;return 1<=t?1:(t+=r*(e=1/n))-t%e}}var yo="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",su=new RegExp("cubic-bezier\\("+yo+","+yo+","+yo+","+yo+"\\)"),cu=/steps\(\s*(\d+)\s*\)/,lu=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function uu(t){var e=su.exec(t);return e?Al.apply(void 0,e.slice(1).map(Number)):(e=cu.exec(t))?ou(Number(e[1]),0):(e=lu.exec(t))?ou(Number(e[1]),{start:1,middle:.5,end:0}[e[2]]):iu[au(t)]||iu.linear}function hu(t){return Math.abs((0!==(e=t).duration&&0!==e.iterations?("auto"===e.duration?0:Number(e.duration))*(null!=(e=e.iterations)?e:1):0)/(t.playbackRate||1));var e}var fu=0,du=1,pu=2,gu=3;function yu(t,e,n){l=t,i=n;var r,i,a,o,s,c=null===(c=e)?fu:(r=i.endTime,c<Math.min(i.delay,r)?du:c>=Math.min(i.delay+l+i.endDelay,r)?pu:gu),l=function(t,e,n,r,i){switch(r){case du:return"backwards"===e||"both"===e?0:null;case gu:return n-i;case pu:return"forwards"===e||"both"===e?t:null;case fu:return null}}(t,n.fill,e,c,n.delay);return null===l?null:(i="auto"===n.duration?0:n.duration,r=i,t=c,e=n.iterations,o=l,s=n.iterationStart,0===r?t!==du&&(s+=e):s+=o/r,e=t=s,o=n.iterationStart,s=c,a=n.iterations,l=l,i=i,e=o=0!==(o=e===1/0?o%1:e%1)||s!==pu||0===a||0===l&&0!==i?o:1,s=n.iterations,a=e,l=t,i=c===pu&&s===1/0?1/0:1===a?Math.floor(l)-1:Math.floor(l),o=n.direction,t=i,c=e,a="normal"===(s="normal"!==(s=o)&&"reverse"!==o&&(t=t,"alternate-reverse"===o&&(t+=1),s="normal",t!==1/0)&&t%2!=0?"reverse":s)?c:1-c,n.currentIteration=i,n.progress=a,n.easingFunction(a))}function mu(t,e,n){var a=function(t,e){for(var n={},r=0;r<t.length;r++)for(var i in t[r]){var a;vu(i)&&(a={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:uu(t[r].easing)||e.easingFunction,value:t[r][i]},n[i]=n[i]||[],n[i].push(a))}return n}(t,e),o=function(t,e){var n,r=[];for(n in t)for(var i=t[n],a=0;a<i.length-1;a++){var o=a,s=a+1,c=i[o].computedOffset,l=i[s].computedOffset,u=c,h=l;0===a&&(u=-1/0,0===l)&&(s=o),a===i.length-2&&(h=1/0,1===c)&&(o=s),r.push({applyFrom:u,applyTo:h,startOffset:i[o].computedOffset,endOffset:i[s].computedOffset,easingFunction:i[o].easingFunction,property:n,interpolation:function(t,e,n,r){var i=Dc[t];if(i&&i.syntax&&i.int){i=w.styleValueRegistry.getPropertySyntax(i.syntax);if(i){var a,o=w.styleValueRegistry.parseProperty(t,e,r),s=w.styleValueRegistry.parseProperty(t,n,r),o=w.styleValueRegistry.computeProperty(t,o,r),t=w.styleValueRegistry.computeProperty(t,s,r),s=i.mixer(o,t,r);if(s)return a=bu.apply(void 0,s),function(t){return 0===t?e:1===t?n:a(t)}}}return bu(!1,!0,function(t){return t?n:e})}(n,i[o].value,i[s].value,e)})}return r.sort(function(t,e){return t.startOffset-e.startOffset}),r}(a,n);return function(r,i){if(null!==i)o.filter(function(t){return i>=t.applyFrom&&i<t.applyTo}).forEach(function(t){var e=i-t.startOffset,n=t.endOffset-t.startOffset,e=0==n?0:t.easingFunction(e/n);r.style[t.property]=t.interpolation(e)});else for(var t in a)vu(t)&&(r.style[t]=null)}}function vu(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var bu=function(e,n,r){return function(t){return r(function t(e,n,r){if("number"==typeof e&&"number"==typeof n)return e*(1-r)+n*r;if("boolean"==typeof e&&"boolean"==typeof n||"string"==typeof e&&"string"==typeof n)return r<.5?e:n;if(Array.isArray(e)&&Array.isArray(n)&&e.length===n.length){for(var i=[],a=0;a<e.length;a++)i.push(t(e[a],n[a],r));return i}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(e,n,t))}};var xu=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Hl,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.playbackRate=void 0,this.effect=void 0,this.composite=void 0,this.activeDuration=void 0,this.endTime=void 0,this.currentIteration=null,this.progress=null}return Sl(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=uu(t),this._easing=t}}]),t}();function wu(t,i){if(null===t)return[];for(var e=(t=Array.isArray(t)?t:function(t){var e,n=[];for(e in t)if(!(e in["easing","offset","composite"]))for(var r,i=t[e],a=(i=Array.isArray(i)?i:[i]).length,o=0;o<a;o++)n[o]||(r={},"offset"in t&&(r.offset=Number(t.offset)),"easing"in t&&(r.easing=t.easing),"composite"in t&&(r.composite=t.composite),n[o]=r),void 0!==i[o]&&null!==i[o]&&(n[o][e]=i[o]);return n.sort(function(t,e){return(t.computedOffset||0)-(e.computedOffset||0)}),n}(t)).map(function(t){var e,n={};for(e in null!=i&&i.composite&&(n.composite="auto"),t){var r=t[e];if("offset"===e){if(null!==r){if(r=Number(r),!isFinite(r))throw new Error("Keyframe offsets must be numbers.");if(r<0||1<r)throw new Error("Keyframe offsets must be between 0 and 1.");n.computedOffset=r}}else if("composite"===e&&-1===["replace","add","accumulate","auto"].indexOf(r))throw new Error(r+" compositing is not supported");n[e]=r}return void 0===n.offset&&(n.offset=null),void 0===n.easing&&(n.easing=(null==i?void 0:i.easing)||"linear"),void 0===n.composite&&(n.composite="auto"),n}),n=!0,r=-1/0,a=0;a<e.length;a++){var o=e[a].offset;if(_(o))n=!1;else{if(o<r)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");r=o}}if(e=e.filter(function(t){return 0<=Number(t.offset)&&Number(t.offset)<=1}),!n)for(var s=e.length,c=(e[s-1].computedOffset=Number(null!=(t=e[s-1].offset)?t:1),1<s&&(e[0].computedOffset=Number(null!=(t=e[0].offset)?t:0)),0),l=Number(e[0].computedOffset),u=1;u<s;u++){var h=e[u].computedOffset;if(!_(h)&&!_(l)){for(var f=1;f<u-c;f++)e[c+f].computedOffset=l+(Number(h)-l)*f/(u-c);c=u,l=Number(h)}}return e}var ku="backwards|forwards|both|none".split("|"),Mu="reverse|alternate|alternate-reverse".split("|");function Eu(t,e){var n,r,i;return t=function(t){"number"==typeof t&&(t=isNaN(t)?{duration:"auto"}:{duration:t});return t}(null!=(r=t)?r:{duration:"auto"}),n=t,r=e,i=new xu,r&&(i.fill="both",i.duration="auto"),"number"!=typeof n||isNaN(n)?void 0!==n&&Object.keys(n).forEach(function(t){void 0===n[t]||null===n[t]||"auto"===n[t]||!("number"!=typeof i[t]&&"duration"!==t||"number"==typeof n[t]&&!isNaN(n[t]))||"fill"===t&&-1===ku.indexOf(n[t])||"direction"===t&&-1===Mu.indexOf(n[t])||(i[t]=n[t])}):i.duration=n,i}var Ou=function(){function t(t,e,n){var r=this;this.composite="replace",this.iterationComposite="replace",this.target=void 0,this.animation=void 0,this.timing=void 0,this.computedTiming=void 0,this.normalizedKeyframes=void 0,this.timeFraction=void 0,this.interpolations=void 0,this.target=t,this.timing=Eu(n,!1),(this.timing.effect=this).timing.activeDuration=hu(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=wu(e,this.timing),this.interpolations=mu(this.normalizedKeyframes,this.timing,this.target),this.computedTiming=new Proxy(this.timing,{get:function(t,e){return"duration"===e?"auto"===t.duration?0:t.duration:"fill"===e?"auto"===t.fill?"none":t.fill:"localTime"===e?r.animation&&r.animation.currentTime||null:"currentIteration"===e?r.animation&&"running"===r.animation.playState?t.currentIteration||0:null:"progress"===e?r.animation&&"running"===r.animation.playState?t.progress||0:null:t[e]},set:function(){return!0}})}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=yu(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=wu(t)},e.getComputedTiming=function(){return this.computedTiming},e.getTiming=function(){return this.timing},e.updateTiming=function(e){var n=this;Object.keys(e||{}).forEach(function(t){n.timing=e[t]})},t}();function Su(t,e){return Number(t.id)-Number(e.id)}n=function(){function t(t){var n=this;this.document=void 0,this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.frameId=void 0,this.webAnimationsNextTick=function(t){n.currentTime=t,n.discardAnimations(),0===n.animations.length?n.timelineTicking=!1:n.requestAnimationFrame(n.webAnimationsNextTick)},this.processRafCallbacks=function(e){var t=n.rafCallbacks;n.rafCallbacks=[],e<Number(n.currentTime)&&(e=Number(n.currentTime)),n.animations.sort(Su),n.animations=n.tick(e,!0,n.animations)[0],t.forEach(function(t){t[1](e)}),n.applyPendingEffects()},this.document=t}var e=t.prototype;return e.getAnimations=function(){return this.discardAnimations(),this.animations.slice()},e.isTicking=function(){return this.inTick},e.play=function(t,e,n){t=new Ou(t,e,n),e=new Xl(t,this);return this.animations.push(e),this.restartWebAnimationsNextTick(),e.updatePromises(),e.play(),e.updatePromises(),e},e.applyDirtiedAnimation=function(t){var e=this;this.inTick||(t.markTarget(),(t=t.targetAnimations()).sort(Su),this.tick(Number(this.currentTime),!1,t.slice())[1].forEach(function(t){t=e.animations.indexOf(t);-1!==t&&e.animations.splice(t,1)}),this.applyPendingEffects())},e.restart=function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame},e.destroy=function(){this.document.defaultView.cancelAnimationFrame(this.frameId)},e.applyPendingEffects=function(){this.pendingEffects.forEach(function(t){null!=t&&t.applyInterpolations()}),this.pendingEffects=[]},e.updateAnimationsPromises=function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})},e.discardAnimations=function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return"finished"!==t.playState&&"idle"!==t.playState})},e.restartWebAnimationsNextTick=function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))},e.rAF=function(t){var e=this.rafId++;return 0===this.rafCallbacks.length&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([e,t]),e},e.requestAnimationFrame=function(e){var n=this;return this.rAF(function(t){n.updateAnimationsPromises(),e(t),n.updateAnimationsPromises()})},e.tick=function(n,r,t){var i=this,a=(this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=n,this.ticking=!1,[]),o=[],s=[],c=[];return t.forEach(function(t){t.tick(n,r),t._inEffect?(o.push(t.effect),t.markTarget()):(a.push(t.effect),t.unmarkTarget()),t._needsTick&&(i.ticking=!0);var e=t._inEffect||t._needsTick;((t._inTimeline=e)?s:c).push(t)}),(t=this.pendingEffects).push.apply(t,a),(t=this.pendingEffects).push.apply(t,o),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[s,c]},t}();function _u(t,e){return(_u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Au(t,e){e=e.r;t.arc(e,e,e,0,2*Math.PI,!1)}function Tu(t,e){var n,r,i=e.rx,e=e.ry;t.ellipse?t.ellipse(i,e,i,e,0,0,2*Math.PI,!1):(n=e<i?i:e,r=e<i?1:i/e,e=e<i?e/i:1,t.save(),t.scale(r,e),t.arc(0,0,n,0,2*Math.PI))}function Pu(t,e){var n,r,i=e.x1,a=e.y1,o=e.x2,s=e.y2,c=e.defX,c=void 0===c?0:c,l=e.defY,l=void 0===l?0:l,u=e.markerStart,h=e.markerEnd,f=e.markerStartOffset,e=e.markerEndOffset,d=0,p=0,g=0,y=0,m=0;u&&u instanceof N&&f&&(n=o-i,r=s-a,m=Math.atan2(r,n),d=Math.cos(m)*(f||0),p=Math.sin(m)*(f||0)),h&&h instanceof N&&e&&(n=i-o,r=a-s,m=Math.atan2(r,n),g=Math.cos(m)*(e||0),y=Math.sin(m)*(e||0)),t.moveTo(i-c+d,a-l+p),t.lineTo(o-c+g,s-l+y)}function Lu(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,c=e.markerStartOffset,l=e.markerEndOffset,e=e.path,u=e.absolutePath,h=e.segments,f=0,d=0,p=0,g=0,e=0;i&&i instanceof N&&c&&(r=(i=i.parentNode.getStartTangent())[0],i=i[1],n=r[0]-i[0],r=r[1]-i[1],e=Math.atan2(r,n),f=Math.cos(e)*(c||0),d=Math.sin(e)*(c||0)),s&&s instanceof N&&l&&(c=(i=s.parentNode.getEndTangent())[0],s=i[1],n=c[0]-s[0],r=c[1]-s[1],e=Math.atan2(r,n),p=Math.cos(e)*(l||0),g=Math.sin(e)*(l||0));for(var y=0;y<u.length;y++){var m=u[y],v=m[0],b=u[y+1],x=0===y&&(0!==f||0!==d),w=(y===u.length-1||b&&("M"===b[0]||"Z"===b[0]))&&0!==p&&0!==g;switch(v){case"M":x?(t.moveTo(m[1]-a+f,m[2]-o+d),t.lineTo(m[1]-a,m[2]-o)):t.moveTo(m[1]-a,m[2]-o);break;case"L":w?t.lineTo(m[1]-a+p,m[2]-o+g):t.lineTo(m[1]-a,m[2]-o);break;case"Q":t.quadraticCurveTo(m[1]-a,m[2]-o,m[3]-a,m[4]-o),w&&t.lineTo(m[3]-a+p,m[4]-o+g);break;case"C":t.bezierCurveTo(m[1]-a,m[2]-o,m[3]-a,m[4]-o,m[5]-a,m[6]-o),w&&t.lineTo(m[5]-a+p,m[6]-o+g);break;case"A":var k,M,E=h[y].arcParams,O=E.cx,S=E.cy,_=E.rx,A=E.ry,T=E.startAngle,P=E.endAngle,L=E.xRotation,E=E.sweepFlag;t.ellipse?t.ellipse(O-a,S-o,_,A,L,T,P,!!(1-E)):(k=A<_?_:A,M=A<_?1:_/A,A=A<_?A/_:1,t.translate(O-a,S-o),t.rotate(L),t.scale(M,A),t.arc(0,0,k,T,P,!!(1-E)),t.scale(1/M,1/A),t.rotate(-L),t.translate(-(O-a),-(S-o))),w&&t.lineTo(m[6]-a+p,m[7]-o+g);break;case"Z":t.closePath()}}}function Nu(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,c=e.markerStartOffset,l=e.markerEndOffset,u=e.points.points,h=u.length,e=u[0][0]-a,f=u[0][1]-o,d=u[h-1][0]-a,p=u[h-1][1]-o,g=0,y=0,m=0,v=0,b=0;i&&i instanceof N&&c&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),g=Math.cos(b)*(c||0),y=Math.sin(b)*(c||0)),s&&s instanceof N&&l&&(n=u[h-1][0]-u[0][0],r=u[h-1][1]-u[0][1],b=Math.atan2(r,n),m=Math.cos(b)*(l||0),v=Math.sin(b)*(l||0)),t.moveTo(e+(g||m),f+(y||v));for(var x=1;x<h-1;x++){var w=u[x];t.lineTo(w[0]-a,w[1]-o)}t.lineTo(d,p)}function Cu(t,e){var n,r,i=e.defX,a=void 0===i?0:i,i=e.defY,o=void 0===i?0:i,i=e.markerStart,s=e.markerEnd,c=e.markerStartOffset,l=e.markerEndOffset,u=e.points.points,h=u.length,e=u[0][0]-a,f=u[0][1]-o,d=u[h-1][0]-a,p=u[h-1][1]-o,g=0,y=0,m=0,v=0,b=0;i&&i instanceof N&&c&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),g=Math.cos(b)*(c||0),y=Math.sin(b)*(c||0)),s&&s instanceof N&&l&&(n=u[h-2][0]-u[h-1][0],r=u[h-2][1]-u[h-1][1],b=Math.atan2(r,n),m=Math.cos(b)*(l||0),v=Math.sin(b)*(l||0)),t.moveTo(e+g,f+y);for(var x=1;x<h-1;x++){var w=u[x];t.lineTo(w[0]-a,w[1]-o)}t.lineTo(d+m,p+v)}function ju(t,e){var n,r,i,a,o=e.radius,s=e.width,e=e.height,c=s,l=e;o&&o.some(function(t){return 0!==t})?(n=(s=0<s?1:-1)+(e=0<e?1:-1)==0,r=(o=o.map(function(t){return fn(t,0,Math.min(Math.abs(c)/2,Math.abs(l)/2))}))[0],i=o[1],a=o[2],o=o[3],t.moveTo(s*r,0),t.lineTo(c-s*i,0),0!==i&&t.arc(c-s*i,e*i,i,-e*Math.PI/2,0<s?0:Math.PI,n),t.lineTo(c,l-e*a),0!==a&&t.arc(c-s*a,l-e*a,a,0<s?0:Math.PI,0<e?Math.PI/2:1.5*Math.PI,n),t.lineTo(s*o,l),0!==o&&t.arc(s*o,l-e*o,o,0<e?Math.PI/2:-Math.PI/2,0<s?Math.PI:0,n),t.lineTo(0,e*r),0!==r&&t.arc(s*r,e*r,r,0<s?Math.PI:0,0<e?1.5*Math.PI:Math.PI/2,n)):t.rect(0,0,c,l)}w.EasingFunction=uu,w.AnimationTimeline=n;var Ru=function(i){var t;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).name="canvas-path-generator",t}t=i,(n=e).prototype=Object.create(t.prototype),_u(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){(t={})[M.CIRCLE]=Au,t[M.ELLIPSE]=Tu,t[M.RECT]=ju,t[M.LINE]=Pu,t[M.POLYLINE]=Cu,t[M.POLYGON]=Nu,t[M.PATH]=Lu,t[M.TEXT]=void 0,t[M.GROUP]=void 0,t[M.IMAGE]=void 0,t[M.HTML]=void 0,t[M.MESH]=void 0;var t;this.context.pathGeneratorFactory=t},n.destroy=function(){delete this.context.pathGeneratorFactory},e}(Qc);function Fu(){Fu=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function Iu(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function Bu(t,e){return(Bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Du(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 Gu(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?Du(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)?Du(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.")}var zu=m(),Wu=m(),Vu=m(),Yu=ut(),Hu=function(){function s(){var o=this;this.canvasConfig=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.isHit=function(t,e,n,r){var i=o.pointInPathPickerFactory[t.nodeName];if(i){var n=yt(Yu,n),e=Xt(Wu,Gt(Vu,e[0],e[1],0),n),n=t.getGeometryBounds().halfExtents,a=t.parsedStyle.anchor;if(e[0]+=(a&&a[0]||0)*n[0]*2,e[1]+=(a&&a[1]||0)*n[1]*2,i(t,new Jr(e[0],e[1]),r,o.isPointInPath))return!0}return!1},this.isPointInPath=function(t,e){var n=w.offscreenCanvas.getOrCreateContext(o.canvasConfig.offscreenCanvas),r=o.pathGeneratorFactory[t.nodeName];return r&&(n.beginPath(),r(n,t.parsedStyle),n.closePath()),n.isPointInPath(e.x,e.y)}}var t=s.prototype;return t.apply=function(t){var n=this,e=t.config,r=t.renderingService,i=t.renderingContext,a=t.pathGeneratorFactory,t=t.pointInPathPickerFactory,o=(this.canvasConfig=e,this.pathGeneratorFactory=a,this.pointInPathPickerFactory=t,null==(e=i.root)?void 0:e.ownerDocument);r.hooks.pick.tapPromise(s.tag,function(){s=Fu().mark(function t(e){return Fu().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",n.pick(o,e));case 1:case"end":return t.stop()}},t)});var s,e=function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Iu(r,e,n,i,a,"next",t)}function a(t){Iu(r,e,n,i,a,"throw",t)}i(void 0)})};return function(t){return e.apply(this,arguments)}}()),r.hooks.pickSync.tap(s.tag,function(t){return n.pick(o,t)})},t.pick=function(t,e){for(var n=e.topmost,r=e.position,i=r.x,r=r.y,a=Gt(zu,i,r,0),o=[],s=Gu(t.elementsFromBBox(a[0],a[1],a[0],a[1]));!(c=s()).done;){var c=c.value,l=c.getWorldTransform();if(this.isHit(c,a,l,!1)){l=ui(c);if(l){l=l.parsedStyle.clipPath;if(this.isHit(l,a,l.getWorldTransform(),!0)){if(n)return e.picked=[c],e;o.push(c)}}else{if(n)return e.picked=[c],e;o.push(c)}}}return e.picked=o,e},s}();function qu(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Uu(t,e){return Math.abs(t-e)<.001}function Xu(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 $u(t){return(t+2*Math.PI)%(2*Math.PI)}Hu.tag="CanvasPicker";var Ku={box:function(t,e,n,r){return Xu([t,n],[e,r])},length:qu,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?qu(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?qu(n,r,i,a):this.pointToLine(t,e,n,r,i,a)},pointToLine:function(t,e,n,r,i,a){n=[n-t,r-e];return be(n,[0,0])?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(me(r=[-n[1],n[0]],r),Math.abs(ve([i-t,a-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Zu(t,e,n,r,i,a){for(var o=-1,s=1/0,c=[n,r],l=20,u=1/(l=a&&200<a?a/10:l),h=u/10,f=0;f<=l;f++){var d=f*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=qu(c[0],c[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&&!(h<1e-4);g++){var y=o-h,m=o+h,v=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=qu(c[0],c[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=qu(c[0],c[1],y[0],y[1]),m<=1&&v<s?(o=m,s=v):h*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function Ju(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Qu(t,e,n){n=t+n-2*e;return Uu(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function th(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function eh(t,e,n,r,i,a,o){var s=Ju(t,n,i,o),c=Ju(e,r,a,o),l=Ku.pointAt(t,e,n,r,o),n=Ku.pointAt(n,r,i,a,o);return[[t,e,l.x,l.y,s,c],[s,c,n.x,n.y,i,a]]}function nh(t,e,n,r,i,a,o){return 0===o?(qu(t,e,n,r)+qu(n,r,i,a)+qu(t,e,i,a))/2:(e=(t=eh(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),nh.apply(void 0,e)+nh.apply(void 0,n))}var rh={box:function(t,e,n,r,i,a){var o=Qu(t,n,i)[0],s=Qu(e,r,a)[0],c=[t,i],l=[e,a];return void 0!==o&&c.push(Ju(t,n,i,o)),void 0!==s&&l.push(Ju(e,r,a,s)),Xu(c,l)},length:function(t,e,n,r,i,a){return nh(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return Zu([t,n,i],[e,r,a],o,s,Ju)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return qu(t.x,t.y,o,s)},interpolationAt:Ju,pointAt:function(t,e,n,r,i,a,o){return{x:Ju(t,n,i,o),y:Ju(e,r,a,o)}},divide:eh,tangentAngle:function(t,e,n,r,i,a,o){t=th(t,n,i,o),n=th(e,r,a,o);return $u(Math.atan2(n,t))}};function ih(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 ah(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 oh(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 Uu(r,0)?Uu(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Uu(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 sh(t,e,n,r,i,a,o,s,c){var l=ih(t,n,i,o,c),u=ih(e,r,a,s,c),h=Ku.pointAt(t,e,n,r,c),n=Ku.pointAt(n,r,i,a,c),r=Ku.pointAt(i,a,o,s,c),i=Ku.pointAt(h.x,h.y,n.x,n.y,c),a=Ku.pointAt(n.x,n.y,r.x,r.y,c);return[[t,e,h.x,h.y,i.x,i.y,l,u],[l,u,a.x,a.y,r.x,r.y,o,s]]}function ch(t,e,n,r,i,a,o,s,c){if(0===c){for(var l=[t,n,i,o],u=[e,r,a,s],h=0,f=l.length,d=0;d<f;d++)h+=qu(l[d],u[d],l[(d+1)%f],u[(d+1)%f]);return h/2}t=sh(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[c-1]),n=[].concat(t[1],[c-1]);return ch.apply(void 0,e)+ch.apply(void 0,n)}var lh={extrema:oh,box:function(t,e,n,r,i,a,o,s){for(var c=[t,o],l=[e,s],u=oh(t,n,i,o),h=oh(e,r,a,s),f=0;f<u.length;f++)c.push(ih(t,n,i,o,u[f]));for(var d=0;d<h.length;d++)l.push(ih(e,r,a,s,h[d]));return Xu(c,l)},length:function(t,e,n,r,i,a,o,s){return ch(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,c,l,u){return Zu([t,n,i,o],[e,r,a,s],c,l,ih,u)},pointDistance:function(t,e,n,r,i,a,o,s,c,l,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,c,l,u);return qu(t.x,t.y,c,l)},interpolationAt:ih,pointAt:function(t,e,n,r,i,a,o,s,c){return{x:ih(t,n,i,o,c),y:ih(e,r,a,s,c)}},divide:sh,tangentAngle:function(t,e,n,r,i,a,o,s,c){t=ah(t,n,i,o,c),n=ah(e,r,a,s,c);return $u(Math.atan2(n,t))}};function uh(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function hh(t,e,n,r,i,a){return t<=i&&i<=t+n&&e<=a&&a<=e+r}function fh(t,e,n,r,i,a,o,s){var c=(Math.atan2(s-e,o-t)+2*Math.PI)%(2*Math.PI),t={x:t+n*Math.cos(c),y:e+n*Math.sin(c)};return uh(t.x,t.y,o,s)<=a/2}function dh(t,e,n,r,i,a,o){var s=Math.min(t,n),c=Math.max(t,n),l=Math.min(e,r),u=Math.max(e,r),h=i/2;return s-h<=a&&a<=c+h&&l-h<=o&&o<=u+h&&Ku.pointToLine(t,e,n,r,a,o)<=i/2}function ph(t,e,n,r,i){var a=t.length;if(!(a<2)){for(var o=0;o<a-1;o++)if(dh(t[o][0],t[o][1],t[o+1][0],t[o+1][1],e,n,r))return!0;if(i){var i=t[0],s=t[a-1];if(dh(i[0],i[1],s[0],s[1],e,n,r))return!0}}return!1}var gh=1e-6;function yh(t){return Math.abs(t)<gh?0:t<0?-1:1}function mh(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var a,o,s,c=0;c<i;c++){var l=t[c],u=t[(c+1)%i];if(o=u,((s=[e,n])[0]-(a=l)[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!0;0<yh(l[1]-n)!=0<yh(u[1]-n)&&yh(e-(n-l[1])*(l[0]-u[0])/(l[1]-u[1])-l[0])<0&&(r=!r)}return r}function vh(t,e,n){for(var r=!1,i=0;i<t.length&&!(r=mh(t[i],e,n));i++);return r}function bh(t,e,n){var t=t.parsedStyle,r=t.r,i=t.fill,a=t.stroke,o=t.lineWidth,s=t.increasedLineWidthForHitTesting,t=t.pointerEvents,o=((o||0)+(s||0))/2,s=uh(r,r,e.x,e.y),e=hc(t,i,a),t=e[0],i=e[1];return t&&i||n?s<=r+o:t?s<=r:!!i&&r-o<=s&&s<=r+o}function xh(t,e,n,r){return t/(n*n)+e/(r*r)}function wh(t,e,n){var t=t.parsedStyle,r=t.rx,i=t.ry,a=t.fill,o=t.stroke,s=t.lineWidth,c=t.increasedLineWidthForHitTesting,t=t.pointerEvents,l=e.x,e=e.y,t=hc(t,a,o),a=t[0],o=t[1],t=((s||0)+(c||0))/2,s=(l-r)*(l-r),c=(e-i)*(e-i);return a&&o||n?xh(s,c,r+t,i+t)<=1:a?xh(s,c,r,i)<=1:!!o&&1<=xh(s,c,r-t,i-t)&&xh(s,c,r+t,i+t)<=1}function kh(t,e,n){var t=t.parsedStyle,r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.lineWidth,c=t.increasedLineWidthForHitTesting,l=t.defX,u=t.defY;return!(!hc(t.pointerEvents,t.fill,t.stroke)[1]&&!n||!s)&&dh(r,i,a,o,(s||0)+(c||0),e.x+(void 0===l?0:l),e.y+(void 0===u?0:u))}function Mh(t,e,n,r){var i=t.parsedStyle,a=i.lineWidth,o=i.increasedLineWidthForHitTesting,s=i.stroke,c=i.fill,l=i.defX,l=void 0===l?0:l,u=i.defY,u=void 0===u?0:u,h=i.path,i=hc(i.pointerEvents,c,s),c=i[0],s=i[1],i=h.segments,f=h.hasArc,d=h.polylines,h=h.polygons,p=Qs(t),g=!1;return c||n?f?r(t,e):vh(h,e.x+l,e.y+u)||vh(d,e.x+l,e.y+u):s||n?function(t,e,n,r,i){for(var a=!1,o=e/2,s=0;s<t.length;s++){var c=t[s],l=c.currentPoint,u=c.params,h=c.prePoint,f=c.box;if(!f||hh(f.x-o,f.y-o,f.width+e,f.height+e,n,r))switch(c.command){case"L":case"Z":if(a=dh(h[0],h[1],l[0],l[1],e,n,r))return!0;break;case"Q":if(a=rh.pointDistance(h[0],h[1],u[1],u[2],u[3],u[4],n,r)<=e/2)return!0;break;case"C":if(a=lh.pointDistance(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],n,r,i)<=e/2)return!0;break;case"A":c.cubicParams||(c.cubicParams=Ge(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var d=c.cubicParams,p=h,g=0;g<d.length;g+=6){var y=lh.pointDistance(p[0],p[1],d[g],d[g+1],d[g+2],d[g+3],d[g+4],d[g+5],n,r,i),p=[d[g+4],d[g+5]];if(a=y<=e/2)return!0}}}return a}(i,(a||0)+(o||0),e.x+l,e.y+u,p):g}function Eh(t,e,n){var t=t.parsedStyle,r=t.stroke,i=t.fill,a=t.lineWidth,o=t.increasedLineWidthForHitTesting,s=t.points,c=t.defX,c=void 0===c?0:c,l=t.defY,l=void 0===l?0:l,t=hc(t.pointerEvents,i,r),i=t[0],r=!1;return r=(r=t[1]||n?ph(s.points,(a||0)+(o||0),e.x+c,e.y+l,!0):r)||!i&&!n?r:mh(s.points,e.x+c,e.y+l)}function Oh(t,e,n){var t=t.parsedStyle,r=t.lineWidth,i=t.increasedLineWidthForHitTesting,a=t.points,o=t.defX,s=t.defY;return!(!hc(t.pointerEvents,t.fill,t.stroke)[1]&&!n||!r)&&ph(a.points,(r||0)+(i||0),e.x+(void 0===o?0:o),e.y+(void 0===s?0:s),!1)}function Sh(t,e,n,r){var i,a,o,s,c,l,u,h,f,d=t.parsedStyle,p=d.radius,g=d.fill,y=d.stroke,m=d.lineWidth,v=d.increasedLineWidthForHitTesting,b=d.width,x=d.height,d=hc(d.pointerEvents,g,y),g=d[0],y=d[1],d=(m||0)+(v||0);return p&&p.some(function(t){return 0!==t})?(m=!1,(y||n)&&(u=v=0,s=b,l=x,p=p.map(function(t){return fn(t,0,Math.min(Math.abs(b)/2,Math.abs(x)/2))}),f=d,i=e.x,a=e.y,h=p[0],o=p[1],c=p[2],p=p[3],m=dh(v+h,u,v+s-o,u,f,i,a)||dh(v+s,u+o,v+s,u+l-c,f,i,a)||dh(v+s-c,u+l,v+p,u+l,f,i,a)||dh(v,u+l-p,v,u+h,f,i,a)||fh(v+s-o,u+o,o,Math.PI,Math.PI,f,i,a)||fh(v+s-c,u+l-c,c,0,Math.PI,f,i,a)||fh(v+p,u+l-p,p,Math.PI,Math.PI,f,i,a)||fh(v+h,u+h,h,Math.PI,Math.PI,f,i,a)),m||!g&&!n?m:r(t,e)):(o=d/2,g&&y||n?hh(0-o,0-o,b+o,x+o,e.x,e.y):g?hh(0,0,b,x,e.x,e.y):!!y&&(c=s=0,l=b,p=x,v=d,u=e.x,h=e.y,hh(s-(f=v/2),c-f,l,v,u,h)||hh(s+l-f,c-f,v,p,u,h)||hh(s+f,c+p-f,l,v,u,h)||hh(s-f,c+f,v,p,u,h)))}var _h=function(i){var t;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).name="canvas-picker",t}t=i,(n=e).prototype=Object.create(t.prototype),Bu(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){function t(){return!0}(e={})[M.CIRCLE]=bh,e[M.ELLIPSE]=wh,e[M.RECT]=Sh,e[M.LINE]=kh,e[M.POLYLINE]=Oh,e[M.POLYGON]=Eh,e[M.PATH]=Mh,e[M.TEXT]=t,e[M.GROUP]=null,e[M.IMAGE]=t,e[M.HTML]=null,e[M.MESH]=null;var e;this.context.pointInPathPickerFactory=e,this.addRenderingPlugin(new Hu)},n.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(Qc);function Ah(){Ah=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function Th(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function Ph(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Th(r,e,n,i,a,"next",t)}function a(t){Th(r,e,n,i,a,"throw",t)}i(void 0)})}}function Lh(){return(Lh=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 Nh(t,e){return(Nh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Ch=function(){function r(t){this.canvasRendererPluginOptions=void 0,this.context=void 0,this.pathGeneratorFactory=void 0,this.rBush=void 0,this.removedRBushNodeAABBs=[],this.renderQueue=[],this.restoreStack=[],this.clearFullScreen=!1,this.vpMatrix=ut(),this.dprMatrix=ut(),this.tmpMat4=ut(),this.vec3a=m(),this.vec3b=m(),this.vec3c=m(),this.vec3d=m(),this.canvasRendererPluginOptions=t}var t=r.prototype;return t.apply=function(t){function a(t){(t=t.target.rBushNode).aabb&&u.removedRBushNodeAABBs.push(t.aabb)}function o(t){(t=t.target.rBushNode).aabb&&u.removedRBushNodeAABBs.push(t.aabb)}function l(t,e){t.isVisible()&&!t.isCulled()&&(u.renderDisplayObject(t,e,u.context,u.restoreStack),u.saveDirtyAABB(t)),(t.sortable.sorted||t.childNodes).forEach(function(t){l(t,e)})}var u=this,h=(this.context=t).config,f=t.camera,c=t.renderingService,d=t.renderingContext,e=t.rBushRoot,n=t.pathGeneratorFactory,p=(this.rBush=e,this.pathGeneratorFactory=n,t.contextService),g=d.root.ownerDocument.defaultView;c.hooks.init.tapPromise(r.tag,Ph(Ah().mark(function t(){var e,n,r,i;return Ah().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:g.addEventListener(y.UNMOUNTED,a),g.addEventListener(y.CULLED,o),e=p.getDPR(),n=h.width,r=h.height,i=p.getContext(),u.clearRect(i,0,0,n*e,r*e,h.background);case 6:case"end":return t.stop()}},t)}))),c.hooks.destroy.tap(r.tag,function(){g.removeEventListener(y.UNMOUNTED,a),g.removeEventListener(y.CULLED,o)}),c.hooks.beginFrame.tap(r.tag,function(){var t=p.getContext(),e=p.getDPR(),n=h.width,r=h.height,i=u.canvasRendererPluginOptions,a=i.dirtyObjectNumThreshold,i=i.dirtyObjectRatioThreshold,o=c.getStats(),s=o.total,o=o.rendered,s=o/s;u.clearFullScreen=c.disableDirtyRectangleRendering()||a<o&&i<s,t&&(t.resetTransform(),u.clearFullScreen)&&u.clearRect(t,0,0,n*e,r*e,h.background)});c.hooks.endFrame.tap(r.tag,function(){var e=p.getContext(),t=p.getDPR();if(Et(u.dprMatrix,k(t,t,1)),vt(u.vpMatrix,u.dprMatrix,f.getOrthoMatrix()),u.clearFullScreen)l(d.root,e);else{t=u.safeMergeAABB.apply(u,[u.mergeDirtyAABBs(u.renderQueue)].concat(u.removedRBushNodeAABBs.map(function(t){var e=t.minX,n=t.minY,r=t.maxX,t=t.maxY,i=new $r;return i.setMinMax(k(e,n,0),k(r,t,0)),i})));if(u.removedRBushNodeAABBs=[],$r.isEmpty(t))return void(u.renderQueue=[]);var n=u.convertAABB2Rect(t),r=n.x,i=n.y,a=n.width,n=n.height,o=Xt(u.vec3a,k(r,i,0),u.vpMatrix),s=Xt(u.vec3b,k(r+a,i,0),u.vpMatrix),c=Xt(u.vec3c,k(r,i+n,0),u.vpMatrix),r=Xt(u.vec3d,k(r+a,i+n,0),u.vpMatrix),a=Math.min(o[0],s[0],r[0],c[0]),i=Math.min(o[1],s[1],r[1],c[1]),n=Math.max(o[0],s[0],r[0],c[0]),o=Math.max(o[1],s[1],r[1],c[1]),s=Math.floor(a),r=Math.floor(i),c=Math.ceil(n-a),n=Math.ceil(o-i);e.save(),u.clearRect(e,s,r,c,n,h.background),e.beginPath(),e.rect(s,r,c,n),e.clip(),e.setTransform(u.vpMatrix[0],u.vpMatrix[1],u.vpMatrix[4],u.vpMatrix[5],u.vpMatrix[12],u.vpMatrix[13]),h.renderer.getConfig().enableDirtyRectangleRenderingDebug&&g.dispatchEvent(new _o(Uc.DIRTY_RECTANGLE,{dirtyRect:{x:s,y:r,width:c,height:n}})),u.searchDirtyObjects(t).sort(function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}).forEach(function(t){t&&t.isVisible()&&!t.isCulled()&&u.renderDisplayObject(t,e,u.context,u.restoreStack)}),e.restore(),u.renderQueue.forEach(function(t){u.saveDirtyAABB(t)}),u.renderQueue=[]}u.restoreStack.forEach(function(){e.restore()}),u.restoreStack=[]}),c.hooks.render.tap(r.tag,function(t){u.clearFullScreen||u.renderQueue.push(t)})},t.clearRect=function(t,e,n,r,i,a){t.clearRect(e,n,r,i),a&&(t.fillStyle=a,t.fillRect(e,n,r,i))},t.renderDisplayObject=function(t,e,n,r){var i,a=t.nodeName,o=r[r.length-1],o=(!o||t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINS||(e.restore(),r.pop()),this.context.styleRendererFactory[a]),a=this.pathGeneratorFactory[a],s=t.parsedStyle.clipPath;s&&(this.applyWorldTransform(e,s),i=this.pathGeneratorFactory[s.nodeName])&&(e.save(),r.push(t),e.beginPath(),i(e,s.parsedStyle),e.closePath(),e.clip()),o&&(this.applyWorldTransform(e,t),e.save(),this.applyAttributesToContext(e,t)),a&&(e.beginPath(),a(e,t.parsedStyle),t.nodeName!==M.LINE)&&t.nodeName!==M.PATH&&t.nodeName!==M.POLYLINE&&e.closePath(),o&&(o.render(e,t.parsedStyle,t,n,this),e.restore()),t.renderable.dirty=!1},t.convertAABB2Rect=function(t){var e=t.getMin(),t=t.getMax(),n=Math.floor(e[0]),e=Math.floor(e[1]);return{x:n,y:e,width:Math.ceil(t[0])-n,height:Math.ceil(t[1])-e}},t.mergeDirtyAABBs=function(t){var n=new $r;return t.forEach(function(t){var e=t.getRenderBounds(),e=(n.add(e),t.renderable.dirtyRenderBounds);e&&n.add(e)}),n},t.searchDirtyObjects=function(t){var e=t.getMin(),n=e[0],e=e[1],t=t.getMax(),r=t[0],t=t[1];return this.rBush.search({minX:n,minY:e,maxX:r,maxY:t}).map(function(t){t=t.id;return w.displayObjectPool.getByEntity(t)})},t.saveDirtyAABB=function(t){var e=t.renderable,t=(e.dirtyRenderBounds||(e.dirtyRenderBounds=new $r),t.getRenderBounds());t&&e.dirtyRenderBounds.update(t.center,t.halfExtents)},t.applyAttributesToContext=function(t,e){var n=e.parsedStyle,r=n.stroke,i=n.fill,a=n.opacity,o=n.lineDash,n=n.lineDashOffset;o&&t.setLineDash(o),_(n)||(t.lineDashOffset=n),_(a)||(t.globalAlpha*=a),_(r)||Array.isArray(r)||r.isNone||(t.strokeStyle=e.attributes.stroke),_(i)||Array.isArray(i)||i.isNone||(t.fillStyle=e.attributes.fill)},t.applyWorldTransform=function(t,e,n){var r=0,i=0,a=(e.parsedStyle||{}).anchor,o=a&&a[0]||0,a=a&&a[1]||0;0===o&&0===a||(r=-o*((o=e.getGeometryBounds())&&2*o.halfExtents[0]||0),i=-a*(o&&2*o.halfExtents[1]||0)),n?(ft(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,bt(this.tmpMat4,this.tmpMat4,this.vec3a),vt(this.tmpMat4,n,this.tmpMat4)):(ft(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,bt(this.tmpMat4,this.tmpMat4,this.vec3a)),vt(this.tmpMat4,this.vpMatrix,this.tmpMat4),t.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])},t.safeMergeAABB=function(){for(var e=new $r,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){e.add(t)}),e},r}(),jh=(Ch.tag="CanvasRenderer",function(){function t(t){this.imagePool=void 0,this.imagePool=t}var e=t.prototype;return e.render=function(t,e,n,r,i){var a=e.fill,o=e.fillRule,s=e.opacity,c=e.fillOpacity,l=e.stroke,u=e.strokeOpacity,h=e.lineWidth,f=e.lineCap,d=e.lineJoin,p=e.shadowType,g=e.shadowColor,y=e.shadowBlur,m=e.filter,e=e.miterLimit,v=!_(a)&&!a.isNone,b=!_(l)&&!l.isNone&&0<h,x=0===a.alpha,m=!(!m||!m.length),g=!_(g)&&0<y,y=n.nodeName,p="inner"===p,y=b&&g&&(y===M.PATH||y===M.LINE||y===M.POLYLINE||x||p);v&&(t.globalAlpha=s*c,y||Rh(n,t,g),this.fill(t,n,a,o,r,i),y||this.clearShadowAndFilter(t,m,g)),b&&(t.globalAlpha=s*u,t.lineWidth=h,_(e)||(t.miterLimit=e),_(f)||(t.lineCap=f),_(d)||(t.lineJoin=d),y&&(p&&(t.globalCompositeOperation="source-atop"),Rh(n,t,!0),p)&&(this.stroke(t,n,l,r,i),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,m,!0)),this.stroke(t,n,l,r,i))},e.clearShadowAndFilter=function(t,e,n){n&&(t.shadowColor="transparent",t.shadowBlur=0),e&&(n=t.filter,!_(n))&&-1<n.indexOf("drop-shadow")&&(t.filter=n.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")},e.fill=function(e,n,t,r,i,a){var o=this;Array.isArray(t)?t.forEach(function(t){e.fillStyle=o.getColor(t,n,e),e.fill(r)}):(ba(t)&&(e.fillStyle=this.getPattern(t,n,e,i,a)),e.fill(r))},e.stroke=function(e,n,t,r,i){var a=this;Array.isArray(t)?t.forEach(function(t){e.strokeStyle=a.getColor(t,n,e),e.stroke()}):(ba(t)&&(e.strokeStyle=this.getPattern(t,n,e,r,i)),e.stroke())},e.getPattern=function(t,e,n,r,i){var a,o,s,c,l,u,h;return t.image instanceof ps&&(a=(o=t.image.parsedStyle).width,o=o.height,s=r.contextService.getDPR(),c=r.config.offscreenCanvas,(l=w.offscreenCanvas.getOrCreateCanvas(c)).width=a*s,l.height=o*s,u=w.offscreenCanvas.getOrCreateContext(c),h=[],t.image.forEach(function(t){i.renderDisplayObject(t,u,r,h)}),h.forEach(function(){u.restore()})),this.imagePool.getOrCreatePatternSync(t,n,l,s,function(){e.renderable.dirty=!0,r.renderingService.dirtify()})},e.getColor=function(t,e,n){var r;return t.type!==Ni.LinearGradient&&t.type!==Ni.RadialGradient||(r=(e=e.getGeometryBounds())&&2*e.halfExtents[0]||1,e=e&&2*e.halfExtents[1]||1,r=this.imagePool.getOrCreateGradient(Lh({type:t.type},t.value,{width:r,height:e}),n)),r},t}());function Rh(t,e,n){var r=t.parsedStyle,i=r.filter,a=r.shadowColor,o=r.shadowBlur,s=r.shadowOffsetX,r=r.shadowOffsetY;i&&i.length&&(e.filter=t.style.filter),n&&(e.shadowColor=a.toString(),e.shadowBlur=o||0,e.shadowOffsetX=s||0,e.shadowOffsetY=r||0)}var Fh=function(){function t(t){this.imagePool=void 0,this.imagePool=t}return t.prototype.render=function(t,e,n){var r=e.width,i=e.height,a=e.img,o=e.shadowColor,e=e.shadowBlur,a=hn(a)?this.imagePool.getImageSync(a):(r=r||a.width,i=i||a.height,a);if(a){Rh(n,t,!_(o)&&0<e);try{t.drawImage(a,0,0,r,i)}catch(t){}}},t}(),Ih=function(){function t(){}var e=t.prototype;return e.render=function(t,e,n){var r=e.lineWidth,i=e.textAlign,a=e.textBaseline,o=e.lineJoin,s=e.miterLimit,c=e.letterSpacing,l=e.stroke,u=e.fill,h=e.fillOpacity,f=e.strokeOpacity,d=e.opacity,p=e.metrics,g=e.dx,y=e.dy,m=e.shadowColor,e=e.shadowBlur,v=p.font,b=p.lines,x=p.height,w=p.lineHeight,k=p.lineMetrics,M=(t.font=v,t.lineWidth=r,t.textAlign="middle"===i?"center":i,t.textBaseline=a,t.lineJoin=o,_(s)||(t.miterLimit=s),0),E=("middle"===a?M=-x/2-w/2:"bottom"===a||"alphabetic"===a||"ideographic"===a?M=-x:"top"!==a&&"hanging"!==a||(M=-w),g||0);M+=y||0,Rh(n,t,!_(m)&&0<e);for(var O=0;O<b.length;O++){var S=r/2+E;M+=w,_(l)||l.isNone||!r||this.drawLetterSpacing(t,b[O],k[O],i,S,M,c,h,f,d,!0),_(u)||this.drawLetterSpacing(t,b[O],k[O],i,S,M,c,h,f,d)}},e.drawLetterSpacing=function(t,e,n,r,i,a,o,s,c,l,u){if(void 0===u&&(u=!1),0===o)u?this.strokeText(t,e,i,a,c):this.fillText(t,e,i,a,s,l);else{for(var h=t.textAlign,f=(t.textAlign="left",i),d=("center"===r||"middle"===r?f=i-n.width/2:"right"!==r&&"end"!==r||(f=i-n.width),Array.from(e)),p=t.measureText(e).width,g=0;g<d.length;++g){var y=d[g];u?this.strokeText(t,y,f,a,c):this.fillText(t,y,f,a,s,l),f+=p-(y=t.measureText(e.substring(g+1)).width)+o,p=y}t.textAlign=h}},e.fillText=function(t,e,n,r,i,a){var o,s=!_(i)&&1!==i;s&&(o=t.globalAlpha,t.globalAlpha=i*a),t.fillText(e,n,r),s&&(t.globalAlpha=o)},e.strokeText=function(t,e,n,r,i){var a,o=!_(i)&&1!==i;o&&(a=t.globalAlpha,t.globalAlpha=i),t.strokeText(e,n,r),o&&(t.globalAlpha=a)},t}(),Bh=function(n){var t;function e(t){var e;return void 0===t&&(t={}),(e=n.call(this)||this).options=void 0,e.name="canvas-renderer",e.options=t,e}t=n,(r=e).prototype=Object.create(t.prototype),Nh(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){var t,e=Lh({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,r=new jh(n),n=((t={})[M.CIRCLE]=r,t[M.ELLIPSE]=r,t[M.RECT]=r,t[M.IMAGE]=new Fh(n),t[M.TEXT]=new Ih,t[M.LINE]=r,t[M.POLYLINE]=r,t[M.POLYGON]=r,t[M.PATH]=r,t[M.GROUP]=void 0,t[M.HTML]=void 0,t[M.MESH]=void 0,t);this.context.defaultStyleRendererFactory=n,this.context.styleRendererFactory=n,this.addRenderingPlugin(new Ch(e))},r.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(Qc);function Dh(){Dh=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function Gh(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function zh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Gh(r,e,n,i,a,"next",t)}function a(t){Gh(r,e,n,i,a,"throw",t)}i(void 0)})}}function Wh(t,e){return(Wh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Vh=function(){function r(){this.context=void 0}return r.prototype.apply=function(t){function i(t){e.hooks.pointerWheel.call(t)}var a=this,e=t.renderingService,n=t.renderingContext,o=(this.context=t,n.root.ownerDocument.defaultView),s=function(t){e.hooks.pointerMove.call(t)},c=function(t){e.hooks.pointerUp.call(t)},l=function(t){e.hooks.pointerDown.call(t)},u=function(t){e.hooks.pointerOver.call(t)},h=function(t){e.hooks.pointerOut.call(t)},f=function(t){e.hooks.pointerCancel.call(t)};e.hooks.init.tapPromise(r.tag,zh(Dh().mark(function t(){var r;return Dh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=a.context.contextService.getDomElement(),globalThis.navigator.msPointerEnabled?(r.style.msContentZooming="none",r.style.msTouchAction="none"):o.supportsPointerEvents&&(r.style.touchAction="none"),o.supportsPointerEvents?(n=r,globalThis.document.addEventListener("pointermove",s,!0),n.addEventListener("pointerdown",l,!0),n.addEventListener("pointerleave",h,!0),n.addEventListener("pointerover",u,!0),globalThis.addEventListener("pointerup",c,!0)):(n=r,globalThis.document.addEventListener("mousemove",s,!0),n.addEventListener("mousedown",l,!0),n.addEventListener("mouseout",h,!0),n.addEventListener("mouseover",u,!0),globalThis.addEventListener("mouseup",c,!0)),o.supportsTouchEvents&&((e=r).addEventListener("touchstart",l,!0),e.addEventListener("touchend",c,!0),e.addEventListener("touchmove",s,!0),e.addEventListener("touchcancel",f,!0)),r.addEventListener("wheel",i,{passive:!0,capture:!0});case 5:case"end":return t.stop()}var e,n},t)}))),e.hooks.destroy.tap(r.tag,function(){var t,e,n=a.context.contextService.getDomElement();globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="",n.style.msTouchAction=""):o.supportsPointerEvents&&(n.style.touchAction=""),o.supportsPointerEvents?(t=n,globalThis.document.removeEventListener("pointermove",s,!0),t.removeEventListener("pointerdown",l,!0),t.removeEventListener("pointerleave",h,!0),t.removeEventListener("pointerover",u,!0),globalThis.removeEventListener("pointerup",c,!0)):(t=n,globalThis.document.removeEventListener("mousemove",s,!0),t.removeEventListener("mousedown",l,!0),t.removeEventListener("mouseout",h,!0),t.removeEventListener("mouseover",u,!0),globalThis.removeEventListener("mouseup",c,!0)),o.supportsTouchEvents&&((e=n).removeEventListener("touchstart",l,!0),e.removeEventListener("touchend",c,!0),e.removeEventListener("touchmove",s,!0),e.removeEventListener("touchcancel",f,!0)),n.removeEventListener("wheel",i,!0)})},r}(),Yh=(Vh.tag="DOMInteraction",function(i){var t;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).name="dom-interaction",t}t=i,(n=e).prototype=Object.create(t.prototype),Wh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new Vh)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Qc));function Hh(){Hh=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function qh(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function Uh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){qh(r,e,n,i,a,"next",t)}function a(t){qh(r,e,n,i,a,"throw",t)}i(void 0)})}}function Xh(t,e){return(Xh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var $h=function(){function d(){this.context=void 0,this.$camera=void 0}var t=d.prototype;return t.joinTransformMatrix=function(t){return"matrix("+[t[0],t[1],t[4],t[5],t[12],t[13]].join(",")+")"},t.apply=function(t){function i(t,e){e.style.transform=s.joinTransformMatrix(t.getWorldTransform())}function e(t){var e,n,r=t.target;r.nodeName===M.HTML&&(s.$camera||(s.$camera=s.createCamera(c)),e=s.getOrCreateEl(r),s.$camera.appendChild(e),n=r.ownerDocument.documentElement.attributes,Object.keys(n).forEach(function(t){e.style[t]=n[t]}),Object.keys(r.attributes).forEach(function(t){s.updateAttribute(t,r)}),i(r,e))}function n(t){(t=t.target).nodeName===M.HTML&&s.$camera&&(t=s.getOrCreateEl(t))&&t.remove()}function r(t){var e=t.target;e.nodeName===M.HTML&&(t=t.attrName,s.updateAttribute(t,e))}function a(t){var e;(t=t.target).nodeName===M.HTML&&(e=s.getOrCreateEl(t),i(t,e))}function o(){var t,e;s.$camera&&(t=(e=s.context.config).width,e=e.height,s.$camera.style.width=(t||0)+"px",s.$camera.style.height=(e||0)+"px")}var s=this,c=t.camera,l=t.renderingContext,u=t.renderingService,h=t.displayObjectPool,f=(this.context=t,l.root.ownerDocument.defaultView);u.hooks.init.tapPromise(d.tag,Uh(Hh().mark(function t(){return Hh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:h.getHTMLs().length&&(s.$camera=s.createCamera(c)),f.addEventListener(Uc.RESIZE,o),f.addEventListener(y.MOUNTED,e),f.addEventListener(y.UNMOUNTED,n),f.addEventListener(y.ATTR_MODIFIED,r),f.addEventListener(y.BOUNDS_CHANGED,a);case 6:case"end":return t.stop()}},t)}))),u.hooks.endFrame.tap(d.tag,function(){s.$camera&&l.renderReasons.has(qc.CAMERA_CHANGED)&&(s.$camera.style.transform=s.joinTransformMatrix(c.getOrthoMatrix()))}),u.hooks.destroy.tap(d.tag,function(){s.$camera&&s.$camera.remove(),f.removeEventListener(Uc.RESIZE,o),f.removeEventListener(y.MOUNTED,e),f.removeEventListener(y.UNMOUNTED,n),f.removeEventListener(y.ATTR_MODIFIED,r),f.removeEventListener(y.BOUNDS_CHANGED,a)})},t.getId=function(t){return t.id||"g-html-"+t.entity},t.createCamera=function(t){var e,n,r=this.context.config,i=r.document,a=r.width,r=r.height,o=this.context.contextService.getDomElement(),s=o.parentNode;return s?((n=s.querySelector("#"+(e="g-canvas-camera")))||((n=i=(i||document).createElement("div")).id=e,i.style.position="absolute",i.style.left=(o.offsetLeft||0)+"px",i.style.top=(o.offsetTop||0)+"px",i.style.transformOrigin="left top",i.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),i.style.overflow="hidden",i.style.pointerEvents="none",i.style.width=(a||0)+"px",i.style.height=(r||0)+"px",s.appendChild(i)),n):null},t.getOrCreateEl=function(t){var e=this.context.config.document,n=this.getId(t),r=this.$camera.querySelector("#"+n);return r||(r=(e||document).createElement("div"),(t.parsedStyle.$el=r).id=n,t.name&&r.setAttribute("name",t.name),t.className&&(r.className=t.className),r.style.position="absolute",r.style.left="0px",r.style.top="0px",r.style["will-change"]="transform",r.style.transform=this.joinTransformMatrix(t.getWorldTransform())),r},t.updateAttribute=function(t,e){var n=this.getOrCreateEl(e);switch(t){case"innerHTML":var r=e.parsedStyle.innerHTML;hn(r)?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"transformOrigin":r=e.parsedStyle.transformOrigin;n.style["transform-origin"]=r[0].value+" "+r[1].value;break;case"width":r=e.computedStyleMap().get("width");n.style.width=r.toString();break;case"height":r=e.computedStyleMap().get("height");n.style.height=r.toString();break;case"zIndex":r=e.parsedStyle.zIndex;n.style["z-index"]=""+r;break;case"visibility":r=e.parsedStyle.visibility;n.style.visibility=r;break;case"pointerEvents":r=e.parsedStyle.pointerEvents;n.style.pointerEvents=r;break;case"opacity":r=e.parsedStyle.opacity;n.style.opacity=""+r;break;case"fill":var r=e.parsedStyle.fill,i="";r instanceof ra?i=r.isNone?"transparent":e.getAttribute("fill"):Array.isArray(r)?i=e.getAttribute("fill"):ba(r),n.style.background=i;break;case"stroke":r=e.parsedStyle.stroke,i="";r instanceof ra?i=r.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(r)?i=e.getAttribute("stroke"):ba(r),n.style["border-color"]=i,n.style["border-style"]="solid";break;case"lineWidth":r=e.parsedStyle.lineWidth;n.style["border-width"]=(r||0)+"px";break;case"lineDash":n.style["border-style"]="dashed";break;case"filter":i=e.style.filter;n.style.filter=i}},d}(),Kh=($h.tag="HTMLRendering",function(i){var t;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).name="html-renderer",t}t=i,(n=e).prototype=Object.create(t.prototype),Xh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new $h)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Qc));function Zh(){Zh=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function Jh(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function Qh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Jh(r,e,n,i,a,"next",t)}function a(t){Jh(r,e,n,i,a,"throw",t)}i(void 0)})}}function tf(t,e){return(tf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var ef="undefined"!=typeof Float32Array?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});var nf=function(){function t(t){this.canvasConfig=void 0,this.imageCache={},this.gradientCache={},this.patternCache={},this.canvasConfig=t}var e=t.prototype;return e.getImageSync=function(t,e){return this.imageCache[t]?e&&e():this.getOrCreateImage(t).then(function(){e&&e()}),this.imageCache[t]},e.getOrCreateImage=function(r){var i,a=this;return this.imageCache[r]?Promise.resolve(this.imageCache[r]):(i=this.canvasConfig.createImage,new Promise(function(t,e){var n;i?n=i(r):ci&&(n=new window.Image),n&&(n.onload=function(){t(n)},n.onerror=function(t){e(t)},n.crossOrigin="Anonymous",n.src=r,a.imageCache[r]=n)}))},e.getOrCreatePatternSync=function(t,e,n,r,i){var a,o,s,c,l=this.generatePatternKey(t);return l&&this.patternCache[l]?this.patternCache[l]:(c=t.image,s=t.repetition,t=t.transform,a=!1,hn(c)?o=this.getImageSync(c,i):n?(o=n,a=!0):o=c,(i=o&&e.createPattern(o,s))&&(e=t?Ts(qa(t)):(n=new ef(16),ef!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0),n[0]=1,n[5]=1,n[10]=1,n[15]=1,(c=n)[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=1,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=1,c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c),a&&(s=o=e,n=(t=[1/r,1/r,1])[0],c=t[1],t=t[2],o[0]=s[0]*n,o[1]=s[1]*n,o[2]=s[2]*n,o[3]=s[3]*n,o[4]=s[4]*c,o[5]=s[5]*c,o[6]=s[6]*c,o[7]=s[7]*c,o[8]=s[8]*t,o[9]=s[9]*t,o[10]=s[10]*t,o[11]=s[11]*t,o[12]=s[12],o[13]=s[13],o[14]=s[14],o[15]=s[15]),i.setTransform({a:e[0],b:e[1],c:e[4],d:e[5],e:e[12],f:e[13]})),l&&i&&(this.patternCache[l]=i),i)},e.getOrCreateGradient=function(t,e){var r,n,i,a,o,s=this.generateGradientKey(t),c=t.type,l=t.steps,u=t.width,h=t.height,f=t.angle,d=t.cx,p=t.cy,t=t.size;return this.gradientCache[s]||(r=null,c===Ni.LinearGradient?(n=u,i=h,f=bs((f=f).value),a=0+n/2,o=0+i/2,n=Math.abs(n*Math.cos(f))+Math.abs(i*Math.sin(f)),i={x1:a-Math.cos(f)*n/2,y1:o-Math.sin(f)*n/2,x2:a+Math.cos(f)*n/2,y2:o+Math.sin(f)*n/2},r=e.createLinearGradient(i.x1,i.y1,i.x2,i.y2)):c===Ni.RadialGradient&&(a=u,o=h,f=p,n=t,c=(i=d).value,u=f.value,i.unit===g.kPercentage&&(c=i.value/100*a),f.unit===g.kPercentage&&(u=f.value/100*o),i=Math.max(We([0,0],[c,u]),We([0,o],[c,u]),We([a,o],[c,u]),We([a,0],[c,u])),n&&(n instanceof qi?i=n.value:n instanceof Ii&&("closest-side"===n.value?i=Math.min(c,a-c,u,o-u):"farthest-side"===n.value?i=Math.max(c,a-c,u,o-u):"closest-corner"===n.value&&(i=Math.min(We([0,0],[c,u]),We([0,o],[c,u]),We([a,o],[c,u]),We([a,0],[c,u]))))),r=e.createRadialGradient(p=(h={x:c,y:u,r:i}).x,t=h.y,0,p,t,h.r)),r&&(l.forEach(function(t){var e,n=t.offset,t=t.color;n.unit===g.kPercentage&&null!=(e=r)&&e.addColorStop(n.value/100,t.toString())}),this.gradientCache[s]=r)),this.gradientCache[s]},e.generateGradientKey=function(t){var e=t.type,n=t.width,r=t.height,i=t.steps,a=t.angle,o=t.cx,s=t.cy,t=t.size;return"gradient-"+e+"-"+((null==a?void 0:a.toString())||0)+"-"+((null==o?void 0:o.toString())||0)+"-"+((null==s?void 0:s.toString())||0)+"-"+((null==t?void 0:t.toString())||0)+"-"+n+"-"+r+"-"+i.map(function(t){return""+t.offset+t.color}).join("-")},e.generatePatternKey=function(t){var e=t.image,t=t.repetition;return hn(e)?"pattern-"+e+"-"+t:e instanceof ps?"pattern-"+e.entity+"-"+t:void 0},t}(),rf=function(){function s(){}return s.prototype.apply=function(t){function e(t){var e=t.target,t=e.nodeName,n=e.attributes;t===M.IMAGE&&(t=n.img,hn(t))&&a.getImageSync(t,function(){e.renderable.dirty=!0,r.dirtify()})}function n(t){var e=t.target,n=t.attrName,t=t.newValue;e.nodeName===M.IMAGE&&"img"===n&&hn(t)&&a.getOrCreateImage(t).then(function(){e.renderable.dirty=!0,r.dirtify()})}var r=t.renderingService,i=t.renderingContext,a=t.imagePool,o=i.root.ownerDocument.defaultView;r.hooks.init.tapPromise(s.tag,Qh(Zh().mark(function t(){return Zh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o.addEventListener(y.MOUNTED,e),o.addEventListener(y.ATTR_MODIFIED,n);case 2:case"end":return t.stop()}},t)}))),r.hooks.destroy.tap(s.tag,function(){o.removeEventListener(y.MOUNTED,e),o.removeEventListener(y.ATTR_MODIFIED,n)})},s}(),af=(rf.tag="LoadImage",function(i){var t;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).name="image-loader",t}t=i,(n=e).prototype=Object.create(t.prototype),tf(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.context.imagePool=new nf(this.context.config),this.addRenderingPlugin(new rf)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Qc));function of(){of=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function sf(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function cf(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){sf(r,e,n,i,a,"next",t)}function a(t){sf(r,e,n,i,a,"throw",t)}i(void 0)})}}function lf(t,e){t.prototype=Object.create(e.prototype),uf(t.prototype.constructor=t,e)}function uf(t,e){return(uf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var hf=function(){function t(t){this.$container=void 0,this.$canvas=void 0,this.dpr=void 0,this.context=void 0,this.canvasConfig=void 0,this.renderingContext=void 0,this.renderingContext=t.renderingContext,this.canvasConfig=t.config}var e=t.prototype;return e.init=function(){var t=cf(of().mark(function t(){var e,n;return of().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n=this.canvasConfig,e=n.container,(n=n.canvas)?(this.$canvas=n,e&&n.parentElement!==e&&e.appendChild(n),this.$container=n.parentElement,this.canvasConfig.container=this.$container):e&&(this.$container=hn(e)?document.getElementById(e):e,this.$container)&&(n=document.createElement("canvas"),this.$container.appendChild(n),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=n),this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height);case 4:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),e.getContext=function(){return this.context},e.getDomElement=function(){return this.$canvas},e.getDPR=function(){return this.dpr},e.getBoundingClientRect=function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()},e.destroy=function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)},e.resize=function(t,e){var n=1<=(n=this.canvasConfig.devicePixelRatio||ci&&window.devicePixelRatio||1)?Math.ceil(n):1;this.dpr=n,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*e,n=this.$canvas,t=t,e=e,ci)&&n.style&&(n.style.width=t+"px",n.style.height=e+"px"),this.renderingContext.renderReasons.add(qc.CAMERA_CHANGED)},e.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},e.toDataURL=function(){var e=cf(of().mark(function t(e){var n,r;return of().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=(r=e=void 0===e?{}:e).type,r=r.encoderOptions,t.abrupt("return",this.context.canvas.toDataURL(n,r));case 3:case"end":return t.stop()}},t,this)}));return function(t){return e.apply(this,arguments)}}(),t}(),ff=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).name="canvas-context-register",t}lf(t,i);var e=t.prototype;return e.init=function(){this.context.ContextService=hf},e.destroy=function(){delete this.context.ContextService},t}(Qc),df=function(e){function t(t){t=e.call(this,t)||this;return t.registerPlugin(new ff),t.registerPlugin(new af),t.registerPlugin(new Ru),t.registerPlugin(new Bh),t.registerPlugin(new Yh),t.registerPlugin(new _h),t.registerPlugin(new Kh),t}return lf(t,e),t}(Jc);function pf(){pf=function(){return o};var o={},t=Object.prototype,c=t.hasOwnProperty,l=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 f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return l(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")),h;r=u(i,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,h;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,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,o);if(n){if(n===h)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===h)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 h={};function f(){}function d(){}function p(){}var e={},g=(a(e,r,function(){return this}),Object.getPrototypeOf),g=g&&g(g(k([]))),y=(g&&g!==t&&c.call(g,r)&&(e=g),p.prototype=f.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;l(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&&c.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(c.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 l(y,"constructor",{value:d.prototype=p,configurable:!0}),l(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)&&c.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=c.call(i,"catchLoc"),s=c.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&&c.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,h):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),h},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),h}},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),h}},o}function gf(t,e,n,r,i,a,o){try{var s=t[a](o),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function yf(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){gf(r,e,n,i,a,"next",t)}function a(t){gf(r,e,n,i,a,"throw",t)}i(void 0)})}}function mf(){return(mf=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 vf(t,e){return(vf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function bf(t){return Ef(t,"Function")}var xf=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,c,l,u=t.target,h=u===d,f=h&&i?d:u.closest&&u.closest("[draggable=true]");f&&(e=function(){var e=yf(pf().mark(function t(e){var n,r,i;return pf().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=We([e.clientX,e.clientY],s),n<=m||r<=y)return t.abrupt("return");t.next=5}break;case 5:e.type="dragstart",f.dispatchEvent(e),a=!0;case 8:if(e.type="drag",e.dx=e.clientX-l[0],e.dy=e.clientY-l[1],f.dispatchEvent(e),l=[e.clientX,e.clientY],h){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),c!==i&&(c&&(e.type="dragleave",(e.target=c).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),c=i)&&(e.type="dragover",(e.target=c).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],c=null,l=[t.clientX,t.clientY],r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),c&&(t.type="drop",(t.target=c).dispatchEvent(t)),t.type="dragend",f.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,yf(pf().mark(function t(){return pf().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}(),wf=(xf.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),vf(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new xf(mf({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},e}(Qc)),kf=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},Mf={}.toString,Ef=function(t,e){return Mf.call(t)==="[object "+e+"]"},Of=function(t){return null==t},Sf=function(t){return Array.isArray?Array.isArray(t):Ef(t,"Array")};function _f(t){if(!Tf(t)||!Ef(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 Af(t){return(t=Nf(t)).charAt(0).toLowerCase()+t.substring(1)}var Tf=function(t){return"object"==typeof t&&null!==t},Pf=function(t){return Ef(t,"Number")},Lf=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){bf(n)&&"prototype"===e||r.push(t)};if(e)if(Sf(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},Nf=function(t){return Of(t)?"":t.toString()},Cf=function(t){t=Nf(t);return t.charAt(0).toUpperCase()+t.substring(1)},jf={}.toString,Rf=function(t){return jf.call(t).replace(/^\[object /,"").replace(/]$/,"")},Ff=Object.prototype,If=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ff)};var Bf=5;var R=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||Bf,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&_f(o)?(_f(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Sf(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Df=function(t,e){if(!kf(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},Gf=Object.prototype.hasOwnProperty;function zf(t){return t}var Wf,Vf=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,l=n.apply(s,c),o||(s=c=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,c=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,l=n.apply(s,c),o||(s=c=null)):o||!1===i.trailing||(o=setTimeout(a,e)),l}var o,s,c,l,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=c=null},t};function Yf(t){return Of(t)?0:(kf(t)?t:Object.keys(t)).length}!function(a,o){var s;if(bf(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(Wf=Wf||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),Wf.measureText(Ef(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],Lf(e=void 0===e?{}:e)).join("")});const Hf=()=>[["cartesian"]],qf=(Hf.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]]),Uf=(qf.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]]),Xf=(Uf.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),$f=(Xf.props={},()=>[["translate",.5,.5],["reflect"],["translate",-.5,-.5]]),Kf=($f.props={},()=>[["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),Zf=(Kf.props={},()=>[["translate",.5,.5],["reflect.y"],["translate",-.5,-.5]]),Jf=(Zf.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[...Xf(),...qf({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),Qf=(Jf.props={},({startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1})=>[["transpose"],...$f(),...qf({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]),td=(Qf.props={},()=>[["parallel",0,1,0,1]]),ed=(td.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,isVisual:i=!1})=>[["fisheye",t,e,n,r,i]]),nd=(ed.props={},({focusX:t=0,distortionX:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),rd=(nd.props={},({focusY:t=0,distortionY:e=2,isVisual:n=!1})=>[["fisheye.x",t,e,n]]),id=(rd.props={},({value:e})=>t=>t.map(()=>e)),ad=(id.props={},({value:e})=>t=>t.map(e)),od=(ad.props={},({value:e})=>t=>t.map(t=>t[e])),sd=(od.props={},({value:t})=>()=>t);function cd(t,e){return t.parent===e.parent?1:2}function ld(t,e){return t+e.x}function ud(t,e){return Math.max(t,e.y)}function hd(){var s=cd,c=1,l=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(ld,0)/e.length,t.y=1+n.reduce(ud,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)*c,t.y=(e.y-t.y)*l}:function(t){t.x=(t.x-a)/(o-a)*c,t.y=(1-(e.y?t.y/e.y:1))*l})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,c=+t[0],l=+t[1],e):u?null:[c,l]},e.nodeSize=function(t){return arguments.length?(u=!0,c=+t[0],l=+t[1],e):u?[c,l]:null},e}function fd(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 dd(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=gd)):void 0===e&&(e=pd);for(var n,r,i,a,o,t=new vd(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 vd(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(md)}function pd(t){return t.children}function gd(t){return Array.isArray(t)?t[1]:null}function yd(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function md(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function vd(t){this.data=t,this.depth=this.height=0,this.parent=null}function bd(t){return null==t?null:xd(t)}function xd(t){if("function"!=typeof t)throw new Error;return t}function wd(){return 0}function kd(t){return function(){return t}}sd.props={},vd.prototype=dd.prototype={constructor:vd,count:function(){return this.eachAfter(fd)},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=[],c=-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,++c,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 dd(this).eachBefore(yd)},[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 Md=4294967296;function Ed(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&&Sd(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 Ad(t[0],t[1]);case 3:return Td(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(_d(e,t))return[e];for(n=0;n<t.length;++n)if(Od(e,t[n])&&_d(Ad(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(Od(Ad(t[n],t[r]),e)&&Od(Ad(t[n],e),t[r])&&Od(Ad(t[r],e),t[n])&&_d(Td(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function Od(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 Sd(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 _d(t,e){for(var n=0;n<e.length;++n)if(!Sd(t,e[n]))return;return 1}function Ad(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,c=e-t,l=Math.sqrt(o*o+s*s);return{x:(n+i+o/l*c)/2,y:(r+a+s/l*c)/2,r:(l+t+e)/2}}function Td(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,c=n.y,n=n.r,l=r-a,u=r-s,h=i-o,f=i-c,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-c*c+n*n,e=u*h-l*f,g=(h*o-f*a)/(2*e)-r,s=(f*d-h*p)/e,c=(u*a-l*o)/(2*e)-i,n=(l*p-u*d)/e,f=s*s+n*n-1,h=2*(t+g*s+c*n),a=g*g+c*c-t*t,o=-(1e-6<Math.abs(f)?(h+Math.sqrt(h*h-4*f*a))/(2*f):a/h);return{x:r+g+s*o,y:i+c+n*o,r:o}}function Pd(t,e,n){var r,i,a,o,s=t.x-e.x,c=t.y-e.y,l=s*s+c*c;l?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(l+o-i)/(2*l),a=Math.sqrt(Math.max(0,o/l-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(l+i-o)/(2*l),a=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Ld(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 Nd(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 Cd(t){this._=t,this.next=null,this.previous=null}function jd(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,c,l,u,h,f,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;Pd(r,d,i=t[2]),d=new Cd(d),r=new Cd(r),i=new Cd(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(c=3;c<a;++c){Pd(d._,r._,i=t[c]),i=new Cd(i),l=r.next,u=d.previous,h=r._.r,f=d._.r;do{if(h<=f){if(Ld(l._,i._)){r=l,(d.next=r).previous=d,--c;continue t}h+=l._.r,l=l.next}else{if(Ld(u._,i._)){((d=u).next=r).previous=d,--c;continue t}f+=u._.r,u=u.previous}}while(l!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=Nd(d);(i=i.next)!==r;)(s=Nd(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=Ed(d,e),c=0;c<a;++c)(d=t[c]).x-=i.x,d.y-=i.y;return i.r}function Rd(t){return Math.sqrt(t.value)}function Fd(){var n=null,r=1,i=1,a=wd;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Md)/Md}();return t.x=r/2,t.y=i/2,n?t.eachBefore(Id(n)).eachAfter(Bd(a,.5,e)).eachBefore(Dd(1)):t.eachBefore(Id(Rd)).eachAfter(Bd(wd,1,e)).eachAfter(Bd(a,t.r/Math.min(r,i),e)).eachBefore(Dd(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=bd(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:kd(+t),e):a},e}function Id(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Bd(o,s,c){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=jd(e,c),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function Dd(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 Gd(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 zd(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,l=t.value&&(r-e)/t.value;++s<c;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*l}var Wd={depth:-1},Vd={},Yd={};function Hd(t){return t.id}function qd(t){return t.parentId}function Ud(){var y,m=Hd,v=qd;function e(n){var e,t,r,i,a,o,s,c,l=Array.from(n),u=m,h=v,f=new Map;if(null!=y){const p=l.map((t,e)=>{t=y(t,e,n),e=(t=""+t).length;return"/"===(t=$d(t,e-1)&&!$d(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(Xd);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(Xd(r)),l.push(Yd));u=(t,e)=>p[e],h=(t,e)=>g[e]}for(r=0,e=l.length;r<e;++r)t=l[r],o=l[r]=new vd(t),null!=(s=u(t,r,n))&&(s+="")&&(c=o.id=s,f.set(c,f.has(c)?Vd:o)),null!=(s=h(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=l[r]).parent){if(!(a=f.get(s)))throw new Error("missing: "+s);if(a===Vd)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===Yd&&1===i.children.length;)i=i.children[0],--e;for(let t=l.length-1;0<=t&&(o=l[t]).data===Yd;--t)o.data=null}if(i.parent=Wd,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(md),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(m=bd(t),e):m},e.parentId=function(t){return arguments.length?(v=bd(t),e):v},e.path=function(t){return arguments.length?(y=bd(t),e):y},e}function Xd(t){let e=t.length;if(e<2)return"";for(;1<--e&&!$d(t,e););return t.slice(0,e)}function $d(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function Kd(t,e){return t.parent===e.parent?1:2}function Zd(t){var e=t.children;return e?e[0]:t.t}function Jd(t){var e=t.children;return e?e[e.length-1]:t.t}function Qd(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 tp(){var f=Kd,c=1,l=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 Qd(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 Qd(r[i],i)),n.parent=e;return(t.parent=new Qd(null,0)).children=[t],t}(t);return s.eachAfter(h),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:f(e,n)/2,i=s-e.x,a=c/(n.x+s+i),o=l/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function h(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,c=s.length;0<=--c;)(i=s[c]).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+f(t._,r._),t.m=t.z-e):t.z=e}else r&&(t.z=r.z+f(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],c=i.m,l=a.m,u=o.m,h=s.m;o=Jd(o),i=Zd(i),o&&i;)s=Zd(s),(a=Jd(a)).a=t,0<(r=o.z+u-i.z-c+f(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),c+=r,l+=r),u+=o.m,c+=i.m,h+=s.m,l+=a.m;o&&!Jd(a)&&(a.t=o,a.m+=u-l),i&&!Zd(s)&&(s.t=i,s.m+=c-h,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*=c,t.y=t.depth*l}return e.separation=function(t){return arguments.length?(f=t,e):f},e.size=function(t){return arguments.length?(u=!1,c=+t[0],l=+t[1],e):u?null:[c,l]},e.nodeSize=function(t){return arguments.length?(u=!0,c=+t[0],l=+t[1],e):u?[c,l]:null},e}function ep(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,l=t.value&&(i-n)/t.value;++s<c;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*l}Qd.prototype=Object.create(vd.prototype);e=(1+Math.sqrt(5))/2;function np(t,e,n,r,i,a){for(var o,s,c,l,u,h,f,d,p,g,y,m=[],v=e.children,b=0,x=0,w=v.length,k=e.value;b<w;){for(c=i-n,l=a-r;!(u=v[x++].value)&&x<w;);for(y=(h=f=u)*u*(g=Math.max(l/c,c/l)/(k*t)),p=Math.max(f/y,y/h);x<w;++x){if(u+=s=v[x].value,s<h&&(h=s),f<s&&(f=s),y=u*u*g,p<(d=Math.max(f/y,y/h))){u-=s;break}p=d}m.push(o={value:u,dice:c<l,children:v.slice(b,x)}),o.dice?zd(o,n,r,i,k?r+=l*u/k:a):ep(o,n,r,k?n+=c*u/k:i,a),k-=u,b=x}return m}var rp=function e(a){function t(t,e,n,r,i){np(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(e);function ip(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(c=g[e]).x0=i,c.y0=a,c.x1=o,void(c.y1=s);var c=y[e],l=r/2+c,u=e+1,h=n-1;for(;u<h;){var f=u+h>>>1;y[f]<l?u=1+f:h=f}l-y[u-1]<y[u]-l&&e+1<u&&--u;var c=y[u]-c,d=r-c;{var p;s-a<o-i?(t(e,u,c,i,a,p=r?(i*d+o*c)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,c,i,a,o,p=r?(a*d+s*c)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function ap(t,e,n,r,i){(1&t.depth?ep:zd)(t,e,n,r,i)}var op=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,c,l,u=-1,h=a.length,f=t.value;++u<h;){for(s=(o=a[u]).children,c=o.value=0,l=s.length;c<l;++c)o.value+=s[c].value;o.dice?zd(o,e,n,r,f?n+=(i-n)*o.value/f:i):ep(o,e,n,f?e+=(r-e)*o.value/f:r,i),f-=o.value}else t._squarify=a=np(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(e);function sp(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 cp(t={}){return[...sp(t),{name:"title",scale:"identity"},{name:"tooltip",scale:"identity",independent:!0}]}function lp(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function up(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function hp(t={}){return sp(t)}function fp(){return[{type:"maybeKey"}]}function dp(t,e){return t.getBandWidth(t.invert(e))}function pp(t,e,n={}){const{x:a,y:o,series:s}=e,{x:c,y:l,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:h=r,bandOffsetY:f=r}={}}=n,d=!(null===c||void 0===c||!c.getBandWidth),p=!(null===l||void 0===l||!l.getBandWidth),g=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?dp(c,a[e]):0;var r=p?dp(l,o[e]):0,e=g&&s?(dp(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+h*n+e,i+f*r]}:t=>t}function gp(t){return parseFloat(t)/100}function yp(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?gp(e)*o:+e,"string"==typeof t?gp(t)*s:+t]]})]}function mp(e){return"function"==typeof e?e:t=>t[e]}function vp(t,e){return Array.from(t,mp(e))}function bp(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=vp(t,e),o=vp(t,n),s=vp(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 xp(t,e){return t.getBandWidth(t.invert(e))}const wp=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:c,size:r}=n,l=e.x,u=e.series,[h]=i.getSize(),f=r?r.map(t=>+t/h):null,d=r?(t,e,n)=>{t+=e/2,e=f[n];return[t-e/2,t+e/2]}:(t,e,n)=>[t,t+e];return[t,Array.from(t,t=>{var e=xp(l,a[t]),n=e*(u?xp(u,null===c||void 0===c?void 0:c[t]):1),e=(+(null===c||void 0===c?void 0:c[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))})]};wp.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...cp({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:[...fp(),...up()],interaction:{shareTooltip:!0}};const kp=()=>(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 Mp(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Ep(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=Mp,o=(t,e)=>Mp(n(t),e),(t,e)=>n(t)-e):(a=n===Mp||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Op,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 Op(){return 0}kp.props={defaultShape:"rect",defaultLabelShape:"label",channels:[...cp({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeZeroY1"}],postInference:[...fp(),...up()],interaction:{shareTooltip:!0}};Kc=Ep(Mp).right;const Sp=Ep(function(t){return null===t?NaN:+t}).center;var _p=Kc;function Ap(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 Tp(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 Pp(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 Lp{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 Np 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(Cp(this,t))}has(t){return super.has(Cp(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 Cp({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function jp(t){return t}function Rp(t,...e){return Bp(t,jp,jp,e)}function Fp(t,e,...n){return Bp(t,jp,e,n)}function Ip(t,e,...n){return Bp(t,Array.from,e,n)}function Bp(t,u,h,f){return function t(e,n){if(n>=f.length)return h(e);var r=new Np,i=f[n++];let a=-1;for(const c of e){var o=i(c,++a,e),s=r.get(o);s?s.push(c):r.set(o,[c])}for(const[l,e]of r)r.set(l,t(e,n));return u(r)}(t,0)}function Dp(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=zp(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>zp(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(Gp(n))}function Gp(r=Mp){if(r===Mp)return zp;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 zp(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var Wp=Array.prototype.slice;function Vp(t){return()=>t}var Yp=Math.sqrt(50),Hp=Math.sqrt(10),qp=Math.sqrt(2);function Up(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?(Yp<=n?10:Hp<=n?5:qp<=n?2:1)*Math.pow(10,t):-Math.pow(10,-t)/(Yp<=n?10:Hp<=n?5:qp<=n?2:1)}function Xp(t){return Math.ceil(Math.log(Ap(t))/Math.LN2)+1}function $p(){var m=jp,v=Pp,b=Xp;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],c=o[1],l=b(i,s,c);if(!Array.isArray(l)){var o=c,u=+l;if(v===Pp&&([s,c]=function(t,e,n){let r;for(;;){var i=Up(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,c,u)),(l=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=Up(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,c,u))[0]<=s&&(n=Up(s,c,u)),l[l.length-1]>=c)if(c<=o&&v===Pp){const n=Up(s,c,u);isFinite(n)&&(0<n?c=(Math.floor(c/n)+1)*n:n<0&&(c=(Math.ceil(c*-n)+1)/-n))}else l.pop()}for(var h=l.length,f=0,d=h;l[f]<=s;)++f;for(;l[d-1]>c;)--d;(f||d<h)&&(l=l.slice(f,d),h=d-f);var p,g,y=new Array(h+1);for(a=0;a<=h;++a)(p=y[a]=[]).x0=0<a?l[a-1]:s,p.x1=a<h?l[a]:c;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=c&&y[Math.min(h,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<=c&&(g=Math.floor((s-e)*n),y[Math.min(h,g+(l[g]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=c&&y[_p(l,e,0,h)].push(t[a]);return y}return e.value=function(t){return arguments.length?(m="function"==typeof t?t:Vp(t),e):m},e.domain=function(t){return arguments.length?(v="function"==typeof t?t:Vp([t[0],t[1]]),e):v},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:Vp(Array.isArray(t)?Wp.call(t):t),e):b},e}function Kp(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 Zp(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 Jp(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 Qp(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function t0(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?Jp(t):1<=e?Kp(t):(n=(n-1)*e,(r=Kp(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?zp:Gp(s);a<o;){600<o-a&&(c=o-a+1,l=i-a+1,h=Math.log(c),u=.5*Math.exp(2*h/3),h=.5*Math.sqrt(h*u*(c-u)/c)*(l-c/2<0?-1:1),n(r,i,Math.max(a,Math.floor(i-l*u/c+h)),Math.min(o,Math.floor(i+(c-l)*u/c+h)),s));var c,l,u,h,f=r[i];let t=a,e=o;for(Qp(r,a,i),0<s(r[o],f)&&Qp(r,a,o);t<e;){for(Qp(r,t,e),++t,--e;s(r[t],f)<0;)++t;for(;0<s(r[e],f);)--e}0===s(r[a],f)?Qp(r,a,e):Qp(r,++e,o),e<=i&&(a=e+1),i<=e&&(o=e-1)}return r}(t,e=Math.floor(n)).subarray(0,e+1)))+(Jp(t.subarray(e+1))-r)*(n-e))}function e0(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 n0(t,e){return t0(t,.5,e)}function r0(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function i0(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 a0(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 o0(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function s0(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function c0(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function l0(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function u0(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function h0(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function f0(t){return l0(t)||s0(t)}const d0=(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(Rp(t,t=>a[t]).values()):[t],c=t.map(t=>t[0]);const l=((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[c,Array.from(t,t=>t.map(t=>r.map([+o[t]+l,+s[t]+u]))),t]},p0=(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})]},g0=()=>(t,e,n,r)=>{return(u0(r)?p0:d0)(t,e,n,r)};g0.props={defaultShape:"line",defaultLabelShape:"label",channels:[...cp({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...fp(),...up(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,showCrosshairs:!0}};const y0=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:c,dx:l,dy:u}=n,[h,f]=o.getSize(),d=pp(e,n,g),p=t=>{var e=+((null===l||void 0===l?void 0:l[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,c?Array.from(t,t=>{var[e,n]=p(t),r=+c[t],i=r/h,r=r/f,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))])]};y0.props={defaultShape:"hollow",defaultLabelShape:"label",channels:[...cp({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:[...fp(),{type:"maybeSize"},...lp()]};const m0=s=>{const{cartesian:c=!1}=s;return c?yp:(t,e,n,r)=>{if(c)return yp(t,0,n,r);const{x:i,y:a}=n,o=pp(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};m0.props={defaultShape:"text",defaultLabelShape:"label",channels:[...cp({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:[...fp(),...lp()]};const v0=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,c=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=c.getBandWidth(c.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))})]};v0.props={defaultShape:"cell",defaultLabelShape:"label",channels:[...cp({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...fp(),...lp()]};const b0=()=>(t,e,n,a)=>{const{x:o,y:s,y1:c,series:r}=n;n=r?Array.from(Rp(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],+c[i]])}return r}),n]};b0.props={defaultShape:"area",defaultLabelShape:"label",channels:[...cp({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:[...fp(),...up()],interaction:{shareTooltip:!0,seriesTooltip:!0,showCrosshairs:!0}};const x0=l=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,c=pp(e,n,l);e=t.map(t=>[r.map(c([+i[t],+a[t]],t)),r.map(c([+o[t],+s[t]],t))]);return[t,e]};x0.props={defaultShape:"link",defaultLabelShape:"label",channels:[...cp({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...fp(),...lp()]};const w0=s=>{var t=s["cartesian"];return t?yp:(t,e,n,r)=>{const{x:i,y:a}=n,o=pp(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};w0.props={defaultShape:"image",defaultLabelShape:"label",channels:[...cp({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...fp(),...lp()]};const k0=()=>(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]};k0.props={defaultShape:"polygon",defaultLabelShape:"label",channels:[...cp({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...fp(),...lp()]};const M0=()=>(t,e,n,s)=>{const{x:c,y:l,y1:u,y2:h,y3:f,y4:d,series:p}=n,g=e.x,y=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+c[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=+c[t]+e+n/2,[t,r,i,a,o]=[+l[t],+u[t],+h[t],+f[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))})]},E0=(M0.props={defaultShape:"box",defaultLabelShape:"label",channels:[...cp({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[{type:"maybeZeroX"}],postInference:[...fp(),...up()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:c}=n,[l,u]=i.getSize();n=t.map(t=>{var e=+c[t]/180*Math.PI,n=+s[t],r=n/l,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]});E0.props={defaultShape:"vector",defaultLabelShape:"label",channels:[...cp({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[],postInference:[...fp(),...lp()]};const O0=()=>(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))})]};O0.props={defaultShape:"line",defaultLabelShape:"label",channels:[...hp({shapes:["line"]}),{name:"y",required:!0}],preInference:[{type:"maybeTupleY"}],postInference:[...fp()]};const S0=()=>(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))})]};S0.props={defaultShape:"line",defaultLabelShape:"label",channels:[...hp({shapes:["line"]}),{name:"x",required:!0}],preInference:[{type:"maybeTupleX"}],postInference:[...fp()]};const _0=(...t)=>x0(...t);function A0(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 T0(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=A0("x",r,n,e.x),o=A0("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))})]}}_0.props={defaultShape:"connector",defaultLabelShape:"label",channels:[...hp({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...fp()]};const P0=()=>T0();P0.props={defaultShape:"range",defaultLabelShape:"label",channels:[...hp({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[],postInference:[...fp()]};const L0=()=>T0({extendY:!0});L0.props={defaultShape:"range",defaultLabelShape:"label",channels:[...hp({shapes:["range"]}),{name:"x",required:!0}],preInference:[],postInference:[...fp()]};const N0=()=>T0({extendX:!0});function C0(t){return t.target.depth}function j0(t,e){return t.sourceLinks.length?t.depth:e-1}function R0(t){return function(){return t}}function F0(t,e){return B0(t.source,e.source)||t.index-e.index}function I0(t,e){return B0(t.target,e.target)||t.index-e.index}function B0(t,e){return t.y0-e.y0}function D0(t){return t.value}function G0(t){return t.index}function z0(t){return t.nodes}function W0(t){return t.links}function V0(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function Y0({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 H0(){let x=0,w=0,k=1,M=1,E=24,O=8,S,_=G0,A=j0,T,P,L,N=z0,C=W0,j=6;function e(e){e={nodes:N(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=>[_(t),t]));if(t.forEach((t,e)=>{t.index=e;let{source:n,target:r}=t;"object"!=typeof n&&(n=t.source=V0(g,n)),"object"!=typeof r&&(r=t.target=V0(g,r)),n.sourceLinks.push(t),r.targetLinks.push(t)}),null!=L)for(var{sourceLinks:n,targetLinks:r}of i)n.sort(L),r.sort(L)}t=e.nodes;for(const y of t)y.value=void 0===y.fixedValue?Math.max(a0(y.sourceLinks,D0),a0(y.targetLinks,D0)):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,c=Math.max(Kp(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=T.call(null,s,c)}}{var l=(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>l)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(Kp(t,t=>t.depth)+1,0),n=(k-x-E)/(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+E,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(O,(M-w)/(Kp(u,t=>t.length)-1)),u),h=Jp(t,t=>(M-w-(t.length-1)*S)/a0(t,D0));for(const m of t){let e=w;for(const v of m){v.y0=e,v.y1=e+v.value*h,e=v.y1+S;for(const b of v.sourceLinks)b.width=b.value*h}e=(M-e+S)/(m.length+1);for(let t=0;t<m.length;++t){var f=m[t];f.y0+=e*(t+1),f.y1+=e*(t+1)}!function(t){if(void 0===L)for(var{sourceLinks:e,targetLinks:n}of t)e.sort(I0),n.sort(F0)}(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 l of o){let t=0,e=0;for(var{target:s,value:c}of l.sourceLinks){c=c*(s.layer-l.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}(l,s)*c,e+=c}0<e&&(a=(t/e-l.y0)*r,l.y0+=a,l.y1+=a,F(l))}void 0===P&&o.sort(B0),o.length&&R(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 l of o){let t=0,e=0;for(var{source:s,value:c}of l.targetLinks){c=c*(l.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,l)*c,e+=c}0<e&&(a=(t/e-l.y0)*r,l.y0+=a,l.y1+=a,F(l))}void 0===P&&o.sort(B0),o.length&&R(o,i)}}(u,d,p)}return Y0(e),e}function R(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 F({sourceLinks:t,targetLinks:e}){if(void 0===L){for(const{source:{sourceLinks:t}}of e)t.sort(I0);for(const{target:{targetLinks:e}}of t)e.sort(F0)}}return e.update=function(t){return Y0(t),t},e.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:R0(t),e):_},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:R0(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?(E=+t,e):E},e.nodePadding=function(t){return arguments.length?(O=S=+t,e):O},e.nodes=function(t){return arguments.length?(N="function"==typeof t?t:R0(t),e):N},e.links=function(t){return arguments.length?(C="function"==typeof t?t:R0(t),e):C},e.linkSort=function(t){return arguments.length?(L=t,e):L},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}N0.props={defaultShape:"range",defaultLabelShape:"label",channels:[...hp({shapes:["range"]}),{name:"y",required:!0}],preInference:[],postInference:[...fp()]};const q0={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},U0={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?Jp(t.sourceLinks,C0)-1:0},justify:j0};const X0=h=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:c,linkSort:l,iterations:u}=Object.assign({},q0,h),c=H0().nodeSort(n).linkSort(l).links(c).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(l=typeof(n=r))?U0[n]||j0:"function"==l?n:j0).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&c.nodeId(e),c(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 $0(t){return t}function K0(t=""){throw new Error(t)}function Z0(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 J0(t){return null!=t&&!Number.isNaN(t)}function J(t,e){return Q0(t,e)||{}}function Q0(t,n){t=Object.entries(t).filter(([t])=>t.startsWith(n)).map(([t,e])=>[Af(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function tg(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}X0.props={};const eg=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:c}=bp(t,e),l=J(e,"node"),e=J(e,"link"),{key:u=t=>t.key,color:h=u}=l,{links:i,nodes:t}=X0(Object.assign(Object.assign(Object.assign({},m),{nodeId:mp(u)}),i))({links:t,nodes:c});const f=J(r,"label"),{text:d=u,spacing:p=5}=f,g=Z(f,["text","spacing"]);return[R({},v,{data:t,encode:Object.assign(Object.assign({},l),{color:h}),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}),R({},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})]}},ng=(eg.props={composite:!0},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);ng.props={defaultShape:"path",defaultLabelShape:"label",channels:[...cp({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[],postInference:[...fp()]};const rg=t=>t?parseInt(t):0;function ig(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||rg(t.width),e=e.clientHeight||rg(t.height),{width:(i={width:i-(rg(t.paddingLeft)+rg(t.paddingRight)),height:e-(rg(t.paddingLeft)+rg(t.paddingRight))}).width,height:i.height}):{width:n,height:r}}function ag(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:c=o,marginTop:l=o,marginBottom:o=o,inset:u=0,insetLeft:h=u,insetRight:f=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-c-h-f,height:t-a-n-l-o-d-u}}function og(t,e,n){const r=n["value"];var o,i,a,s,c,l,u,h,f,d,n=function(t,e){var n={treemapBinary:ip,treemapDice:zd,treemapSlice:ep,treemapSliceDice:ap,treemapSquarify:rp,treemapResquarify:op};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?Ud().path(p):Ud():dd)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(y),c=[0],i&&t.eachBefore(Gd),t}function y(t){var e=c[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=c[t.depth+1]=l(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=h(t)-e)<n&&(n=i=(n+i)/2),(a-=f(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=rp,i=!1,s=a=1,c=[0],d=f=h=u=l=wd,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=xd(t),g):o},g.padding=function(t){return arguments.length?g.paddingInner(t).paddingOuter(t):g.paddingInner()},g.paddingInner=function(t){return arguments.length?(l="function"==typeof t?t:kd(+t),g):l},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:kd(+t),g):u},g.paddingRight=function(t){return arguments.length?(h="function"==typeof t?t:kd(+t),g):h},g.paddingBottom=function(t){return arguments.length?(f="function"==typeof t?t:kd(+t),g):f},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:kd(+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 sg=u=>t=>{var{width:t,height:e}=ag(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[]}=u,c=Z(u,["data","encode","scale","style","layout","labels"]),l={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=og(n,R({},l,o),r),n=J(a,"label");return[R({},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]},c),{axis:!1}))]},cg=(sg.props={composite:!0},u=>t=>{var{width:t,height:e}=ag(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[]}=u,c=Z(u,["data","encode","scale","style","layout","labels"]),l={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=(Sf(t)?Ud().path(e.path):dd)(t);return r?n.sum(t=>t[r]).sort(e.sort):n.count(),Fd().size(e.size).padding(e.padding)(n),n.descendants()})(n,R({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),R({},l.encode,r)),t=J(a,"label");return[R({},l,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]},c),{axis:!1}))]});function lg(t,e){return Jp(t,t=>e[t])}function ug(t,e){return Kp(t,t=>e[t])}function hg(t,e){const n=2.5*fg(t,e)-1.5*pg(t,e);return Jp(t,t=>e[t]>=n?e[t]:NaN)}function fg(t,e){return t0(t,.25,t=>e[t])}function dg(t,e){return t0(t,.5,t=>e[t])}function pg(t,e){return t0(t,.75,t=>e[t])}function gg(t,e){const n=2.5*pg(t,e)-1.5*fg(t,e);return Kp(t,t=>e[t]<=n?e[t]:NaN)}function yg(){return(t,e)=>{var n=e["encode"],{y:n,x:r}=n;const i=n["value"],a=r["value"];return[Array.from(Rp(t,t=>a[+t]).values()).flatMap(t=>{const e=hg(t,i),n=gg(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}cg.props={composite:!0};const mg=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:fg,y2:dg,y3:pg};return r?[{type:"box",data:t,transform:[Object.assign(Object.assign({type:"groupX",y:lg},a),{y4:ug})],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:hg},a),{y4:gg})],encode:Object.assign(Object.assign({},e),i),style:r},{type:"point",data:t,transform:[{type:yg}],encode:e,style:Object.assign({},n)}])},vg=(mg.props={composite:!0},s=>{var t=s["cartesian"];return t?yp:(t,e,n,r)=>{const{x:i,y:a}=n,o=pp(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function bg(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,c,l,u,h,f,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(d){for(;d.length;)if((l=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,!(d=(i=d)[h=u<<1|l]))return i[h]=p,t;if(s=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===s&&n===c)p.next=d,i?i[h]=p:t._root=p;else{for(;i=i?i[h]=new Array(4):t._root=new Array(4),(l=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,(h=u<<1|l)==(f=(o<=c)<<1|a<=s););i[f]=d,i[h]=p}}else t._root=p}return t}function xg(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function wg(t){return t[0]}function kg(t){return t[1]}function Mg(t,e,n){e=new Eg(null==e?wg:e,null==n?kg:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function Eg(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 Og(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}vg.props={defaultShape:"shape",defaultLabelShape:"label",channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};oo=Mg.prototype=Eg.prototype;function Sg(t){return function(){return t}}function _g(t){return 1e-6*(t()-.5)}function Ag(t){return t.index}function Tg(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function Pg(l){var u,h,a,o,f,d,s=Ag,n=function(t){return 1/Math.min(o[t.source.index],o[t.target.index])},r=Sg(30),p=1;function e(t){for(var e=0,n=l.length;e<p;++e)for(var r,i,a,o,s,c=0;c<n;++c)r=(i=l[c]).source,a=(i=i.target).x+i.vx-r.x-r.vx||_g(d),o=i.y+i.vy-r.y-r.vy||_g(d),a*=s=((s=Math.sqrt(a*a+o*o))-h[c])/s*t*u[c],o*=s,i.vx-=a*(s=f[c]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=l.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=l[i]).index=i,"object"!=typeof t.source&&(t.source=Tg(r,t.source)),"object"!=typeof t.target&&(t.target=Tg(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,f=new Array(n);i<n;++i)t=l[i],f[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),c(),h=new Array(n),g()}}function c(){if(a)for(var t=0,e=l.length;t<e;++t)u[t]=+n(l[t],t,l)}function g(){if(a)for(var t=0,e=l.length;t<e;++t)h[t]=+r(l[t],t,l)}return null==l&&(l=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(l=t,i(),e):l},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:Sg(+t),c(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:Sg(+t),g(),e):r},e}oo.copy=function(){var t,e,n=new Eg(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]=Og(e));else n._root=Og(r);return n},oo.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return bg(this.cover(e,n),e,n,t)},oo.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,c=-1/0,l=-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),c<e&&(c=e),(a[u]=n)<s&&(s=n),l<n&&(l=n));if(!(c<o||l<s))for(this.cover(o,s).cover(c,l),u=0;u<r;++u)bg(this,i[u],a[u],t[u]);return this},oo.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,c=i-n||1,l=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=l,l=o,c*=2,s){case 0:i=n+c,a=r+c;break;case 1:n=i-c,a=r+c;break;case 2:i=n+c,r=a-c;break;case 3:n=i-c,r=a-c}this._root&&this._root.length&&(this._root=l)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},oo.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},oo.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]]},oo.find=function(t,e,n){var r,i,a,o,s,c,l,u,h=this._x0,f=this._y0,d=this._x1,p=this._y1,g=[],y=this._root;for(y&&g.push(new xg(y,h,f,d,p)),null==n?n=1/0:(h=t-n,f=e-n,d=t+n,p=e+n,n*=n);r=g.pop();)!(y=r.node)||(s=r.x0)>d||(c=r.y0)>p||(o=r.x1)<h||(i=r.y1)<f||(y.length?(g.push(new xg(y[3],a=(s+o)/2,l=(c+i)/2,o,i),new xg(y[2],s,l,a,i),new xg(y[1],a,c,o,l),new xg(y[0],s,c,a,l)),(i=(l<=e)<<1|a<=t)&&(r=g[g.length-1],g[g.length-1]=g[g.length-1-i],g[g.length-1-i]=r)):(c=(o=t-+this._x.call(null,y.data))*o+(s=e-+this._y.call(null,y.data))*s)<n&&(h=t-(l=Math.sqrt(n=c)),f=e-l,d=t+l,p=e+l,u=y.data));return u},oo.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,c,l,u,h,f=this._root,d=this._x0,p=this._y0,g=this._x1,y=this._y1;if(f){if(f.length)for(;;){if((c=a>=(s=(d+g)/2))?d=s:g=s,(l=o>=(s=(p+y)/2))?p=s:y=s,!(f=(e=f)[u=l<<1|c]))return this;if(!f.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(n=e,h=u)}for(;f.data!==t;)if(!(f=(r=f).next))return this;(i=f.next)&&delete f.next,r?i?r.next=i:delete r.next:e?(i?e[u]=i:delete e[u],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(n?n[h]=f:this._root=f)):this._root=i}}return this},oo.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},oo.root=function(){return this._root},oo.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},oo.visit=function(t){var e,n,r,i,a,o,s,c=[],l=this._root;for(l&&c.push(new xg(l,this._x0,this._y0,this._x1,this._y1));a=c.pop();)!t(l=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&l.length&&(o=(n+i)/2,s=(r+a)/2,(e=l[3])&&c.push(new xg(e,o,s,i,a)),(e=l[2])&&c.push(new xg(e,n,s,o,a)),(e=l[1])&&c.push(new xg(e,o,r,i,s)),e=l[0])&&c.push(new xg(e,n,r,o,s));return this},oo.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new xg(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,c,l,u,h=e.node;h.length&&(a=e.x0,o=e.y0,l=(a+(s=e.x1))/2,u=(o+(c=e.y1))/2,(i=h[0])&&n.push(new xg(i,a,o,l,u)),(i=h[1])&&n.push(new xg(i,l,o,s,u)),(i=h[2])&&n.push(new xg(i,a,u,l,c)),i=h[3])&&n.push(new xg(i,l,u,s,c)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},oo.x=function(t){return arguments.length?(this._x=t,this):this._x},oo.y=function(t){return arguments.length?(this._y=t,this):this._y};var Lg={value:()=>{}};function Ng(){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 Cg(r)}function Cg(t){this._=t}function jg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Lg,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Cg.prototype=Ng.prototype={constructor:Cg,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]=jg(i[n],t.name,e);else if(null==e)for(n in i)i[n]=jg(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 Cg(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 Rg,Fg,Ig=0,Bg=0,Dg=0,Gg=1e3,zg=0,Wg=0,Vg=0,Yg="object"==typeof performance&&performance.now?performance:Date,Hg="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qg(){return Wg||(Hg(Ug),Wg=Yg.now()+Vg)}function Ug(){Wg=0}function Xg(){this._call=this._time=this._next=null}function $g(t,e,n){var r=new Xg;return r.restart(t,e,n),r}function Kg(){Wg=(zg=Yg.now())+Vg,Ig=Bg=0;try{qg(),++Ig;for(var t,e=Rg;e;)0<=(t=Wg-e._time)&&e._call.call(void 0,t),e=e._next;--Ig}finally{for(var n,r,i=Rg,a=1/(Ig=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:Rg=r);Fg=n,Jg(a),Wg=0}}function Zg(){var t=Yg.now(),e=t-zg;Gg<e&&(Vg-=e,zg=t)}function Jg(t){Ig||(Bg=Bg&&clearTimeout(Bg),24<t-Wg?(t<1/0&&(Bg=setTimeout(Kg,t-Yg.now()-Vg)),Dg=Dg&&clearInterval(Dg)):(Dg||(zg=Yg.now(),Dg=setInterval(Zg,Gg)),Ig=1,Hg(Kg)))}Xg.prototype=$g.prototype={constructor:Xg,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?qg():+n)+(null==e?0:+e),this._next||Fg===this||(Fg?Fg._next=this:Rg=this,Fg=this),this._call=t,this._time=n,Jg()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jg())}};const Qg=4294967296;function t1(t){return t.x}function e1(t){return t.y}var n1=10,r1=Math.PI*(3-Math.sqrt(5));function i1(c){var a,o=1,e=.001,s=1-Math.pow(e,1/300),l=0,u=.6,h=new Map,t=$g(i),n=Ng("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Qg)/Qg}();function i(){f(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function f(t){var e,n,r=c.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(l-o)*s,h.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=c[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=c.length;r<i;++r)(n=c[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=n1*Math.sqrt(.5+r),e=r*r1,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(c,r),t}return null==c&&(c=[]),d(),a={tick:f,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(c=t,d(),h.forEach(p),a):c},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?(l=+t,a):l},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,h.forEach(p),a):r},force:function(t,e){return 1<arguments.length?(null==e?h.delete(t):h.set(t,p(e)),a):h.get(t)},find:function(t,e,n){var r,i,a,o=0,s=c.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=c[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 a1(t,e,n){var i,c,l,u,h,r,f,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,F=(r=Sg(-30),d=(f=1)/0,p=.81,g.initialize=function(t,e){i=t,l=e,I()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:Sg(+t),I(),g):r},g.distanceMin=function(t){return arguments.length?(f=t*t,g):Math.sqrt(f)},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=Mg(i,t1,e1).visitAfter(B);for(u=t,e=0;e<n;++e)c=i[e],r.visit(D)}function I(){if(i){var t,e,n=i.length;for(h=new Array(n),t=0;t<n;++t)e=i[t],h[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+=h[e.data.index],e=e.next;);t.value=o}function D(t,e,n,r){if(!t.value)return!0;var i=t.x-c.x,a=t.y-c.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=_g(l))*i),0===a&&(s+=(a=_g(l))*a),s<f&&(s=Math.sqrt(f*s)),c.vx+=i*t.value*u/s,c.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==c||t.next)&&(0===i&&(s+=(i=_g(l))*i),0===a&&(s+=(a=_g(l))*a),s<f)&&(s=Math.sqrt(f*s));t.data!==c&&(o=h[t.data.index]*u/s,c.vx+=i*o,c.vy+=a*o),t=t.next;);}var y,m,v,b,x,w,k,M,E,O,S,_,A,T,n=Pg(a).id(mp(n)),P=("function"==typeof o&&F.strength(o),"function"==typeof s&&n.strength(s),i1(t).force("link",n).force("charge",F));function L(t){for(var e,n=0,r=m.length;n<r;++n)(e=m[n]).vy+=(b[n]-e.y)*v[n]*t}function N(){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+=(E[n]-e.x)*M[n]*t}function j(){if(k){var t,e=k.length;for(M=new Array(e),E=new Array(e),t=0;t<e;++t)M[t]=isNaN(E[t]=+w(k[t],t,k))?0:+O(k[t],t,k)}}function R(){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-_)*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==_&&(_=0),R.initialize=function(t){A=t},R.x=function(t){return arguments.length?(S=+t,R):S},R.y=function(t){return arguments.length?(_=+t,R):_},R.strength=function(t){return arguments.length?(T=+t,R):T},R)):P.force("x",(O=Sg(.1),"function"!=typeof w&&(w=Sg(null==w?0:+w)),C.initialize=function(t){k=t,j()},C.strength=function(t){return arguments.length?(O="function"==typeof t?t:Sg(+t),j(),C):O},C.x=function(t){return arguments.length?(w="function"==typeof t?t:Sg(+t),j(),C):w},C)).force("y",(x=Sg(.1),"function"!=typeof y&&(y=Sg(null==y?0:+y)),L.initialize=function(t){m=t,N()},L.strength=function(t){return arguments.length?(x="function"==typeof t?t:Sg(+t),N(),L):x},L.y=function(t){return arguments.length?(y="function"==typeof t?t:Sg(+t),N(),L):y},L)),P.stop();var G=Math.ceil(Math.log(P.alphaMin())/Math.log(1-P.alphaDecay()));for(let t=0;t<G;t++)P.tick();return{nodesData:t,linksData:a}}const o1=h=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={}}=h,c=J(e,"node"),l=J(e,"link"),{links:t,nodes:u}=bp(t,e),{nodesData:t,linksData:u}=a1({links:t,nodes:u},R({},{joint:!0},i),e);return[R({},{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:l,labels:o,style:J(r,"link"),animate:"object"==typeof s?J(s,"link"):s}),R({},{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({},c),scale:n,style:J(r,"node"),labels:[Object.assign(Object.assign({},{text:""}),J(r,"label")),...a],animate:"object"==typeof s?J(s,"node"):s})]},s1=(o1.props={composite:!0},h=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=dd(t,t=>t.children).sum(t=>t[e]).sort(i),c=h();c.size([1,1]),n&&c.nodeSize(n),r&&c.separation(r),c(t);const l=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,l.push(t)});c=t.links();return c.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:l,edges:c}}),c1=t=>s1(hd)(t),l1=(c1.props={},t=>s1(tp)(t)),u1=(l1.props={},l=>{const u={sortBy:(t,e)=>e.value-t.value},h={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},f={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={}}=l,c=null==e?void 0:e.value,{nodes:i,edges:c}=l1(Object.assign(Object.assign(Object.assign({},u),i),{field:c}))(t);return[R({},f,{data:c,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}),R({},h,{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})]}});u1.props={composite:!0};var h1={},f1={},d1=34,p1=10,g1=13;function y1(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function m1(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 v1(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function b1(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+v1(-e,6):9999<e?"+"+v1(e,6):v1(e,4))+"-"+v1(t.getUTCMonth()+1,2)+"-"+v1(t.getUTCDate(),2)+(a?"T"+v1(n,2)+":"+v1(r,2)+":"+v1(i,2)+"."+v1(a,3)+"Z":i?"T"+v1(n,2)+":"+v1(r,2)+":"+v1(i,2)+"Z":r||n?"T"+v1(n,2)+":"+v1(r,2)+"Z":"")}function x1(r){var e=new RegExp('["'+r+"\n\r]"),h=r.charCodeAt(0);function n(r,t){var e,n=[],i=r.length,a=0,o=0,s=i<=0,c=!1;function l(){if(s)return f1;if(c)return c=!1,h1;var t,e,n=a;if(r.charCodeAt(n)===d1){for(;a++<i&&r.charCodeAt(a)!==d1||r.charCodeAt(++a)===d1;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===p1?c=!0:e===g1&&(c=!0,r.charCodeAt(a)===p1)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===p1)c=!0;else if(e===g1)c=!0,r.charCodeAt(a)===p1&&++a;else if(e!==h)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===p1&&--i,r.charCodeAt(i-1)===g1&&--i;(e=l())!==f1;){for(var u=[];e!==h1&&e!==f1;)u.push(e),e=l();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?b1(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=y1(n=t),function(t,e){return r(i(t),e,n)}):y1(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?m1(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?m1(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function w1(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;k1&&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 k1=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),M1=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>Ee(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),x1(i).parse(t,a?w1:$0);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};M1.props={};const E1=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},[])}};E1.props={};const O1=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)};function S1(t,e,n){return Math.min(n,Math.max(e,t))}O1.props={};const _1=i=>t=>{const{fields:e=[]}=i;let{start:n=0,end:r=t.length}=i;n=S1(n,0,t.length-1),r=S1(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),{}))},A1=(_1.props={},t=>{t=t.fields;return _1({fields:t})});A1.props={};const T1=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};T1.props={};const P1=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))}},L1=(P1.props={},t=>{const e=t["value"];return()=>e}),N1=(L1.props={},t=>{const{callback:e=$0}=t;return t=>e(t)}),C1=(N1.props={},t=>{const{callback:e=$0}=t;return t=>Array.isArray(t)?t.map(e):t});C1.props={};var j1=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 R1={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 F1(t){const{y:l,thickness:u,weight:h,marginRatio:f,id:d,source:p,target:g,sourceWeight:y,targetWeight:m,sortBy:v}=Object.assign(Object.assign({},R1),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=Rp(r,t=>t.source),a=Rp(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=a0(e,t=>t.sourceWeight)+a0(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:j1[v])&&r.sort(n),!(n=(r=e).length))throw K0("Invalid nodes: it's empty!");if(h){const o=f/(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-f),e.height=u;var n=o+t,r=n+e.width,i=l-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 c=1/n;r.forEach((t,e)=>{t.x=(e+.5)*c,t.y=l})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!h)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=[l,l,l,l]});const s=Rp(e,t=>t.source),c=Rp(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=c.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 I1=e=>t=>F1(e)(t),B1=(I1.props={},Math.PI/180),D1=64,G1=2048;function z1(t){return t.text}function W1(){return"serif"}function V1(){return"normal"}function Y1(t){return t.value}function H1(){return 90*~~(2*Math.random())}function q1(){return 1}function U1(){}function X1(t,o,r,s){if(!o.sprite){var c=t.context,l=t.ratio;c.clearRect(0,0,(D1<<5)/l,G1/l);let i=0,a=0,n=0;var u,h,f,d,e=r.length;for(--s;++s<e;){o=r[s],c.save(),c.font=o.style+" "+o.weight+" "+~~((o.size+1)/l)+"px "+o.font;let t=c.measureText(o.text+"m").width*l,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*B1),f=Math.cos(o.rotate*B1),u=t*f,h=t*d,f=e*f,d=e*d,t=Math.max(Math.abs(u+d),Math.abs(u-d))+31>>5<<5,e=~~Math.max(Math.abs(h+f),Math.abs(h-f))):t=t+31>>5<<5,e>n&&(n=e),i+t>=D1<<5&&(i=0,a+=n,n=0),a+e>=G1)break;c.translate((i+(t>>1))/l,(a+(e>>1))/l),o.rotate&&c.rotate(o.rotate*B1),c.fillText(o.text,0,0),o.padding&&(c.lineWidth=2*o.padding,c.strokeText(o.text,0,0)),c.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=c.getImageData(0,0,(D1<<5)/l,G1/l).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)*(D1<<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 $1(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function K1(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function Z1(){return document.createElement("canvas")}function J1(t){return"function"==typeof t?t:function(){return t}}const Q1={archimedean:$1,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 ty(){let b=[256,256],r=z1,i=W1,p=Y1,g=V1,y=H1,m=q1,x=$1,w=Math.random,v=U1,k=[],M=null,E=1/0;const O=V1,S=Z1,_={};return _.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=(D1<<5)/e,t.height=G1/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),c=_.board||K1((b[0]>>5)*b[1]),l=k.length,u=[],h=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=O.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 f=-1,d=_.board?[{x:0,y:0},{x:a,y:o}]:void 0;function n(){for(var t,e,n,r=Date.now();Date.now()-r<E&&++f<l;){var i=h[f];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,X1(s,i,h,f),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 c,l=-s,u,h;for(;(c=o(l+=s))&&(u=~~c[0],h=~~c[1],!(Math.min(Math.abs(u),Math.abs(h))>=a));)if(t.x=n+u,t.y=r+h,!(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,c=t.y1-t.y0;let l=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<c;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[l+t])return 1;l+=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 f=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=f[e*d+t])>>>y:0);r+=p}return delete t.sprite,1}return}(c,i,d)&&(v.call(null,"word",{cloud:_,word:i}),u.push(i),d?_.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)}_._tags=u,_._bounds=d,f>=l&&(_.stop(),v.call(null,"end",{cloud:_,words:u,bounds:d}))}return M&&clearInterval(M),M=setInterval(n,0),n(),_},_.stop=function(){return M&&(clearInterval(M),M=null),_},_.createMask=t=>{var e=document.createElement("canvas"),[n,r]=b;if(n&&r){var i=n>>5,a=K1((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),c=e*n+t<<2,c=250<=o[c]&&250<=o[1+c]&&250<=o[2+c]?1<<31-t%32:0;a[s]|=c}_.board=a,_.hasImage=!0}},_.timeInterval=function(t){E=null==t?1/0:t},_.words=function(t){k=t},_.size=function(t=[]){b=[+t[0],+t[1]]},_.text=function(t){r=J1(t)},_.font=function(t){i=J1(t)},_.fontWeight=function(t){g=J1(t)},_.rotate=function(t){y=J1(t)},_.spiral=function(t){x=Q1[t]||t},_.fontSize=function(t){p=J1(t)},_.padding=function(t){m=J1(t)},_.random=function(t){w=J1(t)},_.on=function(t){v=J1(t)},_}const ey={size:[500,500],fontSize:[14,28]};function ny(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 ry=f=>h=>Ee(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},ey,f),e=ty(),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 Ee(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=h.map(t=>t.value),n=t,t=[Jp(e),Kp(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",ny,e.createMask),e.words([...h]),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:c,y:l}]=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:c,y:n?o:l})),t});function iy(e){return"string"==typeof e?t=>t[e]:e}ry.props={};const ay=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=iy(r),c=iy(t),l=Fp(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=l.get(c(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})};ay.props={};const oy=u=>l=>Ee(void 0,void 0,void 0,function*(){var{width:t,height:e}=ag(l),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=Z(u,["data","encode","scale","style","layout"]),c={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 ry(Object.assign(Object.assign({},c),o))(e);return[R({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]}),sy=(oy.props={composite:!0},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),cy=(sy.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),ly=(cy.props={},()=>["#95F0FF","#78D3F8","#5AB8DB","#3A9DBF","#0A82A4","#00698A","#005170","#003958","#002440"]),uy=(ly.props={},()=>["#B8E1FF","#9AC5FF","#7DAAFF","#5B8FF9","#3D76DD","#085EC0","#0047A5","#00318A","#001D70"]),hy=(uy.props={},()=>["#9DF5CA","#61DDAA","#42C090","#19A576","#008A5D","#006F45","#00562F","#003E19","#002800"]),fy=(hy.props={},()=>["#8CF4F2","#6FD8D6","#52BCBA","#31A09F","#008685","#006C6C","#005354","#003B3D","#002627"]),dy=(fy.props={},()=>["#D0E4FF","#B4C8ED","#99ADD1","#7E92B5","#65789B","#4C6080","#334867","#1B324F","#021D38"]),py=(dy.props={},()=>["#FFC771","#FFAB57","#F6903D","#D77622","#B85C00","#9B4300","#7D2A00","#601000","#450000"]),gy=(py.props={},()=>["#FFC2EC","#FFA6D0","#F08BB4","#D37099","#B65680","#9A3C67","#7E214F","#630038","#490022"]),yy=(gy.props={},()=>["#FFBB95","#FF9E7B","#FF8362","#E8684A","#C84D32","#AA311C","#8C1104","#6F0000","#510000"]),my=(yy.props={},()=>["#FFD83B","#F6BD16","#D7A100","#B98700","#9C6E00","#7F5600","#633F00","#482900","#2F1400"]),vy=(my.props={},()=>["#FFCCFF","#EBB0FF","#CE95F5","#B27AD8","#9661BC","#7B48A1","#613086","#48186C","#2E0054"]),by=(vy.props={},()=>["#FDEDBE","#FFDF80","#FFCB33","#FFB200","#FF8C00","#FF6500","#E6450F","#B22C00","#661900"]),xy=(by.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),wy=(xy.props={},()=>["#FFEBB0","#FFDF80","#FACA3E","#E6B80B","#B5AC23","#6A9A48","#20876B","#06746B","#044E48"]),ky=(wy.props={},()=>["#D2EDC8","#A9DACC","#75C6D1","#42B3D5","#3993C2","#3073AE","#27539B","#1E3388","#171E6D"]),My=(ky.props={},()=>["#003F7F","#004C99","#0059B2","#0072E5","#1A8CFF","#4DA6FF","#80BFFF","#B3D9FF","#EAE9EB","#FFD5B1","#FFC08C","#FFAB66","#FF963E","#F17F0B","#D16A0C","#A45411","#794012"]),Ey=(My.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#E0F2EB","#66D8FF","#1AC5FF","#007FFF","#0059FF","#0040FF","#002CB2","#FFDF80","#001F7F"]),Oy=(Ey.props={},()=>["#014c63","#10686c","#168575","#16a37e","#0bc286","#65cf9b","#96dcb0","#c1e8c5","#F2EAEA","#FFC5AC","#FFA884","#FF895D","#FF6836","#F3470D","#D13808","#A4300C","#7A270E"]),Sy=(Oy.props={},()=>["#661900","#B22C00","#E6450F","#FF6500","#FF8C00","#FFB200","#FFCB33","#FFDF80","#FFE2DC","#EAACFF","#DD78FF","#C53FFF","#A700FF","#8500FF","#620BE1","#3607C2","#27029A"]);function _y(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Ay(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Ty(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var c=Math.floor((a+o)/2);s(t[c])>e?o=c:a=c+1}return a}Sy.props={};const Py=Math.sqrt(50),Ly=Math.sqrt(10),Ny=Math.sqrt(2);function Cy(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>=Py?10:n>=Ly?5:n>=Ny?2:1)*10**t:-(10**-t)/(n>=Py?10:n>=Ly?5:n>=Ny?2:1)}function jy(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>=Py?r*=10:n>=Ly?r*=5:n>=Ny&&(r*=2),e<t?-r:r}const Ry=(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=Cy(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=Cy(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=Cy(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},Fy=36e5,Iy=864e5,By=7*Iy;Iy,Iy;function Dy(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},c=(t,e)=>{e&&i(t,e),n(t)};const l=(t,e)=>{t=new Date(+t-1);return c(t,e),s(t,e),c(t),t};return{ceil:l,floor:(t,e)=>{t=new Date(+t);return c(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?l(t,n):l(t);+o<+e;s(o,a),c(o))i.push(new Date(+o));return i},duration:t}}tl=Dy(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),ho=Dy(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),fo=Dy(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),po=Dy(Fy,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Fy*e)},t=>t.getHours()),mo=Dy(Iy,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Iy*e)},t=>t.getDate()-1);const Gy=Dy(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=Dy(By,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+By*e)},t=>{var e=Gy.floor(t),t=new Date(+t);return Math.floor((+t-+e)/By)}),bo=Dy(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 zy={millisecond:tl,second:ho,minute:fo,hour:po,day:mo,week:vo,month:Gy,year:bo};xo=Dy(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),wo=Dy(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),ko=Dy(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),a=Dy(Fy,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Fy*e)},t=>t.getUTCHours()),Mo=Dy(Iy,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Iy*e)},t=>t.getUTCDate()-1);const Wy=Dy(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());Eo=Dy(By,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+By*e)},t=>{var e=Wy.floor(t),t=new Date(+t);return Math.floor((+t-+e)/By)}),go=Dy(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 Vy={millisecond:xo,second:wo,minute:ko,hour:a,day:Mo,week:Eo,month:Wy,year:go};function Yy(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?Vy:zy;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,c=r||(e-t)/n,l=i.length,u=Ty(i,c,0,l,s);let h;return h=u===l?[a,jy(t/a.duration,e/a.duration,n)]:u?([l,a]=c/s(i[u-1])<s(i[u])/c?i[u-1]:i[u],[l,r?Math.ceil(r/l.duration):a]):[o,Math.max(jy(t,e,n),1)]}const Hy=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Yy(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function qy(t){return null!=t&&!Number.isNaN(t)}const Uy=e=>t=>-e(-t),Xy=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?Uy(t):t},$y=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?Uy(n):n},Ky=(t,e,n,r)=>{var i=t<0,a=Xy(r,i),r=$y(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 Zy(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 Pf(t)?Math.round(t):t}):i;this.output=_y(a,r,e,t)},t.prototype.invert=void 0}}var Jy,Zc={exports:{}},rl={exports:{}},Qy=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))},tm=Array.prototype.concat,em=Array.prototype.slice,nm=rl.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];Qy(i)?e=tm.call(e,em.call(i)):e.push(i)}return e},rm=(nm.wrap=function(t){return function(){return t(nm(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]}),im=rl.exports,am=Object.hasOwnProperty,om=Object.create(null);for(Jy in rm)am.call(rm,Jy)&&(om[rm[Jy]]=Jy);var sm=Zc.exports={to:{},get:{}};function cm(t,e,n){return Math.min(Math.max(e,t),n)}function lm(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}sm.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=sm.get.hsl(t),n="hsl";break;case"hwb":e=sm.get.hwb(t),n="hwb";break;default:e=sm.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},sm.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]:am.call(rm,e[1])?((i=rm[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]=cm(i[n],0,255);return i[3]=cm(i[3],0,1),i},sm.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,cm(parseFloat(t[2]),0,100),cm(parseFloat(t[3]),0,100),cm(isNaN(e)?1:e,0,1)]):null},sm.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,cm(parseFloat(t[2]),0,100),cm(parseFloat(t[3]),0,100),cm(isNaN(e)?1:e,0,1)]):null},sm.to.hex=function(){var t=im(arguments);return"#"+lm(t[0])+lm(t[1])+lm(t[2])+(t[3]<1?lm(Math.round(255*t[3])):"")},sm.to.rgb=function(){var t=im(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]+")"},sm.to.rgb.percent=function(){var t=im(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]+")"},sm.to.hsl=function(){var t=im(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},sm.to.hwb=function(){var t=im(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},sm.to.keyword=function(t){return om[t.slice(0,3)]};var um=Zc.exports;function hm(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 fm(t){var e,n,r,t=um.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*hm(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*hm(n,r,e),255*hm(n,r,e-1/3),t]):null):null}const dm=(e,n)=>t=>e*(1-t)+n*t,pm=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return dm(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const c=fm(n),l=fm(r);return null===c||null===l?c?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=c[t],i=l[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})`}}},gm=(t,e)=>{const n=dm(t,e);return t=>Math.round(n(t))};function ym({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function mm(t){return"object"==typeof t?t.valueOf():t}class vm extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=mm,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(ym({map:this.map,initKey:this.initKey},t))}has(t){return super.has(ym({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 bm{constructor(t){this.options=R({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=R({},this.options,t),this.rescale(t)}rescale(t){}}const xm=Symbol("defaultUnknown");function wm(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function km(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==xm)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function Mm(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class Em extends bm{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:xm}}map(t){return 0===this.domainIndexMap.size&&wm(this.domainIndexMap,this.getDomain(),this.domainKey),km({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&wm(this.rangeIndexMap,this.getRange(),this.rangeKey),km({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=Mm(e),this.rangeKey=Mm(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 Em(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 Om(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var c=e.length,l=0<(l=(t=c)-(u=a).length)?[...u,...new Array(l).fill(1)]:l<0?u.slice(0,t):u,[t,u]=n,u=u-t,h=u/(2/c*r+1-1/c*i);const f=h*i/c;h-=c*f;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(l),p=h/d.reduce((t,e)=>t+e);var l=new vm(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new vm(e.map((t,e)=>{e=d[e]*p+f;return[t,o?Math.floor(e):e]})),h=Array.from(g.values()).reduce((t,e)=>t+e),t=t+(u-(h-h/c*i))*s;let y=o?Math.round(t):t;var m=new Array(c);for(let t=0;t<c;t+=1){m[t]=(v=y,Math.round(1e12*v)/1e12);var v=e[t];y+=g.get(v)}return{valueBandWidth:l,valueStep:g,adjustedRange:m}}class Sm extends Em{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:xm,flex:[]}}clone(){return new Sm(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 Om(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,c=n[0];return n=n[1]-c,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),c+=(n-o*(e-r))*a,s=o*(1-r),i&&(c=Math.round(c),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>c+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 _m=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=Cy(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 Am(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const Tm=[1,5,2,2.5,4,3],Pm=100*Number.EPSILON;const Lm=(n,r,t=5,i=!0,a=Tm,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 c,l,u,h,f,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=(h=m,f=a,d=y,p=void 0,p=Yf(f),1-Df(f,h)/(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=(E=r,k=w*(e-1),(E-=n)<k?1-((k-E)/2)**2/(.1*E)**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,E=Math.ceil(n/w)*y;if(M<=E){var O=E-M;for(let t=0;t<=O;t+=1){var S=(M+t)*(w/y),_=S+w*(e-1),A=w,T=function(t,e,n,r,i,a){var o=Yf(e),e=Df(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<Pm||a-t<Pm)&&r<=0&&0<=i?1:s)}(m,a,y,S,_,A),P=1-.5*((r-_)**2+(n-S)**2)/(.1*(r-n))**2,L=(c=e,L=n,c=(c-1)/(_-(N=S)),l=((l=s)-1)/(Math.max(_,r)-Math.min(L,N)),2-Math.max(c/l,l/c)),N=o[0]*T+o[1]*P+o[2]*L+ +o[3];g.score<N&&(!i||S<=n&&r<=_)&&(g.lmin=S,g.lmax=_,g.lstep=A,g.score=N)}}t+=1}e+=1}}y+=1}var t=Am(g.lmax),e=Am(g.lmin),C=Am(g.lstep),j=Math.floor((t=(t-e)/C,Math.round(1e12*t)/1e12))+1,R=new Array(j);R[0]=Am(e);for(let t=1;t<j;t+=1)R[t]=Am(R[t-1]+C);return R};class Nm extends bm{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:Lm}}map(t){return qy(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new Nm(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return Pf(t)&&Pf(r)?n(t,r,e):[]}}const Cm=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return _y(o=t<r?(a=Ay(t,r),n(e,i)):(a=Ay(r,t),n(i,e)),a)},jm=(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,c=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=Ay(s[t],s[t+1]),o[t]=e(c[t],c[t+1]);return t=>{var e=Ty(r,t,1,i)-1,n=a[e];return _y(o[e],n)(t)}},Rm=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?jm:Cm)(t,e,r?gm:n)};class Fm extends bm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:dm,tickCount:5}}map(t){return qy(t)?this.output(t):this.options.unknown}invert(t){return qy(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 Ry}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 zf}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=Rm(n.map(t),r,a,i);this.output=_y(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=Rm(i,r.map(t),dm);this.input=_y(e,n,i)}}class Im extends Fm{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:pm,tickMethod:_m,tickCount:5}}chooseTransforms(){return[zf,zf]}clone(){return new Im(this.options)}}class Bm extends Sm{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:xm,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new Bm(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const Dm=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class Gm extends Fm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:pm,tickMethod:_m,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[zf,zf]:(t=.5===r?Dm:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new Gm(this.options)}}class zm extends Gm{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:pm,tickMethod:_m,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new zm(this.options)}}class Wm extends bm{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return qy(t)?(t=Ty(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 Wm(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const Vm=(t,e,n,r=10)=>{var i=t<0,a=$y(r,i),o=Xy(r,i),s=e<t,c=s?e:t,l=s?t:e;let u=o(c),h=o(l),f=[];if(!(r%1)&&h-u<n){if(u=Math.floor(u),h=Math.ceil(h),i)for(;u<=h;u+=1){var d=a(u);for(let t=r-1;1<=t;--t){var p=d*t;if(l<p)break;c<=p&&f.push(p)}}else for(;u<=h;u+=1){var g=a(u);for(let t=1;t<r;t+=1){var y=g*t;if(l<y)break;c<=y&&f.push(y)}}2*f.length<n&&(f=_m(c,l,n))}else f=_m(u,h,Math.min(h-u,n)).map(a);return s?f.reverse():f};class Ym extends Fm{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:pm,tickMethod:Vm,tickCount:5}}chooseNice(){return Ky}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[Xy(t,e),$y(t,e)]}clone(){return new Ym(this.options)}}class Hm extends Wm{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:Lm}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=Ry(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 Hm(this.options)}}function qm(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 Um extends Wm{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:Lm}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=qm(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 Um(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var Xm=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,$m=/\[([^]*?)\]/gm;function Km(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function Zm(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 Jm(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var Qm,Ko=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ol=["January","February","March","April","May","June","July","August","September","October","November","December"],sl=Km(ol,3),tv=Zm({},{dayNamesShort:Km(Ko,3),dayNames:Ko,monthNamesShort:sl,monthNames:ol,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),ev={D:function(t){return String(t.getDate())},DD:function(t){return Jm(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return Jm(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 Jm(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 Jm(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return Jm(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return Jm(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return Jm(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return Jm(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return Jm(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return Jm(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return Jm(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?"-":"+")+Jm(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+Jm(Math.floor(Math.abs(t)/60),2)+":"+Jm(Math.abs(t)%60,2)}},nv={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 rv=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=Yy(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function iv(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class av extends Fm{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:rv,interpolate:dm,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return Hy}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?Vy:zy,s=t?iv:zf;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=nv.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=nv[t]||t).replace($m,function(t,e){return r.push(e),"@@@"}),Zm(Zm({},tv),n));return(t=t.replace(Xm,function(t){return ev[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new av(this.options)}}var ov;let sv=Qm=class extends Im{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:zf,tickMethod:_m,tickCount:5}}constructor(t){super(t)}clone(){return new Qm(this.options)}};sv=Qm=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}([Zy(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return _y(dm(0,1),Ay(t,e))})],sv);let cv=ov=class extends Im{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:zf,tickMethod:_m,tickCount:5}}constructor(t){super(t)}clone(){return new ov(this.options)}};cv=ov=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}([Zy(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=_y(dm(0,.5),Ay(e,n)),a=_y(dm(.5,1),Ay(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],cv);const lv=t=>new Sm(t),uv=(lv.props={},t=>new Im(t)),hv=(uv.props={},t=>new Em(t)),fv=(hv.props={},t=>new Nm(t)),dv=(fv.props={},t=>new Bm(t)),pv=(dv.props={},t=>new av(t)),gv=(pv.props={},t=>new Ym(t)),yv=(gv.props={},t=>new Gm(t)),mv=(yv.props={},t=>new Wm(t)),vv=(mv.props={},t=>new Um(t)),bv=(vv.props={},t=>new Hm(t)),xv=(bv.props={},t=>new zm(t)),wv=(xv.props={},t=>new sv(t)),kv=(wv.props={},Math.PI),Mv=2*kv,Ev=1e-6,Ov=Mv-Ev;function Sv(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function _v(){return new Sv}function Av(t){return function(){return t}}Sv.prototype=_v.prototype={constructor:Sv,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,c=this._y1,l=(n=+n)-(t=+t),u=(r=+r)-(e=+e),h=s-t,f=c-e,d=h*h+f*f;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):d>Ev&&(Math.abs(f*l-u*h)>Ev&&i?(o=l*l+u*u,r=(n=n-s)*n+(s=r-c)*s,c=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((kv-Math.acos((o+d-r)/(2*c*a)))/2))/a,r=o/c,Math.abs(d-1)>Ev&&(this._+="L"+(t+d*h)+","+(e+d*f)),this._+="A"+i+","+i+",0,0,"+ +(h*s<f*n)+","+(this._x1=t+r*l)+","+(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),c=t+o,l=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"+c+","+l:(Math.abs(this._x1-c)>Ev||Math.abs(this._y1-l)>Ev)&&(this._+="L"+c+","+l),n&&((a=a<0?a%Mv+Mv:a)>Ov?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=c)+","+(this._y1=l):a>Ev&&(this._+="A"+n+","+n+",0,"+ +(a>=kv)+","+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 Tv=Math.abs,Pv=Math.atan2,Lv=Math.cos,Nv=Math.max,Cv=Math.min,jv=Math.sin,Rv=Math.sqrt,Fv=1e-12,Iv=Math.PI,Bv=Iv/2,Dv=2*Iv;function Gv(t){return 1<=t?Bv:t<=-1?-Bv:Math.asin(t)}function zv(t){return t.innerRadius}function Wv(t){return t.outerRadius}function Vv(t){return t.startAngle}function Yv(t){return t.endAngle}function Hv(t){return t&&t.padAngle}function qv(t,e,n,r,i,a,o){var s=t-n,c=e-r,o=(o?a:-a)/Rv(s*s+c*c),c=o*c,o=-o*s,s=t+c,t=e+o,e=n+c,n=r+o,r=(s+e)/2,l=(t+n)/2,u=e-s,h=n-t,f=u*u+h*h,a=i-a,s=s*n-e*t,n=(h<0?-1:1)*Rv(Nv(0,a*a*f-s*s)),e=(s*h-u*n)/f,t=(-s*u-h*n)/f,d=(s*h+u*n)/f,s=(-s*u+h*n)/f,u=e-r,h=t-l,n=d-r,f=s-l;return n*n+f*f<u*u+h*h&&(e=d,t=s),{cx:e,cy:t,x01:-c,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function Uv(){var A=zv,T=Wv,P=Av(0),L=null,N=Vv,C=Yv,j=Hv,R=null;function e(){var t,e,n,r,i,a,o,s,c,l,u,h,f,d,p,g,y,m,v,b,x,w,k=+A.apply(this,arguments),M=+T.apply(this,arguments),E=N.apply(this,arguments)-Bv,O=C.apply(this,arguments)-Bv,S=Tv(O-E),_=E<O;if(R=R||(t=_v()),M<k&&(e=M,M=k,k=e),M>Fv?S>Dv-Fv?(R.moveTo(M*Lv(E),M*jv(E)),R.arc(0,0,M,E,O,!_),k>Fv&&(R.moveTo(k*Lv(O),k*jv(O)),R.arc(0,0,k,O,E,_))):(r=e=E,i=n=O,o=a=S,f=(u=j.apply(this,arguments)/2)>Fv&&(L?+L.apply(this,arguments):Rv(k*k+M*M)),w=x=s=Cv(Tv(M-k)/2,+P.apply(this,arguments)),f>Fv&&(h=Gv(f/k*jv(u)),f=Gv(f/M*jv(u)),(a-=2*h)>Fv?(r+=h*=_?1:-1,i-=h):(a=0,r=i=(E+O)/2),(o-=2*f)>Fv?(e+=f*=_?1:-1,n-=f):(o=0,e=n=(E+O)/2)),u=M*Lv(e),h=M*jv(e),f=k*Lv(i),E=k*jv(i),s>Fv&&(d=M*Lv(n),p=M*jv(n),g=k*Lv(r),y=k*jv(r),S<Iv)&&(O=function(t,e,n,r,i,a,o,s){var c=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(c*c<Fv))return[t+(c=(o*(e-a)-s*(t-i))/c)*n,e+c*r]}(u,h,g,y,d,p,f,E))&&(S=u-O[0],v=h-O[1],b=d-O[0],m=p-O[1],v=1/jv((1<(S=(S*b+v*m)/(Rv(S*S+v*v)*Rv(b*b+m*m)))?0:S<-1?Iv:Math.acos(S))/2),b=Rv(O[0]*O[0]+O[1]*O[1]),x=Cv(s,(k-b)/(v-1)),w=Cv(s,(M-b)/(1+v))),o>Fv?w>Fv?(c=qv(g,y,u,h,M,w,_),l=qv(d,p,f,E,M,w,_),R.moveTo(c.cx+c.x01,c.cy+c.y01),w<s?R.arc(c.cx,c.cy,w,Pv(c.y01,c.x01),Pv(l.y01,l.x01),!_):(R.arc(c.cx,c.cy,w,Pv(c.y01,c.x01),Pv(c.y11,c.x11),!_),R.arc(0,0,M,Pv(c.cy+c.y11,c.cx+c.x11),Pv(l.cy+l.y11,l.cx+l.x11),!_),R.arc(l.cx,l.cy,w,Pv(l.y11,l.x11),Pv(l.y01,l.x01),!_))):(R.moveTo(u,h),R.arc(0,0,M,e,n,!_)):R.moveTo(u,h),k>Fv&&a>Fv?x>Fv?(c=qv(f,E,d,p,k,-x,_),l=qv(u,h,g,y,k,-x,_),R.lineTo(c.cx+c.x01,c.cy+c.y01),x<s?R.arc(c.cx,c.cy,x,Pv(c.y01,c.x01),Pv(l.y01,l.x01),!_):(R.arc(c.cx,c.cy,x,Pv(c.y01,c.x01),Pv(c.y11,c.x11),!_),R.arc(0,0,k,Pv(c.cy+c.y11,c.cx+c.x11),Pv(l.cy+l.y11,l.cx+l.x11),_),R.arc(l.cx,l.cy,x,Pv(l.y11,l.x11),Pv(l.y01,l.x01),!_))):R.arc(0,0,k,i,r,_):R.lineTo(f,E)):R.moveTo(0,0),R.closePath(),t)return R=null,t+""||null}return e.centroid=function(){var t=(+A.apply(this,arguments)+ +T.apply(this,arguments))/2,e=(+N.apply(this,arguments)+ +C.apply(this,arguments))/2-Iv/2;return[Lv(e)*t,jv(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:Av(+t),e):A},e.outerRadius=function(t){return arguments.length?(T="function"==typeof t?t:Av(+t),e):T},e.cornerRadius=function(t){return arguments.length?(P="function"==typeof t?t:Av(+t),e):P},e.padRadius=function(t){return arguments.length?(L=null==t?null:"function"==typeof t?t:Av(+t),e):L},e.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:Av(+t),e):N},e.endAngle=function(t){return arguments.length?(C="function"==typeof t?t:Av(+t),e):C},e.padAngle=function(t){return arguments.length?(j="function"==typeof t?t:Av(+t),e):j},e.context=function(t){return arguments.length?(R=null==t?null:t,e):R},e}function Xv(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function $v(t){this._context=t}function Kv(t){return new $v(t)}function Zv(t){return t[0]}function Jv(t){return t[1]}function Qv(o,s){var c=Av(!0),l=null,u=Kv,h=null;function e(t){var e,n,r,i=(t=Xv(t)).length,a=!1;for(null==l&&(h=u(r=_v())),e=0;e<=i;++e)!(e<i&&c(n=t[e],e,t))===a&&((a=!a)?h.lineStart():h.lineEnd()),a&&h.point(+o(n,e,t),+s(n,e,t));if(r)return h=null,r+""||null}return o="function"==typeof o?o:void 0===o?Zv:Av(o),s="function"==typeof s?s:void 0===s?Jv:Av(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:Av(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:Av(+t),e):s},e.defined=function(t){return arguments.length?(c="function"==typeof t?t:Av(!!t),e):c},e.curve=function(t){return arguments.length?(u=t,null!=l&&(h=u(l)),e):u},e.context=function(t){return arguments.length?(null==t?l=h=null:h=u(l=t),e):l},e}function tb(u,h,f){var d=null,p=Av(!0),g=null,y=Kv,m=null;function e(t){var e,n,r,i,a,o=(t=Xv(t)).length,s=!1,c=new Array(o),l=new Array(o);for(null==g&&(m=y(a=_v())),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(c[r],l[r]);m.lineEnd(),m.areaEnd()}s&&(c[e]=+u(i,e,t),l[e]=+h(i,e,t),m.point(d?+d(i,e,t):c[e],f?+f(i,e,t):l[e]))}if(a)return m=null,a+""||null}function t(){return Qv().defined(p).curve(y).context(g)}return u="function"==typeof u?u:void 0===u?Zv:Av(+u),h="function"==typeof h?h:Av(void 0===h?0:+h),f="function"==typeof f?f:void 0===f?Jv:Av(+f),e.x=function(t){return arguments.length?(u="function"==typeof t?t:Av(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:Av(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:Av(+t),e):d},e.y=function(t){return arguments.length?(h="function"==typeof t?t:Av(+t),f=null,e):h},e.y0=function(t){return arguments.length?(h="function"==typeof t?t:Av(+t),e):h},e.y1=function(t){return arguments.length?(f=null==t?null:"function"==typeof t?t:Av(+t),e):f},e.lineX0=e.lineY0=function(){return t().x(u).y(h)},e.lineY1=function(){return t().x(u).y(f)},e.lineX1=function(){return t().x(d).y(h)},e.defined=function(t){return arguments.length?(p="function"==typeof t?t:Av(!!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}$v.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 eb=rb(Kv);function nb(t){this._curve=t}function rb(e){function t(t){return new nb(e(t))}return t._curve=e,t}function ib(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(rb(t)):e()._curve},t}function ab(){}function ob(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 sb(t,e){this._context=t,this._k=(1-e)/6}function cb(t,e){this._context=t,this._k=(1-e)/6}function lb(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,c=t._y2;t._l01_a>Fv&&(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>Fv&&(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,c=(c*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,c,t._x2,t._y2)}function ub(t,e){this._context=t,this._alpha=e}nb.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))}},sb.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:ob(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:ob(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 sb(t,n)}return t.tension=function(t){return e(+t)},t}(0),cb.prototype={areaStart:ab,areaEnd:ab,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:ob(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 cb(t,n)}return t.tension=function(t){return e(+t)},t}(0),ub.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:lb(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 hb=function e(n){function t(t){return n?new ub(t,n):new sb(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function fb(t,e){this._context=t,this._alpha=e}fb.prototype={areaStart:ab,areaEnd:ab,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:lb(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 db=function e(n){function t(t){return n?new fb(t,n):new cb(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function pb(t){this._context=t}function gb(t){return new pb(t)}function yb(t,e){this._context=t,this._t=e}function mb(t){return new yb(t,.5)}function vb(t){return new yb(t,0)}function bb(t){return new yb(t,1)}function Q(t){return new xb([t],null,t,t.ownerDocument)}pb.prototype={areaStart:ab,areaEnd:ab,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))}},yb.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 xb{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 xb(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new xb(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 xb([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 xb(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 xb(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 xb([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],c=new Set,l=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])),h=Rp(this._elements,t=>r(t.__data__));for(let t=0;t<e.length;t++){var f=e[t],d=n(f,t),p=r(f,t);if(l.has(d)){var g=l.get(d);g.__data__=f,g.__facet__=!1,a.push(g),o.delete(g),l.delete(d)}else if(u.has(d)){g=u.get(d);g.__data__=f,g.__facet__=!0,a.push(g),u.delete(d)}else if(h.has(d)){const Rp=h.get(d);s.push([f,Rp]);for(const y of Rp)o.delete(y);h.delete(d)}else l.has(p)?((d=l.get(p)).__toData__?d.__toData__.push(f):d.__toData__=[f],c.add(d),o.delete(d)):i.push(f)}var t=[new xb([],i,this._parent,this._document),new xb(a,null,this._parent,this._document),new xb(o,null,this._parent,this._document),new xb([],s,this._parent,this._document),new xb(c,null,this._parent,this._document)];return new xb(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new xb(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=xb.registry[t])?new e:K0("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 xb([],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 wb([t,e],[n,r]){return[t-n,e-r]}function kb([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function Mb([t,e]){return Math.atan2(e,t)}function Eb([t,e]){return Mb([t,e])+Math.PI/2}function Ob(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 Sb([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function _b(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function Ab(t){return t.map((t,e)=>e)}function F(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function Tb(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*kb(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 Pb(t,e,n,r,i){e=Mb(wb(r,e))+Math.PI,n=Mb(wb(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function Lb(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=Ab(a),[r,o]=Pp(t,t=>a[t]);const s=new Im({domain:[r,o],range:[0,100]}),c=t=>s.map(a[t]);r={between:t=>`${e[t]} ${c(t)}%`,start:t=>0===t?`${e[t]} ${c(t)}%`:`${e[t-1]} ${c(t)}%, ${e[t]} ${c(t)}%`,end:t=>t===e.length-1?`${e[t]} ${c(t)}%`:`${e[t]} ${c(t)}%, ${e[t+1]} ${c(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>c(t)-c(e)).map(r[i]||r.between).join(",")})`}function Nb(t){var[t,e,n,r]=t;return[r,t,e,n]}function Cb(t,e,n){var[e,r,,i]=o0(t)?Nb(e):e,[n,a]=n,t=t.getCenter(),o=Eb(wb(e,t)),r=Eb(wb(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:kb(i,t),outerRadius:kb(e,t)}}function jb(t,e,n,r){var i=t["defaultColor"],t=t[e]||{};return Object.assign({},{fill:i,stroke:i},t[n]||t[r])}function Rb(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function Fb(t,e){return s0(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}xb.registry={g:ts,rect:ps,circle:Ho,path:cs,text:ys,ellipse:Jo,image:is,line:os,polygon:us,polyline:fs,html:ns};const Ib=P=>{const{colorAttribute:L,first:N=!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=jb(r,i,a,o),i=L,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:c=o,radiusTopRight:l=o,radiusBottomRight:u=o,radiusBottomLeft:h=o,innerRadius:f=0,innerRadiusTopLeft:d=f,innerRadiusTopRight:p=f,innerRadiusBottomRight:g=f,innerRadiusBottomLeft:f=f,inset:y=0,insetLeft:m=y,insetRight:v=y,insetBottom:b=y,insetTop:x=y,lineWidth:i="stroke"===L||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(!s0(n)&&!l0(n)){var[M,,E]=!!o0(n)?Nb(t):t;const[T,_]=M;var[E,M]=wb(E,M),O=(0<E?T:T+E)+m,S=(0<M?_:_+M)+x,E=Math.abs(E)-(m+v),m=Math.abs(M)-(x+b);return Q(new ps({})).call(F,r).style("lineWidth",i).style("x",O).style("y",S).style("width",E).style("height",m).style("stroke",void 0===s?a:s).style(Rb(P),k).style(L,a).style("radius",[N?c:d,N?l:p,C?u:g,C?h:f]).call(F,w).node()}const{y:_,y1:A}=e;v=n.getCenter(),M=Cb(n,t,[_,A]),x=Uv().cornerRadius(o).padAngle(y*Math.PI/180);return Q(new cs({})).call(F,r).style("path",x(M)).style("transform",`translate(${v[0]}, ${v[1]})`).style("stroke",a||s).style("lineWidth",i).style(L,a).style(Rb(P),k).call(F,j).node()}},Bb=(Ib.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>Ib(Object.assign({colorAttribute:"fill"},t))),Db=(Bb.props=Object.assign({},Ib.props),t=>Ib(Object.assign({colorAttribute:"stroke"},t)));Db.props=Object.assign({},Ib.props);const Gb=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(o0(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,c=Z(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return Ib(Object.assign({colorAttribute:"fill"},c))(t,e,n,r,i,...a)}};function zb(t,e,n){var[t,r,i,a]=t;if(o0(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]}Gb.props=Object.assign({},Ib.props);const Wb=t=>Gb(Object.assign({adjustPoints:zb},t));function Vb(t){const e="function"==typeof t?t:t.render;return class extends Uo{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}Wb.props=Object.assign({},Ib.props);const Yb=Vb(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;Q(t).maybeAppend("line",()=>new cs({})).style("d",e).call(F,r),Q(t).maybeAppend("line1",()=>new cs({})).style("d",n).call(F,i)});const Hb=t=>{const{curve:h,gradient:f=!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=jb(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:c}=e,a=f&&a?Lb(a,s,c,f,d):r,s=Fb(n,e),c=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),y);let l;if(s0(n)){const u=n.getCenter();l=n=>ib(Qv().curve(eb)).angle((t,e)=>Eb(wb(n[e],u))).radius((t,e)=>kb(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(h)(n)}else l=Qv().x(t=>t[0]).y(t=>t[1]).defined(([t,e])=>p(t)&&p(e)).curve(h);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(c,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?Q(new cs({})).style("d",l(r)).call(F,c):a&&!g?Q(new cs({})).style("d",l(t)).call(F,c):Q(new Yb).style("style1",Object.assign(Object.assign({},c),o)).style("style2",c).style("d1",e.map(l).join(",")).style("d2",l(t))).node()}},qb=(Hb.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=s0(n)?gb:Kv;return Hb(Object.assign({curve:i},a))(t,e,n,r)}),Ub=(qb.props=Object.assign({},Hb.props),t=>{const{alpha:a=.5}=t,o=Z(t,["alpha"]);return(t,e,n,r)=>{var i=s0(n)?db:hb;return Hb(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),Xb=(Ub.props=Object.assign({},Hb.props),t=>Hb(Object.assign({curve:bb},t))),$b=(Xb.props=Object.assign({},Hb.props),t=>Hb(Object.assign({curve:vb},t))),Kb=($b.props=Object.assign({},Hb.props),t=>Hb(Object.assign({curve:mb},t)));function Zb(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"]]}Kb.props=Object.assign({},Hb.props);var Jb,Qb=Object.freeze({__proto__:null,point:Zb,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 o=f=>{const{colorAttribute:d,symbol:t,mode:p="auto"}=f,g=Z(f,["colorAttribute","symbol","mode"]),y=Qb[t]||Zb;return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=jb(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:c}=e,[l,u]=1===(l=t).length?l[0]:([[l,h],[u,i]]=l,[(l+u)/2,(h+i)/2]),h=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||h0(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 cs).call(F,r).style("d",y(l,u,h)).style("lineWidth",a).style("transform",o).style("stroke",s).style(Rb(f),c).style(d,s).call(F,g).node()}},t2=(o.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>o(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),e2=(t2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),n2=(e2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),r2=(n2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),i2=(r2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),a2=(i2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),o2=(a2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),s2=(o2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),c2=(s2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),l2=(c2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),u2=(l2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),h2=(u2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),f2=(h2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),d2=(f2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),p2=(d2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"point"},t))),g2=(p2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"square"},t))),y2=(g2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),m2=(y2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),v2=(m2.props=Object.assign({},o.props),t=>o(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),b2=(v2.props=Object.assign({},o.props),t=>{const{arrowSize:h="40%"}=t,f=Z(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=jb(r,e,i,a),{fill:e,stroke:i}=r,a=Z(r,["fill","stroke"]),[r,t]=t,[c,l]=Tb(r,t,{arrowSize:h}),u=_v();return u.moveTo(...r),u.lineTo(...t),u.moveTo(...t),u.lineTo(...c),u.moveTo(...t),u.lineTo(...l),Q(new cs).call(F,a).style("d",u.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(F,f).node()}});function x2(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,x2)}function w2(){this.constructor=Jb}b2.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},Jb=x2,fl=Error,w2.prototype=fl.prototype,Jb.prototype=new w2,x2.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 k2;function M2(t,e,n,r){var i,a,o,s=E2(r=void 0===r?"...":r,n),c=hn(t)?t:_(i=t)?"":i.toString(),l=e,u=[];if(E2(t,n)<=e)return t;for(;;){if(a=c.substr(0,16),l<(o=E2(a,n))+s)break;if(u.push(a),l-=o,!(c=c.substr(16)))return u.join("")}for(;;){if(a=c.substr(0,1),l<(o=E2(a,n))+s)break;if(u.push(a),l-=o,!(c=c.substr(1)))return u.join("")}return"".concat(u.join("")).concat(r)}var E2=kn(function(t,e){var n=(e=void 0===e?{}:e).fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(k2=k2||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(n,"px"),r].join(" "),k2.measureText(hn(t)?t:"").width},function(t,e){return b([t],x(gn(e=void 0===e?{}:e)),!1).join("")});function O2(t,e){return"string"==typeof t?E2(t,e):t}function S2(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 _2(t,e){e=Math.pow(10,e);return~~(t*e)/e}function A2(t){if(dn(t))return[t,t,t,t];if(rn(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 T2=["default","active","selected","disabled","inactive"],P2={fontSize:"16px",fontFamily:"sans-serif",fontWeight:"normal",fontVariant:"normal",fontStyle:"normal",textAlign:"start",textBaseline:"alphabetic"};function L2(t){var e;return t?null==t?void 0:t.default:(e=Mn(t)||{},T2.forEach(function(t){t in e&&delete e[t]}),e)}function N2(t,e,n){return void 0===n&&(n=!1),e?(e=Sn(t,e),n?Pn({},L2(t),e):e):L2(t)||{}}function C2(r,i,a){void 0===a&&(a=!1);return Object.keys(r).reduce(function(t,e){var n;return n=e,new RegExp("^".concat(i,"[A-Z].*")).test(n)!==a&&(a?t[e]=r[e]:t[(n=e.slice(i.length)).charAt(0).toLowerCase()+n.slice(1)]=r[e]),t},{})}function j2(t,r){var i=t,t=Object.keys(t).reduce(function(t,e,n){return n>=r.length||(n=r[n],t.push(C2(i,n)),i=C2(i,n,!0)),t},[]);return t.push(i),t}function R2(r,i){return Object.keys(r).reduce(function(t,e){var n;return t["".concat(i).concat((n=e).charAt(0).toUpperCase()+n.slice(1))]=r[e],t},{})}function F2(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 I2(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];(c=n(o,i)).__data__=o,null!==a&&(c.__fromElements__=a),this._parent.appendChild(c),r.push(c)}return new O(r,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var s=this._elements[i],c=n(o=s.__data__,i);s.appendChild(c),r.push(c)}return new O(r,null,r[0],this._document)},O.prototype.maybeAppend=function(t,e){e=Se(this,B2,"m",D2).call(this,t.startsWith("#")?t:"#".concat(t),e);return e.attr("id",t),e},O.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=Se(this,B2,"m",D2).call(this,t.startsWith(".")?t:".".concat(t),e);return e.attr("className",t),e},O.prototype.maybeAppendByName=function(t,e){e=Se(this,B2,"m",D2).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),c=[],l=new Set,u=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),h=new Map(this._facetElements.map(function(t,e){return[n(t.__data__,e),t]})),f=Rp(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(h.has(g))(x=h.get(g)).__data__=p,x.__facet__=!0,o.push(x),h.delete(g);else if(f.has(g)){var m=f.get(g);c.push([p,m]);try{r=void 0;for(var v=Oe(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}}f.delete(g)}else u.has(y)?((x=u.get(y)).__toData__?x.__toData__.push(p):x.__toData__=[p],l.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([],c,this._parent,this._document),new O(l,null,this._parent,this._document)];return new O(this._elements,null,this._parent,this._document,w)},O.prototype.merge=function(t){var e=b(b([],x(this._elements),!1),x(t._elements),!1),t=b(b([],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,b([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},B2=new WeakSet,D2=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:ts,rect:ps,circle:Ho,path:cs,text:ys,ellipse:Jo,image:is,line:os,polygon:us,polyline:fs,html:ns};var B2,D2,G2=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=[]),B2.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 S(t,e){var n,r;if(e)try{for(var i=Oe(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=x(a.value,2),s=o[0],c=o[1];t.style(s,c)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function A(t){return new G2([t],null,t,t.ownerDocument)}function z2(t,e,n){return t.querySelector(e)?A(t).select(e):A(t).append(n)}function W2(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 V2(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 Y2(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 H2(t){var e,n;return"string"==typeof t?(e=t,(n=document.createElement("div")).innerHTML=e,n.firstChild):t}function q2(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)X2(t,e[r]);return t}var U2=5,X2=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=U2),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?cn(t)?(cn(r[e])||(n[e]={}),a<o?X2(r[e],t,a+1,o):n[e]=i[e]):rn(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})};function $2(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 K2(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function Z2(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 J2(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 Q2,tx=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function ex(t){return hn(t)||dn(t)?new ys({style:{text:String(t)}}):t}function nx(t){return t*Math.PI/180}function rx(t){return Number((180*t/Math.PI).toPrecision(5))}function ix(t,e){var t=(t instanceof N?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 ax(t,e){if(e)try{var o=t instanceof N?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 N?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 ox(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}function sx(t,e){return tn(t)?t.apply(void 0,b([],x(e),!1)):t}function cx(t,e,n,r){void 0===r&&(r=!0),t?n(e):r&&e.node().removeChildren()}function lx(){return null!==Q2&&Q2.apply(this,arguments)||this}function ux(e,n){return Me(t,r=Uo),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(Pn({},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,q2({},{style:n},t))||this;return t.descriptor=e,t}var r}Me(lx,Q2=Uo);function hx(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 fx(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 dx(t,e){"text"===t.node().nodeName&&t.call(S,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:"..."})}function px(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)}Me(yx,gx=Uo),yx.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)},yx.prototype.update=function(t){this.attr(q2({},this.attributes,t=void 0===t?{}:t)),null!=(t=this.render)&&t.call(this,this.attributes,this)},yx.prototype.clear=function(){this.removeChildren()},yx.prototype.destroy=function(){this.removeAllEventListeners(),this.removeChildren(),this.remove()},yx.prototype.attributeChangedCallback=function(){},yx.prototype.bindEvents=function(t,e){};var gx,$c=yx;function yx(t){return gx.call(this,t)||this}function mx(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 vx(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function bx(t,e,n){return[["M",t-n,e],["L",t+n,e]]}el=mx,Mc=bx;function xx(t){n="default",an(e=t)&&e instanceof Image?n="image":tn(e)?n="symbol":hn(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}Me(Mx,wx=$c),Mx.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"]),c=xx(a);c?z2(e,".".concat(c,"-marker"),c).attr("className","marker ".concat(c,"-marker")).call(function(t){var e,n;"image"===c?(e=2*o,t.style("img",a).style("width",e).style("height",e).style("x",-o).style("y",-o)):(e=o/2,n=tn(a)?a:Mx.getSymbol(a),t.style("path",null==n?void 0:n(r,i,e)).call(S,s))}):(null!=(n=this.querySelector(".marker"))&&n.remove(),this.removeChildren())},Mx.MARKER_SYMBOL_MAP=new Map,Mx.registerSymbol=function(t,e){Mx.MARKER_SYMBOL_MAP.set(t,e)},Mx.getSymbol=function(t){return Mx.MARKER_SYMBOL_MAP.get(t)};var wx,kx=Mx;function Mx(){return null!==wx&&wx.apply(this,arguments)||this}kx.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]]}),kx.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),kx.registerSymbol("line",vx),kx.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),kx.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]]}),kx.registerSymbol("circle",mx),kx.registerSymbol("point",el),kx.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"]]}),kx.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"]]}),kx.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"]]}),kx.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),kx.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"]]}),kx.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"]]}),kx.registerSymbol("line",vx),kx.registerSymbol("dot",bx),kx.registerSymbol("dash",Mc),kx.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]]}),kx.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]]}),kx.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]]}),kx.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]]}),kx.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]]});Me(Sx,Ex=$c),Sx.prototype.render=function(t,e){var n,r,i=t.padding,a=t.marker,o=t.text,s=t.textStyle,c=t.radius,l=t.backgroundStyle,u=t.spacing,h=t.align,t=t.verticalAlign,i=x(A2(void 0===i?0:i),4),f=i[0],d=i[1],p=i[2],i=i[3],g=z2(e,".tag-content","g").attr("className","tag-content").node(),y=z2(g,".tag-marker",function(){return new kx({})}).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=(z2(g,".tag-text","text").attr("className","tag-text").style("fontFamily","sans-serif").style("fontSize",12).style("x",m).style("y",y).style("text",_(o)?"":"".concat(o)).call(S,s).style("textBaseline","middle").call(function(t){o||t.remove()}),u=i,m=f,y=h||"start",s=t||"top",t=(h=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]),h.setLocalPosition([n,r]),g.getLocalBounds());z2(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]-f).style("width",null!==l?i+d+2*y.halfExtents[0]:0).style("height",null!==l?f+p+2*y.halfExtents[1]:0).style("radius",null!=c?c:2).style("fill","#fafafa").style("stroke","#d9d9d9").style("lineWidth",1).call(S,l)},Sx.defaultOptions={type:Sx.tag="tag",style:{padding:4,spacing:4}};var Ex,Ox=Sx;function Sx(t){return Ex.call(this,Pn({},Sx.defaultOptions,t))||this}var _x,Ax,Tx={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}}},Px={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"}}}},Lx={strict:{textStyle:{fill:"#b8b8b8"},buttonStyle:{},markerStyle:{}},textStyle:{},buttonStyle:{stroke:"#d9d9d9",fill:"#f5f5f5"},markerStyle:{stroke:"#d9d9d9"}};function Nx(t){var n=_x.call(this,q2({},Nx.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 Cx(t){return Ax.call(this,Pn({},Cx.defaultOptions,t))||this}Me(Nx,_x=$c),Object.defineProperty(Nx.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(Nx.prototype,"text",{get:function(){var t,e=this.attributes.text;return""===e?e:(t=this.textAvailableWidth,M2(e,t))},enumerable:!1,configurable:!0}),Object.defineProperty(Nx.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=mn(i)?this.getStyle("buttonStyle").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(Nx.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t||this.getStyle("buttonStyle").height},enumerable:!1,configurable:!0}),Nx.prototype.getStyle=function(e){var t=this.attributes,n=t.size,t=t.type,r=this.state,i=Pn({},Sn(Tx,[n,e]),N2(Sn(Px,[t,e]),r),N2(Sn(this.attributes,e),r,!0));return"disabled"===r&&(Object.keys(i).forEach(function(t){t in Lx[e]&&(i[t]=Sn(Lx,[e,t]))}),Object.keys(Lx.strict[e]).forEach(function(t){i[t]=Sn(Lx,["strict",e,t])}),Pn(i,N2(Sn(this.attributes,e),"disabled"))),i},Nx.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(A2(n),4)),i=(n[0],n[1]),a=(n[2],n[3]),o=this.buttonHeight,s=this.getStyle("markerStyle"),c=this.markerSize,n=z2(e,".marker",function(){return new kx({className:"marker",style:{symbol:"circle"}})}).call(function(t){t.node().update(v(v({},s),{symbol:r,x:a+c/2,y:o/2,size:c}))}).node().getLocalBounds(),l=this.text,l=void 0===l?"":l,u=this.getStyle("textStyle"),n=(this.textShape=z2(e,".text","text").attr("className","text").style("x",c?n.max[0]+t:a).style("y",o/2).style("text",l).style("textAlign","left").style("textBaseline","middle").call(S,u).node(),this.textShape.getLocalBounds()),l=this.getStyle("buttonStyle");z2(e,".background","rect").attr("className","background").style("zIndex",-1).call(S,l).style("height",o).style("width",a+(c?c+t:0)+2*n.halfExtents[0]+i).node()},Nx.prototype.update=function(t){this.attr(Pn({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=void 0===t?"default":t,this.render(this.attributes,this)},Nx.prototype.setState=function(t){this.update({state:t})},Nx.prototype.hide=function(){this.style.visibility="hidden"},Nx.prototype.show=function(){this.style.visibility="visible"},Nx.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},Nx.defaultOptions={type:Nx.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:{}}}},Me(Cx,Ax=$c),Cx.prototype.render=function(t,e){for(var n=t.x,r=t.y,s=t.items,c=t.textStyle,i=t.padding,l=t.width,u=t.separator,t=x(A2(void 0===i?0:i),3),i=t[0],h=t[1],t=t[2],f=z2(e,".container","g").attr("className","container").style("x",n+t).style("y",r+i),d=0,p=0,g=(f.node().removeChildren(),this),a=0;a<s.length;a++)!function(t){var e,n=s[t],r=new Ox({className:"breadcrumb-item",style:v(v({x:d,y:p,text:_(n.text)?n.id:n.text,textStyle:c},_n(n,["marker"])),{padding:0,backgroundStyle:null})}),i=(f.append(function(){return r}),r.getLocalBounds()),a=2*i.halfExtents[0],i=2*i.halfExtents[1],a=(d+=a,_(l)||l-h<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 ys({className:"".concat(Cx.tag,"-separator"),id:"".concat(Cx.tag,"-separator-").concat(t),style:v(v(v(v({},P2),{x:d+n,y:p+i/2}),a),{text:o,textAlign:"end",textBaseline:"middle"})}),f.append(function(){return e}),t=e.getLocalBounds(),d+=2*t.halfExtents[0]+n)}(a)},Cx.prototype.update=function(t){this.attr(Pn({},this.attributes,t)),this.render(this.attributes,this)},Cx.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)})},Cx.defaultOptions={type:Cx.tag="breadcrumb",style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:v(v({},P2),{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"}),active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};Me(Fx,jx=N),Fx.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.createLines(e),t&&this.createAreas(t)},Fx.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},Fx.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()},Fx.prototype.createLines=function(t){A(this.linesGroup).selectAll("line").data(t).join(function(t){return t.append("path").each(function(t){A(this).call(S,t)})},function(t){return t.each(function(t){A(this).call(S,t)})},function(t){return t.remove()})},Fx.prototype.createAreas=function(t){A(this.linesGroup).selectAll("area").data(t).join(function(t){return t.append("path").each(function(t){A(this).call(S,t)})},function(t){return t.each(function(t){A(this).call(S,t)})},function(t){return t.remove()})};var jx,Rx=Fx;function Fx(t){var e=this,n=t.style,t=Z(t,["style"]);return(e=jx.call(this,Pn({},{type:"lines",style:{width:0,height:0}},v({style:n},t)))||this).linesGroup=e.appendChild(new ts({name:"lines"})),e.areasGroup=e.appendChild(new ts({name:"areas"})),e.render(),e}Me(Dx,Ix=N),Dx.prototype.render=function(){var t=this.attributes.columns;A(this.columnsGroup).selectAll("column-group").data(t.flat()).join(function(t){return t.append("rect").each(function(t){A(this).call(S,t)})},function(t){return t.each(function(t){A(this).call(S,t)})},function(t){return t.remove()})},Dx.prototype.update=function(t){this.attr(Pn({},this.attributes,t)),t.columns&&(this.clear(),this.render())},Dx.prototype.clear=function(){this.removeChildren()};var Ix,Bx=Dx;function Dx(t){var e=this,n=t.style,t=Z(t,["style"]);return(e=Ix.call(this,Pn({},{type:"column",style:{width:0,height:0}},v({style:n},t)))||this).columnsGroup=new ts({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}function Gx(t){return 0===t.length?[0,0]:[un(function(t,e){if(rn(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=tn(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return un(t)||0})),ln(function(t,e){if(rn(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=tn(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return ln(t)||0}))]}function zx(t){for(var e=Mn(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 Wx(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,c,l=function(t,e,n,r){var i,a=[],o=!!r;if(o){l=r[0],u=r[1];for(var s=0,c=t.length;s<c;s+=1)var l=de([0,0],l,x=t[s]),u=pe([0,0],u,x)}for(var s=0,h=t.length;s<h;s+=1){var f,d,p,g,y,m,v,b,x=t[s];0!==s||n?s!==h-1||n?(f=t[[s?s-1:h-1,s-1][n?0:1]],d=t[n?(s+1)%h:s+1],m=ge(m=xe([0,0],d,f),m,e),0!==(y=(p=ye(x,f))+(g=ye(x,d)))&&(p/=y,g/=y),y=ge([0,0],m,-p),m=ge([0,0],m,g),v=fe([0,0],x,y),b=de([0,0],b=fe([0,0],x,m),pe([0,0],d,x)),b=pe([0,0],b,de([0,0],d,x)),v=de([0,0],v=fe([0,0],x,y=ge([0,0],y=xe([0,0],b,x),-p/g)),pe([0,0],f,x)),v=pe([0,0],v,de([0,0],f,x)),b=fe([0,0],x,m=ge([0,0],m=xe([0,0],x,v),g/p)),o&&(v=de([0,0],v=pe([0,0],v,l),u),b=de([0,0],b=pe([0,0],b,l),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,h=[],i=0;i<u-1;i+=1)o=l[2*i],s=l[2*i+1],h.push(["C",o[0],o[1],s[0],s[1],(c=r[i+1])[0],c[1]]);return e&&(o=l[u],s=l[u+1],h.push(["C",o[0],o[1],s[0],s[1],(c=r[0])[0],c[1]])),h}function Vx(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return b([e===n?"M":"L"],x(t),!1)});return e?t.reverse():t}function Yx(t,e){if(void 0===e&&(e=!1),t.length<=2)return Vx(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];Ln(a,n.slice(-2))||n.push.apply(n,b([],x(a),!1))}var o=Wx(n,!1);return e?o.unshift(b(["M"],x(t[r-1]),!1)):o.unshift(b(["M"],x(t[0]),!1)),o}function Hx(t,e,n){t=Mn(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}Me(Xx,qx=$c),Object.defineProperty(Xx.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=Mn(t),dn(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty(Xx.prototype,"data",{get:function(){return this.attributes.isStack?zx(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(Xx.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(Xx.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(Xx.prototype,"containerCfg",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty(Xx.prototype,"linesCfg",{get:function(){var n=this;if("line"!==this.attributes.type)throw new Error("linesCfg can only be used in line type");var t,r,i,a,o,e,s,c,l,u=this.attributes,h=u.isStack,f=u.smooth,d=C2(this.attributes,"area"),p=C2(this.attributes,"line"),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,r=(e={type:"line",x:e,y:t}).x,i=e.y,a=(e=x(i.getOptions().range||[0,0],2))[0],o=e[1],a<o&&(e=x([a,o],2),o=e[0],a=e[1]),t=g.map(function(t){return t.map(function(t,e){return[r.map(e),fn(i.map(t),o,a)]})}),e=[],d&&(g=this.baseline,e=h?(f?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=Yx(o),c=void 0,c=0===i?Hx(s,e,n):(a=Yx(t[i-1],!0),o=o[0],a[0][0]="L",b(b(b([],x(s),!1),x(a),!1),[b(["M"],x(o),!1),["Z"]],!1));r.push(c)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=Vx(t[i]),s=void 0,s=0===i?Hx(o,e,n):((a=Vx(t[i-1],!0))[0][0]="L",b(b(b([],x(o),!1),x(a),!1),[["Z"]],!1));r.push(s)}return r})(t,u,g):(s=f,c=u,l=g,t.map(function(t){return Hx((s?Yx:Vx)(t),c,l)}))),{lines:t.map(function(t,e){return v({stroke:n.getColor(e),path:(f?Yx:Vx)(t)},p)}),areas:e.map(function(t,e){return v({path:t,fill:n.getColor(e)},d)})})},enumerable:!1,configurable:!0}),Object.defineProperty(Xx.prototype,"columnsCfg",{get:function(){var i=this;if("column"!==this.attributes.type)throw new Error("columnsCfg can only be used in column type");var a=C2(this.attributes,"column"),o=this.attributes.isStack,t=this.containerCfg.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=zx(s));var e=this.createScales(s),c=e.x,l=e.y,e=x(Gx(s),2),n=e[0],e=e[1],u=new Im({domain:[0,e-(0<n?0:n)],range:[0,t]}),h=c.getBandWidth(),f=this.rawData;return{columns:s.map(function(t,r){return t.map(function(t,e){var n=h/s.length;return v(v({fill:i.getColor(r)},a),o?{x:c.map(e),y:l.map(t),width:h,height:u.map(f[r][e])}:{x:c.map(e)+n*r,y:0<=t?l.map(t):l.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),Xx.prototype.render=function(t,e){this.containerShape=z2(e,".container","rect").attr("className","container").node();var n=t.type,r="spark".concat(n),i="line"===n?this.linesCfg:this.columnsCfg;this.sparkShape=z2(e,".".concat(r),function(){return new("line"===n?Rx:Bx)({className:r,style:i})}).call(S,i).node()},Xx.prototype.update=function(t){this.attr(Pn({},this.attributes,t)),this.render(this.attributes,this)},Xx.prototype.clear=function(){this.removeChild(this.sparkShape),this.sparkShape.clear(),this.sparkShape.destroy()},Xx.prototype.getColor=function(t){var e=this.attributes.color;return rn(e)?e[t%e.length]:tn(e)?e.call(null,t):e},Xx.prototype.createScales=function(t){var e,n=this.attributes,r=n.type,n=n.range,n=void 0===n?[]:n,i=this.containerCfg,a=i.width,i=i.height,o=x(Gx(t),2),s=o[0],o=o[1],s=new Im({domain:[null!=(e=n[0])?e:s,null!=(e=n[1])?e:o],range:[i,0]});return"line"===r?{type:r,x:new Im({domain:[0,t[0].length-1],range:[0,a]}),y:s}:(e=(n=this.attributes).isGroup,o=n.spacing,{type:r,x:new Sm({domain:t[0].map(function(t,e){return e}),range:[0,a],paddingInner:e?o:0}),y:s})},Xx.tag="sparkline",Xx.defaultOptions={style:{type:"line",width:200,height:20,isStack:!1,nice:!0,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",columnPadding:.1}};var qx,Ux=Xx;function Xx(t){return qx.call(this,Pn({},Xx.defaultOptions,t))||this}var $x,Kx,Zx,Jx={fill:"#fff",stroke:"#bfbfbf",lineWidth:1,size:10,radius:2,strokeOpacity:1},Qx={fontSize:12,fill:"#000",fillOpacity:.45,textAlign:"center",textBaseline:"middle"},tw={orient:"horizontal",type:"start"},ew=hx({label:"label",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),nw=ux({render:function(t,e){var n=t.size,n=void 0===n?10:n,r=t.radius,r=void 0===r?n/4:r,i=t.orient,t=(t.class,Z(t,["size","radius","orient","class"])),a=2.4*n,r=A(e).maybeAppendByClassName(ew.iconRect,"rect").call(S,v(v({},t),{width:n,height:a,radius:r,x:-n/2,y:-a/2})),o=1/3*n,s=2/3*n,c=.25*a,l=.75*a;r.maybeAppendByClassName("".concat(ew.iconLine,"-1"),"line").call(S,{x1:o,x2:o,y1:c,y2:l}).call(S,t),r.maybeAppendByClassName("".concat(ew.iconLine,"-2"),"line").call(S,{x1:s,x2:s,y1:c,y2:l}).call(S,t),r.node().setOrigin(n/2,a/2),"vertical"===i?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)}}),rw=(Me(iw,$x=$c),iw.prototype.renderLabel=function(t){var e=C2(this.attributes,"label");A(t).maybeAppendByClassName(ew.label,"text").call(S,v(v({},Qx),e))},iw.prototype.renderIcon=function(t){var e=this.attributes.orient,n=v(v({orient:e},Jx),C2(this.attributes,"icon"));A(t).maybeAppendByClassName(ew.icon,function(){return new nw({style:n})}).update(n)},iw.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)},iw);function iw(t){return $x.call(this,q2({},{style:tw},t))||this}function aw(t){var a=Kx.call(this,Pn({},aw.defaultOptions,t))||this;return a.range=[0,1],a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(I2(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(I2(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.onValueChange=function(t){var e=a.attributes.onValueChange,e=((void 0===e?Tn:e)(a.getValues(),t),new _o("valueChange",{detail:{oldValue:t,value:a.getValues()}}));a.dispatchEvent(e)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}function ow(t){var o=Zx.call(this,Pn({},ow.defaultOptions,t))||this;return o.onValueChanged=function(t){var e=o.style.value;t!==e&&(e=new _o("scroll",t={detail:{oldValue:t,value:e}}),o.dispatchEvent(e),e=new _o("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(I2(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(I2(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(I2(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}Me(aw,Kx=$c),Object.defineProperty(aw.prototype,"values",{get:function(){return this.getAttribute("values")},set:function(t){this.setAttribute("values",this.clampValues(t))},enumerable:!1,configurable:!0}),Object.defineProperty(aw.prototype,"sparklineShapeCfg",{get:function(){var t,e,n,r,i,a,o,s;return"horizontal"!==this.attributes.orient?null:(i=(t=C2(this.attributes,"sparkline")).padding,t=Z(t,["padding"]),e=(i=x(A2(i),4))[0],n=i[1],r=i[2],i=i[3],a=(o=this.availableSpace).width,o=o.height,s=this.attributes.backgroundLineWidth,v(v({x:(s=+(void 0===s?0:s))/2+i,y:s/2+e},t),{zIndex:0,width:a-s-i-n,height:o-s-e-r}))},enumerable:!1,configurable:!0}),Object.defineProperty(aw.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.padding,n=t.length,t=t.size,e=x(A2(e),4),r=e[0],i=e[1],a=e[2],e=e[3],t=x(this.getOrientVal([[n,t],[t,n]]),2);return{x:e,y:r,width:t[0]-(e+i),height:t[1]-(r+a)}},enumerable:!1,configurable:!0}),aw.prototype.getValues=function(){return this.values},aw.prototype.setValues=function(t){this.values=t,this.update({values:t})},aw.prototype.render=function(t,e){var o=this,n=t.orient,t=x(j2(t,["selection","background"]),2),r=t[0],t=t[1];this.backgroundShape=A(e).maybeAppendByClassName("slider-background","rect").call(S,this.availableSpace).call(S,t);function i(t){var e="".concat(t,"-handle"),n=o.getHandleShapeCfg(t),r=n.x,i=n.y,a=Z(n,["x","y"]);return(n=o.foregroundGroup.maybeAppendByClassName(e,function(){return new rw({style:a})}).style("type",t).update(a)).node().setLocalPosition(+r,+i),n}cx("horizontal"===n,A(e).maybeAppendByClassName("slider-sparkline-group","group"),function(t){var e=o.sparklineShapeCfg;t.maybeAppendByClassName("slider-sparkline",function(){return new Ux({style:e})}).call(function(t){t.node().update(e)})}),this.foregroundGroup=A(e).maybeAppendByClassName("slider-foreground","group"),this.selectionShape=this.foregroundGroup.maybeAppendByClassName("slider-selection","rect").call(S,this.calcMask()).call(S,r);this.startHandle=i("start"),this.endHandle=i("end")},aw.prototype.clampValues=function(t,e){void 0===t&&(t=this.getValues()),void 0===e&&(e=4);var n,r=x(this.range,2),i=r[0],r=r[1],a=x(this.getValues(),2),o=a[0],a=a[1],t=x(t||[o,a],2),s=t[0],t=t[1],c=t-s;return t<s&&(s=(n=x([t,s],2))[0],t=n[1]),r-i<c?[i,r]:s<i?o===i&&a===t?[i,t]:[i,c+i]:r<t?a===r&&o===s?[s,r]:[r-c,r]:[_2(s,e),_2(t,e)]},aw.prototype.calcMask=function(t){var t=x(this.clampValues(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}])},aw.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.width,e=e.height,r=x(this.clampValues(),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])}},aw.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.orient,n=n.formatter,i=C2(this.attributes,"handle"),a=C2(i,"label"),i=i.spacing,o=this.getHandleSize(),s=this.clampValues(),c=this.availableSpace,l=c.width,c=c.height,u=this.calcMask(),h=u.x,f=u.y,d=u.width,u=u.height,n=n("start"===t?s[0]:s[1]),s=this.appendChild(new ys({style:v(v(v({visibility:"hidden"},P2),a),{text:n})})),a=s.getBBox(),p=a.width,a=a.height,s=(s.destroy(),0),g=0;return"horizontal"===r?(e=(r=i+o)+p/2,s="start"===t?0<h-r-p?-e:e:p<l-h-d-r?e:-e):(e=i+o,g="start"===t?a<f-o?-e:e:a<c-f-u-o?e:-e),{x:s,y:g,text:n}},aw.prototype.getHandleLabelShapeCfg=function(t){var e=C2(this.attributes,"handleLabel");return v(v({},e),this.calcHandleText(t))},aw.prototype.getHandleIconShapeCfg=function(){var t=this.attributes.orient,e=C2(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return v(v({},e),{orient:t,cursor:n,size:r})},aw.prototype.getHandleShapeCfg=function(t){var e=this.attributes.showHandle,n=this.calcHandlePosition(t),r=n.x,n=n.y,i=this.calcHandleText(t);return v(v(v({zIndex:3,visibility:e?"visible":"hidden"},R2(this.getHandleIconShapeCfg(),"icon")),R2(v(v({},this.getHandleLabelShapeCfg(t)),i),"label")),{x:r,y:n})},aw.prototype.getHandleSize=function(){var t,e=this.attributes.handleIconSize;return e||(t=(e=this.attributes).width,e=e.height,Math.floor((this.getOrientVal([+e,+t])+4)/2.4))},aw.prototype.getOrientVal=function(t){var t=x(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orient?e:t},aw.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.onValueChange([r,n])},aw.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},aw.prototype.bindEvents=function(){function n(t){return t&&".handle-text"!==t.className}var r=this,t=this.attributes,e=t.onBackgroundMouseenter,i=void 0===e?Tn:e,e=t.onBackgroundMouseleave,a=void 0===e?Tn:e,e=t.onSelectionMouseenter,o=void 0===e?Tn:e,e=t.onSelectionMouseleave,s=void 0===e?Tn:e,c=this.selectionShape,l=(c.on("mousedown",this.onDragStart("selection")),c.on("touchstart",this.onDragStart("selection")),this.dispatchEvent(new _o("selectionMouseenter")),c.on("mouseenter",function(){o(c),r.dispatchEvent(new _o("selectionMouseenter"))}),c.on("mouseleave",function(){s(c),r.dispatchEvent(new _o("selectionMouseleave"))}),[this.startHandle,this.endHandle].forEach(function(t){var e=t.node().attr("type");t.on("mousedown",function(t){n(t.target)&&r.onDragStart(e)(t)}),t.on("touchstart",function(t){n(t.target)&&r.onDragStart(e)(t)})}),this.backgroundShape);l.on("mousedown",this.onDragStart("background")),l.on("touchstart",this.onDragStart("background")),l.on("mouseenter",function(){i(l),r.dispatchEvent(new _o("backgroundMouseenter"))}),l.on("mouseleave",function(){a(l),r.dispatchEvent(new _o("backgroundMouseleave"))})},aw.defaultOptions={type:aw.tag="slider",style:v(v(v({values:[0,1],length:200,size:20,orient:"horizontal",backgroundZIndex:-1,backgroundCursor:"crosshair",backgroundFill:"#416180",backgroundOpacity:.05,selectionCursor:"move",selectionZIndex:2,selectionFill:"#5B8FF9",selectionFillOpacity:.45,sparklinePadding:1,padding:0,showHandle:!0,handleSpacing:2,formatter:function(t){return t}},R2(tw,"handle")),R2(Jx,"handleIcon")),R2(Qx,"handleLabel"))},Me(ow,Zx=$c),Object.defineProperty(ow.prototype,"padding",{get:function(){return A2(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(ow.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(ow.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(ow.prototype,"thumbRadius",{get:function(){var t=this.attributes.isRound,e=this.availableSpace,n=e.width,e=e.height,r=Sn(this.attributes,["thumbStyle","default","radius"]);return t?r||this.getOrientVal([e,n])/2:0},enumerable:!1,configurable:!0}),ow.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=z2(e,".track","rect").attr("className","track").style("width",null!=n?n:10).style("height",null!=r?r:200).call(S,N2(i)).node(),n=this.valueOffset(o||0),r=this.availableSpace;this.thumbShape=z2(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,N2(a)).node(),this.trackShape=e},ow.prototype.getValue=function(){return this.style.value},ow.prototype.setValue=function(t){var e=this.style,n=e.value,r=e.min,e=e.max;this.update({value:fn(t,r,e)}),this.onValueChanged(n)},ow.prototype.setOffset=function(t){var e=this.getValue();this.setValue(this.valueOffset(t,!0)+e)},ow.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*fn(t,i,n)},ow.prototype.getStyle=function(t,e){return void 0===e&&(e="default"),N2(Sn(this.attributes,t),e)},ow.prototype.bindEvents=function(){this.trackShape.addEventListener("click",this.onTrackClick),this.thumbShape.addEventListener("mousedown",this.onDragStart),this.thumbShape.addEventListener("touchstart",this.onDragStart),this.onHover()},ow.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orient?t[0]:t[1]},ow.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)},ow.defaultOptions={type:ow.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 sw={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 cs({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:[]}},cw=(Pn({},sw,{style:{type:"arc"}}),Pn({},sw,{style:{}}),hx({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 lw(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 uw(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=x(t,2);return[t[0],sx(t[1],e)]}))}function hw(t,e){return e&&tn(e)?t.filter(e):t}function fw(t){return t.reduce(function(t,e,n){return"".concat(t).concat(0===n?"M":" L").concat(e[0],",").concat(e[1])},"")}function dw(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)?fw(r):e?(i=Y2(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)},"")):""):fw(t)}function pw(t,e,n){function r(t,e){return"".concat(c," ").concat(t," ").concat(l," ").concat(e," ").concat(s)}var i=n.type,a=n.connect,o=n.center,s=n.closed?" Z":"",n=x([dw(t,n),dw(e.slice().reverse(),n,!0)],2),c=n[0],l=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([Y2(e,o),Y2(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 gw(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 c=x([e[s].points,e[s+1].points],2),c=pw(c[0],c[1],n);o.push({path:c,fill:a[s%a.length]})}A(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),lw(this,e,o,t)}).attr("className","grid-region")},function(t){return t.each(function(t,e){this.attr(t),lw(this,e,o,t)})},function(t){return t.remove()})}}Me(vw,yw=$c),vw.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:b(b([],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:dw(t.points,r)}}),A(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})),lw(this,e,a,v({path:t},i))}).attr("className","grid-line")},function(t){return t.each(function(t,e){this.attr(t),lw(this,e,a,t)})},function(t){return t.remove()}),gw(e,o,t)};var yw,mw=vw;function vw(){return null!==yw&&yw.apply(this,arguments)||this}var bw=kn(function(t,e){var e=x(e.angleRange,2),n=e[0];return(e[1]-n)*t+n},function(t,e){return b([t],x(e.angleRange),!1).join()}),xw=kn(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),me([0,0],[(r=x([i[0]-r,i[1]-n],2))[0],r[1]])):(i=nx(bw(t,e)),[-Math.sin(i),Math.cos(i)])},function(t,e){var n="linear"===(n=e).type?b(b([],x(n.startPos),!1),x(n.endPos),!1):b(b(b([],x(n.angleRange),!1),x(n.center),!1),[n.radius],!1);return"arc"===e.type&&n.push(t),n.join()});function ww(t,e,n){var t=xw(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 kw=kn(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 b(b([t],x(e.startPos),!1),x(e.endPos),!1).join()}),Mw=kn(function(t,e){var n=e.radius,r=x(e.center,2),i=r[0],r=r[1],t=nx(bw(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return b(b(b([t],x(e.angleRange),!1),[e.radius],!1),x(e.center),!1).join()});function Ew(t,e){return("linear"===e.type?kw:Mw)(t,e)}function Ow(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(cw.line.name," ").concat(t)).call(S,v(v({},o),{x1:n,y1:r,x2:i,y2:e}))}var n,r,i,s=t.startPos,c=t.endPos,l=t.truncRange,u=t.lineExtension,h=x([s,c],2),f=x(h[0],2),d=f[0],f=f[1],h=x(h[1],2),p=h[0],h=h[1],c=x(u?(s=x([s=s,c=c,u=void 0===(u=u)?[0,0]:u],3),u=(c=x(s[0],2))[0],c=c[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-c],2))[0],n=g[1],c=Math.sqrt(Math.pow(u,2)+Math.pow(n,2)),y=(g=x([-y/c,s/c],2))[0],s=g[1],[y*u,y*n,s*u,s*n]):new Array(4).fill(0),4),g=c[0],y=c[1],u=c[2],s=c[3];a.node().removeChildren();l?(c=(n=x(l,2))[0],l=n[1],i=(c=x([d+(p-d)*c,f+(h-f)*c],2))[0],c=c[1],r=(l=x([d+(p-d)*l,f+(h-f)*l],2))[0],l=l[1],e(cw.lineFirst.name,[[d+g,f+y],[i,c]]),e(cw.lineSecond.name,[[r,l],[p+u,h+s]]),i=a,t.truncRange,t.truncShape,t.lineExtension,i.select(cw.lineFirst.class).node(),i.select(cw.lineSecond.class).node()):e("axis-line",[[d+g,f+y],[p+u,h+s]])}function Sw(t,e,n){var r,i,a,o,s,c,l,u,h,f,d,p,g,y=e.type;"linear"===y?Ow(t,e,n):(r=t,a=n,u=(l=x((i=e).angleRange,2))[0],l=l[1],o=(s=x(i.center,2))[0],s=s[1],i=i.radius,console.assert(u<l,"end angle should be greater than start angle"),(360==(c=l-u)?r.maybeAppendByClassName(cw.line,"circle").style("cx",o).style("cy",s).style("r",i):(d=(p=x([i,i],2))[0],p=p[1],h=(g=x([u*Math.PI/180,l*Math.PI/180],2))[0],g=g[1],f=(h=x([o+i*Math.cos(h),s+i*Math.sin(h)],2))[0],h=h[1],s=(o=x([o+i*Math.cos(g),s+i*Math.sin(g)],2))[0],i=o[1],g=180<c?1:0,o=l<u?0:1,c="M".concat(f,",").concat(h,",A").concat(d,",").concat(p,",0,").concat(g,",").concat(o,",").concat(s,",").concat(i),r.maybeAppendByClassName(cw.line,"path").style("path",c))).call(S,a)),l=t,u=y,f=n,d=(h=e).lineArrow,p=e.truncRange,g=void 0===(g=e.lineArrowOffset)?0:g,h=e.lineArrowSize,d&&(A(d=ex(d)).call(S,v({},f)),px(d,h,!0),("arc"!==u&&p?l.select(cw.lineSecond.class):l.select(cw.line.class)).style("markerEnd",d).style("markerEndOffset",-g))}function _w(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function Aw(t,r){var e=r.gridLength,i=void 0===e?0:e;return t.map(function(t){var t=t.value,e=x(Ew(t,r),2),n=e[0],e=e[1],t=x(ge([0,0],ww(t,r.gridDirection,r),i),2);return{points:[[n,e],[n+t[0],e+t[1]]]}})}function Tw(t,e,n,r){var i=r.type,a=r.closed,o=r.areaFill,s=r.connect,c=_w(n),l=hw(e,n.gridFilter),e="segment"===i?Aw(l,n):function(t,o,e){var s,c,l=e.controlAngles;if(!(e=_w(o)))throw new Error("grid center is not provid");if(t.length<2)throw new Error("Invalid grid data");if(l&&0!==l.length)return e=x(e,2),s=e[0],c=e[1],t.map(function(t){var t=x(Ew(t.value,o),2),e=t[0],t=t[1],n=x([e-s,t-c],2),r=n[0],i=n[1],a=[[e,t]];return l.forEach(function(t){var t=nx(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+c])}),{points:a}});throw new Error("Invalid gridControlAngles")}(l,n,r);t.maybeAppendByClassName(cw.grid,function(){return new mw({})}).update(v(v({type:i,connect:s,closed:a,center:c},r),{items:e,areaFill:tn(o)?l.map(function(t,e){return sx(o,[t,e,l])}):o}))}Object.defineProperty(Lw.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(Lw.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(Lw.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(Lw.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(Lw.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(Lw.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),Lw.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},Lw.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},Lw.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},Lw.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])},Lw.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),c=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+c,t*r+s*i+e],[s*r-t*o+c,t*r+s*o+e],[s*a-t*o+c,t*a+s*o+e],[s*a-t*i+c,t*a+s*i+e]].flat(1)},Lw.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},Lw.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},Lw.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var Pw=Lw;function Lw(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 Nw(t,l){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=l,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!=(c=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<c)&&(n=s*i-t*r)<0!=e&&c<o!=e&&c<n!=e;var e,n,r,i,a,o,s,c})}function Cw(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],c=2*i[0],i=2*i[1],a=a[1],l=o[0],o=o[1],u=0,h=0,f=s,d=a,p=("text"===e.tagName&&(i-=1.5,p=e.style.textAlign,g=e.style.textBaseline,u=+e.style.dx,h=+e.style.dy,"center"===p?f=(s+l)/2:"right"!==p&&"end"!==p||(f=l),"middle"===g?d=(a+o)/2:"bottom"!==g&&"baseline"!==g||(d=o)),x(n,4)),l=p[0],g=void 0===l?0:l,o=p[1],n=void 0===o?0:o,l=p[2],o=p[3];return t.set((u+=s)-(void 0===o?n:o),(h+=a)-g,u+c+n,h+i+(void 0===l?g:l)),e.setEulerAngles(r),t.rotatedPoints(nx(r),f,d)}function jw(t,a){var o;return b([],x(t.reduce(function(t,e,n){return n&&o&&(n=o,r=e,i=a,n=Cw(new Pw,n,i),Nw(r=Cw(new Pw,r,i),[n[0],n[1],n[2],n[3]])||Nw(r,[n[0],n[1],n[4],n[5]])||Nw(r,[n[4],n[5],n[6],n[7]])||Nw(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 Rw=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 Fw=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,c,l,u=Rw,h=2,f=t.slice(),d=t.slice(),p=Date.now(),g=Math.min.apply(Math,b([1],x(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==xw(0,n)[1]&&0!==xw(0,n)[0]||(n=V2(t[0]).left,t=V2(t[i-1]).right,t=Math.abs(t-n)||1,h=Math.max(Math.floor(i*g/t),h)),a&&(s=f.splice(0,1)[0]),o&&(c=f.splice(-1,1)[0],f.reverse());jw((c?b(b([c],x(d),!1),[s],!1):b([s],x(d),!1)).filter(function(t){return tx(t)}),null==e?void 0:e.margin).length;)if((c&&!s&&h%2==0||c&&s)&&f.splice(0,1).forEach(r.hide),d=u(((l=f).forEach(r.show),l),{seq:h}),h++,200<Date.now()-p)return}}],["rotate",function(t,e,n,r){function i(){return jw(t,s).length<1}function a(n){t.forEach(function(t,e){e=rn(n)?n[e]:n;_(e)||r.rotate(t,e)})}var o=void 0===(c=e.optionalAngles)?[0,45,90]:c,s=e.margin,c=e.recoverWhenFailed,e=t.map(function(t){return+(ix(t,"rotate")||0)});if(!i()){for(var l=0;l<o.length;l++)if(a(o[l]),i())return;c&&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,c=e.maxLength,l=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}),h=O2(l,e)||1,f=O2(s,e)||1,d=O2(c,e),p=(!_(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);f+h<m;m-=h){var v=function(e){return g.forEach(function(t){r.ellipsis(t,e,o)}),(g=jw(t,u)).length<1||300<Date.now()-p?{value:void 0}:void 0}(m);if("object"==typeof v)return v.value}}]]);function Iw(i,a,o){var t=a.labelTransforms,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e,n=t.type,r=Fw.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 Bw(t){for(var e=t;e<0;)e+=360;return e%360}var Dw=kn(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 b(b([],x(t),!1),x(e),!1).join()});function Gw(t,e){return ww(t,e.labelDirection,e)}function zw(t,e,n){var r,i=n.labelAlign,e=ix(e,"rotate");return e?+e%180:(e=0,r=Gw(t.value,n),t=xw(t.value,n),"horizontal"===i?0:(e="perpendicular"===i?Dw([1,0],r):Dw([t[0]<0?-1:1,0],t),ox(n=((n=rx(e))+360)%180,-90,90)||(n+=180),n))}function Ww(t,e,n){e.setLocalEulerAngles(+t);t=function(t,e,n){var r=n.type,i=n.labelAlign,t=Gw(t,n),n=Bw(e),e=Bw(rx(Dw([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":ox(n,90,270)?ox(e,90,270)?"start":"end":ox(e,90,270)?"end":"start";if(0===e){if(ox(n,0,90,!1,!0))return"start";if(ox(n,0,90)||ox(n,270,360))return"start"}if(90===e){if(ox(n,0,90,!1,!0))return"start";if(ox(n,90,180)||ox(n,270,360))return"end"}if(270===e){if(ox(n,0,90,!1,!0))return"end";if(ox(n,90,180)||ox(n,270,360))return"start"}if(180===e){if(90===n)return"start";if(ox(n,0,90)||ox(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)&&A(n).style("textAlign",t)}function Vw(t,e,n,r){var i=r.showTick,a=r.tickLength,o=r.tickDirection,s=r.labelDirection,c=sx(r.labelSpacing,[t,e,n]),s=x([Gw(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(fe([0,0],ge([0,0],s[0],c+(1===s[1]?sx(i?a:0,[t,e,n]):0)),Ew(t.value,r)),2);return{x:o[0],y:o[1]}}function Yw(t,e,n,r,i){var a=i.labelFormatter,o=Gw(e.value,i),i=function(){return ex(e.label||"")};return hn(a)?i=function(){return ex(a)}:tn(a)&&(i=function(){return ex(sx(a,[e,n,r,o]))}),t.append(i).attr("className",cw.labelItem.name)}function Hw(t,e,n,r,i,a){var o=null==(o=r.getElementsByClassName(cw.labelItem.toString()))?void 0:o[0],a=x(F2(uw(a,[t,e,n])),2),s=a[0],a=a[1],c=a.transform,a=Z(a,["transform"]);"text"===(null==o?void 0:o.nodeName)&&A(o).call(S,v({fontSize:12,fontFamily:"sans-serif",fontWeight:"normal",textBaseline:"middle"},s)),r.attr(v(v({},Vw(t,e,n,i)),a)),ax(r,c),Ww(zw(t,r,i),r,i)}function qw(n){Iw(this.node().childNodes,n,{hide:function(t){t.style.visibility="hidden"},show:function(t){t.style.visibility="visible"},rotate:function(t,e){Ww(+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 Uw(t,e){return ww(t,e.tickDirection,e)}var Xw=kn(function(t,e){t=x(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return b(b([],x(t),!1),[e],!1).join()});function $w(t,e,n,r,i){var a=i.tickFormatter,o=Uw(e.value,i),i="line";return a instanceof N?i=function(){return a}:tn(a)&&(i=function(){return sx(a,[e,n,r,o])}),t.append(i).attr("className",cw.tickItem.name)}function Kw(t,e,n,r,i,a,o){var s=Uw(t.value,a),c=(u=t,h=e,f=n,s=s,c=(a=a).tickLength,l=(a=x(Ew(u.value,a),2))[0],a=a[1],s=x(Xw(s,sx(c,[u,h,f])),2),u=(c=x(s[0],2))[0],h=c[1],f=x(s[1],2),{x:l,y:a,x1:u,x2:f[0],y1:h,y2:f[1]}),s=c.x1,l=c.x2,a=c.y1,u=c.y2,h=c.x,f=c.y,c=x(F2(uw(o,[t,e,n])),2),o=c[0],t=c[1];"line"===r.node().nodeName&&r.call(S,v({x1:s,x2:l,y1:a,y2:u},o)),i.attr(v({x:h,y:f},t)),S(r,o)}var Zw={text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"left-top"},Jw=hx({text:"text"},"title");function Qw(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}).join(""):2<t.length?t[0]:t}function tk(t,e){var n,r;try{for(var i=Oe(Object.entries(e)),a=i.next();!a.done;a=i.next()){var o=x(a.value,2),s=o[0],c=o[1];t.node().attr(s)||t.style(s,c)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}Me(rk,ek=$c),rk.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(Jw.text.class);if(!a)return{x:0,y:0,width:+e,height:+n};var a=a.getBBox().height,i=x(A2(i),3),o=i[0],i=i[2],s=x([0,+n-a],2),c=s[0],s=s[1],r=Qw(r);if("i"===r)return{x:0,y:c,width:+e,height:+n};r.includes("t")&&(c=(o=x([a+o,+n-a-o],2))[0],s=o[1]),r.includes("b")&&(s=x([+n-a-i],1)[0]);o=x(A2(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:c+r,width:+e-t[0],height:s-t[1]}},rk.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(F2(a),2),s=o[0],t=(o[1],t=(o=t).width,c=o.height,o=o.position,n=x([+t/2,+c/2],2),u=(n=x([+n[0],+n[1],"center","middle"],4))[0],r=n[1],i=n[2],n=n[3],(o=Qw(o)).includes("l")&&(u=(l=x([0,"start"],2))[0],i=l[1]),o.includes("r")&&(u=(l=x([+t,"end"],2))[0],i=l[1]),o.includes("t")&&(r=(t=x([0,"top"],2))[0],n=t[1]),o.includes("b")&&(r=(l=x([+c,"bottom"],2))[0],n=l[1]),{x:u,y:r,textAlign:i,textBaseline:n}),o=t.x,c=t.y,l=t.textAlign,u=t.textBaseline;a.text?A(e).maybeAppendByClassName(Jw.text,"text").call(S,s).call(tk,{x:o,y:c,textAlign:l,textBaseline:u}):e.removeChildren()};var ek,nk=rk;function rk(t){return ek.call(this,q2({},{style:Zw},t=void 0===t?{}:t))||this}function ik(t,e,n){var r,i,a,o,s,t=t.select(cw.mainGroup.class);return t=t,e=e,r=(n=n).titlePosition,n=void 0===(n=n.titleSpacing)?0:n,r=Qw(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 ak(t,e,n,r){var i,a,o,s;n.title&&(a=(t=x((t=t,i=(a=n).title,a=t.maybeAppendByClassName(cw.title,function(){return ex(i)}),[t,a]),2))[0],t=t[1],a=a,e=e,n=n,o=(r=x(F2(r=r),2))[0],r=r[1],s=void 0===(s=r.transform)?"":s,r=Z(r,["transform"]),t.call(S,o),e=(o=ik(e,a,n)).x,n=o.y,a.node().attr(r),a.node().setPosition(e,n),ax(t,s))}var ok,sk=ux({render:function(n,e){var t=fx(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),c=(t.truncShape,t.showLine),l=(t.lineExtension,t.lineArrow,t.lineArrowOffset,t.lineArrowSize,t.showTick),u=(t.tickDirection,t.tickLength,t.tickFilter,t.tickFormatter,t.showLabel),h=(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(j2("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),f=r[0],d=r[1],p=r[2],g=r[3],t=r[4],y=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])}),r=A(e).maybeAppendByClassName(cw.gridGroup,"g"),i=(r.node().removeChildren(),h&&Tw(r,y,n,t),A(e).maybeAppendByClassName(cw.mainGroup,"g")),a=(cx(c,i.maybeAppendByClassName(cw.lineGroup,"g"),function(t){Sw(t,n,d)}),i.maybeAppendByClassName(cw.tickGroup,"g")),h=(cx(l,a,function(t){var r,i,a;t=t,i=p,a=hw(y,(r=n).tickFilter),t.selectAll(".axis-tick").data(a).join(function(t){return t.append("g").attr("className",cw.tick.name).each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=$w.apply(void 0,b(b([A(this)],x(t),!1),[a,r],!1));Kw.apply(void 0,b(b([],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=$w.apply(void 0,b(b([A(this)],x(t),!1),[a,r],!1));Kw.apply(void 0,b(b([],x(t),!1),[a,n,this,r,i],!1))})},function(t){return t.remove()})}),i.maybeAppendByClassName(cw.labelGroup,"g")),r=(cx(u,h,function(t){var e,r,i,a;e=t,i=g,a=hw(y,(r=n).labelFilter),e.selectAll(cw.label.class).data(a).join(function(t){return t.append("g").attr("className",cw.label.name).each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];Yw.apply(void 0,b(b([A(this)],x(t),!1),[a,r],!1)),Hw.apply(void 0,b(b([],x(t),!1),[a,this,r,i],!1))}).call(function(){qw.call(e,r)})},function(t){return t.each(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=A(this);n.node().removeChildren(),Yw.apply(void 0,b(b([n],x(t),!1),[a,r],!1)),Hw.apply(void 0,b(b([],x(t),!1),[a,this,r,i],!1))}).call(function(){qw.call(e,r)})},function(t){return t.remove()})}),A(e).maybeAppendByClassName(cw.titleGroup,"g"));cx(o,r,function(t){ak(t,A(e),n,f)})}},v({},sw.style)),ck={pageViews:[],effect:"linear",duration:200,orient:"horizontal",initPage:0,loop:!1,buttonPath:[["M",(Ao=0)-(Ec=6),(i=0)-Ec],["L",Ao+Ec,i],["L",Ao-Ec,i+Ec],["Z"]],buttonFill:"black",buttonSize:12,buttonCursor:"pointer",formatter:function(t,e){return"".concat(t,"/").concat(e)},pageNumFontSize:12,pageNumFill:"black",pageNumTextAlign:"start",pageNumTextBaseline:"middle",controllerPadding:5,controllerSpacing:5},lk=hx({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"),uk=(Me(hk,ok=$c),Object.defineProperty(hk.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,b([],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(hk.prototype,"currPage",{get:function(){return this._currPage},enumerable:!1,configurable:!0}),Object.defineProperty(hk.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}),hk.prototype.setVisiblePages=function(n){this.attributes.pageViews.forEach(function(t,e){n.includes(e)?t.attr("visibility","visible"):t.attr("visibility","hidden")})},hk.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,c=e.getBBox(),l=c.width,c=c.height,l=Math.max(a,o,l),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[l/2,-s-r],[l/2,0],[l/2,c+r]],textAlign:"center"},a=x(i.offset,3),o=x(a[0],2),s=o[0],l=o[1],c=x(a[1],2),r=c[0],o=c[1],c=x(a[2],2),a=c[0],c=c[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,l),n.setLocalPosition(r,o),e.setLocalPosition(a,c)},hk.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(lk.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},hk.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]},hk.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)},hk.prototype.renderController=function(t){var e,n,r,i,a=this,o=this.attributes,s=o.controllerSpacing,o=o.pageViews,c=this.pageShape,l=c.pageWidth,c=c.pageHeight;o.length<2||(r=(o=x(j2(this.attributes,["button","pageNum"]),2))[0],o=o[1],i=(r=x(F2(r),2))[0],r=r[1],e=i.size,i=Z(i,["size"]),n=t.maybeAppendByClassName(lk.prevBtnGroup,"g").call(S,r),this.prevBtnGroup=n.node(),n.maybeAppendByClassName(lk.prevBtn,"path").attr("className","btn"),r=t.maybeAppendByClassName(lk.nextBtnGroup,"g").call(S,r),this.nextBtnGroup=r.node(),r.maybeAppendByClassName(lk.nextBtn,"path").attr("className","btn"),t.selectAll(".btn").call(S,i).each(function(){A(this).style("transformOrigin","center"),px(A(this).node(),e,!0)}),i=t.maybeAppendByClassName(lk.pageInfoGroup,"g"),this.pageInfoGroup=i.node(),i.maybeAppendByClassName(lk.pageInfo,"text").style("text","").call(S,v(v({},P2),o)),this.updatePageInfo(),t.node().setLocalPosition(l+s,c/2),n.on("click",function(){a.prev()}),r.on("click",function(){a.next()}))},hk.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,c=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([c.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}},hk.prototype.prev=function(){var t=this.attributes,e=t.loop,t=t.pageViews.length,n=this.currPage,e=e?(n-1+t)%t:fn(n-1,0,t);return this.goTo(e)},hk.prototype.next=function(){var t=this.attributes,e=t.loop,t=t.pageViews.length,n=this.currPage,e=e?(n+1)%t:fn(n+1,0,t);return this.goTo(e)},hk.prototype.render=function(t,e){var n=this,r=t.pageViews,t=t.initPage,i=(this.clipPath=A(e).maybeAppendByClassName(lk.clipPath,function(){return new ps({style:{x:0,y:0,width:0,height:0}})}),A(e).maybeAppendByClassName(lk.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(lk.playWindow,"g").node(),this.playWindow.removeChildren(),r.forEach(function(t){return n.playWindow.appendChild(t)}),this.setVisiblePages([t]),A(e).maybeAppendByClassName(lk.controller,"g"));this.renderController(i),this.goTo(t)},hk);function hk(t){t=ok.call(this,q2({},{style:ck},t))||this;return t._currPage=0,t.finishedPromise=null,t.resolveFinishedPromise=null,t.playState="idle",t}function fk(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}kx.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"]]}),kx.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]]}),kx.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 dk,pk=hx({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"),gk={span:[1,1],marker:"path",markerD:mx(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"},yk=(Me(mk,dk=$c),Object.defineProperty(mk.prototype,"showValue",{get:function(){var t=this.attributes.value;return!!t&&(hn(t)||dn(t)?""!==t:""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(mk.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(mk.prototype,"span",{get:function(){var t,e=this.attributes;return"span"in e?(t=(e=x(A2(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(mk.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(mk.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=x(A2(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(mk.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}),mk.prototype.renderMarker=function(t){var e=this,n=this.attributes,r=n.marker,i=n.markerSize,a=C2(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(pk.markerGroup,"g"),cx(!!r,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(pk.marker,r).call(S,v({anchor:"0.5 0.5"},a)),px(e.markerGroup.node(),i,!0)})},mk.prototype.renderLabel=function(t){var e=this.attributes.label,n=C2(this.attributes,"label");this.labelGroup=t.maybeAppendByClassName(pk.labelGroup,"g"),this.labelGroup.maybeAppendByClassName(pk.label,function(){return ex(e)}).call(S,n)},mk.prototype.renderValue=function(t){var e=this,n=this.attributes.value,r=C2(this.attributes,"value");this.valueGroup=t.maybeAppendByClassName(pk.valueGroup,"g"),cx(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(pk.value,function(){return ex(n)}).call(S,r)})},mk.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=C2(this.attributes,"background");this.background=t.maybeAppendByClassName(pk.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(pk.background,"rect").call(S,v({width:n,height:e},r))},mk.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(S,{x:i,y:r}),this.labelGroup.call(S,{x:a,y:r}),dx(this.labelGroup.select(pk.label.class),e),this.showValue&&(this.valueGroup.call(S,{x:t,y:r}),dx(this.valueGroup.select(pk.value.class),n))},mk.prototype.render=function(t,e){e=A(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()},mk);function mk(t){return dk.call(this,q2({},{style:gk},t))||this}function vk(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var bk,xk=hx({itemPage:"item-page",navigator:"navigator",pageView:"page-view",item:"item"},"items"),wk={data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orient:"horizontal",click:Tn,mouseenter:Tn,mouseleave:Tn},kk=(Me(Mk,bk=$c),Object.defineProperty(Mk.prototype,"attrs",{get:function(){return fx(this.attributes)},enumerable:!1,configurable:!0}),Object.defineProperty(Mk.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(Mk.prototype,"renderData",{get:function(){var t=this.attrs,a=t.data,o=t.layout,s=C2(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],sx(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),Mk.prototype.getGridLayout=function(){var u=this,t=this.attrs,h=t.orient,f=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"===h&&a.reverse(),x(a,2)),o=a[0],a=a[1],s=(f-g-(m-1)*p)/m,t=t.getBBox().height,c=x([0,0],2),l=c[0],c=c[1];return b="horizontal"===h?(l=(n=x([b,o*(t+d)],2))[0],c=n[1],a===m-1?0:b+s+p):(l=(n=x([a*(s+p),b],2))[0],c=n[1],o===y-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:l,y:c}})},Mk.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],c=r[1],r=x([e-t,n],2),l=r[0],u=r[1],e=x([0,0,0,0,0,0,0,0],8),h=e[0],f=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<=l&&vk(g,function(t){return t<c})?(r=x([m+r,v,i],3),h=r[0],f=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&&vk(y,function(t){return t<s})?(r=x([m,v,n],3),h=r[0],f=r[1],m=r[2]):(i=x([0,0,n,0,d+1,0,0,0],8),h=i[0],f=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:h,y:f,page:d,index:e,pageIndex:p++,row:y,col:g++}})},Object.defineProperty(Mk.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}),Mk.prototype.ifHorizontal=function(t,e){return fk(this.attrs.orient,t,e)},Mk.prototype.renderItems=function(){var t=this.attrs,e=t.click,n=t.mouseenter,r=t.mouseleave,i=(this.items=[],this.itemsCache.removeChildren(),this.items);A(this.itemsCache).selectAll(xk.itemPage.class).data(this.renderData).join(function(t){return t.append(function(t){t=t.style,t=new yk({style:t});return i.push(t),t}).attr("className",xk.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"},Mk.prototype.adjustLayout=function(){var n,u=this.items,t=this.itemsLayout;A(this.pageViews).selectAll(xk.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",xk.itemPage.name).each(function(t){var l=this;t.items.forEach(function(t){var n,r,i,e=t.x,a=t.y,o=t.index,s=t.width,c=t.height,o=l.appendChild(u[o]);n=t,r=o,(i=hn(t="__data__")?t.split("."):t).forEach(function(t,e){e<i.length-1?(an(r[t])||(r[t]=dn(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:c})})})},function(t){return t},function(t){return t.remove()}),this.removeChild(this.itemsCache)},Mk.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=C2(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}:{},c=v(v(v({},o),r),{orient:n,pageViews:this.pageViews.children});t.maybeAppendByClassName(xk.navigator,function(){return new uk({style:c})}).update(o)},Mk.prototype.render=function(t,e){e=A(e);this.renderItems(),this.adjustLayout(),this.renderNavigator(e)},Mk);function Mk(t){t=bk.call(this,q2({},{style:wk},t))||this;return t.items=[],t.itemsCache=new ts,t.pageViews=new ts({className:xk.pageView.name}),t.navigatorShape=[0,0],t}var Ek,uo={style:{padding:0,orient:"horizontal",backgroundFill:"transparent",titleText:"",showTitle:!0,titleSpacing:4,titlePosition:"left-top",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12}},Ok=Pn({},uo,{style:{type:"category",items:[],maxCols:void 0,maxRows:void 0,spacing:[8,2],itemBackground:{padding:0,style:{fill:"transparent",active:{cursor:"pointer"}}},reverse:!1}}),Sk=Pn({},uo,{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"}}),_k=hx({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"),Ak=(Me(Tk,Ek=$c),Tk.prototype.renderTitle=function(t,e,n){var r=this.attributes.showTitle,i=x(F2(C2(this.attributes,"title")),2),a=i[0],i=i[1];this.titleGroup=t.maybeAppendByClassName(_k.titleGroup,"g").call(S,i),cx(!!r,this.titleGroup,function(t){t.maybeAppendByClassName(_k.title,function(){return new nk({style:v({width:e,height:n},a)})}).update(a)})},Tk.prototype.renderItems=function(t,e,n){var r=this,i=x(j2(this.attributes,["title"]),2),i=x(F2(i[1]),2),a=i[0],i=i[1],o=v(v({},a),{width:e,height:n});this.itemsGroup=t.maybeAppendByClassName(_k.itemsGroup,"g").call(S,i),this.itemsGroup.maybeAppendByClassName(_k.items,function(){return new kk({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)})},Tk.prototype.adjustLayout=function(){var t,e;this.attributes.showTitle&&(t=(e=this.titleGroup.select(_k.title.class).node().getAvailableSpace()).x,e=e.y,this.itemsGroup.node().setLocalPosition(t,e))},Object.defineProperty(Tk.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?[(e=this.titleGroup.select(_k.title.class).node().getAvailableSpace()).width,e.height]:[n,t]},enumerable:!1,configurable:!0}),Tk.prototype.render=function(t,e){var n=t.width,t=t.height,e=A(e);this.renderTitle(e,n,t),this.renderItems.apply(this,b([e],x(this.availableSpace),!1)),this.adjustLayout()},Tk);function Tk(t){return Ek.call(this,q2({},Ok,t))||this}var Pk,Lk={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"},Nk=hx({background:"background",labelGroup:"label-group",label:"label"},"indicator"),Ck=(Me(jk,Pk=$c),jk.prototype.renderBackground=function(){var t=this.style,e=t.position,t=x(A2(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=C2(this.attributes,"background");this.background=A(this.group).maybeAppendByClassName(Nk.background,"path").call(S,n).style("path",o),this.group.appendChild(this.label.node())},jk.prototype.renderLabel=function(){var t=this.attributes,e=t.value,n=t.formatter,t=x(F2(C2(this.attributes,"label")),2),r=t[0],t=t[1];this.label=A(this.group).maybeAppendByClassName(Nk.labelGroup,"g").call(S,t),e&&this.label.maybeAppendByClassName(Nk.label,function(){return ex(n(e))}).style("text",n(e).toString()).selectAll("text").call(S,v(v({},P2),r))},jk.prototype.adjustLayout=function(){var t=x(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},jk.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):[b(["M"],x(t[0]),!1),b(["L"],x(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},jk.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,b([],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],c=o[3],o=o[4];return n?(this.point=[a,r-e],[["M",s,r],["L",t,r],["L",a,r-e],["L",c,r],["L",o,r]]):(this.point=[i+e,a],[["M",i,s],["L",i,t],["L",i+e,a],["L",i,c],["L",i,o]])},jk.prototype.bindEvents=function(){this.label.on(y.BOUNDS_CHANGED,this.renderBackground)},jk.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},jk);function jk(t){void 0===t&&(t={});t=Pk.call(this,q2({},{style:v({visibility:"hidden"},Lk)},t))||this;return t.point=[0,0],t.group=t.appendChild(new ts({})),t}var Rk=hx({marker:"marker",labelGroup:"labelGroup",label:"label"},"handle"),Fk=ux({render:function(t,e){var a,o=t.orient,n=t.visibility,r=t.spacing,s=void 0===r?0:r,r=t.showLabel,c=t.formatter,i=t.markerSymbol,i=void 0===i?fk(o,"horizontalHandle","verticalHandle"):i,t=x(j2(t,["label","marker"]),2),l=t[0],t=t[1],u=l.text,h=Z(l,["text"]);i&&"hidden"!==n?(l=v({symbol:i},t),a=A(e).maybeAppend(Rk.marker.name,function(){return new kx({})}).update(l),cx(r,A(e).maybeAppendByClassName(Rk.labelGroup,"g"),function(t){var t=t.maybeAppendByClassName(Rk.label,"text").call(S,v({text:c(u).toString()},h)),e=a.node().getBBox(),n=e.width,e=e.height,e=x(fk(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(Rk.marker.class))&&n.remove(),null!=(i=e.querySelector(Rk.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 Ik(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 Bk=hx({backgroundGroup:"background-group",background:"background",ribbonGroup:"ribbon-group",ribbon:"ribbon",clipPath:"clip-path"},"ribbon");function Dk(t){var e=t.orient,n=t.size,t=t.len;return fk(e,[t,n],[n,t])}function Gk(t){var e=t.type,t=x(Dk(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 zk(t){var e,n,i,a,r=t.orient,o=t.color,s=t.block,t=t.blocks,c=(e=tn(o)?new Array(20).fill(0).map(function(t,e,n){return o(e/(n.length-1))}):o).length;return c?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/(c-1),":").concat(e)},"l(".concat(fk(r,"0","270"),")")):""}function Wk(t,e,n){var r,i,a,o=zk(e),t=t.maybeAppendByClassName(Bk.ribbon,"path").call(S,v({path:Gk(e),fill:o},n)),n=t.maybeAppendByClassName(Bk.clipPath,"path").call(S,{path:(n=(o=e).orient,(e=o.range)?(i=(o=x(Dk(o),2))[0],o=o[1],r=(e=x(e,2))[0],e=e[1],a=fk(n,r*i,0),r=fk(n,0,r*o),i=fk(n,e*i,i),[["M",a,r],["L",a,a=fk(n,o,e*o)],["L",i,a],["L",i,r],["Z"]]):[])}).node();t.style("clip-path",n)}var Vk,Yk,Hk,qk,Uk=ux({render:function(t,e){var n,r=x(j2(t,["ribbon","background"]),2),i=r[0],r=r[1],a=A(e).maybeAppendByClassName(Bk.backgroundGroup,"g");n=t,r=r,a.maybeAppendByClassName(Bk.background,"path").call(S,v({path:Gk(n)},r)),Wk(A(e).maybeAppendByClassName(Bk.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"})),Xk=kn(function(t){return{min:Math.min.apply(Math,b([],x(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,b([],x(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),$k=(Me(Kk,Vk=$c),Kk.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(j2(fx(t),["title","label","indicator","ribbon","handle"]),5)),s=t[0],c=(t[1],t[2]),l=t[3],t=(t[4],A(e).maybeAppendByClassName(_k.title,function(){return new nk({style:v({width:r,height:i},s)})})),a=(cx(a,A(e),function(t){}),t.node().getAvailableSpace()),t=a.x,u=a.y,a=(a.width,a.height,A(e).maybeAppendByClassName(_k.contentGroup,"g").call(S,{x:t,y:u})),h=a.maybeAppendByClassName(_k.ribbonGroup,"g");this.renderRibbon(h,l),this.handlesGroup=h.maybeAppendByClassName(_k.handlesGroup,"g"),this.renderHandles(),this.renderIndicator(a,c),cx(o,A(e).maybeAppendByClassName(_k.labelGroup,"g").call(S,{x:t,y:u}),function(t){n.renderLabel(t)})},Object.defineProperty(Kk.prototype,"range",{get:function(){var t=this.attributes.data;return Xk(t)},enumerable:!1,configurable:!0}),Object.defineProperty(Kk.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(Kk.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(Kk.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}),Kk.prototype.ifHorizontal=function(t,e){return fk(this.style.orient,"function"==typeof t?t():t,"function"==typeof e?e():e)},Kk.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(_k.ribbon,function(){return new Uk({})}).update(v({type:r,orient:i,color:a,block:o,blocks:n.length-1,range:this.ribbonRange},e))},Kk.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")},Kk.prototype.renderHandle=function(t,e){var n=this.attributes.orient,r=C2(this.attributes,"handle"),r=(r.formatter,Z(r,["formatter"])),n=this.handlesGroup.maybeAppendByClassName(_k.prefix("".concat(t,"-handle")),function(){return new Fk({})}).call(S,v({orient:n,labelText:e},r));return this.setHandlePosition(t,e),n},Kk.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(_k.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"})},Kk.prototype.renderIndicator=function(t,e){this.indicator=t.maybeAppendByClassName(_k.indicator,function(){return new Ck({style:e})}).update(e)},Object.defineProperty(Kk.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(Kk.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}),Kk.prototype.renderLabel=function(t){var e=this.attributes,n=e.ribbonSize,e=e.ribbonLen,r=C2(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],c=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(_k.label,function(){return new sk({style:c})}).call(S,c).node();s.attr("labelFormatter",a),s.attr("labelFilter",o)},Kk.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)},Kk.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=fn(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,b([],x(n),!1))):this.hideIndicator()},Kk.prototype.hideIndicator=function(){var t;null!=(t=this.indicator)&&t.style("visibility","hidden")},Kk.prototype.updateMouse=function(){this.style.slidable&&(this.style.cursor="grabbing")},Kk.prototype.setSelection=function(t,e){this.updateSelection(t,e)},Kk.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,c=x(this.selection,2),l=c[0],c=c[1],t=x([t,e],2),e=t[0],t=t[1],n=(n&&(e+=l,t+=c),this.range),l=n.min,c=n.max,u=x((n=[l,c],l=[e,t],c=this.selection,void 0===r&&(r=4),i=(n=x(n,2))[0],n=n[1],a=(l=x(l,2))[0],l=l[1],o=(c=x(c,2))[0],c=c[1],l=(a=x([a,l],2))[0],s=(a=a[1])-l,a<l&&(l=(u=x([a,l],2))[0],a=u[1]),n-i<s?[i,n]:l<i?o===i&&c===a?[i,a]:[i,s+i]:n<a?c===n&&o===l?[l,n]:[n-s,n]:[_2(l,r),_2(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(Kk.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 mn(t)?_2(.01*(e-n),0):t},enumerable:!1,configurable:!0}),Kk.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?Ik(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},Kk.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,b([],x(I2(t)),!1));return fn(this.getOffset(i-a,!0)+r,r,n)},Kk.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)},Kk.prototype.dispatchSelection=function(){var t=new _o("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},Kk.prototype.dispatchIndicated=function(t,e){t=new _o("indicated",{detail:{value:t,range:e}});this.dispatchEvent(t)},t([J2(100)],Kk.prototype,"dispatchSelection",null),t([J2(100)],Kk.prototype,"dispatchIndicated",null),Kk);function Kk(t){var a=Vk.call(this,q2({},Sk,t))||this;return a.eventToOffsetScale=new Im({}),a._ribbonScale=new Im({}),a.onHovering=function(t){var e=a.attributes,n=e.data,e=e.block,t=(t.stopPropagation(),a.getValueByCanvasPoint(t));e?(e=Ik(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 Zk(t){Yk||(Yk=document.createElement("table"),qk=document.createElement("tr"),Hk=/^\s*<(\w+|!)[^>]*>/,qk={tr:document.createElement("tbody"),tbody:Yk,thead:Yk,tfoot:Yk,td:qk,th:qk,"*":document.createElement("div")});var e=Hk.test(t)&&RegExp.$1,e=(e&&e in qk||(e="*"),qk[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 Jk,yo="tooltip",Qk="tooltip-title",t5="tooltip-list",n="tooltip-list-item",Jc="tooltip-list-item-name",Qc="tooltip-list-item-marker",e="tooltip-list-item-name-label",Kc="tooltip-list-item-value",oo="tooltip-crosshair-x",tl="tooltip-crosshair-y",ho={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},po=((fo={})[".".concat(yo)]={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"},fo[".".concat(Qk)]={color:"rgba(0, 0, 0, 0.45)"},fo[".".concat(t5)]={margin:"0px","list-style-type":"none",padding:"0px"},fo[".".concat(n)]={"list-style-type":"none","margin-top":"12px",display:"flex","line-height":"1em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},fo[".".concat(Qc)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},fo[".".concat(Jc)]={display:"flex","align-items":"center","max-width":"216px"},fo[".".concat(e)]=v({flex:1},ho),fo[".".concat(Kc)]=v({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},ho),fo[".".concat(oo)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},fo[".".concat(tl)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},fo),e5=(Me(n5,Jk=$c),Object.defineProperty(n5.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),Object.defineProperty(n5.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(n5.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(n5.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(n5.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes.template.item,r=[];return this.items.forEach(function(t){var n;r.push(Zk((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(n5.prototype,"customContent",{get:function(){var t=this.attributes.customContent;return hn(t)?H2(t):vn(t)?t:tn(t)?H2(t(this.attributes.items)):void 0},enumerable:!1,configurable:!0}),n5.prototype.render=function(t,e){this.updateHTMLTooltipElement(),this.updatePosition()},n5.prototype.update=function(t){this.attr(Pn({},this.attributes,t)),this.render(this.attributes,this)},n5.prototype.clear=function(){this.element.innerHTML=""},n5.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),null!=(t=this.customContent)&&t.remove()},n5.prototype.show=function(){this.visibility="visible",this.element.style.visibility="visible"},n5.prototype.hide=function(){this.visibility="hidden",this.element.style.visibility="hidden"},n5.prototype.initShape=function(){var t=this.attributes.template.container;this.element=Zk(t),!this.id&&""===this.id||this.element.setAttribute("id",this.id)},n5.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(Qk)[0].innerHTML=t,i=this.HTMLTooltipItemsElements,(e=document.createElement("ul")).className=t5,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];b([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},n5.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,c=t.height,l=[-s/2,-c/2];return e.forEach(function(t){var e=x(l,2),n=e[0],e=e[1],t=x(o[t],2),r=t[0],t=t[1];l=[n+(s/2+i)*r,e+(c/2+a)*t]}),l},n5.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")},n5.prototype.updatePosition=function(){this.throttleUpdatePosition()},n5.prototype.autoPosition=function(t){var e,n,r,i,a,o,s,t=x(t,2),c=t[0],t=t[1],l=this.attributes,u=l.x,h=l.y,f=l.autoPosition,l=l.bounding;return f?(e=(f=this.element).offsetWidth,f=f.offsetHeight,h=(u=x([u+c,h+t],2))[0],u=u[1],n=this.attributes.position,r={left:"right",right:"left",top:"bottom",bottom:"top"},s=l.x,i=l.y,a={left:h<s,right:s+l.width<h+e,top:u<i,bottom:i+l.height<u+f},o=[],n.split("-").forEach(function(t){o.push(a[t]?r[t]:t)}),s=o.join("-"),this.getRelativeOffsetFromCursor(s)):[c,t]},n5.prototype.filter=function(t){var e=this.attributes.filterBy;return e?t.filter(e):t},n5.prototype.sort=function(t){var e=this.attributes.sortBy;return e?t.sort(e):t},n5.tag="tooltip",n5.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(yo,'"></div>'),title:'<div class="'.concat(Qk,'"></div>'),item:'<li class="'.concat(n,'" data-index={index}>\n <span class="').concat(Jc,'">\n <span class="').concat(Qc,'" style="background:{color}"></span>\n <span class="').concat(e,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(Kc,'" title="{value}">{value}</span>\n </li>')},style:po}},n5);function n5(t){var e=Jk.call(this,Pn({},n5.defaultOptions,t))||this;return e.visibility="visible",e.throttleUpdatePosition=An(function(){e.setOffsetPosition(e.autoPosition(e.getRelativeOffsetFromCursor()))},e.attributes.throttleFrequency,{}),e.visibility=e.attributes.visibility,e.initShape(),e.render(e.attributes,e),e}var r5,i5={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 a5(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 o5(t){return r5.call(this,Pn({},o5.defaultOptions,t))||this}Me(o5,r5=$c),o5.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=z2(e,".switch-content","g").attr("className","switch-content").node(),c=e.getLocalBounds(),n=Sn(i5,n,i5.default),l=n.sizeStyle,u=n.tagStyle,h=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",f=l,d=o?t:s,p=((t||s)&&z2(e,".switch-tag",function(){return new Ox({})}).attr("className","switch-tag").call(function(t){var e,t=t.node(),n=(t.update(Pn({cursor:h,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]+l.radius,r=r[1]-n[1],n=Math.max(i+l.height+2,l.width);f=v(v({},l),{width:n}),t.update((t={x:c.min[0],y:c.min[1],width:n,height:f.height},n={width:i,height:r},i=f.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}))}),z2(e,".switch-background","rect").attr("className","switch-background").style("zIndex",(e.style.zIndex||0)-1).style("x",c.min[0]).style("y",c.min[1]).style("fill",n).style("cursor",h).style("fillOpacity",r?.4:1).call(S,f).node()),g=z2(e,".switch-background-stroke","rect").attr("className","switch-background-stroke").style("zIndex",(e.style.zIndex||0)-2).style("x",c.min[0]).style("y",c.min[1]).style("stroke",n).style("lineWidth",0).call(S,f).node();z2(e,".switch-handle","rect").attr("className","switch-handle").style("fill","#fff").style("cursor",h).call(function(t){var e,t=t.node(),n=a5(p,a,o),r=a5(p,a,!o);t.attr("x")&&!Ln(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},o5.defaultOptions={type:o5.tag="switch",style:{x:0,y:0,spacing:2,checked:!0,disabled:!1}};var s5,c5,l5,u5,mo={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},vo=q2({},mo,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),bo=q2({},mo,{type:"circle",defaultRadius:0}),xo=q2({},mo,{type:"polygon",defaultRadius:0,startAngle:0}),wo=(Me(h5,s5=$c),Object.defineProperty(h5.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(h5.prototype,"tagCfg",{get:function(){var t=C2(this.attributes,"tag");return t.position,Z(t,["position"])},enumerable:!1,configurable:!0}),Object.defineProperty(h5.prototype,"crosshairCfg",{get:function(){var t=C2(this.attributes,"line");return v(v({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),h5.prototype.render=function(t,e){var n=this,e=z2(e,".crosshair-group","g").attr("className","crosshair-group").node();this.shapesGroup=e,this.tagShape=z2(e,".crosshair-tag",function(){return new Ox({className:"crosshair-tag",style:n.tagCfg})}).node(),this.crosshairShape=z2(e,".crosshair-path","path").attr("className","crosshair-path").call(S,this.crosshairCfg).node(),this.adjustLayout()},h5.prototype.update=function(t){this.attr(Pn({},this.attributes,t=void 0===t?{}:t)),this.render(this.attributes,this)},h5.prototype.setPointer=function(t){this.pointer=t},h5.tag="crosshair-base",h5.defaultOptions={style:mo},h5);function h5(t){return s5.call(this,Pn({},h5.defaultOptions,t))||this}function f5(t){return c5.call(this,q2({},f5.defaultOptions,t))||this}function d5(t){return l5.call(this,q2({},d5.defaultOptions,t))||this}function p5(t){return u5.call(this,q2({},p5.defaultOptions,t))||this}Me(f5,c5=wo),Object.defineProperty(f5.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(f5.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(f5.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(f5.prototype,"tagShapeSpace",{get:function(){var t=W2(this.tagShape);return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),f5.prototype.update=function(t){c5.prototype.update.call(this,t)},f5.prototype.setPointer=function(t){c5.prototype.setPointer.call(this,t),this.adjustPosition()},f5.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},f5.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},f5.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)},f5.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()},f5.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},f5.tag="line-crosshair",f5.defaultOptions={style:vo},t([J2(20)],f5.prototype,"setPointer",null),Me(d5,l5=wo),Object.defineProperty(d5.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),d5.prototype.update=function(t){l5.prototype.update.call(this,t)},d5.prototype.setPointer=function(t){var t=x(t,2),e=t[0],t=t[1],e=(l5.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})},d5.prototype.adjustLayout=function(){this.tagShape.hide()},d5.prototype.createCirclePath=function(t){var e=this.attributes,n=x(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return mx(r,n,t||e)},d5.tag="circle-crosshair",d5.defaultOptions={style:bo},t([J2(20)],d5.prototype,"setPointer",null),Me(p5,u5=wo),Object.defineProperty(p5.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),p5.prototype.update=function(t){u5.prototype.update.call(this,t)},Object.defineProperty(p5.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,c=o.sides,l=2*Math.PI/c,u=[1,0],h=[],f=0;f<c;f+=1)h.push((t=[0,0],e=u,n=[0,0],r=s/180*Math.PI+l*f,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 h},enumerable:!1,configurable:!0}),p5.prototype.setPointer=function(t){var t=x(t,2),e=t[0],t=t[1],e=(u5.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=Z2(n,[t,e])/Z2(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},p5.prototype.adjustLayout=function(){this.tagShape.hide()},p5.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(ge([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},p5.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,c,t=x(t,2),l=t[0],u=t[1],h=this.points,t=x(this.attributes.center,2),f=t[0],d=t[1],p=1;p<=h.length;p+=1){var g=x(h[p-1],2),y=g[0],g=g[1],m=x(h[p%h.length],2),v=m[0],m=m[1],y=(i=[f,d],y=[y+f,g+d],g=[v+f,m+d],c=s=o=a=m=v=void 0,m=(r=x(r=[l,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],c=[],(g-y)*(a-m)==(i-r)*(s-o)?(i-r)*(o-m)==(y-r)*(a-m)&&($2(m,a,r,i,o,y)&&K2(c,o,y),$2(m,a,r,i,s,g)&&K2(c,s,g),$2(o,s,y,g,m,r)&&K2(c,m,r),$2(o,s,y,g,a,i))&&K2(c,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&&(c[0]=m+g*(a-m),c[1]=r+g*(i-r))),c);0!==y.length&&(e=(s=x(y,2))[0],n=s[1])}return[e,n]},p5.tag="polygon-crosshair",p5.defaultOptions={style:xo},t([J2(20)],p5.prototype,"setPointer",null);Me(v5,g5=N),Object.defineProperty(v5.prototype,"decorationType",{get:function(){var t=this.attributes.type;return t&&"none"!==t&&rn(t)?t.map(function(t){return rn(t)?t:[t,"solid"]}):"none"},enumerable:!1,configurable:!0}),Object.defineProperty(v5.prototype,"doubleSpacing",{get:function(){return 2*this.attributes.style.lineWidth},enumerable:!1,configurable:!0}),Object.defineProperty(v5.prototype,"hangingRate",{get:function(){return this.attributes.hangingRate},enumerable:!1,configurable:!0}),Object.defineProperty(v5.prototype,"dashedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[2*t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(v5.prototype,"dottedCfg",{get:function(){var t=this.attributes.style.lineWidth;return{lineDash:[t,t]}},enumerable:!1,configurable:!0}),Object.defineProperty(v5.prototype,"solidCfg",{get:function(){return{lineDash:[0,0]}},enumerable:!1,configurable:!0}),Object.defineProperty(v5.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}),v5.prototype.update=function(t){var e=this;this.attr(q2({},this.attributes,t)),this.clear(),this.decorationCfg.forEach(function(t){e.appendChild(new cs({style:t}))})},v5.prototype.clear=function(){this.removeChildren()},v5.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]},v5.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]]},v5.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]]},v5.prototype.getWavyPath=function(t){return[]},v5.tag="decoration",v5.defaultOptions={style:{width:0,height:0,type:"none",hangingRate:[.5,.55,.5],style:{lineWidth:1,stroke:"#000"}}};var g5,y5,m5=v5;function v5(t){t=g5.call(this,q2({},v5.defaultOptions,t))||this;return t.update({}),t}function b5(t){t=y5.call(this,q2({},b5.defaultOptions,t))||this;return t.init(),t}Me(b5,y5=$c),Object.defineProperty(b5.prototype,"textWidth",{get:function(){var e=this;return ln(this.renderText.split("\n").map(function(t){return E2(t,e.font)}))||0},enumerable:!1,configurable:!0}),Object.defineProperty(b5.prototype,"textHeight",{get:function(){return W2(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(b5.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(b5.prototype,"height",{get:function(){var t=this.attributes.height;return dn(t)&&0!==t?t:W2(this.textShape).height},enumerable:!1,configurable:!0}),Object.defineProperty(b5.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(b5.prototype,"capitalizeWord",{get:function(){return this.attributes.text.split("\n").map(function(t){return t.split(" ").map(function(t){return S2(t,"capitalize")}).join(" ")}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(b5.prototype,"text",{get:function(){var t=this.attributes,e=t.transform,t=t.text;return"capitalize"===e?this.capitalizeWord:S2(t,e)},enumerable:!1,configurable:!0}),Object.defineProperty(b5.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 M2(t,dn(r)?r:1/0,e.font,i)}).join("\n")},enumerable:!1,configurable:!0}),Object.defineProperty(b5.prototype,"renderText",{get:function(){var t=this.attributes.width,e=this.attributes.overflow;return e&&!["none","clip","wrap"].includes(e)&&dn(t)?this.ellipsisText:this.text},enumerable:!1,configurable:!0}),Object.defineProperty(b5.prototype,"verticalAlign",{get:function(){return this.attributes.verticalAlign},enumerable:!1,configurable:!0}),Object.defineProperty(b5.prototype,"font",{get:function(){return _n(this.attributes,["fontSize","fontFamily","fontWeight","fontStyle","fontVariant","letterSpacing","leading"])},enumerable:!1,configurable:!0}),Object.defineProperty(b5.prototype,"fontColor",{get:function(){return this.attributes.fontColor},enumerable:!1,configurable:!0}),Object.defineProperty(b5.prototype,"wordWrap",{get:function(){return"wrap"===this.attributes.overflow},enumerable:!1,configurable:!0}),Object.defineProperty(b5.prototype,"wordWrapWidth",{get:function(){var t=this.width;return this.wordWrap?t:1/0},enumerable:!1,configurable:!0}),Object.defineProperty(b5.prototype,"textCfg",{get:function(){var t=this.renderText,e=this.lineHeight,n=this.wordWrap,r=this.wordWrapWidth,i=this.fontColor;return v(v(v({},P2),this.font),{fill:i,wordWrap:n,lineHeight:e,wordWrapWidth:r,text:t,textAlign:"start",textBaseline:"middle"})},enumerable:!1,configurable:!0}),Object.defineProperty(b5.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(b5.prototype,"decorationLineWidth",{get:function(){var t=this.attributes.fontSize;return Math.floor(2*Math.log10(t))},enumerable:!1,configurable:!0}),Object.defineProperty(b5.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 q2({},{fontSize:n,style:{stroke:i,lineWidth:r}},e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(b5.prototype,"clipRectCfg",{get:function(){var t=this.height;return{width:this.attributes.width,height:t}},enumerable:!1,configurable:!0}),b5.prototype.init=function(){this.initShape(),this.update({})},b5.prototype.update=function(t){this.attr(q2({},this.attributes,t)),this.render()},b5.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 m5({style:t}))})},b5.prototype.clear=function(){var t;(this.backgroundShape.style.clipPath=null)!=(t=this.clipRect)&&t.destroy()},b5.prototype.initShape=function(){this.backgroundShape=new ps({name:"background",style:{width:0,height:0}}),this.decorationGroup=new ts({name:"decoration-group"}),this.textShape=new ys({name:"text",style:this.textCfg}),this.textShape.appendChild(this.decorationGroup),this.backgroundShape.appendChild(this.textShape),this.appendChild(this.backgroundShape)},b5.prototype.overflow=function(){var t=this.wordWrap,e=this.attributes,n=e.width,e=e.overflow;e&&"none"!==e&&!t&&dn(n)&&"clip"===e&&(this.clipRect=new ps({name:"clip-rect",style:this.clipRectCfg}),this.backgroundShape.style.clipPath=this.clipRect,this.backgroundShape.appendChild(this.clipRect))},b5.prototype.adjustTextAlign=function(){var t=this.textWidth,e=this.attributes,n=e.width,e=e.textAlign;dn(n)&&(n=0,n="start"===e?0:"center"===e?(this.width-t)/2:this.width-t,this.textShape.attr({x:n}))},b5.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})},b5.prototype.layout=function(){this.adjustTextAlign(),this.adjustVerticalAlign(),this.overflow()},b5.defaultOptions={type:b5.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 x5,ko=v(v({},P2),{fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"}),w5={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"}},k5={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function M5(t){return x5.call(this,Pn({},M5.defaultOptions,t))||this}Me(M5,x5=$c),M5.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,z2(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=xn({},this.checked?w5.selected:w5.default,r),r=xn({},k5,i),t=(this.checkboxBoxShape=z2(a,".checkbox-box","rect").attr("className","checkbox-box").style("zIndex",(a.style.zIndex||0)-1).call(S,e).node(),z2(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;z2(a,".checkbox-label","text").attr("className","checkbox-label").style("x",e).style("y",r).call(S,n)},M5.defaultOptions={type:M5.tag="checkbox",style:{x:0,y:0,label:v({text:""},ko),spacing:4,checked:!1}};var E5="gui-poptip",O5="gui-poptip-arrow",S5="gui-poptip-text",_5=((a={})[".".concat(E5)]={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"},a[".".concat(S5)]={"text-align":"center"},a[".".concat(E5,"[data-position='top']")]={transform:"translate(-50%, -100%)"},a[".".concat(E5,"[data-position='left']")]={transform:"translate(-100%, -50%)"},a[".".concat(E5,"[data-position='right']")]={transform:"translate(0, -50%)"},a[".".concat(E5,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},a[".".concat(E5,"[data-position='top-left']")]={transform:"translate(0,-100%)"},a[".".concat(E5,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},a[".".concat(E5,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},a[".".concat(E5,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},a[".".concat(E5,"[data-position='right-top']")]={transform:"translate(0, 0)"},a[".".concat(E5,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},a[".".concat(E5,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},a[".".concat(E5,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},a[".".concat(O5)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},a[".".concat(E5,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},a["[data-position='top'] .".concat(O5)]={bottom:"-2px"},a[".".concat(E5,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},a["[data-position='left'] .".concat(O5)]={right:"-2px"},a[".".concat(E5,"[data-position='right']")]={transform:"translate(5px, -50%)"},a["[data-position='right'] .".concat(O5)]={left:"-2px"},a[".".concat(E5,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},a["[data-position='bottom'] .".concat(O5)]={top:"-2px"},a[".".concat(E5,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},a["[data-position='top-left'] .".concat(O5)]={left:"10px",bottom:"-2px"},a[".".concat(E5,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},a["[data-position='top-right'] .".concat(O5)]={right:"10px",bottom:"-2px"},a[".".concat(E5,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},a["[data-position='left-top'] .".concat(O5)]={right:"-2px",top:"8px"},a[".".concat(E5,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},a["[data-position='left-bottom'] .".concat(O5)]={right:"-2px",bottom:"8px"},a[".".concat(E5,"[data-position='right-top']")]={transform:"translate(5px, 0)"},a["[data-position='right-top'] .".concat(O5)]={left:"-2px",top:"8px"},a[".".concat(E5,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},a["[data-position='right-bottom'] .".concat(O5)]={left:"-2px",bottom:"8px"},a[".".concat(E5,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},a["[data-position='bottom-left'] .".concat(O5)]={top:"-2px",left:"8px"},a[".".concat(E5,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},a["[data-position='bottom-right'] .".concat(O5)]={top:"-2px",right:"8px"},a),A5=void 0;var T5;function P5(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function L5(t){var n,r;return n=P5,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(A5,t)}(t)}function N5(t){t=T5.call(this,Pn({style:{id:"gui-poptip"}},N5.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}Me(N5,T5=$c),Object.defineProperty(N5.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),N5.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},N5.prototype.update=function(t){this.attr(Pn({},this.style,t)),this.render(this.attributes,this)},N5.prototype.bind=function(s,c){var l,t,e,u=this;s&&(l=this.style.text,e=function(){u.hideTip()},s.addEventListener("mousemove",t=function(t){var e=s,n=u.style,r=l,i=(c&&(o=(i="function"==typeof c?c.call(null,t):c).html,a=i.target,i=Z(i,["html","target"]),n=xn({},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,c=a.width,l=a.height;switch(r){case"top":return i?[o+c/2,s]:[t,s];case"left":return i?[o,s+l/2]:[o,e];case"bottom":return i?[o+c/2,s+l]:[t,s+l];case"right":return i?[o+c,s+l/2]:[o+c,e];case"top-right":case"right-top":return[o+c,s];case"left-bottom":case"bottom-left":return[o,s+l];case"right-bottom":case"bottom-right":return[o+c,s+l];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]))},N5.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))},N5.prototype.clear=function(){this.container.innerHTML=""},N5.prototype.destroy=function(){var t,e=this;b([],x(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove()},N5.prototype.showTip=function(t,e,n){var r,i=Sn(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(S5)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},N5.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},N5.prototype.getContainer=function(){return this.container},N5.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(E5).concat(t?" ".concat(t):"")},N5.prototype.initShape=function(){var t=this,e=this.style.id;this.container=L5(e),this.container.setAttribute("class",this.getClassName()),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},N5.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(O5,'"></span>'));t.innerHTML=n,hn(r)?t.innerHTML+=r:r&&vn(r)&&t.appendChild(r),e&&(t.getElementsByClassName(S5)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},N5.prototype.applyStyles=function(){var t,e=q2({},_5,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))},N5.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")},N5.tag="poptip",N5.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:_5,template:'<div class="'.concat(S5,'"></div>')}};function C5(r,t,e,n){var[[t,i],[a,o]]=t,[s,c]=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 Qv()([[0,0],[s,c]]);s=[[t-a,i-o]].concat(e).concat([[0,0]]);const l=[n[0]-a,n[1]-o],[u,h]=s;return c=l,t=u,i=h,e=kb(c,t),t=kb(t,i),i=kb(i,c),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]-l[1])*+u[1]/(u[0]-l[0]);return e[0]<l[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),Qv()(s)}const j5=Vb(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:c,endMarker:l,coordCenter:u}=e,e=Z(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),h=J(e,"background"),f=h["padding"],h=Z(h,["padding"]),d=J(e,"connector"),{points:p=[]}=d,d=Z(d,["points"]),i=[[+i,+a],[+n,+r]],a=Q(t).maybeAppend("text","text").call(F,e).node(),n=C5(Q(t).maybeAppend("background","rect").style("zIndex",-1).call(F,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,c]=t,[s,l]=s;return a.setEulerAngles(o),{x:t-i,y:c-e,width:2*s+i+n,height:2*l+e+r}}(a,f)).call(F,o?h:{}).node(),i,p,u),r=c&&new kx({id:"startMarker",style:Object.assign({x:0,y:0},J(e,"startMarker"))}),a=l&&new kx({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(F,s?d:{})}),R5=t=>{const c=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=jb(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 j5).style("x",i).style("y",o).call(F,r).style("transform",s+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(F,a).call(F,c).node()}};R5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const F5=Vb(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 kx({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());Q(t).maybeAppend("text","text").style("x",i).style("y",a).call(F,e)}),I5=t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=jb(r,i,a,o),{color:i,text:a=""}=e,o={text:String(a),stroke:i,fill:i},[[e,a]]=t;return Q(new F5).call(F,r).style("x",e).style("y",a).call(F,o).call(F,s).node()}},B5=(I5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},Vb(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;Q(t).maybeAppend("connect-path",()=>new cs({})).style("d",n).call(F,i),Q(t).maybeAppend("area-path",()=>new cs({})).style("d",e).call(F,r)}));const D5=t=>{const{curve:u,gradient:c=!1,defined:h=t=>!Number.isNaN(t)&&null!=t,connectNulls:f=!1}=t,d=Z(t,["curve","gradient","defined","connectNulls"]);return(t,e,l,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=jb(n,r,i,a),r=n["fill"],i=Z(n,["fill"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=Fb(l,e),n=c&&n?Lb(n,r,o,c):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 c=e.length/2;for(let t=0;t<c;t++){var l,u,h=e[t],f=e[t+c];[...h,...f].some(t=>!n(t))?o=!0:(r.push(h),i.push(f),o&&s&&(o=!1,[l,u]=s,a.push([l,h,u,f])),s=[h,f])}return[r.concat(i),a]}(t,h),a=J(s,"connect"),i=!!o.length,n=t=>Q(new cs({})).style("d",t).call(F,s).node();return s0(l)?(e=t=>{const n=l.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=tb().curve(eb),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,c=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 ib(a())},delete t.lineX0,t.lineEndAngle=function(){return ib(o())},delete t.lineX1,t.lineInnerRadius=function(){return ib(s())},delete t.lineY0,t.lineOuterRadius=function(){return ib(c())},delete t.lineY1,t.curve=function(t){return arguments.length?e(rb(t)):e()._curve},t.angle((t,e)=>Eb(wb(r[e],n))).outerRadius((t,e)=>kb(r[e],n)).innerRadius((t,e)=>kb(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(h)).curve(u)(i);var e,a,o,s,c},!i||f&&!Object.keys(a).length?n(e(r)):i&&!f?n(e(t)):Q(new B5).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 tb().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)},!i||f&&!Object.keys(a).length?n(e(r)):i&&!f?n(e(t)):Q(new B5).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},G5=(D5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=s0(n)?gb:Kv;return D5(Object.assign({curve:i},a))(t,e,n,r)}),z5=(G5.props=Object.assign({},D5.props),t=>{const{alpha:a=.5}=t,o=Z(t,["alpha"]);return(t,e,n,r)=>{var i=s0(n)?db:hb;return D5(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),W5=(z5.props=Object.assign({},D5.props),i=>(t,e,n,r)=>D5(Object.assign({curve:mb},i))(t,e,n,r)),V5=(W5.props=Object.assign({},D5.props),t=>{const c=t["arrowSize"],l=Z(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=jb(r,a,o,s),a=r["stroke"],o=Z(r,["stroke"]),{color:s=a,transform:r}=e,[e,a]=t,t=_v();return t.moveTo(...e),t.lineTo(...a),c&&([e,i]=Tb(e,a,{arrowSize:c}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),Q(new cs).call(F,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(F,l).node()}}),Y5=(V5.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=jb(r,i,a,o),i=r["stroke"],a=Z(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=_v();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 cs).call(F,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(F,s).node()}});Y5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const H5=t=>{const{cornerRatio:u=1/3}=t,h=Z(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:c}=e,r=jb(r,o,s,c),o=r["stroke"],s=Z(r,["stroke"]),{color:c=o,transform:r}=e,[e,o]=t,l=(t=e,e=o,o=n,n=u,a=_v(),s0(o)?(i=kb(t,l=o.getCenter()),i=(kb(e,l)-i)*n+i,a.moveTo(t[0],t[1]),Pb(a,t,e,l,i)):o0(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 cs).call(F,s).style("d",l.toString()).style("stroke",c).style("transform",r).call(F,h).node()}},q5=(H5.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=jb(r,i,a,o),i=r["stroke"],a=Z(r,["stroke"]),{color:o=i,transform:r}=e,[e,i]=t,t=_v();return t.moveTo(e[0],e[1]),s0(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):Pb(t,e,i,Sb(e,i),kb(e,i)/2),Q(new cs).call(F,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(F,s).node()}}),U5=(q5.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=jb(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:c=e}=u,[[t,l]]=t,t=t-Number(s)/2,s=l-Number(c)/2;return Q(new is).call(F,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(F,u).node()}});U5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const X5=t=>{const c=Z(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=jb(r,e,i,a),{fill:e,stroke:i}=r,a=Z(r,["fill","stroke"]),r=function(i,t){const a=_v();if(s0(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>kb(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?Pb(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 cs).call(F,a).style("d",r.toString()).style("stroke",o||i).style("fill",o||e).style("transform",s).call(F,c).node()}};X5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const $5=t=>{const c=Z(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=jb(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=_v();return s0(e)?(n=kb(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),Pb(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),Pb(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 cs).call(F,a).style("d",r.toString()).style("fill",o||e).style("stroke",o||i).style("transform",s).call(F,c).node()}};$5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const K5=t=>{const y=Z(t,[]);return(t,e,n,r)=>{var i,a,o,s,c,l,u,{mark:e,shape:h,defaultShape:f,color:d,transform:p}=e,r=jb(r,e,h,f),{fill:e,stroke:h}=r,f=Z(r,["fill","stroke"]),g=(r=t,t=n,n=_v(),s0(t)?([i,a]=t=t.getCenter(),o=Mb(wb(r[0],t)),s=Mb(wb(r[1],t)),g=kb(t,r[2]),c=kb(t,r[3]),l=kb(t,r[8]),u=kb(t,r[10]),t=kb(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,c,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,l,o,s),n.arc(i,a,l,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 cs).call(F,f).style("d",g.toString()).style("stroke",h).style("fill",d||e).style("transform",p).call(F,y).node()}};K5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Z5=t=>{const s=Z(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=jb(r,i,a,o),{stroke:i,lineWidth:a}=r,o=Z(r,["stroke","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,s0(t=n)?(t=t.getCenter(),Uv()({startAngle:0,endAngle:2*Math.PI,outerRadius:kb(a[0],t),innerRadius:kb(a[1],t)})):Qv().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,s0(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return Q(new cs({})).call(F,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(F,s).node()}};function J5(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}Z5.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const Q5=Vb(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,Qv().x(t=>t[0]).y(t=>t[1])(n));Q(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new kx({className:"marker",style:Object.assign(Object.assign({},i),{symbol:J5})}):null).call(F,e)});const tM=t=>{const{offset:s=0,connectLength1:c}=t,l=Z(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=jb(r,i,a,o),{fill:i,stroke:a=i,connectLength1:o=c}=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(o0(t)){const c=n;var t=e+c,s=t+r;return[[t,i],[s,i],[s,o],[a+c,o]]}const c=-n;return t=i+c,[[e,t],[e,s=t+-r],[a,s],[a,o+c]]}(n,t,s,o);return Q(new Q5).call(F,i).style("points",n).style("stroke",r||a).style("transform",e).call(F,l).node()}};function eM(t,e,a,n){var r=a["bounds"];const[[o,s],[i,c]]=r,l=i-o,u=c-s;r=t=>{var{x:e,y:n}=t,r=tg(a.x,l),i=tg(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:l,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:l/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:l/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:l,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:l,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:l/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function nM(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:c,outerRadius:l,startAngle:u,endAngle:h}=Cb(e,i,[t,n]),f="inside"===r?(u+h)/2:h;e=iM(f,a,o),t=(()=>{var[t,e]=i,n=c+.5*(l-c),[n,t]="inside"===r?rM(s,f,n):Sb(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function rM(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function iM(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function aM(r,t,e,n){const{y:i,y1:a,autoRotate:o,rotateToAlignArc:s,connector:c=!0,connectorLength2:l=0,connectorDistance:u=0,radius:h=.5,offset:f=0}=e,d=Cb(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?h:1,{innerRadius:e,outerRadius:n}=d,n=e+(n-e)*t;return[n,n+f]})();const y=0<Math.sin(g)?1:-1;var[e,t,...m]=((t,e)=>{var[t,n]=rM(p,g,t),[e,r]=rM(p,g,e),i=c?y*l:0;return[[t,n],[e+i,r],[-i,0]]})(e,t),m={connector:c,connectorPoints:m,dx:c?+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||c0(n),t=iM(g,o,s),"inside"===e?{textAlign:"center",textBaseline:"middle",rotate:t}:{textAlign:v?"start":"end",textBaseline:"middle",rotate:t})),m)}function oM(t,e,n,r){var i=n["bounds"];return 1===i.length?([i]=i=(i=n).bounds,{x:i[0],y:i[1]}):(c0(r)?nM:f0(r)?aM:eM)(t,e,n,r)}tM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var sM=Object.freeze({__proto__:null,top:oM,bottom:oM,right:oM,left:oM,topLeft:oM,topRight:oM,bottomLeft:oM,bottomRight:oM,inside:oM,outside:oM,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=Zp(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(c=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=c(e-1),c=Mb(wb(c(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${c}deg)`,textAlign:"center",textBaseline:"middle"}}});function cM(t,e,n,r){var i=e["position"],i=(a=n,void 0!==(i=i)?i:f0(a)?"inside":o0(a)?"right":"top"),a=r["inside"===i?"innerLabel":"label"],r=Object.assign({},a,e),e=sM[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 lM=t=>(t,e,n,r)=>{var i=e["text"],a=Z(e,["text","x","y"]),t=cM(t,e,n,r),{rotate:e=0,transform:r=""}=t,t=Z(t,["rotate","transform"]);return Q(new j5).call(F,t).style("text",""+i).style("transform",r+`rotate(${+e}deg)`).style("coordCenter",n.getCenter()).call(F,a).node()},uM=(lM.props={},t=>{const s=t["colorAttribute"],c=Z(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=Z(jb(r,i,a,o),["stroke"]),{d:i,color:a}=e;return Q(new cs).call(F,r).style("d",i).style(s,a).call(F,c).node()}}),hM=(uM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>uM(Object.assign({colorAttribute:"fill"},t))),fM=(hM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>uM(Object.assign({fill:"none",colorAttribute:"stroke"},t))),dM=(fM.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}))}}),pM=(dM.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),gM=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:pM.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:pM.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:pM.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:pM.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:pM.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:pM.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:pM.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:pM.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:pM.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:pM.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:pM.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:pM.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:pM.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:pM.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,tickStroke:pM.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:pM.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:pM.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0]},legend:{padding:8,showTitle:!1,titleFill:pM.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:pM.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:pM.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:pM.BLACK,navButtonFillOpacity:.45,navPageNumFill:pM.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:pM.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:pM.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:pM.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:pM.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:pM.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:pM.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:pM.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railHeight:16,railFill:pM.STROKE,railFillOpacity:.05,railForegroundFill:e,railForegroundFillOpacity:.15,handleHeight:24,handleWidth:10,handleFill:"#f7f7f7",handleFillOpacity:1,handleStroke:pM.BLACK,handleStrokeOpacity:.25,handleLineWidth:1,handleRadius:2,textFill:pM.BLACK,textFillOpacity:.45,textFontSize:12,textFontWeight:"normal"},scrollbar:{},title:{fill:pM.BLACK,fillOpacity:.85,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:pM.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)},yM=(gM.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),mM="#416180",vM=t=>{var e="#5B8FF9",e={defaultColor:e,defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:yM.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:yM.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:yM.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:mM,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:mM,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:mM,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:mM,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:mM,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:mM,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:mM,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:mM,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:mM,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:yM.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{titleFill:yM.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,lineStroke:yM.BLACK,lineStrokeOpacity:.45,lineLineWidth:.5,tickStroke:yM.BLACK,tickStrokeOpacity:.25,tickLineWidth:1,tickLength:4,labelFill:yM.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,gridStroke:yM.BLACK,gridStrokeOpacity:.05,gridLineWidth:.5,gridLineDash:[0,0]},legend:{padding:8,showTitle:!1,titleFill:yM.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4,itemMarkerFill:e,itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemLabelFill:yM.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemValueFill:yM.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",itemBackgroundFill:"transparent",navButtonFill:yM.BLACK,navButtonFillOpacity:.45,navPageNumFill:yM.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,backgroundFill:"transparent"},continuousLegend:{labelFill:yM.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",handleWidth:10,handleHeight:12,handleMarkerFill:yM.BLACK,handleMarkerFillOpacity:.6,handleMarkerStroke:yM.BLACK,handleMarkerStrokeOpacity:.25,handleMarkerLineWidth:1,handleLabelFill:yM.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},label:{fill:yM.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:null,offset:12,connectorStroke:yM.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength2:8,connectorDistance:4},innerLabel:{fill:yM.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:null,offset:0},slider:{railHeight:16,railFill:mM,railFillOpacity:.05,railForegroundFill:e,railForegroundFillOpacity:.15,handleHeight:24,handleWidth:10,handleFill:"#f7f7f7",handleFillOpacity:1,handleStroke:yM.BLACK,handleStrokeOpacity:.25,handleLineWidth:1,handleRadius:2,textFill:yM.BLACK,textFillOpacity:.45,textFontSize:12,textFontWeight:"normal"},scrollbar:{},title:{fill:yM.BLACK,fillOpacity:.85,fontSize:24,fontWeight:"bold",textBaseline:"top"},subtitle:{fill:yM.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",textBaseline:"top"}};return Object.assign({},e,t)};function bM(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)]}vM.props={};var xM,wM=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function kM(t){var e;if(e=wM.exec(t))return new MM({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 MM(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 EM(t,e){var n,e=bM(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+""}kM.prototype=MM.prototype,MM.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 OM={"%":(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)=>EM(100*t,e),r:EM,s:function(t,e){var n,r,i=bM(t,e);return i?(n=i[0],(i=(i=i[1])-(xM=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")+bM(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 SM(t){return t}var _M,AM,TM=Array.prototype.map,PM=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function LM(t){var e,s,c,k=void 0===t.grouping||void 0===t.thousands?SM:(s=TM.call(t.grouping,Number),c=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(c)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",M=void 0===t.decimal?".":t.decimal+"",E=void 0===t.numerals?SM:(e=TM.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}),a=void 0===t.percent?"%":t.percent+"",O=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function o(t){var l=(t=kM(t)).fill,u=t.align,h=t.sign,e=t.symbol,f=t.zero,d=t.width,p=t.comma,g=t.precision,y=t.trim,m=t.type,v=("n"===m?(p=!0,m="g"):OM[m]||(void 0===g&&(g=12),y=!0,m="g"),(f||"0"===l&&"="===u)&&(f=!0,l="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(m)?"0"+m.toLowerCase():""),b="$"===e?i:/[%p]/.test(m)?a:"",x=OM[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&&"+"!==h?!1:o)?"("===h?h:O:"-"===h||"("===h?"":h)+i,a=("s"===m?PM[8+xM/3]:"")+a+(o&&"("===h?")":""),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&&!f&&(t=k(t,1/0));var s=i.length+t.length+a.length,c=s<d?new Array(d-s+1).join(l):"";switch(p&&f&&(t=k(c+t,c.length?d-a.length:1/0),c=""),u){case"<":t=i+t+a+c;break;case"=":t=i+c+t+a;break;case"^":t=c.slice(0,s=c.length>>1)+i+t+a+c.slice(s);break;default:t=c+i+t+a}return E(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=kM(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=bM(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=PM[8+e/3];return function(t){return n(r*t)+i}}}}function NM(t,e,n){return t.querySelector(e)?Q(t).select(e):Q(t).append(n)}function CM(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function jM(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function RM(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 c,t=(i=a).getTicks?i.getTicks():t?([l,c]=Pp(e,t=>+t),i=i.getOptions()["tickCount"],t(l,c,i)):e,l=r?t.filter(r):t;const u=(null==(c=a.getFormatter)?void 0:c.call(a))||n,h=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 Im({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),f=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return h0(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new Im({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new Im({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return s0(s)||o0(s)?(i=l.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=h(a.map(t)+i);return{value:o0(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:u(t,e,n),id:String(e)}}),c0(s)&&"arcY"===o?i.map(t=>{var e=t["value"],t=Z(t,["value"]);return Object.assign({value:1-e},t)}):i):l.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:f(h(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 FM(t,e,n){var r;return!(s0(r=e)&&o0(r)||u0(e))&&(void 0===t?!!n.getTicks:t)}function IM(t,e,n,r,i){var a=function(t,e){var[e,n]=jM(e);return"bottom"===t||"top"===t?n:e}(t,r),[,r]=r.getCenter(),{x:o,y:s,width:c,height:l}=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+c,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+c,s],endPos:[o+c,s+l],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+l],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+c,s+l],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+l],endPos:[o+c,s+l],titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle",labelSpacing:8,labelDirection:"negative",tickDirection:"negative",gridDirection:"positive",showLine:"centerVertical"===t||void 0})}Mo=LM({thousands:",",grouping:[3],currency:["$",""]}),_M=Mo.format,Mo.formatPrefix;const BM=t=>{const{position:l,labelFormatter:u=t=>""+t,tickFilter:h,tickCount:f,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=RM(t,e,f,u,h,d,l,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,c]=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]=jM(r),n={titleFillOpacity:0,titlePosition:"inner",showLine:!1,showTick:!0,gridLength:(n-e)*(Math.min(i,a)/2)};return"arcInner"===t?(jM(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"})}(l,s,c,n),c=r["axis"];return new sk({style:R({},c,s,Object.assign({type:"arc",center:i,radius:t,angleRange:[e,o],data:a,title:CM(p),showGrid:g},y))})}},DM=t=>{const{position:i,labelFormatter:e=t=>""+t}=t;var n="string"==typeof e?_M(e):e;const a=Object.assign(Object.assign({},t),{labelFormatter:n});return(t,e,n,r)=>("arc"===i||"arcInner"===i?BM:s=>{const{position:c,title:l,labelFormatter:u=t=>""+t,direction:h="left",tickCount:f,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=RM(t,e,f,u,d,p,c,n),a=FM(m,n,t),i=IM(c,h,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:CM(l),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 sk({style:Object.assign({},r,i)})}})(a)(t,e,n,r)},GM=(DM.props={defaultPosition:"left",defaultSize:45,defaultOrder:0},t=>DM(t)),zM=(GM.props=Object.assign(Object.assign({},DM.props),{defaultPosition:"bottom"}),t=>DM(t));zM.props=Object.assign(Object.assign({},DM.props),{defaultPosition:"left"});const WM=t=>{const{position:u,labelFormatter:h=t=>""+t,dx:f=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:h(t),value:"",color:e.map(t)})),[c,l]=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+f,y:a+d,orient:["right","left","arcCenter"].includes(u)?"vertical":"horizontal",width:o,height:s,gridCol:l,gridRow:c,rowPadding:0,colPadding:8,titleText:CM(p),itemMarkerFill:t=>t?t.color:"#fff"},{legend:i={}}=r;return new Ak({style:Object.assign({},i,t,m)})}},VM=(WM.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},t=>{const c=t["title"],l=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 $k({style:Object.assign({},r,{x:i,y:a,width:400,height:300,data:[{value:o},{value:s}],titleText:CM(c),titleFontSize:12,ribbonLen:120,ribbonSize:12,ribbonColor:t.map(t=>e.map(t)),showHandle:!1,showIndicator:!1,labelAlign:"value"},l)})}}),YM=(VM.props={defaultPosition:"top",defaultOrder:1,defaultSize:40},AM={render(t,e){const{text:n,style:r,subtitle:i,subtitleStyle:a}=t;t=NM(e,".title","text").attr("className","title").style("fontSize",14).style("textBaseline","top").style("text",n).call(F,r||{}).node().getLocalBounds();NM(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 Uo{constructor(t){super(t),this.descriptor=AM}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(R({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}}),HM=t=>{const{text:a,style:o,subtitle:s,subtitleStyle:c}=t;return(t,e,n,r)=>{var{x:e,y:i}=e.bbox;return new YM({style:R({},{style:r.title,subtitleStyle:r.subtitle},{x:e,y:i,style:o,text:a,subtitle:s,subtitleStyle:c})})}};HM.props={defaultPosition:"top",defaultOrder:2,defaultSize:30};class qM{constructor(t){this.$value=t}static of(t){return new qM(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function UM(t,e,n){return qM.of({}).call(XM,t).call(XM,e).call(XM,n).value()}function XM(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function $M(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const KM=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],ZM=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:c,opacity:l}=a.style,[r,t]=o0(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:c,opacity:l,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:c,opacity:l}],o=(a.setOrigin(r),a.animate(t,UM(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},JM=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:c,opacity:l}=a.style,[r,t]=o0(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:c,opacity:l,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],c=(a.setOrigin(r),a.animate(s,UM(i,n,u)));return c.finished.then(()=>a.setOrigin(0,0)),c}},QM=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:c,opacity:l}=a.style,[r,t]=o0(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:c,opacity:l,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:c,opacity:l}],o=(a.setOrigin(r),a.animate(t,UM(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},tE=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o,fillOpacity:s,strokeOpacity:c,opacity:l}=a.style,[r,t]=o0(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:c,opacity:l,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],c=(a.setOrigin(r),a.animate(s,UM(i,n,u)));return c.finished.then(()=>a.setOrigin(0,0)),c}},eE=c=>(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}],UM(i,n,c))},nE=(eE.props={},c=>(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}],UM(i,n,c))});function rE(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function iE(t,e){var[n,r,i,t]=rE(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let c=0,l=e;for(;0<l;){var u=Math.min(l,a),h=i/u;for(let t=0;t<u;t++){var f=n+t*h,d=r+c*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
|
-
`}([f,d,h,s]))}l-=u,c+=1}return o}function eE(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function nE(t,e,n,r){var i,a,o,s,c,l,u,h,f,d=e["nodeName"],p=n["nodeName"],g=uc(e),y=uc(n);return d===p&&"path"!==d||(void 0===g||void 0===y)?(p=n,d=r,[o,c,s,f]=QM(i=e),[l,u,h,a]=(eE(p,i),QM(p)),o=[Object.assign({transform:`translate(${o-l}, ${c-u}) scale(${s/h}, ${f/a})`},YM(i,qM)),Object.assign({transform:"translate(0, 0) scale(1, 1)"},YM(p,qM))],p.animate(o,d)):(l=g,s="path"===(u=(c=t)["nodeName"])?c:(eE(u=new cs({style:Object.assign(Object.assign({},YM(c,qM)),{d:l})}),c),u),h=[Object.assign({path:g},YM(e,qM)),Object.assign({path:y},YM(n,qM))],f=s.animate(h,r),s.style.transform="scale(1, 1)",s.style.transform="none",f)}JM.props={};const rE=g=>(t,e,n,r,i)=>{[a="pack"]=[g.split];var a="function"==typeof a?a:tE,i=VM(i,n,g),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[l]=e,nE(s,s,l,i);if(1===n&&1<o){var[s]=t;{var c=s,l=e,u=i,s=a;c.style.visibility="hidden";const d=s(c,l.length);return l.map((t,e)=>{return nE(t,new cs({style:Object.assign({path:d[e]},YM(c,qM))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,h=n,f=i;const p=(e=a)(h,o.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=h.style,e=h.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],f);return[...o.map((t,e)=>{return nE(t,t,new cs({style:{path:p[e],fill:h.style.fill}}),f)}),e]}}return null},iE=(rE.props={},b=>{return ia({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:r.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!c0(r))return UM(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:s=0,inset:c=0,fillOpacity:l,strokeOpacity:u,opacity:h}=e,{points:e,y:t,y1:f}=(Z(e,["radius","inset","fillOpacity","strokeOpacity","opacity"]),t);const d=Xv().cornerRadius(s).padAngle(c*Math.PI/180),p=jb(r,e,[t,f]),{startAngle:g,endAngle:y}=p,m=new cs({}),v=t=>{m.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=uc(m);return m.style.transform="none",t};s=[{waveInArcAngle:g+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:g+1e-4,fillOpacity:l,strokeOpacity:u,opacity:h,offset:.01},{waveInArcAngle:y,fillOpacity:l,strokeOpacity:u,opacity:h}],c=a.animate(s,VM(i,n,b));return c.onframe=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},c.onfinish=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:y}))},c}}),aE=(iE.props={},l=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:c}=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:c,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:c}],{width:o,height:s}=a.getBoundingClientRect(),c=(a.setOrigin([o/2,s/2]),a.animate(t,VM(i,n,l)));return c.finished.then(()=>a.setOrigin(0,0)),c}}),oE=l=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:c}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:c,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:c}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,c/2]),a.animate(o,VM(i,n,l)));return t.finished.then(()=>a.setOrigin(0,0)),t}},sE=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]}],VM(i,n,o))},cE=(sE.props={},c=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new cs({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=UM(c)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),lE=(cE.props={},c=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new cs({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=$M(c)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o});function uE(t){return Q(t).selectAll("."+et).nodes()}function hE(t){return Q(t).select("."+nt).node()}function fE(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 dE(t){return t&&0!==Object.keys(t).length?t:{highlightedLineWidth:1,highlightedStroke:"#000"}}function pE(){return t=>t.__data__.color}function gE(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function yE(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 mE(o,s=(t,e)=>t){const c="__states__",l="__ordinal__",i=t=>{var{[c]:e=[],[l]: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[l]=n}},a=t=>{t[c]||(t[c]=[])};return{setState:(t,...e)=>{a(t),t[c]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[c].indexOf(r);-1!==r&&t[c].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[c].indexOf(e))}}function vE(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 bE(c,t){var{valueof:l=(t,e)=>t}=t,u=Z(t,["valueof"]);const h="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=Av();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(),Ab(u,t=>l(t,o))),{fill:a=o.getAttribute("fill")}=i,i=Z(i,["fill"]),r=new cs({className:h+(e?" "+e:""),style:Object.assign({d:r.toString(),fill:a},i)});c.appendChild(r)}}},t=>{t=t||h;for(const e of c.getElementsByClassName(t)||[])e.remove()}]}function xE(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),c=Rp(o,i);n=vE(o,r);const[l,u]=bE(t,Object.assign({elements:o,valueof:n},J(e,"link"))),{setState:h,removeState:f}=mE(e,n),d=t=>{t=t.target;if(s.has(t)){var t=i(t),t=c.get(t),e=new Set(t);for(const n of o)e.has(n)?h(n,"highlighted"):h(n,"unhighlighted");a&&l(t)}},p=t=>{t=t.target;if(s.has(t)){for(const e of o)f(e,"unhighlighted","highlighted");a&&u()}};return t.addEventListener("pointerover",d),t.addEventListener("pointerout",p),()=>{t.removeEventListener("pointerover",d),t.removeEventListener("pointerout",p)}}function wE(n){return t=>{var{container:t,view:e}=t;return xE(t,Object.assign(Object.assign({},dE(n)),{elements:uE,datum:yE(e)}))}}function kE(n={selectedLineWidth:1,selectedColor:"black"}){return t=>{var{container:t,view:e}=t;return xE(t,Object.assign(Object.assign({},dE(n)),{elements:uE,datum:yE(e),groupKey:gE(e)}))}}function ME(n){return t=>{var{container:t,view:e}=t;return xE(t,Object.assign(Object.assign(Object.assign({},n),dE(n)),{elements:uE,datum:yE(e),groupKey:pE()}))}}function EE(t,e){var{elements:n,datum:r,groupKey:c=t=>t,link:l=!1,single:u=!1}=e,e=Z(e,["elements","datum","groupKey","link","single"]);const h=n(t),f=new Set(h),d=Rp(h,c);n=vE(h,r);const[p,g]=bE(t,Object.assign({elements:h,valueof:n},J(e,"link"))),{setState:y,removeState:i,hasState:m}=mE(e,n),v=()=>{for(const t of h)i(t,"selected","unselected");l&&g()},a=t=>{t=t.target;if(!f.has(t))return v();if(u){var e=t;if(m(e,"selected"))v();else{var e=c(e),e=d.get(e),n=new Set(e);for(const i of h)n.has(i)?y(i,"selected"):y(i,"unselected");l&&(g(),p(e))}}else{e=t;var t=c(e),r=d.get(t);const a=new Set(r);if(m(e,"selected")){if(!h.some(t=>!a.has(t)&&m(t,"selected")))return v();for(const o of r)y(o,"unselected");l&&g(t)}else{e=r.some(t=>m(t,"selected"));for(const s of h)a.has(s)?y(s,"selected"):m(s,"selected")||y(s,"unselected");!e&&l&&p(r,t)}}};return t.addEventListener("click",a),()=>{t.removeEventListener("click",a)}}function OE(n){return t=>{var{container:t,view:e}=t;return EE(t,Object.assign(Object.assign({},dE(n)),{elements:uE,datum:yE(e)}))}}function SE(n){return t=>{var{container:t,view:e}=t;return EE(t,Object.assign(Object.assign({},dE(n)),{elements:uE,datum:yE(e),groupKey:gE(e)}))}}function _E(n){return t=>{var{container:t,view:e}=t;return EE(t,Object.assign(Object.assign({},dE(n)),{elements:uE,datum:yE(e),groupKey:pE()}))}}function AE(t){var{wait:E=20,leading:O,trailing:S=!1,labelFormatter:_=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:f,x:d,series:c=[]}=t;t=f.map((t,e)=>e);const l=Bp(t.map(t=>d[t])),u=R({},e),h=u.marks.find(t=>"line"===t.type);t=Kp(Fp(t,t=>Kp(t,t=>+f[t])/Jp(t,t=>+f[t]),t=>c[t]).values());R(h,{scale:{y:{domain:[1/t,t]}}});const p=hE(r),g=r.getElementsByClassName(et);const y=Rp(r.getElementsByClassName(it),t=>t.__data__.key.split("-")[0]),m=new os({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},J(A,"rule"))}),v=new ys({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 l[Sp(l,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",_(e))};let w;var k;const M=Vf(t=>{t=fE(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[Ep(t=>d[+t]).center(a,i)],c=[0,r.map(1)],s=[0,r.map(f[s]/f[a[0]])],[,a]=n.map(c),[,c]=n.map(s),l=a-c,s=(u.setAttribute("transform",`translate(0, ${l})`),y.get(o)||[]);for(const h of s)h.setAttribute("dy",l)}}},E,{leading:O,trailing:S});return k=[0,0],Ee(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)}(h);t.groupBy="color",t.basis=(t,e)=>{return e[t[Ep(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 TE({wait:c=30,leading:l,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=hE(n),a=R({},e);for(const s of a.marks)s.animate=!1;const o=Vf(t=>{var e,n,t=fE(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))},c,{leading:l,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 PE(t,e,n,r){var i=t.tooltipElement||function(t,e,n){var{min:[r,i],max:[a,o]}=t.getBounds(),e=new Zk({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 LE(t){t=t.tooltipElement;t&&t.hide()}function NE(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>Q0(t)))}function CE(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e||n}=t;return t}function jE(n,a,o,t=n.map(t=>t.__data__)){e=t.map(t=>t.title);var e=Array.from(new Set(e)).filter(Q0),t=t.flatMap((r,t)=>{var t=n[t],e=Z(r,["title"]);const i=CE(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},NE(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 RE(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function FE(t,e){return void 0===t?e:t}function IE(c,t){var{elements:e,wait:n=50,leading:r=!0,trailing:i=!1,scale:l,coordinate:u,showCrosshairs:h,item:f}=t,t=Z(t,["elements","wait","leading","trailing","scale","coordinate","showCrosshairs","item"]);const d=e(c),[,p]=function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return[n-t,r-e]}(c),g=new Map(d.map(t=>{var e=t["__data__"],e=e["seriesX"];return[t,Bp(e)]})),y=J(t,"crosshairs"),a=Vf(t=>{const r=fE(c,t);var t=c.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[Af(t.replace("series","")),e]}))})(t,((t,e)=>{var[t]=u.invert(t);return Sp(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=jE(d,f,l,i);if(PE(c,i,r[0]+e,r[1]+t),h){i=c,e=n,n=(t=Object.assign(Object.assign({},y),{height:p}))["height"],t=Z(t,["height"]);const a=e=n0(e.map(t=>t[0])),o=e,s=n;(n=i.ruleY||(e=new os({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;LE(c),h&&(t=c).ruleY&&(t.ruleY.remove(),t.ruleY=void 0)};return c.addEventListener("pointerenter",a),c.addEventListener("pointermove",a),c.addEventListener("pointerleave",o),()=>{c.removeEventListener("pointerover",a),c.removeEventListener("pointerout",a),c.removeEventListener("pointerleave",o)}}function DE(r,{elements:t,scale:i,wait:e=50,leading:n=!0,trailing:a=!1,groupKey:o=t=>t,item:s}){t=t(r);const c=new Set(t),l=Rp(t,o),u=Vf(t=>{var e,n=t["target"];c.has(n)&&(n=o(n),n=1===(n=l.get(n)).length?function(t,r,i){var e=(n=t["__data__"])["title"],n=Z(n,["title"]);const a=CE(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},NE(r({channel:t,value:e})))}).filter(({value:t})=>void 0!==t),Object.assign(Object.assign({},e&&{title:e}),{items:t})}(n[0],s,i):jE(n,s,i),{offsetX:t,offsetY:e}=t,PE(r,n,t,e))},e,{leading:n,trailing:a}),h=t=>{t=t.target;c.has(t)&&LE(r)};return r.addEventListener("pointerover",u),r.addEventListener("pointermove",u),r.addEventListener("pointerout",h),()=>{r.removeEventListener("pointerover",u),r.removeEventListener("pointermove",u),r.removeEventListener("pointerout",h)}}function BE(t){const{shared:o,showCrosshairs:s,series:c,item:l=()=>({})}=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=RE(r,"seriesTooltip"),r=RE(r,"showCrosshairs"),t=hE(t);return FE(c,a)?IE(t,Object.assign(Object.assign({},u),{elements:uE,scale:n,coordinate:i,showCrosshairs:FE(s,r),item:l})):DE(t,Object.assign(Object.assign({},u),{elements:uE,scale:n,coordinate:i,groupKey:o?gE(e):void 0,item:l}))}}function GE(n){return(t,...e)=>R({},n(t,...e),t)}function zE(n){return(t,...e)=>R({},t,n(t,...e))}function WE(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}lE.props={};const VE=()=>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:WE(e,o),x:n,y:r,width:i,height:a})})},HE=(VE.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,c,l]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),h=e[s]-i*(n.length-1);var f=r.map(t=>h*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<f.length;t+=1){var g=n[t],y=g["data"],g=Z(g,["data"]),y=WE(y,a);d.push(Object.assign({[o]:p,[s]:f[t],[l]:e[l]||0,[c]:e[c],data:y},g)),p+=f[t]+i}return d}),YE=(HE.props={},()=>t=>{var e=t["children"],t=Z(t,["children"]);if(!Array.isArray(e))return[];const{data:a,scale:o={},axis:s={},legend:c={}}=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:WE(e,a),scale:R({},o,n),axis:!(!r||!s)&&R({},s,r),legend:!(!i||!c)&&R({},c,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),qE=(YE.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:c,insetLeft:l,insetTop:u,insetRight:h,insetBottom:f,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,data:v,coordinates:b,theme:x,component:w,interactions:k,x:M,y:E,key:O,frame:S,title:_,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:E,key:O,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:c,insetLeft:l,insetTop:u,insetRight:h,insetBottom:f,paddingBottom:o,theme:x,coordinates:b,component:w,interactions:k,frame:S,title:_,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,marks:[Object.assign(Object.assign({},t),{key:O+"-0",data:v})]}]}),UE=(qE.props={},GE(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=Rp(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"))}}})),XE=GE(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:h={},scale:n={},legend:f={}}=r.shift();var s=h["color"],c=n["color"],l=f["color"];void 0!==s&&(i=s),void 0!==c&&(a=c),void 0!==l&&(o=l),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:R({},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:R({title:i},o)}}}),$E=GE(()=>({animate:{enterType:"fadeIn"}})),KE=zE(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),ZE=zE(()=>({type:"cell"})),JE=zE(l=>{var t=l["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=l;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 c of a)o.push({[n]:s,[r]:c});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),QE=zE((t,l=function(t){t=t.points;return Sb(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?t3(a,e):(t=e.length?void 0:null,R({title:r===i-1&&void 0,grid:t},a))}},k=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?t3(r,e):(n=e.length?void 0:null,R({title:0===t&&void 0,grid:n},r))}},M={})=>{const{data:e,encode:n,children:u,scale:r,x:E=0,y:O=0,shareData:h=!1}=t,S=e["value"],{x:_,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=Tb(t);const s=t.map(l);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const c=n.map(([n,r])=>t=>{var{[_]:t,[A]:e}=t,t=void 0===_||t===n,e=void 0===A||e===r;return t&&e}).map(t=>S.filter(t)),v=h?Kp(c,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:_,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(l=>{const[u,h,f,d]=s[l],p=b[l],g=c[l];return x[l].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:_?5:void 0},y:{tickCount:A?5:void 0}},r=r?g:0===g.length?[]:S,c={color:{domain:T}},o={x:e3(o,w)(p,r),y:e3(a,k)(p,r)};return Object.assign(Object.assign({key:n+"-"+l,data:r,x:u+y+E,y:h+m+O,width:f,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:R(s,e,c),axis:R({},i,o),legend:!1},t),M)})})}}});function t3(t,e){return e.length?R({title:!1,tick:null,label:null},t):R({title:!1,tick:null,label:null,grid:null},t)}function e3(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const n3=()=>t=>{return[WM.of(t).call(ZE).call(XE).call($E).call(UE).call(KE).call(JE).call(QE).value()]},r3=(n3.props={},GE(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),i3=zE(t=>{const{data:w,children:l,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=Tb(t);const s=t.map(({points:t})=>Sb(t)),c=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=c.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(l)?l:[l(t)].flat(1));return e.flatMap(l=>{const[u,h,f,d]=s[l],[p,g]=c[l],y=b[l];return x[l].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,c=null==(c=null==e?void 0:e.x)?void 0:c.guide,c={x:("function"==typeof(r=c)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return t3(r,e)})(y,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return t3(n,e)})(y,w)};return Object.assign({data:w,key:i+"-"+l,x:u+m+k,y:h+v+M,width:f,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:R({x:{facet:!1},y:{facet:!1}},e),axis:R({x:{tickCount:5},y:{tickCount:5}},o,c),legend:!1,encode:R({},a,{x:p,y:g})},t)})})}}}),a3=zE(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 o3=()=>t=>{return[WM.of(t).call(ZE).call(XE).call(i3).call(a3).call($E).call(KE).call(r3).value()]},s3=GE(t=>({scale:{x:{guide:{type:"axisX"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),c3=GE(t=>({coordinates:[{type:"polar"}]})),l3=t=>{var e=t["encode"],t=Z(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function u3(t){return t=>null}function h3(t){var t=t["points"],[t,e,n,r]=t,i=Mb(t,r),t=kb(t,r),r=kb(e,n),r=(e=r,r=Eb(r=t),e=Eb(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=Ob(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const f3=()=>t=>{return[WM.of(t).call(ZE).call(l3).call(XE).call(c3).call(JE).call(QE,h3,u3,u3,{frame:!1}).call($E).call(KE).call(s3).value()]};const d3=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:c=1,direction:l="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],h=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=R({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"===c||t<c;){n=l,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 h[i]),e=i}t++}var a,o,s}};function p3(t,e){if(null!==t)return{type:"column",value:t,field:e}}function g3(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function y3(t,e){var n=[];for(const r of t)n[r]=e;return n}function m3(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function v3(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=m3(t,i);if(null!==n)return[n,r]}return[null,null]}function b3(t){return!(t instanceof Date)&&"object"==typeof t}d3.props={};const x3=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,R({},e,{encode:{y1:p3(y3(t,0))}})]};function w3(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=m3(r,t))?void 0:t[0]]}).filter(([,t])=>Q0(t));return Array.from(Rp(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function k3(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:Mp(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>T3(t=>r(e[t]))):"series"===t?O3:"value"===t?S3:"sum"===t?_3:"maxIndex"===t?A3:()=>null}function M3(t,e){for(const n of t)n.sort(e)}function E3(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function O3(t,e,n){return T3(t=>n[t])}function S3(t,e,n){return T3(t=>e[t])}function _3(t,n,e){t=Tb(t),t=Array.from(Rp(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return T3(t=>r.get(e[t]))}function A3(t,n,e){t=Tb(t),t=Array.from(Rp(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,Zp(e,t=>n[t])]));return T3(t=>r.get(e[t]))}function T3(n){return(t,e)=>Mp(n(t),n(e))}x3.props={};const P3=(t={})=>{const{groupBy:T="x",orderBy:P=null,reverse:L=!1,y:N="y",y1:C="y1",series:j=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=m3(r,"y"),[s,c]=m3(r,"y1"),[r]=j?v3(r,"series","color"):m3(r,"color"),l=w3(T,t,e),n=k3(P)(n,a,r),u=(n&&M3(l,n),new Array(t.length)),h=new Array(t.length),f=new Array(t.length),d=[],p=[];for(const O of l){L&&O.reverse();var g=s?+s[O[0]]:0,y=[],m=[];for(const S of O){var v=f[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 _ of m.reverse()){var w=f[_];n=u[_]=(h[_]=n)+w}let r=g;for(const A of y){var k=f[A];0<k?r=u[A]=(h[A]=r)+k:u[A]=h[A]=r}}const M=new Set(d),E=new Set(p);r="y"===N?u:h,n="y"===C?u:h;return[t,R({},e,{encode:{y:p3(r,o),y1:p3(n,c)},style:Object.assign({first:(t,e)=>M.has(e),last:(t,e)=>E.has(e)},i)})]}};function L3(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}P3.props={};const N3=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(L3)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",P3({groupBy:r})(t,e,n))},C3=(N3.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]=m3(n,i),[t,R({},e,{encode:{title:p3(r,n)}})])}}),j3=(C3.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,R({},e,{encode:{x:p3(y3(t,0))},scale:{x:{guide:null}}})]}),R3=(j3.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,R({},e,{encode:{y:p3(y3(t,0))},scale:{y:{guide:null}}})]}),F3=(R3.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,R({},e,{encode:{size:g3(y3(t,3))}})]}),I3=(F3.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,R({},e,{encode:{key:p3(r)}})]}),D3=(I3.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=m3(n,"color"),[t,R({},e,{encode:{series:p3(r,i)}})])}),B3=(D3.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(b3)?[t,e]:[t,R({},e,{encode:{y:p3(n)}})]}),G3=(B3.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(b3)?[t,e]:[t,R({},e,{encode:{x:p3(n)}})]}),z3=(G3.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=m3(n,"y"),[t,R({},e,{encode:{y1:p3([...r])}})])}),W3=(z3.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=m3(n,"x"),[t,R({},e,{encode:{x1:p3([...r])}})])}),V3=(W3.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]=m3(r,t),t=[[t,p3(e)]];return e&&null!==n&&(t.push(["tooltip"+(0===i?"":i),p3(e,n)]),i++),t}));return[t,R({},e,{encode:Object.fromEntries(n)})]}}),H3=(V3.props={},()=>(t,e)=>[t,R({scale:{x:{padding:0},y:{padding:0}}},e)]),Y3=(H3.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],R({},r,{data:[0],cartesian:!0,encode:{x:p3([i||0]),y:p3([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),q3=(Y3.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,R({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),U3=(q3.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(b3)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,R({},e,{encode:{x:p3(n),y:p3(r)}})])}),X3=(U3.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,R({},e,{encode:{series:g3(y3(t,void 0))}})]:[t,e]}),$3=(X3.props={},(t={})=>{const{groupBy:l="x",reverse:u=!1,orderBy:h,padding:f}=t;return Z(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=m3(r,"y"),[r]=v3(r,"series","color"),o=E3(r,i),i=w3(l,t,e),n=k3(h)(n,a,r),s=(n&&M3(i,n),new Array(t.length));for(const c of i){u&&c.reverse();for(let t=0;t<c.length;t++)s[c[t]]=o[t]}return[t,R({},e,{scale:{series:{domain:o,paddingInner:f}},encode:{series:p3(s)}})]}}),K3=($3.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,m3(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,h]of r){var a=[];for(const n of i){var o=Array.from(Rp(n,t=>h[t]).values());a.push(...o)}i=a}if(y){const[f]=m3(e,y);f&&i.sort((t,e)=>g(t,f)-g(e,f)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[y3(n,r)]:v3(e,"enterDuration",y3(n,r));var[c]=v3(e,"enterDelay",y3(n,0)),l=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=Kp(n,t=>+s[t]);for(const d of n)l[d]=+c[d]+e;e+=u}return[n,R({},t,{encode:{enterDuration:g3(s),enterDelay:g3(l)}})]}});K3.props={};const Z3=(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,m3(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=w3(d,e,t),c="function"==typeof(r=p)?r:{min:(t,e)=>Jp(t,t=>e[+t]),max:(t,e)=>Kp(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>n0(t,t=>e[+t]),median:(t,e)=>r0(t,t=>e[+t]),sum:(t,e)=>o0(t,t=>e[+t]),deviation:(t,e)=>Tp(t,t=>e[+t])}[r]||Kp;for(const e of i){var l=c(e,o);for(const f of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,h]=s[t];h[f]=+u[f]/l}}return[e,R({},t,{encode:Object.fromEntries(s.map(([t,e])=>[t,p3(e,m3(n,t)[1])]))})]}};function J3(t,e,n){return null===t?[-.5,.5]:(t=E3(t,e),[-(e=new _m({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function Q3(t,e,n){return e*(1-t)+n*t}Z3.props={};const tO=(t={})=>{const{padding:e=0,paddingX:c=e,paddingY:l=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=m3(n,"x"),[n]=m3(n,"y");const o=J3(a,r,c),s=J3(n,i,l);a=t.map(()=>Q3(u(),...s)),r=t.map(()=>Q3(u(),...o));return[t,R({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:p3(a),dx:p3(r)}})]}},eO=(tO.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=m3(n,"x");const i=J3(n,r,a);n=t.map(()=>Q3(o(),...i));return[t,R({scale:{x:{padding:.5}}},e,{encode:{dx:p3(n)}})]}}),nO=(eO.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,m3(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=w3(g,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[c,l]=Pp(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(c+l)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var h=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,f]=i[t],[,d]=a[t];d[p]=+f[p]+h}}return[e,R({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,p3(e,m3(n,t)[1])]))})]}}),rO=(nO.props={},(t={})=>{const{groupBy:u="x",series:h=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=m3(n,"y");var[,i]=m3(n,"y1"),n=(h?v3(n,"series","color"):m3(n,"color"),w3(u,t,e)),a=new Array(t.length);for(const l of n){var o=l.map(t=>+r[t]);for(let n=0;n<l.length;n++){var s=l[n],c=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>c?c:r[s]}}return[t,R({},e,{encode:{y1:p3(a,i)}})]}});function iO(t,e){return[t[0]]}function aO(t,e){return[t[t.length-1]]}function oO(t,e){return[t[Zp(t,t=>e[t])]]}function sO(t,e){return[t[Qp(t,t=>e[t])]]}rO.props={};const cO=(t={})=>{const{groupBy:s="series"}=t,c=Z(t,["groupBy"]);return(t,e)=>{var n=e["encode"],t=w3(s,t,e),[r,i]=Object.entries(c)[0];const[a]=m3(n,r),o="function"==typeof(n=i)?n:{first:iO,last:aO,max:oO,min:sO}[n]||iO;return[t.flatMap(t=>o(t,a)),e]}};function lO(t,e){return[t[0]]}function uO(t,e){return[t[t.length-1]]}function hO(t,e){return[t[Zp(t,t=>e[t])]]}function fO(t,e){return[t[Qp(t,t=>e[t])]]}cO.props={};const dO=(t={})=>{const{groupBy:s="series"}=t,c=Z(t,["groupBy"]);return(t,e)=>{var n=e["encode"],t=w3(s,t,e),[r,i]=Object.entries(c)[0];const[a]=m3(n,r),o="function"==typeof(n=i)?n:{first:lO,last:uO,max:hO,min:fO}[n]||lO;return[t.flatMap(t=>o(t,a)),e]}},pO=(dO.props={},(t={})=>{var e=t["selector"],t=Z(t,["selector"]);return dO(Object.assign({x:e},t))}),gO=(pO.props={},(t={})=>{var e=t["selector"],t=Z(t,["selector"]);return dO(Object.assign({y:e},t))});function yO(e){return t=>null===t?e:e+" of "+t}function mO(){return[(t,e)=>n0(t,t=>+e[t]),yO("mean")]}function vO(){return[(t,e)=>r0(t,t=>+e[t]),yO("median")]}function bO(){return[(t,e)=>Kp(t,t=>+e[t]),yO("max")]}function xO(){return[(t,e)=>Jp(t,t=>+e[t]),yO("min")]}function wO(){return[(t,e)=>t.length,yO("count")]}function kO(){return[(t,e)=>o0(t,t=>+e[t]),yO("sum")]}function MO(){return[(t,e)=>e[t[0]],yO("first")]}function EO(){return[(t,e)=>e[t[t.length-1]],yO("last")]}gO.props={};const OO=(t={})=>{const a=t["groupBy"],l=Z(t,["groupBy"]);return(t,e)=>{const{data:o,encode:s}=e,c=a(t,e);var n,r,i;return c?(n=Object.entries(l).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:mO,max:bO,count:wO,first:MO,last:EO,sum:kO,min:xO,median:vO}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=m3(s,t);return[t,p3(c.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]=m3(s,t);return[t,p3(c.map(t=>e[t[0]]),n)]}),i=c.map(t=>o[t[0]]),[Tb(c),R({},e,{data:i,encode:Object.fromEntries([...r,...n])})]):[t,e]}},SO=(OO.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=Z(t,["channels"]);return OO(Object.assign(Object.assign({},e),{groupBy:(t,e)=>w3(n,t,e)}))}),_O=(SO.props={},(t={})=>SO(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),AO=(_O.props={},(t={})=>SO(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),TO=(AO.props={},(t={})=>SO(Object.assign(Object.assign({},t),{channels:["color"]})));function PO(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=Z(n,["reverse","slice","channel"]),o=e["encode"];const[s]=m3(o,a);var c,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=m3(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>Kp(t,t=>+a[t]);if("min"===i)return t=>Jp(t,t=>+a[t]);if("sum"===i)return t=>o0(t,t=>+a[t]);if("median"===i)return t=>r0(t,t=>+a[t]);if("mean"===i)return t=>n0(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,l=t=>s[t],(2!==(c=n).length?Bp(Fp(o,c,l),([t,e],[n,r])=>Mp(e,r)||Mp(t,n)):Bp(Rp(o,l),([t,e],[n,r])=>c(e,r)||Mp(t,n))).map(([t])=>t)),o=(r&&n.reverse(),"number"==typeof i?[0,i]:i),l=i?n.slice(...o):n;return[t,R(e,{scale:{[a]:{domain:l}}})]}TO.props={};const LO=(t={})=>{const{reverse:o=!1,slice:s,channel:c,ordinal:l=!0}=t,u=Z(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(l)return PO(t,e,Object.assign({reverse:o,slice:s,channel:c},u));{var n=Object.assign({reverse:o,slice:s,channel:c},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=m3(i,r);return i=Bp(t,t=>a[t]),n&&i.reverse(),[i,e]}}},NO=(LO.props={},(t={})=>LO(Object.assign(Object.assign({},t),{channel:"x"}))),CO=(NO.props={},(t={})=>LO(Object.assign(Object.assign({},t),{channel:"color"}))),jO=(CO.props={},(t={})=>LO(Object.assign(Object.assign({},t),{channel:"y"})));jO.props={};const RO=(t={})=>{const{field:o,channel:s="y",reducer:c="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=m3(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):m3(r,s)[0],r=Ip(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>o0(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(c,n),t=>i[t]).map(t=>t[1]);return[t,R({},e,{scale:{x:{flex:r}}})]}};function FO(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let c=Math.ceil(Math.sqrt(e/(a/i))),l=i/c,u=Math.ceil(e/c),o=u*l;for(;o>a;)c+=1,l=i/c,u=Math.ceil(e/c),o=u*l;const h=a-u*l,f=u<=1?0:h/(u-1),[d,p]=u<=1?[(i-r*l)/(r-1),(a-l)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=Sb(t),a=e%c,e=Math.floor(e/c),o=a*l,s=(u-e-1)*l+h,r=l/r,i=l/i;return`translate(${o-t+d*a}, ${s-n-f*e-p}) scale(${r}, ${i})`})}RO.props={};const IO=()=>(t,e)=>[t,R({},e,{modifier:FO,axis:!1})],DO=(IO.props={},"thresholds");function BO(t){var[e,n]=Pp(t);return Math.min(200,(t=t,Math.ceil((n-e)*Math.cbrt(Ap(t))/(3.49*Tp(t)))))}const GO=(t={})=>{const{groupChannels:s=["color"],binChannels:c=["x","y"]}=t,l=Z(t,["groupChannels","binChannels"]),u={};return OO(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(l).filter(([t])=>!t.startsWith(DO)))),Object.fromEntries(c.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=c.map(t=>{var[t]=m3(n,t);return t}),a=J(l,DO),o=t.filter(e=>i.every(t=>Q0(t[e]))),r=[...s.map(t=>{var[t]=m3(n,t);return t}).filter(Q0).map(e=>t=>e[t]),...c.map((t,e)=>{const n=i[e];e=a[t]||BO(n),e=$p().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(Rp(o,e=>r.map(t=>t(e)).join("-")).values())}}))},zO=(GO.props={},(t={})=>{var e=t["thresholds"];return GO(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});zO.props={};const WO=(t={})=>{const{groupBy:n,thresholds:o=2e3}=t,e=Z(t,["groupBy","thresholds"]);return OO(Object.assign(Object.assign({},e),{groupBy:(t,e)=>{t=w3(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}})}}))};WO.props={};var Eo="object"==typeof Fn&&Fn&&Fn.Object===Object&&Fn,go="object"==typeof self&&self&&self.Object===Object&&self,rl=Eo||go||Function("return this")(),Zc=rl.Symbol,Ko=Object.prototype,VO=Ko.hasOwnProperty,HO=Ko.toString,YO=Zc?Zc.toStringTag:void 0;var qO=Object.prototype.toString;var UO="[object Null]",XO="[object Undefined]",$O=Zc?Zc.toStringTag:void 0;function KO(t){if(null==t)return void 0===t?XO:UO;if($O&&$O in Object(t)){var e=t,n=VO.call(e,YO),r=e[YO];try{var i=!(e[YO]=void 0)}catch(t){}var a=HO.call(e);return i&&(n?e[YO]=r:delete e[YO]),a}return qO.call(t)}function ZO(t){return null!=t&&"object"==typeof t}var JO=Array.isArray;function QO(t){return t}var tS="[object AsyncFunction]",eS="[object Function]",nS="[object GeneratorFunction]",rS="[object Proxy]";function iS(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}var aS=/^(?:0|[1-9]\d*)$/;var oS=9007199254740991;function sS(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=oS}function cS(t){return null!=t&&sS(t.length)&&!function(t){var e;if(e=typeof t,null!=t&&("object"==e||"function"==e))return(e=KO(t))==eS||e==nS||e==tS||e==rS}(t)}var lS=Object.prototype;function uS(t){return ZO(t)&&"[object Arguments]"==KO(t)}var sl=Object.prototype,hS=sl.hasOwnProperty,fS=sl.propertyIsEnumerable,dS=uS(function(){return arguments}())?uS:function(t){return ZO(t)&&hS.call(t,"callee")&&!fS.call(t,"callee")};var ol="object"==typeof h&&h&&!h.nodeType&&h,fl=ol&&"object"==typeof module&&module&&!module.nodeType&&module,el=fl&&fl.exports===ol?rl.Buffer:void 0,pS=(el?el.isBuffer:void 0)||function(){return!1},gS={};gS["[object Float32Array]"]=gS["[object Float64Array]"]=gS["[object Int8Array]"]=gS["[object Int16Array]"]=gS["[object Int32Array]"]=gS["[object Uint8Array]"]=gS["[object Uint8ClampedArray]"]=gS["[object Uint16Array]"]=gS["[object Uint32Array]"]=!0,gS["[object Arguments]"]=gS["[object Array]"]=gS["[object ArrayBuffer]"]=gS["[object Boolean]"]=gS["[object DataView]"]=gS["[object Date]"]=gS["[object Error]"]=gS["[object Function]"]=gS["[object Map]"]=gS["[object Number]"]=gS["[object Object]"]=gS["[object RegExp]"]=gS["[object Set]"]=gS["[object String]"]=gS["[object WeakMap]"]=!1;var yS,Mc="object"==typeof h&&h&&!h.nodeType&&h,mS=Mc&&"object"==typeof module&&module&&!module.nodeType&&module,vS=mS&&mS.exports===Mc&&Eo.process,rw=function(){try{var t=mS&&mS.require&&mS.require("util").types;return t?t:vS&&vS.binding&&vS.binding("util")}catch(t){}}(),Ao=rw&&rw.isTypedArray,bS=Ao?(yS=Ao,function(t){return yS(t)}):function(t){return ZO(t)&&sS(t.length)&&!!gS[KO(t)]},xS=Object.prototype.hasOwnProperty;function wS(t,e){var n,r,i,a,o=JO(t),s=!o&&dS(t),c=!o&&!s&&pS(t),l=!o&&!s&&!c&&bS(t),u=o||s||c||l,h=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],f=h.length;for(n in t)!e&&!xS.call(t,n)||u&&("length"==n||c&&("offset"==n||"parent"==n)||l&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||(a=void 0,a=typeof(r=n),(i=null==(i=f)?9007199254740991:i)&&("number"==a||"symbol"!=a&&aS.test(r))&&-1<r&&r%1==0&&r<i))||h.push(n);return h}kS=Object.keys,MS=Object;var kS,MS,ES=function(t){return kS(MS(t))},OS=Object.prototype.hasOwnProperty;function SS(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||lS))return ES(t);var e,n,r,i=[];for(r in Object(t))OS.call(t,r)&&"constructor"!=r&&i.push(r);return i}function _S(t){return(cS(t)?wS:SS)(t)}var AS,TS=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[AS?o:++r];if(!1===e(i[s],s,i))break}return t};LS=function(t,e){return t&&TS(t,e,_S)};function PS(t,e){if(null!=t){if(!cS(t))return LS(t,e);for(var n=t.length,r=NS?n:-1,i=Object(t);(NS?r--:++r<n)&&!1!==e(i[r],r,i););}return t}var LS,NS;function CS(t,e){(JO(t)?iS:PS)(t,"function"==typeof(t=e)?t:QO)}function jS(t,e,n){return e<=t&&t<=n}function RS(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function FS(t,e,n){var r=!1,i=t.length;if(!(i<=2)){for(var a,o,s,c=0;c<i;c++){var l=t[c],u=t[(c+1)%i];if(o=u,((s=[e,n])[0]-(a=l)[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<RS(l[1]-n)!=0<RS(u[1]-n)&&RS(e-(n-l[1])*(l[0]-u[0])/(l[1]-u[1])-l[0])<0&&(r=!r)}return r}}function IS(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 DS(t,l){var u=!1;return CS(t,function(t){if(e=t.from,t=t.to,n=l.from,r=l.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,c=null,c=.001*(o*o+t*t)*(s*s+r*r)<(n=o*r-t*s)*n&&jS(r=(i*r-a*s)/n,0,1)&&jS((i*t-a*o)/n,0,1)?{x:e.x+r*o,y:e.y+r*t}:c)return!(u=!0);var e,n,r,i,a,o,s,c}),u}function BS(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 GS(t){var{min:t,max:e}=t.getRenderBounds(),[t,n]=t,[e,r]=e;return[[t,n],[t,r],[e,r],[e,n]]}function zS(t){return t.style.priority||0}const WS=()=>(n,t)=>{var r=[];n.sort((t,e)=>Mp(zS(t),zS(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=BS(e),o=BS(n);if(t=t,!((o=o).minX>t.maxX||o.maxX<t.minX||o.minY>t.maxY||o.maxY<t.minY))return r=!1,CS(n,function(t){if(FS(e,t[0],t[1]))return!(r=!0)}),r?1:(CS(e,function(t){if(FS(n,t[0],t[1]))return!(r=!0)}),r||(i=IS(e),o=IS(n),a=!1,CS(o,function(t){if(DS(i,t))return!(a=!0)}),a))}}(GS(i),GS(a))){i.style.visibility="hidden",e=!0;break}}e||r.push(i)}return n};function VS(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const HS=t=>{const{maxIter:k=10,maxError:M=.1,padding:E=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,y]=VS(),[m,v]=VS();var a,o,s,c,[l,t]=VS(),[u,n]=VS();for(const b of i){var{min:r,max:h}=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,h]=h;y(b,g),v(b,g),t(b,h-g),n(b,[x,r])}for(let t=0;t<k;t++){i.sort((t,e)=>Mp(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var f=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,c]]=[u(f),u(e)],!(a<c&&s<o));)t+=1;if(e){const g=m(f);var d=l(f),p=m(e),d=p-(g+d);d<E&&(d=(E-d)/2,r=Math.max(r,d),v(f,g-d),v(e,p+d))}}if(r<M)break}for(const w of i)w.style.y+=m(w)-g(w)}return i}},YS=t=>{const{edgeDistance:i=0}=t;return(t,e)=>{if(d0(e)){var{x:n,width:r}=e.getOptions();const a=e.getCenter();e=eg(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=kb([n,r],a),r=kb([0,i],a),i=n[1]?n[0]*r[1]/n[1]+a[0]:e;t.style.connectorPoints=[[i-e,0]]})}return t}},qS=t=>(t,e)=>{if(d0(e)){const a=e.getCenter(),o=t.reduce((t,e)=>{var{x0:e,y0:n,offset:r=0}=e.style;return Math.max(t,Mb(a,[e,n])+r)},0);t.forEach(t=>{var{x0:e,y0:n,connector:r,connectorLength2:i=0}=t.style,e=Ob([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,US=1e-12,T=Math.PI,XS=T/2,$S=T/4,KS=2*T,ZS=180/T,JS=T/180,QS=Math.abs,t4=Math.atan,e4=Math.atan2,L=Math.cos,n4=Math.ceil,r4=Math.exp,i4=Math.log,a4=Math.pow,C=Math.sin,o4=Math.sign||function(t){return 0<t?1:t<0?-1:0},s4=Math.sqrt,c4=Math.tan;function l4(t){return 1<t?0:t<-1?T:Math.acos(t)}function u4(t){return 1<t?XS:t<-1?-XS:Math.asin(t)}function h4(){}function f4(t,e){t&&p4.hasOwnProperty(t.type)&&p4[t.type](t,e)}var d4={Feature:function(t,e){f4(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)f4(n[r].geometry,e)}},p4={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){y4(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)y4(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)f4(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 y4(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)g4(t[n],e,1);e.polygonEnd()}function m4(t,e){t&&d4.hasOwnProperty(t.type)?d4[t.type](t,e):f4(t,e)}function v4(t){return[e4(t[1],t[0]),u4(t[2])]}function b4(t){var e=t[0],t=t[1],n=L(t);return[n*L(e),n*C(e),C(t)]}function x4(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function w4(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 M4(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function E4(t){var e=s4(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function O4(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 S4(t,e){return[QS(t)>T?t+Math.round(-t/KS)*KS:t,e]}function _4(t,e,n){return(t%=KS)?e||n?O4(T4(t),P4(e,n)):T4(t):e||n?P4(e,n):S4}function A4(n){return function(t,e){return[T<(t+=n)?t-KS:t<-T?t+KS:t,e]}}function T4(t){var e=A4(t);return e.invert=A4(-t),e}function P4(t,e){var i=L(t),a=C(t),o=L(e),s=C(e);function n(t,e){var n=L(e),r=L(t)*n,t=C(t)*n,n=C(e),e=n*i+r*a;return[e4(t*o-e*s,r*i-n*a),u4(e*o+t*s)]}return n.invert=function(t,e){var n=L(e),r=L(t)*n,t=C(t)*n,n=C(e),e=n*o-t*s;return[e4(t*o+n*s,r*i+e*a),u4(e*i-r*a)]},n}function L4(t,e){(e=b4(e))[0]-=t,E4(e);t=l4(-e[1]);return((-e[2]<0?-t:t)+KS-P)%KS}function N4(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:h4,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function C4(t,e){return QS(t[0]-e[0])<P&&QS(t[1]-e[1])<P}function j4(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 R4(t,e,n,r,a){var o,i,s=[],c=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(C4(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 j4(r,t,null,!0)),c.push(n.o=new j4(r,null,n,!1)),s.push(n=new j4(i,t,null,!1)),c.push(n.o=new j4(i,null,n,!0))}}),s.length){for(c.sort(e),F4(s),F4(c),o=0,i=c.length;o<i;++o)c[o].e=n=!n;for(var l,u,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;l=f.z,a.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(o=0,i=l.length;o<i;++o)a.point((u=l[o])[0],u[1]);else r(f.x,f.n.x,1,a);f=f.n}else{if(d)for(l=f.p.z,o=l.length-1;0<=o;--o)a.point((u=l[o])[0],u[1]);else r(f.x,f.p.x,-1,a);f=f.p}}while(l=(f=f.o).z,d=!d,!f.v);a.lineEnd()}}}function F4(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 I4(t){return QS(t[0])<=T?t[0]:o4(t[0])*((QS(t[0])+T)%KS-T)}function D4(y,m,v,b){return function(s){var c,l,u,n=m(s),h=N4(),f=m(h),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=g,l=[],c=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,l=i0(l);var t=function(t,e){var n=I4(e),r=e[1],e=C(r),i=[C(n),-L(n),0],a=0,o=0,s=new Lp;1===e?r=XS+P:-1===e&&(r=-XS-P);for(var c=0,l=t.length;c<l;++c)if(h=(u=t[c]).length)for(var u,h,f=u[h-1],d=I4(f),p=f[1]/2+$S,g=C(p),y=L(p),m=0;m<h;++m,d=b,g=w,y=x,f=v){var v=u[m],b=I4(v),x=v[1]/2+$S,w=C(x),x=L(x),k=b-d,M=0<=k?1:-1,E=M*k,O=T<E,S=g*w;s.add(e4(S*M*C(E),y*x+S*L(E))),a+=O?k+M*KS:k,O^n<=d^n<=b&&(E4(S=w4(b4(f),b4(v))),E4(E=w4(i,S)),(M=(O^0<=k?-1:1)*u4(E[2]))<r||r===M&&(S[0]||S[1]))&&(o+=O^0<=k?1:-1)}return(a<-P||a<P&&s<-US)^1&o}(c,b);l.length?(d||(s.polygonStart(),d=!0),R4(l,G4,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),l=c=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]),f.point(t,e)}function o(){f.lineStart(),u=[]}function g(){p(u[0][0],u[0][1]),f.lineEnd();var t,e,n,r,i=f.clean(),a=h.result(),o=a.length;if(u.pop(),c.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())),l.push(a.filter(B4))}return e}}function B4(t){return 1<t.length}function G4(t,e){return((t=t.x)[0]<0?t[1]-XS-P:XS-t[1])-((e=e.x)[0]<0?e[1]-XS-P:XS-e[1])}S4.invert=S4;var z4=D4(function(){return 1},function(l){var u,h=NaN,f=NaN,d=NaN;return{lineStart:function(){l.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?T:-T,c=QS(t-h);QS(c-T)<P?(l.point(h,f=0<(f+e)/2?XS:-XS),l.point(d,f),l.lineEnd(),l.lineStart(),l.point(s,f),l.point(t,f),u=0):d!==s&&T<=c&&(QS(h-d)<P&&(h-=d*P),QS(t-s)<P&&(t-=s*P),c=f,i=e,o=C((n=h)-(r=t)),f=QS(o)>P?t4((C(c)*(a=L(i))*C(r)-C(i)*(r=L(c))*C(n))/(r*a*o)):(c+i)/2,l.point(d,f),l.lineEnd(),l.lineStart(),l.point(s,f),u=0),l.point(h=t,f=e),d=s},lineEnd:function(){l.lineEnd(),h=f=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*XS,r.point(-T,i),r.point(0,i),r.point(T,i),r.point(T,0),r.point(T,-i),r.point(0,-i),r.point(-T,-i),r.point(-T,0),r.point(-T,i)):QS(t[0]-e[0])>P?(t=t[0]<e[0]?T:-T,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-T,-XS]);function W4(d){var g=L(d),p=6*JS,h=0<g,f=QS(g)>P;function y(t,e){return L(t)*L(e)>g}function m(t,e,n){var r,i,a,o,s,c,l,u=[1,0,0],h=w4(b4(t),b4(e)),f=x4(h,h),d=h[0],p=f-d*d;return p?(r=w4(u,h),k4(u=M4(u,g*f/p),M4(h,-g*d/p)),(p=(h=x4(u,f=r))*h-(d=x4(f,f))*(x4(u,u)-1))<0?void 0:(k4(p=M4(f,(-h-(r=s4(p)))/d),u),p=v4(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(l=i,i=a,a=l),!(c=QS((s=a-i)-T)<P)&&e<o&&(l=o,o=e,e=l),(c||s<P?c?0<o+e^p[1]<(QS(p[0]-i)<P?o:e):o<=p[1]&&p[1]<=e:T<s^(i<=p[0]&&p[0]<=a))?(k4(l=M4(f,(-h+r)/d),u),[p,v4(l)]):void 0):p)):!n&&t}function v(t,e){var n=h?d:T-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return D4(y,function(a){var o,s,c,l,u;return{lineStart:function(){l=c=!1,u=1},point:function(t,e){var n,r=[t,e],i=y(t,e),t=h?i?0:v(t,e):i?v(t+(t<0?T:-T),e):0;!o&&(l=c=i)&&a.lineStart(),i===c||(n=m(o,r))&&!C4(o,n)&&!C4(r,n)||(r[2]=1),i!==c?(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):f&&o&&h^i&&(t&s||!(e=m(r,o,!0))||(u=0,h?(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&&C4(o,r)||a.point(r[0],r[1]),o=r,c=i,s=t},lineEnd:function(){c&&a.lineEnd(),o=null},clean:function(){return u|(l&&c)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var c=L(r),l=C(r),u=o*a;null==n?(n=r+o*KS,s=r-u/2):(n=L4(c,n),s=L4(c,s),(0<o?n<s:s<n)&&(n+=o*KS));for(var h,f=n;0<o?s<f:f<s;f-=u)h=v4([c,-l*L(f),-l*C(f)]),i.point(h[0],h[1])}},h?[0,-d]:[-T,d-T])}var V4=1e9,H4=-V4;function Y4(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 QS(t[0]-m)<P?0<e?0:3:QS(t[0]-b)<P?0<e?2:1:QS(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,h,a,o,s,c,l,u,f,d,p,g=r,t=N4(),e={point:n,lineStart:function(){e.point=y,h&&h.push(a=[]);d=!0,f=!1,l=u=NaN},lineEnd:function(){i&&(y(o,s),c&&f&&t.rejoin(),i.push(t.result()));e.point=n,f&&g.lineEnd()},polygonStart:function(){g=t,i=[],h=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=h.length;e<n;++e)for(var r,i,a=h[e],o=1,s=a.length,c=a[0],l=c[0],u=c[1];o<s;++o)r=l,i=u,c=a[o],l=c[0],u=c[1],i<=x?x<u&&(u-i)*(m-r)<(l-r)*(x-i)&&++t:u<=x&&(l-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=i0(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),k(null,null,1,r),r.lineEnd()),n&&R4(i,M,t,k,r),r.polygonEnd());g=r,i=h=a=null}};function n(t,e){w(t,e)&&g.point(t,e)}function y(t,e){var n,r,i=w(t,e);h&&a.push([t,e]),d?(o=t,s=e,d=!1,(c=i)&&(g.lineStart(),g.point(t,e))):i&&f?g.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],c=0,l=1,u=e[0]-o,h=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<c)return;n<l&&(l=n)}else if(0<u){if(l<n)return;c<n&&(c=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(l<n)return;c<n&&(c=n)}else if(0<u){if(n<c)return;n<l&&(l=n)}if(n=r-s,h||!(0<n)){if(n/=h,h<0){if(n<c)return;n<l&&(l=n)}else if(0<h){if(l<n)return;c<n&&(c=n)}if(n=a-s,h||!(n<0)){if(n/=h,h<0){if(l<n)return;c<n&&(c=n)}else if(0<h){if(n<c)return;n<l&&(l=n)}return 0<c&&(t[0]=o+c*u,t[1]=s+c*h),l<1&&(e[0]=o+l*u,e[1]=s+l*h),1}}}}}(n=[l=Math.max(H4,Math.min(V4,l)),u=Math.max(H4,Math.min(V4,u))],r=[t=Math.max(H4,Math.min(V4,t)),e=Math.max(H4,Math.min(V4,e))],m,v,b,x)?i&&(g.lineStart(),g.point(t,e),p=!1):(f||(g.lineStart(),g.point(n[0],n[1])),g.point(r[0],r[1]),i||g.lineEnd(),p=!1),l=t,u=e,f=i}return e}}function q4(t,e,n){var r=a0(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function U4(t,e,n){var r=a0(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function X4(){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:[f(a).concat(d(c).slice(1),f(i).reverse().slice(1),d(l).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],l=+t[0][1],c=+t[1][1],i<a&&(t=a,a=i,i=t),c<l&&(t=l,l=c,c=t),e.precision(v)):[[a,l],[i,c]]},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=q4(s,o,90),h=U4(r,n,v),f=q4(l,c,90),d=U4(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 a0(n4(a/y)*y,i,y).map(f).concat(a0(n4(l/m)*m,c,m).map(d)).concat(a0(n4(r/p)*p,n,p).filter(function(t){return QS(t%y)>P}).map(u)).concat(a0(n4(s/g)*g,o,g).filter(function(t){return QS(t%m)>P}).map(h))}var n,r,i,a,o,s,c,l,u,h,f,d,p,g,y,m,v}var $4,K4,Z4,J4,Q4=t=>t,t_=new Lp,e_=new Lp,n_={point:h4,lineStart:h4,lineEnd:h4,polygonStart:function(){n_.lineStart=r_,n_.lineEnd=o_},polygonEnd:function(){n_.lineStart=n_.lineEnd=n_.point=h4,t_.add(QS(e_)),e_=new Lp},result:function(){var t=t_/2;return t_=new Lp,t}};function r_(){n_.point=i_}function i_(t,e){n_.point=a_,$4=Z4=t,K4=J4=e}function a_(t,e){e_.add(J4*t-Z4*e),Z4=t,J4=e}function o_(){a_($4,K4)}var s_=n_,c_=1/0,l_=c_,u_=-c_,h_=u_;var f_,d_,p_,g_,y_={point:function(t,e){t<c_&&(c_=t);u_<t&&(u_=t);e<l_&&(l_=e);h_<e&&(h_=e)},lineStart:h4,lineEnd:h4,polygonStart:h4,polygonEnd:h4,result:function(){var t=[[c_,l_],[u_,h_]];return u_=h_=-(l_=c_=1/0),t}},m_=0,v_=0,b_=0,x_=0,w_=0,k_=0,M_=0,E_=0,O_=0,S_={point:__,lineStart:A_,lineEnd:L_,polygonStart:function(){S_.lineStart=N_,S_.lineEnd=C_},polygonEnd:function(){S_.point=__,S_.lineStart=A_,S_.lineEnd=L_},result:function(){var t=O_?[M_/O_,E_/O_]:k_?[x_/k_,w_/k_]:b_?[m_/b_,v_/b_]:[NaN,NaN];return m_=v_=b_=x_=w_=k_=M_=E_=O_=0,t}};function __(t,e){m_+=t,v_+=e,++b_}function A_(){S_.point=T_}function T_(t,e){S_.point=P_,__(p_=t,g_=e)}function P_(t,e){var n=t-p_,r=e-g_,n=s4(n*n+r*r);x_+=n*(p_+t)/2,w_+=n*(g_+e)/2,k_+=n,__(p_=t,g_=e)}function L_(){S_.point=__}function N_(){S_.point=j_}function C_(){R_(f_,d_)}function j_(t,e){S_.point=R_,__(f_=p_=t,d_=g_=e)}function R_(t,e){var n=t-p_,r=e-g_,n=s4(n*n+r*r);x_+=n*(p_+t)/2,w_+=n*(g_+e)/2,k_+=n,M_+=(n=g_*t-p_*e)*(p_+t),E_+=n*(g_+e),O_+=3*n,__(p_=t,g_=e)}var F_=S_;function I_(t){this._context=t}I_.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,KS)}},result:h4};var D_,B_,G_,z_,W_,V_=new Lp,H_={point:h4,lineStart:function(){H_.point=Y_},lineEnd:function(){D_&&q_(B_,G_),H_.point=h4},polygonStart:function(){D_=!0},polygonEnd:function(){D_=null},result:function(){var t=+V_;return V_=new Lp,t}};function Y_(t,e){H_.point=q_,B_=z_=t,G_=W_=e}function q_(t,e){z_-=t,W_-=e,V_.add(s4(z_*z_+W_*W_)),z_=t,W_=e}var U_=H_;function X_(){this._string=[]}function $_(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)),m4(t,r(i))),i.result()}return o.area=function(t){return m4(t,r(s_)),s_.result()},o.measure=function(t){return m4(t,r(U_)),U_.result()},o.bounds=function(t){return m4(t,r(y_)),y_.result()},o.centroid=function(t){return m4(t,r(F_)),F_.result()},o.projection=function(t){return arguments.length?(r=null==t?(e=null,Q4):(e=t).stream,o):e},o.context=function(t){return arguments.length?(i=null==t?(n=null,new X_):new I_(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 Z_(r){return function(t){var e,n=new J_;for(e in r)n[e]=r[e];return n.stream=t,n}}function J_(){}function Q_(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),m4(n,t.stream(y_)),e(y_.result()),null!=r&&t.clipExtent(r),t}function tA(i,a,t){return Q_(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 eA(t,e,n){return tA(t,[[0,0],e],n)}function nA(r,i,t){return Q_(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 rA(i,a,t){return Q_(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)}X_.prototype={_radius:4.5,_circle:$_(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=$_(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}},J_.prototype={constructor:J_,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 iA=16,aA=L(30*JS);function oA(t,e){return+e?(_=t,A=e,function(r){var n,i,a,o,s,c,l,u,h,f,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=_(t,e),r.point(t[0],t[1])}function e(){u=NaN,g.point=y,r.lineStart()}function y(t,e){var n=b4([t,e]),e=_(t,e);T(u,h,l,f,d,p,u=e[0],h=e[1],l=t,f=n[0],d=n[1],p=n[2],iA,r),r.point(u,h)}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=h,o=f,s=d,c=p,g.point=y}function x(){T(u,h,l,f,d,p,i,a,n,o,s,c,iA,r),g.lineEnd=m,m()}return g}):(n=t,Z_({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,_,A;function T(t,e,n,r,i,a,o,s,c,l,u,h,f,d){var p,g,y,m,v,b,x,w,k,M,E=o-t,O=s-e,S=E*E+O*O;4*A<S&&f--&&(y=a+h,x=u4(y/=m=s4((p=r+l)*p+(g=i+u)*g+y*y)),v=QS(QS(y)-1)<P||QS(n-c)<P?(n+c)/2:e4(g,p),b=(x=_(v,x))[0],x=x[1],A<(M=O*(w=b-t)-E*(k=x-e))*M/S||.3<QS((E*w+O*k)/S-.5)||r*l+i*u+a*h<aA)&&(T(t,e,n,r,i,a,b,x,v,p/=m,g/=m,y,f,d),d.point(b,x),T(b,x,v,p,g,y,o,s,c,l,u,h,f,d))}}var sA=Z_({point:function(t,e){this.stream.point(t*JS,e*JS)}});function cA(t,n,r,i,a,e){var o,s,c,l,u,h,f,d,p,g,y,m;return e?(h=L(e),e=C(e),f=h*t,d=e*t,p=h/t,g=e/t,y=(e*r-h*n)/t,m=(e*n+h*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,c=r,l=i,u=a,v.invert=function(t,e){return[(t-s)/o*l,(c-e)/o*u]},v);function v(t,e){return[s+o*(t*=l),c-o*(e*=u)]}function b(t,e){return[f*(t*=i)-d*(e*=a)+n,r-d*t-f*e]}}function lA(t){return uA(function(){return t})()}function uA(t){var e,r,n,i,a,o,s,c,l,u,h=150,f=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,x=1,w=1,k=null,M=z4,E=null,O=Q4,S=.5;function _(t){return c(t[0]*JS,t[1]*JS)}function A(t){return(t=c.invert(t[0],t[1]))&&[t[0]*ZS,t[1]*ZS]}function T(){var t=cA(h,0,0,x,w,b).apply(null,e(p,g)),t=cA(h,f-t[0],d-t[1],x,w,b);return r=_4(y,m,v),s=O4(e,t),c=O4(r,s),o=oA(s,S),P()}function P(){return l=u=null,_}return _.stream=function(t){return l&&u===t?l:l=sA((n=r,Z_({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(M(o(O(u=t))))));var n},_.preclip=function(t){return arguments.length?(M=t,k=void 0,P()):M},_.postclip=function(t){return arguments.length?(O=t,E=n=i=a=null,P()):O},_.clipAngle=function(t){return arguments.length?(M=+t?W4(k=t*JS):(k=null,z4),P()):k*ZS},_.clipExtent=function(t){return arguments.length?(O=null==t?(E=n=i=a=null,Q4):Y4(E=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),P()):null==E?null:[[E,n],[i,a]]},_.scale=function(t){return arguments.length?(h=+t,T()):h},_.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],T()):[f,d]},_.center=function(t){return arguments.length?(p=t[0]%360*JS,g=t[1]%360*JS,T()):[p*ZS,g*ZS]},_.rotate=function(t){return arguments.length?(y=t[0]%360*JS,m=t[1]%360*JS,v=2<t.length?t[2]%360*JS:0,T()):[y*ZS,m*ZS,v*ZS]},_.angle=function(t){return arguments.length?(b=t%360*JS,T()):b*ZS},_.reflectX=function(t){return arguments.length?(x=t?-1:1,T()):x<0},_.reflectY=function(t){return arguments.length?(w=t?-1:1,T()):w<0},_.precision=function(t){return arguments.length?(o=oA(s,S=t*t),P()):s4(S)},_.fitExtent=function(t,e){return tA(_,t,e)},_.fitSize=function(t,e){return eA(_,t,e)},_.fitWidth=function(t,e){return nA(_,t,e)},_.fitHeight=function(t,e){return rA(_,t,e)},function(){return e=t.apply(this,arguments),_.invert=e.invert&&A,T()}}function hA(t){var e=0,n=T/3,r=uA(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*JS,n=t[1]*JS):[e*ZS,n*ZS]},t}function fA(t,e){var n,r,i,a=C(t),o=(a+C(e))/2;return QS(o)<P?(n=L(t),s.invert=function(t,e){return[t/n,u4(e*n)]},s):(i=s4(r=1+a*(2*o-a))/o,c.invert=function(t,e){var e=i-e,n=e4(t,QS(e))*o4(e);return e*o<0&&(n-=T*o4(t)*o4(e)),[n/o,u4((r-(t*t+e*e)*o*o)/(2*o))]},c);function s(t,e){return[t*n,C(e)/n]}function c(t,e){e=s4(r-2*o*C(e))/o;return[e*C(t*=o),i-e*L(t)]}}function dA(){return hA(fA).scale(155.424).center([0,33.6442])}function pA(){return dA().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function gA(i){return function(t,e){var n=L(t),r=L(e),n=i(n*r);return n===1/0?[2,0]:[n*r*C(t),n*C(e)]}}function yA(a){return function(t,e){var n=s4(t*t+e*e),r=a(n),i=C(r),r=L(r);return[e4(t*i,n*r),u4(n&&e*i/n)]}}var mA=gA(function(t){return s4(2/(1+t))});mA.invert=yA(function(t){return 2*u4(t/2)});var vA=gA(function(t){return(t=l4(t))&&t/C(t)});function bA(t,e){return[t,i4(c4((XS+e)/2))]}function xA(r){var i,a,o,s=lA(r),e=s.center,c=s.scale,n=s.translate,l=s.clipExtent,u=null;function h(){var e,t=T*c(),n=s((e=_4((e=s.rotate())[0]*JS,e[1]*JS,2<e.length?e[2]*JS:0),function(t){return(t=e.invert(t[0]*JS,t[1]*JS))[0]*=ZS,t[1]*=ZS,t}([0,0])));return l(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===bA?[[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?(c(t),h):c)()},s.translate=function(t){return(arguments.length?(n(t),h):n)()},s.center=function(t){return(arguments.length?(e(t),h):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]),h()):null==u?null:[[u,i],[a,o]]},h()}function wA(t){return c4((XS+t)/2)}function kA(t,e){var n=L(t),i=t===e?C(t):i4(n/L(e))/i4(wA(e)/wA(t)),a=n*a4(wA(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=o4(i)*s4(t*t+e*e),r=e4(t,QS(e))*o4(e);return e*i<0&&(r-=T*o4(t)*o4(e)),[r/i,2*t4(a4(a/n,1/i))-XS]},r):bA;function r(t,e){0<a?e<-XS+P&&(e=-XS+P):XS-P<e&&(e=XS-P);e=a/a4(wA(e),i);return[e*C(i*t),a-e*L(i*t)]}}function MA(t,e){return[t,e]}function EA(t,e){var n=L(t),r=t===e?C(t):(n-L(e))/(e-t),i=n/r+t;return QS(r)<P?MA:(a.invert=function(t,e){var e=i-e,n=e4(t,QS(e))*o4(e);return e*r<0&&(n-=T*o4(t)*o4(e)),[n/r,i-o4(r)*s4(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*C(t),i-e*L(t)]}}vA.invert=yA(function(t){return t}),bA.invert=function(t,e){return[t,2*t4(r4(e))-XS]},MA.invert=MA;var OA=1.340264,SA=-.081106,_A=893e-6,AA=.003796,TA=s4(3)/2;function PA(t,e){var e=u4(TA*C(e)),n=e*e,r=n*n*n;return[t*L(e)/(TA*(OA+3*SA*n+r*(7*_A+9*AA*n))),e*(OA+SA*n+r*(_A+AA*n))]}function LA(t,e){var n=L(e),r=L(t)*n;return[n*C(t)/r,C(e)/r]}function NA(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 CA(t,e){return[L(e)*C(t),C(e)]}function jA(t,e){var n=L(e),r=1+L(t)*n;return[n*C(t)/r,C(e)/r]}function RA(t,e){return[i4(c4((XS+e)/2)),-t]}PA.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*(OA+SA*i+a*(_A+AA*i))-e)/(OA+3*SA*i+a*(7*_A+9*AA*i)))*r)*i*i,!(QS(n)<US));++o);return[TA*t*(OA+3*SA*i+a*(7*_A+9*AA*i))/L(r),u4(C(r)/TA)]},LA.invert=yA(t4),NA.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))),QS(a)>P&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},CA.invert=yA(u4),jA.invert=yA(function(t){return 2*t4(t)}),RA.invert=function(t,e){return[-e,2*t4(r4(t))-XS]};var FA=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=pA(),c=dA().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=dA().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function h(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 f(){return e=n=null,h}return h.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?c:.166<=n&&n<.234&&-.214<=r&&r<-.115?l:s).invert(t)},h.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),c.stream(t),l.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},h.precision=function(t){return arguments.length?(s.precision(t),c.precision(t),l.precision(t),f()):s.precision()},h.scale=function(t){return arguments.length?(s.scale(t),c.scale(.35*t),l.scale(t),h.translate(s.translate())):s.scale()},h.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=c.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=l.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),f()):s.translate()},h.fitExtent=function(t,e){return tA(h,t,e)},h.fitSize=function(t,e){return eA(h,t,e)},h.fitWidth=function(t,e){return nA(h,t,e)},h.fitHeight=function(t,e){return rA(h,t,e)},h.scale(1070)},geoAlbers:pA,geoAzimuthalEqualArea:function(){return lA(mA).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:mA,geoAzimuthalEquidistant:function(){return lA(vA).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:vA,geoConicConformal:function(){return hA(kA).scale(109.5).parallels([30,30])},geoConicConformalRaw:kA,geoConicEqualArea:dA,geoConicEqualAreaRaw:fA,geoConicEquidistant:function(){return hA(EA).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:EA,geoEqualEarth:function(){return lA(PA).scale(177.158)},geoEqualEarthRaw:PA,geoEquirectangular:function(){return lA(MA).scale(152.63)},geoEquirectangularRaw:MA,geoGnomonic:function(){return lA(LA).scale(144.049).clipAngle(60)},geoGnomonicRaw:LA,geoIdentity:function(){var r,i,e,n,a,o,s,c=1,l=0,u=0,h=1,f=1,d=0,p=null,g=1,y=1,m=Z_({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=Q4;function b(){return g=c*h,y=c*f,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+l,t+u]}return x.invert=function(t){var e,n=t[0]-l,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,Q4):Y4(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?(c=+t,b()):c},x.translate=function(t){return arguments.length?(l=+t[0],u=+t[1],b()):[l,u]},x.angle=function(t){return arguments.length?(i=C(d=t%360*JS),r=L(d),b()):d*ZS},x.reflectX=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.reflectY=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.fitExtent=function(t,e){return tA(x,t,e)},x.fitSize=function(t,e){return eA(x,t,e)},x.fitWidth=function(t,e){return nA(x,t,e)},x.fitHeight=function(t,e){return rA(x,t,e)},x},geoProjection:lA,geoProjectionMutator:uA,geoMercator:function(){return xA(bA).scale(961/KS)},geoMercatorRaw:bA,geoNaturalEarth1:function(){return lA(NA).scale(175.295)},geoNaturalEarth1Raw:NA,geoOrthographic:function(){return lA(CA).scale(249.5).clipAngle(90+P)},geoOrthographicRaw:CA,geoStereographic:function(){return lA(jA).scale(250).clipAngle(142)},geoStereographicRaw:jA,geoTransverseMercator:function(){var t=xA(RA),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:RA});function IA(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 DA(t,e,n,r){var i,a,o,s,c,l,{outline:e=(e=e.filter(GA),e.find(t=>t.sphere)?{type:"Sphere"}:IA(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:l,y:c,width:a,height:s}=l=n,i.fitExtent([[l,c],[a,s]],o)):"fitWidth"===r&&(i=t,l=e,{width:c,height:a}=c=n,[[c,l],[s,o]]=K_(i.fitWidth(c,l)).bounds(l),o=Math.ceil(o-l),l=Math.min(Math.ceil(s-c),o),s=i.scale()*(l-1)/l,[c,l]=i.translate(),l+=(a-o)/2,i.scale(s).translate([c,l]).precision(.2))}function BA(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:[X4()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function GA(t){return"geoPath"===t.type}var zA,i=()=>t=>{var{children:e,projection:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,f=Z(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Cf(t);if(e=FA[e])return e;throw new Error("Unknown projection: "+t)}(r),p=e.map(BA);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,c={x:t,y:e,width:n,height:r},l=(DA(i,p,c,f),i),c=f;for([o,s]of Object.entries(c))null!=(a=l[o])&&a.call(l,s);g=K_(i);const u=new Dm({domain:[t,t+n]}),h=new Dm({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),h.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),h.invert(e)],i.invert(t)):null;var e}}}]]}}],children:p.flatMap(t=>{return GA(t)?(e=t.style,Object.assign(Object.assign({},t),{type:"path",style:Object.assign(Object.assign({},e),{d:t=>g(t)})})):t;var e})})]},Ec=(i.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}]})]});Ec.props={};const WA={"composition.geoView":i,"composition.geoPath":Ec};function VA(){return Object.assign({"data.fetch":E1,"data.inline":N1,"data.sortBy":L1,"data.filter":S1,"data.pick":T1,"data.rename":P1,"data.subset":A1,"data.fold":O1,"data.custom":C1,"data.map":j1,"data.cluster":l1,"data.tree":u1,"data.sankey":$0,"data.arc":D1,"data.wordCloud":iy,"data.join":oy,"transform.maybeZeroY1":x3,"transform.maybeZeroX":j3,"transform.maybeStackY":N3,"transform.maybeTitle":C3,"transform.maybeSeries":D3,"transform.maybeZeroPadding":H3,"transform.stackY":P3,"transform.binX":zO,"transform.bin":GO,"transform.dodgeX":$3,"transform.jitter":tO,"transform.jitterX":eO,"transform.symmetryY":nO,"transform.diffY":rO,"transform.stackEnter":K3,"transform.normalizeY":Z3,"transform.select":cO,"transform.selectX":pO,"transform.selectY":gO,"transform.groupX":_O,"transform.groupY":AO,"transform.groupColor":TO,"transform.group":SO,"transform.maybeSize":F3,"transform.maybeZeroY":R3,"transform.maybeKey":I3,"transform.sortX":NO,"transform.sortY":jO,"transform.sortColor":CO,"transform.flexX":RO,"transform.maybeTupleY":B3,"transform.maybeTupleX":G3,"transform.maybeIdentityY":z3,"transform.maybeIdentityX":W3,"transform.maybeTuple":U3,"transform.maybeVisualPosition":Y3,"transform.maybeFunctionAttribute":q3,"transform.maybeGradient":X3,"transform.maybeTooltip":V3,"transform.pack":IO,"transform.sample":WO,"coordinate.cartesian":Yf,"coordinate.polar":qf,"coordinate.helix":Uf,"coordinate.transpose":Xf,"coordinate.theta":Jf,"coordinate.reflect":$f,"coordinate.reflectX":Kf,"coordinate.reflectY":Zf,"coordinate.parallel":td,"coordinate.fisheye":ed,"coordinate.fisheyeX":nd,"coordinate.fisheyeY":rd,"coordinate.radial":Qf,"encode.constant":id,"encode.field":od,"encode.transform":ad,"encode.column":sd,"mark.interval":wp,"mark.rect":kp,"mark.line":y0,"mark.point":m0,"mark.text":v0,"mark.cell":b0,"mark.area":x0,"mark.link":w0,"mark.image":k0,"mark.polygon":M0,"mark.box":E0,"mark.vector":O0,"mark.lineX":_0,"mark.lineY":S0,"mark.connector":A0,"mark.range":L0,"mark.rangeX":N0,"mark.rangeY":C0,"mark.sankey":ng,"mark.path":rg,"mark.treemap":cg,"mark.pack":lg,"mark.boxplot":vg,"mark.shape":bg,"mark.forceGraph":s1,"mark.tree":h1,"mark.wordCloud":sy,"palette.category10":cy,"palette.category20":ly,"palette.sequentialBlue":uy,"palette.sequentialDarkBlue":hy,"palette.sequentialGreen":fy,"palette.sequentialDarkGreen":dy,"palette.sequentialGrey":py,"palette.sequentialOrange":gy,"palette.sequentialPink":yy,"palette.sequentialRed":my,"palette.sequentialYellow":vy,"palette.sequentialPurple":by,"palette.sequentialYellowOrange":xy,"palette.sequentialYellowGreen":wy,"palette.sequentialPinkPurple":ky,"palette.sequentialGreenBlue":My,"palette.divergingGreenYellow":Ey,"palette.divergingRedBlue":Oy,"palette.divergingGreenRed":Sy,"palette.divergingRedPurple":_y,"scale.linear":hv,"scale.ordinal":fv,"scale.band":uv,"scale.identity":dv,"scale.point":pv,"scale.time":gv,"scale.log":yv,"scale.pow":mv,"scale.sqrt":wv,"scale.threshold":vv,"scale.quantile":bv,"scale.quantize":xv,"scale.sequential":kv,"shape.interval.rect":Bb,"shape.interval.hollow":Gb,"shape.interval.funnel":zb,"shape.interval.pyramid":Vb,"shape.rect.rect":Bb,"shape.rect.hollow":Gb,"shape.cell.cell":Bb,"shape.cell.hollow":Gb,"shape.line.line":Ub,"shape.line.hv":$b,"shape.line.vh":Kb,"shape.line.hvh":Zb,"shape.line.smooth":Xb,"shape.point.bowtie":e2,"shape.point.cross":n2,"shape.point.diamond":r2,"shape.point.hexagon":i2,"shape.point.hollowBowtie":a2,"shape.point.hollowDiamond":o2,"shape.point.hollowHexagon":s2,"shape.point.hollow":c2,"shape.point.hollowSquare":l2,"shape.point.hollowTriangle":u2,"shape.point.hollowTriangleDown":h2,"shape.point.hyphen":f2,"shape.point.line":d2,"shape.point.plus":p2,"shape.point.point":g2,"shape.point.square":y2,"shape.point.tick":m2,"shape.point.triangle":v2,"shape.point.triangleDown":b2,"shape.text.text":L5,"shape.area.area":F5,"shape.area.smooth":I5,"shape.area.step":D5,"shape.link.smooth":G5,"shape.link.vhv":z5,"shape.link.arc":W5,"shape.link.link":B5,"shape.image.image":V5,"shape.polygon.polygon":H5,"shape.polygon.ribbon":Y5,"shape.box.box":q5,"shape.vector.vector":x2,"shape.label.label":aM,"shape.text.badge":C5,"shape.lineX.line":U5,"shape.lineY.line":U5,"shape.shape.shape":lM,"shape.connector.connector":K5,"shape.range.range":Bb,"shape.rangeX.range":Bb,"shape.rangeY.range":Bb,"shape.path.path":sM,"shape.path.hollow":cM,"theme.light":hM,"theme.dark":pM,"component.axisX":FM,"component.axisY":IM,"component.legendCategory":DM,"component.legendContinuous":BM,"component.title":zM,"animation.scaleInX":UM,"animation.scaleOutX":XM,"animation.scaleInY":$M,"animation.scaleOutY":KM,"animation.waveIn":iE,"animation.fadeIn":ZM,"animation.fadeOut":JM,"animation.zoomIn":aE,"animation.zoomOut":oE,"animation.pathIn":sE,"animation.morphing":rE,"animation.growInX":cE,"animation.growInY":lE,"interaction.elementHighlight":wE,"interaction.elementHighlightByX":kE,"interaction.elementHighlightByColor":ME,"interaction.elementSelect":OE,"interaction.elementSelectByX":SE,"interaction.elementSelectByColor":_E,"interaction.fisheye":TE,"interaction.chartIndex":AE,"interaction.tooltip":BE,"composition.spaceLayer":VE,"composition.spaceFlex":HE,"composition.mark":qE,"composition.view":YE,"composition.facetRect":n3,"composition.repeatMatrix":o3,"composition.facetCircle":f3,"composition.timingKeyframe":d3,"labelTransform.hideOverlap":WS,"labelTransform.dodgeY":HS,"labelTransform.spider":YS,"labelTransform.surround":qS},WA)}function HA(t,e,...n){t&&(t[e]||[]).forEach(t=>{t.apply(this,n)})}function YA(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||Z0("Unknown Component: "+t)};return[t=>{var e=t["type"],t=Z(t,["type"]);return r(e)(Object.assign({},t))},r]}function c(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}(uo=zA=zA||{}).BEFORE_RENDER="beforerender",uo.AFTER_RENDER="afterrender",uo.BEFORE_PAINT="beforepaint",uo.AFTER_PAINT="afterpaint",uo.BEFORE_CHANGE_DATA="beforechangedata",uo.AFTER_CHANGE_DATA="afterchangedata",uo.BEFORE_CLEAR="beforeclear",uo.AFTER_CLEAR="afterclear",uo.BEFORE_DESTROY="beforedestroy",uo.AFTER_DESTROY="afterdestroy",uo.BEFORE_CHANGE_SIZE="beforechangesize",uo.AFTER_CHANGE_SIZE="afterchangesize";ho=c("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),oo=c("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),tl=c("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),fo=c("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),yo=c("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),n=c("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Jc=c("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Qc=c("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),e=c("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Kc=c("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function qA(t,e,n){(t.prototype=e.prototype=n).constructor=t}function UA(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function XA(){}var $A=1/.7,po="\\s*([+-]?\\d+)\\s*",mo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",KA=/^#([0-9a-f]{3,8})$/,ZA=new RegExp(`^rgb\\(${po},${po},${po}\\)$`),JA=new RegExp(`^rgb\\(${vo},${vo},${vo}\\)$`),QA=new RegExp(`^rgba\\(${po},${po},${po},${mo}\\)$`),t6=new RegExp(`^rgba\\(${vo},${vo},${vo},${mo}\\)$`),e6=new RegExp(`^hsl\\(${mo},${vo},${vo}\\)$`),n6=new RegExp(`^hsla\\(${mo},${vo},${vo},${mo}\\)$`),r6={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 i6(){return this.rgb().formatHex()}function a6(){return this.rgb().formatRgb()}function o6(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=KA.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?s6(e):3===n?new h6(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?c6(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?c6(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=ZA.exec(t))?new h6(e[1],e[2],e[3],1):(e=JA.exec(t))?new h6(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=QA.exec(t))?c6(e[1],e[2],e[3],e[4]):(e=t6.exec(t))?c6(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=e6.exec(t))?m6(e[1],e[2]/100,e[3]/100,1):(e=n6.exec(t))?m6(e[1],e[2]/100,e[3]/100,e[4]):r6.hasOwnProperty(t)?s6(r6[t]):"transparent"===t?new h6(NaN,NaN,NaN,0):null}function s6(t){return new h6(t>>16&255,t>>8&255,255&t,1)}function c6(t,e,n,r){return new h6(t=r<=0?e=n=NaN:t,e,n,r)}function l6(t){return(t=t instanceof XA?t:o6(t))?new h6((t=t.rgb()).r,t.g,t.b,t.opacity):new h6}function u6(t,e,n,r){return 1===arguments.length?l6(t):new h6(t,e,n,null==r?1:r)}function h6(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function f6(){return"#"+y6(this.r)+y6(this.g)+y6(this.b)}function d6(){var t=p6(this.opacity);return(1===t?"rgb(":"rgba(")+g6(this.r)+`, ${g6(this.g)}, `+g6(this.b)+(1===t?")":`, ${t})`)}function p6(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 y6(t){return((t=g6(t))<16?"0":"")+t.toString(16)}function m6(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new b6(t,e,n,r)}function v6(t){var e,n,r,i,a,o,s,c;return t instanceof b6?new b6(t.h,t.s,t.l,t.opacity):(t=t instanceof XA?t:o6(t))?t instanceof b6?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,c=((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/=c<.5?a+i:2-a-i,o*=60):s=0<c&&c<1?0:o,new b6(o,s,c,t.opacity)):new b6}function b6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function x6(t){return(t=(t||0)%360)<0?t+360:t}function w6(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)}qA(XA,o6,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:i6,formatHex:i6,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return v6(this).formatHsl()},formatRgb:a6,toString:a6}),qA(h6,u6,UA(XA,{brighter(t){return t=null==t?$A:Math.pow($A,t),new h6(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new h6(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new h6(g6(this.r),g6(this.g),g6(this.b),p6(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:f6,formatHex:f6,formatHex8:function(){return"#"+y6(this.r)+y6(this.g)+y6(this.b)+y6(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:d6,toString:d6})),qA(b6,function(t,e,n,r){return 1===arguments.length?v6(t):new b6(t,e,n,null==r?1:r)},UA(XA,{brighter(t){return t=null==t?$A:Math.pow($A,t),new b6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new b6(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 h6(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 b6(x6(this.h),w6(this.s),w6(this.l),p6(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=p6(this.opacity);return(1===t?"hsl(":"hsla(")+x6(this.h)+`, ${100*w6(this.s)}%, ${100*w6(this.l)}%`+(1===t?")":`, ${t})`)}}));const M6=Math.PI/180,E6=180/Math.PI;var O6=1.78277,S6=-.29227,_6=-.90649,A6=1.97294,T6=A6*_6,P6=A6*O6,L6=O6*S6- -.14861*_6;function N6(t,e,n,r){return 1===arguments.length?(i=t)instanceof C6?new C6(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof h6?i:l6(i)).r/255,o=i.g/255,c=i.b/255,c=(A6*(o-(a=(L6*c+T6*a-P6*o)/(L6+T6-P6)))-S6*(o=c-a))/_6,new C6((c=(s=Math.sqrt(c*c+o*o)/(A6*a*(1-a)))?Math.atan2(c,o)*E6-120:NaN)<0?c+360:c,s,a,i.opacity)):new C6(t,e,n,null==r?1:r);var i,a,o,s,c}function C6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}qA(C6,N6,UA(XA,{brighter(t){return t=null==t?$A:Math.pow($A,t),new C6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new C6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*M6,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new h6(255*(e+n*(-.14861*r+O6*t)),255*(e+n*(S6*r+_6*t)),255*(e+A6*r*n),this.opacity)}}));var j6=t=>()=>t;function R6(e,n){return function(t){return e+t*n}}function F6(a){return 1==(a=+a)?I6: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)}):j6(isNaN(t)?e:t);var n,r,i}}function I6(t,e){var n=e-t;return n?R6(t,n):j6(isNaN(t)?e:t)}!function t(e){var o=F6(e);function n(e,t){var n=o((e=u6(e)).r,(t=u6(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=I6(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);D6=function(s){var c=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?c-(t=1):Math.floor(t*c),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<c-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/c)*c)+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 D6,B6=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=u6(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=D6(r),i=D6(i),a=D6(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function G6(s){return function t(o){function e(e,t){var n=s((e=N6(e)).h,(t=N6(t)).h),r=I6(e.s,t.s),i=I6(e.l,t.l),a=I6(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)}G6(function(t,e){var n=e-t;return n?R6(t,180<n||n<-180?n-360*Math.round(n/360):n):j6(isNaN(t)?e:t)});var bo=G6(I6),wo=t=>B6(t[t.length-1]),xo=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(c),ko=wo(xo),a=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(c),$c=wo(a),Mo=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(c),Fn=wo(Mo),go=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(c),Ko=wo(go),Zc=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(c),sl=wo(Zc),fl=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(c),ol=wo(fl),rl=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(c),el=wo(rl),Mc=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(c),Eo=wo(Mc),rw=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(c),Ao=wo(rw),i=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(c),Ec=wo(i),uo=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(c),po=wo(uo),vo=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(c),mo=wo(vo),z6=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(c),W6=wo(z6),V6=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(c),H6=wo(V6),Y6=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(c),q6=wo(Y6),U6=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(c),X6=wo(U6),$6=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(c),K6=wo($6),Z6=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(c),J6=wo(Z6),Q6=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(c),tT=wo(Q6),eT=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(c),nT=wo(eT),rT=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(c),iT=wo(rT),aT=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(c),oT=wo(aT),sT=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(c),cT=wo(sT),lT=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(c),uT=wo(lT),hT=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(c),fT=wo(hT),dT=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(c),pT=wo(dT),gT=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(c),wo=wo(gT);var yT=bo(N6(300,.5,0),N6(-240,.5,1)),mT=bo(N6(-100,.75,.35),N6(80,1.5,.8)),bo=bo(N6(260,.75,.35),N6(80,1.5,.8)),vT=N6();var bT=u6(),xT=Math.PI/3,wT=2*Math.PI/3;function kT(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var MT=kT(c("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),ET=kT(c("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),OT=kT(c("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ST=kT(c("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),_T=Object.freeze({__proto__:null,schemeCategory10:ho,schemeAccent:oo,schemeDark2:tl,schemePaired:fo,schemePastel1:yo,schemePastel2:n,schemeSet1:Jc,schemeSet2:Qc,schemeSet3:e,schemeTableau10:Kc,interpolateBrBG:ko,schemeBrBG:xo,interpolatePRGn:$c,schemePRGn:a,interpolatePiYG:Fn,schemePiYG:Mo,interpolatePuOr:Ko,schemePuOr:go,interpolateRdBu:sl,schemeRdBu:Zc,interpolateRdGy:ol,schemeRdGy:fl,interpolateRdYlBu:el,schemeRdYlBu:rl,interpolateRdYlGn:Eo,schemeRdYlGn:Mc,interpolateSpectral:Ao,schemeSpectral:rw,interpolateBuGn:Ec,schemeBuGn:i,interpolateBuPu:po,schemeBuPu:uo,interpolateGnBu:mo,schemeGnBu:vo,interpolateOrRd:W6,schemeOrRd:z6,interpolatePuBuGn:H6,schemePuBuGn:V6,interpolatePuBu:q6,schemePuBu:Y6,interpolatePuRd:X6,schemePuRd:U6,interpolateRdPu:K6,schemeRdPu:$6,interpolateYlGnBu:J6,schemeYlGnBu:Z6,interpolateYlGn:tT,schemeYlGn:Q6,interpolateYlOrBr:nT,schemeYlOrBr:eT,interpolateYlOrRd:iT,schemeYlOrRd:rT,interpolateBlues:oT,schemeBlues:aT,interpolateGreens:cT,schemeGreens:sT,interpolateGreys:uT,schemeGreys:lT,interpolatePurples:fT,schemePurples:hT,interpolateReds:pT,schemeReds:dT,interpolateOranges:wo,schemeOranges:gT,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:yT,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return vT.h=360*t-100,vT.s=1.5-1.5*e,vT.l=.8-.9*e,vT+""},interpolateWarm:mT,interpolateCool:bo,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,bT.r=255*(e=Math.sin(t))*e,bT.g=255*(e=Math.sin(t+xT))*e,bT.b=255*(e=Math.sin(t+wT))*e,bT+""},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:MT,interpolateMagma:ET,interpolateInferno:OT,interpolatePlasma:ST});function AT(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function TT(t,e,n,r,i){var a=t[0],t=t[1],o=ct();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 PT(t,e,n,r,i){var a=new Dm({range:[e,e+r]}),o=new Dm({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 LT(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function NT(t,e,n,r,i){return t[0]}function CT(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],c=new Dm({range:[s,t]}),l=new Dm({range:[a,o]}),u=1<(s=i/r)?1:s,h=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=l.map(e),t=c.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*h)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/h,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=AT(Math.atan2(t,e),a,o);return[l.invert(t),c.invert(n)]}}}function jT(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 RT(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return zT.apply(void 0,WT([[-1,-1]],e,!1))}function FT(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return zT.apply(void 0,WT([[-1,1]],e,!1))}function IT(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return zT.apply(void 0,WT([[1,-1]],e,!1))}function DT(t,e,n,r,i){var a,t=t[0],o=ct();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 BT(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],c=(t[3]-s)/(+o/(2*Math.PI)+1),l=c/(2*Math.PI),u=new Dm({range:[s,s+.99*c]}),h=new Dm({range:[a,o]}),f=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=h.map(e),t=u.map(t);return[.5*(Math.cos(e)*(l*e+t)*f)+.5,.5*(Math.sin(e)*(l*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/f,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=AT(Math.atan2(t,e)+Math.floor(n/c)*Math.PI*2,a,o),e=n-l*t;return[h.invert(t),u.invert(e)]}}}function GT(t,e,n,r,i){var s=t[0],c=t[1],a=t[2],t=t[3],l=new Dm({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new Bm({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,c]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=l.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(l.invert(r))}return e}}}var zT=function(t,e,n,r,i){var a=t[0],t=t[1],o=ct();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},WT=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 VT(t){return 1/Math.tan(t)}function HT(t,e,n,r,i){var a=VT(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 YT(t,e,n,r,i){var a=VT(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 qT(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 UT(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 XT(t,e,n){return n?new Dm({range:[0,1],domain:[0,e]}).map(t):t}function $T(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=XT(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[qT(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[UT(e,s,o,0,1),t]}}}function KT(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=XT(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],qT(t[1],s,o,0,1)]},untransform:function(t){return[t[0],UT(t[1],s,o,0,1)]}}}function ZT(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],c=t[3],t=t[4],l=XT(a,r,t=void 0!==t&&t),u=XT(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[qT(e,l,s,0,1),qT(t,u,c,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[UT(e,l,s,0,1),UT(t,u,c,0,1)]}}}function JT(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],c=t[3],t=void 0!==(t=t[4])&&t,l=new Dm({range:[0,r]}),u=new Dm({range:[0,i]}),h=t?a:l.map(a),f=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=l.map(e)-h,r=u.map(t)-f,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=qT(i,0,c,0,s),t=Math.atan2(r,n),i=h+e*Math.cos(t),r=f+e*Math.sin(t),[l.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=l.map(e)-h,r=u.map(t)-f,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=UT(i,0,c,0,s),t=Math.atan2(r,n),i=h+e*Math.cos(t),r=f+e*Math.sin(t),[l.invert(i),u.invert(r)])}}}var QT=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))},tP=(eP.prototype.update=function(t){this.options=R({},this.options,t),this.recoordinate()},eP.prototype.clone=function(){return new eP(this.options)},eP.prototype.getOptions=function(){return this.options},eP.prototype.clear=function(){this.update({transformations:[]})},eP.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},eP.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},eP.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:QT(QT([],n,!0),[QT([],t,!0)],!1)}),this},eP.prototype.map=function(t){return this.output(t)},eP.prototype.invert=function(t){return this.input(t)},eP.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},eP.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?QT([],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 c,l,u,h,f=s[o],d=f[0],f=f.slice(1),p=this.transformers[d];p&&(c=(h=this.options).x,l=h.y,u=h.width,h=h.height,p=p(QT([],f,!0),c,l,u,h),(f=p)instanceof Float32Array||f instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||zf,"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):zf}.apply(void 0,a)},eP.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,c,l,u,h,f,d,p=ct();return e&&t.reverse(),t.forEach(function(t){return lt(p,p,t)}),e&&(e=t=p,(d=new st(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],c=e[7],l=(e=e[8])*a-o*c,f=d*l+n*(u=-e*i+o*s)+r*(h=c*i-a*s))&&(t[0]=l*(f=1/f),t[1]=(-e*n+r*c)*f,t[2]=(o*n-r*a)*f,t[3]=u*f,t[4]=(e*d-r*s)*f,t[5]=(-o*d+r*i)*f,t[6]=h*f,t[7]=(-c*d+n*s)*f,t[8]=(a*d-n*i)*f),function(t){t=[t[0],t[1],1];return $t(t,t,p),[t[0],t[1]]}},eP);function eP(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:PT,translate:TT,custom:LT,matrix:NT,polar:CT,transpose:jT,scale:zT,"shear.x":HT,"shear.y":YT,reflect:RT,"reflect.x":FT,"reflect.y":IT,rotate:DT,helix:BT,parallel:GT,fisheye:ZT,"fisheye.x":$T,"fisheye.y":KT,"fisheye.circular":JT},this.update(t)}function nP(t){return void 0!==t.find(t=>"polar"===t.type)}function rP(t){return void 0!==t.find(t=>"helix"===t.type)}function iP(t){return t.filter(({type:t})=>"transpose"===t).length%2==1}function aP(t){return void 0!==t.find(t=>"theta"===t.type)}function oP(t){return void 0!==t.find(t=>"radial"===t.type)}function sP(t,e,n,r,i,a){var o,{guide:s={}}=n,c=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?fP(t):void 0===r?gP(e)?fP(t):yP(e)?"time":dP(t,i):gP([r])?fP(t):yP(e)?"time":dP(t,i)}(t,e,n);return"string"!=typeof c?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)Q0(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 pP(e);case"quantile":return function(t){return pP(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)Q0(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[]}}(c,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=gm,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:aP(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=Cf(e),i=_T["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(c,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:c,rangeMax:l}=r;switch(t){case"linear":case"time":case"log":case"sqrt":var u=hP(n,r,i,a,o),[u,h]=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[c||u,l||h];case"band":case"point":return[c||0,l||1];case"ordinal":return hP(n,r,i,a,o);case"sequential":return;default:return[]}}(c,t,e,n,o,i,a),guide:s,name:t,type:c}))}function cP(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(lP)?Pp(e):t.every(uP)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function lP(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function uP(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function hP(t,e,n,r,i){var[i]=YA("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=Cf(t),i=_T["scheme"+e],a=_T["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 fP(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function dP(t,e){return"color"!==t||e?"linear":"sequential"}function pP(t){return Array.from(new Set(t.flat()))}function gP(t){return mP(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function yP(t){return mP(t,t=>t instanceof Date)}function mP(t,e){for(const n of t)if(n.some(e))return!0;return!1}function vP(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 bP(t,i,a){return Ee(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=YA("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=>Ee(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),K0)}([Z(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?Tb(n):[],Object.assign(Object.assign({},i),{data:n})]})}function xP(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 wP(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=Ab(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date)return;t=t.type;return Q0(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 kP(t,e,n){var r=e["encode"];return r?(r=Ab(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 MP(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=YA("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=Ab(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function EP(c,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(c.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(c).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]),[c,Object.assign(Object.assign({},i),{encode:r})]):[c,t]}function OP(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 R(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 SP(t,e,n){var r=e["animate"];return r||void 0===r||R(e,{animate:{enterType:null,exitType:null,updateType:null}}),[t,e]}function _P(s,c,l){return Ee(this,void 0,void 0,function*(){var[t,e]=yield function(s,c,l){return Ee(this,void 0,void 0,function*(){var t=l["library"],[t]=YA("transform",t),{preInference:e=[],postInference:n=[]}=c,{transform:r=[]}=s,e=[vP,bP,xP,wP,kP,MP,EP,SP,OP,...e.map(t),...r.map(t),...n.map(t)];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,l);return[i,a]})}(s,c,{library:l});const{encode:n,scale:u,data:r}=e;if(!1===Array.isArray(r))return null;const i=c["channels"],a=Ip(Object.entries(n).filter(([,t])=>Q0(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:c,range:l}=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=c||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:l},i)}})});return[e,Object.assign(Object.assign({},c),{index:t,channels:o})]})}function AP(t,e,n){var r,{component:e=[],coordinates:i=[],title:a,theme:o}=e,[,s]=YA("component",n),n=t.filter(({guide:t})=>null!==t),c=[...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)}(R({size:r},o,r="string"==typeof a?{text:a}:a)),c.push(Object.assign({type:"title",position:e,order:t,size:o},r)));for(const b of n){var l=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 iP(e)&&nP(e)||rP(e)||aP(e)?null:t.startsWith("x")?iP(e)?"axisY":"axisX":t.startsWith("y")?iP(e)?"axisX":"axisY":t.startsWith("position")&&!nP(e)?"axisY":null}(b,i);if(null!==l){var u=s(l)["props"],{defaultPosition:h,defaultSize:f,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],iP(i)?0==t?"top":"centerVertical":0==t?n:"centerHorizontal");if("axisX"===e&&nP(i)&&!iP(i)||"axisY"===e&&nP(i)&&iP(i)||"axisY"===e&&aP(i)||"axisY"===e&&rP(i)||"axisY"===e&&oP(i))return"bottom"===r.position?"arcInner":"arc";if(nP(i)&&("axisX"===e||"axisY"===e))return"arcY";if(oP(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")&&nP(i)&&"center"===r.position)return"arcCenter"}return n}(p,l,h,x,i),{size:m=f,order:v=d}=x;c.push(Object.assign(Object.assign({title:g},x),{position:y,order:v,size:m,type:l,scale:b}))}}}return c}function TP(t,e,n,r){var[i]=YA("scale",r),[r]=YA("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 PP(t,e){var t=function(t,e){var n=Rp(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 c of["left","right","top","bottom"]){var o="padding"+function(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}(c);if(void 0===a[o])if(n.has(c)){const t=n.get(c);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:c=0,inset:l=0,insetLeft:u=l,insetTop:h=l,insetBottom:f=l,insetRight:l=l,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:h,insetBottom:f,insetRight:l,innerWidth:e-n-r-p-d,innerHeight:o-i-a-y-g,marginLeft:p,marginBottom:g,marginTop:y,marginRight:d,x:s,y:c})}function LP(t,e,n){var F=Rp(t,t=>t.position),{paddingLeft:t,paddingRight:n,paddingTop:r,paddingBottom:I,marginLeft:i,marginTop:a,marginBottom:D,marginRight:B,innerHeight:o,innerWidth:s,height:G,width:z}=n,t=t+i,i=r+a,r=n+B,a=I+D,W={top:[t,0,s,i,0,!0,Mp],right:[z-r,i,r,o,1,!1,Mp],bottom:[t,G-a,s,a,0,!1,Mp],left:[0,i,t,o,1,!0,Mp],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[R,t]of F.entries()){var c=W[R];if("centerHorizontal"===R)!function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),c=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var l=e[t];const r=c[t];var u=c[t+1]-r;l.bbox={x:r,y:i,width:u,height:a}}}(t,e,c);else if("centerVertical"===R)!function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),c=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var l=e[t];const i=c[t];var u=c[t+1]-i;l.bbox={x:r,y:i,width:a,height:u}}}(t,e,c);else if("arc"===R){p=d=f=h=u=l=void 0;var l=t,u=c,[h,f,d,p]=u;for(let t=0;t<l.length;t++)l[t].bbox={x:h,y:f,width:d,height:p}}else if("arcY"===R){M=k=w=x=b=m=y=v=u=g=void 0;var g=t,u=e,[y,m,,v]=v=c,[b,x]=u.getCenter(),[u,w]=NP(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"===R){P=T=A=_=v=S=O=w=x=E=void 0;var E=t,x=e,[O,S,,w]=w=c,[v,_]=x.getCenter(),[x]=NP(x),A=x*(w=w/2),T=v-A,P=_-A;for(let t=0;t<E.length;t++)E[t].bbox={x:O+T,y:S+P,width:2*A,height:2*A}}else if("arcCenter"===R){q=Y=j=C=H=V=N=_=L=void 0;var L=t,_=e,[N,V,H,C]=N=c,[_]=NP(_),j=C/2*_/Math.sqrt(2),Y=N+H/2,q=V+C/2;for(let t=0;t<L.length;t++)L[t].bbox={x:Y-j,y:q-j,width:2*j,height:2*j}}else!function(n,t){const[e,r,i,a,o,s,c]=t,[l,u,h,f,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)=>c(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={[l]:s?e-b:e,[h]:f,[d]:b,[g]:y},e+=b*(s?-1:1)}}(t,c)}}function NP(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[t,e]}function CP(T,P,L,N){return Ee(this,void 0,void 0,function*(){const[n]=YA("composition",L);var[t]=YA("interaction",L);const e=new Set(Object.keys(L).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(Q0)),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 c=new Map,l=[T],u=[];l.length;){var h=l.shift();if(i(h)){var f=c.get(h),[f,d]=f?IP(f,h,L):yield RP(h,L),p=(s.set(f,h),o.push(f),d.flatMap(a));if(l.push(...p),p.every(i)){var g=yield Promise.all(p.map(t=>FP(t,L)));cP(f=(f=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),cP(f,"y");for(let t=0;t<p.length;t++){var y=p[t],m=g[t];c.set(y,m)}}}else{d="mark"===r(h)?h:yield VP(h,L),f=a(d);Array.isArray(f)?l.push(...f):"function"==typeof f&&u.push(f())}}var v=T["on"];HA(v,zA.BEFORE_PAINT);const b=new Map,x=[];P.selectAll(UP(j)).data(o,t=>t.key).join(t=>t.append("g").attr("className",j).attr("id",t=>t.key).call(jP).each(function(t){DP(t,Q(this),x,L),b.set(t,this)}),t=>t.call(jP).each(function(t){DP(t,Q(this),x,L)}),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=>Ee(this,void 0,void 0,function*(){var[t,e]=yield RP(r,a);DP(t,i,[],a);for(const n of e)CP(n,i,a,o);return{options:r,view:t}})}(Q(e),L,N)}));for(const S of w){const T=S["options"];for(const _ of function(t){var{interactions:t=[]}=t;return t}(T))t(_)(S,w)}const{width:k,height:M}=T;var E=[];for(const A of u){var O=new Promise(e=>Ee(this,void 0,void 0,function*(){for(const t of A)yield CP(Object.assign({width:k,height:M},t),P,L,N);e()}));E.push(O)}N.animations=x,HA(v,zA.AFTER_PAINT);v=x.filter(Q0).map(zP).map(t=>t.finished);return Promise.all([...v,...E])})}function jP(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function RP(t,e){return Ee(this,void 0,void 0,function*(){return IP(yield FP(t,e),t,e)})}function FP(v,b){return Ee(this,void 0,void 0,function*(){var[t]=YA("theme",b);const[i,a]=YA("mark",b);var{theme:e,marks:n,coordinates:r=[]}=v,o=t(WP(e)),s=new Map,c=[];for(const p of n){var l=yield VP(p,b);c.push(l)}for(const g of yield Promise.all(c.map(r=>Ee(this,void 0,void 0,function*(){const{type:t=Z0("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,h=g["type"],h=a(h)["props"],h=yield _P(g,h,b);h&&([h,u]=h,s.set(h,u))}for(const y of Rp(Array.from(s.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var f=y.reduce((t,{scale:e})=>R(t,e),{}),d=y[0]["values"],d=Array.from(new Set(d.map(t=>t.field).filter(Q0)));const v=R({guide:{title:0===d.length?void 0:d},field:d[0]},f);d=y[0]["name"];const m=sP(d,y.flatMap(({values:t})=>t.map(t=>t.value)),v,r,o,b);y.forEach(t=>t.scale=m)}return s})}function IP(t,e,n){var[r]=YA("mark",n);const[i]=YA("scale",n);var a,o,[s]=YA("theme",n),{key:c,frame:l=!1,theme:u,style:h={}}=e,s=s(WP(u)),u=Array.from(t.values()),u=Array.from(new Set(u.flatMap(t=>t.channels.map(t=>t.scale)))),u=AP(Array.from(u),e,n),f=PP(u,e),d=function(t,e,n){var[n]=YA("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:c,marginLeft:l,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new tP(Object.assign(Object.assign({},t),{x:a+l,y:o+u,width:i-a-s,height:r-c-o,transformations:e.map(n).flat()}))}(f,e,n),e=l?R({mainlineWidth:1,mainStroke:"#000"},h):h,p=(LP(u,d,f),{}),g=[];for([a,o]of t.entries()){const{children:b,dataDomain:x,modifier:w,key:k}=a;var{index:y,channels:m}=o,v=Ab(Object.fromEntries(m.map(({name:t,scale:e})=>[t,e])),t=>{var e=t["relations"],[e]=function(o){if(!o||!Array.isArray(o))return[K0,K0];let s,c;return[t=>{s=t.map.bind(t),c=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)},c){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):c(t)}return t},t=>(null!==s&&(t.map=s),null!==c&&(t.invert=c),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 c=e[i];for(const l of r){var{name:a,value:o}=l;n[a]=o.map(t=>c.map(t))}}return n}(m,v),[E,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])=>Q0(t)&&Q0(e))&&(r.push(a),i.push(o))}return[r,i]}(r(a)(y,v,M,d));m=x||E.length;const _=w?w(O,m,f):[];y=E.map((t,e)=>{var n={points:O[e],transform:_[e],index:t,markKey:k};for(const[r,i]of Object.entries(M))n[r]=i[t],S&&(n["series"+Cf(r)]=S[e].map(t=>i[t]));return S&&(n.seriesIndex=S[e]),n}),m=(o.data=y,o.index=E,null==b?void 0:b(y,v,f));g.push(...m||[])}return[{layout:f,theme:s,coordinate:d,components:u,markState:t,key:c,scale:p,style:e},g]}function DP(U,X,$,K){Ee(this,void 0,void 0,function*(){const{components:F,theme:n,layout:t,markState:e,coordinate:r,key:i,style:I}=U,{width:D,height:B}=t,G=Z(t,["x","y","width","height"]),a=["view","plot","main","content"];var o,s,c,l=a.map((t,e)=>e);const u=a.map(t=>tg(Object.assign({},n,I),t)),z=["a","margin","padding","inset"].map(t=>J(G,t)),h=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 f=0,d=0,p=D,g=B;const y=l.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=z[t];return f+=t,d+=e,p-=t+r,g-=e+n,{x:f,y:d,width:p,height:g}}),m=(X.selectAll(UP(at)).data(l.filter(t=>Q0(u[t])),t=>a[t]).join(t=>t.append("rect").attr("className",at).style("zIndex",-2).call(h),t=>t.call(h),t=>t.remove()),X.selectAll(UP(rt)).data(F,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",rt).append(t=>TP(t,r,n,K)),t=>t.each(function(t){var t=TP(t,r,n,K)["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:c,enterDuration:l=300,enterDelay:u=0,exitType:h,exitDuration:f=300,exitDelay:d=0}=r;for(const M of i){var{updateType:p=a,updateDuration:g=o,updateDelay:y=s,enterType:m=c,enterDuration:v=l,enterDelay:b=u,exitDuration:x=f,exitDelay:w=d,exitType:k=h}=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(UP(nt)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",nt).call(HP).call(qP,Array.from(e.keys())),t=>t.call(qP,Array.from(e.keys())).call(t=>{if(!m)return HP(t);{const[c,l]=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:c,duration:l,fill:"both"})})}})).transitions();$.push(...v.flat());for([o,s]of e.entries()){var W=s["data"];const{key:i,class:O}=o,S=function(c,t,e,n){const[l]=YA("shape",n),u=c["data"],{defaultShape:h,data:r}=t,f=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:g,style:y={}}=c;return(t,e)=>{var{shape:n=h}=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:h,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=Ab(y,t=>BP(t,o,s,u));return l(Object.assign(Object.assign({},e),{type:YP(c,n)}))(r,t,p,d,f)}}(o,s,U,K),_=(b=o,c=s,GP("enter",b,c,U,K)),A=(b=o,c=s,GP("update",b,c,U,K)),T=(b=o,c=s,GP("exit",b,c,U,K));var b=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(X,O,"element");const v=X.select("#"+i).selectAll(UP(et)).selectFacetAll(b).data(W,t=>t.key,t=>t.groupKey).join(t=>t.append(S).attr("className",et).transition(function(t){return _(t,[this])}),e=>e.call(t=>{const c=t.parent(),l=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=c,i=l,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&&J0(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 wb(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new wb([],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,k=K,M,E;const[P]=YA("labelTransform",k),{markState:V,labelTransform:L}=x,H=w.select(UP(tt)).node(),N=new Map,C=new Map,Y=Array.from(V.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=YA("shape",r),c=t["data"],{data:i,defaultLabelShape:l}=e,u=i.map(t=>t.points),{theme:h,coordinate:f}=n;return t=>{const{index:e,points:n}=t,r=c[e];var{formatter:i=t=>""+t}=t,t=Ab(Z(t,["formatter"]),t=>BP(t,r,e,c)),{shape:a=l,text:o}=t,t=Z(t,["shape","text"]),i="string"==typeof i?MM(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,f,h,u)}}(t,e,x,k),a=w.select("#"+r).selectAll(UP(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__,c=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:c,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),l=e.map((t,e)=>Object.assign(Object.assign({},n),{key:i[e]+"-"+r,bounds:[a[e]],index:t,points:a}));return t?t(l):l}(r,n,t);return t.forEach(t=>{N.set(t,i),C.set(t,e)}),t})})}),j=Q(H).selectAll(UP(it)).data(Y,t=>t.key).join(t=>t.append(t=>N.get(t)(t)).attr("className",it),t=>t.each(function(t){J0(this,N.get(t)(t))}),t=>t.remove()).nodes(),q=Rp(j,t=>C.get(t.__data__)),R=x["coordinate"];for([M,E]of q){var{transform:M=[]}=M;(function(t){return t.reduce((n,r)=>(t,...e)=>r(n(t,...e),...e),K0)})(M.map(P))(E,R)}L&&L(j,R)}})}function BP(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function GP(o,t,e,n,r){var[,i]=YA("shape",r);const[s]=YA("animation",r);r=e.defaultShape;const{theme:a,coordinate:c}=n;e=`default${Cf(o)}Animation`;const{[e]:l}=i(YP(t,r)).props,{[o]:u={}}=a,h=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||l},h);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},c,u),Array.isArray(t)?t:[t]):null}}function zP(t){return t.finished.then(()=>{t.cancel()}),t}function WP(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function VP(r,i){return Ee(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=Z(r,["data"]);return null==e?r:([,{data:e}]=yield bP(0,{data:e},t),Object.assign({data:e},n))})}function HP(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function YP(t,e){t=t.type;return t+"."+e}function qP(t,e){const n=t=>void 0!==t.class?""+t.class:"";t.selectAll(UP(f)).data(e,t=>t.key).join(t=>t.append("g").attr("className",f).attr("id",t=>t.key).style("facet",n).style("fill","transparent"),t=>t.style("facet",n),t=>t.remove()),t.select(UP(tt)).node()||t.append("g").attr("className",tt)}function UP(...t){return t.map(t=>"."+t).join("")}function XP(t){for(var t=R({},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 c=s[t];e.set(c,o),n.set(c,t),r.push(c)}}return t}function $P(t,e={},n){const{width:r=640,height:i=480,autoFit:a=!1,on:o}=t,s=XP(t),{canvas:c=(u=r,h=i,f=new df,f.registerPlugin(new wf),new Ml({width:u,height:h,container:document.createElement("div"),renderer:f})),library:l=VA()}=e;var u,h,f;e.canvas=c,e.library=l,a&&!e.bindAutoFit&&([u,h={}]=[t,e],u.autoFit&&window.addEventListener("resize",ZP(u,h)),e.bindAutoFit=!0),c.resize(r,i),HA(o,zA.BEFORE_RENDER);const d=Q(c.document.documentElement);return c.ready.then(()=>CP(Object.assign(Object.assign({},s),{width:r,height:i}),d,l,e)).then(n).then(()=>HA(o,zA.AFTER_RENDER)),"string"==typeof(f=c.getConfig().container)?document.getElementById(f):f}function KP(t,e={}){var n,r=t["on"],i=e["canvas"];i&&i.destroy(),[i,t={}]=[t,e],i.autoFit&&window.removeEventListener("resize",ZP(i,t)),(e=r)&&(n?delete e[n]:e={})}const ZP=(i,a={})=>{return r=()=>{var{width:t,height:e,autoFit:n}=i,r=a["canvas"],{width:r,height:n}=ag(r.getConfig().container,n,t,e),t=Object.assign(Object.assign({},i),{width:r,height:n});t.width&&t.height&&$P(t,a)},o=300,function(){var t=this,e=arguments,n=s&&!c;clearTimeout(c),c=setTimeout(function(){c=null,s||r.apply(t,e)},o),n&&r.apply(t,e)};var r,o,s,c};function JP(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 l{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 JP(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return JP(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 QP(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function t8(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 e8(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 n8(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])?Sf(e)?n.concat(e):n.push(e):r[t]=Sf(e)?e:[e],this.attr(i,r))}}function u(r){return t=>{for(const n of r){var e=n["type"];"value"===e?QP(t,n):"array"===e?t8(t,n):"object"===e?e8(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&&n8(t,n)}return t}}function r8(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}ho=[{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 i8=class extends l{constructor(){super({},"interval")}},a8=(i8=t([u(ho)],i8),class extends l{constructor(){super({},"rect")}}),o8=(a8=t([u(ho)],a8),class extends l{constructor(){super({},"point")}}),s8=(o8=t([u(ho)],o8),class extends l{constructor(){super({},"area")}}),c8=(s8=t([u(ho)],s8),class extends l{constructor(){super({},"line")}}),l8=(c8=t([u(ho)],c8),class extends l{constructor(){super({},"cell")}}),u8=(l8=t([u(ho)],l8),class extends l{constructor(){super({},"vector")}}),h8=(u8=t([u(ho)],u8),class extends l{constructor(){super({},"link")}}),f8=(h8=t([u(ho)],h8),class extends l{constructor(){super({},"polygon")}});f8=t([u(ho)],f8);oo=t([u(ho)],class extends l{constructor(){super({},"image")}});let d8=class extends l{constructor(){super({},"text")}},p8=(d8=t([u(ho)],d8),class extends l{constructor(){super({},"box")}}),g8=(p8=t([u(ho)],p8),class extends l{constructor(){super({},"lineX")}}),y8=(g8=t([u(ho)],g8),class extends l{constructor(){super({},"lineY")}}),m8=(y8=t([u(ho)],y8),class extends l{constructor(){super({},"range")}}),v8=(m8=t([u(ho)],m8),class extends l{constructor(){super({},"rangeX")}}),b8=(v8=t([u(ho)],v8),class extends l{constructor(){super({},"rangeY")}}),x8=(b8=t([u(ho)],b8),class extends l{constructor(){super({},"connector")}}),w8=(x8=t([u(ho)],x8),class extends l{constructor(){super({},"shape")}}),k8=(w8=t([u(ho)],w8),class extends l{constructor(){super({},"sankey")}}),M8=(k8=t([u([...ho,{name:"layout",type:"value"}])],k8),class extends l{constructor(){super({},"treemap")}}),E8=(M8=t([u([...ho,{name:"layout",type:"value"}])],M8),class extends l{constructor(){super({},"boxplot")}}),O8=(E8=t([u(ho)],E8),class extends l{constructor(){super({},"pack")}}),S8=(O8=t([u([...ho,{name:"layout",type:"value"}])],O8),class extends l{constructor(){super({},"forceGraph")}}),_8=(S8=t([u([...ho,{name:"layout",type:"value"}])],S8),class extends l{constructor(){super({},"tree")}}),A8=(_8=t([u([...ho,{name:"layout",type:"value"}])],_8),class extends l{constructor(){super({},"wordCloud")}});A8=t([u([...ho,{name:"layout",type:"object"}])],A8);tl={interval:i8,rect:a8,point:o8,area:s8,line:c8,cell:l8,vector:u8,link:h8,polygon:f8,image:oo,text:d8,box:p8,lineX:g8,lineY:y8,range:m8,rangeX:v8,rangeY:b8,connector:x8,sankey:k8,treemap:M8,boxplot:E8,shape:w8,pack:O8,forceGraph:S8,tree:_8,wordCloud:A8};let T8=class extends l{constructor(){super({},"view")}},P8=(T8=t([u([{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"},...r8(tl)])],T8),class extends l{constructor(){super({},"spaceLayer")}}),L8=(P8=t([u([{type:"value",name:"data"},...r8(tl)])],P8),class extends l{constructor(){super({},"spaceFlex")}}),N8=(L8=t([u([{type:"value",name:"data"},...r8(tl)])],L8),class extends l{constructor(){super({},"facetRect")}}),C8=(N8=t([u([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...r8(tl)])],N8),class extends l{constructor(){super({},"facetCircle")}}),j8=(C8=t([u([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...r8(tl)])],C8),class extends l{constructor(){super({},"repeatMatrix")}}),R8=(j8=t([u([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...r8(tl)])],j8),class extends l{constructor(){super({},"timingKeyframe")}}),F8=(R8=t([u([...r8(tl)])],R8),class extends l{constructor(){super({},"geoView")}}),I8=(F8=t([u([{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"},...r8(tl)])],F8),class extends l{constructor(){super({},"geoPath")}});I8=t([u([{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"},...r8(tl)])],I8);var D8={view:T8,spaceLayer:P8,spaceFlex:L8,facetRect:N8,facetCircle:C8,repeatMatrix:j8,timingKeyframe:R8,geoView:F8,geoPath:I8};for(const z8 of Object.values(D8))u(r8(D8))(z8);const B8=VA();function G8(t){return Object.assign(Object.assign({},t.value),{type:t.type})}fo=[{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"},...r8(tl),...Object.entries(D8).map(([t,e])=>({type:"container",name:t,ctor:e}))];h.Chart=class extends l{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:B8}}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}=ag(this._container,n,i,o),this.width(n),this.height(r),this._context.canvas=([n,r,i,a=new df,o=[]]=[this._container,i,o,t,e],o.push(new wf),o.forEach(t=>a.registerPlugin(t)),new Ml({container:n,width:r,height:i,renderer:a}))),$P(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,G8(e));n.length;){const e=n.pop();var i=r.get(e);for(const s of e.children){var a=G8(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"];HA(n,zA.BEFORE_DESTROY),KP(e,this._context),e=this._container,(t=e.parentNode)&&t.removeChild(e),HA(n,zA.AFTER_DESTROY)}clear(){var t=this.options(),e=t["on"];HA(e,zA.BEFORE_CLEAR),KP(t,this._context),HA(e,zA.AFTER_CLEAR)}forceFit(){var{width:t,height:e}=this.options(),{width:t,height:e}=ag(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;HA(i,zA.BEFORE_CHANGE_SIZE),this.width(t),this.height(e),this.render(),HA(i,zA.AFTER_CHANGE_SIZE)}},h.Chart=t([u(fo)],h.Chart),h.AREA_CLASS_NAME=at,h.COMPONENT_CLASS_NAME=rt,h.ELEMENT_CLASS_NAME=et,h.LABEL_CLASS_NAME=it,h.LABEL_LAYER_CLASS_NAME=tt,h.MAIN_LAYER_CLASS_NAME=f,h.PLOT_CLASS_NAME=nt,h.VIEW_CLASS_NAME=j,h.createLibrary=VA,h.destroy=KP,h.register=function(t,e){Object.assign(B8,{[t]:e})},h.render=$P,h.renderToMountedElement=function(t,e={},n){const{width:r=640,height:i=480,on:a}=t;var t=XP(t),{library:o=VA(),group:s=new ts}=e;if(function(t){if(!Of(t)){if(kf(t))return!t.length;var e,n=Rf(t);if("Map"===n||"Set"===n)return!t.size;if(If(t))return!Object.keys(t).length;for(e in t)if(Gf.call(t,e))return}return 1}(null==s?void 0:s.parentElement))throw new Error("Unmounted group");var c=Q(s);return e.group=s,e.library=o,HA(a,zA.BEFORE_RENDER),CP(Object.assign(Object.assign({},t),{width:r,height:i}),c,o,e).then(n).then(()=>HA(a,zA.AFTER_RENDER)),s},Object.defineProperty(h,"__esModule",{value:!0})});
|
|
7
|
+
`}([f,d,h,s]))}l-=u,c+=1}return o}function aE(t,e){t.__data__=e.__data__,t.className=e.className,e.parentNode.replaceChild(t,e)}function oE(t,e,n,r){var i,a,o,s,c,l,u,h,f,d=e["nodeName"],p=n["nodeName"],g=uc(e),y=uc(n);return d===p&&"path"!==d||(void 0===g||void 0===y)?(p=n,d=r,[o,c,s,f]=rE(i=e),[l,u,h,a]=(aE(p,i),rE(p)),o=[Object.assign({transform:`translate(${o-l}, ${c-u}) scale(${s/h}, ${f/a})`},$M(i,KM)),Object.assign({transform:"translate(0, 0) scale(1, 1)"},$M(p,KM))],p.animate(o,d)):(l=g,s="path"===(u=(c=t)["nodeName"])?c:(aE(u=new cs({style:Object.assign(Object.assign({},$M(c,KM)),{d:l})}),c),u),h=[Object.assign({path:g},$M(e,KM)),Object.assign({path:y},$M(n,KM))],f=s.animate(h,r),s.style.transform="scale(1, 1)",s.style.transform="none",f)}nE.props={};const sE=g=>(t,e,n,r,i)=>{[a="pack"]=[g.split];var a="function"==typeof a?a:iE,i=UM(i,n,g),n=t["length"],o=e["length"];if(1===n&&1===o||1<n&&1<o)return[s]=t,[l]=e,oE(s,s,l,i);if(1===n&&1<o){var[s]=t;{var c=s,l=e,u=i,s=a;c.style.visibility="hidden";const d=s(c,l.length);return l.map((t,e)=>{return oE(t,new cs({style:Object.assign({path:d[e]},$M(c,KM))}),t,u)})}}if(1<n&&1===o){var[n]=e;{var o=t,h=n,f=i;const p=(e=a)(h,o.length);var{fillOpacity:e,strokeOpacity:t,opacity:n}=h.style,e=h.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:0,strokeOpacity:0,opacity:0,offset:.99},{fillOpacity:e,strokeOpacity:t,opacity:n}],f);return[...o.map((t,e)=>{return oE(t,t,new cs({style:{path:p[e],fill:h.style.fill}}),f)}),e]}}return null},cE=(sE.props={},b=>{return ia({name:"waveInArcAngle",inherits:!1,initialValue:"",interpolable:!0,syntax:r.NUMBER}),(t,e,n,r,i)=>{const[a]=t;if(!s0(r))return ZM(b)(t,e,n,r,i);const o=r.getCenter();var{__data__:t,style:e}=a,{radius:s=0,inset:c=0,fillOpacity:l,strokeOpacity:u,opacity:h}=e,{points:e,y:t,y1:f}=(Z(e,["radius","inset","fillOpacity","strokeOpacity","opacity"]),t);const d=Uv().cornerRadius(s).padAngle(c*Math.PI/180),p=Cb(r,e,[t,f]),{startAngle:g,endAngle:y}=p,m=new cs({}),v=t=>{m.attr({d:d(t),transform:`translate(${o[0]}, ${o[1]})`});t=uc(m);return m.style.transform="none",t};s=[{waveInArcAngle:g+1e-4,fillOpacity:0,strokeOpacity:0,opacity:0},{waveInArcAngle:g+1e-4,fillOpacity:l,strokeOpacity:u,opacity:h,offset:.01},{waveInArcAngle:y,fillOpacity:l,strokeOpacity:u,opacity:h}],c=a.animate(s,UM(i,n,b));return c.onframe=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:Number(a.style.waveInArcAngle)}))},c.onfinish=function(){a.style.path=v(Object.assign(Object.assign({},p),{endAngle:y}))},c}}),lE=(cE.props={},l=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:c}=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:c,offset:.01},{transform:(t+" scale(1)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:c}],{width:o,height:s}=a.getBoundingClientRect(),c=(a.setOrigin([o/2,s/2]),a.animate(t,UM(i,n,l)));return c.finished.then(()=>a.setOrigin(0,0)),c}}),uE=l=>{return(t,e,n,r,i)=>{const[a]=t;var{transform:t,fillOpacity:o,strokeOpacity:s,opacity:c}=a.style,o=[{transform:(t+" scale(1)").trimStart()},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:o,strokeOpacity:s,opacity:c,offset:.99},{transform:(t+" scale(0.0001)").trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],{width:s,height:c}=a.getBoundingClientRect(),t=(a.setOrigin([s/2,c/2]),a.animate(o,UM(i,n,l)));return t.finished.then(()=>a.setOrigin(0,0)),t}},hE=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]}],UM(i,n,o))},fE=(hE.props={},c=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new cs({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=ZM(c)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o}),dE=(fE.props={},c=>(t,e,n,r,i)=>{const[a]=t;var{height:t,width:o}=a.getBoundingClientRect();const s=new cs({style:{path:`M0,0L${o},0L${o},${t}L0,${t}Z`}});a.appendChild(s),a.style.clipPath=s;o=QM(c)([s],e,n,r,i);return o.finished.then(()=>{s.remove(),a.style.clipPath=null}),o});function pE(t){return Q(t).selectAll("."+et).nodes()}function gE(t){return Q(t).select("."+nt).node()}function yE(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 mE(t){return t&&0!==Object.keys(t).length?t:{highlightedLineWidth:1,highlightedStroke:"#000"}}function vE(){return t=>t.__data__.color}function bE(t){const e=t.scale["x"];return t=>{t=t.__data__.x;return e.invert(t)}}function xE(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 wE(o,s=(t,e)=>t){const c="__states__",l="__ordinal__",i=t=>{var{[c]:e=[],[l]: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[l]=n}},a=t=>{t[c]||(t[c]=[])};return{setState:(t,...e)=>{a(t),t[c]=[...e],i(t)},removeState:(t,...e)=>{a(t);for(const r of e){var n=t[c].indexOf(r);-1!==r&&t[c].splice(n,1)}i(t)},hasState:(t,e)=>(a(t),-1!==t[c].indexOf(e))}}function kE(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 ME(c,t){var{valueof:l=(t,e)=>t}=t,u=Z(t,["valueof"]);const h="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=_v();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(),_b(u,t=>l(t,o))),{fill:a=o.getAttribute("fill")}=i,i=Z(i,["fill"]),r=new cs({className:h+(e?" "+e:""),style:Object.assign({d:r.toString(),fill:a},i)});c.appendChild(r)}}},t=>{t=t||h;for(const e of c.getElementsByClassName(t)||[])e.remove()}]}function EE(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),c=Rp(o,i);n=kE(o,r);const[l,u]=ME(t,Object.assign({elements:o,valueof:n},J(e,"link"))),{setState:h,removeState:f}=wE(e,n),d=t=>{t=t.target;if(s.has(t)){var t=i(t),t=c.get(t),e=new Set(t);for(const n of o)e.has(n)?h(n,"highlighted"):h(n,"unhighlighted");a&&l(t)}},p=t=>{t=t.target;if(s.has(t)){for(const e of o)f(e,"unhighlighted","highlighted");a&&u()}};return t.addEventListener("pointerover",d),t.addEventListener("pointerout",p),()=>{t.removeEventListener("pointerover",d),t.removeEventListener("pointerout",p)}}function OE(n){return t=>{var{container:t,view:e}=t;return EE(t,Object.assign(Object.assign({},mE(n)),{elements:pE,datum:xE(e)}))}}function SE(n={selectedLineWidth:1,selectedColor:"black"}){return t=>{var{container:t,view:e}=t;return EE(t,Object.assign(Object.assign({},mE(n)),{elements:pE,datum:xE(e),groupKey:bE(e)}))}}function _E(n){return t=>{var{container:t,view:e}=t;return EE(t,Object.assign(Object.assign(Object.assign({},n),mE(n)),{elements:pE,datum:xE(e),groupKey:vE()}))}}function AE(t,e){var{elements:n,datum:r,groupKey:c=t=>t,link:l=!1,single:u=!1}=e,e=Z(e,["elements","datum","groupKey","link","single"]);const h=n(t),f=new Set(h),d=Rp(h,c);n=kE(h,r);const[p,g]=ME(t,Object.assign({elements:h,valueof:n},J(e,"link"))),{setState:y,removeState:i,hasState:m}=wE(e,n),v=()=>{for(const t of h)i(t,"selected","unselected");l&&g()},a=t=>{t=t.target;if(!f.has(t))return v();if(u){var e=t;if(m(e,"selected"))v();else{var e=c(e),e=d.get(e),n=new Set(e);for(const i of h)n.has(i)?y(i,"selected"):y(i,"unselected");l&&(g(),p(e))}}else{e=t;var t=c(e),r=d.get(t);const a=new Set(r);if(m(e,"selected")){if(!h.some(t=>!a.has(t)&&m(t,"selected")))return v();for(const o of r)y(o,"unselected");l&&g(t)}else{e=r.some(t=>m(t,"selected"));for(const s of h)a.has(s)?y(s,"selected"):m(s,"selected")||y(s,"unselected");!e&&l&&p(r,t)}}};return t.addEventListener("click",a),()=>{t.removeEventListener("click",a)}}function TE(n){return t=>{var{container:t,view:e}=t;return AE(t,Object.assign(Object.assign({},mE(n)),{elements:pE,datum:xE(e)}))}}function PE(n){return t=>{var{container:t,view:e}=t;return AE(t,Object.assign(Object.assign({},mE(n)),{elements:pE,datum:xE(e),groupKey:bE(e)}))}}function LE(n){return t=>{var{container:t,view:e}=t;return AE(t,Object.assign(Object.assign({},mE(n)),{elements:pE,datum:xE(e),groupKey:vE()}))}}function NE(t){var{wait:E=20,leading:O,trailing:S=!1,labelFormatter:_=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:f,x:d,series:c=[]}=t;t=f.map((t,e)=>e);const l=Dp(t.map(t=>d[t])),u=R({},e),h=u.marks.find(t=>"line"===t.type);t=Kp(Fp(t,t=>Kp(t,t=>+f[t])/Jp(t,t=>+f[t]),t=>c[t]).values());R(h,{scale:{y:{domain:[1/t,t]}}});const p=gE(r),g=r.getElementsByClassName(et);const y=Rp(r.getElementsByClassName(it),t=>t.__data__.key.split("-")[0]),m=new os({style:Object.assign({x1:0,y1:0,x2:0,y2:p.getAttribute("height"),stroke:"black",lineWidth:1},J(A,"rule"))}),v=new ys({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 l[Sp(l,n)]}),x=(t,e)=>{m.setAttribute("x1",t[0]),m.setAttribute("x2",t[0]),v.setAttribute("text",_(e))};let w;var k;const M=Vf(t=>{t=yE(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[Ep(t=>d[+t]).center(a,i)],c=[0,r.map(1)],s=[0,r.map(f[s]/f[a[0]])],[,a]=n.map(c),[,c]=n.map(s),l=a-c,s=(u.setAttribute("transform",`translate(0, ${l})`),y.get(o)||[]);for(const h of s)h.setAttribute("dy",l)}}},E,{leading:O,trailing:S});return k=[0,0],Ee(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)}(h);t.groupBy="color",t.basis=(t,e)=>{return e[t[Ep(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 CE({wait:c=30,leading:l,trailing:u=!1}){return t=>{const{options:e,update:r,container:n}=t,i=gE(n),a=R({},e);for(const s of a.marks)s.animate=!1;const o=Vf(t=>{var e,n,t=yE(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))},c,{leading:l,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 jE(t,e,n,r){var i=t.tooltipElement||function(t,e,n){var{min:[r,i],max:[a,o]}=t.getBounds(),e=new e5({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 RE(t){t=t.tooltipElement;t&&t.hide()}function FE(t){return Object.fromEntries(Object.entries(t).filter(([,t])=>J0(t)))}function IE(t){var e=t.getAttribute("fill"),n=t.getAttribute("stroke"),t=t["__data__"],{color:t=e||n}=t;return t}function BE(n,a,o,t=n.map(t=>t.__data__)){e=t.map(t=>t.title);var e=Array.from(new Set(e)).filter(J0),t=t.flatMap((r,t)=>{var t=n[t],e=Z(r,["title"]);const i=IE(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},FE(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 DE(t,e){return Array.from(t.values()).some(t=>{return null==(t=t.interaction)?void 0:t[e]})}function GE(t,e){return void 0===t?e:t}function zE(c,t){var{elements:e,wait:n=50,leading:r=!0,trailing:i=!1,scale:l,coordinate:u,showCrosshairs:h,item:f}=t,t=Z(t,["elements","wait","leading","trailing","scale","coordinate","showCrosshairs","item"]);const d=e(c),[,p]=function(t){var{min:[t,e],max:[n,r]}=t.getBounds();return[n-t,r-e]}(c),g=new Map(d.map(t=>{var e=t["__data__"],e=e["seriesX"];return[t,Dp(e)]})),y=J(t,"crosshairs"),a=Vf(t=>{const r=yE(c,t);var t=c.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[Af(t.replace("series","")),e]}))})(t,((t,e)=>{var[t]=u.invert(t);return Sp(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=BE(d,f,l,i);if(jE(c,i,r[0]+e,r[1]+t),h){i=c,e=n,n=(t=Object.assign(Object.assign({},y),{height:p}))["height"],t=Z(t,["height"]);const a=e=e0(e.map(t=>t[0])),o=e,s=n;(n=i.ruleY||(e=new os({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;RE(c),h&&(t=c).ruleY&&(t.ruleY.remove(),t.ruleY=void 0)};return c.addEventListener("pointerenter",a),c.addEventListener("pointermove",a),c.addEventListener("pointerleave",o),()=>{c.removeEventListener("pointerover",a),c.removeEventListener("pointerout",a),c.removeEventListener("pointerleave",o)}}function WE(r,{elements:t,scale:i,wait:e=50,leading:n=!0,trailing:a=!1,groupKey:o=t=>t,item:s}){t=t(r);const c=new Set(t),l=Rp(t,o),u=Vf(t=>{var e,n=t["target"];c.has(n)&&(n=o(n),n=1===(n=l.get(n)).length?function(t,r,i){var e=(n=t["__data__"])["title"],n=Z(n,["title"]);const a=IE(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},FE(r({channel:t,value:e})))}).filter(({value:t})=>void 0!==t),Object.assign(Object.assign({},e&&{title:e}),{items:t})}(n[0],s,i):BE(n,s,i),{offsetX:t,offsetY:e}=t,jE(r,n,t,e))},e,{leading:n,trailing:a}),h=t=>{t=t.target;c.has(t)&&RE(r)};return r.addEventListener("pointerover",u),r.addEventListener("pointermove",u),r.addEventListener("pointerout",h),()=>{r.removeEventListener("pointerover",u),r.removeEventListener("pointermove",u),r.removeEventListener("pointerout",h)}}function VE(t){const{shared:o,showCrosshairs:s,series:c,item:l=()=>({})}=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=DE(r,"seriesTooltip"),r=DE(r,"showCrosshairs"),t=gE(t);return GE(c,a)?zE(t,Object.assign(Object.assign({},u),{elements:pE,scale:n,coordinate:i,showCrosshairs:GE(s,r),item:l})):WE(t,Object.assign(Object.assign({},u),{elements:pE,scale:n,coordinate:i,groupKey:o?bE(e):void 0,item:l}))}}function YE(n){return(t,...e)=>R({},n(t,...e),t)}function HE(n){return(t,...e)=>R({},t,n(t,...e))}function qE(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}dE.props={};const UE=()=>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:qE(e,o),x:n,y:r,width:i,height:a})})},XE=(UE.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,c,l]="col"===t?["y","height","width","x"]:["x","width","height","y"];const u=r.reduce((t,e)=>t+e),h=e[s]-i*(n.length-1);var f=r.map(t=>h*(t/u)),d=[];let p=e[o]||0;for(let t=0;t<f.length;t+=1){var g=n[t],y=g["data"],g=Z(g,["data"]),y=qE(y,a);d.push(Object.assign({[o]:p,[s]:f[t],[l]:e[l]||0,[c]:e[c],data:y},g)),p+=f[t]+i}return d}),$E=(XE.props={},()=>t=>{var e=t["children"],t=Z(t,["children"]);if(!Array.isArray(e))return[];const{data:a,scale:o={},axis:s={},legend:c={}}=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:qE(e,a),scale:R({},o,n),axis:!(!r||!s)&&R({},s,r),legend:!(!i||!c)&&R({},c,i)},t)});return[Object.assign(Object.assign({},n),{marks:t,type:"standardView"})]}),KE=($E.props={},()=>t=>{var{width:e,height:n,paddingLeft:r,paddingRight:i,paddingTop:a,paddingBottom:o,padding:s,inset:c,insetLeft:l,insetTop:u,insetRight:h,insetBottom:f,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,data:v,coordinates:b,theme:x,component:w,interactions:k,x:M,y:E,key:O,frame:S,title:_,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:E,key:O,width:e,height:n,padding:s,paddingLeft:r,paddingRight:i,paddingTop:a,inset:c,insetLeft:l,insetTop:u,insetRight:h,insetBottom:f,paddingBottom:o,theme:x,coordinates:b,component:w,interactions:k,frame:S,title:_,labelTransform:A,margin:d,marginLeft:p,marginBottom:g,marginTop:y,marginRight:m,marks:[Object.assign(Object.assign({},t),{key:O+"-0",data:v})]}]}),ZE=(KE.props={},YE(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=Rp(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"))}}})),JE=YE(t=>{const{data:e,scale:n}=t;var r=[t];let i,a,o;for(;r.length;){const{children:u,encode:h={},scale:n={},legend:f={}}=r.shift();var s=h["color"],c=n["color"],l=f["color"];void 0!==s&&(i=s),void 0!==c&&(a=c),void 0!==l&&(o=l),Array.isArray(u)&&r.push(...u)}return{encode:{color:i},scale:{color:R({},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:R({title:i},o)}}}),QE=YE(()=>({animate:{enterType:"fadeIn"}})),t3=HE(()=>({frame:!1,encode:{shape:"hollow"},style:{lineWidth:0}})),e3=HE(()=>({type:"cell"})),n3=HE(l=>{var t=l["data"];return{data:{type:"inline",value:t,transform:[{type:"custom",callback:()=>{var{data:t,encode:e}=l;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 c of a)o.push({[n]:s,[r]:c});return o}return i.length?i.map(t=>({[n]:t})):a.length?a.map(t=>({[r]:t})):void 0}}]}}}),r3=HE((t,l=function(t){t=t.points;return Ob(t)},w=function(a){return(t,e)=>{var{rowIndex:t,rowValuesLength:n,columnIndex:r,columnValuesLength:i}=t;return t!==n-1?i3(a,e):(t=e.length?void 0:null,R({title:r===i-1&&void 0,grid:t},a))}},k=function(r){return(t,e)=>{var{rowIndex:t,columnIndex:n}=t;return 0!==n?i3(r,e):(n=e.length?void 0:null,R({title:0===t&&void 0,grid:n},r))}},M={})=>{const{data:e,encode:n,children:u,scale:r,x:E=0,y:O=0,shareData:h=!1}=t,S=e["value"],{x:_,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=Ab(t);const s=t.map(l);n=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]);const c=n.map(([n,r])=>t=>{var{[_]:t,[A]:e}=t,t=void 0===_||t===n,e=void 0===A||e===r;return t&&e}).map(t=>S.filter(t)),v=h?Kp(c,t=>t.length):void 0,b=n.map(([t,e])=>({columnField:_,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(l=>{const[u,h,f,d]=s[l],p=b[l],g=c[l];return x[l].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:_?5:void 0},y:{tickCount:A?5:void 0}},r=r?g:0===g.length?[]:S,c={color:{domain:T}},o={x:a3(o,w)(p,r),y:a3(a,k)(p,r)};return Object.assign(Object.assign({key:n+"-"+l,data:r,x:u+y+E,y:h+m+O,width:f,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!!r.length,dataDomain:v,scale:R(s,e,c),axis:R({},i,o),legend:!1},t),M)})})}}});function i3(t,e){return e.length?R({title:!1,tick:null,label:null},t):R({title:!1,tick:null,label:null,grid:null},t)}function a3(t,e){return"function"==typeof t?t:null===t?()=>null:e(t)}const o3=()=>t=>{return[qM.of(t).call(e3).call(JE).call(QE).call(ZE).call(t3).call(n3).call(r3).value()]},s3=(o3.props={},YE(t=>({scale:{x:{guide:null,paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}}))),c3=HE(t=>{const{data:w,children:l,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=Ab(t);const s=t.map(({points:t})=>Ob(t)),c=t.map(({x:t,y:e})=>[r.invert(t),i.invert(e)]),b=c.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(l)?l:[l(t)].flat(1));return e.flatMap(l=>{const[u,h,f,d]=s[l],[p,g]=c[l],y=b[l];return x[l].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,c=null==(c=null==e?void 0:e.x)?void 0:c.guide,c={x:("function"==typeof(r=c)?r:null===r?()=>null:(t,e)=>{var{rowIndex:t,rowValuesLength:n}=t;if(t!==n-1)return i3(r,e)})(y,w),y:("function"==typeof(n=s)?n:null===n?()=>null:(t,e)=>{t=t.columnIndex;if(0!==t)return i3(n,e)})(y,w)};return Object.assign({data:w,key:i+"-"+l,x:u+m+k,y:h+v+M,width:f,height:d,paddingLeft:0,paddingRight:0,paddingTop:0,paddingBottom:0,frame:!0,scale:R({x:{facet:!1},y:{facet:!1}},e),axis:R({x:{tickCount:5},y:{tickCount:5}},o,c),legend:!1,encode:R({},a,{x:p,y:g})},t)})})}}}),l3=HE(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 u3=()=>t=>{return[qM.of(t).call(e3).call(JE).call(c3).call(l3).call(QE).call(t3).call(s3).value()]},h3=YE(t=>({scale:{x:{guide:{type:"axisX"},paddingOuter:0,paddingInner:.1},y:{guide:null,range:[0,1],paddingOuter:0,paddingInner:.1}}})),f3=YE(t=>({coordinates:[{type:"polar"}]})),d3=t=>{var e=t["encode"],t=Z(t,["encode"]),e=e["position"];return Object.assign(Object.assign({},t),{encode:{x:e}})};function p3(t){return t=>null}function g3(t){var t=t["points"],[t,e,n,r]=t,i=kb(t,r),t=wb(t,r),r=wb(e,n),r=(e=r,r=Mb(r=t),e=Mb(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=Eb(t)+r/2,r=i*e;return[n+r*Math.sin(t)-a/2,o+r*Math.cos(t)-a/2,a,a]}const y3=()=>t=>{return[qM.of(t).call(e3).call(d3).call(JE).call(f3).call(n3).call(r3,g3,p3,p3,{frame:!1}).call(QE).call(t3).call(h3).value()]};const m3=()=>t=>{const{children:e=[],duration:a=1e3,iterationCount:c=1,direction:l="normal",easing:o="ease-in-out-sine"}=t,u=e.length;if(!Array.isArray(e)||0===u)return[];const n=e[0]["key"],h=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=R({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"===c||t<c;){n=l,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 h[i]),e=i}t++}var a,o,s}};function v3(t,e){if(null!==t)return{type:"column",value:t,field:e}}function b3(t,e){if(null!==t)return{type:"column",value:t,field:e,visual:!0}}function x3(t,e){var n=[];for(const r of t)n[r]=e;return n}function w3(t,e){var t=t[e];return t?({value:e,field:t=null}=t,[e,t]):[null,null]}function k3(t,...e){for(const i of e){if("string"!=typeof i)return[i,null];var[n,r]=w3(t,i);if(null!==n)return[n,r]}return[null,null]}function M3(t){return!(t instanceof Date)&&"object"==typeof t}m3.props={};const E3=()=>(t,e)=>{var n=e["encode"],n=n["y1"];return void 0!==n?[t,e]:[t,R({},e,{encode:{y1:v3(x3(t,0))}})]};function O3(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=w3(r,t))?void 0:t[0]]}).filter(([,t])=>J0(t));return Array.from(Rp(e,e=>i.map(([,t])=>t[e]).join("-")).values())}function S3(t){var a,r;return Array.isArray(t)?(a=t,(i,t,e)=>(n,r)=>a.reduce((t,e)=>0!==t?t:Mp(i[n][e],i[r][e]),0)):"function"==typeof t?(r=t,(e,t,n)=>C3(t=>r(e[t]))):"series"===t?T3:"value"===t?P3:"sum"===t?L3:"maxIndex"===t?N3:()=>null}function _3(t,e){for(const n of t)n.sort(e)}function A3(t,e){return(null==e?void 0:e.domain)||Array.from(new Set(t))}function T3(t,e,n){return C3(t=>n[t])}function P3(t,e,n){return C3(t=>e[t])}function L3(t,n,e){t=Ab(t),t=Array.from(Rp(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,e.reduce((t,e)=>t+ +n[e])]));return C3(t=>r.get(e[t]))}function N3(t,n,e){t=Ab(t),t=Array.from(Rp(t,t=>e[+t]).entries());const r=new Map(t.map(([t,e])=>[t,Zp(e,t=>n[t])]));return C3(t=>r.get(e[t]))}function C3(n){return(t,e)=>Mp(n(t),n(e))}E3.props={};const j3=(t={})=>{const{groupBy:T="x",orderBy:P=null,reverse:L=!1,y:N="y",y1:C="y1",series:j=!0}=t;return(t,e)=>{var{data:n,encode:r,style:i={}}=e,[a,o]=w3(r,"y"),[s,c]=w3(r,"y1"),[r]=j?k3(r,"series","color"):w3(r,"color"),l=O3(T,t,e),n=S3(P)(n,a,r),u=(n&&_3(l,n),new Array(t.length)),h=new Array(t.length),f=new Array(t.length),d=[],p=[];for(const O of l){L&&O.reverse();var g=s?+s[O[0]]:0,y=[],m=[];for(const S of O){var v=f[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 _ of m.reverse()){var w=f[_];n=u[_]=(h[_]=n)+w}let r=g;for(const A of y){var k=f[A];0<k?r=u[A]=(h[A]=r)+k:u[A]=h[A]=r}}const M=new Set(d),E=new Set(p);r="y"===N?u:h,n="y"===C?u:h;return[t,R({},e,{encode:{y:v3(r,o),y1:v3(n,c)},style:Object.assign({first:(t,e)=>M.has(e),last:(t,e)=>E.has(e)},i)})]}};function R3(t){t=t.type;return"string"==typeof t&&["stackY","dodgeX","groupX"].includes(t)}j3.props={};const F3=a=>(t,e,n)=>{var{encode:r,transform:i=[]}=e;return i.some(R3)||({x:i,y:r}=r,void 0===i)||void 0===r?[t,e]:(i=a["series"],r=i?["x","series"]:"x",j3({groupBy:r})(t,e,n))},I3=(F3.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]=w3(n,i),[t,R({},e,{encode:{title:v3(r,n)}})])}}),B3=(I3.props={},()=>(t,e)=>{var n=e["encode"],n=n["x"];return void 0!==n?[t,e]:[t,R({},e,{encode:{x:v3(x3(t,0))},scale:{x:{guide:null}}})]}),D3=(B3.props={},()=>(t,e)=>{var n=e["encode"],n=n["y"];return void 0!==n?[t,e]:[t,R({},e,{encode:{y:v3(x3(t,0))},scale:{y:{guide:null}}})]}),G3=(D3.props={},()=>(t,e)=>{var n=e["encode"],n=n["size"];return void 0!==n?[t,e]:[t,R({},e,{encode:{size:b3(x3(t,3))}})]}),z3=(G3.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,R({},e,{encode:{key:v3(r)}})]}),W3=(z3.props={},()=>(t,e)=>{var n=e["encode"],{series:r,color:i}=n;return void 0!==r||void 0===i?[t,e]:([r,i]=w3(n,"color"),[t,R({},e,{encode:{series:v3(r,i)}})])}),V3=(W3.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(M3)?[t,e]:[t,R({},e,{encode:{y:v3(n)}})]}),Y3=(V3.props={},()=>(t,e)=>{var n=e["data"];return!Array.isArray(n)||n.some(M3)?[t,e]:[t,R({},e,{encode:{x:v3(n)}})]}),H3=(Y3.props={},()=>(t,e)=>{var n=e["encode"],r=n["y1"];return r?[t,e]:([r]=w3(n,"y"),[t,R({},e,{encode:{y1:v3([...r])}})])}),q3=(H3.props={},()=>(t,e)=>{var n=e["encode"],r=n["x1"];return r?[t,e]:([r]=w3(n,"x"),[t,R({},e,{encode:{x1:v3([...r])}})])}),U3=(q3.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]=w3(r,t),t=[[t,v3(e)]];return e&&null!==n&&(t.push(["tooltip"+(0===i?"":i),v3(e,n)]),i++),t}));return[t,R({},e,{encode:Object.fromEntries(n)})]}}),X3=(U3.props={},()=>(t,e)=>[t,R({scale:{x:{padding:0},y:{padding:0}}},e)]),$3=(X3.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],R({},r,{data:[0],cartesian:!0,encode:{x:v3([i||0]),y:v3([a||0])},scale:{x:{type:"identity",independent:!0,guide:null},y:{type:"identity",independent:!0,guide:null}},style:n})]}),K3=($3.props={},()=>(t,e)=>{var{style:n={}}=e;return[t,R({},e,{style:Object.assign(Object.assign({},n),Object.fromEntries(Object.entries(n).filter(([,t])=>"function"==typeof t).map(([t,e])=>[t,()=>e])))})]}),Z3=(K3.props={},()=>(t,e)=>{var n,r=e["data"];return!Array.isArray(r)||r.some(M3)?[t,e]:(n=(r=Array.isArray(r[0])?r:[r]).map(t=>t[0]),r=r.map(t=>t[1]),[t,R({},e,{encode:{x:v3(n),y:v3(r)}})])}),J3=(Z3.props={},()=>(t,e)=>{var{style:n={}}=e,n=n["gradient"];return n?[t,R({},e,{encode:{series:b3(x3(t,void 0))}})]:[t,e]}),Q3=(J3.props={},(t={})=>{const{groupBy:l="x",reverse:u=!1,orderBy:h,padding:f}=t;return Z(t,["groupBy","reverse","orderBy","padding"]),(t,e)=>{var{data:n,encode:r,scale:i}=e,i=i["series"],[a]=w3(r,"y"),[r]=k3(r,"series","color"),o=A3(r,i),i=O3(l,t,e),n=S3(h)(n,a,r),s=(n&&_3(i,n),new Array(t.length));for(const c of i){u&&c.reverse();for(let t=0;t<c.length;t++)s[c[t]]=o[t]}return[t,R({},e,{scale:{series:{domain:o,paddingInner:f}},encode:{series:v3(s)}})]}}),tO=(Q3.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,w3(e,t)[0]]);if(0===r.length)return[n,t];let i=[n];for(const[,h]of r){var a=[];for(const n of i){var o=Array.from(Rp(n,t=>h[t]).values());a.push(...o)}i=a}if(y){const[f]=w3(e,y);f&&i.sort((t,e)=>g(t,f)-g(e,f)),m&&i.reverse()}r=(v||3e3)/i.length;const[s]=v?[x3(n,r)]:k3(e,"enterDuration",x3(n,r));var[c]=k3(e,"enterDelay",x3(n,0)),l=new Array(n.length);for(let t=0,e=0;t<i.length;t++){const n=i[t];var u=Kp(n,t=>+s[t]);for(const d of n)l[d]=+c[d]+e;e+=u}return[n,R({},t,{encode:{enterDuration:b3(s),enterDelay:b3(l)}})]}});tO.props={};const eO=(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,w3(n,t)[0]]),[,o]=a.find(([t])=>"y"===t),s=a.map(([t])=>[t,new Array(e.length)]),i=O3(d,e,t),c="function"==typeof(r=p)?r:{min:(t,e)=>Jp(t,t=>e[+t]),max:(t,e)=>Kp(t,t=>e[+t]),first:(t,e)=>e[t[0]],last:(t,e)=>e[t[t.length-1]],mean:(t,e)=>e0(t,t=>e[+t]),median:(t,e)=>n0(t,t=>e[+t]),sum:(t,e)=>a0(t,t=>e[+t]),deviation:(t,e)=>Tp(t,t=>e[+t])}[r]||Kp;for(const e of i){var l=c(e,o);for(const f of e)for(let t=0;t<a.length;t++){var[,u]=a[t],[,h]=s[t];h[f]=+u[f]/l}}return[e,R({},t,{encode:Object.fromEntries(s.map(([t,e])=>[t,v3(e,w3(n,t)[1])]))})]}};function nO(t,e,n){return null===t?[-.5,.5]:(t=A3(t,e),[-(e=new Sm({domain:t,range:[0,1],padding:n}).getBandWidth())/2,e/2])}function rO(t,e,n){return e*(1-t)+n*t}eO.props={};const iO=(t={})=>{const{padding:e=0,paddingX:c=e,paddingY:l=e,random:u=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,{x:r,y:i}=r,[a]=w3(n,"x"),[n]=w3(n,"y");const o=nO(a,r,c),s=nO(n,i,l);a=t.map(()=>rO(u(),...s)),r=t.map(()=>rO(u(),...o));return[t,R({scale:{x:{padding:.5},y:{padding:.5}}},e,{encode:{dy:v3(a),dx:v3(r)}})]}},aO=(iO.props={},(t={})=>{const{padding:a=0,random:o=Math.random}=t;return(t,e)=>{var{encode:n,scale:r}=e,r=r["x"],[n]=w3(n,"x");const i=nO(n,r,a);n=t.map(()=>rO(o(),...i));return[t,R({scale:{x:{padding:.5}}},e,{encode:{dx:v3(n)}})]}}),oO=(aO.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,w3(n,t)[0]]);var a=i.map(([t])=>[t,new Array(e.length)]),o=O3(g,e,t),s=new Array(o.length);for(let t=0;t<o.length;t++){const e=o[t];var[c,l]=Pp(e.flatMap(e=>i.map(([,t])=>+t[e])));s[t]=(c+l)/2}var u=Math.max(...s);for(let t=0;t<o.length;t++){var h=u-s[t];const e=o[t];for(const p of e)for(let t=0;t<i.length;t++){var[,f]=i[t],[,d]=a[t];d[p]=+f[p]+h}}return[e,R({},t,{encode:Object.fromEntries(a.map(([t,e])=>[t,v3(e,w3(n,t)[1])]))})]}}),sO=(oO.props={},(t={})=>{const{groupBy:u="x",series:h=!0}=t;return(t,e)=>{var n=e["encode"];const[r]=w3(n,"y");var[,i]=w3(n,"y1"),n=(h?k3(n,"series","color"):w3(n,"color"),O3(u,t,e)),a=new Array(t.length);for(const l of n){var o=l.map(t=>+r[t]);for(let n=0;n<l.length;n++){var s=l[n],c=Math.max(...o.filter((t,e)=>e!==n));a[s]=r[s]>c?c:r[s]}}return[t,R({},e,{encode:{y1:v3(a,i)}})]}});function cO(t,e){return[t[0]]}function lO(t,e){return[t[t.length-1]]}function uO(t,e){return[t[Zp(t,t=>e[t])]]}function hO(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])]]}sO.props={};const fO=(t={})=>{const{groupBy:s="series"}=t,c=Z(t,["groupBy"]);return(t,e)=>{var n=e["encode"],t=O3(s,t,e),[r,i]=Object.entries(c)[0];const[a]=w3(n,r),o="function"==typeof(n=i)?n:{first:cO,last:lO,max:uO,min:hO}[n]||cO;return[t.flatMap(t=>o(t,a)),e]}},dO=(fO.props={},(t={})=>{var e=t["selector"],t=Z(t,["selector"]);return fO(Object.assign({x:e},t))}),pO=(dO.props={},(t={})=>{var e=t["selector"],t=Z(t,["selector"]);return fO(Object.assign({y:e},t))});function gO(e){return t=>null===t?e:e+" of "+t}function yO(){return[(t,e)=>e0(t,t=>+e[t]),gO("mean")]}function mO(){return[(t,e)=>n0(t,t=>+e[t]),gO("median")]}function vO(){return[(t,e)=>Kp(t,t=>+e[t]),gO("max")]}function bO(){return[(t,e)=>Jp(t,t=>+e[t]),gO("min")]}function xO(){return[(t,e)=>t.length,gO("count")]}function wO(){return[(t,e)=>a0(t,t=>+e[t]),gO("sum")]}function kO(){return[(t,e)=>e[t[0]],gO("first")]}function MO(){return[(t,e)=>e[t[t.length-1]],gO("last")]}pO.props={};const EO=(t={})=>{const a=t["groupBy"],l=Z(t,["groupBy"]);return(t,e)=>{const{data:o,encode:s}=e,c=a(t,e);var n,r,i;return c?(n=Object.entries(l).map(([t,e])=>{const[n,r]=function(t){if("function"==typeof t)return[t,null];var e={mean:yO,max:vO,count:xO,first:kO,last:MO,sum:wO,min:bO,median:mO}[t];if(e)return e();throw new Error(`Unknown reducer: ${t}.`)}(e),[i,a]=w3(s,t);return[t,v3(c.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]=w3(s,t);return[t,v3(c.map(t=>e[t[0]]),n)]}),i=c.map(t=>o[t[0]]),[Ab(c),R({},e,{data:i,encode:Object.fromEntries([...r,...n])})]):[t,e]}},OO=(EO.props={},(t={})=>{const{channels:n=["x","y"]}=t,e=Z(t,["channels"]);return EO(Object.assign(Object.assign({},e),{groupBy:(t,e)=>O3(n,t,e)}))}),SO=(OO.props={},(t={})=>OO(Object.assign(Object.assign({},t),{channels:["x","color","series"]}))),_O=(SO.props={},(t={})=>OO(Object.assign(Object.assign({},t),{channels:["y","color","series"]}))),AO=(_O.props={},(t={})=>OO(Object.assign(Object.assign({},t),{channels:["color"]})));function TO(t,e,n){var{reverse:r,slice:i,channel:a}=n,n=Z(n,["reverse","slice","channel"]),o=e["encode"];const[s]=w3(o,a);var c,n=function(t,e,n){const{by:r=t,reducer:i="max"}=e,[a]=w3(n,r);if("function"==typeof i)return t=>i(t,a);if("max"===i)return t=>Kp(t,t=>+a[t]);if("min"===i)return t=>Jp(t,t=>+a[t]);if("sum"===i)return t=>a0(t,t=>+a[t]);if("median"===i)return t=>n0(t,t=>+a[t]);if("mean"===i)return t=>e0(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,l=t=>s[t],(2!==(c=n).length?Dp(Fp(o,c,l),([t,e],[n,r])=>Mp(e,r)||Mp(t,n)):Dp(Rp(o,l),([t,e],[n,r])=>c(e,r)||Mp(t,n))).map(([t])=>t)),o=(r&&n.reverse(),"number"==typeof i?[0,i]:i),l=i?n.slice(...o):n;return[t,R(e,{scale:{[a]:{domain:l}}})]}AO.props={};const PO=(t={})=>{const{reverse:o=!1,slice:s,channel:c,ordinal:l=!0}=t,u=Z(t,["reverse","slice","channel","ordinal"]);return(t,e)=>{if(l)return TO(t,e,Object.assign({reverse:o,slice:s,channel:c},u));{var n=Object.assign({reverse:o,slice:s,channel:c},u);var{reverse:n,channel:r}=n,i=e["encode"];const[a]=w3(i,r);return i=Dp(t,t=>a[t]),n&&i.reverse(),[i,e]}}},LO=(PO.props={},(t={})=>PO(Object.assign(Object.assign({},t),{channel:"x"}))),NO=(LO.props={},(t={})=>PO(Object.assign(Object.assign({},t),{channel:"color"}))),CO=(NO.props={},(t={})=>PO(Object.assign(Object.assign({},t),{channel:"y"})));CO.props={};const jO=(t={})=>{const{field:o,channel:s="y",reducer:c="sum"}=t;return(t,e)=>{var{data:n,encode:r}=e;const[i]=w3(r,"x");var a,n=o?(n=n,"string"==typeof(a=o)?n.map(t=>t[a]):n.map(a)):w3(r,s)[0],r=Ip(t,function(e,n){if("function"==typeof e)return t=>e(t,n);if("sum"===e)return t=>a0(t,t=>+n[t]);throw new Error("Unknown reducer: "+e)}(c,n),t=>i[t]).map(t=>t[1]);return[t,R({},e,{scale:{x:{flex:r}}})]}};function RO(t,e,n){var r=t.length;if(0===r)return[];var{innerWidth:i,innerHeight:a}=n;let c=Math.ceil(Math.sqrt(e/(a/i))),l=i/c,u=Math.ceil(e/c),o=u*l;for(;o>a;)c+=1,l=i/c,u=Math.ceil(e/c),o=u*l;const h=a-u*l,f=u<=1?0:h/(u-1),[d,p]=u<=1?[(i-r*l)/(r-1),(a-l)/2]:[0,0];return t.map((t,e)=>{var[t,n,r,i]=Ob(t),a=e%c,e=Math.floor(e/c),o=a*l,s=(u-e-1)*l+h,r=l/r,i=l/i;return`translate(${o-t+d*a}, ${s-n-f*e-p}) scale(${r}, ${i})`})}jO.props={};const FO=()=>(t,e)=>[t,R({},e,{modifier:RO,axis:!1})],IO=(FO.props={},"thresholds");function BO(t){var[e,n]=Pp(t);return Math.min(200,(t=t,Math.ceil((n-e)*Math.cbrt(Ap(t))/(3.49*Tp(t)))))}const DO=(t={})=>{const{groupChannels:s=["color"],binChannels:c=["x","y"]}=t,l=Z(t,["groupChannels","binChannels"]),u={};return EO(Object.assign(Object.assign(Object.assign({},Object.fromEntries(Object.entries(l).filter(([t])=>!t.startsWith(IO)))),Object.fromEntries(c.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=c.map(t=>{var[t]=w3(n,t);return t}),a=J(l,IO),o=t.filter(e=>i.every(t=>J0(t[e]))),r=[...s.map(t=>{var[t]=w3(n,t);return t}).filter(J0).map(e=>t=>e[t]),...c.map((t,e)=>{const n=i[e];e=a[t]||BO(n),e=$p().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(Rp(o,e=>r.map(t=>t(e)).join("-")).values())}}))},GO=(DO.props={},(t={})=>{var e=t["thresholds"];return DO(Object.assign(Object.assign({},t),{thresholdsX:e,groupChannels:["color"],binChannels:["x"]}))});GO.props={};const zO=(t={})=>{const{groupBy:n,thresholds:o=2e3}=t,e=Z(t,["groupBy","thresholds"]);return EO(Object.assign(Object.assign({},e),{groupBy:(t,e)=>{t=O3(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}})}}))};zO.props={};var Eo="object"==typeof Fn&&Fn&&Fn.Object===Object&&Fn,go="object"==typeof self&&self&&self.Object===Object&&self,rl=Eo||go||Function("return this")(),Zc=rl.Symbol,Ko=Object.prototype,WO=Ko.hasOwnProperty,VO=Ko.toString,YO=Zc?Zc.toStringTag:void 0;var HO=Object.prototype.toString;var qO="[object Null]",UO="[object Undefined]",XO=Zc?Zc.toStringTag:void 0;function $O(t){if(null==t)return void 0===t?UO:qO;if(XO&&XO in Object(t)){var e=t,n=WO.call(e,YO),r=e[YO];try{var i=!(e[YO]=void 0)}catch(t){}var a=VO.call(e);return i&&(n?e[YO]=r:delete e[YO]),a}return HO.call(t)}function KO(t){return null!=t&&"object"==typeof t}var ZO=Array.isArray;function JO(t){return t}var QO="[object AsyncFunction]",t4="[object Function]",e4="[object GeneratorFunction]",n4="[object Proxy]";function r4(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}var i4=/^(?:0|[1-9]\d*)$/;var a4=9007199254740991;function o4(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=a4}function s4(t){return null!=t&&o4(t.length)&&!function(t){var e;if(e=typeof t,null!=t&&("object"==e||"function"==e))return(e=$O(t))==t4||e==e4||e==QO||e==n4}(t)}var c4=Object.prototype;function l4(t){return KO(t)&&"[object Arguments]"==$O(t)}var sl=Object.prototype,u4=sl.hasOwnProperty,h4=sl.propertyIsEnumerable,f4=l4(function(){return arguments}())?l4:function(t){return KO(t)&&u4.call(t,"callee")&&!h4.call(t,"callee")};var ol="object"==typeof h&&h&&!h.nodeType&&h,fl=ol&&"object"==typeof module&&module&&!module.nodeType&&module,el=fl&&fl.exports===ol?rl.Buffer:void 0,d4=(el?el.isBuffer:void 0)||function(){return!1},p4={};p4["[object Float32Array]"]=p4["[object Float64Array]"]=p4["[object Int8Array]"]=p4["[object Int16Array]"]=p4["[object Int32Array]"]=p4["[object Uint8Array]"]=p4["[object Uint8ClampedArray]"]=p4["[object Uint16Array]"]=p4["[object Uint32Array]"]=!0,p4["[object Arguments]"]=p4["[object Array]"]=p4["[object ArrayBuffer]"]=p4["[object Boolean]"]=p4["[object DataView]"]=p4["[object Date]"]=p4["[object Error]"]=p4["[object Function]"]=p4["[object Map]"]=p4["[object Number]"]=p4["[object Object]"]=p4["[object RegExp]"]=p4["[object Set]"]=p4["[object String]"]=p4["[object WeakMap]"]=!1;var g4,Mc="object"==typeof h&&h&&!h.nodeType&&h,y4=Mc&&"object"==typeof module&&module&&!module.nodeType&&module,m4=y4&&y4.exports===Mc&&Eo.process,sw=function(){try{var t=y4&&y4.require&&y4.require("util").types;return t?t:m4&&m4.binding&&m4.binding("util")}catch(t){}}(),Ao=sw&&sw.isTypedArray,v4=Ao?(g4=Ao,function(t){return g4(t)}):function(t){return KO(t)&&o4(t.length)&&!!p4[$O(t)]},b4=Object.prototype.hasOwnProperty;function x4(t,e){var n,r,i,a,o=ZO(t),s=!o&&f4(t),c=!o&&!s&&d4(t),l=!o&&!s&&!c&&v4(t),u=o||s||c||l,h=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],f=h.length;for(n in t)!e&&!b4.call(t,n)||u&&("length"==n||c&&("offset"==n||"parent"==n)||l&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||(a=void 0,a=typeof(r=n),(i=null==(i=f)?9007199254740991:i)&&("number"==a||"symbol"!=a&&i4.test(r))&&-1<r&&r%1==0&&r<i))||h.push(n);return h}w4=Object.keys,k4=Object;var w4,k4,M4=function(t){return w4(k4(t))},E4=Object.prototype.hasOwnProperty;function O4(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||c4))return M4(t);var e,n,r,i=[];for(r in Object(t))E4.call(t,r)&&"constructor"!=r&&i.push(r);return i}function S4(t){return(s4(t)?x4:O4)(t)}var _4,A4=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[_4?o:++r];if(!1===e(i[s],s,i))break}return t};P4=function(t,e){return t&&A4(t,e,S4)};function T4(t,e){if(null!=t){if(!s4(t))return P4(t,e);for(var n=t.length,r=L4?n:-1,i=Object(t);(L4?r--:++r<n)&&!1!==e(i[r],r,i););}return t}var P4,L4;function N4(t,e){(ZO(t)?r4:T4)(t,"function"==typeof(t=e)?t:JO)}function C4(t,e,n){return e<=t&&t<=n}function j4(t){return Math.abs(t)<1e-6?0:t<0?-1:1}function R4(t,e,n){var r=!1,i=t.length;if(!(i<=2)){for(var a,o,s,c=0;c<i;c++){var l=t[c],u=t[(c+1)%i];if(o=u,((s=[e,n])[0]-(a=l)[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<j4(l[1]-n)!=0<j4(u[1]-n)&&j4(e-(n-l[1])*(l[0]-u[0])/(l[1]-u[1])-l[0])<0&&(r=!r)}return r}}function F4(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 I4(t,l){var u=!1;return N4(t,function(t){if(e=t.from,t=t.to,n=l.from,r=l.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,c=null,c=.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}:c)return!(u=!0);var e,n,r,i,a,o,s,c}),u}function B4(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 D4(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 z4=()=>(n,t)=>{var r=[];n.sort((t,e)=>Mp(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=B4(e),o=B4(n);if(t=t,!((o=o).minX>t.maxX||o.maxX<t.minX||o.minY>t.maxY||o.maxY<t.minY))return r=!1,N4(n,function(t){if(R4(e,t[0],t[1]))return!(r=!0)}),r?1:(N4(e,function(t){if(R4(n,t[0],t[1]))return!(r=!0)}),r||(i=F4(e),o=F4(n),a=!1,N4(o,function(t){if(I4(i,t))return!(a=!0)}),a))}}(D4(i),D4(a))){i.style.visibility="hidden",e=!0;break}}e||r.push(i)}return n};function W4(){const n=new Map;return[t=>n.get(t),(t,e)=>n.set(t,e)]}const V4=t=>{const{maxIter:k=10,maxError:M=.1,padding:E=1}=t;return i=>{var e=i.length;if(!(e<=1)){const[g,y]=W4(),[m,v]=W4();var a,o,s,c,[l,t]=W4(),[u,n]=W4();for(const b of i){var{min:r,max:h}=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,h]=h;y(b,g),v(b,g),t(b,h-g),n(b,[x,r])}for(let t=0;t<k;t++){i.sort((t,e)=>Mp(m(t),m(e)));let r=0;for(let n=0;n<e-1;n++){var f=i[n];let t=n+1,e;for(;(e=i[t])&&([[a,o],[s,c]]=[u(f),u(e)],!(a<c&&s<o));)t+=1;if(e){const g=m(f);var d=l(f),p=m(e),d=p-(g+d);d<E&&(d=(E-d)/2,r=Math.max(r,d),v(f,g-d),v(e,p+d))}}if(r<M)break}for(const w of i)w.style.y+=m(w)-g(w)}return i}},Y4=t=>{const{edgeDistance:i=0}=t;return(t,e)=>{if(f0(e)){var{x:n,width:r}=e.getOptions();const a=e.getCenter();e=tg(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=wb([n,r],a),r=wb([0,i],a),i=n[1]?n[0]*r[1]/n[1]+a[0]:e;t.style.connectorPoints=[[i-e,0]]})}return t}},H4=t=>(t,e)=>{if(f0(e)){const a=e.getCenter(),o=t.reduce((t,e)=>{var{x0:e,y0:n,offset:r=0}=e.style;return Math.max(t,kb(a,[e,n])+r)},0);t.forEach(t=>{var{x0:e,y0:n,connector:r,connectorLength2:i=0}=t.style,e=Eb([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,q4=1e-12,T=Math.PI,U4=T/2,X4=T/4,$4=2*T,K4=180/T,Z4=T/180,J4=Math.abs,Q4=Math.atan,tS=Math.atan2,L=Math.cos,eS=Math.ceil,nS=Math.exp,rS=Math.log,iS=Math.pow,C=Math.sin,aS=Math.sign||function(t){return 0<t?1:t<0?-1:0},oS=Math.sqrt,sS=Math.tan;function cS(t){return 1<t?0:t<-1?T:Math.acos(t)}function lS(t){return 1<t?U4:t<-1?-U4:Math.asin(t)}function uS(){}function hS(t,e){t&&dS.hasOwnProperty(t.type)&&dS[t.type](t,e)}var fS={Feature:function(t,e){hS(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)hS(n[r].geometry,e)}},dS={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){pS(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)pS(n[r],e,0)},Polygon:function(t,e){gS(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)gS(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)hS(n[r],e)}};function pS(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 gS(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)pS(t[n],e,1);e.polygonEnd()}function yS(t,e){t&&fS.hasOwnProperty(t.type)?fS[t.type](t,e):hS(t,e)}function mS(t){return[tS(t[1],t[0]),lS(t[2])]}function vS(t){var e=t[0],t=t[1],n=L(t);return[n*L(e),n*C(e),C(t)]}function bS(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function xS(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 wS(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function kS(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function MS(t){var e=oS(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function ES(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 OS(t,e){return[J4(t)>T?t+Math.round(-t/$4)*$4:t,e]}function SS(t,e,n){return(t%=$4)?e||n?ES(AS(t),TS(e,n)):AS(t):e||n?TS(e,n):OS}function _S(n){return function(t,e){return[T<(t+=n)?t-$4:t<-T?t+$4:t,e]}}function AS(t){var e=_S(t);return e.invert=_S(-t),e}function TS(t,e){var i=L(t),a=C(t),o=L(e),s=C(e);function n(t,e){var n=L(e),r=L(t)*n,t=C(t)*n,n=C(e),e=n*i+r*a;return[tS(t*o-e*s,r*i-n*a),lS(e*o+t*s)]}return n.invert=function(t,e){var n=L(e),r=L(t)*n,t=C(t)*n,n=C(e),e=n*o-t*s;return[tS(t*o+n*s,r*i+e*a),lS(e*i-r*a)]},n}function PS(t,e){(e=vS(e))[0]-=t,MS(e);t=cS(-e[1]);return((-e[2]<0?-t:t)+$4-P)%$4}function LS(){var r,e=[];return{point:function(t,e,n){r.push([t,e,n])},lineStart:function(){e.push(r=[])},lineEnd:uS,rejoin:function(){1<e.length&&e.push(e.pop().concat(e.shift()))},result:function(){var t=e;return e=[],r=null,t}}}function NS(t,e){return J4(t[0]-e[0])<P&&J4(t[1]-e[1])<P}function CS(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 jS(t,e,n,r,a){var o,i,s=[],c=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],i=t[e];if(NS(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 CS(r,t,null,!0)),c.push(n.o=new CS(r,null,n,!1)),s.push(n=new CS(i,t,null,!1)),c.push(n.o=new CS(i,null,n,!0))}}),s.length){for(c.sort(e),RS(s),RS(c),o=0,i=c.length;o<i;++o)c[o].e=n=!n;for(var l,u,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;l=f.z,a.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(o=0,i=l.length;o<i;++o)a.point((u=l[o])[0],u[1]);else r(f.x,f.n.x,1,a);f=f.n}else{if(d)for(l=f.p.z,o=l.length-1;0<=o;--o)a.point((u=l[o])[0],u[1]);else r(f.x,f.p.x,-1,a);f=f.p}}while(l=(f=f.o).z,d=!d,!f.v);a.lineEnd()}}}function RS(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 FS(t){return J4(t[0])<=T?t[0]:aS(t[0])*((J4(t[0])+T)%$4-T)}function IS(y,m,v,b){return function(s){var c,l,u,n=m(s),h=LS(),f=m(h),d=!1,e={point:r,lineStart:i,lineEnd:a,polygonStart:function(){e.point=p,e.lineStart=o,e.lineEnd=g,l=[],c=[]},polygonEnd:function(){e.point=r,e.lineStart=i,e.lineEnd=a,l=r0(l);var t=function(t,e){var n=FS(e),r=e[1],e=C(r),i=[C(n),-L(n),0],a=0,o=0,s=new Lp;1===e?r=U4+P:-1===e&&(r=-U4-P);for(var c=0,l=t.length;c<l;++c)if(h=(u=t[c]).length)for(var u,h,f=u[h-1],d=FS(f),p=f[1]/2+X4,g=C(p),y=L(p),m=0;m<h;++m,d=b,g=w,y=x,f=v){var v=u[m],b=FS(v),x=v[1]/2+X4,w=C(x),x=L(x),k=b-d,M=0<=k?1:-1,E=M*k,O=T<E,S=g*w;s.add(tS(S*M*C(E),y*x+S*L(E))),a+=O?k+M*$4:k,O^n<=d^n<=b&&(MS(S=xS(vS(f),vS(v))),MS(E=xS(i,S)),(M=(O^0<=k?-1:1)*lS(E[2]))<r||r===M&&(S[0]||S[1]))&&(o+=O^0<=k?1:-1)}return(a<-P||a<P&&s<-q4)^1&o}(c,b);l.length?(d||(s.polygonStart(),d=!0),jS(l,DS,t,v,s)):t&&(d||(s.polygonStart(),d=!0),s.lineStart(),v(null,null,1,s),s.lineEnd()),d&&(s.polygonEnd(),d=!1),l=c=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]),f.point(t,e)}function o(){f.lineStart(),u=[]}function g(){p(u[0][0],u[0][1]),f.lineEnd();var t,e,n,r,i=f.clean(),a=h.result(),o=a.length;if(u.pop(),c.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())),l.push(a.filter(BS))}return e}}function BS(t){return 1<t.length}function DS(t,e){return((t=t.x)[0]<0?t[1]-U4-P:U4-t[1])-((e=e.x)[0]<0?e[1]-U4-P:U4-e[1])}OS.invert=OS;var GS=IS(function(){return 1},function(l){var u,h=NaN,f=NaN,d=NaN;return{lineStart:function(){l.lineStart(),u=1},point:function(t,e){var n,r,i,a,o,s=0<t?T:-T,c=J4(t-h);J4(c-T)<P?(l.point(h,f=0<(f+e)/2?U4:-U4),l.point(d,f),l.lineEnd(),l.lineStart(),l.point(s,f),l.point(t,f),u=0):d!==s&&T<=c&&(J4(h-d)<P&&(h-=d*P),J4(t-s)<P&&(t-=s*P),c=f,i=e,o=C((n=h)-(r=t)),f=J4(o)>P?Q4((C(c)*(a=L(i))*C(r)-C(i)*(r=L(c))*C(n))/(r*a*o)):(c+i)/2,l.point(d,f),l.lineEnd(),l.lineStart(),l.point(s,f),u=0),l.point(h=t,f=e),d=s},lineEnd:function(){l.lineEnd(),h=f=NaN},clean:function(){return 2-u}}},function(t,e,n,r){var i;null==t?(i=n*U4,r.point(-T,i),r.point(0,i),r.point(T,i),r.point(T,0),r.point(T,-i),r.point(0,-i),r.point(-T,-i),r.point(-T,0),r.point(-T,i)):J4(t[0]-e[0])>P?(t=t[0]<e[0]?T:-T,i=n*t/2,r.point(-t,i),r.point(0,i),r.point(t,i)):r.point(e[0],e[1])},[-T,-U4]);function zS(d){var g=L(d),p=6*Z4,h=0<g,f=J4(g)>P;function y(t,e){return L(t)*L(e)>g}function m(t,e,n){var r,i,a,o,s,c,l,u=[1,0,0],h=xS(vS(t),vS(e)),f=bS(h,h),d=h[0],p=f-d*d;return p?(r=xS(u,h),wS(u=kS(u,g*f/p),kS(h,-g*d/p)),(p=(h=bS(u,f=r))*h-(d=bS(f,f))*(bS(u,u)-1))<0?void 0:(wS(p=kS(f,(-h-(r=oS(p)))/d),u),p=mS(p),n?(i=t[0],a=e[0],o=t[1],e=e[1],a<i&&(l=i,i=a,a=l),!(c=J4((s=a-i)-T)<P)&&e<o&&(l=o,o=e,e=l),(c||s<P?c?0<o+e^p[1]<(J4(p[0]-i)<P?o:e):o<=p[1]&&p[1]<=e:T<s^(i<=p[0]&&p[0]<=a))?(wS(l=kS(f,(-h+r)/d),u),[p,mS(l)]):void 0):p)):!n&&t}function v(t,e){var n=h?d:T-d,r=0;return t<-n?r|=1:n<t&&(r|=2),e<-n?r|=4:n<e&&(r|=8),r}return IS(y,function(a){var o,s,c,l,u;return{lineStart:function(){l=c=!1,u=1},point:function(t,e){var n,r=[t,e],i=y(t,e),t=h?i?0:v(t,e):i?v(t+(t<0?T:-T),e):0;!o&&(l=c=i)&&a.lineStart(),i===c||(n=m(o,r))&&!NS(o,n)&&!NS(r,n)||(r[2]=1),i!==c?(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):f&&o&&h^i&&(t&s||!(e=m(r,o,!0))||(u=0,h?(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&&NS(o,r)||a.point(r[0],r[1]),o=r,c=i,s=t},lineEnd:function(){c&&a.lineEnd(),o=null},clean:function(){return u|(l&&c)<<1}}},function(t,e,n,r){var i=r,r=d,a=p,o=n,n=t,s=e;if(a){var c=L(r),l=C(r),u=o*a;null==n?(n=r+o*$4,s=r-u/2):(n=PS(c,n),s=PS(c,s),(0<o?n<s:s<n)&&(n+=o*$4));for(var h,f=n;0<o?s<f:f<s;f-=u)h=mS([c,-l*L(f),-l*C(f)]),i.point(h[0],h[1])}},h?[0,-d]:[-T,d-T])}var WS=1e9,VS=-WS;function YS(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 J4(t[0]-m)<P?0<e?0:3:J4(t[0]-b)<P?0<e?2:1:J4(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,h,a,o,s,c,l,u,f,d,p,g=r,t=LS(),e={point:n,lineStart:function(){e.point=y,h&&h.push(a=[]);d=!0,f=!1,l=u=NaN},lineEnd:function(){i&&(y(o,s),c&&f&&t.rejoin(),i.push(t.result()));e.point=n,f&&g.lineEnd()},polygonStart:function(){g=t,i=[],h=[],p=!0},polygonEnd:function(){var t=function(){for(var t=0,e=0,n=h.length;e<n;++e)for(var r,i,a=h[e],o=1,s=a.length,c=a[0],l=c[0],u=c[1];o<s;++o)r=l,i=u,c=a[o],l=c[0],u=c[1],i<=x?x<u&&(u-i)*(m-r)<(l-r)*(x-i)&&++t:u<=x&&(l-r)*(x-i)<(u-i)*(m-r)&&--t;return t}(),e=p&&t,n=(i=r0(i)).length;(e||n)&&(r.polygonStart(),e&&(r.lineStart(),k(null,null,1,r),r.lineEnd()),n&&jS(i,M,t,k,r),r.polygonEnd());g=r,i=h=a=null}};function n(t,e){w(t,e)&&g.point(t,e)}function y(t,e){var n,r,i=w(t,e);h&&a.push([t,e]),d?(o=t,s=e,d=!1,(c=i)&&(g.lineStart(),g.point(t,e))):i&&f?g.point(t,e):!function(t,e,n,r,i,a){var o=t[0],s=t[1],c=0,l=1,u=e[0]-o,h=e[1]-s,n=n-o;if(u||!(0<n)){if(n/=u,u<0){if(n<c)return;n<l&&(l=n)}else if(0<u){if(l<n)return;c<n&&(c=n)}if(n=i-o,u||!(n<0)){if(n/=u,u<0){if(l<n)return;c<n&&(c=n)}else if(0<u){if(n<c)return;n<l&&(l=n)}if(n=r-s,h||!(0<n)){if(n/=h,h<0){if(n<c)return;n<l&&(l=n)}else if(0<h){if(l<n)return;c<n&&(c=n)}if(n=a-s,h||!(n<0)){if(n/=h,h<0){if(l<n)return;c<n&&(c=n)}else if(0<h){if(n<c)return;n<l&&(l=n)}return 0<c&&(t[0]=o+c*u,t[1]=s+c*h),l<1&&(e[0]=o+l*u,e[1]=s+l*h),1}}}}}(n=[l=Math.max(VS,Math.min(WS,l)),u=Math.max(VS,Math.min(WS,u))],r=[t=Math.max(VS,Math.min(WS,t)),e=Math.max(VS,Math.min(WS,e))],m,v,b,x)?i&&(g.lineStart(),g.point(t,e),p=!1):(f||(g.lineStart(),g.point(n[0],n[1])),g.point(r[0],r[1]),i||g.lineEnd(),p=!1),l=t,u=e,f=i}return e}}function HS(t,e,n){var r=i0(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[e,t]})}}function qS(t,e,n){var r=i0(t,e-P,n).concat(e);return function(e){return r.map(function(t){return[t,e]})}}function US(){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:[f(a).concat(d(c).slice(1),f(i).reverse().slice(1),d(l).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],l=+t[0][1],c=+t[1][1],i<a&&(t=a,a=i,i=t),c<l&&(t=l,l=c,c=t),e.precision(v)):[[a,l],[i,c]]},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=HS(s,o,90),h=qS(r,n,v),f=HS(l,c,90),d=qS(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 i0(eS(a/y)*y,i,y).map(f).concat(i0(eS(l/m)*m,c,m).map(d)).concat(i0(eS(r/p)*p,n,p).filter(function(t){return J4(t%y)>P}).map(u)).concat(i0(eS(s/g)*g,o,g).filter(function(t){return J4(t%m)>P}).map(h))}var n,r,i,a,o,s,c,l,u,h,f,d,p,g,y,m,v}var XS,$S,KS,ZS,JS=t=>t,QS=new Lp,t_=new Lp,e_={point:uS,lineStart:uS,lineEnd:uS,polygonStart:function(){e_.lineStart=n_,e_.lineEnd=a_},polygonEnd:function(){e_.lineStart=e_.lineEnd=e_.point=uS,QS.add(J4(t_)),t_=new Lp},result:function(){var t=QS/2;return QS=new Lp,t}};function n_(){e_.point=r_}function r_(t,e){e_.point=i_,XS=KS=t,$S=ZS=e}function i_(t,e){t_.add(ZS*t-KS*e),KS=t,ZS=e}function a_(){i_(XS,$S)}var o_=e_,s_=1/0,c_=s_,l_=-s_,u_=l_;var h_,f_,d_,p_,g_={point:function(t,e){t<s_&&(s_=t);l_<t&&(l_=t);e<c_&&(c_=e);u_<e&&(u_=e)},lineStart:uS,lineEnd:uS,polygonStart:uS,polygonEnd:uS,result:function(){var t=[[s_,c_],[l_,u_]];return l_=u_=-(c_=s_=1/0),t}},y_=0,m_=0,v_=0,b_=0,x_=0,w_=0,k_=0,M_=0,E_=0,O_={point:S_,lineStart:__,lineEnd:P_,polygonStart:function(){O_.lineStart=L_,O_.lineEnd=N_},polygonEnd:function(){O_.point=S_,O_.lineStart=__,O_.lineEnd=P_},result:function(){var t=E_?[k_/E_,M_/E_]:w_?[b_/w_,x_/w_]:v_?[y_/v_,m_/v_]:[NaN,NaN];return y_=m_=v_=b_=x_=w_=k_=M_=E_=0,t}};function S_(t,e){y_+=t,m_+=e,++v_}function __(){O_.point=A_}function A_(t,e){O_.point=T_,S_(d_=t,p_=e)}function T_(t,e){var n=t-d_,r=e-p_,n=oS(n*n+r*r);b_+=n*(d_+t)/2,x_+=n*(p_+e)/2,w_+=n,S_(d_=t,p_=e)}function P_(){O_.point=S_}function L_(){O_.point=C_}function N_(){j_(h_,f_)}function C_(t,e){O_.point=j_,S_(h_=d_=t,f_=p_=e)}function j_(t,e){var n=t-d_,r=e-p_,n=oS(n*n+r*r);b_+=n*(d_+t)/2,x_+=n*(p_+e)/2,w_+=n,k_+=(n=p_*t-d_*e)*(d_+t),M_+=n*(p_+e),E_+=3*n,S_(d_=t,p_=e)}var R_=O_;function F_(t){this._context=t}F_.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:uS};var I_,B_,D_,G_,z_,W_=new Lp,V_={point:uS,lineStart:function(){V_.point=Y_},lineEnd:function(){I_&&H_(B_,D_),V_.point=uS},polygonStart:function(){I_=!0},polygonEnd:function(){I_=null},result:function(){var t=+W_;return W_=new Lp,t}};function Y_(t,e){V_.point=H_,B_=G_=t,D_=z_=e}function H_(t,e){G_-=t,z_-=e,W_.add(oS(G_*G_+z_*z_)),G_=t,z_=e}var q_=V_;function U_(){this._string=[]}function X_(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function $_(e,n){var r,i,a=4.5;function o(t){return t&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),yS(t,r(i))),i.result()}return o.area=function(t){return yS(t,r(o_)),o_.result()},o.measure=function(t){return yS(t,r(q_)),q_.result()},o.bounds=function(t){return yS(t,r(g_)),g_.result()},o.centroid=function(t){return yS(t,r(R_)),R_.result()},o.projection=function(t){return arguments.length?(r=null==t?(e=null,JS):(e=t).stream,o):e},o.context=function(t){return arguments.length?(i=null==t?(n=null,new U_):new F_(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 K_(r){return function(t){var e,n=new Z_;for(e in r)n[e]=r[e];return n.stream=t,n}}function Z_(){}function J_(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),yS(n,t.stream(g_)),e(g_.result()),null!=r&&t.clipExtent(r),t}function Q_(i,a,t){return J_(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 tA(t,e,n){return Q_(t,[[0,0],e],n)}function eA(r,i,t){return J_(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 nA(i,a,t){return J_(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)}U_.prototype={_radius:4.5,_circle:X_(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=X_(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}},Z_.prototype={constructor:Z_,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 rA=16,iA=L(30*Z4);function aA(t,e){return+e?(_=t,A=e,function(r){var n,i,a,o,s,c,l,u,h,f,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=_(t,e),r.point(t[0],t[1])}function e(){u=NaN,g.point=y,r.lineStart()}function y(t,e){var n=vS([t,e]),e=_(t,e);T(u,h,l,f,d,p,u=e[0],h=e[1],l=t,f=n[0],d=n[1],p=n[2],rA,r),r.point(u,h)}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=h,o=f,s=d,c=p,g.point=y}function x(){T(u,h,l,f,d,p,i,a,n,o,s,c,rA,r),g.lineEnd=m,m()}return g}):(n=t,K_({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}}));var n,_,A;function T(t,e,n,r,i,a,o,s,c,l,u,h,f,d){var p,g,y,m,v,b,x,w,k,M,E=o-t,O=s-e,S=E*E+O*O;4*A<S&&f--&&(y=a+h,x=lS(y/=m=oS((p=r+l)*p+(g=i+u)*g+y*y)),v=J4(J4(y)-1)<P||J4(n-c)<P?(n+c)/2:tS(g,p),b=(x=_(v,x))[0],x=x[1],A<(M=O*(w=b-t)-E*(k=x-e))*M/S||.3<J4((E*w+O*k)/S-.5)||r*l+i*u+a*h<iA)&&(T(t,e,n,r,i,a,b,x,v,p/=m,g/=m,y,f,d),d.point(b,x),T(b,x,v,p,g,y,o,s,c,l,u,h,f,d))}}var oA=K_({point:function(t,e){this.stream.point(t*Z4,e*Z4)}});function sA(t,n,r,i,a,e){var o,s,c,l,u,h,f,d,p,g,y,m;return e?(h=L(e),e=C(e),f=h*t,d=e*t,p=h/t,g=e/t,y=(e*r-h*n)/t,m=(e*n+h*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,c=r,l=i,u=a,v.invert=function(t,e){return[(t-s)/o*l,(c-e)/o*u]},v);function v(t,e){return[s+o*(t*=l),c-o*(e*=u)]}function b(t,e){return[f*(t*=i)-d*(e*=a)+n,r-d*t-f*e]}}function cA(t){return lA(function(){return t})()}function lA(t){var e,r,n,i,a,o,s,c,l,u,h=150,f=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,x=1,w=1,k=null,M=GS,E=null,O=JS,S=.5;function _(t){return c(t[0]*Z4,t[1]*Z4)}function A(t){return(t=c.invert(t[0],t[1]))&&[t[0]*K4,t[1]*K4]}function T(){var t=sA(h,0,0,x,w,b).apply(null,e(p,g)),t=sA(h,f-t[0],d-t[1],x,w,b);return r=SS(y,m,v),s=ES(e,t),c=ES(r,s),o=aA(s,S),P()}function P(){return l=u=null,_}return _.stream=function(t){return l&&u===t?l:l=oA((n=r,K_({point:function(t,e){t=n(t,e);return this.stream.point(t[0],t[1])}})(M(o(O(u=t))))));var n},_.preclip=function(t){return arguments.length?(M=t,k=void 0,P()):M},_.postclip=function(t){return arguments.length?(O=t,E=n=i=a=null,P()):O},_.clipAngle=function(t){return arguments.length?(M=+t?zS(k=t*Z4):(k=null,GS),P()):k*K4},_.clipExtent=function(t){return arguments.length?(O=null==t?(E=n=i=a=null,JS):YS(E=+t[0][0],n=+t[0][1],i=+t[1][0],a=+t[1][1]),P()):null==E?null:[[E,n],[i,a]]},_.scale=function(t){return arguments.length?(h=+t,T()):h},_.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],T()):[f,d]},_.center=function(t){return arguments.length?(p=t[0]%360*Z4,g=t[1]%360*Z4,T()):[p*K4,g*K4]},_.rotate=function(t){return arguments.length?(y=t[0]%360*Z4,m=t[1]%360*Z4,v=2<t.length?t[2]%360*Z4:0,T()):[y*K4,m*K4,v*K4]},_.angle=function(t){return arguments.length?(b=t%360*Z4,T()):b*K4},_.reflectX=function(t){return arguments.length?(x=t?-1:1,T()):x<0},_.reflectY=function(t){return arguments.length?(w=t?-1:1,T()):w<0},_.precision=function(t){return arguments.length?(o=aA(s,S=t*t),P()):oS(S)},_.fitExtent=function(t,e){return Q_(_,t,e)},_.fitSize=function(t,e){return tA(_,t,e)},_.fitWidth=function(t,e){return eA(_,t,e)},_.fitHeight=function(t,e){return nA(_,t,e)},function(){return e=t.apply(this,arguments),_.invert=e.invert&&A,T()}}function uA(t){var e=0,n=T/3,r=lA(t),t=r(e,n);return t.parallels=function(t){return arguments.length?r(e=t[0]*Z4,n=t[1]*Z4):[e*K4,n*K4]},t}function hA(t,e){var n,r,i,a=C(t),o=(a+C(e))/2;return J4(o)<P?(n=L(t),s.invert=function(t,e){return[t/n,lS(e*n)]},s):(i=oS(r=1+a*(2*o-a))/o,c.invert=function(t,e){var e=i-e,n=tS(t,J4(e))*aS(e);return e*o<0&&(n-=T*aS(t)*aS(e)),[n/o,lS((r-(t*t+e*e)*o*o)/(2*o))]},c);function s(t,e){return[t*n,C(e)/n]}function c(t,e){e=oS(r-2*o*C(e))/o;return[e*C(t*=o),i-e*L(t)]}}function fA(){return uA(hA).scale(155.424).center([0,33.6442])}function dA(){return fA().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function pA(i){return function(t,e){var n=L(t),r=L(e),n=i(n*r);return n===1/0?[2,0]:[n*r*C(t),n*C(e)]}}function gA(a){return function(t,e){var n=oS(t*t+e*e),r=a(n),i=C(r),r=L(r);return[tS(t*i,n*r),lS(n&&e*i/n)]}}var yA=pA(function(t){return oS(2/(1+t))});yA.invert=gA(function(t){return 2*lS(t/2)});var mA=pA(function(t){return(t=cS(t))&&t/C(t)});function vA(t,e){return[t,rS(sS((U4+e)/2))]}function bA(r){var i,a,o,s=cA(r),e=s.center,c=s.scale,n=s.translate,l=s.clipExtent,u=null;function h(){var e,t=T*c(),n=s((e=SS((e=s.rotate())[0]*Z4,e[1]*Z4,2<e.length?e[2]*Z4:0),function(t){return(t=e.invert(t[0]*Z4,t[1]*Z4))[0]*=K4,t[1]*=K4,t}([0,0])));return l(null==u?[[n[0]-t,n[1]-t],[n[0]+t,n[1]+t]]:r===vA?[[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?(c(t),h):c)()},s.translate=function(t){return(arguments.length?(n(t),h):n)()},s.center=function(t){return(arguments.length?(e(t),h):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]),h()):null==u?null:[[u,i],[a,o]]},h()}function xA(t){return sS((U4+t)/2)}function wA(t,e){var n=L(t),i=t===e?C(t):rS(n/L(e))/rS(xA(e)/xA(t)),a=n*iS(xA(t),i)/i;return i?(r.invert=function(t,e){var e=a-e,n=aS(i)*oS(t*t+e*e),r=tS(t,J4(e))*aS(e);return e*i<0&&(r-=T*aS(t)*aS(e)),[r/i,2*Q4(iS(a/n,1/i))-U4]},r):vA;function r(t,e){0<a?e<-U4+P&&(e=-U4+P):U4-P<e&&(e=U4-P);e=a/iS(xA(e),i);return[e*C(i*t),a-e*L(i*t)]}}function kA(t,e){return[t,e]}function MA(t,e){var n=L(t),r=t===e?C(t):(n-L(e))/(e-t),i=n/r+t;return J4(r)<P?kA:(a.invert=function(t,e){var e=i-e,n=tS(t,J4(e))*aS(e);return e*r<0&&(n-=T*aS(t)*aS(e)),[n/r,i-aS(r)*oS(t*t+e*e)]},a);function a(t,e){e=i-e,t*=r;return[e*C(t),i-e*L(t)]}}mA.invert=gA(function(t){return t}),vA.invert=function(t,e){return[t,2*Q4(nS(e))-U4]},kA.invert=kA;var EA=1.340264,OA=-.081106,SA=893e-6,_A=.003796,AA=oS(3)/2;function TA(t,e){var e=lS(AA*C(e)),n=e*e,r=n*n*n;return[t*L(e)/(AA*(EA+3*OA*n+r*(7*SA+9*_A*n))),e*(EA+OA*n+r*(SA+_A*n))]}function PA(t,e){var n=L(e),r=L(t)*n;return[n*C(t)/r,C(e)/r]}function LA(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 NA(t,e){return[L(e)*C(t),C(e)]}function CA(t,e){var n=L(e),r=1+L(t)*n;return[n*C(t)/r,C(e)/r]}function jA(t,e){return[rS(sS((U4+e)/2)),-t]}TA.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*(EA+OA*i+a*(SA+_A*i))-e)/(EA+3*OA*i+a*(7*SA+9*_A*i)))*r)*i*i,!(J4(n)<q4));++o);return[AA*t*(EA+3*OA*i+a*(7*SA+9*_A*i))/L(r),lS(C(r)/AA)]},PA.invert=gA(Q4),LA.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))),J4(a)>P&&0<--r);return[t/(.8707+(i=n*n)*(i*(i*i*i*(.003971-.001529*i)-.013791)-.131979)),n]},NA.invert=gA(lS),CA.invert=gA(function(t){return 2*Q4(t)}),jA.invert=function(t,e){return[-e,2*Q4(nS(t))-U4]};var RA=Object.freeze({__proto__:null,geoAlbersUsa:function(){var e,n,i,a,o,r,s=dA(),c=fA().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=fA().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){r=[t,e]}};function h(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 f(){return e=n=null,h}return h.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?c:.166<=n&&n<.234&&-.214<=r&&r<-.115?l:s).invert(t)},h.stream=function(t){return e&&n===t?e:(r=[s.stream(n=t),c.stream(t),l.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},h.precision=function(t){return arguments.length?(s.precision(t),c.precision(t),l.precision(t),f()):s.precision()},h.scale=function(t){return arguments.length?(s.scale(t),c.scale(.35*t),l.scale(t),h.translate(s.translate())):s.scale()},h.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=c.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=l.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),f()):s.translate()},h.fitExtent=function(t,e){return Q_(h,t,e)},h.fitSize=function(t,e){return tA(h,t,e)},h.fitWidth=function(t,e){return eA(h,t,e)},h.fitHeight=function(t,e){return nA(h,t,e)},h.scale(1070)},geoAlbers:dA,geoAzimuthalEqualArea:function(){return cA(yA).scale(124.75).clipAngle(179.999)},geoAzimuthalEqualAreaRaw:yA,geoAzimuthalEquidistant:function(){return cA(mA).scale(79.4188).clipAngle(179.999)},geoAzimuthalEquidistantRaw:mA,geoConicConformal:function(){return uA(wA).scale(109.5).parallels([30,30])},geoConicConformalRaw:wA,geoConicEqualArea:fA,geoConicEqualAreaRaw:hA,geoConicEquidistant:function(){return uA(MA).scale(131.154).center([0,13.9389])},geoConicEquidistantRaw:MA,geoEqualEarth:function(){return cA(TA).scale(177.158)},geoEqualEarthRaw:TA,geoEquirectangular:function(){return cA(kA).scale(152.63)},geoEquirectangularRaw:kA,geoGnomonic:function(){return cA(PA).scale(144.049).clipAngle(60)},geoGnomonicRaw:PA,geoIdentity:function(){var r,i,e,n,a,o,s,c=1,l=0,u=0,h=1,f=1,d=0,p=null,g=1,y=1,m=K_({point:function(t,e){t=x([t,e]);this.stream.point(t[0],t[1])}}),v=JS;function b(){return g=c*h,y=c*f,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+l,t+u]}return x.invert=function(t){var e,n=t[0]-l,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,JS):YS(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?(c=+t,b()):c},x.translate=function(t){return arguments.length?(l=+t[0],u=+t[1],b()):[l,u]},x.angle=function(t){return arguments.length?(i=C(d=t%360*Z4),r=L(d),b()):d*K4},x.reflectX=function(t){return arguments.length?(h=t?-1:1,b()):h<0},x.reflectY=function(t){return arguments.length?(f=t?-1:1,b()):f<0},x.fitExtent=function(t,e){return Q_(x,t,e)},x.fitSize=function(t,e){return tA(x,t,e)},x.fitWidth=function(t,e){return eA(x,t,e)},x.fitHeight=function(t,e){return nA(x,t,e)},x},geoProjection:cA,geoProjectionMutator:lA,geoMercator:function(){return bA(vA).scale(961/$4)},geoMercatorRaw:vA,geoNaturalEarth1:function(){return cA(LA).scale(175.295)},geoNaturalEarth1Raw:LA,geoOrthographic:function(){return cA(NA).scale(249.5).clipAngle(90+P)},geoOrthographicRaw:NA,geoStereographic:function(){return cA(CA).scale(250).clipAngle(142)},geoStereographicRaw:CA,geoTransverseMercator:function(){var t=bA(jA),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:jA});function FA(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 IA(t,e,n,r){var i,a,o,s,c,l,{outline:e=(e=e.filter(DA),e.find(t=>t.sphere)?{type:"Sphere"}:FA(e.filter(t=>!t.sphere).flatMap(t=>t.data.value)))}=r,{size:r="fitExtent"}=r;"fitExtent"===r?(i=t,o=e,{x:l,y:c,width:a,height:s}=l=n,i.fitExtent([[l,c],[a,s]],o)):"fitWidth"===r&&(i=t,l=e,{width:c,height:a}=c=n,[[c,l],[s,o]]=$_(i.fitWidth(c,l)).bounds(l),o=Math.ceil(o-l),l=Math.min(Math.ceil(s-c),o),s=i.scale()*(l-1)/l,[c,l]=i.translate(),l+=(a-o)/2,i.scale(s).translate([c,l]).precision(.2))}function BA(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:[US()]}}):"sphere"===e?Object.assign(Object.assign({},t),{sphere:!0,data:{value:[{type:"Sphere"}]}}):t)}function DA(t){return"geoPath"===t.type}var GA,i=()=>t=>{var{children:e,projection:n={}}=t;if(!Array.isArray(e))return[];const{type:r="equalEarth"}=n,f=Z(n,["type"]),d=function(t){if("function"==typeof t)return t;var e="geo"+Cf(t);if(e=RA[e])return e;throw new Error("Unknown projection: "+t)}(r),p=e.map(BA);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,c={x:t,y:e,width:n,height:r},l=(IA(i,p,c,f),i),c=f;for([o,s]of Object.entries(c))null!=(a=l[o])&&a.call(l,s);g=$_(i);const u=new Im({domain:[t,t+n]}),h=new Im({domain:[e,e+r]});return{transform:t=>{return t=t,(t=i(t))?([t,e]=t,[u.map(t),h.map(e)]):null;var e},untransform:t=>{return(t=t)?([t,e]=t,t=[u.invert(t),h.invert(e)],i.invert(t)):null;var e}}}]]}}],children:p.flatMap(t=>{return DA(t)?(e=t.style,Object.assign(Object.assign({},t),{type:"path",style:Object.assign(Object.assign({},e),{d:t=>g(t)})})):t;var e})})]},Ec=(i.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}]})]});Ec.props={};const zA={"composition.geoView":i,"composition.geoPath":Ec};function WA(){return Object.assign({"data.fetch":M1,"data.inline":L1,"data.sortBy":P1,"data.filter":O1,"data.pick":A1,"data.rename":T1,"data.subset":_1,"data.fold":E1,"data.custom":N1,"data.map":C1,"data.cluster":c1,"data.tree":l1,"data.sankey":X0,"data.arc":I1,"data.wordCloud":ry,"data.join":ay,"transform.maybeZeroY1":E3,"transform.maybeZeroX":B3,"transform.maybeStackY":F3,"transform.maybeTitle":I3,"transform.maybeSeries":W3,"transform.maybeZeroPadding":X3,"transform.stackY":j3,"transform.binX":GO,"transform.bin":DO,"transform.dodgeX":Q3,"transform.jitter":iO,"transform.jitterX":aO,"transform.symmetryY":oO,"transform.diffY":sO,"transform.stackEnter":tO,"transform.normalizeY":eO,"transform.select":fO,"transform.selectX":dO,"transform.selectY":pO,"transform.groupX":SO,"transform.groupY":_O,"transform.groupColor":AO,"transform.group":OO,"transform.maybeSize":G3,"transform.maybeZeroY":D3,"transform.maybeKey":z3,"transform.sortX":LO,"transform.sortY":CO,"transform.sortColor":NO,"transform.flexX":jO,"transform.maybeTupleY":V3,"transform.maybeTupleX":Y3,"transform.maybeIdentityY":H3,"transform.maybeIdentityX":q3,"transform.maybeTuple":Z3,"transform.maybeVisualPosition":$3,"transform.maybeFunctionAttribute":K3,"transform.maybeGradient":J3,"transform.maybeTooltip":U3,"transform.pack":FO,"transform.sample":zO,"coordinate.cartesian":Hf,"coordinate.polar":qf,"coordinate.helix":Uf,"coordinate.transpose":Xf,"coordinate.theta":Jf,"coordinate.reflect":$f,"coordinate.reflectX":Kf,"coordinate.reflectY":Zf,"coordinate.parallel":td,"coordinate.fisheye":ed,"coordinate.fisheyeX":nd,"coordinate.fisheyeY":rd,"coordinate.radial":Qf,"encode.constant":id,"encode.field":od,"encode.transform":ad,"encode.column":sd,"mark.interval":wp,"mark.rect":kp,"mark.line":g0,"mark.point":y0,"mark.text":m0,"mark.cell":v0,"mark.area":b0,"mark.link":x0,"mark.image":w0,"mark.polygon":k0,"mark.box":M0,"mark.vector":E0,"mark.lineX":S0,"mark.lineY":O0,"mark.connector":_0,"mark.range":P0,"mark.rangeX":L0,"mark.rangeY":N0,"mark.sankey":eg,"mark.path":ng,"mark.treemap":sg,"mark.pack":cg,"mark.boxplot":mg,"mark.shape":vg,"mark.forceGraph":o1,"mark.tree":u1,"mark.wordCloud":oy,"palette.category10":sy,"palette.category20":cy,"palette.sequentialBlue":ly,"palette.sequentialDarkBlue":uy,"palette.sequentialGreen":hy,"palette.sequentialDarkGreen":fy,"palette.sequentialGrey":dy,"palette.sequentialOrange":py,"palette.sequentialPink":gy,"palette.sequentialRed":yy,"palette.sequentialYellow":my,"palette.sequentialPurple":vy,"palette.sequentialYellowOrange":by,"palette.sequentialYellowGreen":xy,"palette.sequentialPinkPurple":wy,"palette.sequentialGreenBlue":ky,"palette.divergingGreenYellow":My,"palette.divergingRedBlue":Ey,"palette.divergingGreenRed":Oy,"palette.divergingRedPurple":Sy,"scale.linear":uv,"scale.ordinal":hv,"scale.band":lv,"scale.identity":fv,"scale.point":dv,"scale.time":pv,"scale.log":gv,"scale.pow":yv,"scale.sqrt":xv,"scale.threshold":mv,"scale.quantile":vv,"scale.quantize":bv,"scale.sequential":wv,"shape.interval.rect":Bb,"shape.interval.hollow":Db,"shape.interval.funnel":Gb,"shape.interval.pyramid":Wb,"shape.rect.rect":Bb,"shape.rect.hollow":Db,"shape.cell.cell":Bb,"shape.cell.hollow":Db,"shape.line.line":qb,"shape.line.hv":Xb,"shape.line.vh":$b,"shape.line.hvh":Kb,"shape.line.smooth":Ub,"shape.point.bowtie":t2,"shape.point.cross":e2,"shape.point.diamond":n2,"shape.point.hexagon":r2,"shape.point.hollowBowtie":i2,"shape.point.hollowDiamond":a2,"shape.point.hollowHexagon":o2,"shape.point.hollow":s2,"shape.point.hollowSquare":c2,"shape.point.hollowTriangle":l2,"shape.point.hollowTriangleDown":u2,"shape.point.hyphen":h2,"shape.point.line":f2,"shape.point.plus":d2,"shape.point.point":p2,"shape.point.square":g2,"shape.point.tick":y2,"shape.point.triangle":m2,"shape.point.triangleDown":v2,"shape.text.text":R5,"shape.area.area":G5,"shape.area.smooth":z5,"shape.area.step":W5,"shape.link.smooth":Y5,"shape.link.vhv":H5,"shape.link.arc":q5,"shape.link.link":V5,"shape.image.image":U5,"shape.polygon.polygon":X5,"shape.polygon.ribbon":$5,"shape.box.box":K5,"shape.vector.vector":b2,"shape.label.label":lM,"shape.text.badge":I5,"shape.lineX.line":Z5,"shape.lineY.line":Z5,"shape.shape.shape":dM,"shape.connector.connector":tM,"shape.range.range":Bb,"shape.rangeX.range":Bb,"shape.rangeY.range":Bb,"shape.path.path":hM,"shape.path.hollow":fM,"theme.light":gM,"theme.dark":vM,"component.axisX":GM,"component.axisY":zM,"component.legendCategory":WM,"component.legendContinuous":VM,"component.title":HM,"animation.scaleInX":ZM,"animation.scaleOutX":JM,"animation.scaleInY":QM,"animation.scaleOutY":tE,"animation.waveIn":cE,"animation.fadeIn":eE,"animation.fadeOut":nE,"animation.zoomIn":lE,"animation.zoomOut":uE,"animation.pathIn":hE,"animation.morphing":sE,"animation.growInX":fE,"animation.growInY":dE,"interaction.elementHighlight":OE,"interaction.elementHighlightByX":SE,"interaction.elementHighlightByColor":_E,"interaction.elementSelect":TE,"interaction.elementSelectByX":PE,"interaction.elementSelectByColor":LE,"interaction.fisheye":CE,"interaction.chartIndex":NE,"interaction.tooltip":VE,"composition.spaceLayer":UE,"composition.spaceFlex":XE,"composition.mark":KE,"composition.view":$E,"composition.facetRect":o3,"composition.repeatMatrix":u3,"composition.facetCircle":y3,"composition.timingKeyframe":m3,"labelTransform.hideOverlap":z4,"labelTransform.dodgeY":V4,"labelTransform.spider":Y4,"labelTransform.surround":H4},zA)}function VA(t,e,...n){t&&(t[e]||[]).forEach(t=>{t.apply(this,n)})}function YA(e,n){const r=t=>{return"string"!=typeof t?t:n[t=e+"."+t]||K0("Unknown Component: "+t)};return[t=>{var e=t["type"],t=Z(t,["type"]);return r(e)(Object.assign({},t))},r]}function c(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}(uo=GA=GA||{}).BEFORE_RENDER="beforerender",uo.AFTER_RENDER="afterrender",uo.BEFORE_PAINT="beforepaint",uo.AFTER_PAINT="afterpaint",uo.BEFORE_CHANGE_DATA="beforechangedata",uo.AFTER_CHANGE_DATA="afterchangedata",uo.BEFORE_CLEAR="beforeclear",uo.AFTER_CLEAR="afterclear",uo.BEFORE_DESTROY="beforedestroy",uo.AFTER_DESTROY="afterdestroy",uo.BEFORE_CHANGE_SIZE="beforechangesize",uo.AFTER_CHANGE_SIZE="afterchangesize";ho=c("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),oo=c("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),tl=c("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),fo=c("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),yo=c("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),n=c("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Jc=c("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Qc=c("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),e=c("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Kc=c("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function HA(t,e,n){(t.prototype=e.prototype=n).constructor=t}function qA(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function UA(){}var XA=1/.7,po="\\s*([+-]?\\d+)\\s*",mo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",vo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$A=/^#([0-9a-f]{3,8})$/,KA=new RegExp(`^rgb\\(${po},${po},${po}\\)$`),ZA=new RegExp(`^rgb\\(${vo},${vo},${vo}\\)$`),JA=new RegExp(`^rgba\\(${po},${po},${po},${mo}\\)$`),QA=new RegExp(`^rgba\\(${vo},${vo},${vo},${mo}\\)$`),t6=new RegExp(`^hsl\\(${mo},${vo},${vo}\\)$`),e6=new RegExp(`^hsla\\(${mo},${vo},${vo},${mo}\\)$`),n6={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 r6(){return this.rgb().formatHex()}function i6(){return this.rgb().formatRgb()}function a6(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=$A.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?o6(e):3===n?new u6(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?s6(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?s6(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=KA.exec(t))?new u6(e[1],e[2],e[3],1):(e=ZA.exec(t))?new u6(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=JA.exec(t))?s6(e[1],e[2],e[3],e[4]):(e=QA.exec(t))?s6(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=t6.exec(t))?y6(e[1],e[2]/100,e[3]/100,1):(e=e6.exec(t))?y6(e[1],e[2]/100,e[3]/100,e[4]):n6.hasOwnProperty(t)?o6(n6[t]):"transparent"===t?new u6(NaN,NaN,NaN,0):null}function o6(t){return new u6(t>>16&255,t>>8&255,255&t,1)}function s6(t,e,n,r){return new u6(t=r<=0?e=n=NaN:t,e,n,r)}function c6(t){return(t=t instanceof UA?t:a6(t))?new u6((t=t.rgb()).r,t.g,t.b,t.opacity):new u6}function l6(t,e,n,r){return 1===arguments.length?c6(t):new u6(t,e,n,null==r?1:r)}function u6(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function h6(){return"#"+g6(this.r)+g6(this.g)+g6(this.b)}function f6(){var t=d6(this.opacity);return(1===t?"rgb(":"rgba(")+p6(this.r)+`, ${p6(this.g)}, `+p6(this.b)+(1===t?")":`, ${t})`)}function d6(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function p6(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function g6(t){return((t=p6(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 v6(t,e,n,r)}function m6(t){var e,n,r,i,a,o,s,c;return t instanceof v6?new v6(t.h,t.s,t.l,t.opacity):(t=t instanceof UA?t:a6(t))?t instanceof v6?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,c=((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/=c<.5?a+i:2-a-i,o*=60):s=0<c&&c<1?0:o,new v6(o,s,c,t.opacity)):new v6}function v6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function b6(t){return(t=(t||0)%360)<0?t+360:t}function x6(t){return Math.max(0,Math.min(1,t||0))}function w6(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}HA(UA,a6,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:r6,formatHex:r6,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return m6(this).formatHsl()},formatRgb:i6,toString:i6}),HA(u6,l6,qA(UA,{brighter(t){return t=null==t?XA:Math.pow(XA,t),new u6(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new u6(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new u6(p6(this.r),p6(this.g),p6(this.b),d6(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:h6,formatHex:h6,formatHex8:function(){return"#"+g6(this.r)+g6(this.g)+g6(this.b)+g6(255*(isNaN(this.opacity)?1:this.opacity))},formatRgb:f6,toString:f6})),HA(v6,function(t,e,n,r){return 1===arguments.length?m6(t):new v6(t,e,n,null==r?1:r)},qA(UA,{brighter(t){return t=null==t?XA:Math.pow(XA,t),new v6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new v6(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 u6(w6(240<=t?t-240:120+t,n,e),w6(t,n,e),w6(t<120?240+t:t-120,n,e),this.opacity)},clamp(){return new v6(b6(this.h),x6(this.s),x6(this.l),d6(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=d6(this.opacity);return(1===t?"hsl(":"hsla(")+b6(this.h)+`, ${100*x6(this.s)}%, ${100*x6(this.l)}%`+(1===t?")":`, ${t})`)}}));const k6=Math.PI/180,M6=180/Math.PI;var E6=1.78277,O6=-.29227,S6=-.90649,_6=1.97294,A6=_6*S6,T6=_6*E6,P6=E6*O6- -.14861*S6;function L6(t,e,n,r){return 1===arguments.length?(i=t)instanceof N6?new N6(i.h,i.s,i.l,i.opacity):(a=(i=i instanceof u6?i:c6(i)).r/255,o=i.g/255,c=i.b/255,c=(_6*(o-(a=(P6*c+A6*a-T6*o)/(P6+A6-T6)))-O6*(o=c-a))/S6,new N6((c=(s=Math.sqrt(c*c+o*o)/(_6*a*(1-a)))?Math.atan2(c,o)*M6-120:NaN)<0?c+360:c,s,a,i.opacity)):new N6(t,e,n,null==r?1:r);var i,a,o,s,c}function N6(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}HA(N6,L6,qA(UA,{brighter(t){return t=null==t?XA:Math.pow(XA,t),new N6(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new N6(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*k6,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),t=Math.sin(t);return new u6(255*(e+n*(-.14861*r+E6*t)),255*(e+n*(O6*r+S6*t)),255*(e+_6*r*n),this.opacity)}}));var C6=t=>()=>t;function j6(e,n){return function(t){return e+t*n}}function R6(a){return 1==(a=+a)?F6: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)}):C6(isNaN(t)?e:t);var n,r,i}}function F6(t,e){var n=e-t;return n?j6(t,n):C6(isNaN(t)?e:t)}!function t(e){var o=R6(e);function n(e,t){var n=o((e=l6(e)).r,(t=l6(t)).r),r=o(e.g,t.g),i=o(e.b,t.b),a=F6(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);I6=function(s){var c=s.length-1;return function(t){var e,n=t<=0?t=0:1<=t?c-(t=1):Math.floor(t*c),r=s[n],i=s[n+1],a=0<n?s[n-1]:2*r-i,o=n<c-1?s[n+2]:2*i-r;return((1-3*(t=(t-n/c)*c)+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 I6,B6=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=l6(t[o]),r[o]=e.r||0,i[o]=e.g||0,a[o]=e.b||0;return r=I6(r),i=I6(i),a=I6(a),e.opacity=1,function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e+""}};function D6(s){return function t(o){function e(e,t){var n=s((e=L6(e)).h,(t=L6(t)).h),r=F6(e.s,t.s),i=F6(e.l,t.l),a=F6(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)}D6(function(t,e){var n=e-t;return n?j6(t,180<n||n<-180?n-360*Math.round(n/360):n):C6(isNaN(t)?e:t)});var bo=D6(F6),wo=t=>B6(t[t.length-1]),xo=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(c),ko=wo(xo),a=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(c),$c=wo(a),Mo=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(c),Fn=wo(Mo),go=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(c),Ko=wo(go),Zc=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(c),sl=wo(Zc),fl=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(c),ol=wo(fl),rl=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(c),el=wo(rl),Mc=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(c),Eo=wo(Mc),sw=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(c),Ao=wo(sw),i=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(c),Ec=wo(i),uo=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(c),po=wo(uo),vo=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(c),mo=wo(vo),G6=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(c),z6=wo(G6),W6=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(c),V6=wo(W6),Y6=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(c),H6=wo(Y6),q6=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(c),U6=wo(q6),X6=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(c),$6=wo(X6),K6=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(c),Z6=wo(K6),J6=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(c),Q6=wo(J6),tT=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(c),eT=wo(tT),nT=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(c),rT=wo(nT),iT=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(c),aT=wo(iT),oT=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(c),sT=wo(oT),cT=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(c),lT=wo(cT),uT=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(c),hT=wo(uT),fT=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(c),dT=wo(fT),pT=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(c),wo=wo(pT);var gT=bo(L6(300,.5,0),L6(-240,.5,1)),yT=bo(L6(-100,.75,.35),L6(80,1.5,.8)),bo=bo(L6(260,.75,.35),L6(80,1.5,.8)),mT=L6();var vT=l6(),bT=Math.PI/3,xT=2*Math.PI/3;function wT(e){var n=e.length;return function(t){return e[Math.max(0,Math.min(n-1,Math.floor(t*n)))]}}var kT=wT(c("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),MT=wT(c("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ET=wT(c("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),OT=wT(c("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),ST=Object.freeze({__proto__:null,schemeCategory10:ho,schemeAccent:oo,schemeDark2:tl,schemePaired:fo,schemePastel1:yo,schemePastel2:n,schemeSet1:Jc,schemeSet2:Qc,schemeSet3:e,schemeTableau10:Kc,interpolateBrBG:ko,schemeBrBG:xo,interpolatePRGn:$c,schemePRGn:a,interpolatePiYG:Fn,schemePiYG:Mo,interpolatePuOr:Ko,schemePuOr:go,interpolateRdBu:sl,schemeRdBu:Zc,interpolateRdGy:ol,schemeRdGy:fl,interpolateRdYlBu:el,schemeRdYlBu:rl,interpolateRdYlGn:Eo,schemeRdYlGn:Mc,interpolateSpectral:Ao,schemeSpectral:sw,interpolateBuGn:Ec,schemeBuGn:i,interpolateBuPu:po,schemeBuPu:uo,interpolateGnBu:mo,schemeGnBu:vo,interpolateOrRd:z6,schemeOrRd:G6,interpolatePuBuGn:V6,schemePuBuGn:W6,interpolatePuBu:H6,schemePuBu:Y6,interpolatePuRd:U6,schemePuRd:q6,interpolateRdPu:$6,schemeRdPu:X6,interpolateYlGnBu:Z6,schemeYlGnBu:K6,interpolateYlGn:Q6,schemeYlGn:J6,interpolateYlOrBr:eT,schemeYlOrBr:tT,interpolateYlOrRd:rT,schemeYlOrRd:nT,interpolateBlues:aT,schemeBlues:iT,interpolateGreens:sT,schemeGreens:oT,interpolateGreys:lT,schemeGreys:cT,interpolatePurples:hT,schemePurples:uT,interpolateReds:dT,schemeReds:fT,interpolateOranges:wo,schemeOranges:pT,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:gT,interpolateRainbow:function(t){(t<0||1<t)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return mT.h=360*t-100,mT.s=1.5-1.5*e,mT.l=.8-.9*e,mT+""},interpolateWarm:yT,interpolateCool:bo,interpolateSinebow:function(t){var e;return t=(.5-t)*Math.PI,vT.r=255*(e=Math.sin(t))*e,vT.g=255*(e=Math.sin(t+bT))*e,vT.b=255*(e=Math.sin(t+xT))*e,vT+""},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:kT,interpolateMagma:MT,interpolateInferno:ET,interpolatePlasma:OT});function _T(t,e,n){for(;t<e;)t+=2*Math.PI;for(;n<t;)t-=2*Math.PI;return t}function AT(t,e,n,r,i){var a=t[0],t=t[1],o=ct();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 TT(t,e,n,r,i){var a=new Im({range:[e,e+r]}),o=new Im({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 PT(t,e,n,r,i){return(0,t[0])(e,n,r,i)}function LT(t,e,n,r,i){return t[0]}function NT(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],t=t[3],c=new Im({range:[s,t]}),l=new Im({range:[a,o]}),u=1<(s=i/r)?1:s,h=1<s?1/s:1;return{transform:function(t){var e=t[0],t=t[1],e=l.map(e),t=c.map(t);return[.5*(t*Math.cos(e)*u)+.5,.5*(t*Math.sin(e)*h)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/u,t=2*(t-.5)/h,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=_T(Math.atan2(t,e),a,o);return[l.invert(t),c.invert(n)]}}}function CT(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 jT(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return GT.apply(void 0,zT([[-1,-1]],e,!1))}function RT(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return GT.apply(void 0,zT([[-1,1]],e,!1))}function FT(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return GT.apply(void 0,zT([[1,-1]],e,!1))}function IT(t,e,n,r,i){var a,t=t[0],o=ct();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 BT(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],c=(t[3]-s)/(+o/(2*Math.PI)+1),l=c/(2*Math.PI),u=new Im({range:[s,s+.99*c]}),h=new Im({range:[a,o]}),f=1<(t=i/r)?1:t,d=1<t?1/t:1;return{transform:function(t){var e=t[0],t=t[1],e=h.map(e),t=u.map(t);return[.5*(Math.cos(e)*(l*e+t)*f)+.5,.5*(Math.sin(e)*(l*e+t)*d)+.5]},untransform:function(t){var e=t[0],t=t[1],e=2*(e-.5)/f,t=2*(t-.5)/d,n=Math.sqrt(Math.pow(e,2)+Math.pow(t,2)),t=_T(Math.atan2(t,e)+Math.floor(n/c)*Math.PI*2,a,o),e=n-l*t;return[h.invert(t),u.invert(e)]}}}function DT(t,e,n,r,i){var s=t[0],c=t[1],a=t[2],t=t[3],l=new Im({range:[a,t]});return{transform:function(t){for(var e=[],n=t.length,r=new Bm({domain:new Array(n).fill(0).map(function(t,e){return e}),range:[s,c]}),i=0;i<n;i++){var a=t[i],o=r.map(i),a=l.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(l.invert(r))}return e}}}var GT=function(t,e,n,r,i){var a=t[0],t=t[1],o=ct();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},zT=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 WT(t){return 1/Math.tan(t)}function VT(t,e,n,r,i){var a=WT(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 YT(t,e,n,r,i){var a=WT(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 HT(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 qT(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 UT(t,e,n){return n?new Im({range:[0,1],domain:[0,e]}).map(t):t}function XT(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=UT(a,r,void 0!==t&&t);return{transform:function(t){var e=t[0],t=t[1];return[HT(e,s,o,0,1),t]},untransform:function(t){var e=t[0],t=t[1];return[qT(e,s,o,0,1),t]}}}function $T(t,e,n,r,i){var a=t[0],o=t[1],t=t[2],s=UT(a,i,void 0!==t&&t);return{transform:function(t){return[t[0],HT(t[1],s,o,0,1)]},untransform:function(t){return[t[0],qT(t[1],s,o,0,1)]}}}function KT(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],c=t[3],t=t[4],l=UT(a,r,t=void 0!==t&&t),u=UT(o,i,t);return{transform:function(t){var e=t[0],t=t[1];return[HT(e,l,s,0,1),HT(t,u,c,0,1)]},untransform:function(t){var e=t[0],t=t[1];return[qT(e,l,s,0,1),qT(t,u,c,0,1)]}}}function ZT(t,e,n,r,i){var a=t[0],o=t[1],s=t[2],c=t[3],t=void 0!==(t=t[4])&&t,l=new Im({range:[0,r]}),u=new Im({range:[0,i]}),h=t?a:l.map(a),f=t?o:u.map(o);return{transform:function(t){var e=t[0],t=t[1],n=l.map(e)-h,r=u.map(t)-f,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=HT(i,0,c,0,s),t=Math.atan2(r,n),i=h+e*Math.cos(t),r=f+e*Math.sin(t),[l.invert(i),u.invert(r)])},untransform:function(t){var e=t[0],t=t[1],n=l.map(e)-h,r=u.map(t)-f,i=Math.sqrt(n*n+r*r);return s<i?[e,t]:(e=qT(i,0,c,0,s),t=Math.atan2(r,n),i=h+e*Math.cos(t),r=f+e*Math.sin(t),[l.invert(i),u.invert(r)])}}}var JT=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))},QT=(tP.prototype.update=function(t){this.options=R({},this.options,t),this.recoordinate()},tP.prototype.clone=function(){return new tP(this.options)},tP.prototype.getOptions=function(){return this.options},tP.prototype.clear=function(){this.update({transformations:[]})},tP.prototype.getSize=function(){var t=this.options;return[t.width,t.height]},tP.prototype.getCenter=function(){var t=this.options,e=t.x,n=t.y;return[(2*e+t.width)/2,(2*n+t.height)/2]},tP.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:JT(JT([],n,!0),[JT([],t,!0)],!1)}),this},tP.prototype.map=function(t){return this.output(t)},tP.prototype.invert=function(t){return this.input(t)},tP.prototype.recoordinate=function(){this.output=this.compose(),this.input=this.compose(!0)},tP.prototype.compose=function(t){for(var e=(t=void 0===t?!1:t)?JT([],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 c,l,u,h,f=s[o],d=f[0],f=f.slice(1),p=this.transformers[d];p&&(c=(h=this.options).x,l=h.y,u=h.width,h=h.height,p=p(JT([],f,!0),c,l,u,h),(f=p)instanceof Float32Array||f instanceof Array?r.push(p):(r.length&&(i(this.createMatrixTransform(r,t)),r.splice(0,r.length)),i(n(p)||zf,"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):zf}.apply(void 0,a)},tP.prototype.createMatrixTransform=function(t,e){var n,r,i,a,o,s,c,l,u,h,f,d,p=ct();return e&&t.reverse(),t.forEach(function(t){return lt(p,p,t)}),e&&(e=t=p,(d=new st(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],c=e[7],l=(e=e[8])*a-o*c,f=d*l+n*(u=-e*i+o*s)+r*(h=c*i-a*s))&&(t[0]=l*(f=1/f),t[1]=(-e*n+r*c)*f,t[2]=(o*n-r*a)*f,t[3]=u*f,t[4]=(e*d-r*s)*f,t[5]=(-o*d+r*i)*f,t[6]=h*f,t[7]=(-c*d+n*s)*f,t[8]=(a*d-n*i)*f),function(t){t=[t[0],t[1],1];return $t(t,t,p),[t[0],t[1]]}},tP);function tP(t){this.options={x:0,y:0,width:300,height:150,transformations:[]},this.transformers={cartesian:TT,translate:AT,custom:PT,matrix:LT,polar:NT,transpose:CT,scale:GT,"shear.x":VT,"shear.y":YT,reflect:jT,"reflect.x":RT,"reflect.y":FT,rotate:IT,helix:BT,parallel:DT,fisheye:KT,"fisheye.x":XT,"fisheye.y":$T,"fisheye.circular":ZT},this.update(t)}function eP(t){return void 0!==t.find(t=>"polar"===t.type)}function nP(t){return void 0!==t.find(t=>"helix"===t.type)}function rP(t){return t.filter(({type:t})=>"transpose"===t).length%2==1}function iP(t){return void 0!==t.find(t=>"theta"===t.type)}function aP(t){return void 0!==t.find(t=>"radial"===t.type)}function oP(t,e,n,r,i,a){var o,{guide:s={}}=n,c=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?hP(t):void 0===r?pP(e)?hP(t):gP(e)?"time":fP(t,i):pP([r])?hP(t):gP(e)?"time":fP(t,i)}(t,e,n);return"string"!=typeof c?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)J0(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 dP(e);case"quantile":return function(t){return dP(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)J0(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[]}}(c,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=pm,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:iP(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=Cf(e),i=ST["interpolate"+r];if(i)return{interpolator:n?t=>i(n(t)):i};throw new Error("Unknown palette: "+r)}(n);default:return n}}(c,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:c,rangeMax:l}=r;switch(t){case"linear":case"time":case"log":case"sqrt":var u=uP(n,r,i,a,o),[u,h]=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[c||u,l||h];case"band":case"point":return[c||0,l||1];case"ordinal":return uP(n,r,i,a,o);case"sequential":return;default:return[]}}(c,t,e,n,o,i,a),guide:s,name:t,type:c}))}function sP(t,n){var t=t.filter(({name:t,facet:e=!0})=>e&&t===n),e=t.flatMap(t=>t.domain),r=t.every(cP)?Pp(e):t.every(lP)?Array.from(new Set(e)):null;if(null!==r)for(const i of t)i.domain=r}function cP(t){t=t.type;return"string"==typeof t&&["linear","log","pow","time"].includes(t)}function lP(t){t=t.type;return"string"==typeof t&&["band","point","ordinal"].includes(t)}function uP(t,e,n,r,i){var[i]=YA("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=Cf(t),i=ST["scheme"+e],a=ST["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 hP(t){return(t=t).startsWith("x")||t.startsWith("y")||t.startsWith("position")||t.startsWith("size")?"point":"ordinal"}function fP(t,e){return"color"!==t||e?"linear":"sequential"}function dP(t){return Array.from(new Set(t.flat()))}function pP(t){return yP(t,t=>{t=typeof t;return"string"==t||"boolean"==t})}function gP(t){return yP(t,t=>t instanceof Date)}function yP(t,e){for(const n of t)if(n.some(e))return!0;return!1}function mP(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 vP(t,i,a){return Ee(this,void 0,void 0,function*(){var t=a["library"],e=i["data"],[t]=YA("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=>Ee(this,void 0,void 0,function*(){var t=yield n(e);return r(t)}),$0)}([Z(n,["transform"]),...r].map(t))(e);return[Array.isArray(n)?Ab(n):[],Object.assign(Object.assign({},i),{data:n})]})}function bP(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 xP(t,e,n){const{encode:r,data:i}=e;var a;return r?(a=_b(r,t=>{var e,n;return function(t){if("object"!=typeof t||t instanceof Date)return;t=t.type;return J0(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 wP(t,e,n){var r=e["encode"];return r?(r=_b(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 kP(t,e,n){const{encode:r,data:i}=e;if(!r)return[t,e];n=n.library;const a=function(t){const[n]=YA("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=_b(r,t=>a(i,t));return[t,Object.assign(Object.assign({},e),{encode:n})]}function MP(c,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(c.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(c).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]),[c,Object.assign(Object.assign({},i),{encode:r})]):[c,t]}function EP(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 R(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 OP(t,e,n){var r=e["animate"];return r||void 0===r||R(e,{animate:{enterType:null,exitType:null,updateType:null}}),[t,e]}function SP(s,c,l){return Ee(this,void 0,void 0,function*(){var[t,e]=yield function(s,c,l){return Ee(this,void 0,void 0,function*(){var t=l["library"],[t]=YA("transform",t),{preInference:e=[],postInference:n=[]}=c,{transform:r=[]}=s,e=[mP,vP,bP,xP,wP,kP,MP,OP,EP,...e.map(t),...r.map(t),...n.map(t)];let i=[],a=s;for(const o of e)[i,a]=yield o(i,a,l);return[i,a]})}(s,c,{library:l});const{encode:n,scale:u,data:r}=e;if(!1===Array.isArray(r))return null;const i=c["channels"],a=Ip(Object.entries(n).filter(([,t])=>J0(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:c,range:l}=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=c||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:l},i)}})});return[e,Object.assign(Object.assign({},c),{index:t,channels:o})]})}function _P(t,e,n){var r,{component:e=[],coordinates:i=[],title:a,theme:o}=e,[,s]=YA("component",n),n=t.filter(({guide:t})=>null!==t),c=[...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)}(R({size:r},o,r="string"==typeof a?{text:a}:a)),c.push(Object.assign({type:"title",position:e,order:t,size:o},r)));for(const b of n){var l=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 rP(e)&&eP(e)||nP(e)||iP(e)?null:t.startsWith("x")?rP(e)?"axisY":"axisX":t.startsWith("y")?rP(e)?"axisX":"axisY":t.startsWith("position")&&!eP(e)?"axisY":null}(b,i);if(null!==l){var u=s(l)["props"],{defaultPosition:h,defaultSize:f,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],rP(i)?0==t?"top":"centerVertical":0==t?n:"centerHorizontal");if("axisX"===e&&eP(i)&&!rP(i)||"axisY"===e&&eP(i)&&rP(i)||"axisY"===e&&iP(i)||"axisY"===e&&nP(i)||"axisY"===e&&aP(i))return"bottom"===r.position?"arcInner":"arc";if(eP(i)&&("axisX"===e||"axisY"===e))return"arcY";if(aP(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")&&eP(i)&&"center"===r.position)return"arcCenter"}return n}(p,l,h,x,i),{size:m=f,order:v=d}=x;c.push(Object.assign(Object.assign({title:g},x),{position:y,order:v,size:m,type:l,scale:b}))}}}return c}function AP(t,e,n,r){var[i]=YA("scale",r),[r]=YA("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 TP(t,e){var t=function(t,e){var n=Rp(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 c of["left","right","top","bottom"]){var o="padding"+function(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}(c);if(void 0===a[o])if(n.has(c)){const t=n.get(c);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:c=0,inset:l=0,insetLeft:u=l,insetTop:h=l,insetBottom:f=l,insetRight:l=l,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:h,insetBottom:f,insetRight:l,innerWidth:e-n-r-p-d,innerHeight:o-i-a-y-g,marginLeft:p,marginBottom:g,marginTop:y,marginRight:d,x:s,y:c})}function PP(t,e,n){var F=Rp(t,t=>t.position),{paddingLeft:t,paddingRight:n,paddingTop:r,paddingBottom:I,marginLeft:i,marginTop:a,marginBottom:B,marginRight:D,innerHeight:o,innerWidth:s,height:G,width:z}=n,t=t+i,i=r+a,r=n+D,a=I+B,W={top:[t,0,s,i,0,!0,Mp],right:[z-r,i,r,o,1,!1,Mp],bottom:[t,G-a,s,a,0,!1,Mp],left:[0,i,t,o,1,!0,Mp],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[R,t]of F.entries()){var c=W[R];if("centerHorizontal"===R)!function(e,t,n){const[r,i,,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),c=s.filter((t,e)=>e%2==0).map(t=>t+r);for(let t=0;t<e.length;t++){var l=e[t];const r=c[t];var u=c[t+1]-r;l.bbox={x:r,y:i,width:u,height:a}}}(t,e,c);else if("centerVertical"===R)!function(e,t,n){const[r,i,a]=n,o=new Array(e.length+1).fill(0),s=t.map(o),c=s.filter((t,e)=>e%2==1).map(t=>t+i);for(let t=0;t<e.length;t++){var l=e[t];const i=c[t];var u=c[t+1]-i;l.bbox={x:r,y:i,width:a,height:u}}}(t,e,c);else if("arc"===R){p=d=f=h=u=l=void 0;var l=t,u=c,[h,f,d,p]=u;for(let t=0;t<l.length;t++)l[t].bbox={x:h,y:f,width:d,height:p}}else if("arcY"===R){M=k=w=x=b=m=y=v=u=g=void 0;var g=t,u=e,[y,m,,v]=v=c,[b,x]=u.getCenter(),[u,w]=LP(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"===R){P=T=A=_=v=S=O=w=x=E=void 0;var E=t,x=e,[O,S,,w]=w=c,[v,_]=x.getCenter(),[x]=LP(x),A=x*(w=w/2),T=v-A,P=_-A;for(let t=0;t<E.length;t++)E[t].bbox={x:O+T,y:S+P,width:2*A,height:2*A}}else if("arcCenter"===R){q=H=j=C=Y=V=N=_=L=void 0;var L=t,_=e,[N,V,Y,C]=N=c,[_]=LP(_),j=C/2*_/Math.sqrt(2),H=N+Y/2,q=V+C/2;for(let t=0;t<L.length;t++)L[t].bbox={x:H-j,y:q-j,width:2*j,height:2*j}}else!function(n,t){const[e,r,i,a,o,s,c]=t,[l,u,h,f,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)=>c(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={[l]:s?e-b:e,[h]:f,[d]:b,[g]:y},e+=b*(s?-1:1)}}(t,c)}}function LP(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[t,e]}function NP(T,P,L,N){return Ee(this,void 0,void 0,function*(){const[n]=YA("composition",L);var[t]=YA("interaction",L);const e=new Set(Object.keys(L).map(t=>{return null==(t=/mark\.(.*)/.exec(t))?void 0:t[1]}).filter(J0)),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 c=new Map,l=[T],u=[];l.length;){var h=l.shift();if(i(h)){var f=c.get(h),[f,d]=f?FP(f,h,L):yield jP(h,L),p=(s.set(f,h),o.push(f),d.flatMap(a));if(l.push(...p),p.every(i)){var g=yield Promise.all(p.map(t=>RP(t,L)));sP(f=(f=g).flatMap(t=>Array.from(t.values())).flatMap(t=>t.channels.map(t=>t.scale)),"x"),sP(f,"y");for(let t=0;t<p.length;t++){var y=p[t],m=g[t];c.set(y,m)}}}else{d="mark"===r(h)?h:yield WP(h,L),f=a(d);Array.isArray(f)?l.push(...f):"function"==typeof f&&u.push(f())}}var v=T["on"];VA(v,GA.BEFORE_PAINT);const b=new Map,x=[];P.selectAll(qP(j)).data(o,t=>t.key).join(t=>t.append("g").attr("className",j).attr("id",t=>t.key).call(CP).each(function(t){IP(t,Q(this),x,L),b.set(t,this)}),t=>t.call(CP).each(function(t){IP(t,Q(this),x,L)}),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=>Ee(this,void 0,void 0,function*(){var[t,e]=yield jP(r,a);IP(t,i,[],a);for(const n of e)NP(n,i,a,o);return{options:r,view:t}})}(Q(e),L,N)}));for(const S of w){const T=S["options"];for(const _ of function(t){var{interactions:t=[]}=t;return t}(T))t(_)(S,w)}const{width:k,height:M}=T;var E=[];for(const A of u){var O=new Promise(e=>Ee(this,void 0,void 0,function*(){for(const t of A)yield NP(Object.assign({width:k,height:M},t),P,L,N);e()}));E.push(O)}N.animations=x,VA(v,GA.AFTER_PAINT);v=x.filter(J0).map(GP).map(t=>t.finished);return Promise.all([...v,...E])})}function CP(t){t.style("transform",t=>`translate(${t.layout.x}, ${t.layout.y})`)}function jP(t,e){return Ee(this,void 0,void 0,function*(){return FP(yield RP(t,e),t,e)})}function RP(v,b){return Ee(this,void 0,void 0,function*(){var[t]=YA("theme",b);const[i,a]=YA("mark",b);var{theme:e,marks:n,coordinates:r=[]}=v,o=t(zP(e)),s=new Map,c=[];for(const p of n){var l=yield WP(p,b);c.push(l)}for(const g of yield Promise.all(c.map(r=>Ee(this,void 0,void 0,function*(){const{type:t=K0("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,h=g["type"],h=a(h)["props"],h=yield SP(g,h,b);h&&([h,u]=h,s.set(h,u))}for(const y of Rp(Array.from(s.values()).flatMap(t=>t.channels),({scaleKey:t})=>t).values()){var f=y.reduce((t,{scale:e})=>R(t,e),{}),d=y[0]["values"],d=Array.from(new Set(d.map(t=>t.field).filter(J0)));const v=R({guide:{title:0===d.length?void 0:d},field:d[0]},f);d=y[0]["name"];const m=oP(d,y.flatMap(({values:t})=>t.map(t=>t.value)),v,r,o,b);y.forEach(t=>t.scale=m)}return s})}function FP(t,e,n){var[r]=YA("mark",n);const[i]=YA("scale",n);var a,o,[s]=YA("theme",n),{key:c,frame:l=!1,theme:u,style:h={}}=e,s=s(zP(u)),u=Array.from(t.values()),u=Array.from(new Set(u.flatMap(t=>t.channels.map(t=>t.scale)))),u=_P(Array.from(u),e,n),f=TP(u,e),d=function(t,e,n){var[n]=YA("coordinate",n),{innerHeight:r,innerWidth:i,insetLeft:a,insetTop:o,insetRight:s,insetBottom:c,marginLeft:l,marginTop:u}=t,{coordinates:e=[]}=e,e=(e=e).find(t=>"cartesian"===t.type)?e:[...e,{type:"cartesian"}];return new QT(Object.assign(Object.assign({},t),{x:a+l,y:o+u,width:i-a-s,height:r-c-o,transformations:e.map(n).flat()}))}(f,e,n),e=l?R({mainlineWidth:1,mainStroke:"#000"},h):h,p=(PP(u,d,f),{}),g=[];for([a,o]of t.entries()){const{children:b,dataDomain:x,modifier:w,key:k}=a;var{index:y,channels:m}=o,v=_b(Object.fromEntries(m.map(({name:t,scale:e})=>[t,e])),t=>{var e=t["relations"],[e]=function(o){if(!o||!Array.isArray(o))return[$0,$0];let s,c;return[t=>{s=t.map.bind(t),c=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)},c){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):c(t)}return t},t=>(null!==s&&(t.map=s),null!==c&&(t.invert=c),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 c=e[i];for(const l of r){var{name:a,value:o}=l;n[a]=o.map(t=>c.map(t))}}return n}(m,v),[E,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])=>J0(t)&&J0(e))&&(r.push(a),i.push(o))}return[r,i]}(r(a)(y,v,M,d));m=x||E.length;const _=w?w(O,m,f):[];y=E.map((t,e)=>{var n={points:O[e],transform:_[e],index:t,markKey:k};for(const[r,i]of Object.entries(M))n[r]=i[t],S&&(n["series"+Cf(r)]=S[e].map(t=>i[t]));return S&&(n.seriesIndex=S[e]),n}),m=(o.data=y,o.index=E,null==b?void 0:b(y,v,f));g.push(...m||[])}return[{layout:f,theme:s,coordinate:d,components:u,markState:t,key:c,scale:p,style:e},g]}function IP(U,X,$,K){Ee(this,void 0,void 0,function*(){const{components:F,theme:n,layout:t,markState:e,coordinate:r,key:i,style:I}=U,{width:B,height:D}=t,G=Z(t,["x","y","width","height"]),a=["view","plot","main","content"];var o,s,c,l=a.map((t,e)=>e);const u=a.map(t=>Q0(Object.assign({},n,I),t)),z=["a","margin","padding","inset"].map(t=>J(G,t)),h=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 f=0,d=0,p=B,g=D;const y=l.map(t=>{var{left:t=0,top:e=0,bottom:n=0,right:r=0}=z[t];return f+=t,d+=e,p-=t+r,g-=e+n,{x:f,y:d,width:p,height:g}}),m=(X.selectAll(qP(at)).data(l.filter(t=>J0(u[t])),t=>a[t]).join(t=>t.append("rect").attr("className",at).style("zIndex",-2).call(h),t=>t.call(h),t=>t.remove()),X.selectAll(qP(rt)).data(F,(t,e)=>t.type+"-"+e).join(t=>t.append("g").style("zIndex",({zIndex:t})=>t||-1).attr("className",rt).append(t=>AP(t,r,n,K)),t=>t.each(function(t){var t=AP(t,r,n,K)["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:c,enterDuration:l=300,enterDelay:u=0,exitType:h,exitDuration:f=300,exitDelay:d=0}=r;for(const M of i){var{updateType:p=a,updateDuration:g=o,updateDelay:y=s,enterType:m=c,enterDuration:v=l,enterDelay:b=u,exitDuration:x=f,exitDelay:w=d,exitType:k=h}=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(qP(nt)).data([t],()=>i).join(t=>t.append("rect").style("fill","transparent").attr("className",nt).call(VP).call(HP,Array.from(e.keys())),t=>t.call(HP,Array.from(e.keys())).call(t=>{if(!m)return VP(t);{const[c,l]=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:c,duration:l,fill:"both"})})}})).transitions();$.push(...v.flat());for([o,s]of e.entries()){var W=s["data"];const{key:i,class:O}=o,S=function(c,t,e,n){const[l]=YA("shape",n),u=c["data"],{defaultShape:h,data:r}=t,f=r.map(t=>t.points),{theme:d,coordinate:p}=e,{type:g,style:y={}}=c;return(t,e)=>{var{shape:n=h}=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:h,index:e});const o=i?i.map(t=>u[t]):u[a],s=i||a;e=_b(y,t=>BP(t,o,s,u));return l(Object.assign(Object.assign({},e),{type:YP(c,n)}))(r,t,p,d,f)}}(o,s,U,K),_=(b=o,c=s,DP("enter",b,c,U,K)),A=(b=o,c=s,DP("update",b,c,U,K)),T=(b=o,c=s,DP("exit",b,c,U,K));var b=function(t,e,n){t=t.node().parentElement;return t.findAll(t=>t.style.facet===e).flatMap(t=>t.getElementsByClassName(n))}(X,O,"element");const v=X.select("#"+i).selectAll(qP(et)).selectFacetAll(b).data(W,t=>t.key,t=>t.groupKey).join(t=>t.append(S).attr("className",et).transition(function(t){return _(t,[this])}),e=>e.call(t=>{const c=t.parent(),l=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=c,i=l,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&&Z0(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 xb(e,null,this.parentNode).transition(t).remove(),t}),t=>t.transition(function(t){var e=new xb([],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,k=K,M,E;const[P]=YA("labelTransform",k),{markState:V,labelTransform:L}=x,Y=w.select(qP(tt)).node(),N=new Map,C=new Map,H=Array.from(V.entries()).flatMap(([t,e])=>{var{labels:n=[],key:r}=t;const i=function(t,e,n,r){const[s]=YA("shape",r),c=t["data"],{data:i,defaultLabelShape:l}=e,u=i.map(t=>t.points),{theme:h,coordinate:f}=n;return t=>{const{index:e,points:n}=t,r=c[e];var{formatter:i=t=>""+t}=t,t=_b(Z(t,["formatter"]),t=>BP(t,r,e,c)),{shape:a=l,text:o}=t,t=Z(t,["shape","text"]),i="string"==typeof i?_M(i):i,i=Object.assign(Object.assign({},t),{text:i(o)});return s(Object.assign({type:"label."+a},t))(n,i,f,h,u)}}(t,e,x,k),a=w.select("#"+r).selectAll(qP(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__,c=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:c,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),l=e.map((t,e)=>Object.assign(Object.assign({},n),{key:i[e]+"-"+r,bounds:[a[e]],index:t,points:a}));return t?t(l):l}(r,n,t);return t.forEach(t=>{N.set(t,i),C.set(t,e)}),t})})}),j=Q(Y).selectAll(qP(it)).data(H,t=>t.key).join(t=>t.append(t=>N.get(t)(t)).attr("className",it),t=>t.each(function(t){Z0(this,N.get(t)(t))}),t=>t.remove()).nodes(),q=Rp(j,t=>C.get(t.__data__)),R=x["coordinate"];for([M,E]of q){var{transform:M=[]}=M;(function(t){return t.reduce((n,r)=>(t,...e)=>r(n(t,...e),...e),$0)})(M.map(P))(E,R)}L&&L(j,R)}})}function BP(t,e,n,r){return"function"==typeof t?t(e,n,r):"string"==typeof t&&void 0!==e[t]?e[t]:t}function DP(o,t,e,n,r){var[,i]=YA("shape",r);const[s]=YA("animation",r);r=e.defaultShape;const{theme:a,coordinate:c}=n;e=`default${Cf(o)}Animation`;const{[e]:l}=i(YP(t,r)).props,{[o]:u={}}=a,h=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||l},h);return t.type?(t=s(t)(e,n,{delay:r,duration:i,easing:a},c,u),Array.isArray(t)?t:[t]):null}}function GP(t){return t.finished.then(()=>{t.cancel()}),t}function zP(t={type:"light"}){var{type:e="light"}=t;return Object.assign(Object.assign({},t),{type:e})}function WP(r,i){return Ee(this,void 0,void 0,function*(){var t={library:i},e=r["data"],n=Z(r,["data"]);return null==e?r:([,{data:e}]=yield vP(0,{data:e},t),Object.assign({data:e},n))})}function VP(t){t.style("x",t=>t.paddingLeft).style("y",t=>t.paddingTop).style("width",t=>t.innerWidth).style("height",t=>t.innerHeight)}function YP(t,e){t=t.type;return t+"."+e}function HP(t,e){const n=t=>void 0!==t.class?""+t.class:"";t.selectAll(qP(f)).data(e,t=>t.key).join(t=>t.append("g").attr("className",f).attr("id",t=>t.key).style("facet",n).style("fill","transparent"),t=>t.style("facet",n),t=>t.remove()),t.select(qP(tt)).node()||t.append("g").attr("className",tt)}function qP(...t){return t.map(t=>"."+t).join("")}function UP(t){for(var t=R({},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 c=s[t];e.set(c,o),n.set(c,t),r.push(c)}}return t}function XP(t,e={},n){const{width:r=640,height:i=480,autoFit:a=!1,on:o}=t,s=UP(t),{canvas:c=(u=r,h=i,f=new df,f.registerPlugin(new wf),new Ml({width:u,height:h,container:document.createElement("div"),renderer:f})),library:l=WA()}=e;var u,h,f;e.canvas=c,e.library=l,a&&!e.bindAutoFit&&([u,h={}]=[t,e],u.autoFit&&window.addEventListener("resize",KP(u,h)),e.bindAutoFit=!0),c.resize(r,i),VA(o,GA.BEFORE_RENDER);const d=Q(c.document.documentElement);return c.ready.then(()=>NP(Object.assign(Object.assign({},s),{width:r,height:i}),d,l,e)).then(n).then(()=>VA(o,GA.AFTER_RENDER)),"string"==typeof(f=c.getConfig().container)?document.getElementById(f):f}function $P(t,e={}){var n,r=t["on"],i=e["canvas"];i&&i.destroy(),[i,t={}]=[t,e],i.autoFit&&window.removeEventListener("resize",KP(i,t)),(e=r)&&(n?delete e[n]:e={})}const KP=(i,a={})=>{return r=()=>{var{width:t,height:e,autoFit:n}=i,r=a["canvas"],{width:r,height:n}=ig(r.getConfig().container,n,t,e),t=Object.assign(Object.assign({},i),{width:r,height:n});t.width&&t.height&&XP(t,a)},o=300,function(){var t=this,e=arguments,n=s&&!c;clearTimeout(c),c=setTimeout(function(){c=null,s||r.apply(t,e)},o),n&&r.apply(t,e)};var r,o,s,c};function ZP(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 l{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 ZP(this,t=>{e===t.attr("key")&&(n=t)}),n}getNodesByType(e){const n=[];return ZP(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 JP(t,{name:e,key:n=e}){t.prototype[e]=function(t){return 0===arguments.length?this.attr(n):this.attr(n,t)}}function QP(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 t8(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 e8(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])?Sf(e)?n.concat(e):n.push(e):r[t]=Sf(e)?e:[e],this.attr(i,r))}}function u(r){return t=>{for(const n of r){var e=n["type"];"value"===e?JP(t,n):"array"===e?QP(t,n):"object"===e?t8(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&&e8(t,n)}return t}}function n8(t){return Object.entries(t).map(([t,e])=>({type:"node",name:t,ctor:e}))}ho=[{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 r8=class extends l{constructor(){super({},"interval")}},i8=(r8=t([u(ho)],r8),class extends l{constructor(){super({},"rect")}}),a8=(i8=t([u(ho)],i8),class extends l{constructor(){super({},"point")}}),o8=(a8=t([u(ho)],a8),class extends l{constructor(){super({},"area")}}),s8=(o8=t([u(ho)],o8),class extends l{constructor(){super({},"line")}}),c8=(s8=t([u(ho)],s8),class extends l{constructor(){super({},"cell")}}),l8=(c8=t([u(ho)],c8),class extends l{constructor(){super({},"vector")}}),u8=(l8=t([u(ho)],l8),class extends l{constructor(){super({},"link")}}),h8=(u8=t([u(ho)],u8),class extends l{constructor(){super({},"polygon")}});h8=t([u(ho)],h8);oo=t([u(ho)],class extends l{constructor(){super({},"image")}});let f8=class extends l{constructor(){super({},"text")}},d8=(f8=t([u(ho)],f8),class extends l{constructor(){super({},"box")}}),p8=(d8=t([u(ho)],d8),class extends l{constructor(){super({},"lineX")}}),g8=(p8=t([u(ho)],p8),class extends l{constructor(){super({},"lineY")}}),y8=(g8=t([u(ho)],g8),class extends l{constructor(){super({},"range")}}),m8=(y8=t([u(ho)],y8),class extends l{constructor(){super({},"rangeX")}}),v8=(m8=t([u(ho)],m8),class extends l{constructor(){super({},"rangeY")}}),b8=(v8=t([u(ho)],v8),class extends l{constructor(){super({},"connector")}}),x8=(b8=t([u(ho)],b8),class extends l{constructor(){super({},"shape")}}),w8=(x8=t([u(ho)],x8),class extends l{constructor(){super({},"sankey")}}),k8=(w8=t([u([...ho,{name:"layout",type:"value"}])],w8),class extends l{constructor(){super({},"treemap")}}),M8=(k8=t([u([...ho,{name:"layout",type:"value"}])],k8),class extends l{constructor(){super({},"boxplot")}}),E8=(M8=t([u(ho)],M8),class extends l{constructor(){super({},"pack")}}),O8=(E8=t([u([...ho,{name:"layout",type:"value"}])],E8),class extends l{constructor(){super({},"forceGraph")}}),S8=(O8=t([u([...ho,{name:"layout",type:"value"}])],O8),class extends l{constructor(){super({},"tree")}}),_8=(S8=t([u([...ho,{name:"layout",type:"value"}])],S8),class extends l{constructor(){super({},"wordCloud")}});_8=t([u([...ho,{name:"layout",type:"object"}])],_8);tl={interval:r8,rect:i8,point:a8,area:o8,line:s8,cell:c8,vector:l8,link:u8,polygon:h8,image:oo,text:f8,box:d8,lineX:p8,lineY:g8,range:y8,rangeX:m8,rangeY:v8,connector:b8,sankey:w8,treemap:k8,boxplot:M8,shape:x8,pack:E8,forceGraph:O8,tree:S8,wordCloud:_8};let A8=class extends l{constructor(){super({},"view")}},T8=(A8=t([u([{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"},...n8(tl)])],A8),class extends l{constructor(){super({},"spaceLayer")}}),P8=(T8=t([u([{type:"value",name:"data"},...n8(tl)])],T8),class extends l{constructor(){super({},"spaceFlex")}}),L8=(P8=t([u([{type:"value",name:"data"},...n8(tl)])],P8),class extends l{constructor(){super({},"facetRect")}}),N8=(L8=t([u([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...n8(tl)])],L8),class extends l{constructor(){super({},"facetCircle")}}),C8=(N8=t([u([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"legend"},{type:"object",name:"axis"},...n8(tl)])],N8),class extends l{constructor(){super({},"repeatMatrix")}}),j8=(C8=t([u([{type:"value",name:"data"},{type:"array",name:"transform"},{type:"object",name:"scale"},{type:"object",name:"encode"},{type:"object",name:"encode"},{type:"object",name:"legend"},...n8(tl)])],C8),class extends l{constructor(){super({},"timingKeyframe")}}),R8=(j8=t([u([...n8(tl)])],j8),class extends l{constructor(){super({},"geoView")}}),F8=(R8=t([u([{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"},...n8(tl)])],R8),class extends l{constructor(){super({},"geoPath")}});F8=t([u([{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"},...n8(tl)])],F8);var I8={view:A8,spaceLayer:T8,spaceFlex:P8,facetRect:L8,facetCircle:N8,repeatMatrix:C8,timingKeyframe:j8,geoView:R8,geoPath:F8};for(const G8 of Object.values(I8))u(n8(I8))(G8);const B8=WA();function D8(t){return Object.assign(Object.assign({},t.value),{type:t.type})}fo=[{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"},...n8(tl),...Object.entries(I8).map(([t,e])=>({type:"container",name:t,ctor:e}))];h.Chart=class extends l{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:B8}}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}=ig(this._container,n,i,o),this.width(n),this.height(r),this._context.canvas=([n,r,i,a=new df,o=[]]=[this._container,i,o,t,e],o.push(new wf),o.forEach(t=>a.registerPlugin(t)),new Ml({container:n,width:r,height:i,renderer:a}))),XP(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,D8(e));n.length;){const e=n.pop();var i=r.get(e);for(const s of e.children){var a=D8(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"];VA(n,GA.BEFORE_DESTROY),$P(e,this._context),e=this._container,(t=e.parentNode)&&t.removeChild(e),VA(n,GA.AFTER_DESTROY)}clear(){var t=this.options(),e=t["on"];VA(e,GA.BEFORE_CLEAR),$P(t,this._context),VA(e,GA.AFTER_CLEAR)}forceFit(){var{width:t,height:e}=this.options(),{width:t,height:e}=ig(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;VA(i,GA.BEFORE_CHANGE_SIZE),this.width(t),this.height(e),this.render(),VA(i,GA.AFTER_CHANGE_SIZE)}},h.Chart=t([u(fo)],h.Chart),h.AREA_CLASS_NAME=at,h.COMPONENT_CLASS_NAME=rt,h.ELEMENT_CLASS_NAME=et,h.LABEL_CLASS_NAME=it,h.LABEL_LAYER_CLASS_NAME=tt,h.MAIN_LAYER_CLASS_NAME=f,h.PLOT_CLASS_NAME=nt,h.VIEW_CLASS_NAME=j,h.createLibrary=WA,h.destroy=$P,h.register=function(t,e){Object.assign(B8,{[t]:e})},h.render=XP,h.renderToMountedElement=function(t,e={},n){const{width:r=640,height:i=480,on:a}=t;var t=UP(t),{library:o=WA(),group:s=new ts}=e;if(function(t){if(!Of(t)){if(kf(t))return!t.length;var e,n=Rf(t);if("Map"===n||"Set"===n)return!t.size;if(If(t))return!Object.keys(t).length;for(e in t)if(Gf.call(t,e))return}return 1}(null==s?void 0:s.parentElement))throw new Error("Unmounted group");var c=Q(s);return e.group=s,e.library=o,VA(a,GA.BEFORE_RENDER),NP(Object.assign(Object.assign({},t),{width:r,height:i}),c,o,e).then(n).then(()=>VA(a,GA.AFTER_RENDER)),s},Object.defineProperty(h,"__esModule",{value:!0})});
|