@antv/g2 5.0.2 → 5.0.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/CHANGELOG.md +16 -10
- package/dist/g2-lite.min.js +3 -3
- package/dist/g2.min.js +1 -1
- package/esm/shape/interval/funnel.js +20 -4
- package/esm/shape/interval/funnel.js.map +1 -1
- package/esm/shape/interval/pyramid.js +3 -2
- package/esm/shape/interval/pyramid.js.map +1 -1
- package/lib/shape/interval/funnel.js +20 -4
- package/lib/shape/interval/funnel.js.map +1 -1
- package/lib/shape/interval/pyramid.js +3 -2
- package/lib/shape/interval/pyramid.js.map +1 -1
- package/package.json +1 -1
- package/src/shape/interval/funnel.ts +23 -12
- package/src/shape/interval/pyramid.ts +0 -2
package/dist/g2.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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(p){"use strict";const O="main-layer",at="label-layer",ot="element",H="view",st="plot",lt="component",ct="label",ut="area";var S="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function j(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,l=Math.log(o),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(o-s)/o)*(u-o/2<0?-1:1),c=Math.max(r,Math.floor(n-u*s/o+l)),u=Math.min(i,Math.floor(n+(o-u)*s/o+l)),t(e,n,c,u,a));var o,s,l,c,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}function F(t,e){D(t,0,t.children.length,e,t)}function D(t,e,n,r,i){(i=i||X(null)).minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var o=t.children[a];z(i,t.leaf?r(o):o)}return i}function z(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 G(t,e){return t.minX-e.minX}function W(t,e){return t.minY-e.minY}function Y(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function V(t){return t.maxX-t.minX+(t.maxY-t.minY)}function q(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function U(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function X(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function $(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(j(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}(e=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}).prototype.all=function(){return this._all(this.data,[])},e.prototype.search=function(t){var e=this.data,n=[];if(U(t,e))for(var r=this.toBBox,i=[];e;){for(var a=0;a<e.children.length;a++){var o=e.children[a],s=e.leaf?r(o):o;U(t,s)&&(e.leaf?n.push(o):q(t,s)?this._all(o,n):i.push(o))}e=i.pop()}return n},e.prototype.collides=function(t){var e=this.data;if(U(t,e))for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],a=e.leaf?this.toBBox(i):i;if(U(t,a)){if(e.leaf||q(t,a))return!0;n.push(i)}}e=n.pop()}return!1},e.prototype.load=function(t){if(t&&t.length)if(t.length<this._minEntries)for(var e=0;e<t.length;e++)this.insert(t[e]);else{var n,r=this._build(t.slice(),0,t.length-1,0);this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(n=this.data,this.data=r,r=n),this._insert(r,this.data.height-r.height-1,!0)):this.data=r}return this},e.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},e.prototype.clear=function(){return this.data=X([]),this},e.prototype.remove=function(t,e){if(t)for(var n,r,i,a=this.data,o=this.toBBox(t),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],n=l.pop(),i=!0),a.leaf){var c=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}(t,a.children,e);if(-1!==c)return a.children.splice(c,1),s.push(a),this._condense(s),this}i||a.leaf||!q(a,o)?r?(n++,a=r.children[n],i=!1):a=null:(s.push(a),l.push(n),a=(r=a).children[n=0])}return this},e.prototype.toBBox=function(t){return t},e.prototype.compareMinX=function(t,e){return t.minX-e.minX},e.prototype.compareMinY=function(t,e){return t.minY-e.minY},e.prototype.toJSON=function(){return this.data},e.prototype.fromJSON=function(t){return this.data=t,this},e.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},e.prototype._build=function(t,e,n,r){var i,a=n-e+1,o=this._maxEntries;if(a<=o)F(i=X(t.slice(e,n+1)),this.toBBox);else{r||(r=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,r-1))),(i=X([])).leaf=!1,i.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));$(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var u=Math.min(c+l-1,n);$(t,c,u,s,this.compareMinY);for(var h=c;h<=u;h+=s){var f=Math.min(h+s-1,u);i.children.push(this._build(t,h,f,r-1))}}F(i,this.toBBox)}return i},e.prototype._chooseSubtree=function(t,e,n,r){for(;;){if(r.push(e),e.leaf||r.length-1===n)break;for(var i=1/0,a=1/0,o=void 0,s=0;s<e.children.length;s++){var l=e.children[s],c=Y(l),u=(h=t,u=l,(Math.max(u.maxX,h.maxX)-Math.min(u.minX,h.minX))*(Math.max(u.maxY,h.maxY)-Math.min(u.minY,h.minY))-c);u<a?(a=u,i=c<i?c:i,o=l):u===a&&c<i&&(i=c,o=l)}e=o||e.children[0]}var h,u;return e},e.prototype._insert=function(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),z(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},e.prototype._split=function(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=X(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,F(n,this.toBBox),F(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)},e.prototype._splitRoot=function(t,e){this.data=X([t,e]),this.data.height=t.height+1,this.data.leaf=!1,F(this.data,this.toBBox)},e.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,a,o,s=1/0,l=1/0,c=e;c<=n-e;c++){var u=D(t,0,c,this.toBBox),h=D(t,c,n,this.toBBox),f=(i=u,f=h,d=o=a=void 0,a=Math.max(i.minX,f.minX),o=Math.max(i.minY,f.minY),d=Math.min(i.maxX,f.maxX),i=Math.min(i.maxY,f.maxY),Math.max(0,d-a)*Math.max(0,i-o)),d=Y(u)+Y(h);f<s?(s=f,r=c,l=d<l?d:l):f===s&&d<l&&(l=d,r=c)}return r||n-e},e.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:G,i=t.leaf?this.compareMinY:W;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},e.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,a=D(t,0,e,i),o=D(t,n-e,n,i),s=V(a)+V(o),l=e;l<n-e;l++){var c=t.children[l];z(a,t.leaf?i(c):c),s+=V(a)}for(var u=n-e-1;e<=u;u--){var h=t.children[u];z(o,t.leaf?i(h):h),s+=V(o)}return s},e.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;0<=r;r--)z(e[r],t)},e.prototype._condense=function(t){for(var e=t.length-1,n=void 0;0<=e;e--)0===t[e].children.length?0<e?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():F(t[e],this.toBBox)};var K=e,Z=1e-6,Q="undefined"!=typeof Float32Array?Float32Array:Array;function J(){var t=new Q(9);return Q!=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 tt=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],h=n[0],f=n[1],d=n[2],p=n[3],g=n[4],m=n[5],y=n[6],v=n[7],n=n[8];return t[0]=h*r+f*o+d*c,t[1]=h*i+f*s+d*u,t[2]=h*a+f*l+d*e,t[3]=p*r+g*o+m*c,t[4]=p*i+g*s+m*u,t[5]=p*a+g*l+m*e,t[6]=y*r+v*o+n*c,t[7]=y*i+v*s+n*u,t[8]=y*a+v*l+n*e,t};function ht(){var t=new Q(16);return Q!=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 ft(t){var e=new Q(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 dt(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 pt(t,e,n,r,i,a,o,s,l,c,u,h,f,d,p,g,m){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=g,t[15]=m,t}function gt(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 mt(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],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],m=e[14],e=e[15],y=n*s-r*o,v=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,k=i*c-a*l,M=u*g-h*p,E=u*m-f*p,O=u*e-d*p,S=h*m-f*g,_=h*e-d*g,A=f*e-d*m,P=y*A-v*_+b*S+x*O-w*E+k*M;return P?(t[0]=(s*A-l*_+c*S)*(P=1/P),t[1]=(i*_-r*A-a*S)*P,t[2]=(g*k-m*w+e*x)*P,t[3]=(f*w-h*k-d*x)*P,t[4]=(l*O-o*A-c*E)*P,t[5]=(n*A-i*O+a*E)*P,t[6]=(m*b-p*k-e*v)*P,t[7]=(u*k-f*b+d*v)*P,t[8]=(o*_-s*O+c*M)*P,t[9]=(r*O-n*_-a*M)*P,t[10]=(p*w-g*b+e*y)*P,t[11]=(h*b-u*w-d*y)*P,t[12]=(s*E-o*S-l*M)*P,t[13]=(n*S-r*E+i*M)*P,t[14]=(g*v-p*x-m*y)*P,t[15]=(u*x-h*v+f*y)*P,t):null}function vt(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],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*l-i*a)*(u*g-h*p)+(n*s-r*o)*(c*t-f*d)-(n*l-i*o)*(c*g-h*d)+(r*l-i*s)*(c*p-u*d)}function bt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],g=e[12],m=e[13],y=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*l+x*f+w*m,t[2]=v*a+b*c+x*d+w*y,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*l+x*f+w*m,t[6]=v*a+b*c+x*d+w*y,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*l+x*f+w*m,t[10]=v*a+b*c+x*d+w*y,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*l+x*f+w*m,t[14]=v*a+b*c+x*d+w*y,t[15]=v*o+b*u+x*p+w*e,t}function xt(t,e,n){var r,i,a,o,s,l,c,u,h,f,d,p,g=n[0],m=n[1],n=n[2];return e===t?(t[12]=e[0]*g+e[4]*m+e[8]*n+e[12],t[13]=e[1]*g+e[5]*m+e[9]*n+e[13],t[14]=e[2]*g+e[6]*m+e[10]*n+e[14],t[15]=e[3]*g+e[7]*m+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],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]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*g+s*m+h*n+e[12],t[13]=i*g+l*m+f*n+e[13],t[14]=a*g+c*m+d*n+e[14],t[15]=o*g+u*m+p*n+e[15]),t}function wt(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 kt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],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+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+h*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=h*n-s*r,t}function Mt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],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-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-h*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+h*n,t}function Et(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 Ot(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 St(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,h=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(h+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(c+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function _t(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function At(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function Pt(t,e){var n=new Q(3),r=(At(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,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-l)/h):c<a&&e<a?(h=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/h,t[0]=.25*h,t[1]=(o+l)/h,t[2]=(r+s)/h):e<c?(h=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/h,t[0]=(o+l)/h,t[1]=.25*h,t[2]=(u+i)/h):(h=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/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],l=a+a,c=o+o,u=s+s,h=a*l,f=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],g=i[0],m=i[1],i=i[2],y=(1-(d+s))*u,v=(f+e)*u,u=(a-c)*u,f=(f-e)*p,e=(1-(h+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(h+d))*r;return t[0]=y,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]=c,t[11]=0,t[12]=n[0]+g-(y*g+f*m+p*i),t[13]=n[1]+m-(v*g+e*m+a*i),t[14]=n[2]+i-(u*g+s*m+c*i),t[15]=1,t}function Lt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Nt(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 Ct(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var jt=Ct;function Rt(t,e,n,r){var i,a,o,s,l=e[0],c=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(l-f)<Z&&Math.abs(c-d)<Z&&Math.abs(e-n)<Z?gt(t):(f=l-f,d=c-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*l+r*c+u*e),t[13]=-(h*l+a*c+o*e),t[14]=-(f*l+d*c+n*e),t[15]=1,t)}function It(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 Bt=Object.freeze({__proto__:null,create:ht,clone:ft,copy:dt,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,h,f,d,p,g){var m=new Q(16);return m[0]=t,m[1]=e,m[2]=n,m[3]=r,m[4]=i,m[5]=a,m[6]=o,m[7]=s,m[8]=l,m[9]=c,m[10]=u,m[11]=h,m[12]=f,m[13]=d,m[14]=p,m[15]=g,m},set:pt,identity:gt,transpose:mt,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],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],m=e[14],e=e[15];return t[0]=s*(f*e-d*m)-h*(l*e-c*m)+g*(l*d-c*f),t[1]=-(r*(f*e-d*m)-h*(i*e-a*m)+g*(i*d-a*f)),t[2]=r*(l*e-c*m)-s*(i*e-a*m)+g*(i*c-a*l),t[3]=-(r*(l*d-c*f)-s*(i*d-a*f)+h*(i*c-a*l)),t[4]=-(o*(f*e-d*m)-u*(l*e-c*m)+p*(l*d-c*f)),t[5]=n*(f*e-d*m)-u*(i*e-a*m)+p*(i*d-a*f),t[6]=-(n*(l*e-c*m)-o*(i*e-a*m)+p*(i*c-a*l)),t[7]=n*(l*d-c*f)-o*(i*d-a*f)+u*(i*c-a*l),t[8]=o*(h*e-d*g)-u*(s*e-c*g)+p*(s*d-c*h),t[9]=-(n*(h*e-d*g)-u*(r*e-a*g)+p*(r*d-a*h)),t[10]=n*(s*e-c*g)-o*(r*e-a*g)+p*(r*c-a*s),t[11]=-(n*(s*d-c*h)-o*(r*d-a*h)+u*(r*c-a*s)),t[12]=-(o*(h*m-f*g)-u*(s*m-l*g)+p*(s*f-l*h)),t[13]=n*(h*m-f*g)-u*(r*m-i*g)+p*(r*f-i*h),t[14]=-(n*(s*m-l*g)-o*(r*m-i*g)+p*(r*l-i*s)),t[15]=n*(s*f-l*h)-o*(r*f-i*h)+u*(r*l-i*s),t},determinant:vt,multiply:bt,translate:xt,scale:wt,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,h,f,d,p,g,m,y,v,b,x,w,k,M,E=r[0],O=r[1],r=r[2],S=Math.hypot(E,O,r);return S<Z?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],l=e[3],c=e[4],u=e[5],h=e[6],f=e[7],d=e[8],p=e[9],g=e[10],m=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)+c*(y=O*E*i+r*S)+d*(r=r*E*i-O*S),t[1]=o*n+u*y+p*r,t[2]=s*n+h*y+g*r,t[3]=l*n+f*y+m*r,t[4]=a*v+c*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+h*b+g*x,t[7]=l*v+f*b+m*x,t[8]=a*w+c*k+d*M,t[9]=o*w+u*k+p*M,t[10]=s*w+h*k+g*M,t[11]=l*w+f*k+m*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:kt,rotateY:Mt,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],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+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+h*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=h*n-s*r,t},fromTranslation:Et,fromScaling:Ot,fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<Z?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:St,fromQuat2:function(t,e){var n=new Q(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=r*r+i*i+a*a+o*o;return 0<h?(n[0]=2*(s*o+u*r+l*a-c*i)/h,n[1]=2*(l*o+u*i+c*r-s*a)/h,n[2]=2*(c*o+u*a+s*i-l*r)/h):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),St(t,e,n),t},getTranslation:_t,getScaling:At,getRotation:Pt,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(h=a+a),i=i*(f=o+o),c=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-(c+o))*f,t[1]=(l+e)*f,t[2]=(i-h)*f,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+h)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Tt,fromQuat:Lt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:Nt,perspective:Nt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:Ct,ortho:jt,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:Rt,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,h=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=h*h+(r=r*l-o*n)*r+(o=o*c-s*l)*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]=c*o-n*r,t[5]=n*h-l*o,t[6]=l*r-c*h,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:It,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],f=t[10],d=t[11],p=t[12],g=t[13],m=t[14],t=t[15],y=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],P=e[12],T=e[13],L=e[14],e=e[15];return Math.abs(n-y)<=Z*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-v)<=Z*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=Z*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=Z*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=Z*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-k)<=Z*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(l-M)<=Z*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-E)<=Z*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(u-O)<=Z*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(h-S)<=Z*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(f-_)<=Z*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(d-A)<=Z*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-P)<=Z*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(g-T)<=Z*Math.max(1,Math.abs(g),Math.abs(T))&&Math.abs(m-L)<=Z*Math.max(1,Math.abs(m),Math.abs(L))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))},mul:bt,sub:It});function y(){var t=new Q(3);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Ft(t){var e=new Q(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 zt(t,e,n){var r=new Q(3);return r[0]=t,r[1]=e,r[2]=n,r}function Gt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Wt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Ht(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}function Yt(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 qt(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 Ut(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Xt(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 $t(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 Kt(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 Zt(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 Qt(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)<=Z*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=Z*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))}var 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)},te=Dt;function ee(){var t=new Q(4);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function ne(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 re(){var t=new Q(4);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function ie(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 ae(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function oe(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 se(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}y(),ee();var le=function(t,e,n,r){var i=new Q(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},ue=ae,he=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 fe(t,e){var n=e[0],r=e[1],n=n*n+r*r;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n}function de(t,e){return t[0]*e[0]+t[1]*e[1]}function pe(t,e){return t[0]===e[0]&&t[1]===e[1]}function ge(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}y(),zt(1,0,0),zt(0,1,0),re(),re(),J(),e=new Q(2),Q!=Float32Array&&(e[0]=0,e[1]=0);var me=function(t,e){return(me=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 ye(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}me(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 et(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 ve(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function w(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 m(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 be(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 xe={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var we={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function ke(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return we[e]===t.length-1&&"achlmqstvz".includes(e)})}function Me(t){return ke(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function Ee(t){return Me(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function Oe(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=we[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,we[n]))),we[n]););}function Se(t){return 48<=t&&t<=57}function _e(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 Ae(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=we[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,_e(t),t.data=[],u)for(;;){for(var h=u;0<h;--h){if(97!=(32|c)||3!==h&&4!==h?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(Se(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&&Se(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&Se(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;Se(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&Se(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&Se(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),_e(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,_e(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}Oe(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var Pe=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 Te(t){var o,s,l,c;return Me(t)?ge(t):(t=function(t){if(ke(t))return ge(t);var e=new Pe(t);for(_e(e);e.index<e.max&&!e.err.length;)Ae(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function Le(t){if(Ee(t))return ge(t);for(var e,n,r,i,a,o,s,l=Te(t),c=v({},xe),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,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=l[u],f=h.length;c.x1=+h[f-2],c.y1=+h[f-1],c.x2=+h[f-4]||c.x1,c.y2=+h[f-3]||c.y1}return l}function Ne(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Ce(t,e,n,r,i,a,o,s,l,c){var u=120*Math.PI/180,h=Math.PI/180*(+i||0),f=[],d=(c?(b=c[0],x=c[1],y=c[2],v=c[3]):(t=(g=Ne(t,e,-h)).x,e=g.y,1<(d=(p=(t-(s=(g=Ne(s,l,-h)).x))/2)*p/(n*n)+(g=(e-(l=g.y))/2)*g/(r*r))&&(n*=d=Math.sqrt(d),r*=d),d=n*n,m=r*r,y=(a=(a===o?-1:1)*Math.sqrt(Math.abs((d*m-d*g*g-m*p*p)/(d*g*g+m*p*p))))*n*g/r+(t+s)/2,v=a*-r*p/n+(e+l)/2,b=Math.asin(((e-v)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),x=Math.asin(((l-v)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),b=t<y?Math.PI-b:b,x=s<y?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&&(m=x,g=s,a=l,x=b+u*(o&&b<x?1:-1),f=Ce(s=y+n*Math.cos(x),l=v+r*Math.sin(x),n,r,i,0,o,g,a,[x,m,y,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,m=4/3*r*g,y=[t,e],v=[t+a*u,e-m*p],b=[s+a*o,l-m*i],x=[s,l];if(v[0]=2*y[0]-v[0],v[1]=2*y[1]-v[1],c)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?Ne(f[k-1],f[k],h).y:Ne(f[k],f[k+1],h).x;return w}function je(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function Re(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Ie(t,e,n,r,i){var a=Re([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=je([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 Be(t,e,n,r){var t=[t,e],e=[n,r],i=je(t,e,.5),e=je(e,i,.5),a=je(i,e,.5),o=je(e,a,.5),s=je(a,o,.5),t=Ie(t[0],t[1],i[0],i[1],a[0]).point,i=Ie(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Fe(t,e){var n;if(void 0===e&&(e=!1),Ee(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=ge(t),e?[n,[]]:n;for(var r,i=Le(t),a=v({},xe),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var h=function(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],h=c[1],f=e.x1,d=e.y1,p=e.x,g=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=h,t;case"A":return s=[f,d].concat(c),["C"].concat(Ce(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(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(Be(f,d,u,h));case"Z":return f===p&&d===g?["C",f,d,p,g,p,g]:["C"].concat(Be(f,d,p,g))}return t}(i[u],a),f=(i[u]=h,m=g=p=d=f=void 0,i),d=o,p=u;if(7<f[p].length){f[p].shift();for(var g=f[p],m=p;g.length;)d[p]="A",f.splice(m+=1,0,["C"].concat(g.splice(0,6)));f.splice(p,1)}l=i.length,"Z"===s&&c.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,c]:i}function De(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 ze(t,e,n,r,i,I,B,a,o,s,l){var c=l.bbox,F=void 0===c||c,c=l.length,D=void 0===c||c,c=l.sampleSize,u=void 0===c?30:c,h="number"==typeof s,f=t,d=e,p=0,g=[f,d,p],m=[f,d],y={x:0,y:0},v=[{x:f,y:d}];h&&s<=0&&(y={x:f,y:d});for(var b,x,w,k,M,E,O,S,_,A,P,T,L,N,C,j,R=0;R<=u;R+=1)b=t,x=e,w=n,k=r,M=i,E=I,O=B,S=a,_=o,A=R/u,T=j=C=N=L=T=P=void 0,T=Math.abs,L=Math.sin,N=Math.cos,C=Math.sqrt,j=Math.PI,w=T(w),T=T(k),k=j/180*((M%360+360)%360),f=(P=b===S&&x===_?{x:b,y:x}:0===w||0===T?Ie(b,x,S,_,A).point:(M=(b-S)/2,P=(x-_)/2,M={x:N(k)*M+L(k)*P,y:-L(k)*M+N(k)*P},1<(P=Math.pow(M.x,2)/Math.pow(w,2)+Math.pow(M.y,2)/Math.pow(T,2))&&(w*=C(P),T*=C(P)),P=(Math.pow(w,2)*Math.pow(T,2)-Math.pow(w,2)*Math.pow(M.y,2)-Math.pow(T,2)*Math.pow(M.x,2))/(Math.pow(w,2)*Math.pow(M.y,2)+Math.pow(T,2)*Math.pow(M.x,2)),E=(E!==O?1:-1)*C(P<0?0:P),C=w*M.y/T*E,P=-T*M.x/w*E,E=N(k)*C-L(k)*P+(b+S)/2,b=L(k)*C+N(k)*P+(x+_)/2,x=De({x:1,y:0},S={x:(M.x-C)/w,y:(M.y-P)/T}),_=De(S,{x:(-M.x-C)/w,y:(-M.y-P)/T}),!O&&0<_?_-=2*j:O&&_<0&&(_+=2*j),S=x+(_%=2*j)*A,C=w*N(S),M=T*L(S),{x:N(k)*C-L(k)*M+E,y:L(k)*C+N(k)*M+b})).x,d=P.y,F&&v.push({x:f,y:d}),D&&(p+=Re(m,[f,d])),m=[f,d],h&&s<=p&&s>g[2]&&(O=(p-s)/(p-g[2]),y={x:m[0]*(1-O)+g[0]*O,y:m[1]*(1-O)+g[1]*O}),g=[f,d,p];return{length:p,point:y=h&&p<=s?{x:a,y:o}:y,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 Ge(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,h=void 0===u||u,u=c.length,f=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,g=t,m=e,y=0,v=[g,m,y],b=[g,m],x={x:0,y:0},w=[{x:g,y:m}];p&&l<=0&&(x={x:g,y:m});for(var k,M,E,O,S,_,A,P,T,L,N=0;N<=d;N+=1)k=t,M=e,E=n,O=r,S=i,_=a,A=o,P=s,L=void 0,L=1-(T=N/d),g=(k={x:Math.pow(L,3)*k+3*Math.pow(L,2)*T*E+3*L*Math.pow(T,2)*S+Math.pow(T,3)*A,y:Math.pow(L,3)*M+3*Math.pow(L,2)*T*O+3*L*Math.pow(T,2)*_+Math.pow(T,3)*P}).x,m=k.y,h&&w.push({x:g,y:m}),f&&(y+=Re(b,[g,m])),b=[g,m],p&&l<=y&&l>v[2]&&(E=(y-l)/(y-v[2]),x={x:b[0]*(1-E)+v[0]*E,y:b[1]*(1-E)+v[1]*E}),v=[g,m,y];return{length:y,point:x=p&&y<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function We(t,e,n,r,i,a,o,s){var l=s.bbox,c=void 0===l||l,l=s.length,u=void 0===l||l,l=s.sampleSize,h=void 0===l?10:l,f="number"==typeof o,d=t,p=e,g=0,m=[d,p,g],y=[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,c&&b.push({x:d,y:p}),u&&(g+=Re(y,[d,p])),y=[d,p],f&&o<=g&&o>m[2]&&(k=(g-o)/(g-m[2]),v={x:y[0]*(1-k)+m[0]*k,y:y[1]*(1-k)+m[1]*k}),m=[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 He(t,e,n){for(var r,i,a,o=Le(t),s="number"==typeof e,l=[],c=0,u=0,h=0,f=0,d=[],p=[],g=0,m={x:0,y:0},y=m,v=m,b=m,x=0,w=0,k=o.length;w<k;w+=1)l=(r="M"===(i=(a=o[w])[0]))?l:[c,u].concat(a.slice(1)),r?(y=m={x:h=a[1],y:f=a[2]},g=0,s&&e<.001&&(b=m)):"L"===i?(g=(r=Ie(l[0],l[1],l[2],l[3],(e||0)-x)).length,m=r.min,y=r.max,v=r.point):"A"===i?(g=(r=ze(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],(e||0)-x,n||{})).length,m=r.min,y=r.max,v=r.point):"C"===i?(g=(r=Ge(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],(e||0)-x,n||{})).length,m=r.min,y=r.max,v=r.point):"Q"===i?(g=(r=We(l[0],l[1],l[2],l[3],l[4],l[5],(e||0)-x,n||{})).length,m=r.min,y=r.max,v=r.point):"Z"===i&&(g=(r=Ie((l=[c,u,h,f])[0],l[1],l[2],l[3],(e||0)-x)).length,m=r.min,y=r.max,v=r.point),s&&x<e&&e<=x+g&&(b=v),p.push(y),d.push(m),x+=g,c=(r="Z"!==i?a.slice(-2):[h,f])[0],u=r[1];return{length:x,point:b=s&&x<=e?{x:c,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 Ye(t){return(c=l=s=0)<=Fe(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function Ve(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?Ge(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=je(n,i,r),i=je(i,a,r),a=je(a,e,r),o=je(n,i,r),i=je(i,a,r),r=je(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)},Ue=function(t){return"function"==typeof t},_=function(t){return null==t},Xe={}.toString,$e=function(t,e){return Xe.call(t)==="[object "+e+"]"},Ke=function(t){return Array.isArray?Array.isArray(t):$e(t,"Array")},Ze=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function Qe(t,e){if(t)if(Ke(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(Ze(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var Je=function(t){return"object"==typeof t&&null!==t},tn=function(t){if(!Je(t)||!$e(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},en=function(t){if(Ke(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},nn=function(t){if(Ke(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},rn=function(t,n,e){var r;return Ke(t)||tn(t)?(r=e,Qe(t,function(t,e){r=n(r,t,e)}),r):t},an=function(t){return $e(t,"String")};var on=function(t,e,n){return t<e?e:n<t?n:t},sn=function(t){return $e(t,"Number")};function ln(t){return _(t)?"":t.toString()}var cn=function(t,e){return(t%e+e)%e},un=function(t){t=ln(t);return t.charAt(0).toLowerCase()+t.substring(1)};var hn=function(t){t=ln(t);return t.charAt(0).toUpperCase()+t.substring(1)},fn=function(t){return $e(t,"Boolean")},dn=function(t){return void 0===t},pn=function(t){return t instanceof Element||t instanceof HTMLDocument};function gn(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function mn(t){if("object"!=typeof t||null===t)return t;if(Ke(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=mn(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=mn(t[i]):e[i]=t[i];return e}var yn=mn;function vn(r,i,a){var o;return function(){var t=this,e=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(t,e)},i),n&&r.apply(t,e)}}function bn(a,o){var s;if(Ue(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 xn=5;function wn(t,e){if(t===e)return!0;if(t&&e&&!an(t)&&!an(e)){if(qe(t)||qe(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=wn(t[r],e[r]));r++);return n}if(Je(t)||Je(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=wn(t[i[r]],e[i[r]]));r++);return n}}return!1}function kn(){}var nt=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||xn,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&tn(o)?(tn(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Ke(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Mn=wn,En=function(t,e,n){for(var r=0,i=an(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},On=Object.prototype.hasOwnProperty,Sn=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function _n(t,e,n){(t.prototype=e.prototype=n).constructor=t}function An(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function Pn(){}var e="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Tn=/^#([0-9a-f]{3,8})$/,Ln=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),Nn=new RegExp("^rgb\\("+[r,r,r]+"\\)$"),Cn=new RegExp("^rgba\\("+[e,e,e,n]+"\\)$"),jn=new RegExp("^rgba\\("+[r,r,r,n]+"\\)$"),Rn=new RegExp("^hsl\\("+[n,r,r]+"\\)$"),In=new RegExp("^hsla\\("+[n,r,r,n]+"\\)$"),Bn={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 Fn(){return this.rgb().formatHex()}function Dn(){return this.rgb().formatRgb()}function zn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Tn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Gn(e):3===n?new Hn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Wn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Wn(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=Ln.exec(t))?new Hn(e[1],e[2],e[3],1):(e=Nn.exec(t))?new Hn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Cn.exec(t))?Wn(e[1],e[2],e[3],e[4]):(e=jn.exec(t))?Wn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Rn.exec(t))?Un(e[1],e[2]/100,e[3]/100,1):(e=In.exec(t))?Un(e[1],e[2]/100,e[3]/100,e[4]):Bn.hasOwnProperty(t)?Gn(Bn[t]):"transparent"===t?new Hn(NaN,NaN,NaN,0):null}function Gn(t){return new Hn(t>>16&255,t>>8&255,255&t,1)}function Wn(t,e,n,r){return new Hn(t=r<=0?e=n=NaN:t,e,n,r)}function Hn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Yn(){return"#"+qn(this.r)+qn(this.g)+qn(this.b)}function Vn(){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 Un(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new $n(t,e,n,r)}function Xn(t){var e,n,r,i,a,o,s,l;return t instanceof $n?new $n(t.h,t.s,t.l,t.opacity):(t=t instanceof Pn?t:zn(t))?t instanceof $n?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new $n(o,s,l,t.opacity)):new $n}function $n(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Kn(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 Zn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Qn(t,e){return Math.abs(t-e)<.001}function Jn(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 tr(t){return(t+2*Math.PI)%(2*Math.PI)}_n(Pn,zn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Fn,formatHex:Fn,formatHsl:function(){return Xn(this).formatHsl()},formatRgb:Dn,toString:Dn}),_n(Hn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof Pn?i:zn(i))?new Hn((i=i.rgb()).r,i.g,i.b,i.opacity):new Hn:new Hn(t,e,n,null==r?1:r);var i},An(Pn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Hn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Hn(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:Yn,formatHex:Yn,formatRgb:Vn,toString:Vn})),_n($n,function(t,e,n,r){return 1===arguments.length?Xn(t):new $n(t,e,n,null==r?1:r)},An(Pn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new $n(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new $n(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 Hn(Kn(240<=t?t-240:120+t,n,e),Kn(t,n,e),Kn(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 er={box:function(t,e,n,r){return Jn([t,n],[e,r])},length:Zn,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?Zn(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?Zn(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 pe(n,[0,0])?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(fe(r=[-n[1],n[0]],r),Math.abs(de([i-t,a-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function nr(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),h=u/10,f=0;f<=c;f++){var d=f*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=Zn(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,g=0;g<32&&!(h<1e-4);g++){var m=o-h,y=o+h,v=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=Zn(l[0],l[1],v[0],v[1]);0<=m&&v<s?(o=m,s=v):(m=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=Zn(l[0],l[1],m[0],m[1]),y<=1&&v<s?(o=y,s=v):h*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function rr(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function ir(t,e,n){n=t+n-2*e;return Qn(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function ar(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function or(t,e,n,r,i,a,o){var s=rr(t,n,i,o),l=rr(e,r,a,o),c=er.pointAt(t,e,n,r,o),n=er.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function sr(t,e,n,r,i,a,o){return 0===o?(Zn(t,e,n,r)+Zn(n,r,i,a)+Zn(t,e,i,a))/2:(e=(t=or(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),sr.apply(void 0,e)+sr.apply(void 0,n))}var lr={box:function(t,e,n,r,i,a){var o=ir(t,n,i)[0],s=ir(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(rr(t,n,i,o)),void 0!==s&&c.push(rr(e,r,a,s)),Jn(l,c)},length:function(t,e,n,r,i,a){return sr(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return nr([t,n,i],[e,r,a],o,s,rr)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return Zn(t.x,t.y,o,s)},interpolationAt:rr,pointAt:function(t,e,n,r,i,a,o){return{x:rr(t,n,i,o),y:rr(e,r,a,o)}},divide:or,tangentAngle:function(t,e,n,r,i,a,o){t=ar(t,n,i,o),n=ar(e,r,a,o);return tr(Math.atan2(n,t))}};function cr(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 ur(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 hr(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 Qn(r,0)?Qn(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Qn(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 fr(t,e,n,r,i,a,o,s,l){var c=cr(t,n,i,o,l),u=cr(e,r,a,s,l),h=er.pointAt(t,e,n,r,l),n=er.pointAt(n,r,i,a,l),r=er.pointAt(i,a,o,s,l),i=er.pointAt(h.x,h.y,n.x,n.y,l),a=er.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,h.x,h.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function dr(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],h=0,f=c.length,d=0;d<f;d++)h+=Zn(c[d],u[d],c[(d+1)%f],u[(d+1)%f]);return h/2}t=fr(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return dr.apply(void 0,e)+dr.apply(void 0,n)}var pr={extrema:hr,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=hr(t,n,i,o),h=hr(e,r,a,s),f=0;f<u.length;f++)l.push(cr(t,n,i,o,u[f]));for(var d=0;d<h.length;d++)c.push(cr(e,r,a,s,h[d]));return Jn(l,c)},length:function(t,e,n,r,i,a,o,s){return dr(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return nr([t,n,i,o],[e,r,a,s],l,c,cr,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return Zn(t.x,t.y,l,c)},interpolationAt:cr,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:cr(t,n,i,o,l),y:cr(e,r,a,s,l)}},divide:fr,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=ur(t,n,i,o,l),n=ur(e,r,a,s,l);return tr(Math.atan2(n,t))}};function gr(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,l=Math.abs(n),c=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),m=(u-h)*Math.pow(Math.cos(f),3)/o,y=(h-u)*Math.pow(Math.sin(f),3)/s,v=d-m,b=p-y,m=l-m,y=c-y,x=Math.hypot(b,v),w=Math.hypot(y,m);f+=x*Math.asin((v*y-b*m)/(x*w))/Math.sqrt(u+h-d*d-p*p),f=Math.min(Math.PI/2,Math.max(0,f))}return{x:t+gr(d,n),y:e+gr(p,r)}};function yr(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function vr(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function br(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function xr(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var wr={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],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=yr(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var g=Math.atan(r/(n*Math.tan(i))),m=1/0,y=-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=vr(0,e,n,r,i,v[w]);k<m&&(m=k),y<k&&(y=k)}return{x:l,y:m,width:c-l,height:y-m}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=xr(s-t,l-e,-i),l=s[0],s=s[1],l=mr(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=br(n,r,a):o<c&&(l=br(n,r,o)),xr(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return Zn(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:yr(t,0,n,r,i,o),y:vr(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return tr(Math.atan2(i,s))}};function kr(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=Zn(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var Mr,Er,Or={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 Jn(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+=Zn(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=kr(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=er.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=er.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=kr(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function Sr(){}function _r(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Ar(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new _r(n,r||t,i),r=Er?Er+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 Pr(t,e){0==--t._eventsCount?t._events=new Sr:delete t._events[e]}function Tr(){this._events=new Sr,this._eventsCount=0}r=e,Mr=Object.prototype.hasOwnProperty,Er="~",Object.create&&(Sr.prototype=Object.create(null),(new Sr).__proto__||(Er=!1)),Tr.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)Mr.call(t,e)&&n.push(Er?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},Tr.prototype.listeners=function(t){var t=Er?Er+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},Tr.prototype.listenerCount=function(t){t=Er?Er+t:t,t=this._events[t];return t?t.fn?1:t.length:0},Tr.prototype.emit=function(t,e,n,r,i,a){var o=Er?Er+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(f=1,s=new Array(c-1);f<c;f++)s[f-1]=arguments[f];l.fn.apply(l.context,s)}else for(var u,h=l.length,f=0;f<h;f++)switch(l[f].once&&this.removeListener(t,l[f].fn,void 0,!0),c){case 1:l[f].fn.call(l[f].context);break;case 2:l[f].fn.call(l[f].context,e);break;case 3:l[f].fn.call(l[f].context,e,n);break;case 4:l[f].fn.call(l[f].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[f].fn.apply(l[f].context,s)}return!0},Tr.prototype.on=function(t,e,n){return Ar(this,t,e,n,!1)},Tr.prototype.once=function(t,e,n){return Ar(this,t,e,n,!0)},Tr.prototype.removeListener=function(t,e,n,r){t=Er?Er+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||Pr(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:Pr(this,t)}}else Pr(this,t);return this},Tr.prototype.removeAllListeners=function(t){return t?(t=Er?Er+t:t,this._events[t]&&Pr(this,t)):(this._events=new Sr,this._eventsCount=0),this},Tr.prototype.off=Tr.prototype.removeListener,Tr.prototype.addListener=Tr.prototype.on,Tr.prefixed=Er,r.exports=Tr.EventEmitter=Tr;var i,g,Lr,Nr,Cr,jr=e.exports;function Rr(){Rr=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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 Ir(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Br(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Ir(r,e,n,i,a,"next",t)}function a(t){Ir(r,e,n,i,a,"throw",t)}i(void 0)})}}function Fr(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 Dr(t,e,n){e&&Fr(t.prototype,e),n&&Fr(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function f(){return(f=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 a(t,e){t.prototype=Object.create(e.prototype),zr(t.prototype.constructor=t,e)}function zr(t,e){return(zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Gr(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 Wr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Yr(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?Hr(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)?Hr(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=i=i||{}).COORDINATE="<coordinate>",n.COLOR="<color>",n.PAINT="<paint>",n.NUMBER="<number>",n.ANGLE="<angle>",n.OPACITY_VALUE="<opacity-value>",n.SHADOW_BLUR="<shadow-blur>",n.LENGTH="<length>",n.PERCENTAGE="<percentage>",n.LENGTH_PERCENTAGE="<length> | <percentage>",n.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",n.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",n.LIST_OF_POINTS="<list-of-points>",n.PATH="<path>",n.FILTER="<filter>",n.Z_INDEX="<z-index>",n.OFFSET_DISTANCE="<offset-distance>",n.DEFINED_PATH="<defined-path>",n.MARKER="<marker>",n.TRANSFORM="<transform>",n.TRANSFORM_ORIGIN="<transform-origin>",n.TEXT="<text>",n.TEXT_TRANSFORM="<text-transform>",(r=g=g||{})[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",(e=Lr=Lr||{})[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=Nr=Nr||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo",(r=Cr=Cr||{})[r.kYes=0]="kYes",r[r.kNo=1]="kNo";function Vr(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 qr(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 Ur,Xr,$r=[{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}],Kr=((e=Ur=Ur||{})[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",function(e){return $r.find(function(t){return t.name===e}).unit_type}),n=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(Nr.kNo,Cr.kNo,"")},e.isNumericValue=function(){return this.getType()>=Ur.kUnitType&&this.getType()<=Ur.kClampType},t}(),r=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}a(t,n);var e=t.prototype;return e.getType=function(){return Ur.kColorType},e.to=function(t){return this},t}(n),Zr=((e=Xr=Xr||{})[e.Constant=0]="Constant",e[e.LinearGradient=1]="LinearGradient",e[e.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}a(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 Ur.kColorType},t}(n)),Qr=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}a(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return Ur.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(n);function Jr(o,s){if("function"!=typeof o||null!=s&&"function"!=typeof s)throw new TypeError("Expected a function");function l(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=s?s.apply(this,e):e[0],a=l.cache;return a.has(i)?a.get(i):(r=o.apply(this,e),l.cache=a.set(i,r)||a,r)}return l.cache=new(Jr.Cache||Map),l}Jr.Cache=Map;function ti(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?(0!==e?"-":"")+t.toLowerCase():t}).join("")}var ei=Jr(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})});function ni(t){return"function"==typeof t}function ri(t,e){void 0===e&&(e="");var n="";if(Number.isFinite(t)){if(!Number.isNaN(t))throw new Error;n="NaN"}else n=0<t?"infinity":"-infinity";return n+e}function ii(t){switch(function(t){switch(t){case g.kNumber:case g.kInteger:return Lr.kUNumber;case g.kPercentage:return Lr.kUPercent;case g.kPixels:return Lr.kULength;case g.kMilliseconds:case g.kSeconds:return Lr.kUTime;case g.kDegrees:case g.kRadians:case g.kGradians:case g.kTurns:return Lr.kUAngle;default:return Lr.kUOther}}(t)){case Lr.kUNumber:return g.kNumber;case Lr.kULength:return g.kPixels;case Lr.kUPercent:return g.kPercentage;case Lr.kUTime:return g.kSeconds;case Lr.kUAngle:return g.kDegrees;default:return g.kUnknown}}function ai(t){return pi[t]||(pi[t]=new Qr(t)),pi[t]}var oi={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},si=Jr(function(t){var t=ei(t),e=oi[t];return(null==e?void 0:e.alias)||t}),li=function(i){function n(t,e){var n,r;return void 0===e&&(e=g.kNumber),(n=i.call(this)||this).unit=void 0,n.value=void 0,r="string"==typeof e?(r=e)?"number"===r?g.kNumber:"percent"===r||"%"===r?g.kPercentage:Kr(r):g.kUnknown:e,n.unit=r,n.value=t,n}a(n,i);var t=n.prototype;return t.clone=function(){return new n(this.value,this.unit)},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return Ur.kUnitType},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=ii(this.unit))!==ii(t)||e===g.kUnknown?null:(e=Vr(this.unit)/Vr(t),new n(this.value*e,t))},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=qr(this.unit);i=a<-999999||999999<a?(r=qr(this.unit),!Number.isFinite(a)||Number.isNaN(a)?ri(a,r):a+(r||"")):""+a+o}return n+=i},n}(n),ci=new li(0,"px"),ui=(new li(1,"px"),new li(0,"deg")),hi=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}a(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}(r),fi=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,t=t.syntax;A.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:t})},di=new Qr("unset"),e=new Qr("initial"),n=new Qr("inherit"),pi={"":di,unset:di,initial:e,inherit:n},gi=new hi(0,0,0,0,!0),mi=new hi(0,0,0,0),yi=Jr(function(t,e,n,r){return new hi(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),vi=function(t,e){return void 0===e&&(e=g.kNumber),new li(t,e)},bi=new li(50,"%"),xi={},wi=0;var ki="undefined"!=typeof window&&void 0!==window.document;function Mi(t,e){var n=Number(t.parsedStyle.zIndex),r=Number(e.parsedStyle.zIndex);if(n===r){var i=t.parentNode;if(i)return(i=i.childNodes||[]).indexOf(t)-i.indexOf(e)}return n-r}function Ei(t){var e,n=t;do{if(null==(e=n.parsedStyle)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}function Oi(t,e){if(ki)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var Si="Method not implemented.",_i="Use document.documentElement instead.",Ai={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function Pi(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Ti(t,e,n){t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2]}function Li(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Ni(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Ci(t){return void 0===t?0:360<t||t<-360?t%360:t}function ji(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length?Ft(t):sn(t)?zt(t,e,n):zt(t[0],t[1]||e,t[2]||n)}function Ri(t){return t*(Math.PI/180)}function Ii(t){return t*(180/Math.PI)}function Bi(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=At(y(),r))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/l,r[10]/c),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/l,r[5]/l)):(a=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(a=c*c))<(t=s*c-r*l)?(o[0]=Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):t<-.499995*n?(o[0]=-Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):(o[0]=Math.asin(2*(s*l-c*r)),o[1]=Math.atan2(2*(s*c+r*l),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),o);var n,r,i,a,o,s,l,c,u}function Fi(t,e,n,r,i){var a,o,s,l,c=Math.cos(t),t=Math.sin(t);return a=r*c,o=i*t,r=-r*t,t=i*c,c=i=0,e=e,n=n,s=1,(l=new Q(9))[0]=a,l[1]=o,l[2]=i,l[3]=r,l[4]=t,l[5]=c,l[6]=e,l[7]=n,l[8]=s,l}function Di(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=Ii(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var zi=ht(),Gi=ht(),Wi=ee(),d=[y(),y(),y()],Hi=y();function Yi(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}(zi,t)&&(dt(Gi,zi),Gi[3]=0,Gi[7]=0,Gi[11]=0,Gi[15]=1,!(Math.abs(vt(Gi))<1e-8))){var t=zi[3],o=zi[7],s=zi[11],l=zi[12],c=zi[13],u=zi[14],h=zi[15];if(0!==t||0!==o||0!==s){if(Wi[0]=t,Wi[1]=o,Wi[2]=s,Wi[3]=h,!yt(Gi,Gi))return;mt(Gi,Gi),ne(i,Wi,Gi)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,t=zi,(o=d)[0][0]=t[0],o[0][1]=t[1],o[0][2]=t[2],o[1][0]=t[4],o[1][1]=t[5],o[1][2]=t[6],o[2][0]=t[8],o[2][1]=t[9],o[2][2]=t[10],n[0]=Dt(d[0]),qt(d[0],d[0]),r[0]=Ut(d[0],d[1]),Vi(d[1],d[1],d[0],1,-r[0]),n[1]=Dt(d[1]),qt(d[1],d[1]),r[0]/=n[1],r[1]=Ut(d[0],d[2]),Vi(d[2],d[2],d[0],1,-r[1]),r[2]=Ut(d[1],d[2]),Vi(d[2],d[2],d[1],1,-r[2]),n[2]=Dt(d[2]),qt(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],Xt(Hi,d[1],d[2]),Ut(d[0],Hi)<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])}}function Vi(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 qi=ht();function Ui(t,l){var c,u;return t&&t.length&&(u=c=0,l?(c=l.parsedStyle.defX||0,u=l.parsedStyle.defY||0,l.resetLocalTransform(),l.setLocalPosition(c,u)):l=new rl({}),t.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[ci,ci],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[ci],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[ci],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[ci],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[ci,ci,ci],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[ui],l.rotateLocal(0,0,_o(o[0]))):"rotatex"===s?(o=t||[ui],l.rotateLocal(_o(o[0]),0,0)):"rotatey"===s?(o=t||[ui],l.rotateLocal(0,_o(o[0]),0)):"rotatez"===s?(o=t||[ui],l.rotateLocal(0,0,_o(o[0]))):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(Ri(o[0]),Ri(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(Ri(o[0]),l.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],Ri(o[0]))):"matrix"===s?(e=(o=t.map(function(t){return t.value}))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],l.setLocalTransform(pt(qi,e,n,0,0,r,i,0,0,0,0,1,0,a+c,o+u,0,1))):"matrix3d"===s&&(pt.apply(Bt,[qi].concat(t.map(function(t){return t.value}))),qi[12]+=c,qi[13]+=u,l.setLocalTransform(qi)))})),l.getLocalTransform()}Xi={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]+\.?))/},$i="";var Xi,$i,k,Ki=function(t){return $i=t,Qi()};function Zi(t){throw new Error($i+": "+t)}function Qi(){var t=la(Ji);return 0<$i.length&&Zi("Invalid input not EOF"),t}function Ji(){return ta("linear-gradient",Xi.linearGradient,na)||ta("repeating-linear-gradient",Xi.repeatingLinearGradient,na)||ta("radial-gradient",Xi.radialGradient,ra)||ta("repeating-radial-gradient",Xi.repeatingRadialGradient,ra)||ta("conic-gradient",Xi.conicGradient,ra)}function ta(n,t,r){return ea(t,function(t){var e=r();return e&&!ga(Xi.comma)&&Zi("Missing comma before color stops"),{type:n,orientation:e,colorStops:la(ca)}})}function ea(t,e){t=ga(t);if(t)return ga(Xi.startCall)||Zi("Missing ("),e=e(t),ga(Xi.endCall)||Zi("Missing )"),e}function na(){return pa("directional",Xi.sideOrCorner,1)||pa("angular",Xi.angleValue,1)}function ra(){var t,e,n=ia();return n&&((t=[]).push(n),e=$i,ga(Xi.comma))&&((n=ia())?t.push(n):$i=e),t}function ia(){var t,e=function(){var t=pa("shape",/^(circle)/i,0);t&&(t.style=da()||aa());return t}()||function(){var t=pa("shape",/^(ellipse)/i,0);t&&(t.style=ha()||aa());return t}();return e?e.at=oa():(t=aa())?(e=t,(t=oa())&&(e.at=t)):(t=sa())&&(e={type:"default-radial",at:t}),e}function aa(){return pa("extent-keyword",Xi.extentKeywords,1)}function oa(){var t;if(pa("position",/^at/,0))return(t=sa())||Zi("Missing positioning value"),t}function sa(){var t={x:ha(),y:ha()};if(t.x||t.y)return{type:"position",value:t}}function la(t){var e=t(),n=[];if(e)for(n.push(e);ga(Xi.comma);)(e=t())?n.push(e):Zi("One extra comma");return n}function ca(){var t=pa("hex",Xi.hexColor,1)||ea(Xi.rgbaColor,function(){return{type:"rgba",value:la(ua)}})||ea(Xi.rgbColor,function(){return{type:"rgb",value:la(ua)}})||pa("literal",Xi.literalColor,0);return t||Zi("Expected color definition"),t.length=ha(),t}function ua(){return ga(Xi.number)[1]}function ha(){return pa("%",Xi.percentageValue,1)||fa()||da()}function fa(){return pa("position-keyword",Xi.positionKeywords,1)}function da(){return pa("px",Xi.pixelValue,1)||pa("em",Xi.emValue,1)}function pa(t,e,n){e=ga(e);if(e)return{type:t,value:e[n]}}function ga(t){var e=/^[\n\r\t\s]+/.exec($i),e=(e&&ma(e[0].length),t.exec($i));return e&&ma(e[0].length),e}function ma(t){$i=$i.substring(t)}function ya(t){var e;return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=He(t.parsedStyle.path.absolutePath,void 0,v(v({},e),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function va(t,e){return t[0]===e[0]&&t[1]===e[1]}function ba(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 xa(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}(r=k=k||{}).GROUP="g",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh";function wa(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=Ri(r=cn(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=ka({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=ka(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var ka=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 Ma(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],r=t[s+1],c=l[0],u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var h=function(t,e){var n=e[1],r=e[2],i=cn(Ri(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,h=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-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+c)/2+Math.cos(i)*d-Math.sin(i)*f,l=(l+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=_a([1,0],p),h=_a(p,u);Sa(p,u)<=-1&&(h=Math.PI);1<=Sa(p,u)&&(h=0);0===o&&0<h&&(h-=2*Math.PI);1===o&&h<0&&(h+=2*Math.PI);return{cx:s,cy:l,rx:va(t,[c,e])?0:n,ry:va(t,[c,e])?0:r,startAngle:d,endAngle:d+h,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=h}"Z"===c?(n=i,r=t[a+1]):n=[l[(v=l.length)-2],l[v-1]],r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&va(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var f,d,p,g,m,y,v=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=v,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(f=[l[1],l[2]],u.startTangent=[b[0]-f[0],b[1]-f[1]],u.endTangent=[n[0]-f[0],n[1]-f[1]]):"T"===c?(d=xa((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"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(g=xa((p=e[s-1]).currentPoint,b),m=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-g[0],b[1]-g[1]]):(u.command="SQ",u.startTangent=[b[0]-m[0],b[1]-m[1]]),u.endTangent=[n[0]-m[0],n[1]-m[1]]):"A"===c&&(b=(g=Ea(u,0)).x,m=g.y,y=(c=Ea(u,1,!1)).x,c=c.y,u.startTangent=[b,m],u.endTangent=[y,c]),e.push(u)}return e}function Ea(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=wa({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=wa({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function Oa(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Sa(t,e){return Oa(t)*Oa(e)?(t[0]*e[0]+t[1]*e[1])/(Oa(t)*Oa(e)):1}function _a(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Sa(t,e))}function Aa(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 Pa(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,a,o,s,l,c,u,h,f,d=[];switch(t.nodeName){case k.LINE:var p=t.parsedStyle,d=[["M",p.x1,p.y1],["L",p.x2,p.y2]];break;case k.CIRCLE:var p=t.parsedStyle,g=p.r;d=Aa(g,g,p.cx,p.cy);break;case k.ELLIPSE:var g=t.parsedStyle;d=Aa(g.rx,g.ry,g.cx,g.cy);break;case k.POLYLINE:case k.POLYGON:p=t.parsedStyle.points;g=p.points,p=t.nodeName===k.POLYGON,g=g.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),p&&g.push(["Z"]),d=g;break;case k.RECT:var m=t.parsedStyle,y=m.width,v=m.height,b=m.x,x=m.y,m=m.radius,w=m&&m.some(function(t){return 0!==t});n=y,r=v,b=b,x=x,d=(w=w&&m.map(function(t){return on(t,0,Math.min(Math.abs(y)/2,Math.abs(v)/2))}))?(s=(m=0<n?1:-1)+(o=0<r?1:-1)!=0?1:0,[["M",m*(i=w[0])+b,x],["L",n-m*(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-m*a,r+x]:null,["L",b+m*(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,m*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 k.PATH:w=t.parsedStyle.path.absolutePath;d=[].concat(w)}if(d.length)return l=d,c=e,u=(e=(e=t).parsedStyle).defX,h=void 0===u?0:u,f=void 0===(u=e.defY)?0:u,l.reduce(function(t,e){var n,r,i,a="";return"M"===e[0]||"L"===e[0]?(n=zt(e[1]-h,e[2]-f,0),c&&Kt(n,n,c),a=""+e[0]+n[0]+","+n[1]):"Z"===e[0]?a=e[0]:"C"===e[0]?(n=zt(e[1]-h,e[2]-f,0),r=zt(e[3]-h,e[4]-f,0),i=zt(e[5]-h,e[6]-f,0),c&&(Kt(n,n,c),Kt(r,r,c),Kt(i,i,c)),a=""+e[0]+n[0]+","+n[1]+","+r[0]+","+r[1]+","+i[0]+","+i[1]):"A"===e[0]?(n=zt(e[6]-h,e[7]-f,0),c&&Kt(n,n,c),a=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+n[0]+","+n[1]):"Q"===e[0]&&(r=zt(e[1]-h,e[2]-f,0),i=zt(e[3]-h,e[4]-f,0),c&&(Kt(r,r,c),Kt(i,i,c)),a=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+"}"),t+a},"")}function Ta(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 La(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)}function Na(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)}function Ca(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)}function ja(t){return Wa.setup(this,t),Wa.create(t)}function Ra(t){return Ya.setup(this,t),Ya.create(t)}function Ia(){throw new Error("tapAsync is not supported on a SyncHook")}function Ba(){throw new Error("tapPromise is not supported on a SyncHook")}function Fa(t){return qa.setup(this,t),qa.create(t)}function Da(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")}function za(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")}function Ga(t){return Xa.setup(this,t),Xa.create(t)}var e=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=La,this.call=La,this._callAsync=Na,this.callAsync=Na,this._promise=Ca,this.promise=Ca,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=Yr(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}(),n=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+=this.getInterceptor(o)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=Yr(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}o+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError"+t+" = false;\ntry {\n"),o+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",a||(o=(o=(o=o+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),a||(o+="}\n");break;case"async":var 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 i=this,a=t.onError,o=t.onResult,e=t.resultReturns,s=t.onDone,n=t.doneReturns,l=t.rethrowIfPossible;if(0===this.options.taps.length)return s();for(var c=this.options.taps.findIndex(function(t){return"sync"!==t.type}),u=e||n,h="",f=s,d=0,r=function(){function e(t){return t?"":s()}var n=p,r=(f!==s&&("sync"!==i.options.taps[n].type||20<d++)&&(d=0,h=(h+="function _next"+n+"() {\n")+f()+"}\n",f=function(){return(u?"return ":"")+"_next"+n+"();\n"}),f),t=i.callTap(n,{onError:function(t){return a(n,t,r,e)},onResult:o&&function(t){return o(n,t,r,e)},onDone:!o&&r,rethrowIfPossible:l&&(c<0||n<c)});f=function(){return t}},p=this.options.taps.length-1;0<=p;p--)r();return h+=f()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:o.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}(),Wa=new(function(t){function e(){return t.apply(this,arguments)||this}return a(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}(n)),Ha=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=ja,t._call=void 0,t.call=void 0,t}return a(t,n),t}(e),Ya=new(function(t){function e(){return t.apply(this,arguments)||this}return a(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}(n)),Va=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=Ra,t._call=void 0,t.call=void 0,t}return a(t,n),t}(e),qa=new(function(t){function e(){return t.apply(this,arguments)||this}return a(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}(n)),Ua=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=Ia,t.tapPromise=Ba,t.compile=Fa,t}return a(t,n),t}(e),Xa=new(function(t){function e(){return t.apply(this,arguments)||this}return a(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}(n)),$a=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=Da,t.tapPromise=za,t.compile=Ga,t}return a(t,n),t}(Ua),Ka=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Za=/([\"\'])[^\'\"]+\1/;function Qa(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");var n=Date.now(),e=16<(e=n-so)?0:16-e,r=no();return oo[r]=t,1<Object.keys(oo).length||setTimeout(function(){so=n;var e=oo;oo={},Object.keys(e).forEach(function(t){return e[t](ao())})},e),r}function Ja(t){delete oo[t]}function to(t){return"string"!=typeof t?Qa:""===t?ro.requestAnimationFrame:ro[t+"RequestAnimationFrame"]}var eo=1,no=function(){return eo++},ro="object"==typeof self&&self.self==self?self:"object"==typeof S&&S.global==S?S:{},io=Date.now(),ao=function(){return ro.performance&&"function"==typeof ro.performance.now?ro.performance.now():Date.now()-io},oo={},so=Date.now(),r=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],to),lo=to(r),co="string"!=typeof(e=r)?Ja:""===e?ro.cancelAnimationFrame:ro[e+"CancelAnimationFrame"]||ro[e+"CancelRequestAnimationFrame"],uo=(ro.requestAnimationFrame=lo,ro.cancelAnimationFrame=co,/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i),ho=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,fo=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,po=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var go={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},mo=Jr(function(t){t="angular"===t.type?Number(t.value):go[t.value]||0;return vi(t,"deg")}),yo=Jr(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:vi(n,i),cy:vi(r,a)}}),vo=Jr(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return Ki(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 l,c=null==(l=r[s].length)?void 0:l.value;if(!_(c)&&!_(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:""+(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var h,f=t.map(function(t){return{offset:vi(Number(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 Zr(Xr.LinearGradient,{angle:n?mo(n):ui,steps:f}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=yo(n[0].at)).cx,t=t.cy,n[0].style&&(h=(n=n[0].style).type,n=n.value,h="extent-keyword"===h?ai(n):vi(n,h)),new Zr(Xr.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=uo.exec(t);if(n)return r=(null==(r=n[2].match(po))?void 0:r.map(function(t){return t.split(":")}))||[],[new Zr(Xr.LinearGradient,{angle:vi(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:vi(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=ho.exec(t);if(t)return t=(null==(t=t[4].match(po))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:vi(50,"%"),cy:vi(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:vi(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!an(n))return[new Zr(Xr.RadialGradient,n)]}else if("p"===e){var r=t;if(r=fo.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 bo(t){return t&&t.image}function xo(t){return t&&!_(t.r)&&!_(t.g)&&!_(t.b)}var wo=Jr(function(t){var e;return bo(t)?f({repetition:"repeat"},t):"transparent"===(t=_(t)?"":t)?mi:vo(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=zn(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),yi.apply(void 0,e))});function ko(t,e){if(xo(t)&&xo(e))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(on(e[n],0,255));return e[3]=on(e[3],0,1),"rgba("+e.join(",")+")"}]}function Mo(t,e){if(_(e))return vi(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return vi(Number(e),"px");if(0<="deg".search(t))return vi(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 vi(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var Eo=Jr(function(t){return Mo(new RegExp("px","g"),t)}),Oo=(Jr(function(t){return Mo(new RegExp("%","g"),t)}),function(t){return sn(t)||isFinite(Number(t))?vi(Number(t)||0,"px"):Mo(new RegExp("px|%|em|rem","g"),t)}),So=Jr(function(t){return Mo(new RegExp("deg|rad|grad|turn","g"),t)});function _o(t){var e=0;return t.unit===g.kDegrees?e=t.value:t.unit===g.kRadians?e=Ii(Number(t.value)):t.unit===g.kTurns&&(e=360*Number(t.value)),e}function Ao(t,e){var n;return Array.isArray(t)?n=t.map(function(t){return Number(t)}):an(t)?n=t.split(" ").map(function(t){return Number(t)}):sn(t)&&(n=[t]),2===e?1===n.length?[n[0],n[0]]:[n[0],n[1]]:1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]}function Po(t){return an(t)?t.split(" ").map(function(t){return Oo(t)}):t.map(function(t){return Oo(t.toString())})}function To(t,e,n){return 0===t.value?0:t.unit===g.kPixels?Number(t.value):t.unit===g.kPercentage&&n?(n=n.nodeName===k.GROUP?n.getLocalBounds():n.geometry.contentBounds,t.value/100*n.halfExtents[e]*2):0}var Lo=function(t){return Mo(/deg|rad|grad|turn|px|%/g,t)},No=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Co(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<No.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return Lo(t)||wo(t)})}),n.lastIndex===t.length)return r}return[]}function jo(t){return t.toString()}var Ro=Jr(function(t){return"number"==typeof t?vi(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?vi(Number(t)):vi(0)});function Io(t,e){return[t,e,jo]}function Bo(n,r){return function(t,e){return[t,e,function(t){return jo(on(t,n,r))}]}}function Fo(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Jr(function(t){return(an(t)?t.split(" "):t).map(Ro)});var Do=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=Le(e)}catch(t){n=Le(""),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]])}return 0<r.length&&n.push(r),{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=Ma(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=lr.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=pr.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var h=o.arcParams,u=wr.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)}var 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}),f=nn(n),d=nn(r),p=en(n),g=en(r);if(0!==i.length)for(var m=0;m<i.length;m++){var y=i[m],v=y.currentPoint;v[0]===f?f-=ba(y,e).xExtra:v[0]===p&&(p+=ba(y,e).xExtra),v[1]===d?d-=ba(y,e).yExtra:v[1]===g&&(g+=ba(y,e).yExtra)}return{x:f,y:d,width:p-f,height:g-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},zo=Jr(Do);function Go(t,e){t=(an(t)?zo:Do)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function Wo(t,e,n){var r,i,a,o,s,l,c,u,h,f=t.curve,d=e.curve,t=(f&&0!==f.length||(f=Fe(t.absolutePath,!1),t.curve=f),d&&0!==d.length||(d=Fe(e.absolutePath,!1),e.curve=d),[f,d]),f=Ye((t=f.length!==d.length?function t(e,n,r){var i,e=Ve(e),n=Ve(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],h=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&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],c)}(f,d):t)[0])!==Ye(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))}))):ge(t[0]);return[f,(i=t[1],a=f,c=i.length-1,u=[],h=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){h+=Re(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=h,h=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function Ho(t,e){var n,r,i=an(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=Or.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=er.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}function Yo(t,e){return[t.points,e.points,function(t){return t}]}var Vo=null;function qo(t){return function(e){var n=0;return t.map(function(t){return t===Vo?e[n++]:t})}}function Uo(t){return t}var Xo={matrix:["NNNNNN",[Vo,Vo,0,0,Vo,Vo,0,0,0,0,1,0,Vo,Vo,0,1],Uo],matrix3d:["NNNNNNNNNNNNNNNN",Uo],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",qo([Vo,Vo,new li(1)]),Uo],scalex:["N",qo([Vo,new li(1),new li(1)]),qo([Vo,new li(1)])],scaley:["N",qo([new li(1),Vo,new li(1)]),qo([new li(1),Vo])],scalez:["N",qo([new li(1),new li(1),Vo])],scale3d:["NNN",Uo],skew:["Aa",null,Uo],skewx:["A",null,qo([Vo,ui])],skewy:["A",null,qo([ui,Vo])],translate:["Tt",qo([Vo,Vo,ci]),Uo],translatex:["T",qo([Vo,ci,ci]),qo([Vo,ci])],translatey:["T",qo([ci,Vo,ci]),qo([ci,Vo])],translatez:["L",qo([ci,ci,Vo])],translate3d:["TTL",Uo]};function $o(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=Xo[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var h=s[u],f=l[u],d=void 0;if(void 0===(d=h?{A:function(t){return"0"===t.trim()?ui:So(t)},N:Ro,T:Oo,L:Eo}[f.toUpperCase()](h):{a:ui,n:c[0],t:ci}[f]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function Ko(t){switch(t.t){case"rotatex":return i=Ri(_o(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=Ri(_o(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=Ri(_o(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=Ri(_o(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=Ri(_o(t.d[0])),a=Ri(_o(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=Ri(_o(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=Ri(_o(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=To(t.d[0],0,null)||0,n=To(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=To(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=To(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=To(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=To(t.d[0],0,null)||0,n=To(t.d[1],0,null)||0,r=To(t.d[2],0,null)||0,1];case"perspective":a=To(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 Zo(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 Qo(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 Yi(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(Ko).reduce(Zo),e,n,r,i,a),[[e,n,r,a,i]]}var Jo=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],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*(c*u-h*r),f[0][2]=2*(c*h+u*r),f[1][0]=2*(c*u+h*r),f[1][1]=1-2*(c*c+h*h),f[1][2]=2*(u*h-c*r),f[2][0]=2*(c*h-u*r),f[2][1]=2*(u*h+c*r),f[2][2]=1-2*(c*c+u*u),a=ts(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=ts(a,h)),n[1]&&(h[2][1]=0,h[2][0]=n[0],a=ts(a,h)),n[0]&&(h[2][0]=0,h[1][0]=n[0],a=ts(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 ts(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 es(t){return t.toFixed(6).replace(".000000","")}function ns(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=Qo(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=Qo(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=on(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 Jo(t[0],t[1],t[2],e,t[4]).map(es).join(",")}])}function rs(t){return t.replace(/[xy]/,"")}function is(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var as=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function os(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var a=0;a<r.length;a++)!function(){var t=r[a],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?vi(n):vi(n,t.unit)})})}()}var n=[],o=[],s=[];if(r.length!==i.length)var l=ns(r,i),n=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,h=i[c].t,f=r[c].d,d=i[c].d,p=Xo[u],g=Xo[h],m=void 0;if(as(u,h)){var y=ns([r[c]],[i[c]]);n.push(y[0]),o.push(y[1]),s.push(["matrix",[y[2]]])}else{if(u===h)m=u;else if(p[2]&&g[2]&&rs(u)===rs(h))m=rs(u),f=p[2](f),d=g[2](d);else{if(!p[1]||!g[1]||is(u)!==is(h)){y=ns(r,i);n=[y[0]],o=[y[1]],s=[["matrix",[y[2]]]];break}m=is(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,l=ii(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=qr(t.unit)):(li.isLength(t.unit)||li.isLength(e.unit))&&(o=To(t,i,n),s=To(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])}n.push(v),o.push(b),s.push([m,x])}}return e&&(l=n,n=o,o=l),[n,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 ss=Jr(function(t){var e;return an(t)?"text-anchor"===t?[vi(0,"px"),vi(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:[Oo(ls(e[0])),Oo(ls(e[1]))]):[vi(t[0]||0,"px"),vi(t[1]||0,"px")]});function ls(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var n=function(){function t(){this.parser=So,this.parserWithCSSDisabled=null,this.mixer=Io}return t.prototype.calculator=function(t,e,n,r){return _o(n)},t}(),r=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof Qr&&(n=null),A.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&A.sceneGraphService.dirtifyToRoot(t)}),n},t}(),e=function(){function t(){this.parser=wo,this.parserWithCSSDisabled=wo,this.mixer=ko}return t.prototype.calculator=function(t,e,n,r){return n instanceof Qr?"none"===n.value?gi:mi:n},t}(),cs=function(){function t(){this.parser=Co}return t.prototype.calculator=function(t,e,n){return n instanceof Qr?[]:n},t}();function us(t){t=t.parsedStyle.fontSize;return _(t)?null:t}function hs(){this.parser=ss}var fs,o=function(){function t(){this.parser=Oo,this.parserWithCSSDisabled=null,this.mixer=Io}return t.prototype.calculator=function(t,e,n,r,i){if(sn(n))return n;if(!li.isRelativeUnit(n.unit))return n.value;if(n.unit===g.kPercentage)return 0;if(n.unit===g.kEms){if(r.parentNode){var a=us(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=us(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),ds=function(){function t(){this.mixer=Fo}var e=t.prototype;return e.parser=function(t){t=Po(sn(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}(),ps=function(){function t(){this.mixer=Fo}var e=t.prototype;return e.parser=function(t){t=Po(sn(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}(),gs=function(t){function e(){return t.apply(this,arguments)||this}return a(e,t),e.prototype.postProcessor=function(t,e){var n,r;switch(t.nodeName){case k.CIRCLE:case k.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;_(a)||(l=a),_(i)||(c=i);break;case k.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case k.RECT:case k.IMAGE:case k.GROUP:case k.HTML:case k.TEXT:case k.MESH:_(t.parsedStyle.x)||(l=t.parsedStyle.x),_(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==k.PATH&&t.nodeName!==k.POLYLINE&&t.nodeName!==k.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),_(l)&&_(c)&&_(u)||-1!==e.indexOf("transform")||((e=t.parsedStyle.transform)&&e.length?Ui(e,t):(n=(e=t.getLocalPosition())[0],r=e[1],e=e[2],t.setLocalPosition(_(l)?n:l,_(c)?r:c,_(u)?e:u)))},e}(o),ms=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof Qr?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),ys=function(){function t(){this.mixer=Io,this.parser=Ro,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),vs=function(){function t(){this.parser=Ro,this.parserWithCSSDisabled=null,this.mixer=Bo(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==k.LINE&&e!==k.PATH&&e!==k.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),bs=function(){function t(){this.parser=Ro,this.parserWithCSSDisabled=null,this.mixer=Bo(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),xs=function(){function m(){this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}m.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=m.prototype;return t.update=function(t,e){Pi(this.center,t),Pi(this.halfExtents,e),Ti(this.min,this.center,this.halfExtents),Li(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){Li(this.center,e,t),Ni(this.center,this.center,.5),Ti(this.halfExtents,e,t),Ni(this.halfExtents,this.halfExtents,.5),Pi(this.min,t),Pi(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,a,o,s,l,c,u,h,f,d,p,g;m.isEmpty(t)||(m.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],l=(f=t.center)[0],g=f[1],f=f[2],c=(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=l-c)<(a=n-i)?g:a)+(o=(o=n+i)<(f=l+c)?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],l=e[1],c=e[5],u=e[9],h=e[2],f=e[6],d=e[10],p=Math.abs(a),g=Math.abs(o),m=Math.abs(s),y=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(h),w=Math.abs(f),k=Math.abs(d);n[0]=e[12]+a*i[0]+o*i[1]+s*i[2],n[1]=e[13]+l*i[0]+c*i[1]+u*i[2],n[2]=e[14]+h*i[0]+f*i[1]+d*i[2],r[0]=p*t[0]+g*t[1]+m*t[2],r[1]=y*t[0]+v*t[1]+b*t[2],r[2]=x*t[0]+w*t[1]+k*t[2],Ti(this.min,n,r),Li(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 m,i=[0,0,0],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=[0,0,0],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.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?Pi([0,0,0],this.min):272===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:257===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:256===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:17===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:16===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:1===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Pi([0,0,0],this.max):272===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:257===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:256===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:17===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:16===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:1===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]},m}(),ws=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||zt(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 Ut(t,this.normal)-this.distance},e.normalize=function(){var t=1/te(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&&$t(n,t,e,r),i},t}(),ks=((Os=fs=fs||{})[Os.OUTSIDE=4294967295]="OUTSIDE",Os[Os.INSIDE=0]="INSIDE",Os[Os.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 ws)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],t=t[15];Wt(this.planes[0].normal,i-e,l-a,f-c),this.planes[0].distance=t-d,Wt(this.planes[1].normal,i+e,l+a,f+c),this.planes[1].distance=t+d,Wt(this.planes[2].normal,i+n,l+o,f+u),this.planes[2].distance=t+p,Wt(this.planes[3].normal,i-n,l-o,f-u),this.planes[3].distance=t-p,Wt(this.planes[4].normal,i-r,l-s,f-h),this.planes[4].distance=t-g,Wt(this.planes[5].normal,i+r,l+s,f+h),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),Ms=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}(),Es=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}(),Os=function(){function t(){this.parser=Go,this.parserWithCSSDisabled=Go,this.mixer=Wo}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof Qr&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Es(0,0,0,0)}:n},e.postProcessor=function(t,e){var n;t.nodeName===k.PATH&&-1===e.indexOf("transform")&&(n=(e=t.parsedStyle).defX,e=e.defY,t.setLocalPosition(void 0===n?0:n,void 0===e?0:e))},t}(),Ss=function(){function t(){this.parser=Ho,this.mixer=Yo}return t.prototype.postProcessor=function(t,e){var n;t.nodeName!==k.POLYGON&&t.nodeName!==k.POLYLINE||-1!==e.indexOf("transform")||(n=(e=t.parsedStyle).defX,e=e.defY,t.setLocalPosition(n,e))},t}(),_s=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=Bo(0,1/0),t}return a(t,i),t}(o),As=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Qr?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),Ps=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}(),Ts=function(){function t(){this.parser=$o,this.parserWithCSSDisabled=$o,this.mixer=os}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Qr?[]:n},e.postProcessor=function(t){Ui(t.parsedStyle.transform,t)},t}(),Ls=function(){function t(){this.parser=Ro}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}(),Ns=function(){function t(){this.registry={},this.define(k.CIRCLE,al),this.define(k.ELLIPSE,cl),this.define(k.RECT,Sl),this.define(k.IMAGE,gl),this.define(k.LINE,yl),this.define(k.GROUP,hl),this.define(k.PATH,xl),this.define(k.POLYGON,kl),this.define(k.POLYLINE,El),this.define(k.TEXT,Al),this.define(k.HTML,dl)}var e=t.prototype;return e.define=function(t,e){this.registry[t]=e},e.get=function(t){return this.registry[t]},t}();var Cs,b,js=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 Ms,this.page=new Ms,this.canvas=new Ms,this.viewport=new Ms,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(Si)},Dr(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}(),Rs=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(Wr(n),e),n}return a(t,r),t}(js),Is=function(){function t(){this.emitter=new jr}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=fn(n)&&n||Ze(n)&&n.capture,n=Ze(n)&&n.once,s=ni(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],c=i,l=!0),t=o?t+"capture":t,e=ni(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,n=fn(n)&&n||Ze(n)&&n.capture,i=ni(e)?void 0:e;return e=ni(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 Rs(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!t.type)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}(),Bs=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}a(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(Si)},t.lookupNamespaceURI=function(t){throw new Error(Si)},t.lookupPrefix=function(t){throw new Error(Si)},t.normalize=function(){throw new Error(Si)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,h=s[c],f=o[l+c];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,t){void 0===t&&(t=!1),e(this)||(t?this.childNodes.slice():this.childNodes).forEach(function(t){t.forEach(e)})},Dr(d,[{key:"textContent",get:function(){var t="";this.nodeName===k.TEXT&&(t+=this.style.text);for(var e=Yr(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===k.TEXT?t+=n.nodeValue:t+=n.textContent}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===k.TEXT&&(this.style.text=""+t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}}]),d}(Is),Fs=(Bs.DOCUMENT_POSITION_DISCONNECTED=1,Bs.DOCUMENT_POSITION_PRECEDING=2,Bs.DOCUMENT_POSITION_FOLLOWING=4,Bs.DOCUMENT_POSITION_CONTAINS=8,Bs.DOCUMENT_POSITION_CONTAINED_BY=16,Bs.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 A.AnimationTimeline(Wr(t))}catch(t){}var r={};return Pl.forEach(function(t){var e=t.n,n=t.inh,t=t.d;n&&t&&(r[e]=ni(t)?t(k.GROUP):t)}),t.documentElement=new hl({id:"g-root",style:r}),t.documentElement.ownerDocument=Wr(t),t.documentElement.parentNode=Wr(t),t.childNodes=[t.documentElement],t}a(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?Al:hl),(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(Si)},n.destroy=function(){try{this.documentElement.destroyChildren(),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.displayObject,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=Br(Rr().mark(function t(e,n){var r,i,a,o,s,l;return Rr().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,l=s.picked,t.abrupt("return",l&&l[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=Br(Rr().mark(function t(e,n){var r,i,a,o,s,l;return Rr().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,(l=s.picked)[l.length-1]!==this.documentElement&&l.push(this.documentElement),t.abrupt("return",l);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(_i)},n.insertBefore=function(t,e){throw new Error(_i)},n.removeChild=function(t,e){throw new Error(_i)},n.replaceChild=function(t,e,n){throw new Error(_i)},n.append=function(){throw new Error(_i)},n.prepend=function(){throw new Error(_i)},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)},Dr(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}(Bs)),Ds=(Cs=Cs||{},Cs[Cs.Standard=0]="Standard",(Vs=b=b||{}).REPARENT="reparent",Vs.DESTROY="destroy",Vs.ATTR_MODIFIED="DOMAttrModified",Vs.INSERTED="DOMNodeInserted",Vs.REMOVED="removed",Vs.MOUNTED="DOMNodeInsertedIntoDocument",Vs.UNMOUNTED="DOMNodeRemovedFromDocument",Vs.BOUNDS_CHANGED="bounds-changed",Vs.RENDER_ORDER_CHANGED="render-order-changed",Vs.CULLED="culled",function(c){function t(t,e,n,r,i,a,o,s){var l=c.call(this,null)||this;return l.relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return a(t,c),t}(js)),zs=(Ds.ADDITION=2,Ds.MODIFICATION=1,Ds.REMOVAL=3,0),Gs=new Ds(b.INSERTED,null,"","","",0,"",""),Ws=new Ds(b.REMOVED,null,"","","",0,"",""),Hs=new Rs(b.DESTROY),Ys=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=zs++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:Cs.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[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=A.enableCSSParsing?{anchor:di,opacity:di,fillOpacity:di,strokeOpacity:di,fill:di,stroke:di,transform:di,transformOrigin:di,visibility:di,pointerEvents:di,lineWidth:di,lineCap:di,lineJoin:di,increasedLineWidthForHitTesting:di,fontSize:di,fontFamily:di,fontStyle:di,fontWeight:di,fontVariant:di,textAlign:di,textBaseline:di,textTransform:di,zIndex:di,filter:di,shadowType:di}:null,t.parsedStyle={},t.attributes={},t}a(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(Si)},e.appendChild=function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return A.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),Gs.relatedNode=this,t.dispatchEvent(Gs),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 Ws.relatedNode=this,t.dispatchEvent(Ws),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),A.sceneGraphService.detach(t),t},e.removeChildren=function(){for(var t=this.childNodes.length-1;0<=t;t--){var e=this.childNodes[t];this.removeChild(e)}},e.destroyChildren=function(){for(var t=this.childNodes.length-1;0<=t;t--){var e=this.childNodes[t];e.childNodes.length&&e.destroyChildren(),e.destroy()}},e.matches=function(t){return A.sceneGraphService.matches(t,this)},e.getElementById=function(t){return A.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return A.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return A.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return A.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return A.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return A.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(A.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(Hs),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return A.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return A.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return A.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return A.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return A.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;return"symbol"==typeof t?A.enableCSSParsing?null:void 0:void 0===(e=this.attributes[t])&&(t=si(t),e=this.attributes[t],A.enableCSSParsing)&&_(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(Si)},e.getAttributeNode=function(t){throw new Error(Si)},e.getAttributeNodeNS=function(t,e){throw new Error(Si)},e.hasAttributeNS=function(t,e){throw new Error(Si)},e.removeAttributeNS=function(t,e){throw new Error(Si)},e.removeAttributeNode=function(t){throw new Error(Si)},e.setAttributeNS=function(t,e,n){throw new Error(Si)},e.setAttributeNode=function(t){throw new Error(Si)},e.setAttributeNodeNS=function(t){throw new Error(Si)},e.toggleAttribute=function(t,e){throw new Error(Si)},Dr(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}(Bs),Vs=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 Ms,t.movement=new Ms,t.offset=new Ms,t.global=new Ms,t.screen=new Ms,t}a(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(Si)},Dr(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}(js),qs=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}a(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}(Vs),Us=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 a(t,i),t.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},t}(Vs);function Xs(t){return null!=t&&t.nodeName}var $s,Ks,Zs,Qs=new Ds(b.ATTR_MODIFIED,null,null,null,null,Ds.MODIFICATION,null,null),Js={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:""},tl={anchor:[0,0],fill:gi,stroke:gi,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},el=f({},tl,{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),nl=[].concat(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]),rl=function(i){function t(t){var r=i.call(this)||this,t=(r.config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.dataset=void 0,r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||k.GROUP,r.config.style=r.config.style||r.config.attrs||{},Object.assign(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,A.enableCSSParsing?tl:el,r.config.initialParsedStyle),A.enableCSSParsing&&Object.assign(r.attributes,Js),r.initAttributes(r.config.style),A.globalThis.Proxy||function(){});return r.dataset=new t({},{get:function(t,e){e="data-"+ti(e);return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute("data-"+ti(e),n),!0}}),r.style=new t({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}}),r}a(t,i);var e=t.prototype;return e.destroy=function(){i.prototype.destroy.call(this),this.getAnimations().forEach(function(t){t.cancel()})},e.cloneNode=function(e,t){var n,r=f({},this.attributes);for(n in r){var i=r[n];Xs(i)&&"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},e.initAttributes=function(t){void 0===t&&(t={});var e,n=this.renderable,r={forceUpdateGeometry:!0},i=(A.enableCSSParsing&&(r.usedAttributes=nl),{});for(e in t)i[si(e)]=t[e];A.styleValueRegistry.processProperties(this,i,r),n.dirty=!0},e.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=si(t);dn(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),i.prototype.setAttribute.call(this,t,e))},e.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r=this.renderable,i=this.attributes[t],a=this.parsedStyle[t],o=(A.styleValueRegistry.processProperties(this,((o={})[t]=e,o),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(Qs.relatedNode=this,Qs.prevValue=i,Qs.newValue=e,Qs.attrName=t,Qs.prevParsedValue=a,Qs.newParsedValue=o,this.isMutationObserved?this.dispatchEvent(Qs):(Qs.target=this).ownerDocument.defaultView.dispatchEvent(Qs,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,a,o)},e.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 Es(n,e,r-n,t-e)},e.setOrigin=function(t,e,n){return A.sceneGraphService.setOrigin(this,ji(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getOrigin=function(){return A.sceneGraphService.getOrigin(this)},e.setPosition=function(t,e,n){return A.sceneGraphService.setPosition(this,ji(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.setLocalPosition=function(t,e,n){return A.sceneGraphService.setLocalPosition(this,ji(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translate=function(t,e,n){return A.sceneGraphService.translate(this,ji(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translateLocal=function(t,e,n){return A.sceneGraphService.translateLocal(this,ji(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getPosition=function(){return A.sceneGraphService.getPosition(this)},e.getLocalPosition=function(){return A.sceneGraphService.getLocalPosition(this)},e.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=ji(t,e=e||t,n=n||t)),A.sceneGraphService.scaleLocal(this,t),this},e.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=ji(t,e=e||t,n=n||t)),A.sceneGraphService.setLocalScale(this,t),this},e.getLocalScale=function(){return A.sceneGraphService.getLocalScale(this)},e.getScale=function(){return A.sceneGraphService.getScale(this)},e.getEulerAngles=function(){return Ii(Bi(y(),A.sceneGraphService.getWorldTransform(this))[2])},e.getLocalEulerAngles=function(){return Ii(Bi(y(),A.sceneGraphService.getLocalRotation(this))[2])},e.setEulerAngles=function(t){return A.sceneGraphService.setEulerAngles(this,0,0,t),this},e.setLocalEulerAngles=function(t){return A.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.rotateLocal=function(t,e,n){return _(e)&&_(n)?A.sceneGraphService.rotateLocal(this,0,0,t):A.sceneGraphService.rotateLocal(this,t,e,n),this},e.rotate=function(t,e,n){return _(e)&&_(n)?A.sceneGraphService.rotate(this,0,0,t):A.sceneGraphService.rotate(this,t,e,n),this},e.setRotation=function(t,e,n,r){return A.sceneGraphService.setRotation(this,t,e,n,r),this},e.setLocalRotation=function(t,e,n,r){return A.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.setLocalSkew=function(t,e){return A.sceneGraphService.setLocalSkew(this,t,e),this},e.getRotation=function(){return A.sceneGraphService.getRotation(this)},e.getLocalRotation=function(){return A.sceneGraphService.getLocalRotation(this)},e.getLocalSkew=function(){return A.sceneGraphService.getLocalSkew(this)},e.getLocalTransform=function(){return A.sceneGraphService.getLocalTransform(this)},e.getWorldTransform=function(){return A.sceneGraphService.getWorldTransform(this)},e.setLocalTransform=function(t){return A.sceneGraphService.setLocalTransform(this,t),this},e.resetLocalTransform=function(){A.sceneGraphService.resetLocalTransform(this)},e.getAnimations=function(){return this.activeAnimations},e.animate=function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null},e.isVisible=function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)},e.isInteractive=function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)},e.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},e.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},e.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},e.getConfig=function(){return this.config},e.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?Ze(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},e.getMatrix=function(t){var t=t||this.getWorldTransform(),e=_t(y(),t),n=e[0],e=e[1],r=At(y(),t),i=r[0],r=r[1],t=Pt(re(),t),t=Bi(y(),t),a=t[0],t=t[2];return Fi(a||t,n,e,i,r)},e.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.setMatrix=function(t){var t=Di(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)},e.setLocalMatrix=function(t){var t=Di(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)},e.show=function(){A.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.hide=function(){A.enableCSSParsing?this.style.visibility="hidden":this.forEach(function(t){t.style.visibility="hidden"})},e.getCount=function(){return this.childElementCount},e.getParent=function(){return this.parentElement},e.getChildren=function(){return this.children},e.getFirst=function(){return this.firstElementChild},e.getLast=function(){return this.lastElementChild},e.getChildByIndex=function(t){return this.children[t]||null},e.add=function(t,e){return this.appendChild(t,e)},e.setClip=function(t){this.style.clipPath=t},e.set=function(t,e){this.config[t]=e},e.get=function(t){return this.config[t]},e.moveTo=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},e.move=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},e.setZIndex=function(t){return this.style.zIndex=t,this},Dr(t,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),t}(Ys),il=["style"],al=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,il);return n.call(this,f({type:k.CIRCLE,style:A.enableCSSParsing?f({cx:"",cy:"",r:""},e):f({},e),initialParsedStyle:{anchor:[.5,.5],transformOrigin:A.enableCSSParsing?null:[bi,bi]}},t))||this}return a(t,n),t}(rl),ol=["style"],sl=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,ol),e=n.call(this,f({style:A.enableCSSParsing?f({x:"",y:""},e):f({},e)},t))||this;return e.isCustomElement=!0,e}return a(t,n),t}(rl),ll=["style"],cl=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,ll);return n.call(this,f({type:k.ELLIPSE,style:A.enableCSSParsing?f({cx:"",cy:"",rx:"",ry:""},e):f({},e),initialParsedStyle:{anchor:[.5,.5],transformOrigin:A.enableCSSParsing?null:[bi,bi]}},t))||this}return a(t,n),t}(rl),ul=["style"],hl=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,ul);return n.call(this,f({type:k.GROUP,style:A.enableCSSParsing?f({x:"",y:"",width:"",height:""},e):f({},e)},t))||this}return a(t,n),t}(rl),fl=["style"],dl=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,fl),e=n.call(this,f({type:k.HTML,style:A.enableCSSParsing?f({x:"",y:"",width:"auto",height:"auto",innerHTML:""},e):f({},e)},t))||this;return e.cullable.enable=!1,e}a(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 xs).setMinMax([t,r,0],[t+n.width,r+n.height,0]),e):null},e.getLocalBounds=function(){if(this.parentNode){var t,e=yt(ht(),this.parentNode.getWorldTransform()),n=this.getBounds();if(!xs.isEmpty(n))return(t=new xs).setFromTransformedAABB(n,e),t}return this.getBounds()},t}(rl),pl=["style"],gl=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,pl);return n.call(this,f({type:k.IMAGE,style:A.enableCSSParsing?f({x:"",y:"",img:"",width:"",height:""},e):f({},e)},t))||this}return a(t,n),t}(rl),ml=["style"],yl=function(r){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,ml),e=r.call(this,f({type:k.LINE,style:f({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&&Xs(n)&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&Xs(t)&&(e.markerEndAngle=t.getLocalEulerAngles(),e.appendChild(t)),e.transformMarker(!0),e.transformMarker(!1),e}a(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&&Xs(r)&&(this.markerStartAngle=0,r.remove()),i&&Xs(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&Xs(r)&&(this.markerEndAngle=0,r.remove()),i)&&Xs(i)&&(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,l=o.markerEnd,c=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:l;s&&Xs(s)&&(l=0,t=t?(r=h-g,i=d-o,e=f-h,n=p-d,a=c||0,this.markerStartAngle):(r=f-g,i=p-o,e=h-f,n=d-p,a=u||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+t),s.setLocalPosition(r+Math.cos(l)*a,i+Math.sin(l)*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=er.pointAt(r,i,a,o,t),i=r.x,a=r.y,o=Kt(y(),zt(i-s,a-n,0),e?this.getWorldTransform():this.getLocalTransform());return new Ms(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 er.length(e,n,r,t)},t}(rl),vl=["style"],bl={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Es(0,0,0,0)},xl=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,vl),e=i.call(this,f({type:k.PATH,style:A.enableCSSParsing?f({path:"",miterLimit:""},e):f({},e),initialParsedStyle:A.enableCSSParsing?null:{miterLimit:4,path:f({},bl)}},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&Xs(n)&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&Xs(t)&&e.placeMarkerMid(t),r&&Xs(r)&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}a(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&&Xs(r)&&(this.markerStartAngle=0,r.remove()),i&&Xs(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&Xs(r)&&(this.markerEndAngle=0,r.remove()),i&&Xs(i)&&(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,l=o.markerEnd,c=o.markerStartOffset,u=o.markerEndOffset,h=o.defX,o=o.defY,s=t?s:l;s&&Xs(s)&&(l=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=c||0,this.markerStartAngle):(c=(t=this.getEndTangent())[0],e=(t=t[1])[0]-h,n=t[1]-o,r=c[0]-t[0],i=c[1]-t[1],a=u||0,this.markerEndAngle),l=Math.atan2(i,r),s.setLocalEulerAngles(180*l/Math.PI+h),s.setLocalPosition(e+Math.cos(l)*a,n+Math.sin(l)*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&&Xs(t))for(var a=1;a<n.length-1;a++){var o=n[a].currentPoint,s=o[0],o=o[1],l=1===a?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(s-r,o-i)}},e.getTotalLength=function(){return ya(this)},e.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,n=He(n.path.absolutePath,t,v(v({},a),{bbox:!1,length:!0})).point,t=n.x,a=n.y,n=Kt(y(),zt(t-r,a-i,0),e?this.getWorldTransform():this.getLocalTransform());return new Ms(n[0],n[1])},e.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*ya(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}(rl),wl=["style"],kl=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,wl),e=i.call(this,f({type:k.POLYGON,style:A.enableCSSParsing?f({points:"",miterLimit:"",isClosed:!0},e):f({},e),initialParsedStyle:A.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&Xs(n)&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&Xs(t)&&e.placeMarkerMid(t),r&&Xs(r)&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}a(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&&Xs(r)&&(this.markerStartAngle=0,r.remove()),i&&Xs(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&Xs(r)&&(this.markerEndAngle=0,r.remove()),i&&Xs(i)&&(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,l=o.markerEnd,c=o.markerStartOffset,u=o.markerEndOffset,h=o.points.points,f=o.defX,o=o.defY,s=t?s:l;s&&Xs(s)&&(i=h[l=0][0]-f,a=h[0][1]-o,c=t?(e=h[1][0]-h[0][0],n=h[1][1]-h[0][1],r=c||0,this.markerStartAngle):(t=h.length,n=this.parsedStyle.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),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+c),s.setLocalPosition(i+Math.cos(l)*r,a+Math.sin(l)*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&&Xs(t))for(var a=1;a<(this.parsedStyle.isClosed?n.length:n.length-1);a++){var o=n[a][0]-r,s=n[a][1]-i,l=1===a?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(o,s)}},t}(rl),Ml=["style"],El=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,Ml);return n.call(this,f({type:k.POLYLINE,style:A.enableCSSParsing?f({points:"",miterLimit:"",isClosed:!1},e):f({},e),initialParsedStyle:A.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},t))||this}a(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)}),er.pointAt(a[s][0],a[s][1],a[s+1][0],a[s+1][1],o)),a=e.x,e=e.y,a=Kt(y(),zt(a-r,e-i,0),t?this.getWorldTransform():this.getLocalTransform());return new Ms(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}(kl),Ol=["style"],Sl=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,Ol);return n.call(this,f({type:k.RECT,style:A.enableCSSParsing?f({x:"",y:"",width:"",height:"",radius:""},e):f({},e)},t))||this}return a(t,n),t}(rl),_l=["style"],Al=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,_l);return n.call(this,f({type:k.TEXT,style:A.enableCSSParsing?f({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):f({fill:"black"},e),initialParsedStyle:A.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",lineHeight:0,letterSpacing:0,textBaseline:"alphabetic",textAlign:"start",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0}},t))||this}a(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}(rl),Pl=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:i.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:i.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:i.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:i.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:i.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:i.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:i.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:i.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:i.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:i.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:i.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:i.FILTER},{n:"clipPath",syntax:i.DEFINED_PATH},{n:"textPath",syntax:i.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:i.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===k.CIRCLE||t===k.ELLIPSE?"center":t===k.TEXT?"text-anchor":"left top"},l:!0,syntax:i.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===k.CIRCLE||t===k.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:i.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:i.COORDINATE},{n:"cy",int:!0,d:"0",syntax:i.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:i.COORDINATE},{n:"y",int:!0,d:"0",syntax:i.COORDINATE},{n:"z",int:!0,d:"0",syntax:i.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:i.COORDINATE},{n:"y1",int:!0,l:!0,syntax:i.COORDINATE},{n:"z1",int:!0,l:!0,syntax:i.COORDINATE},{n:"x2",int:!0,l:!0,syntax:i.COORDINATE},{n:"y2",int:!0,l:!0,syntax:i.COORDINATE},{n:"z2",int:!0,l:!0,syntax:i.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:i.PATH,p:50},{n:"points",int:!0,l:!0,syntax:i.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:i.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:i.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:i.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:i.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:i.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:i.NUMBER,d:function(t){return t===k.PATH||t===k.POLYGON||t===k.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:i.MARKER},{n:"markerEnd",syntax:i.MARKER},{n:"markerMid",syntax:i.MARKER},{n:"markerStartOffset",syntax:i.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:i.LENGTH,l:!0,int:!0,d:"0"}],Tl=Pl.filter(function(t){return!!t.l}).map(function(t){return t.n}),Ll={},Nl=new WeakMap,Vs=function(){function t(){var e=this;Pl.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){Ll[t]=e})},e.unregisterMetadata=function(t){delete Ll[t]},e.getPropertySyntax=function(t){return A.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,e,t){var r=this;if(void 0===t&&(t={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}),A.enableCSSParsing){var i=t,a=i.skipUpdateAttribute,o=i.skipParse,s=i.forceUpdateGeometry,i=i.usedAttributes,l=s,c=Object.keys(e);c.forEach(function(t){a||(n.attributes[t]=e[t]),!l&&null!=(t=Ll[t])&&t.l&&(l=!0)}),o||c.forEach(function(t){n.computedStyle[t]=r.parseProperty(t,n.attributes[t],n)}),(c=null!=i&&i.length?Array.from(new Set(c.concat(i))):c).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=r.computeProperty(t,n.computedStyle[t],n))}),l&&this.updateGeometry(n),c.forEach(function(t){t in n.parsedStyle&&r.postProcessProperty(t,n,c)}),A.enableCSSParsing&&n.children.length&&c.forEach(function(e){e in n.parsedStyle&&r.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})}else{Object.assign(n.attributes,e);var s=Object.keys(e),o=n.parsedStyle.clipPath,i=n.parsedStyle.offsetPath,u=(n.parsedStyle=Object.assign(n.parsedStyle,e),!!t.forceUpdateGeometry);if(!u)for(var h=0;h<Tl.length;h++)if(Tl[h]in e){u=!0;break}e.fill&&(n.parsedStyle.fill=wo(e.fill)),e.stroke&&(n.parsedStyle.stroke=wo(e.stroke)),e.shadowColor&&(n.parsedStyle.shadowColor=wo(e.shadowColor)),e.filter&&(n.parsedStyle.filter=Co(e.filter)),_(e.radius)||(n.parsedStyle.radius=Ao(e.radius,4)),_(e.lineDash)||(n.parsedStyle.lineDash=Ao(e.lineDash,2)),e.points&&(n.parsedStyle.points=Ho(e.points,n)),""===e.path&&(n.parsedStyle.path=f({},bl)),e.path&&(n.parsedStyle.path=Go(e.path,n)),e.textTransform&&A.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:e.textTransform},n,null),e.clipPath&&A.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,e.clipPath,n,this),e.offsetPath&&A.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",i,e.offsetPath,n,this),e.anchor&&(n.parsedStyle.anchor=Ao(e.anchor,2)),e.transform&&(n.parsedStyle.transform=$o(e.transform)),e.transformOrigin&&(n.parsedStyle.transformOrigin=ss(e.transformOrigin)),e.markerStart&&(n.parsedStyle.markerStart=A.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerStart,e.markerStart,null,null)),e.markerEnd&&(n.parsedStyle.markerEnd=A.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerEnd,e.markerEnd,null,null)),e.markerMid&&(n.parsedStyle.markerMid=A.CSSPropertySyntaxFactory["<marker>"].calculator("",e.markerMid,e.markerMid,null,null)),(n.nodeName!==k.CIRCLE&&n.nodeName!==k.ELLIPSE||_(e.cx)&&_(e.cy))&&(n.nodeName!==k.RECT&&n.nodeName!==k.IMAGE&&n.nodeName!==k.GROUP&&n.nodeName!==k.HTML&&n.nodeName!==k.TEXT&&n.nodeName!==k.MESH||_(e.x)&&_(e.y)&&_(e.z))&&(n.nodeName!==k.LINE||_(e.x1)&&_(e.y1)&&_(e.z1)&&_(e.x2)&&_(e.y2)&&_(e.z2))||A.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(n,s),_(e.zIndex)||A.CSSPropertySyntaxFactory["<z-index>"].postProcessor(n,s),e.path&&A.CSSPropertySyntaxFactory["<path>"].postProcessor(n,s),e.points&&A.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(n,s),_(e.offsetDistance)||A.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(n,s),e.transform&&A.CSSPropertySyntaxFactory["<transform>"].postProcessor(n,s),u&&this.updateGeometry(n)}},e.parseProperty=function(t,e,n){var r,t=Ll[t],i=e;return"unset"===(e=""!==e&&!_(e)?e:"unset")||"initial"===e||"inherit"===e?i=ai(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=ai(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=Ll[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof Qr){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))_(r)||(e=this.parseProperty(t,ni(r)?r(n.nodeName):r,n));else if("inherit"===l)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 Qr?e.value:e}return a},e.postProcessProperty=function(t,e,n){var t=Ll[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e,n)},e.addUnresolveProperty=function(t,e){var n=Nl.get(t);n||(Nl.set(t,[]),n=Nl.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=Nl.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=Nl.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),Nl.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,l,c,u,h,f,d,p,g,m=t.nodeName,y=A.geometryUpdaterFactory[m];y&&((s=t.geometry).contentBounds||(s.contentBounds=new xs),s.renderBounds||(s.renderBounds=new xs),e=t.parsedStyle,n=(y=y.update(e,t)).width,r=y.height,h=void 0===(h=y.depth)?0:h,u=void 0===(u=y.offsetX)?0:u,p=void 0===(p=y.offsetY)?0:p,y=void 0===(y=y.offsetZ)?0:y,h=[Math.abs(n)/2,Math.abs(r)/2,h/2],l=e.stroke,c=e.lineWidth,g=e.increasedLineWidthForHitTesting,d=e.shadowType,f=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,m===k.TEXT&&delete e.anchor,u=[(1-2*(o&&o[0]||0))*n/2+u,(1-2*(o&&o[1]||0))*r/2+p,(1-2*(o&&o[2]||0))*h[2]+y],s.contentBounds.update(u,h),p=m===k.POLYLINE||m===k.POLYGON||m===k.PATH?Math.SQRT2:.5,l&&!l.isNone&&(h[0]+=y=((c||0)+(g||0))*p,h[1]+=y),s.renderBounds.update(u,h),f&&d&&"inner"!==d&&(l=(m=s.renderBounds).min,c=m.max,g=e.shadowBlur||0,p=e.shadowOffsetX||0,y=e.shadowOffsetY||0,u=l[0]-g+p,h=c[0]+g+p,f=l[1]-g+y,d=c[1]+g+y,l[0]=Math.min(l[0],u),c[0]=Math.max(c[0],h),l[1]=Math.min(l[1],f),c[1]=Math.max(c[1],d),s.renderBounds.setMinMax(l,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,Li(s.renderBounds.halfExtents,s.renderBounds.halfExtents,[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,m=r<0,g=((p=n<0)?-1:1)*(a?To(a[0],0,t):0),y=(m?-1:1)*(a?To(a[1],1,t):0),g-=(p?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,y-=(m?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(g,y),A.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=Ll[t];return!!t&&t.inh},t}();(Rl=$s=$s||{})[Rl.ORBITING=0]="ORBITING",Rl[Rl.EXPLORING=1]="EXPLORING",Rl[Rl.TRACKING=2]="TRACKING",(Rl=Ks=Ks||{})[Rl.DEFAULT=0]="DEFAULT",Rl[Rl.ROTATIONAL=1]="ROTATIONAL",Rl[Rl.TRANSLATIONAL=2]="TRANSLATIONAL",Rl[Rl.CINEMATIC=3]="CINEMATIC",(Rl=Zs=Zs||{})[Rl.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",Rl[Rl.PERSPECTIVE=1]="PERSPECTIVE";var Cl,jl="updated",Rl=function(){function t(){this.canvas=void 0,this.eventEmitter=new jr,this.matrix=ht(),this.right=zt(1,0,0),this.up=zt(0,1,0),this.forward=zt(0,0,1),this.position=zt(0,0,1),this.focalPoint=zt(0,0,0),this.distanceVector=zt(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=ht(),this.projectionMatrixInverse=ht(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=$s.EXPLORING,this.trackingMode=Ks.DEFAULT,this.projectionMode=Zs.PERSPECTIVE,this.frustum=new ks,this.orthoMatrix=ht()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===Zs.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===$s.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===$s.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==$s.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(ht(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=Et(ht(),[t,e,0]);this.jitteredProjectionMatrix=bt(ht(),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===Zs.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===Zs.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===Zs.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===Zs.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===Zs.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Zs.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=zt(t.x-r,t.y-n,0),e=Ut(i,this.right)/Dt(this.right),r=Ut(i,this.up)/Dt(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=Zs.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(Ri(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,wt(this.projectionMatrix,this.projectionMatrix,zt(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=Zs.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),jt(this.projectionMatrix,s,n,r,e,i,a),wt(this.projectionMatrix,this.projectionMatrix,zt(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=ji(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=zt(0,1,0);return this.focalPoint=ji(t,e,n),this.trackingMode===Ks.CINEMATIC&&(t=(r=Yt(y(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=Dt(r),e=Ii(Math.asin(e/r)),r=90+Ii(Math.atan2(n,t)),Mt(n=ht(),n,Ri(r)),kt(n,n,Ri(e)),i=Kt(y(),[0,1,0],n)),yt(this.matrix,Rt(ht(),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=y(),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=Ci(t),this.computeMatrix(),this._getAxes(),this.type===$s.ORBITING||this.type===$s.EXPLORING?this._getPosition():this.type===$s.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=Ci(t),this.computeMatrix(),this._getAxes(),this.type===$s.ORBITING||this.type===$s.EXPLORING?this._getPosition():this.type===$s.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=Ci(t),this.computeMatrix(),this._getAxes(),this.type===$s.ORBITING||this.type===$s.EXPLORING?this._getPosition():this.type===$s.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=ie(re(),[0,0,1],Ri(this.roll)),e=(gt(this.matrix),ie(re(),[1,0,0],Ri((this.rotateWorld&&this.type!==$s.TRACKING||this.type===$s.TRACKING?1:-1)*this.elevation))),n=ie(re(),[0,1,0],Ri((this.rotateWorld&&this.type!==$s.TRACKING||this.type===$s.TRACKING?1:-1)*this.azimuth)),n=ae(re(),n,e),n=ae(re(),n,t),e=Lt(ht(),n);this.type===$s.ORBITING||this.type===$s.EXPLORING?(xt(this.matrix,this.matrix,this.focalPoint),bt(this.matrix,this.matrix,e),xt(this.matrix,this.matrix,[0,0,this.distance])):this.type===$s.TRACKING&&(xt(this.matrix,this.matrix,this.position),bt(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=ji(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(){Gt(this.right,ji(ne(ee(),[1,0,0,0],this.matrix))),Gt(this.up,ji(ne(ee(),[0,1,0,0],this.matrix))),Gt(this.forward,ji(ne(ee(),[0,0,1,0],this.matrix))),qt(this.right,this.right),qt(this.up,this.up),qt(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===$s.TRACKING||this.rotateWorld?(this.elevation=Ii(Math.asin(e/r)),this.azimuth=Ii(Math.atan2(-t,-n))):(this.elevation=-Ii(Math.asin(e/r)),this.azimuth=-Ii(Math.atan2(-t,-n)))},e._getPosition=function(){Gt(this.position,ji(ne(ee(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;Zt(this.distanceVector,[0,0,-this.distance],(t=J(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Ht(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=Yt(y(),this.focalPoint,this.position),this.distance=Dt(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===Zs.ORTHOGRAPHIC&&(t=this.position,e=ie(re(),[0,0,1],-this.roll*Math.PI/180),Tt(this.orthoMatrix,e,zt((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),zt(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=bt(ht(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(jl))},e.rotate=function(t,e,n){throw new Error(Si)},e.pan=function(t,e){throw new Error(Si)},e.dolly=function(t){throw new Error(Si)},e.createLandmark=function(t,e){throw new Error(Si)},e.gotoLandmark=function(t,e){throw new Error(Si)},e.cancelLandmarkAnimation=function(){throw new Error(Si)},t}(),Il=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),Bl=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),Fl=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}(),s=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),Dl=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}(),zl=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&&!an(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),Gl=function(){function t(t){this.globalRuntime=void 0,this.globalRuntime=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!_(t)},e.update=function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=A.enableCSSParsing?n-e.ascent:0:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})},t}(),Wl=function(){function t(t,e){var c=this;this.globalRuntime=void 0,this.context=void 0,this.rootTarget=void 0,this.emitter=new jr,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.pickHandler=void 0,this.tmpMatrix=ht(),this.tmpVec3=y(),this.onPointerDown=function(t){var e,n=c.createPointerEvent(t);c.dispatchEvent(n,"pointerdown"),"touch"===n.pointerType?c.dispatchEvent(n,"touchstart"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(e=2===n.button,c.dispatchEvent(n,e?"rightdown":"mousedown")),c.trackingData(t.pointerId).pressTargetsByButton[t.button]=n.composedPath(),c.freeEvent(n)},this.onPointerUp=function(t){var e=performance.now(),n=c.createPointerEvent(t),r=(c.dispatchEvent(n,"pointerup"),"touch"===n.pointerType?c.dispatchEvent(n,"touchend"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(r=2===n.button,c.dispatchEvent(n,r?"rightup":"mouseup")),c.trackingData(t.pointerId)),i=c.findMountedTarget(r.pressTargetsByButton[t.button]),a=i;if(i&&!n.composedPath().includes(i)){for(var o,s=i;s&&!n.composedPath().includes(s);)n.currentTarget=s,c.notifyTarget(n,"pointerupoutside"),"touch"===n.pointerType?c.notifyTarget(n,"touchendoutside"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(o=2===n.button,c.notifyTarget(n,o?"rightupoutside":"mouseupoutside")),Bs.isNode(s)&&(s=s.parentNode);delete r.pressTargetsByButton[t.button],a=s}a&&((i=c.clonePointerEvent(n,"click")).target=a,i.path=[],r.clicksByButton[t.button]||(r.clicksByButton[t.button]={clickCount:0,target:i.target,timeStamp:e}),(a=r.clicksByButton[t.button]).target===i.target&&e-a.timeStamp<200?++a.clickCount:a.clickCount=1,a.target=i.target,a.timeStamp=e,i.detail=a.clickCount,null!=(r=n.detail)&&r.preventClick||(c.context.config.useNativeClickEvent||"mouse"!==i.pointerType&&"touch"!==i.pointerType||c.dispatchEvent(i,"click"),c.dispatchEvent(i,"pointertap")),c.freeEvent(i)),c.freeEvent(n)},this.onPointerMove=function(t){var e=c.createPointerEvent(t),n="mouse"===e.pointerType||"pen"===e.pointerType,r=c.trackingData(t.pointerId),i=c.findMountedTarget(r.overTargets);if(r.overTargets&&i!==e.target){var a="mousemove"===t.type?"mouseout":"pointerout",a=c.createPointerEvent(t,a,i||void 0);if(c.dispatchEvent(a,"pointerout"),n&&c.dispatchEvent(a,"mouseout"),!e.composedPath().includes(i)){var o=c.createPointerEvent(t,"pointerleave",i||void 0);for(o.eventPhase=o.AT_TARGET;o.target&&!e.composedPath().includes(o.target);)o.currentTarget=o.target,c.notifyTarget(o),n&&c.notifyTarget(o,"mouseleave"),Bs.isNode(o.target)&&(o.target=o.target.parentNode);c.freeEvent(o)}c.freeEvent(a)}if(i!==e.target){for(var a="mousemove"===t.type?"mouseover":"pointerover",t=c.clonePointerEvent(e,a),s=(c.dispatchEvent(t,"pointerover"),n&&c.dispatchEvent(t,"mouseover"),i&&Bs.isNode(i)&&i.parentNode);s&&s!==(Bs.isNode(c.rootTarget)&&c.rootTarget.parentNode)&&s!==e.target;)s=s.parentNode;if(!s||s===(Bs.isNode(c.rootTarget)&&c.rootTarget.parentNode)){var l=c.clonePointerEvent(e,"pointerenter");for(l.eventPhase=l.AT_TARGET;l.target&&l.target!==i&&l.target!==(Bs.isNode(c.rootTarget)&&c.rootTarget.parentNode);)l.currentTarget=l.target,c.notifyTarget(l),n&&c.notifyTarget(l,"mouseenter"),Bs.isNode(l.target)&&(l.target=l.target.parentNode);c.freeEvent(l)}c.freeEvent(t)}c.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&c.dispatchEvent(e,"touchmove"),n&&(c.dispatchEvent(e,"mousemove"),c.cursor=c.getCursor(e.target)),r.overTargets=e.composedPath(),c.freeEvent(e)},this.onPointerOut=function(t){var e=c.trackingData(t.pointerId);if(e.overTargets){var n="mouse"===t.pointerType||"pen"===t.pointerType,r=c.findMountedTarget(e.overTargets),i=c.createPointerEvent(t,"pointerout",r||void 0),a=(c.dispatchEvent(i),n&&c.dispatchEvent(i,"mouseout"),c.createPointerEvent(t,"pointerleave",r||void 0));for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==(Bs.isNode(c.rootTarget)&&c.rootTarget.parentNode);)a.currentTarget=a.target,c.notifyTarget(a),n&&c.notifyTarget(a,"mouseleave"),Bs.isNode(a.target)&&(a.target=a.target.parentNode);e.overTargets=null,c.freeEvent(i),c.freeEvent(a)}c.cursor=null},this.onPointerOver=function(t){var e=c.trackingData(t.pointerId),t=c.createPointerEvent(t),n="mouse"===t.pointerType||"pen"===t.pointerType,r=(c.dispatchEvent(t,"pointerover"),n&&c.dispatchEvent(t,"mouseover"),"mouse"===t.pointerType&&(c.cursor=c.getCursor(t.target)),c.clonePointerEvent(t,"pointerenter"));for(r.eventPhase=r.AT_TARGET;r.target&&r.target!==(Bs.isNode(c.rootTarget)&&c.rootTarget.parentNode);)r.currentTarget=r.target,c.notifyTarget(r),n&&c.notifyTarget(r,"mouseenter"),Bs.isNode(r.target)&&(r.target=r.target.parentNode);e.overTargets=t.composedPath(),c.freeEvent(t),c.freeEvent(r)},this.onPointerUpOutside=function(t){var e=c.trackingData(t.pointerId),n=c.findMountedTarget(e.pressTargetsByButton[t.button]),r=c.createPointerEvent(t);if(n){for(var i=n;i;)r.currentTarget=i,c.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType||"mouse"!==r.pointerType&&"pen"!==r.pointerType||c.notifyTarget(r,2===r.button?"rightupoutside":"mouseupoutside"),Bs.isNode(i)&&(i=i.parentNode);delete e.pressTargetsByButton[t.button]}c.freeEvent(r)},this.onWheel=function(t){t=c.createWheelEvent(t);c.dispatchEvent(t),c.freeEvent(t)},this.onClick=function(t){c.context.config.useNativeClickEvent&&(t=c.createPointerEvent(t),c.dispatchEvent(t),c.freeEvent(t))},this.onPointerCancel=function(t){t=c.createPointerEvent(t);c.dispatchEvent(t),c.freeEvent(t)},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("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)},e.destroy=function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()},e.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new Ms(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 Ms(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=bt(this.tmpMatrix,n,a),a=Wt(this.tmpVec3,e/i*2-1,2*(1-t/r)-1,0);return Kt(a,a,n),new Ms(a[0],a[1])},e.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),e=e.getViewTransform(),n=bt(this.tmpMatrix,n,e),e=Wt(this.tmpVec3,t.x,t.y,0),t=(Kt(this.tmpVec3,this.tmpVec3,n),this.context.config),n=t.width,t=t.height;return new Ms((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++)Bs.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);n&&e.push(n)}return e},e.hitTest=function(t){var e=t.viewportX,n=t.viewportY,r=this.context.config,i=r.width,r=r.height;return!(e<0||n<0||i<e||r<n)&&(this.pickHandler(t)||this.rootTarget)||null},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=Yr(t.nativeEvent.composedPath());!(n=e()).done;){var n=n.value,n=A.nativeHTMLMap.get(n);if(n)return n}return null},e.pickTarget=function(t){return this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})},e.createPointerEvent=function(t,e,n){var r=this.allocateEvent(qs),t=(this.copyPointerData(t,r),this.copyMouseData(t,r),this.copyData(t,r),r.nativeEvent=t.nativeEvent,r.originalEvent=t,this.getExistedHTML(r));return r.target=null!=n?n:t||this.isNativeEventFromCanvas(r)&&this.pickTarget(r),"string"==typeof e&&(r.type=e),r},e.createWheelEvent=function(t){var e=this.allocateEvent(Us),t=(this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t,this.getExistedHTML(e));return e.target=t||this.isNativeEventFromCanvas(e)&&this.pickTarget(e),e},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(Us);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(qs);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){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){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||Bs.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.getCursor=function(t){for(var e=t;e;){var n=Ys.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=Bs.isNode(e)&&e.parentNode}},t}(),Hl=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t,e){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d",e);else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",e),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",e)}this.canvas.width=10,this.canvas.height=10}return this.canvas},e.getOrCreateContext=function(t,e){return this.context||this.getOrCreateCanvas(t,e),this.context},t}(),Yl=((ql=Cl=Cl||{})[ql.CAMERA_CHANGED=0]="CAMERA_CHANGED",ql[ql.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",ql[ql.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 Rs(b.RENDER_ORDER_CHANGED),this.hooks={init:new Ha,dirtycheck:new $a(["object"]),cull:new $a(["object","camera"]),beginFrame:new Ua([]),beforeRender:new Ua(["objectToRender"]),render:new Ua(["objectToRender"]),afterRender:new Ua(["objectToRender"]),endFrame:new Ua([]),destroy:new Ua([]),pick:new Va(["result"]),pickSync:new $a(["result"]),pointerDown:new Ua(["event"]),pointerUp:new Ua(["event"]),pointerMove:new Ua(["event"]),pointerOut:new Ua(["event"]),pointerOver:new Ua(["event"]),pointerWheel:new Ua(["event"]),pointerCancel:new Ua(["event"]),click:new Ua(["event"])},this.globalRuntime=t,this.context=e}var e=t.prototype;return e.init=function(){var t=Br(Rr().mark(function t(){var e;return Rr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=f({},this.globalRuntime,this.context),this.context.renderingPlugins.forEach(function(t){t.apply(e,A)}),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(Cl.CAMERA_CHANGED)},e.render=function(t,e){var n=this,r=(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.context.renderingContext);this.globalRuntime.sceneGraphService.syncHierarchy(r.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),r.renderReasons.size&&this.inited&&(this.renderDisplayObject(r.root,t,r),this.hooks.beginFrame.call(),r.renderListCurrentFrame.forEach(function(t){n.hooks.beforeRender.call(t),n.hooks.render.call(t),n.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),r.renderListCurrentFrame=[],r.renderReasons.clear(),e())},e.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),a=i.enableDirtyCheck,i=i.enableCulling,a=(this.globalRuntime.enableCSSParsing&&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(Mi),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(),this.globalRuntime.sceneGraphService.clearPendingEvents()},e.dirtify=function(){this.context.renderingContext.renderReasons.add(Cl.DISPLAY_OBJECT_CHANGED)},t}()),Vl=/\[\s*(.*)=(.*)\s*\]/,ql=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(Vl),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}();function Ul(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var Xl,$l=new Ds(b.REPARENT,null,"","","",0,"",""),Kl=function(){function t(t){var o,i,a,r,s,l,c,u,h,n,f,d,g=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new Rs(b.BOUNDS_CHANGED),this.rotate=(o=re(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=zt(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(se(r=re(),e[0],e[1],e[2]),i=g.getRotation(t),a=g.getRotation(t.parentNode),ce(o,a),oe(o,o),ae(r,o,r),ae(n.localRotation,r,i),he(n.localRotation,n.localRotation),g.dirtifyLocal(t,n)):g.rotateLocal(t,e)}),this.rotateLocal=(i=re(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=zt(e,n,r));n=t.transformable;se(i,e[0],e[1],e[2]),ue(n.localRotation,n.localRotation,i),g.dirtifyLocal(t,n)}),this.setEulerAngles=(a=re(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=zt(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(se(n.localRotation,e[0],e[1],e[2]),r=g.getRotation(t.parentNode),ce(a,oe(re(),r)),ue(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=zt(e,n,r));var i,a,o,s,l,c,u,h,f,d,p,n=t.transformable;Qt(e,y())||(i=r=e,a=n.localRotation,o=a[0],s=a[1],l=a[2],a=a[3],c=i[0],u=i[1],i=i[2],p=s*(d=o*u-s*c)-l*(f=l*c-o*i),l=l*(h=s*i-l*u)-o*d,o=o*f-s*h,f*=s=2*a,d*=s,l*=2,o*=2,r[0]=c+(h*=s)+(p*=2),r[1]=u+f+l,r[2]=i+d+o,Ht(n.localPosition,n.localPosition,e),g.dirtifyLocal(t,n))},this.setPosition=(r=ht(),s=y(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Qt(g.getPosition(t),s)||(Gt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,dt(r,e.worldTransform),yt(r,r),Kt(n.localPosition,s,r)):Gt(n.localPosition,s),g.dirtifyLocal(t,n))}),this.setLocalPosition=(l=y(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Qt(n.localPosition,l)||(Gt(n.localPosition,l),g.dirtifyLocal(t,n))}),this.translate=(c=y(),u=y(),h=y(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Qt(e="number"==typeof e?Wt(u,e,n,r):e,c)||(Ht(h,g.getPosition(t),e),g.setPosition(t,h))}),this.setRotation=function(){var o=re();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=le(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=g.getRotation(t.parentNode),ce(o,n),oe(o,o),ae(a.localRotation,o,e),he(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=ht(),f=y(),d=le(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(Tt(t.localTransform,t.localRotation,t.localPosition,zt(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=gt(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),bt(t.localTransform,t.localTransform,e)),e=Tt(n,d,f,t.localScale,t.origin),bt(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){var r=!1,n=(t.parentNode&&(r=t.parentNode!==e,this.detach(t)),t.parentNode=e,_(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t),e.sortable),e=((null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),t.transformable);e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t),r&&t.dispatchEvent($l)},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);var i=t.transformable;(e="number"==typeof e?[e,n,r]:e)[0]===i.origin[0]&&e[1]===i.origin[1]&&e[2]===i.origin[2]||((n=i.origin)[0]=e[0],n[1]=e[1],n[2]=e[2]||0,this.dirtifyLocal(t,i))},e.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=zt(e,n,r));n=t.transformable;se(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=zt(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=zt(e[0],e[1],e[2]||n.localScale[2]);Qt(e,n.localScale)||(Gt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=le(e,n,r,i));n=t.transformable;ce(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(i=e,n=n,(r=new Q(2))[0]=i,r[1]=n,e=r);var r,i=t.transformable;n=i.localSkew,r=e,n[0]=r[0],n[1]=r[1],this.dirtifyLocal(t,i)},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).isMutationObserved?t.dispatchEvent(n.boundsChangedEvent):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.clearPendingEvents(),i.clear()},e.clearPendingEvents=function(){this.pendingEvents=[]},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)Ul(n),n=n.parentNode;e&&t.forEach(function(t){Ul(t)}),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,!0),t.dispatchEvent(new Ds(b.ATTR_MODIFIED,t,n,n,e,Ds.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return _t(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return Pt(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return At(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=_t(y(),e),r=Pt(re(),e),e=At(y(),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 xs.isEmpty(e)?null:((n=n||new xs).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 xs},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 xs).update(t.center,t.halfExtents))}),e&&(t=Ei(t))&&(t=t.parsedStyle.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new xs)&&(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=ht(),r=(t.parentNode.transformable&&(n=yt(ht(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!xs.isEmpty(r))return(e=new xs).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(xs.isEmpty(i)||(r=new xs).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 Es(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Es((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?bt(e.worldTransform,n.worldTransform,e.localTransform):dt(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}(),Zl={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]},Ql=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Jl=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),tc=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),ec=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!tc.exec(e)&&!Jl.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,Zl.MetricsString+Zl.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(Zl.BaselineSymbol).width),s=Zl.HeightMultiplier*o,o=o*Zl.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,h=0,f=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[h+d]){f=!0;break}if(f)break;h+=c}for(n.ascent=o-u,h=r-c,f=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[h+p]){f=!0;break}if(f)break;h-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,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=sn(e)&&e+"px"||"16px",a=n.split(","),o=a.length-1;0<=o;o--){var s=a[o].trim();!Za.test(s)&&Ka.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)/),m=new Array(g.length),y=0;if(!u){for(var v=0;v<g.length;v++){var b=p.measureText(g[v]).width+(g[v].length-1)*c;m[v]=b,y=Math.max(y,b)}var r=y+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:m,lineHeight:x+=h,maxLineWidth:y,fontProperties:d,lineMetrics:m.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new Es(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength();for(var k=0;k<g.length;k++)p.measureText(g[k]).width,g[k].length},e.setGraphemeOnPath=function(){},e.wordWrap=function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",h=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),f=0,d=0,p={},g=function(t){return r.getFromCache(t,a,p,l)},m=Array.from(u).reduce(function(t,e){return t+g(e)},0),y=Array.from(t),v=0;v<y.length;v++){var b=y[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&&c<d+k){if(s<=f+1){if(e.isOverflowing=!0,0<m&&m<=c){for(var M=h[f].length,E=0,O=M,S=0;S<M;S++){var _=g(h[f][S]);if(c<E+_+m){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<=Zl.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=Zl.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||!Ql.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(!Ql.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}(),A={},Il=(zl=new zl,Dl=new Dl,(Gb={})[k.CIRCLE]=new Il,Gb[k.ELLIPSE]=new Bl,Gb[k.RECT]=zl,Gb[k.IMAGE]=zl,Gb[k.GROUP]=zl,Gb[k.LINE]=new Fl,Gb[k.TEXT]=new Gl(A),Gb[k.POLYLINE]=Dl,Gb[k.POLYGON]=Dl,Gb[k.PATH]=new s,Gb[k.HTML]=null,Gb[k.MESH]=null,Gb),Gl=(Bl=new e,zl=new o,(Fl={})[i.PERCENTAGE]=null,Fl[i.NUMBER]=new ys,Fl[i.ANGLE]=new n,Fl[i.DEFINED_PATH]=new r,Fl[i.PAINT]=Bl,Fl[i.COLOR]=Bl,Fl[i.FILTER]=new cs,Fl[i.LENGTH]=zl,Fl[i.LENGTH_PERCENTAGE]=zl,Fl[i.LENGTH_PERCENTAGE_12]=new ds,Fl[i.LENGTH_PERCENTAGE_14]=new ps,Fl[i.COORDINATE]=new gs,Fl[i.OFFSET_DISTANCE]=new vs,Fl[i.OPACITY_VALUE]=new bs,Fl[i.PATH]=new Os,Fl[i.LIST_OF_POINTS]=new Ss,Fl[i.SHADOW_BLUR]=new _s,Fl[i.TEXT]=new As,Fl[i.TEXT_TRANSFORM]=new Ps,Fl[i.TRANSFORM]=new Ts,Fl[i.TRANSFORM_ORIGIN]=new hs,Fl[i.Z_INDEX]=new Ls,Fl[i.MARKER]=new ms,Fl),Dl=(A.CameraContribution=Rl,A.AnimationTimeline=null,A.EasingFunction=null,A.offscreenCanvas=new Hl,A.nativeHTMLMap=new WeakMap,A.sceneGraphSelector=new ql,A.sceneGraphService=new Kl(A),A.textService=new ec(A),A.geometryUpdaterFactory=Il,A.CSSPropertySyntaxFactory=Gl,A.styleValueRegistry=new Vs,A.layoutRegistry=null,A.globalThis=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==S)return S;throw new Error("Unable to locate global `this`")}(),A.enableCSSParsing=!0,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}()),s=function(){function t(t){this.plugins=[],this.config=void 0,this.config=f({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}(),nc=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 Rs(b.CULLED)),null))}),e.hooks.afterRender.tap(a.tag,function(t){t.cullable.visibilityPlaneMask=-1})},a}(),rc=(nc.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}()),ic=(rc.tag="DirtyCheck",function(){function e(){var a=this;this.autoPreventDefault=!1,this.rootPointerEvent=new qs(null),this.rootWheelEvent=new Us(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=Yr(a.normalizeToPointerEvent(t,n));!(i=r()).done;){var i=i.value,i=a.bootstrapEvent(a.rootPointerEvent,i,n,t);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(t){return a.context.renderingService.hooks.pickSync.call({position:t,picked:[],topmost:!0}).picked[0]||null}),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=Yr(e);!(r=n()).done;){var r=r.value,r=a.bootstrapEvent(a.rootPointerEvent,r,o,t);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=Yr(a.normalizeToPointerEvent(t,o));!(i=r()).done;){var i=i.value,i=a.bootstrapEvent(a.rootPointerEvent,i,o,t);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.hooks.click.tap(e.tag,this.onPointerMove),t.hooks.pointerCancel.tap(e.tag,function(t){for(var e=Yr(a.normalizeToPointerEvent(t,o));!(n=e()).done;){var n=n.value,n=a.bootstrapEvent(a.rootPointerEvent,n,o,t);a.context.eventService.mapEvent(n)}a.setCursor(a.context.eventService.cursor)})},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 Ms(i,t))).x,i.y):(e=n,r),{x:e,y:t}},t.bootstrapEvent=function(t,e,n,r){t.view=n,t.originalEvent=null,t.nativeEvent=r,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);n=this.getViewportXY(e),e=n.x,n=n.y,t.viewport.x=e,t.viewport.y=n,e=this.context.eventService.viewport2Canvas(t.viewport),n=e.x,e=e.y;return t.canvas.x=n,t.canvas.y=e,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=r.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=Ai[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];dn(i.button)&&(i.button=0),dn(i.buttons)&&(i.buttons=1),dn(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),dn(i.width)&&(i.width=i.radiusX||1),dn(i.height)&&(i.height=i.radiusY||1),dn(i.tiltX)&&(i.tiltX=0),dn(i.tiltY)&&(i.tiltY=0),dn(i.pointerType)&&(i.pointerType="touch"),dn(i.pointerId)&&(i.pointerId=i.identifier||0),dn(i.pressure)&&(i.pressure=i.force||.5),dn(i.twist)&&(i.twist=0),dn(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)?(dn((e=t).isPrimary)&&(e.isPrimary=!0),dn(e.width)&&(e.width=1),dn(e.height)&&(e.height=1),dn(e.tiltX)&&(e.tiltX=0),dn(e.tiltY)&&(e.tiltY=0),dn(e.pointerType)&&(e.pointerType="mouse"),dn(e.pointerId)&&(e.pointerId=1),dn(e.pressure)&&(e.pressure=.5),dn(e.twist)&&(e.twist=0),dn(e.tangentialPressure)&&(e.tangentialPressure=0),e.isNormalized=!0,n.push(e)):n.push(t);return n},e}()),ac=(ic.tag="Event",[k.CIRCLE,k.ELLIPSE,k.IMAGE,k.RECT,k.LINE,k.POLYLINE,k.POLYGON,k.TEXT,k.PATH,k.HTML]),oc=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(),!xs.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||fs.INDETERMINATE,t.planes),i.visible=i.visibilityPlaneMask!==fs.OUTSIDE,i.visible))},e.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===fs.OUTSIDE||n===fs.INSIDE)return n;for(var i=fs.INSIDE,a=-1<ac.indexOf(t.nodeName),o=0,s=r.length;o<s;++o){var l=1<<o;if(0!=(n&l)&&(!a||4!==o&&5!==o)){var c=r[o],u=c.normal,c=c.distance;if(Ut(u,e.getPositiveFarPoint(r[o]))+c<0)return fs.OUTSIDE;Ut(u,e.getNegativeFarPoint(r[o]))+c<0&&(i|=l)}}return i},t}(),sc=function(){function c(){this.rBush=void 0,this.toSync=new Set}var t=c.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,A.enableCSSParsing&&A.styleValueRegistry.recalc(t),A.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),A.sceneGraphService.dirtifyToRoot(t),o.dirtify()}var a=this,o=t.renderingService,s=t.renderingContext,t=t.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=t;o.hooks.init.tapPromise(c.tag,Br(Rr().mark(function t(){return Rr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:l.addEventListener(b.MOUNTED,r),l.addEventListener(b.UNMOUNTED,i),l.addEventListener(b.ATTR_MODIFIED,e),l.addEventListener(b.BOUNDS_CHANGED,n);case 4:case"end":return t.stop()}},t)}))),o.hooks.destroy.tap(c.tag,function(){l.removeEventListener(b.MOUNTED,r),l.removeEventListener(b.UNMOUNTED,i),l.removeEventListener(b.ATTR_MODIFIED,e),l.removeEventListener(b.BOUNDS_CHANGED,n),a.toSync.clear()}),o.hooks.endFrame.tap(c.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.displayObject=t,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()},c}(),lc=(sc.tag="Prepare",(Gb=Xl=Xl||{}).READY="ready",Gb.BEFORE_RENDER="beforerender",Gb.RERENDER="rerender",Gb.AFTER_RENDER="afterrender",Gb.BEFORE_DESTROY="beforedestroy",Gb.AFTER_DESTROY="afterdestroy",Gb.RESIZE="resize",Gb.DIRTY_RECTANGLE="dirtyrectangle",new Rs(b.MOUNTED)),cc=new Rs(b.UNMOUNTED),uc=new Rs(Xl.BEFORE_RENDER),hc=new Rs(Xl.RERENDER),fc=new Rs(Xl.AFTER_RENDER),dc=function(M){function t(t){var e=M.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=rl,e.frameId=void 0,e.inited=!1,e.readyPromise=void 0,e.resolveReadyPromise=void 0,e.context={},e.document=new Fs,e.document.defaultView=Wr(e),e.customElements=new Ns,t.container),r=t.canvas,i=t.offscreenCanvas,a=t.width,o=t.height,s=t.devicePixelRatio,l=t.renderer,c=t.background,u=t.cursor,h=t.document,f=t.requestAnimationFrame,d=t.cancelAnimationFrame,p=t.createImage,g=t.supportsPointerEvents,m=t.supportsTouchEvents,y=t.supportsCSSTransform,v=t.useNativeClickEvent,b=t.isTouchEvent,t=t.isMouseEvent,x=(x=n,w=Wr(e),x&&(x="string"==typeof x?x:x.id||wi++,xi[x]&&xi[x].destroy(),xi[x]=w),a),w=o,k=s;return r&&(k=1<=(k=s||ki&&window.devicePixelRatio||1)?Math.ceil(k):1,x=a||("auto"===(a=Oi(s=r,"width"))?s.offsetWidth:parseFloat(a))||r.width/k,w=o||("auto"===(a=Oi(s=r,"height"))?s.offsetHeight:parseFloat(a))||r.height/k),e.devicePixelRatio=k,e.requestAnimationFrame=null!=f?f:lo.bind(A.globalThis),e.cancelAnimationFrame=null!=d?d:co.bind(A.globalThis),e.supportsTouchEvents=null!=m?m:"ontouchstart"in A.globalThis,e.supportsPointerEvents=null!=g?g:!!A.globalThis.PointerEvent,e.isTouchEvent=null!=b?b:function(t){return e.supportsTouchEvents&&t instanceof A.globalThis.TouchEvent},e.isMouseEvent=null!=t?t:function(t){return!A.globalThis.MouseEvent||t instanceof A.globalThis.MouseEvent&&(!e.supportsPointerEvents||!(t instanceof A.globalThis.PointerEvent))},e.initRenderingContext({container:n,canvas:r,width:x,height:w,renderer:l,offscreenCanvas:i,devicePixelRatio:k,cursor:u||"default",background:c||"transparent",createImage:p,document:h,supportsCSSTransform:y,useNativeClickEvent:v}),e.initDefaultCamera(x,w),Br(Rr().mark(function t(){return Rr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.initRenderer(l);case 2:e.dispatchEvent(new Rs(Xl.READY)),e.readyPromise&&e.resolveReadyPromise();case 4:case"end":return t.stop()}},t)}))(),e}a(t,M);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 A.CameraContribution;r.setType($s.EXPLORING,Ks.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(jl,function(){n.context.renderingContext.renderReasons.add(Cl.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 Rs(Xl.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),t&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),e||this.dispatchEvent(new Rs(Xl.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===Zs.ORTHOGRAPHIC?n.setOrthographic(t/-2,t/2,e/2,e/-2,n.getNear(),n.getFar()):n.setAspect(t/e),this.dispatchEvent(new Rs(Xl.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(){var t=this;this.dispatchEvent(uc),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(hc)}),this.dispatchEvent(fc)},e.run=function(){var e=this;(function t(){e.render(),e.frameId=requestAnimationFrame(t)})()},e.initRenderer=function(){var e=Br(Rr().mark(function t(e){return Rr().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 K,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new ic,new sc,new rc,new nc([new oc])),this.loadRendererContainerModule(e),this.context.contextService=new this.context.ContextService(f({},A,this.context)),this.context.renderingService=new Yl(A,this.context),this.context.eventService=new Wl(A,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(A)})},e.setRenderer=function(){var e=Br(Rr().mark(function t(e){var n,r;return Rr().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(A)}),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(cc):(cc.target=t,this.dispatchEvent(cc,!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(lc):(lc.target=t,this.dispatchEvent(lc,!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})},Dr(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}(Is);function pc(t,e){return(pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}e=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),pc(n.prototype.constructor=n,t);var n=e.prototype;return n.rotate=function(t,e,n){if(this.relElevation=Ci(e),this.relAzimuth=Ci(t),this.relRoll=Ci(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===$s.EXPLORING){e=ie(re(),[1,0,0],Ri((this.rotateWorld?1:-1)*this.relElevation)),t=ie(re(),[0,1,0],Ri((this.rotateWorld?1:-1)*this.relAzimuth)),n=ie(re(),[0,0,1],Ri(this.relRoll)),t=ae(re(),t,e),t=ae(re(),t,n),e=Lt(ht(),t);xt(this.matrix,this.matrix,[0,0,-this.distance]),bt(this.matrix,this.matrix,e),xt(this.matrix,this.matrix,[0,0,this.distance])}else{if(90<Math.abs(this.elevation))return this;this.computeMatrix()}return this._getAxes(),this.type===$s.ORBITING||this.type===$s.EXPLORING?this._getPosition():this.type===$s.TRACKING&&this._getFocalPoint(),this._update(),this},n.pan=function(t,e){t=ji(t,e,0),e=Ft(this.position);return Ht(e,e,Vt(y(),this.right,t[0])),Ht(e,e,Vt(y(),this.up,t[1])),this._setPosition(e),this.triggerUpdate(),this},n.dolly=function(t){var e=this.forward,n=Ft(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===$s.ORBITING||this.type===$s.EXPLORING?this._getDistance():this.type===$s.TRACKING&&Ht(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},n.cancelLandmarkAnimation=function(){void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)},n.createLandmark=function(t,e){var n,e=e=void 0===e?{}:e,r=e.position,r=void 0===r?this.position:r,i=e.focalPoint,i=void 0===i?this.focalPoint:i,a=e.roll,e=e.zoom,o=new A.CameraContribution,r=(o.setType(this.type,void 0),o.setPosition(r[0],null!=(n=r[1])?n:this.position[1],null!=(n=r[2])?n:this.position[2]),o.setFocalPoint(i[0],null!=(r=i[1])?r:this.focalPoint[1],null!=(n=i[2])?n:this.focalPoint[2]),o.setRoll(null!=a?a:this.roll),o.setZoom(null!=e?e:this.zoom),{name:t,matrix:ft(o.getWorldTransform()),right:Ft(o.right),up:Ft(o.up),forward:Ft(o.forward),position:Ft(o.getPosition()),focalPoint:Ft(o.getFocalPoint()),distanceVector:Ft(o.getDistanceVector()),distance:o.getDistance(),dollyingStep:o.getDollyingStep(),azimuth:o.getAzimuth(),elevation:o.getElevation(),roll:o.getRoll(),relAzimuth:o.relAzimuth,relElevation:o.relElevation,relRoll:o.relRoll,zoom:o.getZoom()});return this.landmarks.push(r),r},n.gotoLandmark=function(e,t){var n,s,r,i,l,c,u,h,f,d,p,g,m=this,a=(void 0===t&&(t={}),an(e)?this.landmarks.find(function(t){return t.name===e}):e);a&&(n=void 0===(n=(t=sn(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,l=.01,0===s?(this.syncFromLandmark(a),i&&i()):(this.cancelLandmarkAnimation(),c=a.position,u=a.focalPoint,h=a.zoom,f=a.roll,d=r||A.EasingFunction(n),g=function(){m.setFocalPoint(u),m.setPosition(c),m.setRoll(f),m.setZoom(h),m.computeMatrix(),m.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=y(),i=y(),a=1,o=0,$t(r,m.focalPoint,u,n),$t(i,m.position,c,n),o=m.roll*(1-n)+f*n,a=m.zoom*(1-n)+h*n,m.setFocalPoint(r),m.setPosition(i),m.setRoll(o),m.setZoom(a),Jt(r,u)+Jt(i,c)<=l)?g():(m.computeMatrix(),m.triggerUpdate(),e<s&&(m.landmarkAnimationID=m.canvas.requestAnimationFrame(t)))})))},n.syncFromLandmark=function(t){this.matrix=dt(this.matrix,t.matrix),this.right=Gt(this.right,t.right),this.up=Gt(this.up,t.up),this.forward=Gt(this.forward,t.forward),this.position=Gt(this.position,t.position),this.focalPoint=Gt(this.focalPoint,t.focalPoint),this.distanceVector=Gt(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}(Rl);function gc(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 mc(t,e,n){e&&gc(t.prototype,e),n&&gc(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function yc(t,e){return(yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}A.CameraContribution=e;function vc(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(Wc?Float32Array:Array)(11),t=0;t<11;++t)w[t]=qc(.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=Uc(r,b,x);if(.001<=i){for(var a=t,o=r,s=b,l=x,c=0;c<Dc;++c){var u=Uc(o,s,l);if(0===u)return o;o-=(qc(o,s,l)-a)/u}return o}if(0===i)return r;for(var h,f,d=t,p=e,g=e+.1,m=b,y=x,v=0;0<(h=qc(f=p+(g-p)/2,m,y)-d)?g=f:p=f,Math.abs(h)>zc&&++v<Gc;);return f}return function(t){return 0===t||1===t?t:qc(r(t),e,n)}}function bc(t){return Math.pow(t,2)}function xc(t){return Math.pow(t,3)}function wc(t){return Math.pow(t,4)}function kc(t){return Math.pow(t,5)}function Mc(t){return Math.pow(t,6)}function Ec(t){return 1-Math.cos(t*Math.PI/2)}function Oc(t){return 1-Math.sqrt(1-t*t)}function Sc(t){return t*t*(3*t-2)}function _c(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 Ac(t,e){var n=(e=e=void 0===e?[]:e)[0],e=void 0===(e=e[1])?.5:e,n=on(Number(void 0===n?1:n),1,10),e=on(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 Pc(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=on(void 0===r?1:r,.1,1e3),i=on(i,.1,1e3),a=on(a,.1,1e3),e=on(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 Tc(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)(on(t,0,1)*n)/n}function Lc(t,e){var n=(e=e=void 0===e?[]:e)[0],r=e[1],i=e[2],e=e[3];return vc(n,r,i,e)(t)}function Nc(r){return function(t,e,n){return 1-r(1-t,e=void 0===e?[]:e,n)}}function Cc(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 jc(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 Rc(t){return t}var Ic=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),yc(t.prototype.constructor=t,e),n}(js),Bc=0,Fc=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=""+Bc++,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(Si)},e.addEventListener=function(t,e,n){throw new Error(Si)},e.removeEventListener=function(t,e,n){throw new Error(Si)},e.dispatchEvent=function(t){throw new Error(Si)},e.commitStyles=function(){throw new Error(Si)},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 Ic(null,this,this.currentTime,t),setTimeout(function(){n.onfinish&&n.onfinish(e)})),this._finishedFlag=!0):(this.onframe&&"running"===this.playState&&(t=new Ic(null,this,this.currentTime,t),this.onframe(t)),this._finishedFlag=!1)},mc(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}(),Dc=4,zc=1e-7,Gc=10,Wc="function"==typeof Float32Array,Hc=function(t,e){return 1-3*e+3*t},Yc=function(t,e){return 3*e-6*t},Vc=function(t){return 3*t},qc=function(t,e,n){return((Hc(e,n)*t+Yc(e,n))*t+Vc(e))*t},Uc=function(t,e,n){return 3*Hc(e,n)*t*t+2*Yc(e,n)*t+Vc(e)},o=vc(.42,0,1,1),Xc={steps:Tc,"step-start":function(t){return Tc(t,[1,"start"])},"step-end":function(t){return Tc(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Lc,ease:function(t){return Lc(t,[.25,.1,.25,1])},in:o,out:Nc(o),"in-out":Cc(o),"out-in":jc(o),"in-quad":bc,"out-quad":Nc(bc),"in-out-quad":Cc(bc),"out-in-quad":jc(bc),"in-cubic":xc,"out-cubic":Nc(xc),"in-out-cubic":Cc(xc),"out-in-cubic":jc(xc),"in-quart":wc,"out-quart":Nc(wc),"in-out-quart":Cc(wc),"out-in-quart":jc(wc),"in-quint":kc,"out-quint":Nc(kc),"in-out-quint":Cc(kc),"out-in-quint":jc(kc),"in-expo":Mc,"out-expo":Nc(Mc),"in-out-expo":Cc(Mc),"out-in-expo":jc(Mc),"in-sine":Ec,"out-sine":Nc(Ec),"in-out-sine":Cc(Ec),"out-in-sine":jc(Ec),"in-circ":Oc,"out-circ":Nc(Oc),"in-out-circ":Cc(Oc),"out-in-circ":jc(Oc),"in-back":Sc,"out-back":Nc(Sc),"in-out-back":Cc(Sc),"out-in-back":jc(Sc),"in-bounce":_c,"out-bounce":Nc(_c),"in-out-bounce":Cc(_c),"out-in-bounce":jc(_c),"in-elastic":Ac,"out-elastic":Nc(Ac),"in-out-elastic":Cc(Ac),"out-in-elastic":jc(Ac),spring:Pc,"spring-in":Pc,"spring-out":Nc(Pc),"spring-in-out":Cc(Pc),"spring-out-in":jc(Pc)},$c=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 Kc(n,r){return function(t){var e;return 1<=t?1:(t+=r*(e=1/n))-t%e}}var ys="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Zc=new RegExp("cubic-bezier\\("+ys+","+ys+","+ys+","+ys+"\\)"),Qc=/steps\(\s*(\d+)\s*\)/,Jc=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function tu(t){var e=Zc.exec(t);return e?vc.apply(void 0,e.slice(1).map(Number)):(e=Qc.exec(t))?Kc(Number(e[1]),0):(e=Jc.exec(t))?Kc(Number(e[1]),{start:1,middle:.5,end:0}[e[2]]):Xc[$c(t)]||Xc.linear}function eu(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 nu=0,ru=1,iu=2,au=3;function ou(t,e,n){c=t,i=n;var r,i,a,o,s,l=null===(l=e)?nu:(r=i.endTime,l<Math.min(i.delay,r)?ru:l>=Math.min(i.delay+c+i.endDelay,r)?iu:au),c=function(t,e,n,r,i){switch(r){case ru:return"backwards"===e||"both"===e?0:null;case au:return n-i;case iu:return"forwards"===e||"both"===e?t:null;case nu:return null}}(t,n.fill,e,l,n.delay);return null===c?null:(i="auto"===n.duration?0:n.duration,r=i,t=l,e=n.iterations,o=c,s=n.iterationStart,0===r?t!==ru&&(s+=e):s+=o/r,e=t=s,o=n.iterationStart,s=l,a=n.iterations,c=c,i=i,e=o=0!==(o=e===1/0?o%1:e%1)||s!==iu||0===a||0===c&&0!==i?o:1,s=n.iterations,a=e,c=t,i=l===iu&&s===1/0?1/0:1===a?Math.floor(c)-1:Math.floor(c),o=n.direction,t=i,l=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)?l:1-l,n.currentIteration=i,n.progress=a,n.easingFunction(a))}function su(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;lu(i)&&(a={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:tu(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,l=i[o].computedOffset,c=i[s].computedOffset,u=l,h=c;0===a&&(u=-1/0,0===c)&&(s=o),a===i.length-2&&(h=1/0,1===l)&&(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=Ll[t];if(i&&i.syntax&&i.int){i=A.styleValueRegistry.getPropertySyntax(i.syntax);if(i){o=A.enableCSSParsing?(a=A.styleValueRegistry.parseProperty(t,e,r),o=A.styleValueRegistry.parseProperty(t,n,r),a=A.styleValueRegistry.computeProperty(t,a,r),A.styleValueRegistry.computeProperty(t,o,r)):(t=i.parserWithCSSDisabled,a=t?t(e,r):e,t?t(n,r):n);var a,o,s,t=i.mixer(a,o,r);if(t)return s=cu.apply(void 0,t),function(t){return 0===t?e:1===t?n:s(t)}}}return cu(!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.setAttribute(t.property,t.interpolation(e))});else for(var t in a)lu(t)&&r.setAttribute(t,null)}}function lu(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var cu=function(e,n,r){return function(t){t=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)){for(var i=e.length,a=n.length,o=Math.max(i,a),s=[],l=0;l<o;l++)s.push(t(e[l<i?l:i-1],n[l<a?l:a-1],r));return s}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(e,n,t);return!A.enableCSSParsing&&sn(t)?t:r(t)}};var uu=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Rc,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 mc(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=tu(t),this._easing=t}}]),t}();function hu(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,l=(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),c=Number(e[0].computedOffset),u=1;u<s;u++){var h=e[u].computedOffset;if(!_(h)&&!_(c)){for(var f=1;f<u-l;f++)e[l+f].computedOffset=c+(Number(h)-c)*f/(u-l);l=u,c=Number(h)}}return e}var fu="backwards|forwards|both|none".split("|"),du="reverse|alternate|alternate-reverse".split("|");function pu(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 uu,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===fu.indexOf(n[t])||"direction"===t&&-1===du.indexOf(n[t])||(i[t]=n[t])}):i.duration=n,i}var gu=function(){function t(t,e,n){var r=this,t=(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=pu(n,!1),(this.timing.effect=this).timing.activeDuration=eu(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=hu(e,this.timing),this.interpolations=su(this.normalizedKeyframes,this.timing,this.target),A.globalThis.Proxy);this.computedTiming=t?new t(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}}):this.timing}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=ou(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=hu(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[t]=e[t]})},t}();function mu(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(mu),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 gu(t,e,n),e=new Fc(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(mu),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=[],l=[];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:l).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,l]},t}();function yu(t,e){return(yu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function vu(t,e){e=e.r;t.arc(e,e,e,0,2*Math.PI,!1)}function bu(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 xu(t,e){var n,r,i=e.x1,a=e.y1,o=e.x2,s=e.y2,l=e.defX,l=void 0===l?0:l,c=e.defY,c=void 0===c?0:c,u=e.markerStart,h=e.markerEnd,f=e.markerStartOffset,e=e.markerEndOffset,d=0,p=0,g=0,m=0,y=0;u&&Xs(u)&&f&&(n=o-i,r=s-a,y=Math.atan2(r,n),d=Math.cos(y)*(f||0),p=Math.sin(y)*(f||0)),h&&Xs(h)&&e&&(n=i-o,r=a-s,y=Math.atan2(r,n),g=Math.cos(y)*(e||0),m=Math.sin(y)*(e||0)),t.moveTo(i-l+d,a-c+p),t.lineTo(o-l+g,s-c+m)}function wu(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,l=e.markerStartOffset,c=e.markerEndOffset,e=e.path,u=e.absolutePath,h=e.segments,f=0,d=0,p=0,g=0,e=0;i&&Xs(i)&&l&&(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)*(l||0),d=Math.sin(e)*(l||0)),s&&Xs(s)&&c&&(l=(i=s.parentNode.getEndTangent())[0],s=i[1],n=l[0]-s[0],r=l[1]-s[1],e=Math.atan2(r,n),p=Math.cos(e)*(c||0),g=Math.sin(e)*(c||0));for(var m=0;m<u.length;m++){var y=u[m],v=y[0],b=u[m+1],x=0===m&&(0!==f||0!==d),w=(m===u.length-1||b&&("M"===b[0]||"Z"===b[0]))&&0!==p&&0!==g;switch(v){case"M":x?(t.moveTo(y[1]-a+f,y[2]-o+d),t.lineTo(y[1]-a,y[2]-o)):t.moveTo(y[1]-a,y[2]-o);break;case"L":w?t.lineTo(y[1]-a+p,y[2]-o+g):t.lineTo(y[1]-a,y[2]-o);break;case"Q":t.quadraticCurveTo(y[1]-a,y[2]-o,y[3]-a,y[4]-o),w&&t.lineTo(y[3]-a+p,y[4]-o+g);break;case"C":t.bezierCurveTo(y[1]-a,y[2]-o,y[3]-a,y[4]-o,y[5]-a,y[6]-o),w&&t.lineTo(y[5]-a+p,y[6]-o+g);break;case"A":var k,M,E=h[m].arcParams,O=E.cx,S=E.cy,_=E.rx,A=E.ry,P=E.startAngle,T=E.endAngle,L=E.xRotation,E=E.sweepFlag;t.ellipse?t.ellipse(O-a,S-o,_,A,L,P,T,!!(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,P,T,!!(1-E)),t.scale(1/M,1/A),t.rotate(-L),t.translate(-(O-a),-(S-o))),w&&t.lineTo(y[6]-a+p,y[7]-o+g);break;case"Z":t.closePath()}}}function ku(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,l=e.markerStartOffset,c=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,m=0,y=0,v=0,b=0;i&&Xs(i)&&l&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),g=Math.cos(b)*(l||0),m=Math.sin(b)*(l||0)),s&&Xs(s)&&c&&(n=u[h-1][0]-u[0][0],r=u[h-1][1]-u[0][1],b=Math.atan2(r,n),y=Math.cos(b)*(c||0),v=Math.sin(b)*(c||0)),t.moveTo(e+(g||y),f+(m||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 Mu(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,l=e.markerStartOffset,c=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,m=0,y=0,v=0,b=0;i&&Xs(i)&&l&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),g=Math.cos(b)*(l||0),m=Math.sin(b)*(l||0)),s&&Xs(s)&&c&&(n=u[h-2][0]-u[h-1][0],r=u[h-2][1]-u[h-1][1],b=Math.atan2(r,n),y=Math.cos(b)*(c||0),v=Math.sin(b)*(c||0)),t.moveTo(e+g,f+m);for(var x=1;x<h-1;x++){var w=u[x];t.lineTo(w[0]-a,w[1]-o)}t.lineTo(d+y,p+v)}function Eu(t,e){var n,r,i,a,o=e.radius,s=e.width,e=e.height,l=s,c=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 on(t,0,Math.min(Math.abs(l)/2,Math.abs(c)/2))}))[0],i=o[1],a=o[2],o=o[3],t.moveTo(s*r,0),t.lineTo(l-s*i,0),0!==i&&t.arc(l-s*i,e*i,i,-e*Math.PI/2,0<s?0:Math.PI,n),t.lineTo(l,c-e*a),0!==a&&t.arc(l-s*a,c-e*a,a,0<s?0:Math.PI,0<e?Math.PI/2:1.5*Math.PI,n),t.lineTo(s*o,c),0!==o&&t.arc(s*o,c-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,l,c)}A.EasingFunction=tu,A.AnimationTimeline=n;var Ou=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),yu(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){(t={})[k.CIRCLE]=vu,t[k.ELLIPSE]=bu,t[k.RECT]=Eu,t[k.LINE]=xu,t[k.POLYLINE]=Mu,t[k.POLYGON]=ku,t[k.PATH]=wu,t[k.TEXT]=void 0,t[k.GROUP]=void 0,t[k.IMAGE]=void 0,t[k.HTML]=void 0,t[k.MESH]=void 0;var t;this.context.pathGeneratorFactory=t},n.destroy=function(){delete this.context.pathGeneratorFactory},e}(Dl);function Su(){Su=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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 _u(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Au(t,e){return(Au=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Pu(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 Tu(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?Pu(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)?Pu(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 Lu=y(),Nu=y(),Cu=y(),ju=ht(),Ru=function(){function s(){var s=this;this.canvasConfig=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.isHit=function(t,e,n,r,i){var a=s.pointInPathPickerFactory[t.nodeName];if(a){var n=yt(ju,n),e=Kt(Nu,Wt(Cu,e[0],e[1],0),n),n=t.getGeometryBounds().halfExtents,o=t.parsedStyle.anchor;if(e[0]+=(o&&o[0]||0)*n[0]*2,e[1]+=(o&&o[1]||0)*n[1]*2,a(t,new Ms(e[0],e[1]),r,s.isPointInPath,i))return!0}return!1},this.isPointInPath=function(t,e,n){var t=t.offscreenCanvas.getOrCreateContext(s.canvasConfig.offscreenCanvas),r=s.pathGeneratorFactory[e.nodeName];return r&&(t.beginPath(),r(t,e.parsedStyle),t.closePath()),t.isPointInPath(n.x,n.y)}}var t=s.prototype;return t.apply=function(t,n){var r=this,e=t.config,i=t.renderingService,a=t.renderingContext,o=t.pathGeneratorFactory,t=t.pointInPathPickerFactory,l=(this.canvasConfig=e,this.pathGeneratorFactory=o,this.pointInPathPickerFactory=t,null==(e=a.root)?void 0:e.ownerDocument);i.hooks.pick.tapPromise(s.tag,function(){s=Su().mark(function t(e){return Su().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r.pick(l,e,n));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){_u(r,e,n,i,a,"next",t)}function a(t){_u(r,e,n,i,a,"throw",t)}i(void 0)})};return function(t){return e.apply(this,arguments)}}()),i.hooks.pickSync.tap(s.tag,function(t){return r.pick(l,t,n)})},t.pick=function(t,e,n){for(var r=e.topmost,i=e.position,a=i.x,i=i.y,o=Wt(Lu,a,i,0),s=[],l=Tu(t.elementsFromBBox(o[0],o[1],o[0],o[1]));!(c=l()).done;){var c=c.value,u=c.getWorldTransform();if(this.isHit(c,o,u,!1,n)){u=Ei(c);if(u){u=u.parsedStyle.clipPath;if(this.isHit(u,o,u.getWorldTransform(),!0,n)){if(r)return e.picked=[c],e;s.push(c)}}else{if(r)return e.picked=[c],e;s.push(c)}}}return e.picked=s,e},s}();function Iu(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Bu(t,e){return Math.abs(t-e)<.001}function Fu(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 Du(t){return(t+2*Math.PI)%(2*Math.PI)}Ru.tag="CanvasPicker";var zu={box:function(t,e,n,r){return Fu([t,n],[e,r])},length:Iu,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?Iu(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?Iu(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 pe(n,[0,0])?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(fe(r=[-n[1],n[0]],r),Math.abs(de([i-t,a-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Gu(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),h=u/10,f=0;f<=c;f++){var d=f*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=Iu(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,g=0;g<32&&!(h<1e-4);g++){var m=o-h,y=o+h,v=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=Iu(l[0],l[1],v[0],v[1]);0<=m&&v<s?(o=m,s=v):(m=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=Iu(l[0],l[1],m[0],m[1]),y<=1&&v<s?(o=y,s=v):h*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function Wu(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Hu(t,e,n){n=t+n-2*e;return Bu(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function Yu(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function Vu(t,e,n,r,i,a,o){var s=Wu(t,n,i,o),l=Wu(e,r,a,o),c=zu.pointAt(t,e,n,r,o),n=zu.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function qu(t,e,n,r,i,a,o){return 0===o?(Iu(t,e,n,r)+Iu(n,r,i,a)+Iu(t,e,i,a))/2:(e=(t=Vu(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),qu.apply(void 0,e)+qu.apply(void 0,n))}var Uu={box:function(t,e,n,r,i,a){var o=Hu(t,n,i)[0],s=Hu(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(Wu(t,n,i,o)),void 0!==s&&c.push(Wu(e,r,a,s)),Fu(l,c)},length:function(t,e,n,r,i,a){return qu(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return Gu([t,n,i],[e,r,a],o,s,Wu)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return Iu(t.x,t.y,o,s)},interpolationAt:Wu,pointAt:function(t,e,n,r,i,a,o){return{x:Wu(t,n,i,o),y:Wu(e,r,a,o)}},divide:Vu,tangentAngle:function(t,e,n,r,i,a,o){t=Yu(t,n,i,o),n=Yu(e,r,a,o);return Du(Math.atan2(n,t))}};function Xu(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 $u(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 Ku(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 Bu(r,0)?Bu(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Bu(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 Zu(t,e,n,r,i,a,o,s,l){var c=Xu(t,n,i,o,l),u=Xu(e,r,a,s,l),h=zu.pointAt(t,e,n,r,l),n=zu.pointAt(n,r,i,a,l),r=zu.pointAt(i,a,o,s,l),i=zu.pointAt(h.x,h.y,n.x,n.y,l),a=zu.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,h.x,h.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function Qu(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],h=0,f=c.length,d=0;d<f;d++)h+=Iu(c[d],u[d],c[(d+1)%f],u[(d+1)%f]);return h/2}t=Zu(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return Qu.apply(void 0,e)+Qu.apply(void 0,n)}var Ju={extrema:Ku,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=Ku(t,n,i,o),h=Ku(e,r,a,s),f=0;f<u.length;f++)l.push(Xu(t,n,i,o,u[f]));for(var d=0;d<h.length;d++)c.push(Xu(e,r,a,s,h[d]));return Fu(l,c)},length:function(t,e,n,r,i,a,o,s){return Qu(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return Gu([t,n,i,o],[e,r,a,s],l,c,Xu,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return Iu(t.x,t.y,l,c)},interpolationAt:Xu,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:Xu(t,n,i,o,l),y:Xu(e,r,a,s,l)}},divide:Zu,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=$u(t,n,i,o,l),n=$u(e,r,a,s,l);return Du(Math.atan2(n,t))}};function th(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function eh(t,e,n,r,i,a){return t<=i&&i<=t+n&&e<=a&&a<=e+r}function nh(t,e,n,r,i,a,o,s){var l=(Math.atan2(s-e,o-t)+2*Math.PI)%(2*Math.PI),t={x:t+n*Math.cos(l),y:e+n*Math.sin(l)};return th(t.x,t.y,o,s)<=a/2}function rh(t,e,n,r,i,a,o){var s=Math.min(t,n),l=Math.max(t,n),c=Math.min(e,r),u=Math.max(e,r),h=i/2;return s-h<=a&&a<=l+h&&c-h<=o&&o<=u+h&&zu.pointToLine(t,e,n,r,a,o)<=i/2}function ih(t,e,n,r,i){var a=t.length;if(!(a<2)){for(var o=0;o<a-1;o++)if(rh(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(rh(i[0],i[1],s[0],s[1],e,n,r))return!0}}return!1}var ah=1e-6;function oh(t){return Math.abs(t)<ah?0:t<0?-1:1}function sh(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var a,o,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(o=u,((s=[e,n])[0]-(a=c)[0])*(o[1]-a[1])==(o[0]-a[0])*(s[1]-a[1])&&Math.min(a[0],o[0])<=s[0]&&s[0]<=Math.max(a[0],o[0])&&Math.min(a[1],o[1])<=s[1]&&s[1]<=Math.max(a[1],o[1]))return!0;0<oh(c[1]-n)!=0<oh(u[1]-n)&&oh(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}function lh(t,e,n){for(var r=!1,i=0;i<t.length&&!(r=sh(t[i],e,n));i++);return r}function ch(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=th(r,r,e.x,e.y),e=Ta(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 uh(t,e,n,r){return t/(n*n)+e/(r*r)}function hh(t,e,n){var t=t.parsedStyle,r=t.rx,i=t.ry,a=t.fill,o=t.stroke,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,t=t.pointerEvents,c=e.x,e=e.y,t=Ta(t,a,o),a=t[0],o=t[1],t=((s||0)+(l||0))/2,s=(c-r)*(c-r),l=(e-i)*(e-i);return a&&o||n?uh(s,l,r+t,i+t)<=1:a?uh(s,l,r,i)<=1:!!o&&1<=uh(s,l,r-t,i-t)&&uh(s,l,r+t,i+t)<=1}function fh(t,e,n){var t=t.parsedStyle,r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,c=t.defX,u=t.defY;return!(!Ta(t.pointerEvents,t.fill,t.stroke)[1]&&!n||!s)&&rh(r,i,a,o,(s||0)+(l||0),e.x+(void 0===c?0:c),e.y+(void 0===u?0:u))}function dh(t,e,n,r,i){var a=t.parsedStyle,o=a.lineWidth,s=a.increasedLineWidthForHitTesting,l=a.stroke,c=a.fill,u=a.defX,u=void 0===u?0:u,h=a.defY,h=void 0===h?0:h,f=a.path,a=a.pointerEvents,d=f.segments,p=f.hasArc,g=f.polylines,f=f.polygons,a=Ta(a,(null==f?void 0:f.length)&&c,l),c=a[0],l=a[1],a=ya(t),m=!1;return c||n?p?r(i,t,e):lh(f,e.x+u,e.y+h)||lh(g,e.x+u,e.y+h):l||n?function(t,e,n,r,i){for(var a=!1,o=e/2,s=0;s<t.length;s++){var l=t[s],c=l.currentPoint,u=l.params,h=l.prePoint,f=l.box;if(!f||eh(f.x-o,f.y-o,f.width+e,f.height+e,n,r))switch(l.command){case"L":case"Z":if(a=rh(h[0],h[1],c[0],c[1],e,n,r))return!0;break;case"Q":if(a=Uu.pointDistance(h[0],h[1],u[1],u[2],u[3],u[4],n,r)<=e/2)return!0;break;case"C":if(a=Ju.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":l.cubicParams||(l.cubicParams=Ce(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var d=l.cubicParams,p=h,g=0;g<d.length;g+=6){var m=Ju.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=m<=e/2)return!0}}}return a}(d,(o||0)+(s||0),e.x+u,e.y+h,a):m}function ph(t,e,n){var t=t.parsedStyle,r=t.stroke,i=t.fill,a=t.lineWidth,o=t.increasedLineWidthForHitTesting,s=t.points,l=t.defX,l=void 0===l?0:l,c=t.defY,c=void 0===c?0:c,t=Ta(t.pointerEvents,i,r),i=t[0],r=!1;return r=(r=t[1]||n?ih(s.points,(a||0)+(o||0),e.x+l,e.y+c,!0):r)||!i&&!n?r:sh(s.points,e.x+l,e.y+c)}function gh(t,e,n){var t=t.parsedStyle,r=t.lineWidth,i=t.increasedLineWidthForHitTesting,a=t.points,o=t.defX,s=t.defY;return!(!Ta(t.pointerEvents,t.fill,t.stroke)[1]&&!n||!r)&&ih(a.points,(r||0)+(i||0),e.x+(void 0===o?0:o),e.y+(void 0===s?0:s),!1)}function mh(t,e,n,r,i){var a,o,s,l,c,u,h,f,d,p=t.parsedStyle,g=p.radius,m=p.fill,y=p.stroke,v=p.lineWidth,b=p.increasedLineWidthForHitTesting,x=p.width,w=p.height,p=Ta(p.pointerEvents,m,y),m=p[0],y=p[1],p=(v||0)+(b||0);return g&&g.some(function(t){return 0!==t})?(v=!1,(y||n)&&(h=b=0,l=x,u=w,g=g.map(function(t){return on(t,0,Math.min(Math.abs(x)/2,Math.abs(w)/2))}),d=p,a=e.x,o=e.y,f=g[0],s=g[1],c=g[2],g=g[3],v=rh(b+f,h,b+l-s,h,d,a,o)||rh(b+l,h+s,b+l,h+u-c,d,a,o)||rh(b+l-c,h+u,b+g,h+u,d,a,o)||rh(b,h+u-g,b,h+f,d,a,o)||nh(b+l-s,h+s,s,Math.PI,Math.PI,d,a,o)||nh(b+l-c,h+u-c,c,0,Math.PI,d,a,o)||nh(b+g,h+u-g,g,Math.PI,Math.PI,d,a,o)||nh(b+f,h+f,f,Math.PI,Math.PI,d,a,o)),v||!m&&!n?v:r(i,t,e)):(s=p/2,m&&y||n?eh(0-s,0-s,x+s,w+s,e.x,e.y):m?eh(0,0,x,w,e.x,e.y):!!y&&(c=l=0,u=x,g=w,b=p,h=e.x,f=e.y,eh(l-(d=b/2),c-d,u,b,h,f)||eh(l+u-d,c-d,b,g,h,f)||eh(l+d,c+g-d,u,b,h,f)||eh(l-d,c+d,b,g,h,f)))}var yh=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),Au(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){function t(){return!0}(e={})[k.CIRCLE]=ch,e[k.ELLIPSE]=hh,e[k.RECT]=mh,e[k.LINE]=fh,e[k.POLYLINE]=gh,e[k.POLYGON]=ph,e[k.PATH]=dh,e[k.TEXT]=t,e[k.GROUP]=null,e[k.IMAGE]=t,e[k.HTML]=null,e[k.MESH]=null;var e;this.context.pointInPathPickerFactory=e,this.addRenderingPlugin(new Ru)},n.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(Dl);function vh(){vh=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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 bh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function xh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){bh(r,e,n,i,a,"next",t)}function a(t){bh(r,e,n,i,a,"throw",t)}i(void 0)})}}function wh(){return(wh=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 kh(t,e){return(kh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Mh=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=ht(),this.dprMatrix=ht(),this.tmpMat4=ht(),this.vec3a=y(),this.vec3b=y(),this.vec3c=y(),this.vec3d=y(),this.canvasRendererPluginOptions=t}var t=r.prototype;return t.apply=function(t,c){function a(t){(t=t.target.rBushNode).aabb&&h.removedRBushNodeAABBs.push(t.aabb)}function o(t){(t=t.target.rBushNode).aabb&&h.removedRBushNodeAABBs.push(t.aabb)}function u(t,e){t.isVisible()&&!t.isCulled()&&(h.renderDisplayObject(t,e,h.context,h.restoreStack,c),h.saveDirtyAABB(t)),(t.sortable.sorted||t.childNodes).forEach(function(t){u(t,e)})}var h=this,f=(this.context=t).config,d=t.camera,l=t.renderingService,p=t.renderingContext,e=t.rBushRoot,n=t.pathGeneratorFactory,g=(this.rBush=e,this.pathGeneratorFactory=n,t.contextService),m=p.root.ownerDocument.defaultView;l.hooks.init.tapPromise(r.tag,xh(vh().mark(function t(){var e,n,r,i;return vh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:m.addEventListener(b.UNMOUNTED,a),m.addEventListener(b.CULLED,o),e=g.getDPR(),n=f.width,r=f.height,i=g.getContext(),h.clearRect(i,0,0,n*e,r*e,f.background);case 6:case"end":return t.stop()}},t)}))),l.hooks.destroy.tap(r.tag,function(){m.removeEventListener(b.UNMOUNTED,a),m.removeEventListener(b.CULLED,o)}),l.hooks.beginFrame.tap(r.tag,function(){var t=g.getContext(),e=g.getDPR(),n=f.width,r=f.height,i=h.canvasRendererPluginOptions,a=i.dirtyObjectNumThreshold,i=i.dirtyObjectRatioThreshold,o=l.getStats(),s=o.total,o=o.rendered,s=o/s;h.clearFullScreen=l.disableDirtyRectangleRendering()||a<o&&i<s,t&&(t.resetTransform?t.resetTransform():t.setTransform(1,0,0,1,0,0),h.clearFullScreen)&&h.clearRect(t,0,0,n*e,r*e,f.background)});l.hooks.endFrame.tap(r.tag,function(){var e=g.getContext(),t=g.getDPR();if(Ot(h.dprMatrix,[t,t,1]),bt(h.vpMatrix,h.dprMatrix,d.getOrthoMatrix()),h.clearFullScreen)u(p.root,e);else{t=h.safeMergeAABB.apply(h,[h.mergeDirtyAABBs(h.renderQueue)].concat(h.removedRBushNodeAABBs.map(function(t){var e=t.minX,n=t.minY,r=t.maxX,t=t.maxY,i=new xs;return i.setMinMax([e,n,0],[r,t,0]),i})));if(h.removedRBushNodeAABBs=[],xs.isEmpty(t))return void(h.renderQueue=[]);var n=h.convertAABB2Rect(t),r=n.x,i=n.y,a=n.width,n=n.height,o=Kt(h.vec3a,[r,i,0],h.vpMatrix),s=Kt(h.vec3b,[r+a,i,0],h.vpMatrix),l=Kt(h.vec3c,[r,i+n,0],h.vpMatrix),r=Kt(h.vec3d,[r+a,i+n,0],h.vpMatrix),a=Math.min(o[0],s[0],r[0],l[0]),i=Math.min(o[1],s[1],r[1],l[1]),n=Math.max(o[0],s[0],r[0],l[0]),o=Math.max(o[1],s[1],r[1],l[1]),s=Math.floor(a),r=Math.floor(i),l=Math.ceil(n-a),n=Math.ceil(o-i);e.save(),h.clearRect(e,s,r,l,n,f.background),e.beginPath(),e.rect(s,r,l,n),e.clip(),e.setTransform(h.vpMatrix[0],h.vpMatrix[1],h.vpMatrix[4],h.vpMatrix[5],h.vpMatrix[12],h.vpMatrix[13]),f.renderer.getConfig().enableDirtyRectangleRenderingDebug&&m.dispatchEvent(new Rs(Xl.DIRTY_RECTANGLE,{dirtyRect:{x:s,y:r,width:l,height:n}})),h.searchDirtyObjects(t).sort(function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}).forEach(function(t){t&&t.isVisible()&&!t.isCulled()&&h.renderDisplayObject(t,e,h.context,h.restoreStack,c)}),e.restore(),h.renderQueue.forEach(function(t){h.saveDirtyAABB(t)}),h.renderQueue=[]}h.restoreStack.forEach(function(){e.restore()}),h.restoreStack=[]}),l.hooks.render.tap(r.tag,function(t){h.clearFullScreen||h.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,i){var a,o=t.nodeName,s=r[r.length-1],s=(!s||t.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINS||(e.restore(),r.pop()),this.context.styleRendererFactory[o]),o=this.pathGeneratorFactory[o],l=t.parsedStyle.clipPath;l&&(this.applyWorldTransform(e,l),a=this.pathGeneratorFactory[l.nodeName])&&(e.save(),r.push(t),e.beginPath(),a(e,l.parsedStyle),e.closePath(),e.clip()),s&&(this.applyWorldTransform(e,t),e.save(),this.applyAttributesToContext(e,t)),o&&(e.beginPath(),o(e,t.parsedStyle),t.nodeName!==k.LINE)&&t.nodeName!==k.PATH&&t.nodeName!==k.POLYLINE&&e.closePath(),s&&(s.render(e,t.parsedStyle,t,n,this,i),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 xs;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){return t.displayObject})},t.saveDirtyAABB=function(t){var e=t.renderable,t=(e.dirtyRenderBounds||(e.dirtyRenderBounds=new xs),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.geometry.contentBounds)&&2*o.halfExtents[0]||0),i=-a*(o&&2*o.halfExtents[1]||0)),n?(dt(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,xt(this.tmpMat4,this.tmpMat4,this.vec3a),bt(this.tmpMat4,n,this.tmpMat4)):(dt(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,xt(this.tmpMat4,this.tmpMat4,this.vec3a)),bt(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 xs,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}(),Eh=(Mh.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,a){var o=e.fill,s=e.fillRule,l=e.opacity,c=e.fillOpacity,u=e.stroke,h=e.strokeOpacity,f=e.lineWidth,d=e.lineCap,p=e.lineJoin,g=e.shadowType,m=e.shadowColor,y=e.shadowBlur,v=e.filter,e=e.miterLimit,b=!_(o)&&!o.isNone,x=!_(u)&&!u.isNone&&0<f,w=0===o.alpha,v=!(!v||!v.length),m=!_(m)&&0<y,y=n.nodeName,g="inner"===g,y=x&&m&&(y===k.PATH||y===k.LINE||y===k.POLYLINE||w||g);b&&(t.globalAlpha=l*c,y||Oh(n,t,m),this.fill(t,n,o,s,r,i,a),y||this.clearShadowAndFilter(t,v,m)),x&&(t.globalAlpha=l*h,t.lineWidth=f,_(e)||(t.miterLimit=e),_(d)||(t.lineCap=d),_(p)||(t.lineJoin=p),y&&(g&&(t.globalCompositeOperation="source-atop"),Oh(n,t,!0),g)&&(this.stroke(t,n,u,r,i,a),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,v,!0)),this.stroke(t,n,u,r,i,a))},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,o){var s=this;Array.isArray(t)?t.forEach(function(t){e.fillStyle=s.getColor(t,n,e),r?e.fill(r):e.fill()}):(bo(t)&&(e.fillStyle=this.getPattern(t,n,e,i,a,o)),r?e.fill(r):e.fill())},e.stroke=function(e,n,t,r,i,a){var o=this;Array.isArray(t)?t.forEach(function(t){e.strokeStyle=o.getColor(t,n,e),e.stroke()}):(bo(t)&&(e.strokeStyle=this.getPattern(t,n,e,r,i,a)),e.stroke())},e.getPattern=function(t,e,n,r,i,a){var o,s,l,c,u,h,f;return"rect"===t.image.nodeName&&(o=(s=t.image.parsedStyle).width,s=s.height,l=r.contextService.getDPR(),c=r.config.offscreenCanvas,(u=a.offscreenCanvas.getOrCreateCanvas(c)).width=o*l,u.height=s*l,h=a.offscreenCanvas.getOrCreateContext(c),f=[],t.image.forEach(function(t){i.renderDisplayObject(t,h,r,f,a)}),f.forEach(function(){h.restore()})),this.imagePool.getOrCreatePatternSync(t,n,u,l,function(){e.renderable.dirty=!0,r.renderingService.dirtify()})},e.getColor=function(t,e,n){var r;return t.type!==Xr.LinearGradient&&t.type!==Xr.RadialGradient||(r=(e=e.getGeometryBounds())&&2*e.halfExtents[0]||1,e=e&&2*e.halfExtents[1]||1,r=this.imagePool.getOrCreateGradient(wh({type:t.type},t.value,{width:r,height:e}),n)),r},t}());function Oh(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 Sh=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=an(a)?this.imagePool.getImageSync(a):(r=r||a.width,i=i||a.height,a);if(a){Oh(n,t,!_(o)&&0<e);try{t.drawImage(a,0,0,r,i)}catch(t){}}},t}(),_h=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,l=e.letterSpacing,c=e.stroke,u=e.fill,h=e.fillOpacity,f=e.strokeOpacity,d=e.opacity,p=e.metrics,g=e.dx,m=e.dy,y=e.shadowColor,e=e.shadowBlur,v=p.font,b=p.lines,x=p.height,w=p.lineHeight,k=p.lineMetrics,p=(t.font=v,t.lineWidth=r,t.textAlign="middle"===i?"center":i,a),M=(A.enableCSSParsing||"alphabetic"!==p||(p="bottom"),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),v=(M+=m||0,1===b.length&&("bottom"===p?(p="middle",M-=.5*x):"top"===p&&(p="middle",M+=.5*x)),t.textBaseline=p,!_(y)&&0<e);Oh(n,t,v);for(var O=0;O<b.length;O++){var S=r/2+E;M+=w,_(c)||c.isNone||!r||this.drawLetterSpacing(t,b[O],k[O],i,S,M,l,h,f,d,!0),_(u)||this.drawLetterSpacing(t,b[O],k[O],i,S,M,l,h,f,d)}},e.drawLetterSpacing=function(t,e,n,r,i,a,o,s,l,c,u){if(void 0===u&&(u=!1),0===o)u?this.strokeText(t,e,i,a,l):this.fillText(t,e,i,a,s,c);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 m=d[g];u?this.strokeText(t,m,f,a,l):this.fillText(t,m,f,a,s,c),f+=p-(m=t.measureText(e.substring(g+1)).width)+o,p=m}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}(),Ah=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),kh(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){var t,e=wh({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,r=new Eh(n),n=((t={})[k.CIRCLE]=r,t[k.ELLIPSE]=r,t[k.RECT]=r,t[k.IMAGE]=new Sh(n),t[k.TEXT]=new _h,t[k.LINE]=r,t[k.POLYLINE]=r,t[k.POLYGON]=r,t[k.PATH]=r,t[k.GROUP]=void 0,t[k.HTML]=void 0,t[k.MESH]=void 0,t);this.context.defaultStyleRendererFactory=n,this.context.styleRendererFactory=n,this.addRenderingPlugin(new Mh(e))},r.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(Dl);function Ph(){Ph=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Lh(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 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(){this.context=void 0}return r.prototype.apply=function(t,i){function a(t){e.hooks.pointerWheel.call(t)}function o(t){e.hooks.click.call(t)}var s=this,e=t.renderingService,n=t.renderingContext,l=t.config,c=(this.context=t,n.root.ownerDocument.defaultView),u=function(t){e.hooks.pointerMove.call(t)},h=function(t){e.hooks.pointerUp.call(t)},f=function(t){e.hooks.pointerDown.call(t)},d=function(t){e.hooks.pointerOver.call(t)},p=function(t){e.hooks.pointerOut.call(t)},g=function(t){e.hooks.pointerCancel.call(t)};e.hooks.init.tapPromise(r.tag,Lh(Ph().mark(function t(){var r;return Ph().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=s.context.contextService.getDomElement(),i.globalThis.navigator.msPointerEnabled?(r.style.msContentZooming="none",r.style.msTouchAction="none"):c.supportsPointerEvents&&(r.style.touchAction="none"),c.supportsPointerEvents?(n=r,i.globalThis.document.addEventListener("pointermove",u,!0),n.addEventListener("pointerdown",f,!0),n.addEventListener("pointerleave",p,!0),n.addEventListener("pointerover",d,!0),i.globalThis.addEventListener("pointerup",h,!0)):(n=r,i.globalThis.document.addEventListener("mousemove",u,!0),n.addEventListener("mousedown",f,!0),n.addEventListener("mouseout",p,!0),n.addEventListener("mouseover",d,!0),i.globalThis.addEventListener("mouseup",h,!0)),c.supportsTouchEvents&&((e=r).addEventListener("touchstart",f,!0),e.addEventListener("touchend",h,!0),e.addEventListener("touchmove",u,!0),e.addEventListener("touchcancel",g,!0)),l.useNativeClickEvent&&r.addEventListener("click",o,!0),r.addEventListener("wheel",a,{passive:!0,capture:!0});case 6:case"end":return t.stop()}var e,n},t)}))),e.hooks.destroy.tap(r.tag,function(){var t,e,n=s.context.contextService.getDomElement();i.globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="",n.style.msTouchAction=""):c.supportsPointerEvents&&(n.style.touchAction=""),c.supportsPointerEvents?(t=n,i.globalThis.document.removeEventListener("pointermove",u,!0),t.removeEventListener("pointerdown",f,!0),t.removeEventListener("pointerleave",p,!0),t.removeEventListener("pointerover",d,!0),i.globalThis.removeEventListener("pointerup",h,!0)):(t=n,i.globalThis.document.removeEventListener("mousemove",u,!0),t.removeEventListener("mousedown",f,!0),t.removeEventListener("mouseout",p,!0),t.removeEventListener("mouseover",d,!0),i.globalThis.removeEventListener("mouseup",h,!0)),c.supportsTouchEvents&&((e=n).removeEventListener("touchstart",f,!0),e.removeEventListener("touchend",h,!0),e.removeEventListener("touchmove",u,!0),e.removeEventListener("touchcancel",g,!0)),l.useNativeClickEvent&&n.removeEventListener("click",o,!0),n.removeEventListener("wheel",a,!0)})},r}(),jh=(Ch.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),Nh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new Ch)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Dl));function Rh(){Rh=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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 Ih(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Bh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Ih(r,e,n,i,a,"next",t)}function a(t){Ih(r,e,n,i,a,"throw",t)}i(void 0)})}}function Fh(t,e){return(Fh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Dh=function(){function f(){this.context=void 0,this.$camera=void 0}var t=f.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===k.HTML&&(s.$camera||(s.$camera=s.createCamera(l)),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),A.nativeHTMLMap.set(e,r))}function n(t){(t=t.target).nodeName===k.HTML&&s.$camera&&(t=s.getOrCreateEl(t))&&(t.remove(),A.nativeHTMLMap.delete(t))}function r(t){var e=t.target;e.nodeName===k.HTML&&(t=t.attrName,s.updateAttribute(t,e))}function a(t){var e;(t=t.target).nodeName===k.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,l=t.camera,c=t.renderingContext,u=t.renderingService,h=(this.context=t,c.root.ownerDocument.defaultView);u.hooks.init.tapPromise(f.tag,Bh(Rh().mark(function t(){return Rh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:h.addEventListener(Xl.RESIZE,o),h.addEventListener(b.MOUNTED,e),h.addEventListener(b.UNMOUNTED,n),h.addEventListener(b.ATTR_MODIFIED,r),h.addEventListener(b.BOUNDS_CHANGED,a);case 5:case"end":return t.stop()}},t)}))),u.hooks.endFrame.tap(f.tag,function(){s.$camera&&c.renderReasons.has(Cl.CAMERA_CHANGED)&&(s.$camera.style.transform=s.joinTransformMatrix(l.getOrthoMatrix()))}),u.hooks.destroy.tap(f.tag,function(){s.$camera&&s.$camera.remove(),h.removeEventListener(Xl.RESIZE,o),h.removeEventListener(b.MOUNTED,e),h.removeEventListener(b.UNMOUNTED,n),h.removeEventListener(b.ATTR_MODIFIED,r),h.removeEventListener(b.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;an(r)?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"transformOrigin":var r=e.parsedStyle.transformOrigin;n.style["transform-origin"]=r[0].value+" "+r[1].value;break;case"width":A.enableCSSParsing?(r=e.computedStyleMap().get("width"),n.style.width=r.toString()):(r=e.parsedStyle.width,n.style.width=sn(r)?r+"px":r.toString());break;case"height":A.enableCSSParsing?(r=e.computedStyleMap().get("height"),n.style.height=r.toString()):(r=e.parsedStyle.height,n.style.height=sn(r)?r+"px":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="";xo(r)?i=r.isNone?"transparent":e.getAttribute("fill"):Array.isArray(r)?i=e.getAttribute("fill"):bo(r),n.style.background=i;break;case"stroke":r=e.parsedStyle.stroke,i="";xo(r)?i=r.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(r)?i=e.getAttribute("stroke"):bo(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}},f}(),zh=(Dh.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),Fh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new Dh)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Dl));function Gh(){Gh=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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 Wh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Hh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Wh(r,e,n,i,a,"next",t)}function a(t){Wh(r,e,n,i,a,"throw",t)}i(void 0)})}}function Yh(t,e){return(Yh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Vh="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 qh=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):ki&&(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,l,c=this.generatePatternKey(t);return c&&this.patternCache[c]?this.patternCache[c]:(l=t.image,s=t.repetition,t=t.transform,a=!1,an(l)?o=this.getImageSync(l,i):n?(o=n,a=!0):o=l,(i=o&&e.createPattern(o,s))&&(e=t?Ui($o(t)):(n=new Vh(16),Vh!=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,(l=n)[0]=1,l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[5]=1,l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[10]=1,l[11]=0,l[12]=0,l[13]=0,l[14]=0,l[15]=1,l),a&&(s=o=e,n=(t=[1/r,1/r,1])[0],l=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]*l,o[5]=s[5]*l,o[6]=s[6]*l,o[7]=s[7]*l,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]})),c&&i&&(this.patternCache[c]=i),i)},e.getOrCreateGradient=function(t,e){var r,n,i,a,o,s=this.generateGradientKey(t),l=t.type,c=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,l===Xr.LinearGradient?(n=u,i=h,f=Ri((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)):l===Xr.RadialGradient&&(a=u,o=h,f=p,n=t,l=(i=d).value,u=f.value,i.unit===g.kPercentage&&(l=i.value/100*a),f.unit===g.kPercentage&&(u=f.value/100*o),i=Math.max(Re([0,0],[l,u]),Re([0,o],[l,u]),Re([a,o],[l,u]),Re([a,0],[l,u])),n&&(n instanceof li?i=n.value:n instanceof Qr&&("closest-side"===n.value?i=Math.min(l,a-l,u,o-u):"farthest-side"===n.value?i=Math.max(l,a-l,u,o-u):"closest-corner"===n.value&&(i=Math.min(Re([0,0],[l,u]),Re([0,o],[l,u]),Re([a,o],[l,u]),Re([a,0],[l,u]))))),r=e.createRadialGradient(p=(h={x:l,y:u,r:i}).x,t=h.y,0,p,t,h.r)),r&&(c.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 an(e)?"pattern-"+e+"-"+t:"rect"===e.nodeName?"pattern-"+e.entity+"-"+t:void 0},t}(),Uh=function(){function s(){}return s.prototype.apply=function(t){function e(t){var e=t.target,t=e.nodeName,n=e.attributes;t===k.IMAGE&&(t=n.img,an(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===k.IMAGE&&"img"===n&&an(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,Hh(Gh().mark(function t(){return Gh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o.addEventListener(b.MOUNTED,e),o.addEventListener(b.ATTR_MODIFIED,n);case 2:case"end":return t.stop()}},t)}))),r.hooks.destroy.tap(s.tag,function(){o.removeEventListener(b.MOUNTED,e),o.removeEventListener(b.ATTR_MODIFIED,n)})},s}(),Xh=(Uh.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),Yh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.context.imagePool=new qh(this.context.config),this.addRenderingPlugin(new Uh)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Dl));function $h(){$h=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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 Kh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Zh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Kh(r,e,n,i,a,"next",t)}function a(t){Kh(r,e,n,i,a,"throw",t)}i(void 0)})}}function Qh(t,e){t.prototype=Object.create(e.prototype),Jh(t.prototype.constructor=t,e)}function Jh(t,e){return(Jh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var tf=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=Zh($h().mark(function t(){var e,n;return $h().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=an(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||ki&&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,ki)&&n.style&&(n.style.width=t+"px",n.style.height=e+"px"),this.renderingContext.renderReasons.add(Cl.CAMERA_CHANGED)},e.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},e.toDataURL=function(){var e=Zh($h().mark(function t(e){var n,r;return $h().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}(),ef=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}Qh(t,i);var e=t.prototype;return e.init=function(){this.context.ContextService=tf},e.destroy=function(){delete this.context.ContextService},t}(Dl),nf=function(e){function t(t){t=e.call(this,t)||this;return t.registerPlugin(new ef),t.registerPlugin(new Xh),t.registerPlugin(new Ou),t.registerPlugin(new Ah),t.registerPlugin(new jh),t.registerPlugin(new yh),t.registerPlugin(new zh),t}return Qh(t,e),t}(s);function rf(){rf=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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 af(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function of(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){af(r,e,n,i,a,"next",t)}function a(t){af(r,e,n,i,a,"throw",t)}i(void 0)})}}function sf(){return(sf=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 lf(t,e){return(lf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var cf=function(){function i(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return i.prototype.apply=function(t){function e(t){var a,o,s,l,c,e,u=t.target,h=u===p,f=h&&d.dragndropPluginOptions.isDocumentDraggable?p:u.closest&&u.closest("[draggable=true]");f&&(a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],e=function(){var e=of(rf().mark(function t(e){var n,r,i;return rf().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=Re([e.clientX,e.clientY],s),n<=d.dragndropPluginOptions.dragstartTimeThreshold||r<=d.dragndropPluginOptions.dragstartDistanceThreshold)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-c[0],e.dy=e.clientY-c[1],f.dispatchEvent(e),c=[e.clientX,e.clientY],h){t.next=21;break}return n="pointer"===d.dragndropPluginOptions.overlap?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,p.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]"))||(d.dragndropPluginOptions.isDocumentDroppable?p:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",f.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var d=this,n=t.renderingService,p=t.renderingContext.root.ownerDocument,r=p.defaultView;n.hooks.init.tapPromise(i.tag,of(rf().mark(function t(){return rf().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(i.tag,function(){r.removeEventListener("pointerdown",e)})},i}(),uf=(cf.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),lf(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new cf(sf({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},r.setOptions=function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)},e}(Dl)),hf=(ff.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},ff.prototype.once=function(t,e){return this.on(t,e,!0)},ff.prototype.emit=function(a){for(var o=this,s=[],t=1;t<arguments.length;t++)s[t-1]=arguments[t];function e(t){for(var e,n,r=t.length,i=0;i<r;i++)t[i]&&(n=(e=t[i]).callback,e.once&&(t.splice(i,1),0===t.length&&delete o._events[a],r--,i--),n.apply(o,s))}var n=this._events[a]||[],r=this._events["*"]||[];e(n),e(r)},ff.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},ff.prototype.getEvents=function(){return this._events},ff);function ff(){this._events={}}const df=()=>[["cartesian"]],pf=(df.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),gf=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=pf(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]},mf=(gf.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]]),yf=(mf.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),vf=(yf.props={transform:!0},t=>{[t={}]=[t],e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};var{startAngle:e,endAngle:t,innerRadius:n,outerRadius:r}=Object.assign(Object.assign({},e),t);return[...yf(),...gf({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r})]}),bf=(vf.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),xf=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=bf(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...gf({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]},wf=(xf.props={},()=>[["parallel",0,1,0,1]]),kf=(wf.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]]),Mf=(kf.props={transform:!0},t=>{var{startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1}=t;return[...wf(),...gf({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]}),Ef=(Mf.props={},({value:e})=>t=>t.map(()=>e)),Of=(Ef.props={},({value:e})=>t=>t.map(e)),Sf=(Of.props={},({value:e})=>t=>t.map(t=>t[e])),_f=(Sf.props={},({value:t})=>()=>t);function Af(t,e){return t.parent===e.parent?1:2}function Pf(t,e){return t+e.x}function Tf(t,e){return Math.max(t,e.y)}function Lf(){var s=Af,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(Pf,0)/e.length,t.y=1+n.reduce(Tf,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function Nf(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 Cf(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Rf)):void 0===e&&(e=jf);for(var n,r,i,a,o,t=new Ff(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 Ff(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(Bf)}function jf(t){return t.children}function Rf(t){return Array.isArray(t)?t[1]:null}function If(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Bf(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function Ff(t){this.data=t,this.depth=this.height=0,this.parent=null}function Df(t){return null==t?null:zf(t)}function zf(t){if("function"!=typeof t)throw new Error;return t}function Gf(){return 0}function Wf(t){return function(){return t}}_f.props={},Ff.prototype=Cf.prototype={constructor:Ff,count:function(){return this.eachAfter(Nf)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return Cf(this).eachBefore(If)},[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 Hf=4294967296;function Yf(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&&qf(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 Xf(t[0],t[1]);case 3:return $f(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(Uf(e,t))return[e];for(n=0;n<t.length;++n)if(Vf(e,t[n])&&Uf(Xf(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(Vf(Xf(t[n],t[r]),e)&&Vf(Xf(t[n],e),t[r])&&Vf(Xf(t[r],e),t[n])&&Uf($f(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function Vf(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 qf(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 Uf(t,e){for(var n=0;n<e.length;++n)if(!qf(t,e[n]))return;return 1}function Xf(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function $f(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,h=i-o,f=i-l,d=e-t,p=n-t,g=r*r+i*i-t*t,a=g-a*a-o*o+e*e,o=g-s*s-l*l+n*n,e=u*h-c*f,g=(h*o-f*a)/(2*e)-r,s=(f*d-h*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,f=s*s+n*n-1,h=2*(t+g*s+l*n),a=g*g+l*l-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+l+n*o,r:o}}function Kf(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Zf(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 Qf(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 Jf(t){this._=t,this.next=null,this.previous=null}function td(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,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;Kf(r,d,i=t[2]),d=new Jf(d),r=new Jf(r),i=new Jf(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){Kf(d._,r._,i=t[l]),i=new Jf(i),c=r.next,u=d.previous,h=r._.r,f=d._.r;do{if(h<=f){if(Zf(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}h+=c._.r,c=c.next}else{if(Zf(u._,i._)){((d=u).next=r).previous=d,--l;continue t}f+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=Qf(d);(i=i.next)!==r;)(s=Qf(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=Yf(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function ed(t){return Math.sqrt(t.value)}function nd(){var n=null,r=1,i=1,a=Gf;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Hf)/Hf}();return t.x=r/2,t.y=i/2,n?t.eachBefore(rd(n)).eachAfter(id(a,.5,e)).eachBefore(ad(1)):t.eachBefore(rd(ed)).eachAfter(id(Gf,1,e)).eachAfter(id(a,t.r/Math.min(r,i),e)).eachBefore(ad(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=Df(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:Wf(+t),e):a},e}function rd(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function id(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=td(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function ad(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 od(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 sd(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var ld={depth:-1},cd={},ud={};function hd(t){return t.id}function fd(t){return t.parentId}function dd(){var m,y=hd,v=fd;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=y,h=v,f=new Map;if(null!=m){const p=c.map((t,e)=>{t=m(t,e,n),e=(t=""+t).length;return"/"===(t=gd(t,e-1)&&!gd(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(pd);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(pd(r)),c.push(ud));u=(t,e)=>p[e],h=(t,e)=>g[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new Ff(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,f.set(l,f.has(l)?cd:o)),null!=(s=h(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=f.get(s)))throw new Error("missing: "+s);if(a===cd)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!=m){for(;i.data===ud&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===ud;--t)o.data=null}if(i.parent=ld,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(Bf),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(y=Df(t),e):y},e.parentId=function(t){return arguments.length?(v=Df(t),e):v},e.path=function(t){return arguments.length?(m=Df(t),e):m},e}function pd(t){let e=t.length;if(e<2)return"";for(;1<--e&&!gd(t,e););return t.slice(0,e)}function gd(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function md(t,e){return t.parent===e.parent?1:2}function yd(t){var e=t.children;return e?e[0]:t.t}function vd(t){var e=t.children;return e?e[e.length-1]:t.t}function bd(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 xd(){var f=md,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new bd(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 bd(r[i],i)),n.parent=e;return(t.parent=new bd(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=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function 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,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+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],l=i.m,c=a.m,u=o.m,h=s.m;o=vd(o),i=yd(i),o&&i;)s=yd(s),(a=vd(a)).a=t,0<(r=o.z+u-i.z-l+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),l+=r,c+=r),u+=o.m,l+=i.m,h+=s.m,c+=a.m;o&&!vd(a)&&(a.t=o,a.m+=u-c),i&&!yd(s)&&(s.t=i,s.m+=l-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*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(f=t,e):f},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function wd(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}bd.prototype=Object.create(Ff.prototype);r=(1+Math.sqrt(5))/2;function kd(t,e,n,r,i,a){for(var o,s,l,c,u,h,f,d,p,g,m,y=[],v=e.children,b=0,x=0,w=v.length,k=e.value;b<w;){for(l=i-n,c=a-r;!(u=v[x++].value)&&x<w;);for(m=(h=f=u)*u*(g=Math.max(c/l,l/c)/(k*t)),p=Math.max(f/m,m/h);x<w;++x){if(u+=s=v[x].value,s<h&&(h=s),f<s&&(f=s),m=u*u*g,p<(d=Math.max(f/m,m/h))){u-=s;break}p=d}y.push(o={value:u,dice:l<c,children:v.slice(b,x)}),o.dice?sd(o,n,r,i,k?r+=c*u/k:a):wd(o,n,r,k?n+=l*u/k:i,a),k-=u,b=x}return y}var Md=function e(a){function t(t,e,n,r,i){kd(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(r);function Ed(t,e,n,r,i){var a,o,g=t.children,s=g.length,m=new Array(s+1);for(m[0]=o=a=0;a<s;++a)m[a+1]=o+=g[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=g[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=m[e],c=r/2+l,u=e+1,h=n-1;for(;u<h;){var f=u+h>>>1;m[f]<c?u=1+f:h=f}c-m[u-1]<m[u]-c&&e+1<u&&--u;var l=m[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function Od(t,e,n,r,i){(1&t.depth?wd:sd)(t,e,n,r,i)}var Sd=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,h=a.length,f=t.value;++u<h;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?sd(o,e,n,r,f?n+=(i-n)*o.value/f:i):wd(o,e,n,f?e+=(r-e)*o.value/f:r,i),f-=o.value}else t._squarify=a=kd(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(r);function _d(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 Ad(t={}){return[..._d(t),{name:"title",scale:"identity"}]}function Pd(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function Td(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function Ld(t={}){return _d(t)}function Nd(){return[{type:"maybeKey"}]}function Cd(t,e){return t.getBandWidth(t.invert(e))}function jd(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:h=r,bandOffsetY:f=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),g=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?Cd(l,a[e]):0;var r=p?Cd(c,o[e]):0,e=g&&s?(Cd(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+h*n+e,i+f*r]}:t=>t}function Rd(t){return parseFloat(t)/100}function Id(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?Rd(e)*o:+e,"string"==typeof t?Rd(t)*s:+t]]})]}function Bd(e){return"function"==typeof e?e:t=>t[e]}function Fd(t,e){return Array.from(t,Bd(e))}function Dd(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=Fd(t,e),o=Fd(t,n),s=Fd(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 zd(t,e){return t.getBandWidth(t.invert(e))}const Gd=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=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=zd(c,a[t]),n=e*(u?zd(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};Gd.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...Nd(),{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...Td()],interaction:{shareTooltip:!0}};const Wd=()=>(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 Hd(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Yd(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=Hd,o=(t,e)=>Hd(n(t),e),(t,e)=>n(t)-e):(a=n===Hd||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Vd,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 Vd(){return 0}function*qd(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)}}Wd.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Nd(),{type:"maybeZeroY1"}],postInference:[...Td()],interaction:{shareTooltip:!0}};Bl=Yd(Hd);const Ud=Bl.right,Xd=Bl.left,$d=Yd(function(t){return null===t?NaN:+t}).center;function Kd(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 Zd(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 Qd(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 Jd{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 tp 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(ep(this,t))}has(t){return super.has(ep(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 ep({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function np(t){return t}function rp(t,...e){return op(t,np,np,e)}function ip(t,e,...n){return op(t,np,e,n)}function ap(t,e,...n){return op(t,Array.from,e,n)}function op(t,u,h,f){return function t(e,n){if(n>=f.length)return h(e);var r=new tp,i=f[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function sp(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=cp(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>cp(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(lp(n))}function lp(r=Hd){if(r===Hd)return cp;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 cp(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var up=Array.prototype.slice;function hp(t){return()=>t}const fp=Math.sqrt(50),dp=Math.sqrt(10),pp=Math.sqrt(2);function gp(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),r=r/Math.pow(10,i),r=r>=fp?10:r>=dp?5:r>=pp?2:1;let a,o,s;return i<0?(s=Math.pow(10,-i)/r,a=Math.round(t*s),o=Math.round(e*s),a/s<t&&++a,o/s>e&&--o,s=-s):(s=Math.pow(10,i)*r,a=Math.round(t/s),o=Math.round(e/s),a*s<t&&++a,o*s>e&&--o),o<a&&.5<=n&&n<2?gp(t,e,2*n):[a,o,s]}function mp(t,e,n){return gp(t=+t,e=+e,n=+n)[2]}function yp(t){return Math.max(1,Math.ceil(Math.log(Kd(t))/Math.LN2)+1)}function vp(){var y=np,v=Qd,b=yp;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=y(t[a],a,t);var o=v(i),s=o[0],l=o[1],c=b(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(v===Qd&&([s,l]=function(t,e,n){let r;for(;;){var i=mp(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(s,l,u)),(c=function(t,e,n){if(!(0<(n=+n)))return[];if((t=+t)===(e=+e))return[t];var r=e<t,[i,a,o]=r?gp(e,t,n):gp(t,e,n);if(!(i<=a))return[];var s=a-i+1,l=new Array(s);if(r)if(o<0)for(let t=0;t<s;++t)l[t]=(a-t)/-o;else for(let t=0;t<s;++t)l[t]=(a-t)*o;else if(o<0)for(let t=0;t<s;++t)l[t]=(i+t)/-o;else for(let t=0;t<s;++t)l[t]=(i+t)*o;return l}(s,l,u))[0]<=s&&(n=mp(s,l,u)),c[c.length-1]>=l)if(l<=o&&v===Qd){const n=mp(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var h=c.length,f=0,d=h;c[f]<=s;)++f;for(;c[d-1]>l;)--d;(f||d<h)&&(c=c.slice(f,d),h=d-f);var p,g,m=new Array(h+1);for(a=0;a<=h;++a)(p=m[a]=[]).x0=0<a?c[a-1]:s,p.x1=a<h?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&m[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<=l&&(g=Math.floor((s-e)*n),m[Math.min(h,g+(c[g]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&m[Ud(c,e,0,h)].push(t[a]);return m}return e.value=function(t){return arguments.length?(y="function"==typeof t?t:hp(t),e):y},e.domain=function(t){return arguments.length?(v="function"==typeof t?t:hp([t[0],t[1]]),e):v},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:hp(Array.isArray(t)?up.call(t):t),e):b},e}function bp(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 xp(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 wp(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 kp(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 Mp(n,r,i=0,a=1/0,o){if(r=Math.floor(r),i=Math.floor(Math.max(0,i)),a=Math.floor(Math.min(n.length-1,a)),i<=r&&r<=a)for(o=void 0===o?cp:lp(o);i<a;){600<a-i&&(s=a-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),u=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1),Mp(n,r,Math.max(i,Math.floor(r-l*c/s+u)),Math.min(a,Math.floor(r+(s-l)*c/s+u)),o));var s,l,c,u,h=n[r];let t=i,e=a;for(Ep(n,i,r),0<o(n[a],h)&&Ep(n,i,a);t<e;){for(Ep(n,t,e),++t,--e;o(n[t],h)<0;)++t;for(;0<o(n[e],h);)--e}0===o(n[i],h)?Ep(n,i,e):Ep(n,++e,a),e<=r&&(i=e+1),r<=e&&(a=e-1)}return n}function Ep(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Op(t,e,n){var r;if((n=(t=Float64Array.from(qd(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?wp(t):1<=e?bp(t):(n=(n-1)*e,(r=bp(Mp(t,e=Math.floor(n)).subarray(0,e+1)))+(wp(t.subarray(e+1))-r)*(n-e))}function Sp(r,t,i){if((i=(r=Float64Array.from(qd(r,i))).length)&&!isNaN(t=+t)){if(t<=0||i<2)return kp(r);if(1<=t)return xp(r);t=Math.floor((i-1)*t),i=Mp(Uint32Array.from(r,(t,e)=>e),t,0,i-1,(t,e)=>cp(r[t],r[e]));{var i=i.subarray(0,t+1),a=t=>r[t];let e,n=!1;if(1===a.length){let t;for(const s of i){var o=a(s);(n?0<Hd(o,t):0===Hd(o,o))&&(e=s,t=o,n=!0)}}else for(const l of i)(n?0<a(l,e):0===a(l,l))&&(e=l,n=!0);return e}}}function _p(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 Ap(t,e){return Op(t,.5,e)}function Pp(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function Tp(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 Lp(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 Np(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function Cp(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function jp(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function Rp(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function Ip(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function Bp(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function Fp(t){return Rp(t)||Cp(t)}function Dp(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[+t,+e]}function zp(t,e=!0){var t=t.getOptions()["transformations"],[,t,n]=t.find(t=>"polar"===t[0]);return e?[180*+t/Math.PI,180*+n/Math.PI]:[t,n]}const Gp=(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],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},Wp=(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})]},Hp=()=>(t,e,n,r)=>{return(Ip(r)?Wp:Gp)(t,e,n,r)};Hp.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...Nd(),{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...Td(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Yp=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[h,f]=o.getSize(),d=jd(e,n,g),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/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))])]};Yp.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,channels:[...Ad({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:[...Nd(),{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[{type:"maybeSize"},...Pd()]};const Vp=s=>{const{cartesian:l=!1}=s;return l?Id:(t,e,n,r)=>{if(l)return Id(t,0,n,r);const{x:i,y:a}=n,o=jd(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Vp.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...Nd(),{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...Pd()]};const qp=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};qp.props={defaultShape:"cell",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...Nd(),{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...Pd()]};const Up=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,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],+l[i]])}return r}),n]};Up.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["area","smooth","hvh","hv","vh"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...Nd(),{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...Td()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Xp=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=jd(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};Xp.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Nd(),{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...Pd()]};const $p=s=>{var t=s["cartesian"];return t?Id:(t,e,n,r)=>{const{x:i,y:a}=n,o=jd(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};$p.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...Nd(),{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...Pd()]};const Kp=()=>(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]};Kp.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Nd()],postInference:[...Pd()]};const Zp=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:h,y3:f,y4:d,series:p}=n,g=e.x,m=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+l[t])),n=e*(m?m.getBandWidth(m.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+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))})]},Qp=(Zp.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...Nd(),{type:"maybeZeroX"}],postInference:[...Td()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});Qp.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...Nd()],postInference:[...Pd()]};const Jp=()=>(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))})]};Jp.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...Ld({shapes:["line"]}),{name:"y",required:!0}],preInference:[...Nd(),{type:"maybeTupleY"}],postInference:[]};const t0=()=>(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))})]};t0.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...Ld({shapes:["line"]}),{name:"x",required:!0}],preInference:[...Nd(),{type:"maybeTupleX"}],postInference:[]};const e0=(...t)=>Xp(...t);function n0(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 r0(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=n0("x",r,n,e.x),o=n0("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))})]}}e0.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,channels:[...Ld({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Nd()],postInference:[]};const i0=()=>r0();i0.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...Ld({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Nd()],postInference:[]};const a0=()=>r0({extendY:!0});a0.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...Ld({shapes:["range"]}),{name:"x",required:!0}],preInference:[...Nd()],postInference:[]};const o0=()=>r0({extendX:!0});function s0(t){return t.target.depth}function l0(t,e){return t.sourceLinks.length?t.depth:e-1}function c0(t){return function(){return t}}function u0(t,e){return f0(t.source,e.source)||t.index-e.index}function h0(t,e){return f0(t.target,e.target)||t.index-e.index}function f0(t,e){return t.y0-e.y0}function d0(t){return t.value}function p0(t){return t.index}function g0(t){return t.nodes}function m0(t){return t.links}function y0(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function v0({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 b0(){let x=0,w=0,k=1,M=1,E=24,O=8,S,_=p0,A=l0,P,T,L,N=g0,C=m0,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=y0(g,n)),"object"!=typeof r&&(r=t.target=y0(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 m of t)m.value=void 0===m.fixedValue?Math.max(Lp(m.sourceLinks,d0),Lp(m.targetLinks,d0)):m.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(P){var s,l=Math.max(bp(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=P.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(bp(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(T)for(const o of r)o.sort(T);return r}(e),t=(S=Math.min(O,(M-w)/(bp(u,t=>t.length)-1)),u),h=wp(t,t=>(M-w-(t.length-1)*S)/Lp(t,d0));for(const y of t){let e=w;for(const v of y){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)/(y.length+1);for(let t=0;t<y.length;++t){var f=y[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(h0),n.sort(u0)}(y)}for(let t=0;t<j;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/j);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===T&&o.sort(f0),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 c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===T&&o.sort(f0),o.length&&R(o,i)}}(u,d,p)}return v0(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 I({sourceLinks:t,targetLinks:e}){if(void 0===L){for(const{source:{sourceLinks:t}}of e)t.sort(h0);for(const{target:{targetLinks:e}}of t)e.sort(u0)}}return e.update=function(t){return v0(t),t},e.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:c0(t),e):_},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:c0(t),e):A},e.nodeDepth=function(t){return arguments.length?(P=t,e):P},e.nodeSort=function(t){return arguments.length?(T=t,e):T},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:c0(t),e):N},e.links=function(t){return arguments.length?(C="function"==typeof t?t:c0(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}o0.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...Ld({shapes:["range"]}),{name:"y",required:!0}],preInference:[...Nd()],postInference:[]};const x0={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},w0={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?wp(t.sourceLinks,s0)-1:0},justify:l0};const k0=h=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},x0,h),l=b0().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?w0[n]||l0:"function"==c?n:l0).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function M0(t){return t}function E0(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function O0(t=""){throw new Error(t)}function S0(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 _0(t){return null!=t&&!Number.isNaN(t)}function rt(t,e){return A0(t,e)||{}}function A0(t,n){t=Object.entries(t||{}).filter(([t])=>t.startsWith(n)).map(([t,e])=>[un(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function P0(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}function T0(t){return!("object"!=typeof t||t instanceof Date||null===t||Array.isArray(t))}function L0(t){return null===t||!1===t}function N0(t,e,n={},r=!1){return L0(t)||Array.isArray(t)&&r?t:(r=rt(t,e),nt(n,r))}function C0(t,e={}){return!L0(t)&&!Array.isArray(t)&&j0(t)?nt(e,t):t}function j0(t){var e;return 0===Object.keys(t).length||({title:t,items:e}=t,void 0!==t)||void 0!==e}function R0(t,e){return"object"==typeof t?rt(t,e):t}k0.props={};const I0=v=>{const b={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},x={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},w={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},k={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={},tooltip:l={}}=v,{links:t,nodes:c}=Dd(t,e),u=rt(e,"node"),e=rt(e,"link"),{key:h=t=>t.key,color:f=h}=u,{links:i,nodes:t}=k0(Object.assign(Object.assign(Object.assign({},b),{nodeId:Bd(h)}),i))({links:t,nodes:c});const d=rt(r,"label"),{text:p=h,spacing:g=5}=d,m=et(d,["text","spacing"]),y=Bd(h);c=N0(l,"node",{title:y,items:[{field:"value"}]},!0),h=N0(l,"link",{title:"",items:[t=>({name:"source",value:y(t.source)}),t=>({name:"target",value:y(t.target)})]});return[nt({},x,{data:t,encode:Object.assign(Object.assign({},u),{color:f}),scale:n,style:rt(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},k),{text:p,dx:t=>t.x[0]<.5?g:-g}),m),...a],tooltip:c,animate:R0(s,"node"),axis:!1}),nt({},w,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa",strokeWidth:0},rt(r,"link")),tooltip:h,animate:R0(s,"link")})]}},B0=(I0.props={},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);B0.props={defaultShape:"path",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[...Nd()],postInference:[]};const F0=t=>t?parseInt(t):0;function D0(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||F0(t.width),e=e.clientHeight||F0(t.height),{width:(i={width:i-(F0(t.paddingLeft)+F0(t.paddingRight)),height:e-(F0(t.paddingTop)+F0(t.paddingBottom))}).width,height:i.height}):{width:n,height:r}}function z0(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:h=u,insetRight:f=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-h-f,height:t-a-n-c-o-d-u}}function G0(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,h,f,d,n=function(t,e){var n={treemapBinary:Ed,treemapDice:sd,treemapSlice:wd,treemapSliceDice:Od,treemapSquarify:Md,treemapResquarify:Sd};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?dd().path(p):dd():Cf)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(m),l=[0],i&&t.eachBefore(od),t}function m(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=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:Bd(r)(t)).sort(e.sort):p.count(),o=Md,i=!1,s=a=1,l=[0],d=f=h=u=c=Gf,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=zf(t),g):o},g.padding=function(t){return arguments.length?g.paddingInner(t).paddingOuter(t):g.paddingInner()},g.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:Wf(+t),g):c},g.paddingOuter=function(t){return arguments.length?g.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):g.paddingTop()},g.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:Wf(+t),g):u},g.paddingRight=function(t){return arguments.length?(h="function"==typeof t?t:Wf(+t),g):h},g.paddingBottom=function(t){return arguments.length?(f="function"==typeof t?t:Wf(+t),g):f},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:Wf(+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 W0=h=>t=>{var{width:t,height:e}=z0(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[],tooltip:l={}}=h,c=et(h,["data","encode","scale","style","layout","labels","tooltip"]),u={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=G0(n,nt({},u,o),r),n=rt(a,"label");return[nt({},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}),n),...s]},c),{tooltip:C0(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]},H0=(W0.props={},h=>t=>{var{width:t,height:e}=z0(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[],tooltip:l={}}=h,c=et(h,["data","encode","scale","style","layout","labels","tooltip"]),u={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=(Ke(t)?dd().path(e.path):Cf)(t);return r?n.sum(t=>Bd(r)(t)).sort(e.sort):n.count(),nd().size(e.size).padding(e.padding)(n),n.descendants()})(n,nt({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),nt({},u.encode,r)),t=rt(a,"label");return[nt({},u,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}),t),...s]},c),{tooltip:C0(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]});function Y0(t,e){return wp(t,t=>e[t])}function V0(t,e){return bp(t,t=>e[t])}function q0(t,e){const n=2.5*U0(t,e)-1.5*$0(t,e);return wp(t,t=>e[t]>=n?e[t]:NaN)}function U0(t,e){return Op(t,.25,t=>e[t])}function X0(t,e){return Op(t,.5,t=>e[t])}function $0(t,e){return Op(t,.75,t=>e[t])}function K0(t,e){const n=2.5*$0(t,e)-1.5*U0(t,e);return bp(t,t=>e[t]<=n?e[t]:NaN)}function Z0(){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=q0(t,i),n=K0(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}H0.props={};const Q0=h=>()=>{var t,{data:e,encode:n,style:r={},tooltip:i={},animate:a}=h,o=et(h,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,r=et(r,["point"]),l=n["y"],l={y:l,y1:l,y2:l,y3:l,y4:l},c={y1:U0,y2:X0,y3:$0},u=N0(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),i=N0(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});return s?(s=rt(r,"box"),t=rt(r,"point"),[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:q0},c),{y4:K0})],encode:Object.assign(Object.assign({},n),l),style:s,tooltip:u,animate:R0(a,"box")},o),{type:"point",data:e,transform:[{type:Z0}],encode:n,style:Object.assign({},t),tooltip:i,animate:R0(a,"point")}]):[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:Y0},c),{y4:V0})],encode:Object.assign(Object.assign({},n),l),style:r,tooltip:u},o)]},J0=(Q0.props={},s=>{var t=s["cartesian"];return t?Id:(t,e,n,r)=>{const{x:i,y:a}=n,o=jd(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function tg(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,h,f,d=t._root,p={data:r},g=t._x0,m=t._y0,y=t._x1,v=t._y1;if(d){for(;d.length;)if((c=e>=(a=(g+y)/2))?g=a:y=a,(u=n>=(o=(m+v)/2))?m=o:v=o,!(d=(i=d)[h=u<<1|c]))return i[h]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[h]=p:t._root=p;else{for(;i=i?i[h]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+y)/2))?g=a:y=a,(u=n>=(o=(m+v)/2))?m=o:v=o,(h=u<<1|c)==(f=(o<=l)<<1|a<=s););i[f]=d,i[h]=p}}else t._root=p}return t}function eg(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function ng(t){return t[0]}function rg(t){return t[1]}function ig(t,e,n){e=new ag(null==e?ng:e,null==n?rg:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function ag(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}J0.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Nd(),{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};cs=ig.prototype=ag.prototype;function sg(t){return function(){return t}}function lg(t){return 1e-6*(t()-.5)}function cg(t){return t.index}function ug(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function hg(c){var u,h,a,o,f,d,s=cg,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=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||lg(d),o=i.y+i.vy-r.y-r.vy||lg(d),a*=s=((s=Math.sqrt(a*a+o*o))-h[l])/s*t*u[l],o*=s,i.vx-=a*(s=f[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=ug(r,t.source)),"object"!=typeof t.target&&(t.target=ug(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=c[i],f[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),h=new Array(n),g()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function g(){if(a)for(var t=0,e=c.length;t<e;++t)h[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:sg(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:sg(+t),g(),e):r},e}cs.copy=function(){var t,e,n=new ag(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},cs.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return tg(this.cover(e,n),e,n,t)},cs.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)tg(this,i[u],a[u],t[u]);return this},cs.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},cs.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},cs.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]]},cs.find=function(t,e,n){var r,i,a,o,s,l,c,u,h=this._x0,f=this._y0,d=this._x1,p=this._y1,g=[],m=this._root;for(m&&g.push(new eg(m,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();)!(m=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<h||(i=r.y1)<f||(m.length?(g.push(new eg(m[3],a=(s+o)/2,c=(l+i)/2,o,i),new eg(m[2],s,c,a,i),new eg(m[1],a,l,o,c),new eg(m[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=g[g.length-1],g[g.length-1]=g[g.length-1-i],g[g.length-1-i]=r)):(l=(o=t-+this._x.call(null,m.data))*o+(s=e-+this._y.call(null,m.data))*s)<n&&(h=t-(c=Math.sqrt(n=l)),f=e-c,d=t+c,p=e+c,u=m.data));return u},cs.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,h,f=this._root,d=this._x0,p=this._y0,g=this._x1,m=this._y1;if(f){if(f.length)for(;;){if((l=a>=(s=(d+g)/2))?d=s:g=s,(c=o>=(s=(p+m)/2))?p=s:m=s,!(f=(e=f)[u=c<<1|l]))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},cs.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},cs.root=function(){return this._root},cs.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},cs.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new eg(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new eg(e,o,s,i,a)),(e=c[2])&&l.push(new eg(e,n,s,o,a)),(e=c[1])&&l.push(new eg(e,o,r,i,s)),e=c[0])&&l.push(new eg(e,n,r,o,s));return this},cs.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new eg(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,h=e.node;h.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=h[0])&&n.push(new eg(i,a,o,c,u)),(i=h[1])&&n.push(new eg(i,c,o,s,u)),(i=h[2])&&n.push(new eg(i,a,u,c,l)),i=h[3])&&n.push(new eg(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},cs.x=function(t){return arguments.length?(this._x=t,this):this._x},cs.y=function(t){return arguments.length?(this._y=t,this):this._y};var fg={value:()=>{}};function dg(){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 pg(r)}function pg(t){this._=t}function gg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=fg,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}pg.prototype=dg.prototype={constructor:pg,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]=gg(i[n],t.name,e);else if(null==e)for(n in i)i[n]=gg(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 pg(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 mg,yg,vg=0,bg=0,xg=0,wg=1e3,kg=0,Mg=0,Eg=0,Og="object"==typeof performance&&performance.now?performance:Date,Sg="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function _g(){return Mg||(Sg(Ag),Mg=Og.now()+Eg)}function Ag(){Mg=0}function Pg(){this._call=this._time=this._next=null}function Tg(t,e,n){var r=new Pg;return r.restart(t,e,n),r}function Lg(){Mg=(kg=Og.now())+Eg,vg=bg=0;try{_g(),++vg;for(var t,e=mg;e;)0<=(t=Mg-e._time)&&e._call.call(void 0,t),e=e._next;--vg}finally{for(var n,r,i=mg,a=1/(vg=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:mg=r);yg=n,Cg(a),Mg=0}}function Ng(){var t=Og.now(),e=t-kg;wg<e&&(Eg-=e,kg=t)}function Cg(t){vg||(bg=bg&&clearTimeout(bg),24<t-Mg?(t<1/0&&(bg=setTimeout(Lg,t-Og.now()-Eg)),xg=xg&&clearInterval(xg)):(xg||(kg=Og.now(),xg=setInterval(Ng,wg)),vg=1,Sg(Lg)))}Pg.prototype=Tg.prototype={constructor:Pg,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?_g():+n)+(null==e?0:+e),this._next||yg===this||(yg?yg._next=this:mg=this,yg=this),this._call=t,this._time=n,Cg()},stop:function(){this._call&&(this._call=null,this._time=1/0,Cg())}};const jg=4294967296;function Rg(t){return t.x}function Ig(t){return t.y}var Bg=10,Fg=Math.PI*(3-Math.sqrt(5));function Dg(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,h=new Map,t=Tg(i),n=dg("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%jg)/jg}();function i(){f(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function f(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,h.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=Bg*Math.sqrt(.5+r),e=r*Fg,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:f,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),h.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,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=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function zg(t,e,n){var i,l,c,u,h,r,f,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,I=(r=sg(-30),d=(f=1)/0,p=.81,g.initialize=function(t,e){i=t,c=e,B()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:sg(+t),B(),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=ig(i,Rg,Ig).visitAfter(F);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function B(){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 F(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-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=lg(c))*i),0===a&&(s+=(a=lg(c))*a),s<f&&(s=Math.sqrt(f*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=lg(c))*i),0===a&&(s+=(a=lg(c))*a),s<f)&&(s=Math.sqrt(f*s));t.data!==l&&(o=h[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var m,y,v,b,x,w,k,M,E,O,S,_,A,P,n=hg(a).id(Bd(n)),T=("function"==typeof o&&I.strength(o),"function"==typeof s&&n.strength(s),Dg(t).force("link",n).force("charge",I));function L(t){for(var e,n=0,r=y.length;n<r;++n)(e=y[n]).vy+=(b[n]-e.y)*v[n]*t}function N(){if(y){var t,e=y.length;for(v=new Array(e),b=new Array(e),t=0;t<e;++t)v[t]=isNaN(b[t]=+m(y[t],t,y))?0:+x(y[t],t,y)}}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)*P,r=(r/e-_)*P,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?T.force("center",(P=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?(P=+t,R):P},R)):T.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 m&&(m=sg(null==m?0:+m)),L.initialize=function(t){y=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?(m="function"==typeof t?t:sg(+t),N(),L):m},L)),T.stop();var z=Math.ceil(Math.log(T.alphaMin())/Math.log(1-T.alphaDecay()));for(let t=0;t<z;t++)T.tick();return{nodesData:t,linksData:a}}const Gg=g=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=g;const{nodeKey:c=t=>t.id,linkKey:u=t=>t.id}=e,h=et(e,["nodeKey","linkKey"]);var e=Object.assign({nodeKey:c,linkKey:u},h),f=rt(e,"node"),d=rt(e,"link"),{links:t,nodes:p}=Dd(t,e),{nodesData:t,linksData:p}=zg({links:t,nodes:p},nt({},{joint:!0},i),e),i=N0(l,"link",{items:[t=>({name:"source",value:Bd(u)(t.source)}),t=>({name:"target",value:Bd(u)(t.target)})]}),e=N0(l,"node",{items:[t=>({name:"key",value:Bd(c)(t)})]},!0);return[nt({},{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:p,encode:d,labels:o,style:rt(r,"link"),tooltip:i,animate:R0(s,"link")}),nt({},{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({},f),scale:n,style:rt(r,"node"),tooltip:e,labels:[Object.assign(Object.assign({},{text:""}),rt(r,"label")),...a],animate:R0(s,"link")})]},Wg=(Gg.props={},h=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=Cf(t,t=>t.children).sum(t=>t[e]).sort(i),l=h();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),Hg=t=>Wg(Lf)(t),Yg=(Hg.props={},t=>Wg(xd)(t)),Vg=(Yg.props={},u=>{const h={sortBy:(t,e)=>e.value-t.value},f={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},d={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},p={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=u,c=null==e?void 0:e.value,{nodes:i,edges:c}=Yg(Object.assign(Object.assign(Object.assign({},h),i),{field:c}))(t),t=N0(l,"node",{title:"name",items:["value"]},!0),l=N0(l,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[nt({},d,{data:c,encode:rt(e,"link"),scale:rt(n,"link"),labels:o,style:Object.assign({stroke:"#999"},rt(r,"link")),tooltip:l,animate:R0(s,"link")}),nt({},f,{data:i,scale:rt(n,"node"),encode:rt(e,"node"),labels:[Object.assign(Object.assign({},p),rt(r,"label")),...a],style:Object.assign({},rt(r,"node")),tooltip:t,animate:R0(s,"node")})]}});Vg.props={};var qg={},Ug={},Xg=34,$g=10,Kg=13;function Zg(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function Qg(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 Jg(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function tm(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Jg(-e,6):9999<e?"+"+Jg(e,6):Jg(e,4))+"-"+Jg(t.getUTCMonth()+1,2)+"-"+Jg(t.getUTCDate(),2)+(a?"T"+Jg(n,2)+":"+Jg(r,2)+":"+Jg(i,2)+"."+Jg(a,3)+"Z":i?"T"+Jg(n,2)+":"+Jg(r,2)+":"+Jg(i,2)+"Z":r||n?"T"+Jg(n,2)+":"+Jg(r,2)+"Z":"")}function em(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,l=!1;function c(){if(s)return Ug;if(l)return l=!1,qg;var t,e,n=a;if(r.charCodeAt(n)===Xg){for(;a++<i&&r.charCodeAt(a)!==Xg||r.charCodeAt(++a)===Xg;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===$g?l=!0:e===Kg&&(l=!0,r.charCodeAt(a)===$g)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===$g)l=!0;else if(e===Kg)l=!0,r.charCodeAt(a)===$g&&++a;else if(e!==h)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===$g&&--i,r.charCodeAt(i-1)===Kg&&--i;(e=c())!==Ug;){for(var u=[];e!==qg&&e!==Ug;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?tm(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=Zg(n=t),function(t,e){return r(i(t),e,n)}):Zg(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?Qg(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?Qg(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function nm(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;rm&&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 rm=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),im=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>ve(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),em(i).parse(t,a?nm:M0);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};im.props={};const am=t=>{const{fields:n,key:r="key",value:i="value"}=t;return t=>{var e;return(e=n)&&0!==Object.keys(e).length?t.flatMap(e=>n.map(t=>Object.assign(Object.assign({},e),{[r]:t,[i]:e[t]}))):t}};am.props={};const om=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)},sm=(om.props={},t=>{const e=t["callback"];return t=>Array.isArray(t)?[...t].sort(e):t});sm.props={};const lm=t=>{const e=t["fields"];return t=>t.map(t=>{return[n,t=[]]=[t,e],t.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{});var n})};lm.props={};const cm=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};cm.props={};const um=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))}},hm=(um.props={},t=>{const e=t["value"];return()=>e}),fm=(hm.props={},t=>{const{callback:e=M0}=t;return t=>e(t)}),dm=(fm.props={},t=>{const{callback:e=M0}=t;return t=>Array.isArray(t)?t.map(e):t});dm.props={};var pm=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 gm={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 mm(t){const{y:c,thickness:u,weight:h,marginRatio:f,id:d,source:p,target:g,sourceWeight:m,targetWeight:y,sortBy:v}=Object.assign(Object.assign({},gm),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=m(t),t.targetWeight=y(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=Lp(e,t=>t.sourceWeight)+Lp(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:pm[v])&&r.sort(n),!(n=(r=e).length))throw O0("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=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!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=[c,c,c,c]});const s=rp(e,t=>t.source),l=rp(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const ym=e=>t=>mm(e)(t),vm=(ym.props={},Math.PI/180),bm=64,xm=2048;function wm(t){return t.text}function km(){return"serif"}function Mm(){return"normal"}function Em(t){return t.value}function Om(){return 90*~~(2*Math.random())}function Sm(){return 1}function _m(){}function Am(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(bm<<5)/c,xm/c);let i=0,a=0,n=0;var u,h,f,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*vm),f=Math.cos(o.rotate*vm),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>=bm<<5&&(i=0,a+=n,n=0),a+e>=xm)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*vm),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(bm<<5)/c,xm/c).data,g=[];0<=--s;)if((o=r[s]).hasText){var m=o.width,y=m>>5;let n=o.y1-o.y0;for(let t=0;t<n*y;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<m;t++){var v=y*e+(t>>5),b=p[(a+e)*(bm<<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)*y)}}}function Pm(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Tm(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function Lm(){return document.createElement("canvas")}function Nm(t){return"function"==typeof t?t:function(){return t}}const Cm={archimedean:Pm,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 jm(){let b=[256,256],r=wm,i=km,p=Em,g=Mm,m=Om,y=Sm,x=Pm,w=Math.random,v=_m,k=[],M=null,E=1/0;const O=Mm,S=Lm,_={};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=(bm<<5)/e,t.height=xm/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=_.board||Tm((b[0]>>5)*b[1]),c=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=m.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=y.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<c;){var i=h[f];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,Am(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 l,c=-s,u,h;for(;(l=o(c+=s))&&(u=~~l[0],h=~~l[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,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var f=t.sprite,d=t.width>>5,p=b[0]>>5,g=t.x-(d<<4),m=127&g,y=32-m,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<<y|(t<d?(n=f[e*d+t])>>>m:0);r+=p}return delete t.sprite,1}return}(l,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>=c&&(_.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=Tm((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}_.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=Nm(t)},_.font=function(t){i=Nm(t)},_.fontWeight=function(t){g=Nm(t)},_.rotate=function(t){m=Nm(t)},_.spiral=function(t){x=Cm[t]||t},_.fontSize=function(t){p=Nm(t)},_.padding=function(t){y=Nm(t)},_.random=function(t){w=Nm(t)},_.on=function(t){v=Nm(t)},_}const Rm={size:[500,500],fontSize:[14,28]};function Im(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 Bm=f=>h=>ve(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},Rm,f),e=jm(),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 ve(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=[wp(e),bp(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",Im,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=et(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function Fm(e){return"string"==typeof e?t=>t[e]:e}Bm.props={};const Dm=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=Fm(r),l=Fm(t),c=ip(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})},zm=(Dm.props={},t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)});zm.props={};const Gm=u=>c=>ve(void 0,void 0,void 0,function*(){var{width:t,height:e}=z0(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=et(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield Bm(Object.assign(Object.assign({},l),o))(e);return[nt({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]});function Wm(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Hm(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Ym(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}Gm.props={};const Vm=Math.sqrt(50),qm=Math.sqrt(10),Um=Math.sqrt(2);function Xm(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>=Vm?10:n>=qm?5:n>=Um?2:1)*10**t:-(10**-t)/(n>=Vm?10:n>=qm?5:n>=Um?2:1)}function $m(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>=Vm?r*=10:n>=qm?r*=5:n>=Um&&(r*=2),e<t?-r:r}const Km=(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=Xm(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=Xm(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=Xm(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},Zm=36e5,Qm=864e5,Jm=7*Qm;Qm,Qm;function ty(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}zl=ty(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),ds=ty(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),ps=ty(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),gs=ty(Zm,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Zm*e)},t=>t.getHours()),vs=ty(Qm,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Qm*e)},t=>t.getDate()-1);const ey=ty(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());bs=ty(Jm,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Jm*e)},t=>{var e=ey.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Jm)}),Os=ty(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 ny={millisecond:zl,second:ds,minute:ps,hour:gs,day:vs,week:bs,month:ey,year:Os};Ss=ty(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),_s=ty(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),As=ty(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),Ps=ty(Zm,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Zm*e)},t=>t.getUTCHours()),Ts=ty(Qm,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Qm*e)},t=>t.getUTCDate()-1);const ry=ty(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());Ls=ty(Jm,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Jm*e)},t=>{var e=ry.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Jm)}),ms=ty(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 iy={millisecond:Ss,second:_s,minute:As,hour:Ps,day:Ts,week:Ls,month:ry,year:ms};function ay(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?iy:ny;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=Ym(i,l,0,c,s);let h;return h=u===c?[a,$m(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max($m(t,e,n),1)]}const oy=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=ay(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function sy(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}function ly(t){return hy(t,"Function")}function cy(t){return null==t}var uy={}.toString,hy=function(t,e){return uy.call(t)==="[object "+e+"]"},fy=function(t){return Array.isArray?Array.isArray(t):hy(t,"Array")};var dy=function(t){if("object"!=typeof(e=t)||null===e||!hy(t,"Object"))return!1;var e;if(null===Object.getPrototypeOf(t))return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n},py=function(t){return hy(t,"Number")},gy=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){ly(n)&&"prototype"===e||r.push(t)};if(e)if(fy(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},my=5;function yy(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||my,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&dy(o)?(dy(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):fy(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t}function vy(t){return t}var by,xy=function(t,e){if(!sy(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};function wy(t){return cy(t)?0:(sy(t)?t:Object.keys(t)).length}function ky(t){return null!=t&&!Number.isNaN(t)}!function(a,o){var s;if(ly(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(by=by||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),by.measureText(hy(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],gy(e=void 0===e?{}:e)).join("")});const My=e=>t=>-e(-t),Ey=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?My(t):t},Oy=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?My(n):n},Sy=(t,e,n,r)=>{var i=t<0,a=Ey(r,i),r=Oy(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 _y(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 py(t)?Math.round(t):t}):i;this.output=Wm(a,r,e,t)},t.prototype.invert=void 0}}var Ay,Fl={exports:{}},Hl={exports:{}},Py=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))},Ty=Array.prototype.concat,Ly=Array.prototype.slice,Ny=Hl.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];Py(i)?e=Ty.call(e,Ly.call(i)):e.push(i)}return e},Cy=(Ny.wrap=function(t){return function(){return t(Ny(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]}),jy=Hl.exports,Ry=Object.hasOwnProperty,Iy=Object.create(null);for(Ay in Cy)Ry.call(Cy,Ay)&&(Iy[Cy[Ay]]=Ay);var By=Fl.exports={to:{},get:{}};function Fy(t,e,n){return Math.min(Math.max(e,t),n)}function Dy(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}By.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=By.get.hsl(t),n="hsl";break;case"hwb":e=By.get.hwb(t),n="hwb";break;default:e=By.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},By.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]:Ry.call(Cy,e[1])?((i=Cy[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]=Fy(i[n],0,255);return i[3]=Fy(i[3],0,1),i},By.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,Fy(parseFloat(t[2]),0,100),Fy(parseFloat(t[3]),0,100),Fy(isNaN(e)?1:e,0,1)]):null},By.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,Fy(parseFloat(t[2]),0,100),Fy(parseFloat(t[3]),0,100),Fy(isNaN(e)?1:e,0,1)]):null},By.to.hex=function(){var t=jy(arguments);return"#"+Dy(t[0])+Dy(t[1])+Dy(t[2])+(t[3]<1?Dy(Math.round(255*t[3])):"")},By.to.rgb=function(){var t=jy(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]+")"},By.to.rgb.percent=function(){var t=jy(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]+")"},By.to.hsl=function(){var t=jy(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},By.to.hwb=function(){var t=jy(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},By.to.keyword=function(t){return Iy[t.slice(0,3)]};var zy=Fl.exports;function Gy(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 Wy(t){var e,n,r,t=zy.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*Gy(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*Gy(n,r,e),255*Gy(n,r,e-1/3),t]):null):null}const Hy=(e,n)=>t=>e*(1-t)+n*t,Yy=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return Hy(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=Wy(n),c=Wy(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},Vy=(t,e)=>{const n=Hy(t,e);return t=>Math.round(n(t))};function qy({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function Uy(t){return"object"==typeof t?t.valueOf():t}class Xy extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=Uy,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(qy({map:this.map,initKey:this.initKey},t))}has(t){return super.has(qy({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 $y{constructor(t){this.options=yy({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=yy({},this.options,t),this.rescale(t)}rescale(t){}}const Ky=Symbol("defaultUnknown");function Zy(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function Qy(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==Ky)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function Jy(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class t1 extends $y{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:Ky}}map(t){return 0===this.domainIndexMap.size&&Zy(this.domainIndexMap,this.getDomain(),this.domainKey),Qy({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&Zy(this.rangeIndexMap,this.getRange(),this.rangeKey),Qy({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=Jy(e),this.rangeKey=Jy(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 t1(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 e1(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,h=u/(2/l*r+1-1/l*i);const f=h*i/l;h-=l*f;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=h/d.reduce((t,e)=>t+e);var c=new Xy(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new Xy(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/l*i))*s;let m=o?Math.round(t):t;var y=new Array(l);for(let t=0;t<l;t+=1){y[t]=(v=m,Math.round(1e12*v)/1e12);var v=e[t];m+=g.get(v)}return{valueBandWidth:c,valueStep:g,adjustedRange:y}}class n1 extends t1{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Ky,flex:[]}}clone(){return new n1(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 e1(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const r1=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=Xm(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};class i1 extends $y{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:r1}}map(t){var[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){var[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){var{tickMethod:t,domain:e,tickCount:n}=this.options,[e,r]=e;return py(e)&&py(r)?t(e,r,n):[]}clone(){return new i1(this.options)}}function a1(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const o1=[1,5,2,2.5,4,3],s1=100*Number.EPSILON;const l1=(n,r,t=5,i=!0,a=o1,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,h,f,d,p,g={score:-2,lmin:0,lmax:0,lstep:0};let m=1;for(;m<1/0;){for(let t=0;t<a.length;t+=1){var y=a[t],v=(h=y,f=a,d=m,p=void 0,p=wy(f),1-xy(f,h)/(p-1)-d+1);if(o[0]*v+o[1]+o[2]+o[3]<g.score){m=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)/m/y;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=m*y*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)*m-(e-1)*m,E=Math.ceil(n/w)*m;if(M<=E){var O=E-M;for(let t=0;t<=O;t+=1){var S=(M+t)*(w/m),_=S+w*(e-1),A=w,P=function(t,e,n,r,i,a){var o=wy(e),e=xy(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<s1||a-t<s1)&&r<=0&&0<=i?1:s)}(y,a,m,S,_,A),T=1-.5*((r-_)**2+(n-S)**2)/(.1*(r-n))**2,L=(l=e,L=n,l=(l-1)/(_-(N=S)),c=((c=s)-1)/(Math.max(_,r)-Math.min(L,N)),2-Math.max(l/c,c/l)),N=o[0]*P+o[1]*T+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}}m+=1}var t=a1(g.lmax),e=a1(g.lmin),C=a1(g.lstep),j=Math.floor((t=(t-e)/C,Math.round(1e12*t)/1e12))+1,R=new Array(j);R[0]=a1(e);for(let t=1;t<j;t+=1)R[t]=a1(R[t-1]+C);return R};class c1 extends $y{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:l1}}map(t){return ky(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new c1(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return py(t)&&py(r)?n(t,r,e):[]}}const u1=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return Wm(o=t<r?(a=Hm(t,r),n(e,i)):(a=Hm(r,t),n(i,e)),a)},h1=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=Hm(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=Ym(r,t,1,i)-1,n=a[e];return Wm(o[e],n)(t)}},f1=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?h1:u1)(t,e,r?Vy:n)};class d1 extends $y{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Hy,tickCount:5}}map(t){return ky(t)?this.output(t):this.options.unknown}invert(t){return ky(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 Km}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 vy}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=f1(n.map(t),r,a,i);this.output=Wm(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=f1(i,r.map(t),Hy);this.input=Wm(e,n,i)}}class p1 extends d1{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Yy,tickMethod:r1,tickCount:5}}chooseTransforms(){return[vy,vy]}clone(){return new p1(this.options)}}class g1 extends n1{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Ky,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new g1(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const m1=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class y1 extends d1{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Yy,tickMethod:r1,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[vy,vy]:(t=.5===r?m1:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new y1(this.options)}}class v1 extends y1{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Yy,tickMethod:r1,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new v1(this.options)}}class b1 extends $y{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return ky(t)?(t=Ym(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 b1(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const x1=(t,e,n,r=10)=>{var i=t<0,a=Oy(r,i),o=Ey(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),h=o(c),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(c<p)break;l<=p&&f.push(p)}}else for(;u<=h;u+=1){var g=a(u);for(let t=1;t<r;t+=1){var m=g*t;if(c<m)break;l<=m&&f.push(m)}}2*f.length<n&&(f=r1(l,c,n))}else f=r1(u,h,Math.min(h-u,n)).map(a);return s?f.reverse():f};class w1 extends d1{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Yy,tickMethod:x1,tickCount:5}}chooseNice(){return Sy}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[Ey(t,e),Oy(t,e)]}clone(){return new w1(this.options)}}class k1 extends b1{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:l1}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=Km(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 k1(this.options)}}function M1(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 E1 extends b1{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:l1}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=M1(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 E1(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var O1=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,S1=/\[([^]*?)\]/gm;function _1(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function A1(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 P1(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var T1,ql=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Kl=["January","February","March","April","May","June","July","August","September","October","November","December"],ec=_1(Kl,3),L1=A1({},{dayNamesShort:_1(ql,3),dayNames:ql,monthNamesShort:ec,monthNames:Kl,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),N1={D:function(t){return String(t.getDate())},DD:function(t){return P1(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return P1(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 P1(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 P1(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return P1(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return P1(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return P1(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return P1(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return P1(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return P1(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return P1(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?"-":"+")+P1(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+P1(Math.floor(Math.abs(t)/60),2)+":"+P1(Math.abs(t)%60,2)}},C1={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 j1=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=ay(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function R1(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class I1 extends d1{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:j1,interpolate:Hy,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return oy}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?iy:ny,s=t?R1:vy;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=C1.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=C1[t]||t).replace(S1,function(t,e){return r.push(e),"@@@"}),A1(A1({},L1),n));return(t=t.replace(O1,function(t){return N1[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new I1(this.options)}}var B1;let F1=T1=class extends p1{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:vy,tickMethod:r1,tickCount:5}}constructor(t){super(t)}clone(){return new T1(this.options)}};F1=T1=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}([_y(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return Wm(Hy(0,1),Hm(t,e))})],F1);let D1=B1=class extends p1{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:vy,tickMethod:r1,tickCount:5}}constructor(t){super(t)}clone(){return new B1(this.options)}};function z1(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function G1(t){return t.map((t,e)=>e)}function W1(t,e){const n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function H1(n,t=n.length){if(1===t)return n.map(t=>[t]);const r=[];for(let e=0;e<n.length;e++)H1(n.slice(e+1),t-1).forEach(t=>{r.push([n[e],...t])});return r}function Y1(e){if(1===e.length)return[e];var n=[];for(let t=1;t<=e.length;t++)n.push(...H1(e,t));return n}function V1([t,e],[n,r]){return[t-n,e-r]}function q1([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function U1([t,e]){return Math.atan2(e,t)}function X1([t,e]){return U1([t,e])+Math.PI/2}function $1(t,e){t=U1(t),e=U1(e);return t<e?e-t:2*Math.PI-(t-e)}function K1(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 Z1([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function P(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function Q1(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*q1(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 J1(t,e,n,r,i){e=U1(V1(r,e))+Math.PI,n=U1(V1(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function tv(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=G1(a),[r,o]=Qd(t,t=>a[t]);const s=new p1({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function ev(t){var[t,e,n,r]=t;return[r,t,e,n]}function nv(t,e,n){var[e,r,,i]=Np(t)?ev(e):e,[n,a]=n,t=t.getCenter(),o=X1(V1(e,t)),r=X1(V1(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:q1(i,t),outerRadius:q1(e,t)}}function rv(t,e,n,r){var i=t["defaultColor"],t=t[e]||{},e=t[n]||t[r];return Object.assign({defaultColor:i},e)}function iv(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function av(t,e){return Cp(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}function ov(t){var e,n,r;return 1===t.length?t[0]:([[t,e],[n,r]]=t,[(t+n)/2,(e+r)/2])}function it(t){return new sv([t],null,t,t.ownerDocument)}D1=B1=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}([_y(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=Wm(Hy(0,.5),Hm(e,n)),a=Wm(Hy(.5,1),Hm(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],D1);class sv{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 sv(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new sv(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 sv([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 sv(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 sv(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 sv([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),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(c.has(d)){var g=c.get(d);g.__data__=f,g.__facet__=!1,a.push(g),o.delete(g),c.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 m of rp)o.delete(m);h.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(f):d.__toData__=[f],l.add(d),o.delete(d)):i.push(f)}var t=[new sv([],i,this._parent,this._document),new sv(a,null,this._parent,this._document),new sv(o,null,this._parent,this._document),new sv([],s,this._parent,this._document),new sv(l,null,this._parent,this._document)];return new sv(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new sv(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=sv.registry[t])?new e:O0("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++){var e=this._transitions[t];e?(e=Array.isArray(e)?e:[e],Promise.all(e.map(t=>t.finished)).then(()=>{this._elements[t].remove()})):this._elements[t].remove()}return new sv([],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}}sv.registry={g:hl,rect:Sl,circle:al,path:xl,text:Al,ellipse:cl,image:gl,line:yl,polygon:kl,polyline:El,html:dl};const lv=t=>{const u=t["radius"],h=et(t,["shape","radius"]);var t=rt(h,"pointer"),e=rt(h,"pin");const f=t["shape"],d=et(t,["shape"]),p=e["shape"],g=et(e,["shape"]);return(t,e,n,r)=>{var t=t.map(t=>n.invert(t)),[i,a,o]=function(t,e){var[,...t]=(t=t.getOptions()["transformations"]).find(t=>t[0]===e);return t}(n,"polar");const s=n.clone();var l=e["color"],i=xf({startAngle:i,endAngle:a,innerRadius:o,outerRadius:u});i.push(["cartesian"]),s.update({transformations:i});const c=t.map(t=>s.map(t));var[a,o]=ov(c),[i,t]=n.getCenter(),a=Object.assign(Object.assign({x1:a,y1:o,x2:i,y2:t,stroke:l},d),h),o=Object.assign(Object.assign({cx:i,cy:t,stroke:l},g),h),i=it(new hl);return L0(f)||("function"==typeof f?i.append(()=>f(c,e,s,r)):i.append("line").call(P,a).node()),L0(p)||("function"==typeof p?i.append(()=>p(c,e,s,r)):i.append("circle").call(P,o).node()),i.node()}},cv=h=>{const f={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-1.1*Math.PI,endAngle:.1*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},d={style:{shape:lv,lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},p={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}};return()=>{var t,{data:e={},scale:n={},style:r={},animate:i={}}=h,a=et(h,["data","scale","style","animate","transform"]),{targetData:e,totalData:n,target:o,total:s,scale:l}=function(t,e){const{name:n="score",target:r,total:i,percent:a}=t;var t=a||r,o=a?1:i,s=e["color"],e=Object.assign({y:{domain:[0,o]}},e);if(!s)return{targetData:[{x:n,y:t,color:"target"}],totalData:[{x:n,y:t,color:"target"},{x:n,y:o-t,color:"total"}],target:t,total:o,scale:e};const{domain:l=[]}=s;return{targetData:[{x:n,y:t,color:"target"}],totalData:l.map((t,e)=>({x:n,y:1<=e?t-l[e-1]:t,color:e})),target:t,total:o,scale:e}}(e,n),c=rt(r,"text"),u=(t=["pointer","pin"],Object.fromEntries(Object.entries(r).filter(([e])=>t.find(t=>e.startsWith(t)))));return[nt({},f,Object.assign({type:"interval",transform:[{type:"stackY"}],data:n,scale:l,style:rt(r,"arc"),animate:"object"==typeof i?rt(i,"arc"):i},a)),nt({},f,d,Object.assign({type:"point",data:e,scale:l,style:u,animate:"object"==typeof i?rt(i,"indicator"):i},a)),nt({},p,{style:Object.assign({text:([n,{target:r,total:e}]=[c,{target:o,total:s}],(n=n.content)?n(r,e):r.toString())},c),animate:"object"==typeof i?rt(i,"text"):i})]}},uv=(cv.props={},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),hv=(uv.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),fv=(hv.props={},t=>new n1(t)),dv=(fv.props={},t=>new p1(t)),pv=(dv.props={},t=>new t1(t)),gv=(pv.props={},t=>new c1(t)),mv=(gv.props={},t=>new g1(t)),yv=(mv.props={},t=>new I1(t)),vv=(yv.props={},t=>new w1(t)),bv=(vv.props={},t=>new y1(t)),xv=(bv.props={},t=>new b1(t)),wv=(xv.props={},t=>new E1(t)),kv=(wv.props={},t=>new k1(t)),Mv=(kv.props={},t=>new v1(t)),Ev=(Mv.props={},t=>new F1(t)),Ov=(Ev.props={},t=>new i1(t));function Sv(t){return function(){return t}}Ov.props={};const _v=Math.abs,Av=Math.atan2,Pv=Math.cos,Tv=Math.max,Lv=Math.min,Nv=Math.sin,Cv=Math.sqrt,jv=1e-12,Rv=Math.PI,Iv=Rv/2,Bv=2*Rv;function Fv(t){return 1<=t?Iv:t<=-1?-Iv:Math.asin(t)}const Dv=Math.PI,zv=2*Dv,Gv=1e-6,Wv=zv-Gv;function Hv(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=arguments[t]+n[t]}class Yv{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Hv:function(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return Hv;const r=10**e;return function(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=Math.round(arguments[t]*r)/r+n[t]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error("negative radius: "+i);var a,o,s=this._x1,l=this._y1,c=n-t,u=r-e,h=s-t,f=l-e,d=h*h+f*f;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:d>Gv&&(Math.abs(f*c-u*h)>Gv&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((Dv-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>Gv&&this._append`L${t+d*h},${e+d*f}`,this._append`A${i},${i},0,0,${+(h*s<f*n)},${this._x1=t+r*c},${this._y1=e+r*u}`):this._append`L${this._x1=t},${this._y1=e}`)}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error("negative radius: "+n);let o=n*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,h=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Gv||Math.abs(this._y1-c)>Gv)&&this._append`L${l},${c}`,n&&((h=h<0?h%zv+zv:h)>Wv?this._append`A${n},${n},0,1,${u},${t-o},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:h>Gv&&this._append`A${n},${n},0,${+(h>=Dv)},${u},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Vv(){return new Yv}function qv(n){let r=3;return n.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return n},()=>new Yv(r)}function Uv(t){return t.innerRadius}function Xv(t){return t.outerRadius}function $v(t){return t.startAngle}function Kv(t){return t.endAngle}function Zv(t){return t&&t.padAngle}function Qv(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/Cv(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,h=n-t,f=u*u+h*h,a=i-a,s=s*n-e*t,n=(h<0?-1:1)*Cv(Tv(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-c,n=d-r,f=s-c;return n*n+f*f<u*u+h*h&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function Jv(){var A=Uv,P=Xv,T=Sv(0),L=null,N=$v,C=Kv,j=Zv,R=null,I=qv(e);function e(){var t,e,n,r,i,a,o,s,l,c,u,h,f,d,p,g,m,y,v,b,x,w,k=+A.apply(this,arguments),M=+P.apply(this,arguments),E=N.apply(this,arguments)-Iv,O=C.apply(this,arguments)-Iv,S=_v(O-E),_=E<O;if(R=R||(t=I()),M<k&&(e=M,M=k,k=e),M>jv?S>Bv-jv?(R.moveTo(M*Pv(E),M*Nv(E)),R.arc(0,0,M,E,O,!_),k>jv&&(R.moveTo(k*Pv(O),k*Nv(O)),R.arc(0,0,k,O,E,_))):(r=e=E,i=n=O,o=a=S,f=(u=j.apply(this,arguments)/2)>jv&&(L?+L.apply(this,arguments):Cv(k*k+M*M)),w=x=s=Lv(_v(M-k)/2,+T.apply(this,arguments)),f>jv&&(h=Fv(f/k*Nv(u)),f=Fv(f/M*Nv(u)),(a-=2*h)>jv?(r+=h*=_?1:-1,i-=h):(a=0,r=i=(E+O)/2),(o-=2*f)>jv?(e+=f*=_?1:-1,n-=f):(o=0,e=n=(E+O)/2)),u=M*Pv(e),h=M*Nv(e),f=k*Pv(i),E=k*Nv(i),s>jv&&(d=M*Pv(n),p=M*Nv(n),g=k*Pv(r),m=k*Nv(r),S<Rv)&&((O=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<jv))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,h,g,m,d,p,f,E))?(S=u-O[0],v=h-O[1],b=d-O[0],y=p-O[1],v=1/Nv((1<(S=(S*b+v*y)/(Cv(S*S+v*v)*Cv(b*b+y*y)))?0:S<-1?Rv:Math.acos(S))/2),b=Cv(O[0]*O[0]+O[1]*O[1]),x=Lv(s,(k-b)/(v-1)),w=Lv(s,(M-b)/(1+v))):x=w=0),o>jv?w>jv?(l=Qv(g,m,u,h,M,w,_),c=Qv(d,p,f,E,M,w,_),R.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?R.arc(l.cx,l.cy,w,Av(l.y01,l.x01),Av(c.y01,c.x01),!_):(R.arc(l.cx,l.cy,w,Av(l.y01,l.x01),Av(l.y11,l.x11),!_),R.arc(0,0,M,Av(l.cy+l.y11,l.cx+l.x11),Av(c.cy+c.y11,c.cx+c.x11),!_),R.arc(c.cx,c.cy,w,Av(c.y11,c.x11),Av(c.y01,c.x01),!_))):(R.moveTo(u,h),R.arc(0,0,M,e,n,!_)):R.moveTo(u,h),k>jv&&a>jv?x>jv?(l=Qv(f,E,d,p,k,-x,_),c=Qv(u,h,g,m,k,-x,_),R.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?R.arc(l.cx,l.cy,x,Av(l.y01,l.x01),Av(c.y01,c.x01),!_):(R.arc(l.cx,l.cy,x,Av(l.y01,l.x01),Av(l.y11,l.x11),!_),R.arc(0,0,k,Av(l.cy+l.y11,l.cx+l.x11),Av(c.cy+c.y11,c.cx+c.x11),_),R.arc(c.cx,c.cy,x,Av(c.y11,c.x11),Av(c.y01,c.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)+ +P.apply(this,arguments))/2,e=(+N.apply(this,arguments)+ +C.apply(this,arguments))/2-Rv/2;return[Pv(e)*t,Nv(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:Sv(+t),e):A},e.outerRadius=function(t){return arguments.length?(P="function"==typeof t?t:Sv(+t),e):P},e.cornerRadius=function(t){return arguments.length?(T="function"==typeof t?t:Sv(+t),e):T},e.padRadius=function(t){return arguments.length?(L=null==t?null:"function"==typeof t?t:Sv(+t),e):L},e.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:Sv(+t),e):N},e.endAngle=function(t){return arguments.length?(C="function"==typeof t?t:Sv(+t),e):C},e.padAngle=function(t){return arguments.length?(j="function"==typeof t?t:Sv(+t),e):j},e.context=function(t){return arguments.length?(R=null==t?null:t,e):R},e}function tb(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function eb(t){this._context=t}function nb(t){return new eb(t)}function rb(t){return t[0]}function ib(t){return t[1]}function ab(o,s){var l=Sv(!0),c=null,u=nb,h=null,f=qv(e);function e(t){var e,n,r,i=(t=tb(t)).length,a=!1;for(null==c&&(h=u(r=f())),e=0;e<=i;++e)!(e<i&&l(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?rb:Sv(o),s="function"==typeof s?s:void 0===s?ib:Sv(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:Sv(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:Sv(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:Sv(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(h=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=h=null:h=u(c=t),e):c},e}function ob(u,h,f){var d=null,p=Sv(!0),g=null,m=nb,y=null,v=qv(e);function e(t){var e,n,r,i,a,o=(t=tb(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==g&&(y=m(a=v())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,y.areaStart(),y.lineStart();else{for(y.lineEnd(),y.lineStart(),r=e-1;n<=r;--r)y.point(l[r],c[r]);y.lineEnd(),y.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+h(i,e,t),y.point(d?+d(i,e,t):l[e],f?+f(i,e,t):c[e]))}if(a)return y=null,a+""||null}function t(){return ab().defined(p).curve(m).context(g)}return u="function"==typeof u?u:void 0===u?rb:Sv(+u),h="function"==typeof h?h:Sv(void 0===h?0:+h),f="function"==typeof f?f:void 0===f?ib:Sv(+f),e.x=function(t){return arguments.length?(u="function"==typeof t?t:Sv(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:Sv(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:Sv(+t),e):d},e.y=function(t){return arguments.length?(h="function"==typeof t?t:Sv(+t),f=null,e):h},e.y0=function(t){return arguments.length?(h="function"==typeof t?t:Sv(+t),e):h},e.y1=function(t){return arguments.length?(f=null==t?null:"function"==typeof t?t:Sv(+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:Sv(!!t),e):p},e.curve=function(t){return arguments.length?(m=t,null!=g&&(y=m(g)),e):m},e.context=function(t){return arguments.length?(null==t?g=y=null:y=m(g=t),e):g},e}Vv.prototype=Yv.prototype,eb.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 sb=cb(nb);function lb(t){this._curve=t}function cb(e){function t(t){return new lb(e(t))}return t._curve=e,t}function ub(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(cb(t)):e()._curve},t}function hb(){}function fb(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 db(t,e){this._context=t,this._k=(1-e)/6}function pb(t,e){this._context=t,this._k=(1-e)/6}function gb(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>jv&&(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>jv&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function mb(t,e){this._context=t,this._alpha=e}lb.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))}},db.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:fb(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:fb(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 db(t,n)}return t.tension=function(t){return e(+t)},t}(0),pb.prototype={areaStart:hb,areaEnd:hb,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:fb(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 pb(t,n)}return t.tension=function(t){return e(+t)},t}(0),mb.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:gb(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 yb=function e(n){function t(t){return n?new mb(t,n):new db(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function vb(t,e){this._context=t,this._alpha=e}vb.prototype={areaStart:hb,areaEnd:hb,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:gb(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 bb=function e(n){function t(t){return n?new vb(t,n):new pb(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function xb(t){this._context=t}function wb(t){return new xb(t)}function kb(t,e){this._context=t,this._t=e}function Mb(t){return new kb(t,.5)}function Eb(t){return new kb(t,0)}function Ob(t){return new kb(t,1)}function Sb(t,e,n,r={}){var{inset:i=0,radius:a=0,insetLeft:o=i,insetTop:s=i,insetRight:l=i,insetBottom:c=i,radiusBottomLeft:u=a,radiusBottomRight:h=a,radiusTopLeft:f=a,radiusTopRight:d=a}=r,r=et(r,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight"]);if(!Cp(n)&&!Rp(n)){var[p,,g]=!!Np(n)?ev(t):t;const[x,v]=p;var[g,p]=V1(g,p),m=(0<g?x:x+g)+o,y=(0<p?v:v+p)+s,g=Math.abs(g)-(o+l),o=Math.abs(p)-(s+c);return it(new Sl({})).style("x",m).style("y",y).style("width",g).style("height",o).style("radius",[f,d,h,u]).call(P,r).node()}const{y:v,y1:b}=e;l=n.getCenter(),p=nv(n,t,[v,b]),s=Jv().cornerRadius(a).padAngle(i*Math.PI/180);return it(new xl({})).style("path",s(p)).style("transform",`translate(${l[0]}, ${l[1]})`).style("radius",a).style("inset",i).call(P,r).node()}xb.prototype={areaStart:hb,areaEnd:hb,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))}},kb.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}};const _b=E=>{const{colorAttribute:O,first:S=!0,last:_=!0}=E,A=et(E,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),{defaultColor:i,radius:a=0}=r,o=et(r,["defaultColor","radius"]),r=o.lineWidth||1,{stroke:s,radius:a=a,radiusTopLeft:l=a,radiusTopRight:c=a,radiusBottomRight:u=a,radiusBottomLeft:h=a,innerRadius:f=0,innerRadiusTopLeft:d=f,innerRadiusTopRight:p=f,innerRadiusBottomRight:g=f,innerRadiusBottomLeft:f=f,lineWidth:r="stroke"===O||s?r:0,inset:m=0,insetLeft:y=m,insetRight:v=m,insetBottom:b=m,insetTop:x=m}=A,w=et(A,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop"]),{color:i=i,opacity:k}=e;const M=[S?l:d,S?c:p,_?u:g,_?h:f];l=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"],Np(n)&&l.push(l.shift()),d=Object.assign(Object.assign({radius:a},Object.fromEntries(l.map((t,e)=>[t,M[e]]))),{inset:m,insetLeft:y,insetRight:v,insetBottom:b,insetTop:x});return it(Sb(t,e,n,d)).call(P,o).style("fill","transparent").style(O,i).style(iv(E),k).style("lineWidth",r).style("stroke",void 0===s?i:s).call(P,w).node()}},Ab=(_b.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>_b(Object.assign({colorAttribute:"fill"},t))),Pb=(Ab.props=Object.assign(Object.assign({},_b.props),{defaultMarker:"square"}),t=>_b(Object.assign({colorAttribute:"stroke"},t)));Pb.props=Object.assign(Object.assign({},_b.props),{defaultMarker:"hollowSquare"});const Tb=t=>{const{adjustPoints:s=function(t,e,n){var[t,r,i,a]=t;if(Np(n)){const o=[(e?e[0]:r)[0],r[1]],s=[(e?e[3]:i)[0],i[1]];return[t,o,s,a]}const o=[r[0],(e?e[0]:r)[1]],s=[i[0],(e?e[3]:i)[1]];return[t,o,s,a]}}=t,l=et(t,["adjustPoints"]);return(t,e,n,r,i,...a)=>{var o=e["index"],o=i[o+1],t=s(t,o,n);return _b(Object.assign({colorAttribute:"fill"},l))(t,e,n,r,i,...a)}};function Lb(t,e,n){var[t,r,i,a]=t;if(Np(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]}Tb.props=Object.assign(Object.assign({},_b.props),{defaultMarker:"funnel"});const Nb=t=>Tb(Object.assign({adjustPoints:Lb},t));function Cb(t){const e="function"==typeof t?t:t.render;return class extends sl{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}Nb.props=Object.assign(Object.assign({},_b.props),{defaultMarker:"square"});const jb=Cb(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;it(t).maybeAppend("line",()=>new xl({})).style("d",e).call(P,r),it(t).maybeAppend("line1",()=>new xl({})).style("d",n).call(P,i)});const Rb=t=>{const{curve:h,gradient:f=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connect:g=!1}=t,m=et(t,["curve","gradient","gradientColor","defined","connect"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=f&&a?tv(a,s,l,f,d):r,s=av(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),m);let c;if(Cp(n)){const u=n.getCenter();c=n=>ub(ab().curve(sb)).angle((t,e)=>X1(V1(n[e],u))).radius((t,e)=>q1(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(h)(n)}else c=ab().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=rt(l,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?it(new xl({})).style("d",c(r)||[]).call(P,l):a&&!g?it(new xl({})).style("d",c(t)).call(P,l):it(new jb).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},Ib=(Rb.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=Cp(n)?wb:nb;return Rb(Object.assign({curve:i},a))(t,e,n,r)}),Bb=(Ib.props=Object.assign(Object.assign({},Rb.props),{defaultMarker:"line"}),t=>{const{alpha:a=.5}=t,o=et(t,["alpha"]);return(t,e,n,r)=>{var i=Cp(n)?bb:yb;return Rb(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),Fb=(Bb.props=Object.assign(Object.assign({},Rb.props),{defaultMarker:"smooth"}),t=>Rb(Object.assign({curve:Ob},t))),Db=(Fb.props=Object.assign(Object.assign({},Rb.props),{defaultMarker:"hv"}),t=>Rb(Object.assign({curve:Eb},t))),zb=(Db.props=Object.assign(Object.assign({},Rb.props),{defaultMarker:"vh"}),t=>Rb(Object.assign({curve:Mb},t)));zb.props=Object.assign(Object.assign({},Rb.props),{defaultMarker:"hvh"});var Il=(t,e,n)=>[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]],Gl=(Il.style=["fill"],Il.bind(void 0)),Vs=(Gl.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]),Gb=(Vs.style=["fill"],Vs.bind(void 0)),Is=(Gb.style=["fill"],Vs.bind(void 0)),Rl=(Is.style=["stroke","lineWidth"],(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"]]}),e=(Rl.style=["fill"],Rl.bind(void 0)),js=(e.style=["stroke","lineWidth"],(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"]]}),o=(js.style=["fill"],js.bind(void 0)),ys=(o.style=["stroke","lineWidth"],(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"]]}),n=(ys.style=["fill"],ys.bind(void 0)),s=(n.style=["stroke","lineWidth"],(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"]]}),Dl=(s.style=["fill"],s.bind(void 0)),r=(Dl.style=["stroke","lineWidth"],(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"]]}),Bl=(r.style=["fill"],r.bind(void 0)),cs=(Bl.style=["stroke","lineWidth"],(t,e,n)=>[["M",t,e+n],["L",t,e-n]]),zl=(cs.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]),ds=(zl.style=["stroke","lineWidth"],(t,e,n)=>[["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]]),ps=(ds.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]),gs=(ps.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e]]),vs=(gs.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e]]),bs=(vs.style=["stroke","lineWidth"],vs.bind(void 0)),Os=(bs.style=["stroke","lineWidth"],(t,e,n)=>[["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]]),Ss=(Os.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]),_s=(Ss.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]),As=(_s.style=["stroke","lineWidth"],(t,e,n)=>[["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]]),Ps=(As.style=["stroke","lineWidth"],(t,e,n)=>[["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]]);Ps.style=["stroke","lineWidth"];const Wb=new Map([["bowtie",r],["cross",zl],["dash",bs],["diamond",Rl],["dot",vs],["hexagon",s],["hollowBowtie",Bl],["hollowDiamond",e],["hollowHexagon",Dl],["hollowPoint",Gl],["hollowSquare",Is],["hollowTriangle",o],["hollowTriangleDown",n],["hv",Ss],["hvh",As],["hyphen",gs],["line",cs],["plus",ps],["point",Il],["rect",Gb],["smooth",Os],["square",Vs],["tick",ds],["triangleDown",ys],["triangle",js],["vh",_s],["vhv",Ps]]);const l=u=>{const{colorAttribute:h,symbol:t,mode:f="auto"}=u,d=et(u,["colorAttribute","symbol","mode"]),p=Wb.get(t)||Wb.get("point");return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),r=d.stroke?a||1:a,{color:a=i,transform:i,opacity:s}=e,[l,c]=ov(t),t=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||Bp(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}(f,t,e,n)||d.r||o.r;return it(new xl).call(P,o).style("fill","transparent").style("d",p(l,c,t)).style("lineWidth",r).style("transform",i).style("stroke",a).style(iv(u),s).style(h,a).call(P,d).node()}},Hb=(l.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>l(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),Yb=(Hb.props=Object.assign({defaultMarker:"bowtie"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),Vb=(Yb.props=Object.assign({defaultMarker:"cross"},l.props),t=>l(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),qb=(Vb.props=Object.assign({defaultMarker:"diamond"},l.props),t=>l(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),Ub=(qb.props=Object.assign({defaultMarker:"hexagon"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),Xb=(Ub.props=Object.assign({defaultMarker:"hollowBowtie"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),$b=(Xb.props=Object.assign({defaultMarker:"hollowDiamond"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),Kb=($b.props=Object.assign({defaultMarker:"hollowHexagon"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),Zb=(Kb.props=Object.assign({defaultMarker:"hollowPoint"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),Qb=(Zb.props=Object.assign({defaultMarker:"hollowSquare"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),Jb=(Qb.props=Object.assign({defaultMarker:"hollowTriangle"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),t2=(Jb.props=Object.assign({defaultMarker:"hollowTriangleDown"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),e2=(t2.props=Object.assign({defaultMarker:"hyphen"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),n2=(e2.props=Object.assign({defaultMarker:"line"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),r2=(n2.props=Object.assign({defaultMarker:"plus"},l.props),t=>l(Object.assign({colorAttribute:"fill",symbol:"point"},t))),i2=(r2.props=Object.assign({defaultMarker:"point"},l.props),t=>l(Object.assign({colorAttribute:"fill",symbol:"square"},t))),a2=(i2.props=Object.assign({defaultMarker:"square"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),o2=(a2.props=Object.assign({defaultMarker:"tick"},l.props),t=>l(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),s2=(o2.props=Object.assign({defaultMarker:"triangle"},l.props),t=>l(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),l2=(s2.props=Object.assign({defaultMarker:"triangleDown"},l.props),t=>{const{arrowSize:u="40%"}=t,h=et(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=rv(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),[a,r]=t,[t,l]=Q1(a,r,{arrowSize:u}),c=Vv();return c.moveTo(...a),c.lineTo(...r),c.moveTo(...r),c.lineTo(...t),c.moveTo(...r),c.lineTo(...l),it(new xl).call(P,i).style("d",c.toString()).style("stroke",o||e).style("transform",s).call(P,h).node()}});function c2(t){h2(t,!0)}function u2(t){h2(t,!1)}function h2(t,e){var n=e?"visible":"hidden";!function e(t,n){n(t),t.children&&t.children.forEach(function(t){t&&e(t,n)})}(t,function(t){t.attr("visibility",n)})}l2.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};ye(p2,f2=hl);var f2,d2=p2;function p2(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=f2.apply(this,m([],w(t),!1))||this;return n.addEventListener(b.INSERTED,function(){u2(n)}),n}function g2(t){t=t.appendChild(new d2({class:"offscreen"}));return u2(t),t}ye(v2,m2=Al),Object.defineProperty(v2.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=g2(this)),this._offscreen},enumerable:!1,configurable:!0}),v2.prototype.disconnectedCallback=function(){var t;null!=(t=this._offscreen)&&t.destroy()};var m2,y2=v2;function v2(t){var e=(t=void 0===t?{}:t).style,t=et(t,["style"]);return m2.call(this,v({style:v({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},e)},t))||this}function b2(t){return t*Math.PI/180}function x2(t){return Number((180*t/Math.PI).toPrecision(5))}Object.defineProperty(k2.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(k2.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(k2.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(k2.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),k2.fromRect=function(t){return new k2(t.x,t.y,t.width,t.height)},k2.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}};var w2=k2;function k2(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}function M2(t,e){return Ue(t)?t.apply(void 0,m([],w(e),!1)):t}function E2(t,e){function r(t){return"".concat(e,"-").concat(t)}return t=Object.fromEntries(Object.entries(t).map(function(t){var t=w(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 O2(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)S2(t,e[r]);return t}var S2=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=5),Object.entries(i).forEach(function(t){var t=w(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?tn(t)?(tn(r[e])||(n[e]={}),a<o?S2(r[e],t,a+1,o):n[e]=i[e]):Ke(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})},_2=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function A2(t,e,n){void 0===n&&(n="..."),"text"===t.nodeName&&t.attr({wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function P2(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]}function T2(t){return"function"==typeof t?t():an(t)||sn(t)?new y2({style:{text:String(t)}}):t}function L2(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 N2(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function C2(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function j2(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=function(t){t.node().removeChildren()}),t?n(e):(r&&i(e),null)}function R2(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}var I2=function(e,n){return function(t){return e*(1-t)+n*t}};function B2(e,t){var i,a,o,s,n,r,l;return"number"==typeof e&&"number"==typeof t?I2(e,t):Array.isArray(e)&&Array.isArray(t)?(i=e,o=(a=t)?a.length:0,s=i?Math.min(o,i.length):0,function(t){for(var e=new Array(s),n=new Array(o),r=0,r=0;r<s;++r)e[r]=B2(i[r],a[r]);for(;r<o;++r)n[r]=a[r];for(r=0;r<s;++r)n[r]=e[r](t);return n}):"object"==typeof e&&"object"==typeof t?(void 0===(n=e)&&(n={}),void 0===(t=t)&&(t={}),r={},l={},Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];e in n?r[e]=B2(n[e],t):l[e]=t}),function(n){return Object.entries(r).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];return l[e]=t(n)}),l}):function(t){return e}}function F2(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<t.length;a++){var o=t[a],s=o.x,l=o.y,o=w([s+o.width,l+o.height],2),c=o[0],o=o[1];s<e&&(e=s),l<n&&(n=l),r<c&&(r=c),i<o&&(i=o)}return new w2(e,n,r-e,i-n)}function D2(n,t,e){function r(t){var e=w(u?["height",a]:["width",i],2),n=e[0],r=e[1];switch(c){case"flex-start":return 0;case"flex-end":return r-t[n];case"center":return r/2-t[n]/2;default:return 0}}var i=n.width,a=n.height,o=void 0===(o=e.flexDirection)?"row":o,s=(e.flexWrap,e.justifyContent),l=void 0===s?"flex-start":s;e.alignContent;var c=void 0===(s=e.alignItems)?"flex-start":s,u="row"===o,e="row"===o||"column"===o,h=u?e?[1,0]:[-1,0]:e?[0,1]:[0,-1],f=(s=w([0,0],2))[0],d=s[1],e=F2(o=t.map(function(t){var e=t.width,t=t.height,n=w([f,d],2),r=n[0],n=n[1],i=w([f+e*h[0],d+t*h[1]],2);return f=i[0],d=i[1],new w2(r,n,e,t)})),p={"flex-start":0,"flex-end":u?i-e.width:a-e.height,center:u?(i-e.width)/2:(a-e.height)/2};return F2(s=o.map(function(t){var e=t.x,n=t.y,t=w2.fromRect(t);return t.x=u?e+p[l]:e,t.y=u?n:n+p[l],t})),s.map(function(t){var e=t.x,n=t.y,t=w2.fromRect(t);return t.x=u?e:e+r(t),t.y=u?n+r(t):n,t}).map(function(t){var e,t=w2.fromRect(t);return t.x+=null!=(e=n.x)?e:0,t.y+=null!=(e=n.y)?e:0,t})}function z2(t,e,n){return[]}function G2(t,e){return[t[0]*e,t[1]*e]}function W2(t,e){return[t[0]+e[0],t[1]+e[1]]}function H2(t,e){return[t[0]-e[0],t[1]-e[1]]}function Y2(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function V2(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function q2(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function U2(t){var e;return 0===t[0]&&0===t[1]?[0,0]:(e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)),[t[0]/e,t[1]/e])}function X2(t,e){e=Math.pow(10,e);return~~(t*e)/e}function $2(t,e){var n,r={},i=Array.isArray(e)?e:[e];for(n in t)i.includes(n)||(r[n]=t[n]);return r}function K2(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r,s=[1/0,1/0],l=[-1/0,-1/0];if(o){s=(r=w(r,2))[0],l=r[1];for(var c=0,u=t.length;c<u;c+=1)s=Y2(s,x=t[c]),l=V2(l,x)}for(var c=0,h=t.length;c<h;c+=1){var f,d,p,g,m,y,v,b,x=t[c];0!==c||n?c!==h-1||n?(f=t[[c?c-1:h-1,c-1][n?0:1]],y=[0,0],y=G2(y=H2(d=t[n?(c+1)%h:c+1],f),e),0!==(m=(p=q2(x,f))+(g=q2(x,d)))&&(p/=m,g/=m),m=G2(y,-p),y=G2(y,g),v=W2(x,m),b=Y2(b=W2(x,y),V2(d,x)),b=V2(b,Y2(d,x)),v=Y2(v=W2(x,m=G2(m=H2(b,x),-p/g)),V2(f,x)),b=W2(x,y=G2(y=H2(x,v=V2(v,Y2(f,x))),g/p)),o&&(v=Y2(v=V2(v,s),l),b=Y2(b=V2(b,s),l)),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=c[2*i],s=c[2*i+1],h.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],l=w(r,1)[0],h.push(["C",o[0],o[1],s[0],s[1],l[0],l[1]])),h}var Z2=["$el","anchor","cx","cy","d","defX","defY","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function Q2(t){var e,n,r={};for(e in t)n=e,Z2.includes(n)&&(r[e]=t[e]);return r}function J2(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)}M.prototype.selectAll=function(t){return new M("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)},M.prototype.selectFacetAll=function(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new M(this._elements,null,this._parent,this._document,void 0,void 0,t)},M.prototype.select=function(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new M([t],null,t,this._document)},M.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=w(Array.isArray(a)?a:[a,null],2),o=a[0],a=a[1];(l=n(o,i)).__data__=o,null!==a&&(l.__fromElements__=a),this._parent.appendChild(l),r.push(l)}return new M(r,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var s=this._elements[i],l=n(o=s.__data__,i);s.appendChild(l),r.push(l)}return new M(r,null,r[0],this._document)},M.prototype.maybeAppend=function(t,e){e=be(this,tx,"m",ex).call(this,"#"===t[0]?t:"#".concat(t),e);return e.attr("id",t),e},M.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=be(this,tx,"m",ex).call(this,"."===t[0]?t:".".concat(t),e);return e.attr("className",t),e},M.prototype.maybeAppendByName=function(t,e){e=be(this,tx,"m",ex).call(this,'[name="'.concat(t,'"]'),e);return e.attr("name",t),e},M.prototype.data=function(t,n,e){void 0===n&&(n=function(t){return t}),void 0===e&&(e=function(){return null});for(var r,i,a=[],o=[],s=new Set(this._elements),l=[],c=new Set,u=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),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),m=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 y=f.get(g);l.push([p,y]);try{r=void 0;for(var v=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),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(m)?((x=u.get(m)).__toData__?x.__toData__.push(p):x.__toData__=[p],c.add(x),s.delete(x)):a.push(p)}var w=[new M([],a,this._parent,this._document),new M(o,null,this._parent,this._document),new M(s,null,this._parent,this._document),new M([],l,this._parent,this._document),new M(c,null,this._parent,this._document)];return new M(this._elements,null,this._parent,this._document,w)},M.prototype.merge=function(t){var e=m(m([],w(this._elements),!1),w(t._elements),!1),t=m(m([],w(this._transitions),!1),w(t._transitions),!1);return new M(e,null,this._parent,this._document,void 0,t)},M.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=M.registry[t];if(e)return new e;throw e="Unknown node type: ".concat(t),new Error(e)},M.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)},M.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 M([],null,this._parent,this._document,void 0,this._transitions)},M.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},M.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))})},M.prototype.style=function(n,r,t){void 0===t&&(t=!0);var i="function"==typeof r&&t?r:function(){return r};return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})},M.prototype.styles=function(t,o){return void 0===t&&(t={}),void 0===o&&(o=!0),this.each(function(r,i){var a=this;Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],n=t[1],t="function"==typeof n&&o?n:function(){return n};void 0!==n&&a.attr(e,t.call(a,r,i))})})},M.prototype.update=function(n,t){void 0===t&&(t=!0);var r="function"==typeof n&&t?n:function(){return n};return this.each(function(t,e){n&&this.update&&this.update(r.call(this,t,e))})},M.prototype.maybeUpdate=function(n,t){void 0===t&&(t=!0);var r="function"==typeof n&&t?n:function(){return n};return this.each(function(t,e){n&&this.update&&this.update(r.call(this,t,e))})},M.prototype.transition=function(n){var r=this._transitions;return this.each(function(t,e){r[e]=n.call(this,t,e)})},M.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},M.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,m([this._parent,this],w(e),!1)),this},M.prototype.node=function(){return this._elements[0]},M.prototype.nodes=function(){return this._elements},M.prototype.transitions=function(){return this._transitions.filter(function(t){return!!t})},M.prototype.parent=function(){return this._parent},tx=new WeakSet,ex=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 M([t],null,this._parent,this._document)},M.registry={g:hl,rect:Sl,circle:al,path:xl,text:y2,ellipse:cl,image:gl,line:yl,polygon:kl,polyline:El,html:dl};var tx,ex,nx,rx=M;function M(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=[]),tx.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 x(t){return new rx([t],null,t,t.ownerDocument)}function ix(t,e,n){return t.querySelector(e)?x(t).select(e):x(t).append(n)}function ax(t){if(sn(t))return[t,t,t,t];if(Ke(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]}function ox(t){var t=t.getLocalBounds(),t=w([t.min,t.max],2),e=w(t[0],2),n=e[0],e=e[1],t=w(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 sx(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function lx(t,e,n){void 0===n&&(n=!0);var e=e||(null==(e=t.match(/^([a-z][a-z0-9]+)/))?void 0:e[0])||"",t=t.replace(new RegExp("^(".concat(e,")")),"");return n?(e=t).toString().charAt(0).toLowerCase()+e.toString().slice(1):t}function E(t,r,i){void 0===i&&(i=!1);var a={};return Object.entries(t).forEach(function(t){var e,t=w(t,2),n=t[0],t=t[1];"className"!==n&&"class"!==n&&(n.startsWith("show")&&lx(n,"show").startsWith(r)!==i?n===(e=r,"".concat("show").concat(sx(e)))?a[n]=t:a[n.replace(new RegExp(sx(r)),"")]=t:n.startsWith("show")||n.startsWith(r)===i||"filter"===(e=lx(n,r))&&"function"==typeof t||(a[e]=t))}),a}function cx(t,r){return Object.entries(t).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1];return n.startsWith("show")?t["show".concat(r).concat(n.slice(4))]=e:t["".concat(r).concat(sx(n))]=e,t},{})}function ux(t,n){void 0===n&&(n=["x","y","class","className"]);var 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=w(t,2),e=t[0],t=t[1];n.includes(e)||(-1!==r.indexOf(e)?a[e]=t:i[e]=t)}),[i,a]}function hx(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,hx)}function fx(){this.constructor=nx}nx=hx,Ts=Error,fx.prototype=Ts.prototype,nx.prototype=new fx,hx.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 dx;var px=bn(function(t,e){var n=an(t)?t:t.style.text.toString(),e=e||gx(t),t=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(dx=dx||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(t,"px"),r].join(" "),dx.measureText(n).width},function(t,e){return[an(t)?t:t.style.text.toString(),Object.values(e||gx(t)).join()].join("")}),gx=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,t=t.style.fontSize;return{fontSize:"object"==typeof t?t.value:t,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function mx(o,t){if(t)try{var e=t.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(t,e,n){return"translate(".concat((e=e,n=n,i=(r=(r=o).getBBox()).width,a=r.height,[(r=w([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",e)}catch(t){}}ye(vx,yx=sl),Object.defineProperty(vx.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=g2(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(vx.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),vx.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},vx.prototype.disconnectedCallback=function(){var t;null!=(t=this._offscreen)&&t.destroy()},vx.prototype.attributeChangedCallback=function(t){"visibility"===t&&!function(){h2(this,"hidden"!==this.attributes.visibility)}.call(this)},vx.prototype.update=function(t,e){return this.attr(O2({},this.attributes,t=void 0===t?{}:t)),null==(t=this.render)?void 0:t.call(this,this.attributes,this,e)},vx.prototype.clear=function(){this.removeChildren()},vx.prototype.bindEvents=function(t,e){};var yx,Ls=vx;function vx(t,e){t=yx.call(this,O2({},{style:e=void 0===e?{}:e},t))||this;return t.initialized=!1,t._defaultOptions=e,t}function bx(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 xx(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function wx(t,e,n){return[["M",t-n,e],["L",t+n,e]]}ms=bx,Hl=wx;function kx(t){n="default",Ze(e=t)&&e instanceof Image?n="image":Ue(e)?n="symbol":an(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}ye(Ox,Mx=Ls),Ox.prototype.render=function(t,e){var r=t.symbol,n=t.size,i=void 0===n?16:n,a=et(t,["symbol","size"]),o=kx(r);j2(!!o,x(e),function(t){t.maybeAppendByClassName("marker",o).attr("className","marker ".concat(o,"-marker")).call(function(t){var e,n;"image"===o?t.styles({img:r,width:e=2*i,height:e,x:-i,y:-i}):(e=i/2,n=Ue(r)?r:Ox.getSymbol(r),t.styles(v({path:null==n?void 0:n(0,0,e)},a)))})})},Ox.MARKER_SYMBOL_MAP=new Map,Ox.registerSymbol=function(t,e){Ox.MARKER_SYMBOL_MAP.set(t,e)},Ox.getSymbol=function(t){return Ox.MARKER_SYMBOL_MAP.get(t)};var Mx,Ex=Ox;function Ox(){return null!==Mx&&Mx.apply(this,arguments)||this}Ex.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]]}),Ex.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),Ex.registerSymbol("line",xx),Ex.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),Ex.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]]}),Ex.registerSymbol("circle",bx),Ex.registerSymbol("point",ms),Ex.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"]]}),Ex.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"]]}),Ex.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"]]}),Ex.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),Ex.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"]]}),Ex.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"]]}),Ex.registerSymbol("line",xx),Ex.registerSymbol("dot",wx),Ex.registerSymbol("dash",Hl),Ex.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]]}),Ex.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]]}),Ex.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]]}),Ex.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]]}),Ex.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]]});ye(Ax,Sx=Ls),Ax.prototype.render=function(t,e){var n,r,i=t.padding,i=void 0===i?0:i,a=t.marker,o=t.text,s=t.radius,l=t.spacing,c=t.align,u=t.verticalAlign,h=E(t,"label"),t=E(t,"background"),i=w(ax(i),4),f=i[0],d=i[1],p=i[2],i=i[3],g=ix(e,".tag-content","g").attr("className","tag-content").style("zIndex",0).node(),m=a?{marker:a}:{symbol:"triangle",size:0},a=ix(g,".tag-marker",function(){return new Ex({style:m})}).attr("className","tag-marker").call(function(t){t.node().clear()}).update(m).node(),l=(l=l,{x:(y=(a=a).getLocalBounds()).halfExtents[0]?y.max[0]+(l||0):a.style.x,y:y.halfExtents[1]?(y.min[1]+y.max[1])/2:a.style.y}),y=l.x,a=l.y,a=(x(g).maybeAppendByClassName("tag-text",function(){return new y2}).styles(v(v({fontSize:12,text:_(o)?"":"".concat(o),x:y,y:a},h),{textBaseline:"middle"})).call(function(t){o||t.remove()}),l=i,y=f,a=c||"start",h=u||"top",u=(c=g).getLocalBounds(),r=n=0,"start"===a&&(n=l),"center"===a&&(n=-u.halfExtents[0]),"end"===a&&(n=-l-2*u.halfExtents[0]),"top"===h&&(r=y+u.halfExtents[1]),"middle"===h&&(r=0),"bottom"===h&&(r=y-2*u.halfExtents[1]),c.setLocalPosition([n,r]),g.getLocalBounds());x(e).maybeAppendByClassName("tag-background","rect").styles(v({zIndex:-1,y:a.min[1]-f,x:a.min[0]-i,width:null!==t?i+d+2*a.halfExtents[0]:0,height:null!==t?f+p+2*a.halfExtents[1]:0,radius:null!=s?s:2,fill:"#fafafa",stroke:"#d9d9d9",lineWidth:1},t))},Ax.tag="tag";var Sx,_x=Ax;function Ax(t){return Sx.call(this,t,{padding:4,spacing:4})||this}var Px,Tx,Lx={small:{textFontSize:10,buttonWidth:40,buttonHeight:20,markerSize:8},middle:{textFontSize:12,buttonWidth:60,buttonHeight:30,markerSize:12},large:{textFontSize:16,buttonWidth:80,buttonHeight:40,markerSize:16}},Nx={primary:{default:{textFill:"#fff",buttonFill:"#1890ff",buttonLineWidth:0,markerFill:"#1890ff"},active:{buttonFill:"#40a9ff",markerFill:"#40a9ff"},disabled:{}},dashed:{default:{buttonFill:"transparent",buttonStroke:"#bbb",buttonLineDash:[5,5]},active:{},disabled:{}},link:{default:{textFill:"#1890ff",buttonFill:"transparent",buttonLineWidth:0,markerFill:"#1890ff"},active:{},disabled:{}},text:{default:{textFill:"#000",buttonFill:"transparent",buttonLineWidth:0,markerFill:"#000"},active:{},disabled:{}},default:{default:{textFill:"#000",buttonFill:"transparent",buttonStroke:"#bbb",markerFill:"#bbb"},active:{textFill:"#1890ff",buttonStroke:"#1890ff",markerStroke:"#1890ff"},disabled:{}}},Cx={strict:{textFill:"#b8b8b8"},buttonStroke:"#d9d9d9",buttonFill:"#f5f5f5",markerStroke:"#d9d9d9"};function jx(t){var n=Px.call(this,t,{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",state:"default",markerAlign:"left",markerSpacing:5,default:{buttonLineWidth:1,buttonRadius:5},active:{}})||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=t,n.render(n.attributes,n)},n}function Rx(t){return Tx.call(this,nt({},Rx.defaultOptions,t))||this}ye(jx,Px=Ls),Object.defineProperty(jx.prototype,"markerSize",{get:function(){var t=this.attributes.markerSymbol,e=this.getStyle("marker");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(jx.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.markerSymbol,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=dn(i)?this.getStyle("button").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(jx.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t?+t:+this.getStyle("button").height},enumerable:!1,configurable:!0}),jx.prototype.getStyle=function(t){var e=this.attributes,n=e.size,e=e.type,r=this.state,i=nt({},Lx[n],Nx[e][r],this.attributes.default,this.attributes[r]);return"disabled"===r&&(Object.keys(i).forEach(function(t){t in Cx&&(i[t]=Cx[t])}),Object.keys(Cx.strict).forEach(function(t){i[t]=Cx.strict[t]}),nt(i,this.attributes.disabled||{})),E(i,t)},jx.prototype.render=function(t,e){var n=t.text,n=void 0===n?"":n,r=t.padding,r=void 0===r?0:r,i=t.markerSymbol,t=t.markerSpacing,t=void 0===t?0:t,r=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),w(ax(r),4)),a=(r[0],r[1]),r=(r[2],r[3]),o=this.buttonHeight,s=this.getStyle("marker"),l=this.markerSize,c=v(v({},s),{symbol:i,x:r+l/2,y:o/2,size:l}),s=ix(e,".marker",function(){return new Ex({className:"marker",style:c})}).update({style:c}).node().getLocalBounds(),i=this.getStyle("text"),s=(this.textShape=ix(e,".text","text").attr("className","text").styles(v(v({x:l?s.max[0]+t:r,y:o/2},i),{text:n,textAlign:"left",textBaseline:"middle",wordWrap:!0,wordWrapWidth:this.textAvailableWidth,maxLines:1,textOverflow:"..."})).node(),this.textShape.getLocalBounds()),i=this.getStyle("button");x(e).maybeAppendByClassName(".background","rect").styles(v(v({zIndex:-1},i),{height:o,width:r+(l?l+t:0)+2*s.halfExtents[0]+a}))},jx.prototype.update=function(t){this.attr(nt({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=t,this.render(this.attributes,this)},jx.prototype.setState=function(t){this.update({state:t})},jx.prototype.hide=function(){this.style.visibility="hidden"},jx.prototype.show=function(){this.style.visibility="visible"},jx.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},jx.tag="button",ye(Rx,Tx=Ls),Rx.prototype.render=function(t,e){for(var n=t.x,r=t.y,c=t.items,i=(t.textStyle,t.padding),u=t.width,h=t.separator,i=w(ax(void 0===i?0:i),3),a=i[0],f=i[1],i=i[2],d=E(t,"tag"),p=ix(e,".container","g").styles({className:"container",x:n+i,y:r+a}),g=0,m=0,o=(p.node().removeChildren(),function(t){var e,n,r,i=c[t],a=new _x({className:"breadcrumb-item",style:v(v(v(v({x:g,y:m},d),{text:_(i.text)?i.id:i.text}),(o=["marker"],null!==(e=i)&&tn(e)?(n={},Qe(o,function(t){On.call(e,t)&&(n[t]=e[t])}),n):{})),{padding:0})}),o=(p.append(function(){return a}),a.getLocalBounds()),s=2*o.halfExtents[0],o=2*o.halfExtents[1],s=(g+=s,_(u)||u-f<g&&(a.attr({x:0,y:m+o}),g=s,m+=o),y.bindInnerEvents(a,i),h||{}),i=s.spacing,i=void 0===i?0:i,l=s.text,l=void 0===l?"/":l,s=s.style;t!==c.length-1&&(r=new y2({className:"".concat(Rx.tag,"-separator"),id:"".concat(Rx.tag,"-separator-").concat(t),style:v(v({x:g+i,y:m+o/2},s),{text:l,textAlign:"end",textBaseline:"middle"})}),p.append(function(){return r}),t=r.getLocalBounds(),g+=2*t.halfExtents[0]+i)}),y=this,s=0;s<c.length;s++)o(s)},Rx.prototype.update=function(t){this.attr(nt({},this.attributes,t)),this.render(this.attributes,this)},Rx.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)})},Rx.tag="breadcrumb",Rx.defaultOptions={style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};ye(Fx,Ix=rl),Fx.prototype.render=function(){var t=this.attributes.columns;x(this.columnsGroup).selectAll(".column").data(t.flat()).join(function(t){return t.append("rect").attr("className","column").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},Fx.prototype.update=function(t){this.attr(O2({},this.attributes,t)),this.render()},Fx.prototype.clear=function(){this.removeChildren()};var Ix,Bx=Fx;function Fx(t){var e=this,n=t.style,t=et(t,["style"]);return(e=Ix.call(this,nt({},{type:"column"},v({style:n},t)))||this).columnsGroup=new hl({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}ye(Gx,Dx=rl),Gx.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.renderLines(e),t&&this.renderAreas(t)},Gx.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},Gx.prototype.update=function(t){this.attr(O2({},this.attributes,t)),this.render()},Gx.prototype.renderLines=function(t){x(this.linesGroup).selectAll(".line").data(t).join(function(t){return t.append("path").attr("className","line").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},Gx.prototype.renderAreas=function(t){x(this.linesGroup).selectAll(".area").data(t).join(function(t){return t.append("path").attr("className","area").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.style(t)})},function(t){return t.remove()})};var Dx,zx=Gx;function Gx(t){var e=this,n=t.style,t=et(t,["style"]);return(e=Dx.call(this,nt({},{type:"lines"},v({style:n},t)))||this).linesGroup=e.appendChild(new hl),e.areasGroup=e.appendChild(new hl),e.render(),e}function Wx(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return m([e===n?"M":"L"],w(t),!1)});return e?t.reverse():t}function Hx(t,e){if(void 0===e&&(e=!1),t.length<=2)return Wx(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];Mn(a,n.slice(-2))||n.push.apply(n,m([],w(a),!1))}var o=K2(n,!1);return e?o.unshift(m(["M"],w(t[r-1]),!1)):o.unshift(m(["M"],w(t[0]),!1)),o}function Yx(t,e,n){t=yn(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}function Vx(t){return 0===t.length?[0,0]:[nn(function(t,e){if(Ke(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=Ue(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return nn(t)||0})),en(function(t,e){if(Ke(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=Ue(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return en(t)||0}))]}function qx(t){for(var e=yn(t),n=e[0].length,t=w([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}ye($x,Ux=Ls),Object.defineProperty($x.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=yn(t),sn(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty($x.prototype,"data",{get:function(){return this.attributes.isStack?qx(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty($x.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty($x.prototype,"baseline",{get:function(){var t=this.scales.y,e=w(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($x.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty($x.prototype,"linesStyle",{get:function(){var n=this,t=this.attributes,e=t.type,r=t.isStack,i=t.smooth;if("line"!==e)throw new Error("linesStyle can only be used in line type");var a,o,s,l,c,u,h,f,d,p=E(this.attributes,"area"),g=E(this.attributes,"line"),t=this.containerShape.width,e=this.data;return 0===e[0].length?{lines:[],areas:[]}:(a=this.scales,u=a.x,a=a.y,e=e,o=(u={type:"line",x:u,y:a}).x,s=u.y,l=(u=w(s.getOptions().range||[0,0],2))[0],c=u[1],l<c&&(u=w([l,c],2),c=u[0],l=u[1]),a=e.map(function(t){return t.map(function(t,e){return[o.map(e),on(s.map(t),c,l)]})}),u=[],p&&(e=this.baseline,u=r?(i?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=Hx(o),l=void 0,l=0===i?Yx(s,e,n):(a=Hx(t[i-1],!0),o=o[0],a[0][0]="L",m(m(m([],w(s),!1),w(a),!1),[m(["M"],w(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=Wx(t[i]),s=void 0,s=0===i?Yx(o,e,n):((a=Wx(t[i-1],!0))[0][0]="L",m(m(m([],w(o),!1),w(a),!1),[["Z"]],!1));r.push(s)}return r})(a,t,e):(h=i,f=t,d=e,a.map(function(t){return Yx((h?Hx:Wx)(t),f,d)}))),{lines:a.map(function(t,e){return v({stroke:n.getColor(e),path:(i?Hx:Wx)(t)},g)}),areas:u.map(function(t,e){return v({path:t,fill:n.getColor(e)},p)})})},enumerable:!1,configurable:!0}),Object.defineProperty($x.prototype,"columnsStyle",{get:function(){var i=this,a=E(this.attributes,"column"),t=this.attributes,o=t.isStack;if("column"!==t.type)throw new Error("columnsStyle can only be used in column type");var t=this.containerShape.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=qx(s));var e=this.createScales(s),l=e.x,c=e.y,e=w(Vx(s),2),n=e[0],e=e[1],u=new p1({domain:[0,e-(0<n?0:n)],range:[0,t]}),h=l.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:l.map(e),y:c.map(t),width:h,height:u.map(f[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),$x.prototype.render=function(t,e){this.container=ix(e,".container","rect").attr("className","container").node();var n=t.type,r="spark".concat(n),i="line"===n?this.linesStyle:this.columnsStyle;this.spark=ix(e,".".concat(r),function(){return new("line"===n?zx:Bx)({className:r,style:i})}).styles(i).node()},$x.prototype.getColor=function(t){var e=this.attributes.color;return Ke(e)?e[t%e.length]:Ue(e)?e.call(null,t):e},$x.prototype.createScales=function(t){var e,n=this.attributes,r=n.type,i=n.range,i=void 0===i?[]:i,a=n.isGroup,n=n.spacing,o=this.containerShape,s=o.width,o=o.height,l=w(Vx(t),2),c=l[0],l=l[1],c=new p1({domain:[null!=(e=i[0])?e:c,null!=(e=i[1])?e:l],range:[o,0]});return"line"===r?{type:r,x:new p1({domain:[0,t[0].length-1],range:[0,s]}),y:c}:{type:r,x:new n1({domain:t[0].map(function(t,e){return e}),range:[0,s],paddingInner:a?n:0}),y:c}},$x.tag="sparkline";var Ux,Xx=$x;function $x(t){return Ux.call(this,t,{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff"})||this}function Kx(n){var e,r;return n?(e=["enter","update","exit"],r=Object.fromEntries(Object.entries(n).filter(function(t){t=w(t,1)[0];return!e.includes(t)})),Object.fromEntries(e.map(function(t){var e;return"boolean"!=typeof(e=n)&&"enter"in e&&"update"in e&&"exit"in e?!1===n[t]?[t,!1]:[t,v(v({},n[t]),r)]:[t,r]}))):{enter:!1,update:!1,exit:!1}}function Zx(t,e){t?t.finished.then(e):e()}function Qx(t,e){"update"in t?t.update(e):t.attr(e)}function Jx(t,e,n){return 0===e.length?null:n?t.animate(e,n):(Qx(t,{style:e.slice(-1)[0]}),null)}function tw(r,t,e){var i={},a={};return Object.entries(t).forEach(function(t){var e,t=w(t,2),n=t[0],t=t[1];_(t)||(e=r.style[n]||r.parsedStyle[n]||0)!==t&&(i[n]=e,a[n]=t)}),e?Jx(r,[i,a],v({fill:"both"},e)):(Qx(r,a),null)}function ew(t,e){return t.style.opacity||(t.style.opacity=1),tw(t,{opacity:0},e)}var nw,rw={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},iw={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},aw={orientation:"horizontal",showLabel:!0,type:"start"},ow=E2({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track"},"slider"),sw=E2({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),lw=(ye(cw,nw=Ls),cw.prototype.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.orientation,t=et(t,["size","radius","orientation"]),a=2.4*n,r=x(e).maybeAppendByClassName(sw.iconRect,"rect").styles(v(v({},t),{width:n,height:a,radius:r,x:-n/2,y:-a/2})),o=1/3*n,s=2/3*n,l=.25*a,c=.75*a;r.maybeAppendByClassName("".concat(sw.iconLine,"-1"),"line").styles(v({x1:o,x2:o,y1:l,y2:c},t)),r.maybeAppendByClassName("".concat(sw.iconLine,"-2"),"line").styles(v({x1:s,x2:s,y1:l,y2:c},t)),r.node().setOrigin(n/2,a/2),"vertical"===i?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)},cw);function cw(){return null!==nw&&nw.apply(this,arguments)||this}ye(fw,uw=Ls),fw.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=w(ux(E(this.attributes,"label"),[]),2),i=r[0],r=r[1];j2(!!n,x(t).maybeAppendByClassName(sw.labelGroup,"g").styles(r),function(t){e.label=t.maybeAppendByClassName(sw.label,"text").styles(v(v({},iw),i)),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},fw.prototype.renderIcon=function(t){var e=this.attributes.orientation,n=v(v({orientation:e},rw),E(this.attributes,"icon")),e=this.attributes.iconShape,r=void 0===e?function(){return new lw({style:n})}:e;x(t).maybeAppendByClassName(sw.iconGroup,"g").selectAll(sw.icon.class).data([r]).join(function(t){return t.append(r).attr("className",sw.icon.name)},function(t){return t.update(n)},function(t){return t.remove()})},fw.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)};var uw,hw=fw;function fw(t){return uw.call(this,t,aw)||this}ye(gw,dw=Ls),Object.defineProperty(gw.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(gw.prototype,"sparklineStyle",{get:function(){var t;return"horizontal"!==this.attributes.orientation?null:(t=E(this.attributes,"sparkline"),v(v({zIndex:0},this.availableSpace),t))},enumerable:!1,configurable:!0}),Object.defineProperty(gw.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,t=t.trackSize,t=w(this.getOrientVal([[e,t],[t,e]]),2);return{width:t[0],height:t[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(gw.prototype,"availableSpace",{get:function(){var t=w(ax(this.attributes.padding),4),e=t[0],n=t[1],r=t[2],t=t[3],i=this.shape;return{x:t,y:e,width:i.width-(t+n),height:i.height-(e+r)}},enumerable:!1,configurable:!0}),gw.prototype.getValues=function(){return this.values},gw.prototype.setValues=function(t,e){void 0===e&&(e=!1),this.attributes.values=t=void 0===t?[0,0]:t;t=!1!==e&&this.attributes.animate;tw(this.selectionShape.node(),this.selectionStyle,t),this.updateHandlesPosition(t)},gw.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(tw(this.startHandle,this.getHandleStyle("start"),t),tw(this.endHandle,this.getHandleStyle("end"),t))},gw.prototype.innerSetValues=function(t,e){void 0===e&&(e=!1);var n=this.values,t=this.clampValues(t=void 0===t?[0,0]:t);this.attr("values",t),this.setValues(t),e&&this.onValueChange(n)},gw.prototype.renderTrack=function(t){var e=this.attributes.brushable,n=E(this.attributes,"track");this.trackShape=x(t).maybeAppendByClassName(ow.track,"rect").styles(v(v({cursor:e?"crosshair":"default"},this.shape),n))},gw.prototype.renderSparkline=function(t){var n=this;j2("horizontal"===this.attributes.orientation,x(t).maybeAppendByClassName(ow.sparklineGroup,"g"),function(t){var e=n.sparklineStyle;t.maybeAppendByClassName(ow.sparkline,function(){return new Xx({style:e})}).update(e)})},Object.defineProperty(gw.prototype,"selectionStyle",{get:function(){var t=E(this.attributes,"selection");return v(v({},t),this.calcMask())},enumerable:!1,configurable:!0}),gw.prototype.renderHandles=function(){var t,e=this,n=(this.attributes.showHandle?["start","end"]:[]).map(function(t){return{type:t}}),r=this;null!=(t=this.foregroundGroup)&&t.selectAll(ow.handle.class).data(n,function(t){return t.type}).join(function(t){return t.append(function(t){t=t.type;return new hw({style:e.getHandleStyle(t)})}).each(function(t){var e=t.type,t=(this.attr("class","".concat(ow.handle.name," ").concat(e,"-handle")),"".concat(e,"Handle"));(r[t]=this).addEventListener("pointerdown",function(t){r.onDragStart(e)(t)})})},function(t){return t.each(function(t){t=t.type;this.update(r.getHandleStyle(t))})},function(t){return t.each(function(t){t=t.type,t="".concat(t,"Handle");r[t]=void 0}).remove()})},gw.prototype.renderSelection=function(t){this.foregroundGroup=x(t).maybeAppendByClassName(ow.foreground,"g"),this.selectionShape=this.foregroundGroup.maybeAppendByClassName(ow.selection,"rect").styles(this.selectionStyle),this.renderHandles()},gw.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderSelection(e)},gw.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n=w(this.range,2),r=n[0],n=n[1],i=w(this.getValues().map(function(t){return X2(t,e)}),2),a=i[0],i=i[1],t=w((t||[a,i]).map(function(t){return X2(t,e)}),2),o=t[0],t=t[1],s=(t<o&&(o=(s=w([t,o],2))[0],t=s[1]),t-o);return n-r<s?[r,n]:o<r?a===r&&i===t?[r,t]:[r,s+r]:n<t?i===n&&a===o?[o,n]:[n-s,n]:[o,t]},gw.prototype.calcMask=function(t){var t=w(this.clampValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.x,i=n.y,a=n.width,n=n.height;return this.getOrientVal([{y:i,height:n,x:e*a+r,width:(t-e)*a},{x:r,width:a,y:e*n+i,height:(t-e)*n}])},gw.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.x,r=e.y,i=e.width,e=e.height,a=w(this.clampValues(),2),o=a[0],a=a[1],t=("start"===t?o:a)*this.getOrientVal([i,e]);return{x:n+this.getOrientVal([t,i/2]),y:r+this.getOrientVal([e/2,t])}},gw.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.orientation,n=n.formatter,i=E(this.attributes,"handle"),a=E(i,"label"),i=i.spacing,o=this.getHandleSize(),s=this.clampValues(),l=this.availableSpace,c=l.width,l=l.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=new y2({style:v(v({},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<c-h-d-r?e:-e):(e=i+o,g="start"===t?a<f-o?-e:e:a<l-f-u-o?e:-e),{x:s,y:g,text:n}},gw.prototype.getHandleLabelStyle=function(t){var e;return this.attributes.showLabel?(e=E(this.attributes,"handleLabel"),v(v({},e),this.calcHandleText(t))):{}},gw.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=E(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return v({cursor:n,shape:t,size:r},e)},gw.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.showLabel,e=e.orientation,r=this.calcHandlePosition(t),i=this.calcHandleText(t);return v(v(v(v({},cx(this.getHandleIconStyle(),"icon")),cx(v(v({},this.getHandleLabelStyle(t)),i),"label")),r),{orientation:e,showLabel:n,type:t,zIndex:3})},gw.prototype.getHandleSize=function(){var t=this.attributes,e=t.handleIconSize,n=t.width,t=t.height;return e||Math.floor((this.getOrientVal([+t,+n])+4)/2.4)},gw.prototype.getOrientVal=function(t){var t=w(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orientation?e:t},gw.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=w(this.getValues(),2),t=[r[0]+t,r[1]+e].sort();n?this.setValues(t):this.innerSetValues(t,!0)},gw.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},gw.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new Rs(n,{detail:t}))})},gw.prototype.bindEvents=function(){var t=this.selectionShape,t=(this.addEventListener("wheel",this.onScroll),t.on("mousedown",this.onDragStart("selection")),t.on("touchstart",this.onDragStart("selection")),this.dispatchCustomEvent(t,"mouseenter","selectionMouseenter"),this.dispatchCustomEvent(t,"mouseleave","selectionMouseleave"),this.dispatchCustomEvent(t,"click","selectionClick"),this.trackShape);this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"mouseenter","trackMouseenter"),this.dispatchCustomEvent(t,"mouseleave","trackMouseleave"),t.on("mousedown",this.onDragStart("track")),t.on("touchstart",this.onDragStart("track"))},gw.prototype.onScroll=function(t){var e;this.attributes.scrollable&&(e=t.deltaX,t=t.deltaY,t=this.getRatio(t||e),this.setValuesOffset(t,t,!0))},gw.tag="slider";var dw,pw=gw;function gw(t){var a=dw.call(this,t,v(v(v({animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.toString()},handleSpacing:2,orientation:"horizontal",padding:0,scrollable:!0,selectionCursor:"move",selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1]},cx(aw,"handle")),cx(rw,"handleIcon")),cx(iw,"handleLabel")))||this;return a.range=[0,1],a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(P2(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,document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){var e=a.attributes,n=e.slidable,r=e.brushable,e=(t.stopPropagation(),a.getOrientVal(P2(t))),t=e-a.prevPos;if(t){var i=a.getRatio(t);switch(a.target){case"start":n&&a.setValuesOffset(i);break;case"end":n&&a.setValuesOffset(0,i);break;case"selection":n&&a.setValuesOffset(i,i);break;case"track":if(!r)return;a.selectionWidth+=i,a.innerSetValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort(),!0)}a.prevPos=e}},a.onDragEnd=function(){document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChange=function(t){t=new Rs("valuechange",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}ye(vw,mw=Ls),Object.defineProperty(vw.prototype,"padding",{get:function(){return ax(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"value",{get:function(){var t=this.attributes.value,e=w(this.range,2),n=e[0],e=e[1];return on(t,n,e)},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,t=t.trackLength;return void 0===t?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=w(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3],t=w(this.getOrientVal([[e,t],[t,e]]),2);return{x:n,y:r,width:+t[0]-(n+i),height:+t[1]-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,t=t.trackSize;return e?t/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"thumbRadius",{get:function(){var t,e=this.attributes,n=e.isRound,e=e.thumbRadius;return n?(t=(n=this.availableSpace).width,n=n.height,e||this.getOrientVal([n,t])/2):0},enumerable:!1,configurable:!0}),vw.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,e=e.viewportLength/e.contentLength,n=w(this.range,2),r=n[0],t=t*(n[1]-r-e);return[t,t+e]},vw.prototype.getValue=function(){return this.value},vw.prototype.renderSlider=function(t){var e=this.attributes,n=e.orientation,r=e.trackSize,i=e.padding,e=e.slidable,a=E(this.attributes,"track"),o=E(this.attributes,"thumb"),s=v(v({brushable:!1,orientation:n,padding:i,selectionRadius:this.thumbRadius,showHandle:!1,slidable:e,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:r,values:this.getValues()},cx(a,"track")),cx(o,"selection"));this.slider=x(t).maybeAppendByClassName("scrollbar",function(){return new pw({style:s})}).update(s).node()},vw.prototype.render=function(t,e){this.renderSlider(e)},vw.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=w(this.range,2),i=r[0],r=r[1];this.slider.setValues(this.getValues(on(t,i,r)),e),this.onValueChange(n)},vw.prototype.bindEvents=function(){var e=this;this.slider.addEventListener("trackClick",function(t){t.stopPropagation(),e.onTrackClick(t.detail)}),this.onHover()},vw.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[1]},vw.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},vw.tag="scrollbar";var mw,yw=vw;function vw(t){var a=mw.call(this,t,{isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return a.range=[0,1],a.onValueChange=function(t){var e=a.attributes.value;t!==e&&(a.dispatchEvent(new Rs("scroll",t={detail:{oldValue:t,value:e}})),a.dispatchEvent(new Rs("valuechange",t)))},a.onTrackClick=function(t){var e,n,r,i;a.attributes.slidable&&(r=(e=w(a.getLocalPosition(),2))[0],e=e[1],n=(i=w(a.padding,4))[0],i=i[3],r=a.getOrientVal([r+i,e+n]),i=(a.getOrientVal(P2(t))-r)/a.trackLength,a.setValue(i,!0))},a.onThumbMouseenter=function(t){a.dispatchEvent(new Rs("thumbMouseenter",{detail:t.detail}))},a.onTrackMouseenter=function(t){a.dispatchEvent(new Rs("trackMouseenter",{detail:t.detail}))},a.onThumbMouseleave=function(t){a.dispatchEvent(new Rs("thumbMouseleave",{detail:t.detail}))},a.onTrackMouseleave=function(t){a.dispatchEvent(new Rs("trackMouseleave",{detail:t.detail}))},a}var bw={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new xl({style:{path:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",tickStrokeOpacity:.65,labelOverlap:[]},xw=(nt({},bw,{style:{type:"arc"}}),nt({},bw,{style:{}}),E2({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")),ww=E2({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function kw(t){return t.reduce(function(t,e,n){return t.push(m([0===n?"M":"L"],w(e),!1)),t},[])}function Mw(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)?kw(r):e?(i=q2(r[0],e),a=n?0:1,r.reduce(function(t,e,n){return 0===n?t.push(m(["M"],w(e),!1)):t.push(m(["A",i,i,0,0,a],w(e),!1)),t},[])):[]):kw(t)}function Ew(t,e,n){function r(t,e){return[l,t,c,e,s].flat()}var i=n.type,a=n.connect,o=n.center,s=n.closed?[["Z"]]:[],n=w([Mw(t,n),Mw(e.slice().reverse(),n,!0)],2),l=n[0],c=n[1],n=w([t[0],e.slice(-1)[0]],2),t=n[0],e=n[1];if("line"===a||"surround"===i)return r([m(["L"],w(e),!1)],[m(["L"],w(t),!1)]);if(o)return a=(n=w([q2(e,o),q2(t,o)],2))[0],i=n[1],r([m(["A",a,a,0,0,1],w(e),!1),m(["L"],w(e),!1)],[m(["A",i,i,0,0,0],w(t),!1),m(["L"],w(t),!1)]);throw new Error("Arc grid need to specified center")}function Ow(t,e,n){var r=n.animate,i=n.connect,a=n.areaFill;if(e.length<2||!a||!i)return[];for(var o=Array.isArray(a)?a:[a,"transparent"],s=[],l=0;l<e.length-1;l++){var c=w([e[l].points,e[l+1].points],2),c=Ew(c[0],c[1],n);s.push({path:c,fill:o[l%o.length]})}return t.selectAll(ww.region.class).data(s,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){t=M2(t,[t,e,s]);this.attr(t)}).attr("className",ww.region.name)},function(t){return t.transition(function(t,e){return tw(this,M2(t,[t,e,s]),r.update)})},function(t){return t.transition(function(){var t=this,e=ew(this,r.exit);return Zx(e,function(){return t.remove()}),e})}).transitions()}ye(Aw,Sw=Ls),Aw.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,a,o=et(t,["type","center","areaFill","closed"]),s=(s=void 0===(s=t.data)?[]:s,t.closed?s.map(function(t){var e=t.points,n=w(e,1)[0];return v(v({},t),{points:m(m([],w(e),!1),[n],!1)})}):s),l=x(e).maybeAppendByClassName(ww.lineGroup,"g"),e=x(e).maybeAppendByClassName(ww.regionGroup,"g"),o=(l=l,r=o,i=(n=t).animate,a=s.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:Mw(t.points,n)}}),l.selectAll(ww.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){t=M2(Q2(v({path:t.path},r)),[t,e,a]);this.attr(v({class:ww.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4]},t))})},function(t){return t.each(function(t,e){tw(this,M2(Q2(v({path:t.path},r)),[t,e,a]),i.update)})},function(t){return t.transition(function(){var t=this,e=ew(this,i.exit);return Zx(e,function(){return t.remove()}),e})}).transitions()),l=Ow(e,s,t);return m(m([],w(o),!1),w(l),!1)};var Sw,_w=Aw;function Aw(){return null!==Sw&&Sw.apply(this,arguments)||this}function Pw(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=w(t,2);return[t[0],M2(t[1],e)]}))}function Tw(t,e){return e&&Ue(e)?t.filter(e):t}var Lw=bn(function(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n},function(t,e){return[t,e.startAngle,e.endAngle].join()}),Nw=bn(function(t,e){var n,r,i;return"linear"===e.type?(r=(n=w(e.startPos,2))[0],n=n[1],i=w(e.endPos,2),U2([(r=w([i[0]-r,i[1]-n],2))[0],r[1]])):(i=b2(Lw(t,e)),[-Math.sin(i),Math.cos(i)])},function(t,e){var n,r,i,a="linear"===(n=e).type?(a=n.startPos,r=n.endPos,m(m([],w(a),!1),w(r),!1)):(a=n.startAngle,r=n.endAngle,i=n.center,n=n.radius,m(m([a,r],w(i),!1),[n],!1));return"arc"===e.type&&a.push(t),a.join()});function Cw(t,e,n){t=Nw(t,n);return n=t,"positive"!==e?[n[1],-n[0]]:[-n[1],n[0]]}var jw=bn(function(t,e){var n=w(e.startPos,2),r=n[0],n=n[1],e=w(e.endPos,2),e=w([e[0]-r,e[1]-n],2);return[r+e[0]*t,n+e[1]*t]},function(t,e){return m(m([t],w(e.startPos),!1),w(e.endPos),!1).join()}),Rw=bn(function(t,e){var n=e.radius,r=w(e.center,2),i=r[0],r=r[1],t=b2(Lw(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return m([t,e.startAngle,e.endAngle,e.radius],w(e.center),!1).join()});function Iw(t,e){return("linear"===e.type?jw:Rw)(t,e)}function Bw(t,e){return e-t==360}function Fw(t,e,n,r,i){function a(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]}var o=e-t,s=w([i,i],2),l=s[0],s=s[1],c=w([b2(t),b2(e)],2),u=c[0],c=c[1],h=w(a(u),2),f=h[0],h=h[1],d=w(a(c),2),p=d[0],d=d[1];return Bw(t,e)?[["M",f,h],["A",l,s,0,1,0,(c=w(a((c+u)/2),2))[0],c[1]],["A",l,s,0,1,0,p,d]]:(u=180<o?1:0,c=e<t?0:1,"M".concat(f,",").concat(h,",A").concat(l,",").concat(s,",0,").concat(u,",").concat(c,",").concat(p,",").concat(d))}function Dw(t,e,n,s){var l=e.startAngle,c=e.endAngle,u=e.center,h=e.radius;return t.selectAll(xw.line.class).data([{path:Fw.apply(void 0,m(m([l,c],w(u),!1),[h],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",xw.line.name).styles(e).styles({path:function(t){return t.path}})},function(t){return t.transition(function(){var t,r,e,n,i,a=this,o=(o=(i=(i=t=this).attributes).startAngle,e=i.endAngle,n=i.center,i=i.radius,o=m(m([o,e],w(n),!1),[i],!1),e=m(m([l,c],w(u),!1),[h],!1),(n=s.update)?(i=void 0===(i=n.duration)?0:i,r=B2(o,e),o=Math.ceil(+i/16),i=new Array(o).fill(0).map(function(t,e,n){return{__keyframe_data__:r(e/(n.length-1))}}),t.animate(i,v({fill:"both"},n))):(t.attr("__keyframe_data__",e),null));return o&&(o.onframe=i=function(){var t=En(a.attributes,"__keyframe_data__");a.style.path=Fw.apply(void 0,m([],w(t),!1))},o.onfinish=i),o}).styles(e)},function(t){return t.remove()}).styles(n).transitions()}function zw(t){var t=w(t,2),e=w(t[0],2),n=e[0],e=e[1],t=w(t[1],2);return{x1:n,y1:e,x2:t[0],y2:t[1]}}function Gw(e,t,n,r){function i(t){return e.selectAll(xw.line.class).data(t,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(xw.line.name," ").concat(t.className)}).styles(n).transition(function(t){return tw(this,zw(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return tw(this,zw(t.line),r.update)})},function(t){return t.remove()}).transitions()}var a,o,s,l=t.showTrunc,c=t.startPos,u=t.endPos,h=t.truncRange,f=t.lineExtension,d=w([c,u],2),p=w(d[0],2),g=p[0],p=p[1],d=w(d[1],2),m=d[0],d=d[1],u=w(f?(c=w([c=c,u=u,f=void 0===(f=f)?[0,0]:f],3),f=(u=w(c[0],2))[0],u=u[1],y=(a=w(c[1],2))[0],a=a[1],v=(c=w(c[2],2))[0],c=c[1],f=(y=w([y-f,a-u],2))[0],a=y[1],u=Math.sqrt(Math.pow(f,2)+Math.pow(a,2)),v=(y=w([-v/u,c/u],2))[0],c=y[1],[v*f,v*a,c*f,c*a]):new Array(4).fill(0),4),y=u[0],v=u[1],f=u[2],c=u[3];return l&&h?(u=(a=w(h,2))[0],l=a[1],o=(u=w([g+(h=m-g)*u,p+(s=d-p)*u],2))[0],u=u[1],s=(h=w([g+h*l,p+s*l],2))[0],l=h[1],h=i([{line:[[g+y,p+v],[o,u]],className:xw.lineFirst.name},{line:[[s,l],[m+f,d+c]],className:xw.lineSecond.name}]),t.truncRange,t.truncShape,t.lineExtension,h):i([{line:[[g+y,p+v],[m+f,d+c]],className:xw.line.name}])}function Ww(t,e,n){var r,i,a,o,s,l=e.type,c=E(e,"line"),n=("linear"===l?Gw:Dw)(t,e,$2(c,"arrow"),n);return t=t,l=l,c=c,r=(e=e).showArrow,i=e.showTrunc,a=e.lineArrow,o=e.lineArrowOffset,s=e.lineArrowSize,l="arc"!==l&&i?t.select(xw.lineSecond.class):t.select(xw.line.class),!r||!a||"arc"===e.type&&Bw(e.startAngle,e.endAngle)?(i=l.node())&&(i.style.markerEnd=void 0):((t=T2(a)).attr(c),J2(t,s,!0),l.style("markerEnd",t).style("markerEndOffset",-o)),n}function Hw(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function Yw(t,i){var a=i.gridLength;return t.map(function(t,e){var t=t.value,n=w(Iw(t,i),2),r=n[0],n=n[1],t=w(G2(Cw(t,i.gridDirection,i),a),2);return{id:e,points:[[r,n],[r+t[0],n+t[1]]]}})}function Vw(t,e,n,r){var i=E(n,"grid"),a=i.type,o=i.areaFill,s=Hw(n),l=Tw(e,n.gridFilter),e=("segment"===a?Yw:function(t,o){var s,l,c=o.gridControlAngles,e=Hw(o);if(!e)throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(c&&0!==c.length)return e=w(e,2),s=e[0],l=e[1],t.map(function(t,e){var t=w(Iw(t.value,o),2),n=t[0],t=t[1],n=w([n-s,t-l],2),r=n[0],i=n[1],a=[];return c.forEach(function(t){var t=b2(t),t=w([Math.cos(t),Math.sin(t)],2),e=t[0],t=t[1];a.push([r*e-i*t+s,r*t+i*e+l])}),{points:a,id:e}});throw new Error("Invalid gridControlAngles")})(l,n),c=v(v({},i),{center:s,areaFill:Ue(o)?l.map(function(t,e){return M2(o,[t,e,l])}):o,animate:r,data:e});return t.selectAll(xw.grid.class).data([1]).join(function(t){return t.append(function(){return new _w({style:c})}).attr("className",xw.grid.name)},function(t){return t.transition(function(){return this.update(c)})},function(t){return t.remove()}).transitions()}Object.defineProperty(Uw.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(Uw.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(Uw.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(Uw.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(Uw.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(Uw.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),Uw.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},Uw.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},Uw.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},Uw.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])},Uw.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},Uw.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},Uw.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},Uw.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var qw=Uw;function Uw(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 Xw(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=w(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=w(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function $w(t,e){void 0===e&&(e=[0,0,0,0]);var n=t.getEulerAngles()||0,r=(t.setEulerAngles(0),t.getLocalBounds()),i=w(r.min,2),a=i[0],i=i[1],r=w(r.max,2),o=r[0],r=r[1],s=t.getBBox(),l=s.width,s=s.height,c=0,u=0,h=a,f=i,d=("text"===t.tagName&&(s-=1.5,d=t.style.textAlign,p=t.style.textBaseline,c=+t.style.dx,u=+t.style.dy,"center"===d?h=(a+o)/2:"right"!==d&&"end"!==d||(h=o),"middle"===p?f=(i+r)/2:"bottom"!==p&&"baseline"!==p||(f=r)),w(e,4)),o=d[0],p=void 0===o?0:o,r=d[1],e=void 0===r?0:r,o=d[2],r=void 0===o?p:o,o=d[3],d=void 0===o?e:o,o=new qw;return o.set((c+=a)-d,(u+=i)-p,c+l+e,u+s+r),t.setEulerAngles(n),o.rotatedPoints(b2(n),h,f)}function Kw(t,a){var o;return m([],w(t.reduce(function(t,e,n){return n&&o&&(n=e,r=$w(r=o,i=a),Xw(n=$w(n,i),[r[0],r[1],r[2],r[3]])||Xw(n,[r[0],r[1],r[4],r[5]])||Xw(n,[r[4],r[5],r[6],r[7]])||Xw(n,[r[2],r[3],r[6],r[7]]))?(t.add(o),t.add(e)):o=e,t;var r,i},new Set)),!1)}function Zw(t,e){return void 0===e&&(e={}),_(t)?0:"number"==typeof t?t:Math.floor(px(t,e))}var Qw=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(u2(t),1))})};var Jw=new Map([["hide",function(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||2===i&&a&&o)){var s,l,c=Qw,u=function(t){return t.forEach(r.show),t},h=2,f=t.slice(),d=t.slice(),p=Math.min.apply(Math,m([1],w(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==Nw(0,n)[1]&&0!==Nw(0,n)[0]||(n=ox(t[0]).left,t=ox(t[i-1]).right,t=Math.abs(t-n)||1,h=Math.max(Math.floor(i*p/t),h)),a&&(s=f.splice(0,1)[0]),o&&(l=f.splice(-1,1)[0],f.reverse()),u(f);Kw((l?m(m([l],w(d),!1),[s],!1):m([s],w(d),!1)).filter(_2),null==e?void 0:e.margin).length;)(l&&!s&&h%2==0||l&&s)&&f.splice(0,1).forEach(r.hide),d=c(u(f),{seq:h}),h++}}],["rotate",function(t,e,n,r){for(var i=void 0===(o=e.optionalAngles)?[0,45,90]:o,a=e.margin,e=void 0===(o=e.recoverWhenFailed)||o,o=t.map(function(t){return t.getLocalEulerAngles()}),s=function(n){return t.forEach(function(t,e){e=Ke(n)?n[e]:n;r.rotate(t,+e)})},l=0;l<i.length;l++)if(s(i[l]),Kw(t,a).length<1)return;e&&s(o)}],["ellipsis",function(t,e,n,r){if(!(t.length<=1))for(var i=void 0===(a=e.suffix)?"...":a,a=e.minLength,o=void 0===(o=e.maxLength)?1/0:o,s=void 0===(s=e.step)?" ":s,l=void 0===(e=e.margin)?[0,0,0,0]:e,e=gx(r.getTextShape(t[0])),c=Zw(s,e),u=a?Zw(a,e):c,s=Zw(o,e),h=(!_(s)&&s!==1/0||(s=Math.max.apply(null,t.map(function(t){return t.getBBox().width}))),t.slice()),f=((a=w(l,4))[0],a[1],a[2],a[3],s);u+c<f;f-=c){var d=function(e){if(h.forEach(function(t){r.ellipsis(r.getTextShape(t),e,i)}),(h=Kw(t,l)).length<1)return{value:void 0}}(f);if("object"==typeof d)return d.value}}]]);function tk(r,i,a){var t=i.labelOverlap,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e=t.type,n=Jw.get(e);!function(t,e,n){if(!(e.labelOverlap.length<1))if("hide"===n){for(var r=t[0];r;){if("offscreen"===r.className)return;r=r.parent}return 1}else return"rotate"===n?!t.some(function(t){return!(null==(t=t.attr("transform"))||!t.includes("rotate"))}):"ellipsis"!==n||1<t.map(function(t){return t.querySelector("text")}).length}(r,i,e)||null==n||n(r,t,i,a)})}function ek(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}var nk=bn(function(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),r=e[0],e=e[1],n=w([n*r+t*e,n*e-t*r],2),e=n[0],t=n[1];return Math.atan2(t,e)},function(t,e){return m(m([],w(t),!1),w(e),!1).join()});function rk(t,e){return Cw(t,e.labelDirection,e)}function ik(t,e,n){var r,i=n.labelAlign;return(null==(r=e.style.transform)?void 0:r.includes("rotate"))?e.getLocalEulerAngles():(r=0,e=rk(t.value,n),t=Nw(t.value,n),"horizontal"===i?0:(r="perpendicular"===i?nk([1,0],e):nk([t[0]<0?-1:1,0],t),R2(n=((n=x2(r))+360)%180,-90,90)||(n+=180),n))}function ak(t,e,n){var r=n.type,i=n.labelAlign,t=rk(t,n),n=ek(e),e=ek(x2(nk([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":R2(n,90,270)?R2(e,90,270)?"start":"end":R2(e,90,270)?"end":"start";if(0===e){if(R2(n,0,90,!1,!0))return"start";if(R2(n,0,90)||R2(n,270,360))return"start"}if(90===e){if(R2(n,0,90,!1,!0))return"start";if(R2(n,90,180)||R2(n,270,360))return"end"}if(270===e){if(R2(n,0,90,!1,!0))return"end";if(R2(n,90,180)||R2(n,270,360))return"start"}if(180===e){if(90===n)return"start";if(R2(n,0,90)||R2(n,270,360))return"end"}return"start"}function ok(t,e,n){var r=n.showTick,i=n.tickLength,a=n.tickDirection,o=n.labelDirection,s=n.labelSpacing,l=e.indexOf(t),s=M2(s,[t,l,e]),o=w([rk(t.value,n),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)}(o,a)],2),a=w(W2(G2(o[0],s+(1===o[1]?M2(r?i:0,[t,l,e]):0)),Iw(t.value,n)),2);return{x:a[0],y:a[1]}}function sk(t,e){"text"===t.nodeName&&t.attr(e)}function lk(r){tk(this.node().childNodes,r,{hide:u2,show:c2,rotate:function(t,e){var n;e=+e,n=r,(t=t).setLocalEulerAngles(e),e=ak(t.__data__.value,e,n),(n=t.querySelector(xw.labelItem.class))&&sk(n,{textAlign:e})},ellipsis:function(t,e,n){void 0===e&&(e=1/0),t&&A2(t,e,n)},getTextShape:function(t){return t.querySelector("text")}})}function ck(t,e,n,r,i){var a,o,s,l,c,u=n.indexOf(e),h=x(t).append((a=e,o=u,s=n,c=(l=i).labelFormatter,Ue(c)?function(){return T2(M2(c,[a,o,s,rk(a.value,l)]))}:function(){return T2(a.label||"")})).attr("className",xw.labelItem.name).node(),r=w(ux(Pw(r,[e,u,n])),2),u=r[0],n=r[1],r=n.transform,n=et(n,["transform"]),f=(mx(t,r),ik(e,t,i));return t.setLocalEulerAngles(+f),sk(h,v({textAlign:ak(e.value,f,i),textBaseline:"middle"},u)),mx(t,r),t.attr(n),h}function uk(n,f,d,p){var t=Tw(f,d.labelFilter),g=E(d,"label");return n.selectAll(xw.label.class).data(t,function(t,e){return e}).join(function(t){return t.append("g").attr("className",xw.label.name).transition(function(t){return ck(this,t,f,g,d),this.attr(ok(t,f,d)),null}).call(function(){return lk.call(n,d)})},function(t){return t.transition(function(t){var e,n,r,i,a,o,s,l=this.querySelector(xw.labelItem.class),c=ck(this,t,f,g,d),u=(e=l,n=c,l=p.update,void 0===r&&(r="destroy"),l?(c=void 0===(c=l.duration)?0:c,i=void 0===(i=l.delay)?0:i,a=Math.ceil(+c/2),c=+c/4,o=(u=w((s=function(t){var e,n;return"circle"===t.nodeName?(n=(e=w(t.getLocalPosition(),2))[0],e=e[1],[n-(n=t.attr("r")),e-n]):t.getLocalPosition()})(e),2))[0],u=u[1],s=w(s(n),2),s=(o=w([(o+s[0])/2-o,(u+s[1])/2-u],2))[0],u=o[1],o=e.animate([{opacity:1,transform:"translate(0, 0)"},{opacity:0,transform:"translate(".concat(s,", ").concat(u,")")}],v(v({fill:"both"},l),{duration:i+a+c})),Zx(s=n.animate([{opacity:0,transform:"translate(".concat(-s,", ").concat(-u,")"),offset:.01},{opacity:1,transform:"translate(0, 0)"}],v(v({fill:"both"},l),{duration:a+c,delay:i+a-c})),h),[o,s]):(h(),[null]));function h(){"destroy"===r?e.destroy():"hide"===r&&u2(e),n.isVisible()&&c2(n)}l=tw(this,ok(t,f,d),p.update);return m(m([],w(u),!1),[l],!1)}).call(function(t){var e,t=En(t,"_transitions").flat().filter(_2);e=function(){return lk.call(n,d)},0===(t=t).length?e():Promise.all(t.map(function(t){return null==t?void 0:t.finished})).then(e)})},function(t){return t.transition(function(){var t=this,e=ew(this,p.exit);return Zx(e,function(){return x(t).remove()}),e})}).transitions()}function hk(t,e){return Cw(t,e.tickDirection,e)}var fk=bn(function(t,e){t=w(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return m(m([],w(t),!1),[e],!1).join()});function dk(t,e,n,r,i,a,o){var s=hk(t.value,a),a=(c=t,u=e,h=n,l=s,a=(a=a).tickLength,l=w(fk(l,M2(a,[c,u,h])),2),a=w(l[0],2),c=a[0],u=a[1],h=w(l[1],2),{x1:c,x2:h[0],y1:u,y2:h[1]}),l=a.x1,c=a.x2,u=a.y1,h=a.y2,a=w(ux(Pw(o,[t,e,n,s])),2),o=a[0],t=a[1];"line"===r.node().nodeName&&r.styles(v({x1:l,x2:c,y1:u,y2:h},o)),i.attr(t),r.styles(o)}function pk(t,e,n,r,i,a){o=x(this),s=t,l=e,c=n,h=(u=r).tickFormatter,f=hk(s.value,u),u="line",Ue(h)&&(u=function(){return M2(h,[s,l,c,f])});dk(t,e,n,o.append(u).attr("className",xw.tickItem.name),this,r,i);var o,s,l,c,u,h,f,e=w(Iw(t.value,r),2);return tw(this,{x:e[0],y:e[1]},a)}var gk=E2({text:"text"},"title");function mk(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):2<t.length?[t[0]]:t.split("")}function yk(r,t){t=Object.entries(t).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1];return r.node().attr(n)||(t[n]=e),t},{});r.styles(t)}ye(xk,vk=Ls),xk.prototype.getAvailableSpace=function(){var t=this.attributes,r=t.width,i=t.height,e=t.position,n=t.spacing,t=t.inset,a=this.querySelector(gk.text.class);if(!a)return new w2(0,0,+r,+i);var a=a.getBBox(),o=a.width,s=a.height,a=w(ax(n),4),l=a[0],c=a[1],u=a[2],h=a[3],n=w([0,0,+r,+i],4),f=n[0],d=n[1],p=n[2],g=n[3],a=mk(e);if(a.includes("i"))return new w2(f,d,p,g);a.forEach(function(t,e){var n;"t"===t&&(n=w(0===e?[s+u,+i-s-u]:[0,+i],2),d=n[0],g=n[1]),"r"===t&&(n=w([+r-o-h],1),p=n[0]),"b"===t&&(n=w([+i-s-l],1),g=n[0]),"l"===t&&(n=w(0===e?[o+c,+r-o-c]:[0,+r],2),f=n[0],p=n[1])});n=w(ax(t),4),e=n[0],a=n[1],t=n[2],n=n[3],a=w([n+a,e+t],2),t=a[0],a=a[1];return new w2(f+n,d+e,p-t,g-a)},xk.prototype.getBBox=function(){return this.title?this.title.getBBox():new w2(0,0,0,0)},xk.prototype.render=function(t,e){var n,r,i,a,o,s,l=this,c=(t.width,t.height,t.position,t.spacing,et(t,["width","height","position","spacing"])),u=w(ux(c),1)[0],h=(h=(t=t).width,r=t.height,t=t.position,i=w([+h/2,+r/2],2),a=(i=w([+i[0],+i[1],"center","middle"],4))[0],o=i[1],s=i[2],i=i[3],(t=mk(t)).includes("l")&&(a=(n=w([0,"start"],2))[0],s=n[1]),t.includes("r")&&(a=(n=w([+h,"end"],2))[0],s=n[1]),t.includes("t")&&(o=(h=w([0,"top"],2))[0],i=h[1]),t.includes("b")&&(o=(n=w([+r,"bottom"],2))[0],i=n[1]),{x:a,y:o,textAlign:s,textBaseline:i}),f=h.x,d=h.y,p=h.textAlign,g=h.textBaseline;j2(!!c.text,x(e),function(t){l.title=t.maybeAppendByClassName(gk.text,"text").styles(u).call(yk,{x:f,y:d,textAlign:p,textBaseline:g}).node()})};var vk,bk=xk;function xk(t){return vk.call(this,t,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}function wk(t,e,n,r,i){var a,o,s,l,c,u,h,f,d=w(ux(E(r,"title")),2),p=d[0],d=d[1],g=d.transform,g=void 0===g?"":g,d=et(d,["transform"]),m=(t.styles(p),e.styles(d),mx(t.node(),g),p=x(n._offscreen||n.querySelector(xw.mainGroup.class)),d=e,r=void 0===(r=(n=r).titlePosition)?"lb":r,a=n.titleSpacing,o=mk(r),p=p.node().getLocalBounds(),s=(l=w(p.min,2))[0],l=l[1],c=(p=w(p.halfExtents,2))[0],p=p[1],u=(d=w(d.node().getLocalBounds().halfExtents,2))[0],d=d[1],l=(s=w([s+c,l+p],2))[0],s=s[1],y=(a=w(ax(a),4))[0],h=a[1],f=a[2],a=a[3],["start","end"].includes(r)&&"linear"===n.type?(m=n.startPos,n=n.endPos,n=(r=w("start"===r?[m,n]:[n,m],2))[0],m=(r=w(G2(U2([-(m=r[1])[0]+n[0],-m[1]+n[1]]),y),2))[0],r=r[1],{x:n[0]+m,y:n[1]+r}):(o.includes("t")&&(s-=p+d+y),o.includes("r")&&(l+=c+u+h),o.includes("l")&&(l-=c+u+a),o.includes("b")&&(s+=p+d+f),{x:l,y:s})),n=m.x,r=m.y,y=tw(e.node(),{x:n,y:r},i);return mx(t.node(),g),y}function kk(e,t,o,s){var n=e.showLine,r=e.showTick,i=e.showLabel,n=j2(n,t.maybeAppendByClassName(xw.lineGroup,"g"),function(t){return Ww(t,e,s)})||[],r=j2(r,t.maybeAppendByClassName(xw.tickGroup,"g"),function(t){return t=t,r=s,i=Tw(o,(n=e).tickFilter),a=E(n,"tick"),t.selectAll(xw.tick.class).data(i,function(t){return t.id||t.label}).join(function(t){return t.append("g").attr("className",xw.tick.name).transition(function(t,e){return pk.call(this,t,e,i,n,a,!1)})},function(t){return t.transition(function(t,e){return this.removeChildren(),pk.call(this,t,e,i,n,a,r.update)})},function(t){return t.transition(function(){var t=this,e=ew(this,r.exit);return Zx(e,function(){return t.remove()}),e})}).transitions();var n,r,i,a})||[],i=j2(i,t.maybeAppendByClassName(xw.labelGroup,"g"),function(t){return uk(t,o,e,s)})||[];return m(m(m([],w(n),!1),w(r),!1),w(i),!1).filter(function(t){return!!t})}ye(Ok,Mk=Ls),Ok.prototype.render=function(o,t,e){var s=this,n=o.titleText,r=o.data,i=o.animate,a=o.showTitle,l=o.showGrid,c=o.dataThreshold,u=o.truncRange,h=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}(r,c).filter(function(t){t=t.value;return!(u&&t>u[0]&&t<u[1])}),f=Kx(void 0===e?i:e),r=j2(l,x(t).maybeAppendByClassName(xw.gridGroup,"g"),function(t){return Vw(t,h,o,f)})||[],c=x(t).maybeAppendByClassName(xw.mainGroup,"g"),i=(n&&(!this.initialized&&f.enter||this.initialized&&f.update)&&kk(o,x(this.offscreenGroup),h,Kx(!1)),kk(o,x(c.node()),h,f)),e=j2(a,x(t).maybeAppendByClassName(xw.titleGroup,"g"),function(t){return e=t,n=s,i=f,(r=o).titleText?(a=r.titleText,e.selectAll(xw.title.class).data([{title:a}],function(t,e){return t.title}).join(function(t){return t.append(function(){return T2(a)}).attr("className",xw.title.name).transition(function(){return wk(x(this),e,n,r,i.enter)})},function(t){return t.transition(function(){return wk(x(this),e,n,r,i.update)})},function(t){return t.remove()}).transitions()):null;var e,n,r,i,a})||[];return m(m(m([],w(r),!1),w(i),!1),w(e),!1).flat().filter(function(t){return!!t})};var Mk,Ek=Ok;function Ok(t){return Mk.call(this,t,bw)||this}var Sk,_k=E2({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"),Ak=(ye(Pk,Sk=Ls),Object.defineProperty(Pk.prototype,"defaultPage",{get:function(){var t=this.attributes.initPage;return on(t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(Pk.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(Pk.prototype,"controllerShape",{get:function(){return 1<this.totalPages?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(Pk.prototype,"pageShape",{get:function(){var n,t=this.pageViews,t=w((n=t.map(function(t){t=t.getBBox();return[t.width,t.height]}),((null==(t=n[0])?void 0:t.map(function(t,e){return n.map(function(t){return t[e]})}))||[]).map(function(t){return Math.max.apply(Math,m([],w(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}),Pk.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(Pk.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(Pk.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),Pk.prototype.getBBox=function(){var t=Sk.prototype.getBBox.call(this),e=t.x,t=t.y,n=this.controllerShape,r=this.pageShape,i=r.pageWidth,r=r.pageHeight;return new w2(e,t,i+n.width,r)},Pk.prototype.goTo=function(t){var e=this,n=this.attributes.animate,r=this.currPage,i=this.playState,a=this.playWindow,o=this.pageViews;if("idle"!==i||t<0||o.length<=0||t>=o.length)return null;o[r].setLocalPosition(0,0),this.prepareFollowingPage(t);i=w(this.getFollowingPageDiff(t),2),o=i[0],r=i[1],this.playState="running",i=Jx(a,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-o,", ").concat(-r,")")}],n);return Zx(i,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),i},Pk.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&n<=0?null:(t=t?(n-1+e)%e:on(n-1,0,e),this.goTo(t))},Pk.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&e-1<=n?null:(t=t?(n+1)%e:on(n+1,0,e),this.goTo(t))},Pk.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,e=e.pageHeight;n&&e?(this.clipPath=t.maybeAppendByClassName(_k.clipPath,"rect").styles({width:n,height:e}),this.contentGroup.attr("clipPath",this.clipPath.node())):this.contentGroup.style.clipPath=void 0},Pk.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(t,e){(n.includes(e)?c2:u2)(t)})},Pk.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orientation,r=r.controllerPadding,a=n.getBBox(),o=a.width,a=(a.height,w("horizontal"===i?[-180,0]:[-90,90],2)),s=a[0],a=a[1],s=(t.setLocalEulerAngles(s),e.setLocalEulerAngles(a),t.getBBox()),a=s.width,s=s.height,l=e.getBBox(),c=l.width,l=l.height,c=Math.max(a,o,c),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[c/2,-s-r],[c/2,0],[c/2,l+r]],textAlign:"center"},a=w(i.offset,3),o=w(a[0],2),s=o[0],c=o[1],l=w(a[1],2),r=l[0],o=l[1],l=w(a[2],2),a=l[0],l=l[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,c),n.setLocalPosition(r,o),e.setLocalPosition(a,l)},Pk.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(_k.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},Pk.prototype.getFollowingPageDiff=function(t){var e,n,r,i=this.currPage;return i===t?[0,0]:(e=this.attributes.orientation,n=(r=this.pageShape).pageWidth,r=r.pageHeight,t=t<i?-1:1,"horizontal"===e?[t*n,0]:[0,t*r])},Pk.prototype.prepareFollowingPage=function(t){var e,n=this.currPage,r=this.pageViews;this.setVisiblePages([t,n]),t!==n&&(e=(n=w(this.getFollowingPageDiff(t),2))[0],n=n[1],r[t].setLocalPosition(e,n))},Pk.prototype.renderController=function(t){var e,n,r,i,a,o=this,s=this.attributes.controllerSpacing,l=this.pageShape,c=l.pageWidth,l=l.pageHeight,u=2<=this.pageViews.length,t=t.maybeAppendByClassName(_k.controller,"g");h2(t.node(),u),u&&(u=E(this.attributes,"button"),e=E(this.attributes,"pageNum"),i=(u=w(ux(u),2))[0],u=u[1],n=i.size,r=et(i,["size"]),i=!t.select(_k.prevBtnGroup.class).node(),a=t.maybeAppendByClassName(_k.prevBtnGroup,"g").styles(u),this.prevBtnGroup=a.node(),a=a.maybeAppendByClassName(_k.prevBtn,"path"),u=t.maybeAppendByClassName(_k.nextBtnGroup,"g").styles(u),this.nextBtnGroup=u.node(),[a,u.maybeAppendByClassName(_k.nextBtn,"path")].forEach(function(t){t.styles(v(v({},r),{transformOrigin:"center"})),J2(t.node(),n,!0)}),a=t.maybeAppendByClassName(_k.pageInfoGroup,"g"),this.pageInfoGroup=a.node(),a.maybeAppendByClassName(_k.pageInfo,"text").styles(e),this.updatePageInfo(),t.node().setLocalPosition(c+s,l/2),i)&&(this.prevBtnGroup.addEventListener("click",function(){o.prev()}),this.nextBtnGroup.addEventListener("click",function(){o.next()}))},Pk.prototype.render=function(t,e){e=x(e);this.renderClipPath(e),this.renderController(e),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},Pk.prototype.bindEvents=function(){var t=this,e=vn(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(b.INSERTED,e),this.playWindow.addEventListener(b.REMOVED,e)},Pk);function Pk(t){var e,n,t=Sk.call(this,t,{animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonPath:[["M",(t=0)-(n=6),(e=0)-n],["L",t+n,e],["L",t-n,e+n],["Z"]],buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(t,e){return"".concat(t,"/").concat(e)},initPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return t.playState="idle",t.contentGroup=t.appendChild(new hl({class:_k.contentGroup.name})),t.playWindow=t.contentGroup.appendChild(new hl({class:_k.playWindow.name})),t.innerCurrPage=t.defaultPage,t}function Tk(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}Ex.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"]]}),Ex.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]]}),Ex.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=E2({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");ye(jk,Nk=Ls),Object.defineProperty(jk.prototype,"showValue",{get:function(){var t=this.attributes.valueText;return!!t&&("string"==typeof t||"number"==typeof t?""!==t:"function"==typeof t||""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(jk.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes.markerSize,t=t.node().getBBox(),r=t.width,t=t.height,e=e.node().getBBox(),i=e.width,e=e.height;return{markerWidth:n,labelWidth:r,valueWidth:i,height:Math.max(n,t,e)}},enumerable:!1,configurable:!0}),Object.defineProperty(jk.prototype,"span",{get:function(){var t,e=this.attributes.span;return e?(t=(e=w(ax(e),2))[0],e=e[1],[t/(e=t+(t=this.showValue?e:0)),t/e]):[1,1]},enumerable:!1,configurable:!0}),Object.defineProperty(jk.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=w(this.spacing,2),s=o[0],o=o[1];return t&&(t=t-e-s-o,e=w(this.span,2),a=(e=w([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(jk.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=w(ax(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(jk.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,t=t.height,a=w(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}),Object.defineProperty(jk.prototype,"scaleSize",{get:function(){var t=(t=(t=this.markerGroup.node()).querySelector(Lk.marker.class))?t.style:{},e=this.attributes,n=e.markerSize,r=e.markerStrokeWidth,r=void 0===r?t.strokeWidth:r,i=e.markerLineWidth,i=void 0===i?t.lineWidth:i,e=e.markerStroke,t=void 0===e?t.stroke:e,e=+(r||i||(t?1:0))*Math.sqrt(2),r=this.markerGroup.node().getBBox(),i=r.width,t=r.height;return(1-e/Math.max(i,t))*n},enumerable:!1,configurable:!0}),jk.prototype.renderMarker=function(t){var e=this,n=this.attributes.marker,r=E(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(Lk.markerGroup,"g").style("zIndex",0),j2(!!n,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(Lk.marker,n).styles(r),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]),J2(e.markerGroup.node(),e.scaleSize,!0)})},jk.prototype.renderLabel=function(t){var e=E(this.attributes,"label"),n=e.text,e=et(e,["text"]);this.labelGroup=t.maybeAppendByClassName(Lk.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(Lk.label,function(){return T2(n)}).styles(e)},jk.prototype.renderValue=function(t){var e=this,n=E(this.attributes,"value"),r=n.text,i=et(n,["text"]);this.valueGroup=t.maybeAppendByClassName(Lk.valueGroup,"g").style("zIndex",0),j2(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(Lk.value,function(){return T2(r)}).styles(i)})},jk.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=E(this.attributes,"background");this.background=t.maybeAppendByClassName(Lk.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(Lk.background,"rect").styles(v({width:n,height:e},r))},jk.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,t=w(t.position,3),i=t[0],a=t[1],t=t[2],r=r/2;this.markerGroup.styles({x:i,y:r}),this.labelGroup.styles({x:a,y:r}),A2(this.labelGroup.select(Lk.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({x:t,y:r}),A2(this.valueGroup.select(Lk.value.class).node(),Math.ceil(n)))},jk.prototype.render=function(t,e){e=x(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()};var Nk,Ck=jk;function jk(t){return Nk.call(this,t,{span:[1,1],marker:function(){return new al({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}function Rk(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var Ik,Bk=E2({page:"item-page",navigator:"navigator",item:"item"},"items"),Fk=(ye(Dk,Ik=Ls),Object.defineProperty(Dk.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(Dk.prototype,"grid",{get:function(){var t=this.attributes,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(Dk.prototype,"renderData",{get:function(){var t=this.attributes,a=t.data,o=t.layout,s=E(this.attributes,"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,labelText:r,valueText:i},Object.fromEntries(Object.entries(s).map(function(t){t=w(t,2);return[t[0],M2(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),Dk.prototype.getGridLayout=function(){var u=this,t=this.attributes,h=t.orientation,f=t.width,d=t.rowPadding,p=t.colPadding,g=w(this.navigatorShape,1)[0],t=w(this.grid,2),m=t[0],y=t[1],v=y*m,b=0;return this.pageViews.children.map(function(t,e){var n,r=Math.floor(e/v),i=e%v,a=u.ifHorizontal(y,m),a=[Math.floor(i/a),i%a],a=("vertical"===h&&a.reverse(),w(a,2)),o=a[0],a=a[1],s=(f-g-(y-1)*p)/y,t=t.getBBox().height,l=w([0,0],2),c=l[0],l=l[1];return b="horizontal"===h?(c=(n=w([b,o*(t+d)],2))[0],l=n[1],a===y-1?0:b+s+p):(c=(n=w([a*(s+p),b],2))[0],l=n[1],o===m-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:c,y:l}})},Dk.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,t=w(this.navigatorShape,1)[0],r=w(this.grid,2),s=r[0],l=r[1],r=w([e-t,n],2),c=r[0],u=r[1],e=w([0,0,0,0,0,0,0,0],8),h=e[0],f=e[1],d=e[2],p=e[3],g=e[4],m=e[5],y=e[6],v=e[7];return this.pageViews.children.map(function(t,e){var t=t.getBBox(),n=t.width,t=t.height,r=0===y?0:o,i=y+r+n;return i<=c&&Rk(g,function(t){return t<l})?(r=w([y+r,v,i],3),h=r[0],f=r[1],y=r[2]):(i=w([m+1,0,0,v+t+a],4),m=i[0],g=i[1],y=i[2],(v=i[3])+a+t<=u&&Rk(m,function(t){return t<s})?(r=w([y,v,n],3),h=r[0],f=r[1],y=r[2]):(i=w([0,0,n,0,d+1,0,0,0],8),h=i[0],f=i[1],y=i[2],v=i[3],d=i[4],p=i[5],m=i[6],g=i[7])),{width:n,height:t,x:h,y:f,page:d,index:e,pageIndex:p++,row:m,col:g++}})},Object.defineProperty(Dk.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}),Dk.prototype.ifHorizontal=function(t,e){return Tk(this.attributes.orientation,t,e)},Dk.prototype.flattenPage=function(e){e.querySelectorAll(Bk.item.class).forEach(function(t){e.appendChild(t)}),e.querySelectorAll(Bk.page.class).forEach(function(t){e.removeChild(t).destroy()})},Dk.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,i=e.mouseleave,a=(this.flattenPage(t),this.dispatchCustomEvent.bind(this));x(t).selectAll(Bk.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){t=t.style;return new Ck({style:t})}).attr("className",Bk.item.name).on("click",function(){null!=n&&n(this),a("itemClick",{item:this})}).on("pointerenter",function(){null!=r&&r(this),a("itemMouseenter",{item:this})}).on("pointerleave",function(){null!=i&&i(this),a("itemMouseleave",{item:this})})},function(t){return t.each(function(t){t=t.style;this.update(t)})},function(t){return t.remove()})},Dk.prototype.relayoutNavigator=function(){var t=this.attributes,e=t.layout,t=t.width,n=(null==(n=this.pageViews.children[0])?void 0:n.getBBox().height)||0,r=w(this.navigatorShape,2),i=r[0],r=r[1];this.navigator.update("grid"===e?{pageWidth:t-i,pageHeight:n-r}:{})},Dk.prototype.adjustLayout=function(){var n,e=this,t=Object.entries((t=this.itemsLayout,n="page",t.reduce(function(t,e){return(t[e[n]]=t[e[n]]||[]).push(e),t},{}))).map(function(t){t=w(t,2);return{page:t[0],layouts:t[1]}}),u=m([],w(this.navigator.getContainer().children),!1);t.forEach(function(t){var t=t.layouts,c=e.pageViews.appendChild(new hl({className:Bk.page.name}));t.forEach(function(t){var n,r,i,e=t.x,a=t.y,o=t.index,s=t.width,l=t.height,o=u[o];c.appendChild(o),n=t,r=o,(i=an(t="__layout__")?t.split("."):t).forEach(function(t,e){e<i.length-1?(Ze(r[t])||(r[t]=sn(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:l})})}),this.relayoutNavigator()},Dk.prototype.renderNavigator=function(t){var e=this.attributes.orientation,n=E(this.attributes,"nav"),r=O2({orientation:e},n),i=this;return t.selectAll(Bk.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new Ak({style:r})}).attr("className",Bk.navigator.name).each(function(){i.navigator=this})},function(t){return t.each(function(){this.update(r)})},function(t){return t.remove()}),this.navigator},Dk.prototype.getBBox=function(){return this.navigator.getBBox()},Dk.prototype.render=function(t,e){var n=this.attributes.data;n&&0!==n.length&&(n=this.renderNavigator(x(e)),this.renderItems(n.getContainer()),this.adjustLayout())},Dk.prototype.dispatchCustomEvent=function(t,e){t=new Rs(t,{detail:e});this.dispatchEvent(t)},Dk);function Dk(t){t=Ik.call(this,t,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:kn,mouseenter:kn,mouseleave:kn})||this;return t.navigatorShape=[0,0],t}var zk,Gk=E2({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),Wk={showLabel:!0,formatter:function(t){return t.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},Hk=(ye(Yk,zk=Ls),Yk.prototype.render=function(t,e){var n=x(e).maybeAppendByClassName(Gk.markerGroup,"g"),n=(this.renderMarker(n),x(e).maybeAppendByClassName(Gk.labelGroup,"g"));this.renderLabel(n)},Yk.prototype.renderMarker=function(t){var r=this,e=this.attributes,n=e.orientation,e=e.markerSymbol,i=void 0===e?Tk(n,"horizontalHandle","verticalHandle"):e;j2(!!i,t,function(t){var e=E(r.attributes,"marker"),n=v({symbol:i},e);r.marker=t.maybeAppendByClassName(Gk.marker,function(){return new Ex({style:n})}).update(n)})},Yk.prototype.renderLabel=function(t){var s=this,e=this.attributes,n=e.showLabel,l=e.orientation,r=e.spacing,c=void 0===r?0:r,u=e.formatter;j2(n,t,function(t){var e=E(s.attributes,"label"),n=e.text,e=et(e,["text"]),r=(null==(r=t.select(Gk.marker.class))?void 0:r.node().getBBox())||{},i=r.width,r=r.height,r=w(Tk(l,[0,(void 0===r?0:r)+c,"center","top"],[(void 0===i?0:i)+c,0,"start","middle"]),4),i=r[0],a=r[1],o=r[2],r=r[3];t.maybeAppendByClassName(Gk.label,"text").styles(v(v({},e),{x:i,y:a,text:u(n).toString(),textAlign:o,textBaseline:r}))})},Yk);function Yk(t){return zk.call(this,t,Wk)||this}var Vk,Fl={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},qk=O2({},Fl,{}),Uk=O2({},Fl,cx(Wk,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),Xk=E2({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),$k=(ye(Kk,Vk=Ls),Kk.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,r=r.titleText,a=w(ux(E(this.attributes,"title")),2),o=a[0],a=a[1],s=(this.titleGroup=t.maybeAppendByClassName(Xk.titleGroup,"g").styles(a),v(v({width:e,height:n},o),{text:i?r:""}));this.title=this.titleGroup.maybeAppendByClassName(Xk.title,function(){return new bk({style:s})}).update(s)},Kk.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,e=e.height,a=w(ux(E(this.attributes,"title",!0)),2),o=a[0],a=a[1],s=v(v({},o),{width:i,height:e,x:0,y:0}),l=(this.itemsGroup=t.maybeAppendByClassName(Xk.itemsGroup,"g").styles(v({x:n,y:r},a)),this);this.itemsGroup.selectAll(Xk.items.class).data(["items"]).join(function(t){return t.append(function(){return new Fk({style:s})}).attr("className",Xk.items.name).each(function(){l.items=x(this)})},function(t){return t.update(s)},function(t){return t.remove()})},Kk.prototype.adjustLayout=function(){var t,e;this.attributes.showTitle&&(t=(e=this.title.node().getAvailableSpace()).x,e=e.y,this.itemsGroup.node().setLocalPosition(t,e))},Object.defineProperty(Kk.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?this.title.node().getAvailableSpace():new w2(0,0,n,t)},enumerable:!1,configurable:!0}),Kk.prototype.getBBox=function(){var t,e,n,r,i,a,o,s,l,c,u=null==(u=this.title)?void 0:u.node(),h=null==(h=this.items)?void 0:h.node();return u&&h?(h=h,t=(r=(u=u).attributes).position,e=r.spacing,n=r.inset,r=r.text,u=u.getBBox(),i=h.getBBox(),t=mk(t),e=(r=w(ax(r?e:0),4))[0],a=r[1],o=r[2],r=r[3],s=(n=w(ax(n),4))[0],l=n[1],c=n[2],n=n[3],a=(r=w([r+a,e+o],2))[0],e=r[1],r=(o=w([n+l,s+c],2))[0],n=o[1],"l"===t[0]?new w2(u.x,u.y,i.width+u.width+a+r,Math.max(i.height+n,u.height)):"t"===t[0]?new w2(u.x,u.y,Math.max(i.width+r,u.width),i.height+u.height+e+n):(s=(l=w([h.attributes.width||i.width,h.attributes.height||i.height],2))[0],c=l[1],new w2(i.x,i.y,s+u.width+a+r,c+u.height+e+n))):Vk.prototype.getBBox.call(this)},Kk.prototype.render=function(t,e){var n=t.width,t=t.height,e=x(e);this.renderTitle(e,n,t),this.renderItems(e,this.availableSpace),this.adjustLayout()},Kk);function Kk(t){return Vk.call(this,t,qk)||this}var Zk,Qk={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(t){return t.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",zIndex:999},Jk=E2({background:"background",labelGroup:"label-group",label:"label"},"indicator"),tM=(ye(eM,Zk=Ls),eM.prototype.renderBackground=function(){var t,e,n,r,i,a,o;this.label&&(t=(i=this.attributes).position,o=(i=w(ax(i.padding),4))[0],e=i[1],n=i[2],i=i[3],a=(r=this.label.node().getLocalBounds()).min,r=r.max,i=[[a[0]-i,a[1]-o],[r[0]+e,r[1]+n]],a=this.getPath(t,i),o=E(this.attributes,"background"),this.background=x(this.group).maybeAppendByClassName(Jk.background,"path").styles(v(v({},o),{path:a})),this.group.appendChild(this.label.node()))},eM.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,t=w(ux(E(this.attributes,"label")),2),r=t[0],t=t[1],r=(r.text,et(r,["text"]));this.label=x(this.group).maybeAppendByClassName(Jk.labelGroup,"g").styles(t),n&&this.label.maybeAppendByClassName(Jk.label,function(){return T2(e(n))}).style("text",e(n).toString()).selectAll("text").styles(r)},eM.prototype.adjustLayout=function(){var t=w(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},eM.prototype.getPath=function(n,t){var r=this,t=w(t,2),e=w(t[0],2),i=e[0],e=e[1],t=w(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=w(t,2),e=t[0],t=t[1];return e===o[n]?r.createCorner(t):[m(["M"],w(t[0]),!1),m(["L"],w(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},eM.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=function(t,e){var n=(t=w(t,2))[0],t=t[1],r=(e=w(e,2))[0],e=e[1];return n!==r&&t===e}.apply(void 0,m([],w(t),!1)),t=w(t,2),r=w(t[0],2),i=r[0],r=r[1],t=w(t[1],2),a=t[0],t=t[1],a=w(n?[a-i,[i,a]]:[t-r,[r,t]],2),t=a[0],a=w(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=w([o,o+s-t,o+s,o+s+t,a],5),s=o[0],t=o[1],a=o[2],l=o[3],o=o[4];return n?(this.point=[a,r-e],[["M",s,r],["L",t,r],["L",a,r-e],["L",l,r],["L",o,r]]):(this.point=[i+e,a],[["M",i,s],["L",i,t],["L",i+e,a],["L",i,l],["L",i,o]])},eM.prototype.bindEvents=function(){this.label.on(b.BOUNDS_CHANGED,this.renderBackground)},eM.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},eM);function eM(t){t=Zk.call(this,t,Qk)||this;return t.point=[0,0],t.group=t.appendChild(new hl({})),t.isMutationObserved=!0,t}function nM(t,e){var t=w(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 rM=E2({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function iM(t){var e=t.orientation,n=t.size,t=t.length;return Tk(e,[t,n],[n,t])}function aM(t){var e=t.type,t=w(iM(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 oM(t){var i,a,o,e=t.orientation,r=t.color,n=t.block,t=t.partition,s=(l=Ue(r)?new Array(20).fill(0).map(function(t,e,n){return r(e/(n.length-1))}):r).length,l=l.map(function(t){return wo(t).toString()});return s?1===s?l[0]:n?(i=t,n=e,a=Array.from(l),o=i.length,new Array(o).fill(0).reduce(function(t,e,n){var r=a[n%a.length];return t+" ".concat(i[n],":").concat(r).concat(n<o-1?" ".concat(i[n+1],":").concat(r):"")},"l(".concat("horizontal"===n?"0":"270",")"))):l.reduce(function(t,e,n){return t+" ".concat(n/(s-1),":").concat(e)},"l(".concat(Tk(e,"0","270"),")")):""}function sM(t,e){var n,r,i,a=E(e,"selection"),o=oM(e),t=t.maybeAppendByClassName(rM.selection,"path").styles(v({path:aM(e),fill:o},a)),a=t.maybeAppendByClassName(rM.clipPath,"path").styles({path:(a=(o=e).orientation,(e=o.range)?(r=(o=w(iM(o),2))[0],o=o[1],n=(e=w(e,2))[0],e=e[1],i=Tk(a,n*r,0),n=Tk(a,0,n*o),r=Tk(a,e*r,r),[["M",i,n],["L",i,i=Tk(a,o,e*o)],["L",r,i],["L",r,n],["Z"]]):[])}).node();t.style("clip-path",a)}ye(uM,lM=Ls),uM.prototype.render=function(t,e){var n,r,i=x(e).maybeAppendByClassName(rM.trackGroup,"g");i=i,r=E(n=t,"track"),i.maybeAppendByClassName(rM.track,"path").styles(v({path:aM(n)},r)),sM(x(e).maybeAppendByClassName(rM.selectionGroup,"g"),t)};var lM,cM=uM;function uM(t){return lM.call(this,t,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}var hM,fM,dM,pM,gM=bn(function(t){return{min:Math.min.apply(Math,m([],w(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,m([],w(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),mM=(ye(c,hM=Ls),Object.defineProperty(c.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.7,.9)},enumerable:!1,configurable:!0}),c.prototype.getBBox=function(){var t=this.attributes,e=t.width,t=t.height;return new w2(0,0,e,t)},c.prototype.render=function(t,e){var n=this,t=t.showLabel,r=(this.renderTitle(x(e)),this.availableSpace),i=r.x,r=r.y,e=x(e).maybeAppendByClassName(Xk.contentGroup,"g").styles({x:i,y:r}),i=(j2(!!t,e.maybeAppendByClassName(Xk.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)}),e.maybeAppendByClassName(Xk.ribbonGroup,"g").styles({zIndex:0}));this.handlesGroup=e.maybeAppendByClassName(Xk.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(i),this.renderIndicator(e),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(c.prototype,"range",{get:function(){var t=this.attributes.data;return gM(t)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,t=t.max;return this.innerRibbonScale.update({domain:[e,t],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ribbonRange",{get:function(){var t=w(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(c.prototype,"selection",{get:function(){var t=this.range,e=t.min,t=t.max,n=this.attributes.defaultValue,e=w(void 0===n?[e,t]:n,2);return[e[0],e[1]]},enumerable:!1,configurable:!0}),c.prototype.ifHorizontal=function(t,e){return Tk(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},c.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,i=e.width,e=e.height,a=E(this.attributes,"title"),o=v(v({},a),{width:i,height:e,text:r}),s=this;t.selectAll(Xk.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new bk({style:o})}).attr("className",Xk.title.name).each(function(){s.title=this})},function(t){return t.update(o)},function(t){return t.each(function(){s.title=void 0}).remove()})},Object.defineProperty(c.prototype,"availableSpace",{get:function(){var t,e;return this.title?this.title.getAvailableSpace():(t=(e=this.attributes).width,e=e.height,new w2(0,0,t,e))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"labelFixedSpacing",{get:function(){return this.attributes.showTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"labelPosition",{get:function(){var t=this.attributes,e=t.orientation,t=t.labelDirection;return{vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}}[e][t]},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"labelBBox",{get:function(){var t,e;return this.attributes.showLabel?(this.cacheLabelBBox||(t=(e=(null==(e=this.label.querySelector(xw.labelGroup.class))?void 0:e.children.slice(-1)[0]).getBBox()).width,e=e.height,this.cacheLabelBBox=new w2(0,0,t,e)),this.cacheLabelBBox):new w2(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"labelShape",{get:function(){var t,e=this.attributes,n=e.showLabel,e=e.labelSpacing,e=void 0===e?0:e;return n?{width:t=(n=this.labelBBox).width,height:n=n.height,size:this.ifHorizontal(n,t)+e+this.labelFixedSpacing,length:this.ifHorizontal(t,n)}:{width:0,height:0,size:0,length:0}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ribbonBBox",{get:function(){var t=this.attributes.showHandle,e=this.availableSpace,n=e.width,e=e.height,r=this.labelShape,i=r.size,r=r.length,n=w(this.ifHorizontal([e,n],[n,e]),2),e=n[0],n=n[1],t=t?this.handleShape:{size:0,length:0},a=t.size,t=t.length,o=this.handleOffsetRatio,s=0,l=this.labelPosition,s=["bottom","right"].includes(l)?Math.min(e-i,(e-a)/o):a<e*(1-o)?Math.max(e-i,0):Math.max((e-i-a)/o,0),e=Math.max(t,r),a=n-e,o=w(this.ifHorizontal([a,s],[s,a]),2),t=o[0],r=o[1],n=["top","left"].includes(l)?i:0,s=w(this.ifHorizontal([e/2,n],[n,e/2]),2),a=s[0],o=s[1];return new w2(a,o,t,r)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,t=t.height;return this.ifHorizontal({size:t,length:e},{size:e,length:t})},enumerable:!1,configurable:!0}),c.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,i=e.orientation,a=e.color,e=e.block,o=E(this.attributes,"ribbon"),s=this.range,l=s.min,c=s.max,s=this.ribbonBBox,u=s.x,s=s.y,h=this.ribbonShape,f=h.length,h=h.size,d=O2({x:u,y:s,length:f,size:h,type:r,orientation:i,color:a,block:e,partition:n.map(function(t){return(t.value-l)/(c-l)}),range:this.ribbonRange},o);this.ribbon=t.maybeAppendByClassName(Xk.ribbon,function(){return new cM({style:d})}).update(d)},c.prototype.getHandleClassName=function(t){return"".concat(Xk.prefix("".concat(t,"-handle")))},c.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,t=t.orientation,n=E(this.attributes,"handle"),r=w(this.selection,2),i=r[0],r=r[1],a=v(v({},n),{orientation:t}),o=this;this.handlesGroup.selectAll(Xk.handle.class).data(e?[{value:i,type:"start"},{value:r,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new Hk({style:a})}).attr("className",function(t){t=t.type;return"".concat(Xk.handle," ").concat(o.getHandleClassName(t))}).each(function(t){var e=t.type,t=t.value,t=(this.update({labelText:t}),"".concat(e,"Handle"));(o[t]=this).addEventListener("pointerdown",o.onDragStart(e))})},function(t){return t.update(a).each(function(t){t=t.value;this.update({labelText:t})})},function(t){return t.each(function(t){t=t.type,t="".concat(t,"Handle");o[t]=void 0}).remove()})},c.prototype.adjustHandles=function(){var t=w(this.selection,2),e=t[0],t=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",t)},Object.defineProperty(c.prototype,"handleBBox",{get:function(){if(!this.cacheHandleBBox){if(!this.attributes.showHandle)return new w2(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,t=t.height,n=this.endHandle.getBBox(),r=n.width,n=n.height,e=w([Math.max(e,r),Math.max(t,n)],2),r=e[0],t=e[1];this.cacheHandleBBox=new w2(0,0,r,t)}return this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,t=t.height,n=w(this.ifHorizontal([t,e],[e,t]),2);return{width:e,height:t,size:n[0],length:n[1]}},enumerable:!1,configurable:!0}),c.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,i=r.x,r=r.y,a=this.ribbonShape.size,e=this.getOffset(e),i=w(this.ifHorizontal([i+e,r+a*this.handleOffsetRatio],[i+a*this.handleOffsetRatio,r+e]),2),a=i[0],r=i[1],e=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null!=e&&e.update({x:a,y:r,formatter:n})},c.prototype.renderIndicator=function(t){var e=E(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(Xk.indicator,function(){return new tM({})}).update(e)},Object.defineProperty(c.prototype,"labelData",{get:function(){var s=this;return this.attributes.data.reduce(function(t,e,n,r){var i,a,o=null!=(o=null==e?void 0:e.id)?o:n.toString();return t.push(v(v({},e),{id:o,index:n,type:"value",label:null!=(i=null==e?void 0:e.label)?i:e.value.toString(),value:s.ribbonScale.map(e.value)})),n<r.length-1&&(i=r[n+1],a=((i=(r=w([e.value,i.value],2))[0])+(r=r[1]))/2,t.push(v(v({},e),{id:o,index:n,type:"range",range:[i,r],label:[i,r].join("~"),value:s.ribbonScale.map(a)}))),t},[])},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"labelStyle",{get:function(){var t=w(["center","middle"],2),e=t[0],t=t[1],n=this.labelPosition;return"top"===n?t="bottom":"bottom"===n?t="top":"left"===n?e="end":"right"===n&&(e="start"),{labelTextAlign:e,labelTextBaseline:t}},enumerable:!1,configurable:!0}),c.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,n=void 0!==n&&n,r=e.labelFilter,e=e.labelFormatter,i=E(this.attributes,"label"),a=i.align,o=E(i,"tick"),i=E(i,"tick",!0),n=O2(v({showLine:!1,showGrid:!1,showTick:n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),cx(o,"tick"),cx(i,"label"),{data:this.labelData}),o={tickFilter:function(t,e,n){return"value"===(null==t?void 0:t.type)&&(!r||r(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===a&&(!r||r(t,t.index,n.filter(function(t){return t.type===a})))},labelFormatter:e},s=v(v({},n),o);this.label=t.maybeAppendByClassName(Xk.label,function(){return new Ek({style:s})}).node(),this.label.update(s,!1)},Object.defineProperty(c.prototype,"labelAxisStyle",{get:function(){var t=this.attributes,e=t.showTick,n=t.labelDirection,t=t.labelSpacing,r=this.ribbonShape.size,i=this.labelPosition,a=this.labelFixedSpacing,o=w([0,0,0],3),s=o[0],l=o[1],o=o[2],c=r+t;return e?(o=c,l=a,"positive"===n?"right"===i?o=s=c:"bottom"===i&&(s=o):"negative"!==n||"top"!==i&&"left"!==i||(s=r)):"positive"===n?"right"===i?l=c:"bottom"===i&&(s=r+a,l=t):"negative"!==n||"left"!==i&&"top"!==i||(l=t),{offset:s,spacing:l,tickLength:o}},enumerable:!1,configurable:!0}),c.prototype.adjustLabel=function(){var t,e,n,r,i,a,o;this.attributes.showLabel&&(o=(a=this.ribbonBBox).x,t=a.y,i=a.width,a=a.height,e=(r=this.labelAxisStyle).offset,n=r.spacing,r=r.tickLength,a=(i=w(this.ifHorizontal([[o,t+e],[o+i,t+e]],[[o+e,t+a],[o+e,t]]),2))[0],o=i[1],this.label.update({startPos:a,endPos:o,tickLength:r,labelSpacing:n},!1))},c.prototype.bindEvents=function(){this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},c.prototype.showIndicator=function(t,e){var n,r,i,a;void 0===e&&(e="".concat(t)),this.attributes.showIndicator&&"number"==typeof t?(i=(a=this.range).min,a=a.max,n=(r=this.ribbonBBox).x,r=r.y,t=on(t,i,a),i=this.getOffset(t),a=this.ifHorizontal([i+n,r],[n,i+r]),this.indicator.update({x:a[0],y:a[1],position:this.ifHorizontal("top","left"),labelText:e}),c2(this.indicator.node())):this.hideIndicator()},c.prototype.hideIndicator=function(){u2(this.indicator.node())},c.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},c.prototype.setSelection=function(t,e){this.updateSelection(t,e)},c.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=w(this.selection,2),c=l[0],l=l[1],t=w([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.range),c=n.min,l=n.max,u=w((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=w(n,2))[0],n=n[1],a=(c=w(c,2))[0],c=c[1],o=(l=w(l,2))[0],l=l[1],c=(a=w([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=w([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[X2(c,r),X2(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(c.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 dn(t)?X2(.01*(e-n),0):t},enumerable:!1,configurable:!0}),c.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?nM(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},c.prototype.getValueByCanvasPoint=function(t,e){var n=this.range,r=n.min,n=n.max,i=w(this.ribbon.node().getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,m([],w(P2(t)),!1));return on(this.getOffset(i-a,!0),r,n)},c.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,n=n.max,i=this.ribbonShape.length,a=this.eventToOffsetScale;return a.update({domain:[r,n],range:[0,i]}),e?a.invert(t):a.map(t)},c.prototype.dispatchSelection=function(){var t=new Rs("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},c.prototype.dispatchIndicated=function(t,e){t=new Rs("indicate",{detail:{value:t,range:e}});this.dispatchEvent(t)},c);function c(t){var a=hM.call(this,t,Uk)||this;return a.eventToOffsetScale=new p1({}),a.innerRibbonScale=new p1({}),a.cacheLabelBBox=null,a.cacheHandleBBox=null,a.onHovering=function(t){var e=a.attributes,n=e.data,e=e.block,t=(t.stopPropagation(),a.getValueByCanvasPoint(t));e?(e=nM(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(),w(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 yM(t){fM||(fM=document.createElement("table"),pM=document.createElement("tr"),dM=/^\s*<(\w+|!)[^>]*>/,pM={tr:document.createElement("tbody"),tbody:fM,thead:fM,tfoot:fM,td:pM,th:pM,"*":document.createElement("div")});var e=dM.test(t)&&RegExp.$1,e=(e&&e in pM||(e="*"),pM[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 vM,bM,xM,wM="tooltip",kM="tooltip-title",MM="tooltip-list",EM="tooltip-list-item",OM="tooltip-list-item-name",SM="tooltip-list-item-marker",_M="tooltip-list-item-name-label",AM="tooltip-list-item-value",ql="tooltip-crosshair-x",ec="tooltip-crosshair-y",Kl={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},PM=((r={})[".".concat(wM)]={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"},r[".".concat(kM)]={color:"rgba(0, 0, 0, 0.45)"},r[".".concat(MM)]={margin:"0px","list-style-type":"none",padding:"0px"},r[".".concat(EM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},r[".".concat(SM)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},r[".".concat(OM)]={display:"flex","align-items":"center","max-width":"216px"},r[".".concat(_M)]=v({flex:1},Kl),r[".".concat(AM)]=v({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},Kl),r[".".concat(ql)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r[".".concat(ec)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r),TM=(ye(LM,vM=Ls),Object.defineProperty(LM.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),LM.prototype.getContainer=function(){return this.element},Object.defineProperty(LM.prototype,"position",{set:function(t){var t=w(t,2),e=t[0],t=t[1];this.attributes.x=e,this.attributes.y=t,this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(LM.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(LM.prototype,"HTMLTooltipItemsElements",{get:function(){var t=this.attributes,e=t.data,o=t.template;return e.map(function(t,e){var n,r=t.name,r=void 0===r?"":r,i=t.color,i=void 0===i?"black":i,a=t.index,t=et(t,["name","color","index"]),r=v({name:r,color:i,index:null!=a?a:e},t);return yM((i=o.item,n=r,i&&n?i.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):i))})},enumerable:!1,configurable:!0}),LM.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},LM.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),vM.prototype.destroy.call(this)},LM.prototype.show=function(t,e){var n,r=this;void 0!==t&&void 0!==e&&(n=this.element.style.transition,this.element.style.transition="none",this.position=[null!=t?t:+this.attributes.x,null!=e?e:+this.attributes.y],setTimeout(function(){r.element.style.transition=n},10)),this.element.style.visibility="visible"},LM.prototype.hide=function(){this.element.style.visibility="hidden"},LM.prototype.initShape=function(){var t=this.attributes.template;this.element=yM(t.container),this.id&&this.element.setAttribute("id",this.id)},LM.prototype.renderCustomContent=function(){var t;(void 0===this.prevCustomContentKey||this.prevCustomContentKey!==this.attributes.contentKey)&&(this.prevCustomContentKey=this.attributes.contentKey,t=this.attributes.content)&&("string"==typeof t?this.element.innerHTML=t:this.element.replaceChildren(t))},LM.prototype.renderHTMLTooltipElement=function(){var r,t=this.attributes,e=t.template,n=t.title,i=t.enterable,a=t.style,t=t.content,o=this.element;this.element.style.pointerEvents=i?"auto":"none",t?this.renderCustomContent():(n?(o.innerHTML=e.title,o.getElementsByClassName(kM)[0].innerHTML=n):null!=(t=null==(i=o.getElementsByClassName(kM))?void 0:i[0])&&t.remove(),e=this.HTMLTooltipItemsElements,(n=document.createElement("ul")).className=MM,n.replaceChildren.apply(n,m([],w(e),!1)),(i=this.element.querySelector(".".concat(MM)))?i.replaceWith(n):o.appendChild(n)),r=o,Object.entries(a).forEach(function(t){var t=w(t,2),e=t[0],n=t[1];m([r],w(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(":"),";")},""))})})},LM.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,i=e.offset,e=t||n,t=("auto"===e?"bottom-right":e).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},n=this.elementSize,o=n.width,s=n.height,l=[-o/2,-s/2];return t.forEach(function(t){var e=w(l,2),n=e[0],e=e[1],t=w(a[t],2),r=t[0],t=t[1];l=[n+(o/2+i[0])*r,e+(s/2+i[1])*t]}),l},LM.prototype.setOffsetPosition=function(t){var t=w(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,i=void 0===i?0:i,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat(+(void 0===r?0:r)+a+e,"px"),this.element.style.top="".concat(+i+n+t,"px")},LM.prototype.updatePosition=function(){this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor()))},LM.prototype.autoPosition=function(t){var e,n,r,i,t=w(t,2),a=t[0],t=t[1],o=this.attributes,s=o.x,l=o.y,c=o.bounding,u=o.position,o=o.defaultPosition;return"auto"!==u?[a,t]:(e=(u=this.element).offsetWidth,u=u.offsetHeight,a=(s=w([+s+a,+l+t],2))[0],l=s[1],n={left:"right",right:"left",top:"bottom",bottom:"top"},t=c.x,s=c.y,r={left:a<t,right:t+c.width<a+e,top:l<s,bottom:s+c.height<l+u},i=[],o.split("-").forEach(function(t){i.push(r[t]?n[t]:t)}),t=i.join("-"),this.getRelativeOffsetFromCursor(t))},LM.tag="tooltip",t([(void 0===(bM=100)&&(bM=0),void 0===(xM=!0)&&(xM=!1),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,xM&&i.apply(t,e),r=window.setTimeout(function(){i.apply(t,e),r=null},bM))})})],LM.prototype,"updatePosition",null),LM);function LM(t){t=vM.call(this,t,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",defaultPosition:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(wM,'"></div>'),title:'<div class="'.concat(kM,'"></div>'),item:'<li class="'.concat(EM,'" data-index={index}>\n <span class="').concat(OM,'">\n <span class="').concat(SM,'" style="background:{color}"></span>\n <span class="').concat(_M,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(AM,'" title="{value}">{value}</span>\n </li>')},style:PM})||this;return t.prevCustomContentKey=t.attributes.contentKey,t.initShape(),t.render(t.attributes,t),t}var NM,CM={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 jM(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 RM(t){return NM.call(this,t,{x:0,y:0,size:"default",spacing:2,checked:!0,disabled:!1})||this}ye(RM,NM=Ls),RM.prototype.render=function(t,e){var i=this,n=t.size,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=(this.attributes,x(e).maybeAppendByClassName("switch-content","g").node()),l=e.getLocalBounds(),n=En(CM,n,CM.default),c=n.sizeStyle,u=n.tagStyle,h=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",f=c,d=o?t:s,p=((t||s)&&x(e).maybeAppendByClassName("switch-tag",function(){return new _x({})}).call(function(t){var e,t=t.node(),n=(t.update(v(v({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]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);f=v(v({},c),{width:n}),t.update((t={x:l.min[0],y:l.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}))}),x(e).maybeAppendByClassName("switch-background","rect").styles(v({zIndex:(e.style.zIndex||0)-1,x:l.min[0],y:l.min[1],fill:n,cursor:h,fillOpacity:r?.4:1},f)).node()),g=x(e).maybeAppendByClassName("switch-background-stroke","rect").styles(v({zIndex:(e.style.zIndex||0)-2,x:l.min[0],y:l.min[1],stroke:n,lineWidth:0},f)).node();x(e).maybeAppendByClassName("switch-handle","rect").styles({fill:"#fff",cursor:h}).call(function(t){var e,t=t.node(),n=jM(p,a,o),r=jM(p,a,!o);t.attr("x")&&!Mn(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},RM.tag="switch";var IM,BM,FM,DM,zM={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},zl=O2({},zM,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),bs=O2({},zM,{type:"circle",defaultRadius:0}),Rl=O2({},zM,{type:"polygon",defaultRadius:0,startAngle:0}),vs=(ye(GM,IM=Ls),Object.defineProperty(GM.prototype,"localPointer",{get:function(){var t=w(this.getPosition(),2),e=t[0],t=t[1],n=w(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(GM.prototype,"tagStyle",{get:function(){return E(this.attributes,"tag")},enumerable:!1,configurable:!0}),Object.defineProperty(GM.prototype,"crosshairStyle",{get:function(){var t=E(this.attributes,"line");return v(v({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),GM.prototype.render=function(t,e){var e=x(e).maybeAppendByClassName(".crosshair-group","g").node(),n=(this.shapesGroup=e,this.tagStyle),r=this.crosshairStyle;this.tagShape=x(e).maybeAppendByClassName("crosshair-tag",function(){return new _x({style:n})}).styles(n).node(),this.crosshairShape=x(e).maybeAppendByClassName(".crosshair-path","path").styles(r).node(),this.adjustLayout()},GM.prototype.setPointer=function(t){this.pointer=t},GM.tag="crosshair-base",GM);function GM(t){return IM.call(this,t,zM)||this}function WM(t){return BM.call(this,O2({},WM.defaultOptions,t))||this}function HM(t){return FM.call(this,O2({},HM.defaultOptions,t))||this}function YM(t){return DM.call(this,O2({},YM.defaultOptions,t))||this}ye(WM,BM=vs),Object.defineProperty(WM.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=w(t.startPos,2),n=e[0],e=e[1],t=w(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(WM.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=w(this.getPosition(),2))[0],e=e[1],[(n=w(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(WM.prototype,"isVertical",{get:function(){var t=this.attributes,e=w(t.startPos,2),n=e[0],e=e[1],t=w(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(WM.prototype,"tagShapeSpace",{get:function(){var t,e=(t=(t=this.tagShape)&&t.getRenderBounds())?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0};return{width:e.width,height:e.height}},enumerable:!1,configurable:!0}),WM.prototype.update=function(t){BM.prototype.update.call(this,t)},WM.prototype.setPointer=function(t){BM.prototype.setPointer.call(this,t),this.adjustPosition()},WM.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},WM.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},WM.prototype.adjustPosition=function(){var t=w(this.localPointer,2),e=t[0],t=t[1],n=w(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},WM.prototype.adjustTag=function(){var t,e=this.attributes,n=e.tagText,r=e.tagPosition,i=w(e.startPos,2),a=i[0],i=i[1],e=w(e.endPos,2),o=e[0],e=e[1];n&&""!==n?(c2(this.tagShape),t=(n=this.tagShapeSpace).width,n=n.height,a=(o=w(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)):u2(this.tagShape)},WM.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},WM.tag="line-crosshair",WM.defaultOptions={style:zl},ye(HM,FM=vs),Object.defineProperty(HM.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),HM.prototype.update=function(t){FM.prototype.update.call(this,t)},HM.prototype.setPointer=function(t){var t=w(t,2),e=t[0],t=t[1],e=(FM.prototype.setPointer.call(this,[e,t]),w(this.localPointer,2)),t=e[0],e=e[1],n=w(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})},HM.prototype.adjustLayout=function(){u2(this.tagShape)},HM.prototype.createCirclePath=function(t){var e=this.attributes,n=w(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return bx(r,n,t||e)},HM.tag="circle-crosshair",HM.defaultOptions={style:bs},ye(YM,DM=vs),Object.defineProperty(YM.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),YM.prototype.update=function(t){DM.prototype.update.call(this,t)},Object.defineProperty(YM.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],h=[],f=0;f<l;f+=1)h.push((t=u,e=[0,0],n=s/180*Math.PI+c*f,a=r=i=r=void 0,r=(t=w(t,2))[0],t=t[1],i=(e=w(e,2))[0],e=e[1],r-=i,t-=e,a=Math.sin(n),n=Math.cos(n),[r*n-t*a+i,r*a+t*n+e]));return h},enumerable:!1,configurable:!0}),YM.prototype.setPointer=function(t){var t=w(t,2),e=t[0],t=t[1],e=(DM.prototype.setPointer.call(this,[e,t]),w(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=w(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=C2(n,[t,e])/C2(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},YM.prototype.adjustLayout=function(){u2(this.tagShape)},YM.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=w(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=w(t,2),t=w(G2([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},YM.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=w(t,2),c=t[0],u=t[1],h=this.points,t=w(this.attributes.center,2),f=t[0],d=t[1],p=1;p<=h.length;p+=1){var g=w(h[p-1],2),m=g[0],g=g[1],y=w(h[p%h.length],2),v=y[0],y=y[1],m=(i=[f,d],m=[m+f,g+d],g=[v+f,y+d],l=s=o=a=y=v=void 0,y=(r=w(r=[c,u],2))[0],r=r[1],a=(i=w(i,2))[0],i=i[1],o=(m=w(m,2))[0],m=m[1],s=(g=w(g,2))[0],g=g[1],l=[],(g-m)*(a-y)==(i-r)*(s-o)?(i-r)*(o-y)==(m-r)*(a-y)&&(L2(y,a,r,i,o,m)&&N2(l,o,m),L2(y,a,r,i,s,g)&&N2(l,s,g),L2(o,s,m,g,y,r)&&N2(l,y,r),L2(o,s,m,g,a,i))&&N2(l,a,i):(v=(y*(i-r)+m*(a-y)-r*(a-y)-o*(i-r))/((s-o)*(i-r)-(a-y)*(g-m)),0<=(g=(o*(g-m)+r*(s-o)-m*(s-o)-y*(g-m))/((a-y)*(g-m)-(s-o)*(i-r)))&&g<=1&&0<=v&&v<=1&&(l[0]=y+g*(a-y),l[1]=r+g*(i-r))),l);0!==m.length&&(e=(s=w(m,2))[0],n=s[1])}return[e,n]},YM.tag="polygon-crosshair",YM.defaultOptions={style:Rl};var VM,qM=cx({fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"},"label"),UM={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"}},XM={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function $M(t){return VM.call(this,t,v({x:0,y:0,labelText:"",spacing:4,checked:!1},qM))||this}ye($M,VM=Ls),$M.prototype.render=function(t,e){var n=t.checked,r=t.spacing,n=(this.checked=!!n,ix(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=E(t,"box"),i=E(t,"checked"),t=E(t,"label"),e=v(v({},this.checked?UM.selected:UM.default),e),i=v(v({},XM),i),i=(this.checkboxBoxShape=ix(n,".checkbox-box","rect").styles(v({className:"checkbox-box",zIndex:(n.style.zIndex||0)-1},e)).node(),ix(this.checkboxBoxShape,".checkbox-checked","path").styles(v({className:"checkbox-box-checked",stroke:"#fff"},i)),e=this.checkboxBoxShape,i=Number(r),{x:(r=e.getLocalBounds()).halfExtents[0]?r.max[0]+(i||0):e.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:e.style.y}),r=i.x,e=i.y;ix(n,".checkbox-label","text").styles(v({className:"checkbox-label",x:r,y:e},t))},$M.tag="checkbox";var KM="gui-poptip",ZM="gui-poptip-arrow",QM="gui-poptip-text",JM=((s={})[".".concat(KM)]={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"},s[".".concat(QM)]={"text-align":"center"},s[".".concat(KM,"[data-position='top']")]={transform:"translate(-50%, -100%)"},s[".".concat(KM,"[data-position='left']")]={transform:"translate(-100%, -50%)"},s[".".concat(KM,"[data-position='right']")]={transform:"translate(0, -50%)"},s[".".concat(KM,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},s[".".concat(KM,"[data-position='top-left']")]={transform:"translate(0,-100%)"},s[".".concat(KM,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},s[".".concat(KM,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},s[".".concat(KM,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},s[".".concat(KM,"[data-position='right-top']")]={transform:"translate(0, 0)"},s[".".concat(KM,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},s[".".concat(KM,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},s[".".concat(KM,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},s[".".concat(ZM)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},s[".".concat(KM,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},s["[data-position='top'] .".concat(ZM)]={bottom:"-2px"},s[".".concat(KM,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},s["[data-position='left'] .".concat(ZM)]={right:"-2px"},s[".".concat(KM,"[data-position='right']")]={transform:"translate(5px, -50%)"},s["[data-position='right'] .".concat(ZM)]={left:"-2px"},s[".".concat(KM,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},s["[data-position='bottom'] .".concat(ZM)]={top:"-2px"},s[".".concat(KM,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},s["[data-position='top-left'] .".concat(ZM)]={left:"10px",bottom:"-2px"},s[".".concat(KM,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},s["[data-position='top-right'] .".concat(ZM)]={right:"10px",bottom:"-2px"},s[".".concat(KM,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},s["[data-position='left-top'] .".concat(ZM)]={right:"-2px",top:"8px"},s[".".concat(KM,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},s["[data-position='left-bottom'] .".concat(ZM)]={right:"-2px",bottom:"8px"},s[".".concat(KM,"[data-position='right-top']")]={transform:"translate(5px, 0)"},s["[data-position='right-top'] .".concat(ZM)]={left:"-2px",top:"8px"},s[".".concat(KM,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},s["[data-position='right-bottom'] .".concat(ZM)]={left:"-2px",bottom:"8px"},s[".".concat(KM,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},s["[data-position='bottom-left'] .".concat(ZM)]={top:"-2px",left:"8px"},s[".".concat(KM,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},s["[data-position='bottom-right'] .".concat(ZM)]={top:"-2px",right:"8px"},s),tE=void 0;var eE;function nE(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function rE(t){var n,r;return n=nE,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(tE,t)}(t)}function iE(t){t=eE.call(this,nt({style:{id:"gui-poptip"}},iE.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}ye(iE,eE=Ls),Object.defineProperty(iE.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),iE.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},iE.prototype.update=function(t){this.attr(nt({},this.style,t)),this.render(this.attributes,this)},iE.prototype.bind=function(u,h){var f,t,e,d=this;u&&(f=this.style.text,e=function(){d.hideTip()},u.addEventListener("mousemove",t=function(t){var e,n,r=u,i=d.style,a=f,o=(h&&(n=(s="function"==typeof h?h.call(null,t):h).html,e=s.target,s=et(s,["html","target"]),c={},o=d.style,s=s,o&&gn(c,o),s&&gn(c,s),l&&gn(c,l),i=c,!e&&!1!==e||(r=e),"string"==typeof n)&&(a=n),i.position),s=i.arrowPointAtCenter,l=i.follow,c=i.offset;r?(n=(e=w(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,r,o,s,l),2))[0],i=e[1],d.showTip(n,i,{text:a,position:o,offset:c})):d.hideTip()}),u.addEventListener("mouseleave",e),this.map.set(u,[t,e]))},iE.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=w(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},iE.prototype.clear=function(){this.container.innerHTML=""},iE.prototype.destroy=function(){var t,e=this;m([],w(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove(),eE.prototype.destroy.call(this)},iE.prototype.showTip=function(t,e,n){var r,i=En(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(QM)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},iE.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},iE.prototype.getContainer=function(){return this.container},iE.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(KM).concat(t?" ".concat(t):"")},iE.prototype.initShape=function(){var t=this,e=this.style.id;this.container=rE(e),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},iE.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.className=this.getClassName(),'<span class="'.concat(ZM,'"></span>'));t.innerHTML=n,an(r)?t.innerHTML+=r:r&&pn(r)&&t.appendChild(r),e&&(t.getElementsByClassName(QM)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},iE.prototype.applyStyles=function(){var t,e=O2({},JM,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=w(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))},iE.prototype.setOffsetPosition=function(t,e,n){var n=w(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")},iE.tag="poptip",iE.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:JM,template:'<div class="'.concat(QM,'"></div>')}};ye(oE,aE=hl),Object.defineProperty(oE.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=ax(t)},enumerable:!1,configurable:!0}),Object.defineProperty(oE.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=ax(t)},enumerable:!1,configurable:!0}),oE.prototype.getBBox=function(){var t=this.attributes,e=t.x,e=void 0===e?0:e,n=t.y,n=void 0===n?0:n,r=t.width,t=t.height,i=w(this.$margin,4),a=i[0],o=i[1],s=i[2],i=i[3];return new w2(e-i,n-a,r+i+o,t+a+s)},oE.prototype.appendChild=function(t,e){return t.isMutationObserved=!0,aE.prototype.appendChild.call(this,t,e),t},oE.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,t=t.height,n=w(this.$padding,4),r=n[0],i=n[1],a=n[2],n=n[3],o=w(this.$margin,4),s=o[0],o=o[3];return new w2(n+o,r+s,e-n-i,t-r-a)},oE.prototype.layout=function(){var t,e,n,r;if(this.attributes.display&&this.isConnected&&!this.children.some(function(t){return!t.isConnected}))try{t=this.getAvailableSpace(),e=this.children.map(function(t){return t.getBBox()}),n=this.attributes;var i=0!==e.length&&(null==(r=n.display in(r={flex:D2,grid:z2})?r[n.display]:null)?void 0:r.call(null,t,e,n))||[];this.children.forEach(function(t,e){var e=i[e],n=e.x,e=e.y;t.attr({x:n,y:e})})}catch(t){}},oE.prototype.bindEvents=function(){var e=this;this.layoutEvents.forEach(function(t){e.addEventListener(t,function(t){t.target.isMutationObserved=!0,e.layout()})})},oE.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()};var aE,Bl=oE;function oE(t){var e=aE.call(this,t)||this,t=(e.layoutEvents=[b.BOUNDS_CHANGED,b.INSERTED,b.REMOVED],e.$margin=ax(0),e.$padding=ax(0),t.style||{}),n=t.margin,t=t.padding,t=void 0===t?0:t;return e.margin=void 0===n?0:n,e.padding=t,e.isMutationObserved=!0,e.bindEvents(),e}A.enableCSSParsing=!1;function sE(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return ab()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e.length?e:[0,0]);const c=[n[0]-a,n[1]-o],[u,h]=s;return l=c,t=u,i=h,e=q1(l,t),t=q1(t,i),i=q1(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),ab()(s)}const lE=Cb(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=et(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),h=rt(e,"background"),f=h["padding"],h=et(h,["padding"]),d=rt(e,"connector"),{points:p=[]}=d,d=et(d,["points"]),i=[[+i,+a],[+n,+r]],a=it(t).maybeAppend("text","text").style("zIndex",0).call(P,Object.assign({textBaseline:"middle"},e)).node(),n=sE(it(t).maybeAppend("background","rect").style("zIndex",-1).call(P,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(a,f)).call(P,o?h:{}).node(),i,p,u),r=l&&new Ex({id:"startMarker",style:Object.assign({x:0,y:0},rt(e,"startMarker"))}),a=c&&new Ex({id:"endMarker",style:Object.assign({x:0,y:0},rt(e,"endMarker"))});it(t).maybeAppend("connector","path").style("zIndex",0).style("path",n).style("markerStart",r).style("markerEnd",a).call(P,s?d:{})}),cE=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=et(rv(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 it(new lE).style("x",i).style("y",o).call(P,r).style("transform",s+`rotate(${+e})`).style("coordCenter",n.getCenter()).call(P,a).call(P,l).node()}};cE.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const uE=Cb(t=>{var e=et(t.attributes,["class","x","y"]);const n=rt(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])]}(it(t).maybeAppend("marker",()=>new Ex({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());it(t).maybeAppend("text","text").style("x",i).style("y",a).call(P,e)}),hE=t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o,text:r=""}=e,e={text:String(r),stroke:o||i,fill:o||i},[[r,o]]=t;return it(new uE).call(P,a).style("x",r).style("y",o).call(P,e).call(P,s).node()}},fE=(hE.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},Cb(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;it(t).maybeAppend("connect-path",()=>new xl({})).style("d",n).call(P,i),it(t).maybeAppend("area-path",()=>new xl({})).style("d",e).call(P,r)}));const dE=t=>{const{curve:u,gradient:l=!1,defined:h=t=>!Number.isNaN(t)&&null!=t,connect:f=!1}=t,d=et(t,["curve","gradient","defined","connect"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=rv(n,r,i,a),r=n["defaultColor"],i=et(n,["defaultColor"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=av(c,e),n=l&&n?tv(n,r,o,l):a;const s=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:n,fill:n}),e&&{transform:e}),d);var[r,o]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,h=e[t],f=e[t+l];[...h,...f].some(t=>!n(t))?o=!0:(r.push(h),i.push(f),o&&s&&(o=!1,[c,u]=s,a.push([c,h,u,f])),s=[h,f])}return[r.concat(i),a]}(t,h),a=rt(s,"connect"),i=!!o.length,n=t=>it(new xl({})).style("d",t).call(P,s).node();return Cp(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=ob().curve(sb),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return ub(a())},delete t.lineX0,t.lineEndAngle=function(){return ub(o())},delete t.lineX1,t.lineInnerRadius=function(){return ub(s())},delete t.lineY0,t.lineOuterRadius=function(){return ub(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(cb(t)):e()._curve},t.angle((t,e)=>X1(V1(r[e],n))).outerRadius((t,e)=>q1(r[e],n)).innerRadius((t,e)=>q1(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(h)).curve(u)(i);var e,a,o,s,l},!i||f&&!Object.keys(a).length?n(e(r)):i&&!f?n(e(t)):it(new fE).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(Np(c)?ob().y((t,e)=>n[e][1]).x1((t,e)=>n[e][0]).x0((t,e)=>r[e][0]).defined((t,e)=>[...n[e],...r[e]].every(h)):ob().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)):it(new fE).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},pE=(dE.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=Cp(n)?wb:nb;return dE(Object.assign({curve:i},a))(t,e,n,r)}),gE=(pE.props=Object.assign(Object.assign({},dE.props),{defaultMarker:"point"}),t=>{const{alpha:a=.5}=t,o=et(t,["alpha"]);return(t,e,n,r)=>{var i=Cp(n)?bb:yb;return dE(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),mE=(gE.props=Object.assign(Object.assign({},dE.props),{defaultMarker:"smooth"}),i=>(t,e,n,r)=>dE(Object.assign({curve:Mb},i))(t,e,n,r)),yE=(mE.props=Object.assign(Object.assign({},dE.props),{defaultMarker:"hvh"}),i=>(t,e,n,r)=>dE(Object.assign({curve:Eb},i))(t,e,n,r)),vE=(yE.props=Object.assign(Object.assign({},dE.props),{defaultMarker:"vh"}),i=>(t,e,n,r)=>dE(Object.assign({curve:Ob},i))(t,e,n,r)),bE=(vE.props=Object.assign(Object.assign({},dE.props),{defaultMarker:"hv"}),t=>{const l=t["arrowSize"],c=et(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=rv(r,a,o,s),a=r["defaultColor"],o=et(r,["defaultColor"]),{color:s=a,transform:r}=e,[e,a]=t,t=Vv();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=Q1(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),it(new xl).call(P,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(P,c).node()}}),xE=(bE.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=Vv();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]),it(new xl).call(P,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(P,s).node()}});xE.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const wE=t=>{const{cornerRatio:u=1/3}=t,h=et(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=rv(r,o,s,l),o=r["defaultColor"],s=et(r,["defaultColor"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=Vv(),Cp(o)?(i=q1(t,c=o.getCenter()),i=(q1(e,c)-i)*n+i,a.moveTo(t[0],t[1]),J1(a,t,e,c,i)):Np(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 it(new xl).call(P,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(P,h).node()}},kE=(wE.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=Vv();return t.moveTo(e[0],e[1]),Cp(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):J1(t,e,i,Z1(e,i),q1(e,i)/2),it(new xl).call(P,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(P,s).node()}}),ME=(kE.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return it(new gl).call(P,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(P,u).node()}});ME.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const EE=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=rv(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),a=function(i,t){const a=Vv();if(Cp(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>q1(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?J1(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 it(new xl).call(P,i).style("d",a.toString()).style("stroke",o||e).style("fill",o||e).style("transform",s).call(P,l).node()}};EE.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const OE=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=rv(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),a=function(t,e){var n,[t,r,i,a]=t,o=Vv();return Cp(e)?(n=q1(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),J1(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),J1(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 it(new xl).call(P,i).style("d",a.toString()).style("fill",o||e).style("stroke",o||e).style("transform",s).call(P,l).node()}};OE.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const SE=t=>{const m=et(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:h,defaultShape:f,color:d,transform:p}=e,r=rv(r,e,h,f),{defaultColor:e,fill:h=e,stroke:f=e}=r,e=et(r,["defaultColor","fill","stroke"]),g=(r=t,t=n,n=Vv(),Cp(t)?([i,a]=t=t.getCenter(),o=U1(V1(r[0],t)),s=U1(V1(r[1],t)),g=q1(t,r[2]),l=q1(t,r[3]),c=q1(t,r[8]),u=q1(t,r[10]),t=q1(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,g,o,s),n.arc(i,a,g,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return it(new xl).call(P,e).style("d",g.toString()).style("stroke",f).style("fill",d||h).style("transform",p).call(P,m).node()}};SE.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const _E=t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,Cp(t=n)?(t=t.getCenter(),Jv()({startAngle:0,endAngle:2*Math.PI,outerRadius:q1(a[0],t),innerRadius:q1(a[1],t)})):ab().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,Cp(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return it(new xl({})).call(P,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(P,s).node()}};function AE(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}_E.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const PE=Cb(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=et(e,["points","class","endMarker","direction"]),i=rt(e,"endMarker"),n=(n=n,ab().x(t=>t[0]).y(t=>t[1])(n));it(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new Ex({className:"marker",style:Object.assign(Object.assign({},i),{symbol:AE})}):null).call(P,e)});const TE=t=>{const{offset:s=0,connectLength1:l}=t,c=et(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),{defaultColor:i,connectLength1:a=l}=r,o=et(r,["defaultColor","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(Np(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,a);return it(new PE).call(P,o).style("points",n).style("stroke",r||i).style("transform",e).call(P,c).node()}};function LE(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=P0(a.x,c),i=P0(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function NE(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:h}=nv(e,i,[t,n]),f="inside"===r?(u+h)/2:h;e=jE(f,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?CE(s,f,n):Z1(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function CE(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function jE(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function RE(t,e,n,r){var{y:n,y1:i,autoRotate:a,rotateToAlignArc:o,radius:s=.5,offset:l=0}=n,e=nv(r,e,[n,i]),{startAngle:n,endAngle:i}=e,r=r.getCenter(),n=(n+i)/2,i={textAlign:"center",textBaseline:"middle",rotate:jE(n,a,o)},{innerRadius:a,outerRadius:o}=e,[e,r]=CE(r,n,a+(o-a)*s+l);return Object.assign({x:e,y:r},i)}function IE(t,e,n){var n=n["bounds"],[n]=n;return{x:n[0],y:n[1]}}function BE(t,e,n,r){var i=n["bounds"];return 1===i.length?IE(0,0,n):(jp(r)?NE:Fp(r)?RE:LE)(t,e,n,r)}function FE(t,e,n){var{innerRadius:n,outerRadius:t}=nv(n,t,[e.y,e.y1]);return n+(t-n)}function DE(t,e,n){var{startAngle:n,endAngle:t}=nv(n,t,[e.y,e.y1]);return(n+t)/2}function zE(t,e,n,r){var{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:s=!0,connectorLength:l=o,connectorLength2:c=0,connectorDistance:u=0}=n,h=r.getCenter(),f=DE(e,n,r),d=0<Math.sin(f)?1:-1,i=jE(f,i,a),a={textAlign:0<d||jp(r)?"start":"end",textBaseline:"middle",rotate:i},i=FE(e,n,r),[[e,n],[r,h],[f,i]]=function(t,e,n,r,i){var[n,a]=CE(t,e,n),[t,r]=CE(t,e,r);return[[n,a],[t,r],[t+(0<Math.sin(e)?1:-1)*i,r]]}(h,f,i,i+(s?l:o),s?c:0),l=s?+u*d:0,o=f+l,c={connector:s,connectorPoints:[[r-o,h-i],[f-o,i-i]]};return Object.assign(Object.assign({x0:e,y0:n,x:f+l,y:i},a),c)}TE.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var GE=Object.freeze({__proto__:null,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=xp(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=U1(V1(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l})`,textAlign:"center",textBaseline:"middle"}},bottom:BE,bottomLeft:BE,bottomRight:BE,inside:BE,left:BE,outside:function(t,e,n,r){var i=n["bounds"];return 1===i.length?IE(0,0,n):(jp(r)?NE:Fp(r)?zE:LE)(t,e,n,r)},right:BE,spider:function(t,e,n,r){var i,a,o,s,l,c;return Fp(r)?({connectorLength:c,connectorLength2:i,connectorDistance:a}=n,o=et(zE(0,e,n,r),[]),s=r.getCenter(),l=FE(e,n,r),e=DE(e,n,r),n=l+c+i,r=0<Math.sin(e)?1:-1,l=o["x"],c=s[0]+(n+ +a)*r-l,o.x+=c,o.connectorPoints[0][0]-=c,o):{}},surround:function(t,e,n,r){var i,a,o,s,l;return Fp(r)?({connectorLength:o,connectorLength2:i,connectorDistance:a}=n,{x0:n,y0:s}=e=et(zE(0,e,n,r),[]),l=r.getCenter(),r=function(t){if(Fp(t)){var[e,n]=t.getSize(),t=t.getOptions().transformations.find(t=>"polar"===t[0]);if(t)return Math.max(e,n)/2*t[4]}return 0}(r)+o,o=X1([n-l[0],s-l[1]]),n=0<Math.sin(o)?1:-1,[s,l]=CE(l,o,r),e.x=s+(i+a)*n,e.y=l,e):{}},top:BE,topLeft:BE,topRight:BE});function WE(t,e,n,r,i){var a=e["position"],a=(o=n,void 0!==(a=a)?a:Fp(o)?"inside":Np(o)?"right":"top"),o=r["inside"===a?"innerLabel":"label"],r=Object.assign({},o,e),e=GE[a.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},o),e(a,t,r,n,i));throw new Error("Unknown position: "+a)}const HE=o=>(t,e,n,r)=>{var i=e["text"],a=et(e,["text","x","y"]),t=WE(t,e,n,r,o),{rotate:e=0,transform:r=""}=t,t=et(t,["rotate","transform"]);return it(new lE).call(P,t).style("text",""+i).style("transform",r+`rotate(${+e})`).style("coordCenter",n.getCenter()).call(P,a).node()},YE=(HE.props={defaultMarker:"point"},t=>{const s=t["colorAttribute"],l=et(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=et(rv(r,i,a,o),["stroke"]),{d:i,color:a}=e;return it(new xl).call(P,r).style("d",i).style(s,a).call(P,l).node()}}),VE=(YE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>YE(Object.assign({colorAttribute:"fill"},t))),qE=(VE.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>YE(Object.assign({fill:"none",colorAttribute:"stroke"},t))),UE=(qE.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=et(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),XE=(UE.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),$E=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:XE.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}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{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:XE.BLACK,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:XE.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:XE.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:XE.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:XE.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:XE.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:XE.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:XE.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:XE.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:XE.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:XE.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:.5,gridStroke:XE.BLACK,gridStrokeOpacity:.05,labelAlign:"horizontal",labelFill:XE.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,line:!1,lineLineWidth:.5,lineStroke:XE.BLACK,lineStrokeOpacity:.45,tickLength:4,tickLineWidth:1,tickStroke:XE.BLACK,tickStrokeOpacity:.25,titleFill:XE.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:12,tickDirection:"positive",titlePosition:"bottom",titleSpacing:10,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelAutoRotate:!1,labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:10,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:XE.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemValueFill:XE.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:XE.BLACK,navButtonFillOpacity:.65,navPageNumFill:XE.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:XE.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:XE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:XE.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:XE.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:XE.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",labelSpacing:8,tick:!0},label:{fill:XE.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:XE.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:XE.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:XE.STROKE,trackFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:XE.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:XE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[2,2,2,2],trackSize:10,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,thumbFill:"#000",thumbFillOpacity:.15,thumbHighlightedFillOpacity:.2},title:{titleFill:XE.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:XE.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},KE=($E.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),ZE=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:KE.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}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{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:KE.BLACK,lineWidth:1}},text:{text:{fill:KE.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:KE.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:KE.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:KE.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:KE.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:KE.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:KE.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:KE.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:KE.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:KE.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:KE.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:.5,gridStroke:KE.BLACK,gridStrokeOpacity:.05,labelAlign:"horizontal",labelFill:KE.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,lineLineWidth:.5,lineStroke:KE.BLACK,lineStrokeOpacity:.45,tickLength:4,tickLineWidth:1,tickStroke:KE.BLACK,tickStrokeOpacity:.25,titleFill:KE.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:12,tickDirection:"positive",titlePosition:"bottom",titleSpacing:10,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelAutoRotate:!1,labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:10,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleTextBaseline:"bottom"},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:KE.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemValueFill:KE.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:KE.BLACK,navButtonFillOpacity:.45,navPageNumFill:KE.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:KE.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:KE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:KE.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:KE.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:KE.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal"},label:{fill:KE.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:KE.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:KE.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:KE.STROKE,trackFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:KE.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:KE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:KE.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:KE.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},QE=(ZE.props={},{BLACK:"#000",WHITE:"#fff",STROKE:"#888"}),JE=t=>{var e={defaultColor:"#4e79a7",defaultCategory10:"tableau10",defaultCategory20:"tableau10",defaultSize:1,elementActiveStroke:QE.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,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:QE.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:10,strokeWidth:0,connectorStroke:QE.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:QE.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:QE.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:QE.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:QE.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:QE.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:QE.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:QE.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:QE.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:QE.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:1,gridStroke:"#ddd",gridStrokeOpacity:1,labelAlign:"horizontal",labelAutoRotate:!1,labelFill:QE.BLACK,labelFillOpacity:1,labelFontSize:10,labelFontWeight:"normal",labelSpacing:4,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickLineWidth:1,tickStroke:QE.STROKE,tickStrokeOpacity:1,titleFill:QE.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:8,tickDirection:"positive",titlePosition:"bottom",titleSpacing:4,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:4,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90) translate(0, -50%)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleTextBaseline:"bottom"},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:QE.BLACK,itemLabelFillOpacity:1,itemLabelFontSize:10,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,4],itemValueFill:QE.BLACK,itemValueFillOpacity:1,itemValueFontSize:10,itemValueFontWeight:"normal",navButtonFill:QE.BLACK,navButtonFillOpacity:.45,navButtonSize:6,navPageNumFill:QE.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:10,padding:8,title:!1,titleFill:QE.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:QE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal",handleMarkerFill:QE.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:QE.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:QE.BLACK,labelFillOpacity:.45,labelFontSize:10,labelFontWeight:"normal",title:!1},label:{fill:QE.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:QE.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:QE.WHITE,fontSize:10,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:QE.STROKE,trackFillOpacity:.05,selectionFill:"#4e79a7",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:QE.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:QE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:QE.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:QE.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)};function t5(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)]}JE.props={};var e5,n5=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function r5(t){var e;if(e=n5.exec(t))return new i5({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 i5(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 a5(t,e){var n,e=t5(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+""}r5.prototype=i5.prototype,i5.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 o5={"%":(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)=>a5(100*t,e),r:a5,s:function(t,e){var n,r,i=t5(t,e);return i?(n=i[0],(i=(i=i[1])-(e5=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")+t5(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 s5(t){return t}var l5,c5=Array.prototype.map,u5=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function h5(t){var e,s,l,k=void 0===t.grouping||void 0===t.thousands?s5:(s=c5.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",M=void 0===t.decimal?".":t.decimal+"",E=void 0===t.numerals?s5:(e=c5.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 c=(t=r5(t)).fill,u=t.align,h=t.sign,e=t.symbol,f=t.zero,d=t.width,p=t.comma,g=t.precision,m=t.trim,y=t.type,v=("n"===y?(p=!0,y="g"):o5[y]||(void 0===g&&(g=12),m=!0,y="g"),(f||"0"===c&&"="===u)&&(f=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),b="$"===e?i:/[%p]/.test(y)?a:"",x=o5[y],w=/[defgprs%]/.test(y);function n(t){var e,n,r,i=v,a=b;if("c"===y)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),g),m&&(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"===y?u5[8+e5/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,l=s<d?new Array(d-s+1).join(c):"";switch(p&&f&&(t=k(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return E(t)}return g=void 0===g?6:/[gprs]/.test(y)?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=r5(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=t5(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=u5[8+e/3];return function(t){return n(r*t)+i}}}}function f5(t,e,n){return t.querySelector(e)?it(t).select(e):it(t).append(n)}function d5(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function p5(t,e){var n={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};if(e)return Object.assign(Object.assign({},n),e);let{flexDirection:r,justifyContent:i,alignItems:a}=n;e={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["colunm","center","center"],right:["colunm","center","center"],center:["column","center","center"]};return t in e&&([r,i,a]=e[t]),{display:"flex",flexDirection:r,justifyContent:i,alignItems:a}}e=h5({thousands:",",grouping:[3],currency:["$",""]}),l5=e.format,e.formatPrefix;class g5 extends Bl{update(t){this.attr(t);var e,t=et(t,["width","height"]);null!=(e=null==(e=this.children)?void 0:e[0])&&e.update(t)}}function m5(t,e){return null==(t=t.filter(t=>t.getOptions().name===e))?void 0:t[0]}function y5(t,e,n){var t=t["bbox"],{position:e="top",size:r,length:i}=e,e=["top","bottom","center"].includes(e),[t,a]=e?[t.height,t.width]:[t.width,t.height],{defaultSize:n,defaultLength:o}=n.props,r=r||n||t,n=i||o||a,[t,i]=e?[n,r]:[r,n];return{orientation:e?"horizontal":"vertical",width:t,height:i,size:r,length:n}}function v5(t){const n=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],r={};return Object.entries(t).forEach(([t,e])=>{n.includes(t)?r["show"+hn(t)]=e:r[t]=e}),r}function b5(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function x5(t){return"number"!=typeof t||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}function w5(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=Qd(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,h=t=>"object"==typeof t?t:String(t),f=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new p1({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),d=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return Bp(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new p1({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new p1({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return Cp(s)||Np(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=f(a.map(t)+i);return{value:Np(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:h(u(x5(t),e,n)),id:String(e)}}),jp(s)&&"center"===o?i.map(t=>{var e=t["value"],t=et(t,["value"]);return Object.assign({value:1-e},t)}):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:d(f(a.map(t)+r)),label:h(u(x5(t),e,n)),id:String(e)}})}function k5(t,e,n){var r;return!(Cp(r=e)&&Np(r)||Ip(e))&&(void 0===t?!!n.getTicks:t)}function M5(t,e,n,r,i,a){n=function(t,e){var n=t.axis;let r=t.axisLinear;return["top","right","bottom","left"].includes(e)&&(r=t["axis"+E0(e)]),Object.assign({},n,r)}(n,i);return"center"===i?Object.assign(Object.assign(Object.assign(Object.assign({},n),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:"center"===r?0:4,titleSpacing:"vertical"===(i=a)||i===-Math.PI/2?10:0,tick:"center"!==r&&void 0}):n}var E5,Dl=r=>t=>{var{labelFormatter:e=t=>""+t}=t,e="string"==typeof e?l5(e):e;const n=Object.assign(Object.assign({},t),{labelFormatter:e});return(...t)=>r(n)(...t)};const O5=Dl(t=>{const{direction:o="left",important:s={},labelFormatter:l=t=>""+t,orientation:c,position:u,style:h={},title:f,tickCount:d,tickFilter:p,tickMethod:g,transform:m}=t,y=et(t,["direction","important","labelFormatter","order","orientation","position","size","style","title","tickCount","tickFilter","tickMethod","transform"]);return({scales:[t],value:e,coordinate:n,theme:r})=>{var e=e["bbox"],i=t.getOptions()["domain"],r=M5(0,0,r,o,u,c),r=Object.assign(Object.assign(Object.assign({},r),h),y),a=function(t,e){var[e,n]=b5(e);return t.includes("bottom")||t.includes("top")?n:e}(u,n),e=function(t,e,n,r){var{x:n,y:i,width:a,height:o}=n;if("bottom"===t)return{startPos:[n,i],endPos:[n+a,i]};if("left"===t)return{startPos:[n+a,i],endPos:[n+a,i+o]};if("right"===t)return{endPos:[n,i+o],startPos:[n,i]};if("top"===t)return{startPos:[n,i+o],endPos:[n+a,i+o]};if("center"===t){if("vertical"===e)return{startPos:[n+a,i],endPos:[n+a,i+o]};if("horizontal"===e)return{startPos:[n,i+o],endPos:[n+a,i+o]};if("number"==typeof e){var[t,s]=r.getCenter(),[l,c]=Dp(r);const[u,h]=zp(r);var r=Math.min(a,o)/2,a=l*r,o=c*r,[l,c]=[t+n,s+i],[r,e]=[Math.cos(e),Math.sin(e)];return{startPos:[l+o*r,c+o*e],endPos:[l+a*r,c+a*e],gridClosed:h-u==360,gridCenter:[t+n,i+s],gridControlAngles:new Array(3).fill(0).map((t,e,n)=>(h-u)/(n.length-1)*e)}}}return{}}(u,c,e,n),i=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),{type:"linear",data:w5(t,i,d,l,p,g,u,n),titleText:d5(f),labelOverlap:function(t=[],e){var{labelAutoRotate:e=!0,labelAutoHide:n=!1,labelAutoEllipsis:r=!1}=e;const i=[...t];return(t=(e,t)=>{t?-1!==(t=i.findIndex(t=>t.type===e.type))?i[t]=e:i.push(e):-1!==(t=i.findIndex(t=>t.type===e.type))&&i.splice(t,1)})({type:"rotate",optionalAngles:[0,15,30,45,60,90]},e),t({type:"ellipsis",minLength:20},r),t({type:"hide"},n),i}(m,r),grid:k5(r.grid,n,t),gridLength:a,line:!0}),r.line?null:{lineOpacity:0}),e),s);return new Ek({className:"axis",style:v5(i)})}}),S5=Dl(t=>{const{position:o,labelFormatter:s=t=>""+t,tickFilter:l,tickCount:c,tickMethod:u,important:h={},style:e={}}=t,f=et(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style"]),{title:d,grid:p=!1}=e;return({scales:[t],value:e,coordinate:n,theme:r})=>{var e=e["bbox"],i=t.getOptions()["domain"],t=w5(t,i,c,s,l,u,o,n),[i,a]=Dp(n),e=function(t,e,n,r,i){var{x:e,y:a,width:o,height:s}=e,e=[e+o/2,a+s/2],a=Math.min(o,s)/2,[o,s]=zp(i),[l,c]=b5(i),e={center:e,radius:a,startAngle:o,endAngle:s,titleFillOpacity:0,titlePosition:"inner",line:!1,tick:!0,gridLength:(r-n)*(Math.min(l,c)/2)};return"inner"===t?(b5(i),Object.assign(Object.assign({},e),{labelAlign:"perpendicular",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",gridDirection:"negative"})):Object.assign(Object.assign({},e),{labelAlign:"parallel",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",gridDirection:"positive"})}(o,e,i,a,n),i=r["axis"];return new Ek({style:v5(nt({},i,e,Object.assign(Object.assign({type:"arc",data:t,titleText:d5(d),grid:p},f),h)))})}}),_5=(O5.props={defaultPosition:"center",defaultSize:45,defaultOrder:0},S5.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0},t=>O5(t)),A5=(_5.props=Object.assign(Object.assign({},O5.props),{defaultPosition:"bottom"}),t=>O5(t));A5.props=Object.assign(Object.assign({},O5.props),{defaultPosition:"left"});const P5=a=>{const{important:o={}}=a,s=et(a,["important"]);return t=>{var e,{theme:n,coordinate:r,value:i}=t;return O5(Object.assign(Object.assign(Object.assign({},s),(e=a.orientation,(e%=2*Math.PI)==Math.PI/2?{titleTransform:"translate(0, 50%)"}:e>-Math.PI/2&&e<Math.PI/2?{titleTransform:"translate(50%, 0)"}:e>Math.PI/2&&e<3*Math.PI/2?{titleTransform:"translate(-50%, 0)"}:{})),{important:Object.assign(Object.assign({},function(t,e,n,r){const i=t["radar"];var[{name:t}]=r["scales"];const[a,o]=zp(n);var{axisRadar:r={}}=e;return Object.assign(Object.assign({},r),{grid:"position"===t,gridConnect:"line",gridControlAngles:new Array(i.count).fill(0).map((t,e)=>{return(o-a)/i.count*e})})}(a,n,r,i)),o)}))(t)}};function T5(t,e,n,r,i={}){const a=(null==(e=null==(e=e["shape."+t])?void 0:e.props)?void 0:e.defaultMarker)||function(t){if(qe(t))return t[t.length-1]}(t.split("."));return()=>function(t,e){var{fill:n,stroke:r,lineWidth:i,color:a}=e,o=et(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);const s=Wb.get(t)||Wb.get("point");return(...t)=>{return new xl({style:Object.assign(Object.assign({},o),{path:s(...t),stroke:s.style.includes("stroke")?a||r:"",fill:s.style.includes("fill")?a||n:"",lineWidth:s.style.includes("lineWidth")?i||2:0})})}}(a,i)(0,0,6)}function L5(t,{scales:e,library:n,markState:r}){var i=m5(e,"shape");const[a,o]=function(t,e){const n=m5(t,"shape");var r=m5(t,"color");const i=[];for(const[l,c]of e){var a=l.type,o=(0<(null==r?void 0:r.getOptions().domain.length)?null==r?void 0:r.getOptions().domain:c.data).map((t,e)=>{return n?n.map(t||"point"):(null==(t=null===l||void 0===l?void 0:l.style)?void 0:t.shape)||c.defaultShape||"point"});"string"==typeof a&&i.push([a,o])}if(0===i.length)return["point",["point"]];if(1===i.length)return i[0];if(!n)return i[0];const s=n.getOptions()["range"];return i.map(([t,e])=>{let n=0;for(let t=0;t<i.length;t++){var r=s[t%s.length];e[t]===r&&n++}return[n/e.length,[t,e]]}).sort((t,e)=>e[0]-t[0])[0][1]}(e,r),s=t["itemMarker"];return i&&!s?(t,e)=>T5(a+"."+o[e],n,0,0,{color:t.color}):"function"==typeof s?s:(t,e)=>T5(s||o[e],n,0,0,{color:t.color})}function N5(t,e){var{labelFormatter:n=t=>""+t}=t,r=e["scales"],e={itemMarker:L5(t,e),itemMarkerSize:(t=m5(t=r,"size"))?2*t.map(NaN):8,itemMarkerOpacity:function(t){if(t=m5(t,"opacity")){const n=t.getOptions()["range"];return(t,e)=>n[e]}}(r)};const i="string"==typeof n?l5(n):n,a=m5(r,"color");t=r.find(t=>0<t.getOptions().domain.length).getOptions().domain;return Object.assign(Object.assign({},e),{data:t.map(t=>({id:t,label:i(t),color:a.map(t)}))})}P5.props=Object.assign(Object.assign({},O5.props),{defaultPosition:"center"});const C5=l=>{const{position:c,title:u}=l,h=et(l,["labelFormatter","layout","order","orientation","position","size","title"]),{gridCol:f,gridRow:d}=h;return t=>{var{value:e,theme:n}=t,r=e["bbox"],{width:i,height:a}=function(t,e,n){var r;if("center"===(r=e["position"])){r=t["bbox"];const{width:i,height:a}=r;return{width:i,height:a}}const{width:i,height:a}=y5(t,e,n);return{width:i,height:a}}(e,l,C5),e=p5(c,null==(e=null==(e=null==(e=e.scales)?void 0:e[0])?void 0:e.guide)?void 0:e.layout),[o,s]=function(t,e,n){var[r,i]=[e||100,n||100];switch(t){case"top":case"bottom":case"top-left":case"top-right":case"bottom-left":case"bottom-right":return[1,i];case"left":case"right":return[r,1];default:return[e,n]}}(c,d,f),i=Object.assign({orientation:["right","left","center"].includes(c)?"vertical":"horizontal",width:i,height:a,gridCol:null!==f&&void 0!==f?f:s,gridRow:null!==d&&void 0!==d?d:o,rowPadding:0,colPadding:8,titleText:d5(u)},N5(l,t)),{legend:a={}}=n,s=new g5({style:Object.assign({x:r.x,y:r.y,width:r.width,height:r.height},e)});return s.appendChild(new $k({className:"legend-category",style:v5(Object.assign({},a,i,h))})),s}};C5.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};const j5=l=>{const{labelFormatter:c,position:u,title:h,style:f}=l,d=et(l,["labelFormatter","layout","order","orientation","position","size","title","style"]);return({scales:t,value:e,theme:n})=>{var r=e["bbox"],{x:r,y:i,width:a,height:o}=r,s=p5(u,null==(s=null==(s=null==(s=e.scales)?void 0:s[0])?void 0:s.guide)?void 0:s.layout),r=new g5({style:Object.assign({x:r,y:i,width:a,height:o},s)}),{continuousLegend:i={}}=n;return r.appendChild(new mM({style:v5(Object.assign({},i,Object.assign(Object.assign({titleText:d5(h),titleFontSize:12,handle:!1,indicator:!1,labelAlign:"value",labelFormatter:"string"==typeof c?t=>l5(c)(t.label):c},function(t,e,n,r){const a=m5(t,"color");var{domain:i,range:o}=a.getOptions();const[s,l]=[i[0],i.slice(-1)[0]],{orientation:c,width:u,height:h,length:f}=y5(e,n,r);if(i={orientation:c,width:u,height:h},a instanceof b1){e=a.thresholds;if(a instanceof k1||a instanceof E1)return Object.assign(Object.assign({color:o},i),{data:[s,...e,l].map((t,e)=>({value:t/l,label:t}))});const p=[-1/0,...e,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({data:p},i),{color:o,labelFilter:(t,e)=>0<e&&e<p.length-1})}const d=m5(t,"opacity");return Object.assign(Object.assign({},i),{data:a.getTicks().map(t=>({value:t})),color:new Array(f).fill(0).map((t,e)=>{var e=(l-s)/(f-1)*e+s,n=a.map(e);const i=d?d.map(e):1;return n.replace(/rgb[a]*\(([\d]{1,3}), ([\d]{1,3}), ([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${i})`)})})}(t,e,l,j5)),f),d))})),r}},R5=(j5.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:300},e=>(...t)=>j5(Object.assign({},{block:!0},e))(...t)),I5=(R5.props=Object.assign(Object.assign({},j5.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>j5(Object.assign({},{type:"size",block:!0,tick:!1},t))),B5=(I5.props=Object.assign(Object.assign({},j5.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>j5(Object.assign({},{type:"size",tick:!1,labelFilter:(t,e,n)=>0===e||e===n.length-1},t)));function F5(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}B5.props=Object.assign(Object.assign({},j5.props),{defaultPosition:"top",defaultOrientation:"horizontal"});E5={render(t,e){const{y:n,width:r,title:i,subtitle:a}=t,o=t.style,{spacing:s=2,align:l="left"}=o,c=et(o,["spacing","align"]);t=rt(c,"title");const u=rt(c,"subtitle"),h=f5(e,".title","text").attr("className","title").call(P,Object.assign(Object.assign(Object.assign({},F5(0,n,r,l)),{fontSize:14,textBaseline:"top",text:i}),t)).node().getLocalBounds();f5(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!a)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},F5(0,h.max[1]+s,r,l)),{fontSize:12,textBaseline:"top",text:a}),u))})}};const D5=class extends sl{constructor(t){super(t),this.descriptor=E5}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(nt({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},z5=a=>({value:t,theme:e})=>{var{x:t,y:n,width:r,height:i}=t.bbox;return new D5({style:nt({},{style:e.title},Object.assign({x:t,y:n,width:r,height:i},a))})};function G5(t){return t.getBandWidth}function W5(t,e,n){if(!G5(t))return t.invert(e);var r=t["adjustedRange"],i=t.getOptions()["domain"],a=n?-1:0;const o=t.getStep();var t=n?r:r.map(t=>t+o),n=Xd(t,e);return r=n+a,t=0,e=i.length-1,i[Math.min(e,Math.max(t,r))]}function H5(t,e){var n,r;return G5(t)?(t=t.getOptions()["domain"],[n,r]=e,n=t.indexOf(n),r=t.indexOf(r),t.slice(n,r+1)):sp(e)}z5.props={defaultPosition:"top",defaultOrder:2,defaultSize:36};const Y5=t=>{const{orientation:c,labelFormatter:u,style:h}=t,f=et(t,["orientation","labelFormatter","size","style"]);return({scales:[e],value:t,theme:n})=>{var r,t=t["bbox"],{x:t,y:i,width:a,height:o}=t,{slider:n={}}=n;const s=(null==(r=e.getFormatter)?void 0:r.call(e))||(t=>t.toString()),l="string"==typeof u?l5(u):u;return new pw({className:"slider",style:Object.assign({},n,Object.assign(Object.assign({x:t,y:i,trackLength:"horizontal"===c?a:o,orientation:c,formatter:t=>{return(l||s)(W5(e,t,!0))}},h),f))})}},V5=(Y5.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>Y5(Object.assign(Object.assign({},t),{orientation:"horizontal"}))),q5=(V5.props=Object.assign(Object.assign({},Y5.props),{defaultPosition:"bottom"}),t=>Y5(Object.assign(Object.assign({},t),{orientation:"vertical"}))),U5=(q5.props=Object.assign(Object.assign({},Y5.props),{defaultPosition:"left"}),t=>{const{orientation:a,style:o}=t,s=et(t,["orientation","labelFormatter","style"]);return({value:t,theme:e})=>{var t=t["bbox"],{x:t,y:n,width:r,height:i}=t,{scrollbar:e={}}=e;return new yw({className:"scrollbar",style:Object.assign({},e,Object.assign(Object.assign(Object.assign(Object.assign({},o),{x:t,y:n,trackLength:"horizontal"===a?r:i}),s),{orientation:a,value:0,contentLength:1500,viewportLength:"horizontal"===a?r:i}))})}}),X5=(U5.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>U5(Object.assign(Object.assign({},t),{orientation:"horizontal"}))),$5=(X5.props=Object.assign(Object.assign({},U5.props),{defaultPosition:"bottom"}),t=>U5(Object.assign(Object.assign({},t),{orientation:"vertical"})));$5.props=Object.assign(Object.assign({},U5.props),{defaultPosition:"left"});class K5{constructor(t){this.$value=t}static of(t){return new K5(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function Z5(t,e,n){return K5.of({}).call(Q5,t).call(Q5,e).call(Q5,n).value()}function Q5(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function J5(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const tO=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],eO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=Np(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,Z5(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},nO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=Np(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,Z5(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},rO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=Np(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,Z5(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},iO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=Np(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,Z5(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},aO=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],Z5(i,n,l))},oO=(aO.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],Z5(i,n,l))});function sO(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function lO(t,e){var[n,r,i,t]=sO(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),h=i/u;for(let t=0;t<u;t++){var f=n+t*h,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).G2={})}(this,function(p){"use strict";const O="main-layer",at="label-layer",ot="element",H="view",st="plot",lt="component",ct="label",ut="area";var S="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function j(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,l=Math.log(o),s=.5*Math.exp(2*l/3),l=.5*Math.sqrt(l*s*(o-s)/o)*(u-o/2<0?-1:1),c=Math.max(r,Math.floor(n-u*s/o+l)),u=Math.min(i,Math.floor(n+(o-u)*s/o+l)),t(e,n,c,u,a));var o,s,l,c,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}function F(t,e){D(t,0,t.children.length,e,t)}function D(t,e,n,r,i){(i=i||X(null)).minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(var a=e;a<n;a++){var o=t.children[a];z(i,t.leaf?r(o):o)}return i}function z(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 G(t,e){return t.minX-e.minX}function W(t,e){return t.minY-e.minY}function Y(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function V(t){return t.maxX-t.minX+(t.maxY-t.minY)}function q(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function U(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function X(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function $(t,e,n,r,i){for(var a,o=[e,n];o.length;)(n=o.pop())-(e=o.pop())<=r||(j(t,a=e+Math.ceil((n-e)/r/2)*r,e,n,i),o.push(e,a,a,n))}(e=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}).prototype.all=function(){return this._all(this.data,[])},e.prototype.search=function(t){var e=this.data,n=[];if(U(t,e))for(var r=this.toBBox,i=[];e;){for(var a=0;a<e.children.length;a++){var o=e.children[a],s=e.leaf?r(o):o;U(t,s)&&(e.leaf?n.push(o):q(t,s)?this._all(o,n):i.push(o))}e=i.pop()}return n},e.prototype.collides=function(t){var e=this.data;if(U(t,e))for(var n=[];e;){for(var r=0;r<e.children.length;r++){var i=e.children[r],a=e.leaf?this.toBBox(i):i;if(U(t,a)){if(e.leaf||q(t,a))return!0;n.push(i)}}e=n.pop()}return!1},e.prototype.load=function(t){if(t&&t.length)if(t.length<this._minEntries)for(var e=0;e<t.length;e++)this.insert(t[e]);else{var n,r=this._build(t.slice(),0,t.length-1,0);this.data.children.length?this.data.height===r.height?this._splitRoot(this.data,r):(this.data.height<r.height&&(n=this.data,this.data=r,r=n),this._insert(r,this.data.height-r.height-1,!0)):this.data=r}return this},e.prototype.insert=function(t){return t&&this._insert(t,this.data.height-1),this},e.prototype.clear=function(){return this.data=X([]),this},e.prototype.remove=function(t,e){if(t)for(var n,r,i,a=this.data,o=this.toBBox(t),s=[],l=[];a||s.length;){if(a||(a=s.pop(),r=s[s.length-1],n=l.pop(),i=!0),a.leaf){var c=function(t,e,n){if(!n)return e.indexOf(t);for(var r=0;r<e.length;r++)if(n(t,e[r]))return r;return-1}(t,a.children,e);if(-1!==c)return a.children.splice(c,1),s.push(a),this._condense(s),this}i||a.leaf||!q(a,o)?r?(n++,a=r.children[n],i=!1):a=null:(s.push(a),l.push(n),a=(r=a).children[n=0])}return this},e.prototype.toBBox=function(t){return t},e.prototype.compareMinX=function(t,e){return t.minX-e.minX},e.prototype.compareMinY=function(t,e){return t.minY-e.minY},e.prototype.toJSON=function(){return this.data},e.prototype.fromJSON=function(t){return this.data=t,this},e.prototype._all=function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},e.prototype._build=function(t,e,n,r){var i,a=n-e+1,o=this._maxEntries;if(a<=o)F(i=X(t.slice(e,n+1)),this.toBBox);else{r||(r=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,r-1))),(i=X([])).leaf=!1,i.height=r;var s=Math.ceil(a/o),l=s*Math.ceil(Math.sqrt(o));$(t,e,n,l,this.compareMinX);for(var c=e;c<=n;c+=l){var u=Math.min(c+l-1,n);$(t,c,u,s,this.compareMinY);for(var h=c;h<=u;h+=s){var f=Math.min(h+s-1,u);i.children.push(this._build(t,h,f,r-1))}}F(i,this.toBBox)}return i},e.prototype._chooseSubtree=function(t,e,n,r){for(;;){if(r.push(e),e.leaf||r.length-1===n)break;for(var i=1/0,a=1/0,o=void 0,s=0;s<e.children.length;s++){var l=e.children[s],c=Y(l),u=(h=t,u=l,(Math.max(u.maxX,h.maxX)-Math.min(u.minX,h.minX))*(Math.max(u.maxY,h.maxY)-Math.min(u.minY,h.minY))-c);u<a?(a=u,i=c<i?c:i,o=l):u===a&&c<i&&(i=c,o=l)}e=o||e.children[0]}var h,u;return e},e.prototype._insert=function(t,e,n){var n=n?t:this.toBBox(t),r=[],i=this._chooseSubtree(n,this.data,e,r);for(i.children.push(t),z(i,n);0<=e&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},e.prototype._split=function(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=X(n.children.splice(i,n.children.length-i));r.height=n.height,r.leaf=n.leaf,F(n,this.toBBox),F(r,this.toBBox),e?t[e-1].children.push(r):this._splitRoot(n,r)},e.prototype._splitRoot=function(t,e){this.data=X([t,e]),this.data.height=t.height+1,this.data.leaf=!1,F(this.data,this.toBBox)},e.prototype._chooseSplitIndex=function(t,e,n){for(var r,i,a,o,s=1/0,l=1/0,c=e;c<=n-e;c++){var u=D(t,0,c,this.toBBox),h=D(t,c,n,this.toBBox),f=(i=u,f=h,d=o=a=void 0,a=Math.max(i.minX,f.minX),o=Math.max(i.minY,f.minY),d=Math.min(i.maxX,f.maxX),i=Math.min(i.maxY,f.maxY),Math.max(0,d-a)*Math.max(0,i-o)),d=Y(u)+Y(h);f<s?(s=f,r=c,l=d<l?d:l):f===s&&d<l&&(l=d,r=c)}return r||n-e},e.prototype._chooseSplitAxis=function(t,e,n){var r=t.leaf?this.compareMinX:G,i=t.leaf?this.compareMinY:W;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)},e.prototype._allDistMargin=function(t,e,n,r){t.children.sort(r);for(var i=this.toBBox,a=D(t,0,e,i),o=D(t,n-e,n,i),s=V(a)+V(o),l=e;l<n-e;l++){var c=t.children[l];z(a,t.leaf?i(c):c),s+=V(a)}for(var u=n-e-1;e<=u;u--){var h=t.children[u];z(o,t.leaf?i(h):h),s+=V(o)}return s},e.prototype._adjustParentBBoxes=function(t,e,n){for(var r=n;0<=r;r--)z(e[r],t)},e.prototype._condense=function(t){for(var e=t.length-1,n=void 0;0<=e;e--)0===t[e].children.length?0<e?(n=t[e-1].children).splice(n.indexOf(t[e]),1):this.clear():F(t[e],this.toBBox)};var K=e,Z=1e-6,Q="undefined"!=typeof Float32Array?Float32Array:Array;function J(){var t=new Q(9);return Q!=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 tt=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],e=e[8],h=n[0],f=n[1],d=n[2],p=n[3],g=n[4],m=n[5],y=n[6],v=n[7],n=n[8];return t[0]=h*r+f*o+d*c,t[1]=h*i+f*s+d*u,t[2]=h*a+f*l+d*e,t[3]=p*r+g*o+m*c,t[4]=p*i+g*s+m*u,t[5]=p*a+g*l+m*e,t[6]=y*r+v*o+n*c,t[7]=y*i+v*s+n*u,t[8]=y*a+v*l+n*e,t};function ht(){var t=new Q(16);return Q!=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 ft(t){var e=new Q(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 dt(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 pt(t,e,n,r,i,a,o,s,l,c,u,h,f,d,p,g,m){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=l,t[8]=c,t[9]=u,t[10]=h,t[11]=f,t[12]=d,t[13]=p,t[14]=g,t[15]=m,t}function gt(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 mt(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],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],m=e[14],e=e[15],y=n*s-r*o,v=n*l-i*o,b=n*c-a*o,x=r*l-i*s,w=r*c-a*s,k=i*c-a*l,M=u*g-h*p,E=u*m-f*p,O=u*e-d*p,S=h*m-f*g,_=h*e-d*g,A=f*e-d*m,P=y*A-v*_+b*S+x*O-w*E+k*M;return P?(t[0]=(s*A-l*_+c*S)*(P=1/P),t[1]=(i*_-r*A-a*S)*P,t[2]=(g*k-m*w+e*x)*P,t[3]=(f*w-h*k-d*x)*P,t[4]=(l*O-o*A-c*E)*P,t[5]=(n*A-i*O+a*E)*P,t[6]=(m*b-p*k-e*v)*P,t[7]=(u*k-f*b+d*v)*P,t[8]=(o*_-s*O+c*M)*P,t[9]=(r*O-n*_-a*M)*P,t[10]=(p*w-g*b+e*y)*P,t[11]=(h*b-u*w-d*y)*P,t[12]=(s*E-o*S-l*M)*P,t[13]=(n*S-r*E+i*M)*P,t[14]=(g*v-p*x-m*y)*P,t[15]=(u*x-h*v+f*y)*P,t):null}function vt(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],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*l-i*a)*(u*g-h*p)+(n*s-r*o)*(c*t-f*d)-(n*l-i*o)*(c*g-h*d)+(r*l-i*s)*(c*p-u*d)}function bt(t,e,n){var r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=e[8],f=e[9],d=e[10],p=e[11],g=e[12],m=e[13],y=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*l+x*f+w*m,t[2]=v*a+b*c+x*d+w*y,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*l+x*f+w*m,t[6]=v*a+b*c+x*d+w*y,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*l+x*f+w*m,t[10]=v*a+b*c+x*d+w*y,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*l+x*f+w*m,t[14]=v*a+b*c+x*d+w*y,t[15]=v*o+b*u+x*p+w*e,t}function xt(t,e,n){var r,i,a,o,s,l,c,u,h,f,d,p,g=n[0],m=n[1],n=n[2];return e===t?(t[12]=e[0]*g+e[4]*m+e[8]*n+e[12],t[13]=e[1]*g+e[5]*m+e[9]*n+e[13],t[14]=e[2]*g+e[6]*m+e[10]*n+e[14],t[15]=e[3]*g+e[7]*m+e[11]*n+e[15]):(r=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],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]=l,t[6]=c,t[7]=u,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*g+s*m+h*n+e[12],t[13]=i*g+l*m+f*n+e[13],t[14]=a*g+c*m+d*n+e[14],t[15]=o*g+u*m+p*n+e[15]),t}function wt(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 kt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[4],a=e[5],o=e[6],s=e[7],l=e[8],c=e[9],u=e[10],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+l*r,t[5]=a*n+c*r,t[6]=o*n+u*r,t[7]=s*n+h*r,t[8]=l*n-i*r,t[9]=c*n-a*r,t[10]=u*n-o*r,t[11]=h*n-s*r,t}function Mt(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[8],c=e[9],u=e[10],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-l*r,t[1]=a*n-c*r,t[2]=o*n-u*r,t[3]=s*n-h*r,t[8]=i*r+l*n,t[9]=a*r+c*n,t[10]=o*r+u*n,t[11]=s*r+h*n,t}function Et(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 Ot(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 St(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=r+r,s=i+i,l=a+a,c=r*o,u=r*s,r=r*l,h=i*s,i=i*l,a=a*l,o=e*o,s=e*s,e=e*l;return t[0]=1-(h+a),t[1]=u+e,t[2]=r-s,t[3]=0,t[4]=u-e,t[5]=1-(c+a),t[6]=i+o,t[7]=0,t[8]=r+s,t[9]=i-o,t[10]=1-(c+h),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function _t(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t}function At(t,e){var n=e[0],r=e[1],i=e[2],a=e[4],o=e[5],s=e[6],l=e[8],c=e[9],e=e[10];return t[0]=Math.hypot(n,r,i),t[1]=Math.hypot(a,o,s),t[2]=Math.hypot(l,c,e),t}function Pt(t,e){var n=new Q(3),r=(At(n,e),1/n[0]),i=1/n[1],n=1/n[2],a=e[0]*r,o=e[1]*i,s=e[2]*n,l=e[4]*r,c=e[5]*i,u=e[6]*n,r=e[8]*r,i=e[9]*i,e=e[10]*n,n=a+c+e,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-l)/h):c<a&&e<a?(h=2*Math.sqrt(1+a-c-e),t[3]=(u-i)/h,t[0]=.25*h,t[1]=(o+l)/h,t[2]=(r+s)/h):e<c?(h=2*Math.sqrt(1+c-a-e),t[3]=(r-s)/h,t[0]=(o+l)/h,t[1]=.25*h,t[2]=(u+i)/h):(h=2*Math.sqrt(1+e-a-c),t[3]=(o-l)/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],l=a+a,c=o+o,u=s+s,h=a*l,f=a*c,a=a*u,d=o*c,o=o*u,s=s*u,l=e*l,c=e*c,e=e*u,u=r[0],p=r[1],r=r[2],g=i[0],m=i[1],i=i[2],y=(1-(d+s))*u,v=(f+e)*u,u=(a-c)*u,f=(f-e)*p,e=(1-(h+s))*p,s=(o+l)*p,p=(a+c)*r,a=(o-l)*r,c=(1-(h+d))*r;return t[0]=y,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]=c,t[11]=0,t[12]=n[0]+g-(y*g+f*m+p*i),t[13]=n[1]+m-(v*g+e*m+a*i),t[14]=n[2]+i-(u*g+s*m+c*i),t[15]=1,t}function Lt(t,e){var n=e[0],r=e[1],i=e[2],e=e[3],a=n+n,o=r+r,s=i+i,n=n*a,l=r*a,r=r*o,c=i*a,u=i*o,i=i*s,a=e*a,o=e*o,e=e*s;return t[0]=1-r-i,t[1]=l+e,t[2]=c-o,t[3]=0,t[4]=l-e,t[5]=1-n-i,t[6]=u+a,t[7]=0,t[8]=c+o,t[9]=u-a,t[10]=1-n-r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Nt(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 Ct(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=(o+a)*c,t[15]=1,t}var jt=Ct;function Rt(t,e,n,r){var i,a,o,s,l=e[0],c=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(l-f)<Z&&Math.abs(c-d)<Z&&Math.abs(e-n)<Z?gt(t):(f=l-f,d=c-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*l+r*c+u*e),t[13]=-(h*l+a*c+o*e),t[14]=-(f*l+d*c+n*e),t[15]=1,t)}function It(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 Bt=Object.freeze({__proto__:null,create:ht,clone:ft,copy:dt,fromValues:function(t,e,n,r,i,a,o,s,l,c,u,h,f,d,p,g){var m=new Q(16);return m[0]=t,m[1]=e,m[2]=n,m[3]=r,m[4]=i,m[5]=a,m[6]=o,m[7]=s,m[8]=l,m[9]=c,m[10]=u,m[11]=h,m[12]=f,m[13]=d,m[14]=p,m[15]=g,m},set:pt,identity:gt,transpose:mt,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],l=e[6],c=e[7],u=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],m=e[14],e=e[15];return t[0]=s*(f*e-d*m)-h*(l*e-c*m)+g*(l*d-c*f),t[1]=-(r*(f*e-d*m)-h*(i*e-a*m)+g*(i*d-a*f)),t[2]=r*(l*e-c*m)-s*(i*e-a*m)+g*(i*c-a*l),t[3]=-(r*(l*d-c*f)-s*(i*d-a*f)+h*(i*c-a*l)),t[4]=-(o*(f*e-d*m)-u*(l*e-c*m)+p*(l*d-c*f)),t[5]=n*(f*e-d*m)-u*(i*e-a*m)+p*(i*d-a*f),t[6]=-(n*(l*e-c*m)-o*(i*e-a*m)+p*(i*c-a*l)),t[7]=n*(l*d-c*f)-o*(i*d-a*f)+u*(i*c-a*l),t[8]=o*(h*e-d*g)-u*(s*e-c*g)+p*(s*d-c*h),t[9]=-(n*(h*e-d*g)-u*(r*e-a*g)+p*(r*d-a*h)),t[10]=n*(s*e-c*g)-o*(r*e-a*g)+p*(r*c-a*s),t[11]=-(n*(s*d-c*h)-o*(r*d-a*h)+u*(r*c-a*s)),t[12]=-(o*(h*m-f*g)-u*(s*m-l*g)+p*(s*f-l*h)),t[13]=n*(h*m-f*g)-u*(r*m-i*g)+p*(r*f-i*h),t[14]=-(n*(s*m-l*g)-o*(r*m-i*g)+p*(r*l-i*s)),t[15]=n*(s*f-l*h)-o*(r*f-i*h)+u*(r*l-i*s),t},determinant:vt,multiply:bt,translate:xt,scale:wt,rotate:function(t,e,n,r){var i,a,o,s,l,c,u,h,f,d,p,g,m,y,v,b,x,w,k,M,E=r[0],O=r[1],r=r[2],S=Math.hypot(E,O,r);return S<Z?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],l=e[3],c=e[4],u=e[5],h=e[6],f=e[7],d=e[8],p=e[9],g=e[10],m=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)+c*(y=O*E*i+r*S)+d*(r=r*E*i-O*S),t[1]=o*n+u*y+p*r,t[2]=s*n+h*y+g*r,t[3]=l*n+f*y+m*r,t[4]=a*v+c*b+d*x,t[5]=o*v+u*b+p*x,t[6]=s*v+h*b+g*x,t[7]=l*v+f*b+m*x,t[8]=a*w+c*k+d*M,t[9]=o*w+u*k+p*M,t[10]=s*w+h*k+g*M,t[11]=l*w+f*k+m*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},rotateX:kt,rotateY:Mt,rotateZ:function(t,e,n){var r=Math.sin(n),n=Math.cos(n),i=e[0],a=e[1],o=e[2],s=e[3],l=e[4],c=e[5],u=e[6],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+l*r,t[1]=a*n+c*r,t[2]=o*n+u*r,t[3]=s*n+h*r,t[4]=l*n-i*r,t[5]=c*n-a*r,t[6]=u*n-o*r,t[7]=h*n-s*r,t},fromTranslation:Et,fromScaling:Ot,fromRotation:function(t,e,n){var r,i=n[0],a=n[1],n=n[2],o=Math.hypot(i,a,n);return o<Z?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:St,fromQuat2:function(t,e){var n=new Q(3),r=-e[0],i=-e[1],a=-e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],h=r*r+i*i+a*a+o*o;return 0<h?(n[0]=2*(s*o+u*r+l*a-c*i)/h,n[1]=2*(l*o+u*i+c*r-s*a)/h,n[2]=2*(c*o+u*a+s*i-l*r)/h):(n[0]=2*(s*o+u*r+l*a-c*i),n[1]=2*(l*o+u*i+c*r-s*a),n[2]=2*(c*o+u*a+s*i-l*r)),St(t,e,n),t},getTranslation:_t,getScaling:At,getRotation:Pt,fromRotationTranslationScale:function(t,e,n,r){var i=e[0],a=e[1],o=e[2],e=e[3],s=i*(u=i+i),l=i*(h=a+a),i=i*(f=o+o),c=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-(c+o))*f,t[1]=(l+e)*f,t[2]=(i-h)*f,t[3]=0,t[4]=(l-e)*d,t[5]=(1-(s+o))*d,t[6]=(a+u)*d,t[7]=0,t[8]=(i+h)*r,t[9]=(a-u)*r,t[10]=(1-(s+c))*r,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},fromRotationTranslationScaleOrigin:Tt,fromQuat:Lt,frustum:function(t,e,n,r,i,a,o){var s=1/(n-e),l=1/(i-r),c=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(i+r)*l,t[10]=(o+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*c,t[15]=0,t},perspectiveNO:Nt,perspective:Nt,perspectiveZO:function(t,e,n,r,i){return e=1/Math.tan(e/2),t[0]=e/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(t[10]=i*(n=1/(r-i)),t[14]=i*r*n):(t[10]=-1,t[14]=-r),t},perspectiveFromFieldOfView:function(t,e,n,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),e=Math.tan(e.rightDegrees*Math.PI/180),s=2/(o+e),l=2/(i+a);return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(o-e)*s*.5,t[9]=(i-a)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},orthoNO:Ct,ortho:jt,orthoZO:function(t,e,n,r,i,a,o){var s=1/(e-n),l=1/(r-i),o=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=o,t[11]=0,t[12]=(e+n)*s,t[13]=(i+r)*l,t[14]=a*o,t[15]=1,t},lookAt:Rt,targetTo:function(t,e,n,r){var i=e[0],a=e[1],e=e[2],o=r[0],s=r[1],r=r[2],l=i-n[0],c=a-n[1],n=e-n[2],u=l*l+c*c+n*n,h=(0<u&&(l*=u=1/Math.sqrt(u),c*=u,n*=u),s*n-r*c);return 0<(u=h*h+(r=r*l-o*n)*r+(o=o*c-s*l)*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]=c*o-n*r,t[5]=n*h-l*o,t[6]=l*r-c*h,t[7]=0,t[8]=l,t[9]=c,t[10]=n,t[11]=0,t[12]=i,t[13]=a,t[14]=e,t[15]=1,t},str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},frob:function(t){return Math.hypot(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},subtract:It,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},equals:function(t,e){var n=t[0],r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],f=t[10],d=t[11],p=t[12],g=t[13],m=t[14],t=t[15],y=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],P=e[12],T=e[13],L=e[14],e=e[15];return Math.abs(n-y)<=Z*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(r-v)<=Z*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-b)<=Z*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(a-x)<=Z*Math.max(1,Math.abs(a),Math.abs(x))&&Math.abs(o-w)<=Z*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-k)<=Z*Math.max(1,Math.abs(s),Math.abs(k))&&Math.abs(l-M)<=Z*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-E)<=Z*Math.max(1,Math.abs(c),Math.abs(E))&&Math.abs(u-O)<=Z*Math.max(1,Math.abs(u),Math.abs(O))&&Math.abs(h-S)<=Z*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(f-_)<=Z*Math.max(1,Math.abs(f),Math.abs(_))&&Math.abs(d-A)<=Z*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(p-P)<=Z*Math.max(1,Math.abs(p),Math.abs(P))&&Math.abs(g-T)<=Z*Math.max(1,Math.abs(g),Math.abs(T))&&Math.abs(m-L)<=Z*Math.max(1,Math.abs(m),Math.abs(L))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))},mul:bt,sub:It});function y(){var t=new Q(3);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function Ft(t){var e=new Q(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 zt(t,e,n){var r=new Q(3);return r[0]=t,r[1]=e,r[2]=n,r}function Gt(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Wt(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function Ht(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}function Yt(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 qt(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 Ut(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Xt(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 $t(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 Kt(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 Zt(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 Qt(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)<=Z*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=Z*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(t-e)<=Z*Math.max(1,Math.abs(t),Math.abs(e))}var 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)},te=Dt;function ee(){var t=new Q(4);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}function ne(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 re(){var t=new Q(4);return Q!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function ie(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 ae(t,e,n){var r=e[0],i=e[1],a=e[2],e=e[3],o=n[0],s=n[1],l=n[2],n=n[3];return t[0]=r*n+e*o+i*l-a*s,t[1]=i*n+e*s+a*o-r*l,t[2]=a*n+e*l+r*s-i*o,t[3]=e*n-r*o-i*s-a*l,t}function oe(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 se(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}y(),ee();var le=function(t,e,n,r){var i=new Q(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},ue=ae,he=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 fe(t,e){var n=e[0],r=e[1],n=n*n+r*r;0<n&&(n=1/Math.sqrt(n)),t[0]=e[0]*n,t[1]=e[1]*n}function de(t,e){return t[0]*e[0]+t[1]*e[1]}function pe(t,e){return t[0]===e[0]&&t[1]===e[1]}function ge(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}y(),zt(1,0,0),zt(0,1,0),re(),re(),J(),e=new Q(2),Q!=Float32Array&&(e[0]=0,e[1]=0);var me=function(t,e){return(me=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 ye(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}me(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 et(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 ve(t,o,s,l){return new(s=s||Promise)(function(n,e){function r(t){try{a(l.next(t))}catch(t){e(t)}}function i(t){try{a(l.throw(t))}catch(t){e(t)}}function a(t){var e;t.done?n(t.value):((e=t.value)instanceof s?e:new s(function(t){t(e)})).then(r,i)}a((l=l.apply(t,o||[])).next())})}function w(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 m(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 be(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 xe={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var we={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function ke(t){return Array.isArray(t)&&t.every(function(t){var e=t[0].toLowerCase();return we[e]===t.length-1&&"achlmqstvz".includes(e)})}function Me(t){return ke(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function Ee(t){return Me(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function Oe(t){for(var e=t.pathValue[t.segmentStart],n=e.toLowerCase(),r=t.data;r.length>=we[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,we[n]))),we[n]););}function Se(t){return 48<=t&&t<=57}function _e(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 Ae(t){var e,n,r,i,a,o=t.max,s=t.pathValue,l=t.index,c=s.charCodeAt(l),u=we[s[l].toLowerCase()];if(t.segmentStart=l,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(c)){if(t.index+=1,_e(t),t.data=[],u)for(;;){for(var h=u;0<h;--h){if(97!=(32|c)||3!==h&&4!==h?function(t){var e,n,r=t.max,i=t.pathValue,a=t.index,o=a,s=!1,l=!1,c=!1;if(r<=o)t.err="[path-util]: Invalid path value at index "+o+', "pathValue" is missing param';else if(Se(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&&Se(n))return t.err="[path-util]: Invalid path value at index "+a+', "'+i[a]+'" illegal number';for(;o<r&&Se(i.charCodeAt(o));)o+=1,s=!0;n=i.charCodeAt(o)}if(46===n){for(c=!0,o+=1;Se(i.charCodeAt(o));)o+=1,l=!0;n=i.charCodeAt(o)}if(101===n||69===n){if(c&&!s&&!l)return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid float exponent';if(43!==(n=i.charCodeAt(o+=1))&&45!==n||(o+=1),!(o<r&&Se(i.charCodeAt(o))))return t.err="[path-util]: Invalid path value at index "+o+', "'+i[o]+'" invalid integer exponent';for(;o<r&&Se(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),_e(t),t.index<o&&44===s.charCodeAt(t.index)&&(t.index+=1,_e(t))}if(t.index>=t.max)break;if(!(48<=(e=s.charCodeAt(t.index))&&e<=57||43===e||45===e||46===e))break}Oe(t)}else t.err='[path-util]: Invalid path value "'+s[l]+'" is not a path command'}var Pe=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 Te(t){var o,s,l,c;return Me(t)?ge(t):(t=function(t){if(ke(t))return ge(t);var e=new Pe(t);for(_e(e);e.index<e.max&&!e.err.length;)Ae(e);return e.err||e.segments}(t),c=l=s=o=0,t.map(function(t){var e=t.slice(1).map(Number),t=t[0],n=t.toUpperCase();if("M"===t)return o=e[0],s=e[1],["M",l=o,c=s];if(t!==n)switch(n){case"A":i=[n,e[0],e[1],e[2],e[3],e[4],e[5]+o,e[6]+s];break;case"V":i=[n,e[0]+s];break;case"H":i=[n,e[0]+o];break;default:var r=e.map(function(t,e){return t+(e%2?s:o)}),i=[n].concat(r)}else i=[n].concat(e);var a=i.length;switch(n){case"Z":o=l,s=c;break;case"H":o=i[1];break;case"V":s=i[1];break;default:o=i[a-2],s=i[a-1],"M"===n&&(l=o,c=s)}return i}))}function Le(t){if(Ee(t))return ge(t);for(var e,n,r,i,a,o,s,l=Te(t),c=v({},xe),u=0;u<l.length;u+=1){l[u]=(e=l[u],n=c,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=l[u],f=h.length;c.x1=+h[f-2],c.y1=+h[f-1],c.x2=+h[f-4]||c.x1,c.y2=+h[f-3]||c.y1}return l}function Ne(t,e,n){return{x:t*Math.cos(n)-e*Math.sin(n),y:t*Math.sin(n)+e*Math.cos(n)}}function Ce(t,e,n,r,i,a,o,s,l,c){var u=120*Math.PI/180,h=Math.PI/180*(+i||0),f=[],d=(c?(b=c[0],x=c[1],y=c[2],v=c[3]):(t=(g=Ne(t,e,-h)).x,e=g.y,1<(d=(p=(t-(s=(g=Ne(s,l,-h)).x))/2)*p/(n*n)+(g=(e-(l=g.y))/2)*g/(r*r))&&(n*=d=Math.sqrt(d),r*=d),d=n*n,m=r*r,y=(a=(a===o?-1:1)*Math.sqrt(Math.abs((d*m-d*g*g-m*p*p)/(d*g*g+m*p*p))))*n*g/r+(t+s)/2,v=a*-r*p/n+(e+l)/2,b=Math.asin(((e-v)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),x=Math.asin(((l-v)/r*Math.pow(10,9)>>0)/Math.pow(10,9)),b=t<y?Math.PI-b:b,x=s<y?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&&(m=x,g=s,a=l,x=b+u*(o&&b<x?1:-1),f=Ce(s=y+n*Math.cos(x),l=v+r*Math.sin(x),n,r,i,0,o,g,a,[x,m,y,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,m=4/3*r*g,y=[t,e],v=[t+a*u,e-m*p],b=[s+a*o,l-m*i],x=[s,l];if(v[0]=2*y[0]-v[0],v[1]=2*y[1]-v[1],c)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?Ne(f[k-1],f[k],h).y:Ne(f[k],f[k+1],h).x;return w}function je(t,e,n){var r=t[0],t=t[1];return[r+(e[0]-r)*n,t+(e[1]-t)*n]}function Re(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}function Ie(t,e,n,r,i){var a=Re([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=je([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 Be(t,e,n,r){var t=[t,e],e=[n,r],i=je(t,e,.5),e=je(e,i,.5),a=je(i,e,.5),o=je(e,a,.5),s=je(a,o,.5),t=Ie(t[0],t[1],i[0],i[1],a[0]).point,i=Ie(s[0],s[1],o[0],o[1],e[0]).point;return[t.x,t.y,i.x,i.y,n,r]}function Fe(t,e){var n;if(void 0===e&&(e=!1),Ee(n=t)&&n.every(function(t){t=t[0];return"MC".includes(t)}))return n=ge(t),e?[n,[]]:n;for(var r,i=Le(t),a=v({},xe),o=[],s="",l=i.length,c=[],u=0;u<l;u+=1){i[u]&&(s=i[u][0]),o[u]=s;var h=function(t,e){var n,r,i,a,o,s,l=t[0],c=t.slice(1).map(Number),u=c[0],h=c[1],f=e.x1,d=e.y1,p=e.x,g=e.y;switch("TQ".includes(l)||(e.qx=null,e.qy=null),l){case"M":return e.x=u,e.y=h,t;case"A":return s=[f,d].concat(c),["C"].concat(Ce(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(c),["C"].concat((n=s[0],r=s[1],i=s[2],a=s[3],o=s[4],s=s[5],[1/3*n+2/3*i,1/3*r+2/3*a,1/3*o+2/3*i,1/3*s+2/3*a,o,s]));case"L":return["C"].concat(Be(f,d,u,h));case"Z":return f===p&&d===g?["C",f,d,p,g,p,g]:["C"].concat(Be(f,d,p,g))}return t}(i[u],a),f=(i[u]=h,m=g=p=d=f=void 0,i),d=o,p=u;if(7<f[p].length){f[p].shift();for(var g=f[p],m=p;g.length;)d[p]="A",f.splice(m+=1,0,["C"].concat(g.splice(0,6)));f.splice(p,1)}l=i.length,"Z"===s&&c.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,c]:i}function De(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 ze(t,e,n,r,i,I,B,a,o,s,l){var c=l.bbox,F=void 0===c||c,c=l.length,D=void 0===c||c,c=l.sampleSize,u=void 0===c?30:c,h="number"==typeof s,f=t,d=e,p=0,g=[f,d,p],m=[f,d],y={x:0,y:0},v=[{x:f,y:d}];h&&s<=0&&(y={x:f,y:d});for(var b,x,w,k,M,E,O,S,_,A,P,T,L,N,C,j,R=0;R<=u;R+=1)b=t,x=e,w=n,k=r,M=i,E=I,O=B,S=a,_=o,A=R/u,T=j=C=N=L=T=P=void 0,T=Math.abs,L=Math.sin,N=Math.cos,C=Math.sqrt,j=Math.PI,w=T(w),T=T(k),k=j/180*((M%360+360)%360),f=(P=b===S&&x===_?{x:b,y:x}:0===w||0===T?Ie(b,x,S,_,A).point:(M=(b-S)/2,P=(x-_)/2,M={x:N(k)*M+L(k)*P,y:-L(k)*M+N(k)*P},1<(P=Math.pow(M.x,2)/Math.pow(w,2)+Math.pow(M.y,2)/Math.pow(T,2))&&(w*=C(P),T*=C(P)),P=(Math.pow(w,2)*Math.pow(T,2)-Math.pow(w,2)*Math.pow(M.y,2)-Math.pow(T,2)*Math.pow(M.x,2))/(Math.pow(w,2)*Math.pow(M.y,2)+Math.pow(T,2)*Math.pow(M.x,2)),E=(E!==O?1:-1)*C(P<0?0:P),C=w*M.y/T*E,P=-T*M.x/w*E,E=N(k)*C-L(k)*P+(b+S)/2,b=L(k)*C+N(k)*P+(x+_)/2,x=De({x:1,y:0},S={x:(M.x-C)/w,y:(M.y-P)/T}),_=De(S,{x:(-M.x-C)/w,y:(-M.y-P)/T}),!O&&0<_?_-=2*j:O&&_<0&&(_+=2*j),S=x+(_%=2*j)*A,C=w*N(S),M=T*L(S),{x:N(k)*C-L(k)*M+E,y:L(k)*C+N(k)*M+b})).x,d=P.y,F&&v.push({x:f,y:d}),D&&(p+=Re(m,[f,d])),m=[f,d],h&&s<=p&&s>g[2]&&(O=(p-s)/(p-g[2]),y={x:m[0]*(1-O)+g[0]*O,y:m[1]*(1-O)+g[1]*O}),g=[f,d,p];return{length:p,point:y=h&&p<=s?{x:a,y:o}:y,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 Ge(t,e,n,r,i,a,o,s,l,c){var u=c.bbox,h=void 0===u||u,u=c.length,f=void 0===u||u,u=c.sampleSize,d=void 0===u?10:u,p="number"==typeof l,g=t,m=e,y=0,v=[g,m,y],b=[g,m],x={x:0,y:0},w=[{x:g,y:m}];p&&l<=0&&(x={x:g,y:m});for(var k,M,E,O,S,_,A,P,T,L,N=0;N<=d;N+=1)k=t,M=e,E=n,O=r,S=i,_=a,A=o,P=s,L=void 0,L=1-(T=N/d),g=(k={x:Math.pow(L,3)*k+3*Math.pow(L,2)*T*E+3*L*Math.pow(T,2)*S+Math.pow(T,3)*A,y:Math.pow(L,3)*M+3*Math.pow(L,2)*T*O+3*L*Math.pow(T,2)*_+Math.pow(T,3)*P}).x,m=k.y,h&&w.push({x:g,y:m}),f&&(y+=Re(b,[g,m])),b=[g,m],p&&l<=y&&l>v[2]&&(E=(y-l)/(y-v[2]),x={x:b[0]*(1-E)+v[0]*E,y:b[1]*(1-E)+v[1]*E}),v=[g,m,y];return{length:y,point:x=p&&y<=l?{x:o,y:s}:x,min:{x:Math.min.apply(null,w.map(function(t){return t.x})),y:Math.min.apply(null,w.map(function(t){return t.y}))},max:{x:Math.max.apply(null,w.map(function(t){return t.x})),y:Math.max.apply(null,w.map(function(t){return t.y}))}}}function We(t,e,n,r,i,a,o,s){var l=s.bbox,c=void 0===l||l,l=s.length,u=void 0===l||l,l=s.sampleSize,h=void 0===l?10:l,f="number"==typeof o,d=t,p=e,g=0,m=[d,p,g],y=[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,c&&b.push({x:d,y:p}),u&&(g+=Re(y,[d,p])),y=[d,p],f&&o<=g&&o>m[2]&&(k=(g-o)/(g-m[2]),v={x:y[0]*(1-k)+m[0]*k,y:y[1]*(1-k)+m[1]*k}),m=[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 He(t,e,n){for(var r,i,a,o=Le(t),s="number"==typeof e,l=[],c=0,u=0,h=0,f=0,d=[],p=[],g=0,m={x:0,y:0},y=m,v=m,b=m,x=0,w=0,k=o.length;w<k;w+=1)l=(r="M"===(i=(a=o[w])[0]))?l:[c,u].concat(a.slice(1)),r?(y=m={x:h=a[1],y:f=a[2]},g=0,s&&e<.001&&(b=m)):"L"===i?(g=(r=Ie(l[0],l[1],l[2],l[3],(e||0)-x)).length,m=r.min,y=r.max,v=r.point):"A"===i?(g=(r=ze(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],l[8],(e||0)-x,n||{})).length,m=r.min,y=r.max,v=r.point):"C"===i?(g=(r=Ge(l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],(e||0)-x,n||{})).length,m=r.min,y=r.max,v=r.point):"Q"===i?(g=(r=We(l[0],l[1],l[2],l[3],l[4],l[5],(e||0)-x,n||{})).length,m=r.min,y=r.max,v=r.point):"Z"===i&&(g=(r=Ie((l=[c,u,h,f])[0],l[1],l[2],l[3],(e||0)-x)).length,m=r.min,y=r.max,v=r.point),s&&x<e&&e<=x+g&&(b=v),p.push(y),d.push(m),x+=g,c=(r="Z"!==i?a.slice(-2):[h,f])[0],u=r[1];return{length:x,point:b=s&&x<=e?{x:c,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 Ye(t){return(c=l=s=0)<=Fe(t).map(function(t){var e,n,r,i,a,o;return"M"===t[0]?(s=t[1],l=t[2],0):(o=t.slice(1),e=o[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],c=3*((o-l)*(e+r)-(a-s)*(n+i)+n*(s-r)-e*(l-i)+o*(r+s/3)-a*(i+l/3))/20,n=t.slice(-2),s=n[0],l=n[1],c)}).reduce(function(t,e){return t+e},0);var s,l,c}function Ve(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?Ge(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=je(n,i,r),i=je(i,a,r),a=je(a,e,r),o=je(n,i,r),i=je(i,a,r),r=je(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)},Ue=function(t){return"function"==typeof t},_=function(t){return null==t},Xe={}.toString,$e=function(t,e){return Xe.call(t)==="[object "+e+"]"},Ke=function(t){return Array.isArray?Array.isArray(t):$e(t,"Array")},Ze=function(t){var e=typeof t;return null!==t&&"object"==e||"function"==e};function Qe(t,e){if(t)if(Ke(t))for(var n=0,r=t.length;n<r&&!1!==e(t[n],n);n++);else if(Ze(t))for(var i in t)if(t.hasOwnProperty(i)&&!1===e(t[i],i))break}var Je=function(t){return"object"==typeof t&&null!==t},tn=function(t){if(!Je(t)||!$e(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},en=function(t){if(Ke(t))return t.reduce(function(t,e){return Math.max(t,e)},t[0])},nn=function(t){if(Ke(t))return t.reduce(function(t,e){return Math.min(t,e)},t[0])},rn=function(t,n,e){var r;return Ke(t)||tn(t)?(r=e,Qe(t,function(t,e){r=n(r,t,e)}),r):t},an=function(t){return $e(t,"String")};var on=function(t,e,n){return t<e?e:n<t?n:t},sn=function(t){return $e(t,"Number")};function ln(t){return _(t)?"":t.toString()}var cn=function(t,e){return(t%e+e)%e},un=function(t){t=ln(t);return t.charAt(0).toLowerCase()+t.substring(1)};var hn=function(t){t=ln(t);return t.charAt(0).toUpperCase()+t.substring(1)},fn=function(t){return $e(t,"Boolean")},dn=function(t){return void 0===t},pn=function(t){return t instanceof Element||t instanceof HTMLDocument};function gn(t,e){for(var n in e)e.hasOwnProperty(n)&&"constructor"!==n&&void 0!==e[n]&&(t[n]=e[n])}function mn(t){if("object"!=typeof t||null===t)return t;if(Ke(t))for(var e=[],n=0,r=t.length;n<r;n++)"object"==typeof t[n]&&null!=t[n]?e[n]=mn(t[n]):e[n]=t[n];else for(var i in e={},t)"object"==typeof t[i]&&null!=t[i]?e[i]=mn(t[i]):e[i]=t[i];return e}var yn=mn;function vn(r,i,a){var o;return function(){var t=this,e=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(t,e)},i),n&&r.apply(t,e)}}function bn(a,o){var s;if(Ue(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 xn=5;function wn(t,e){if(t===e)return!0;if(t&&e&&!an(t)&&!an(e)){if(qe(t)||qe(e)){if(t.length!==e.length)return!1;for(var n=!0,r=0;r<t.length&&(n=wn(t[r],e[r]));r++);return n}if(Je(t)||Je(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=wn(t[i[r]],e[i[r]]));r++);return n}}return!1}function kn(){}var nt=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||xn,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&tn(o)?(tn(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):Ke(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t},Mn=wn,En=function(t,e,n){for(var r=0,i=an(e)?e.split("."):e;t&&r<i.length;)t=t[i[r++]];return void 0===t||r<i.length?n:t},On=Object.prototype.hasOwnProperty,Sn=function(n,r,i){function a(){u=!1===i.leading?0:Date.now(),o=null,c=n.apply(s,l),o||(s=l=null)}function t(){var t=Date.now(),e=(u||!1!==i.leading||(u=t),r-(t-u));return s=this,l=arguments,e<=0||r<e?(o&&(clearTimeout(o),o=null),u=t,c=n.apply(s,l),o||(s=l=null)):o||!1===i.trailing||(o=setTimeout(a,e)),c}var o,s,l,c,u=0;i=i||{};return t.cancel=function(){clearTimeout(o),u=0,o=s=l=null},t};function _n(t,e,n){(t.prototype=e.prototype=n).constructor=t}function An(t,e){var n,r=Object.create(t.prototype);for(n in e)r[n]=e[n];return r}function Pn(){}var e="\\s*([+-]?\\d+)\\s*",n="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",r="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Tn=/^#([0-9a-f]{3,8})$/,Ln=new RegExp("^rgb\\("+[e,e,e]+"\\)$"),Nn=new RegExp("^rgb\\("+[r,r,r]+"\\)$"),Cn=new RegExp("^rgba\\("+[e,e,e,n]+"\\)$"),jn=new RegExp("^rgba\\("+[r,r,r,n]+"\\)$"),Rn=new RegExp("^hsl\\("+[n,r,r]+"\\)$"),In=new RegExp("^hsla\\("+[n,r,r,n]+"\\)$"),Bn={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 Fn(){return this.rgb().formatHex()}function Dn(){return this.rgb().formatRgb()}function zn(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Tn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Gn(e):3===n?new Hn(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Wn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Wn(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=Ln.exec(t))?new Hn(e[1],e[2],e[3],1):(e=Nn.exec(t))?new Hn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Cn.exec(t))?Wn(e[1],e[2],e[3],e[4]):(e=jn.exec(t))?Wn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Rn.exec(t))?Un(e[1],e[2]/100,e[3]/100,1):(e=In.exec(t))?Un(e[1],e[2]/100,e[3]/100,e[4]):Bn.hasOwnProperty(t)?Gn(Bn[t]):"transparent"===t?new Hn(NaN,NaN,NaN,0):null}function Gn(t){return new Hn(t>>16&255,t>>8&255,255&t,1)}function Wn(t,e,n,r){return new Hn(t=r<=0?e=n=NaN:t,e,n,r)}function Hn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Yn(){return"#"+qn(this.r)+qn(this.g)+qn(this.b)}function Vn(){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 Un(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||1<=n?t=e=NaN:e<=0&&(t=NaN),new $n(t,e,n,r)}function Xn(t){var e,n,r,i,a,o,s,l;return t instanceof $n?new $n(t.h,t.s,t.l,t.opacity):(t=t instanceof Pn?t:zn(t))?t instanceof $n?t:(e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=NaN,l=((a=Math.max(e,n,r))+i)/2,(s=a-i)?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=0<l&&l<1?0:o,new $n(o,s,l,t.opacity)):new $n}function $n(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Kn(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 Zn(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Qn(t,e){return Math.abs(t-e)<.001}function Jn(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 tr(t){return(t+2*Math.PI)%(2*Math.PI)}_n(Pn,zn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Fn,formatHex:Fn,formatHsl:function(){return Xn(this).formatHsl()},formatRgb:Dn,toString:Dn}),_n(Hn,function(t,e,n,r){return 1===arguments.length?(i=(i=t)instanceof Pn?i:zn(i))?new Hn((i=i.rgb()).r,i.g,i.b,i.opacity):new Hn:new Hn(t,e,n,null==r?1:r);var i},An(Pn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Hn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Hn(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:Yn,formatHex:Yn,formatRgb:Vn,toString:Vn})),_n($n,function(t,e,n,r){return 1===arguments.length?Xn(t):new $n(t,e,n,null==r?1:r)},An(Pn,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new $n(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new $n(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 Hn(Kn(240<=t?t-240:120+t,n,e),Kn(t,n,e),Kn(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 er={box:function(t,e,n,r){return Jn([t,n],[e,r])},length:Zn,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?Zn(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?Zn(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 pe(n,[0,0])?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(fe(r=[-n[1],n[0]],r),Math.abs(de([i-t,a-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function nr(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),h=u/10,f=0;f<=c;f++){var d=f*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=Zn(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,g=0;g<32&&!(h<1e-4);g++){var m=o-h,y=o+h,v=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=Zn(l[0],l[1],v[0],v[1]);0<=m&&v<s?(o=m,s=v):(m=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=Zn(l[0],l[1],m[0],m[1]),y<=1&&v<s?(o=y,s=v):h*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function rr(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function ir(t,e,n){n=t+n-2*e;return Qn(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function ar(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function or(t,e,n,r,i,a,o){var s=rr(t,n,i,o),l=rr(e,r,a,o),c=er.pointAt(t,e,n,r,o),n=er.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function sr(t,e,n,r,i,a,o){return 0===o?(Zn(t,e,n,r)+Zn(n,r,i,a)+Zn(t,e,i,a))/2:(e=(t=or(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),sr.apply(void 0,e)+sr.apply(void 0,n))}var lr={box:function(t,e,n,r,i,a){var o=ir(t,n,i)[0],s=ir(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(rr(t,n,i,o)),void 0!==s&&c.push(rr(e,r,a,s)),Jn(l,c)},length:function(t,e,n,r,i,a){return sr(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return nr([t,n,i],[e,r,a],o,s,rr)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return Zn(t.x,t.y,o,s)},interpolationAt:rr,pointAt:function(t,e,n,r,i,a,o){return{x:rr(t,n,i,o),y:rr(e,r,a,o)}},divide:or,tangentAngle:function(t,e,n,r,i,a,o){t=ar(t,n,i,o),n=ar(e,r,a,o);return tr(Math.atan2(n,t))}};function cr(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 ur(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 hr(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 Qn(r,0)?Qn(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Qn(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 fr(t,e,n,r,i,a,o,s,l){var c=cr(t,n,i,o,l),u=cr(e,r,a,s,l),h=er.pointAt(t,e,n,r,l),n=er.pointAt(n,r,i,a,l),r=er.pointAt(i,a,o,s,l),i=er.pointAt(h.x,h.y,n.x,n.y,l),a=er.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,h.x,h.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function dr(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],h=0,f=c.length,d=0;d<f;d++)h+=Zn(c[d],u[d],c[(d+1)%f],u[(d+1)%f]);return h/2}t=fr(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return dr.apply(void 0,e)+dr.apply(void 0,n)}var pr={extrema:hr,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=hr(t,n,i,o),h=hr(e,r,a,s),f=0;f<u.length;f++)l.push(cr(t,n,i,o,u[f]));for(var d=0;d<h.length;d++)c.push(cr(e,r,a,s,h[d]));return Jn(l,c)},length:function(t,e,n,r,i,a,o,s){return dr(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return nr([t,n,i,o],[e,r,a,s],l,c,cr,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return Zn(t.x,t.y,l,c)},interpolationAt:cr,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:cr(t,n,i,o,l),y:cr(e,r,a,s,l)}},divide:fr,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=ur(t,n,i,o,l),n=ur(e,r,a,s,l);return tr(Math.atan2(n,t))}};function gr(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,l=Math.abs(n),c=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),m=(u-h)*Math.pow(Math.cos(f),3)/o,y=(h-u)*Math.pow(Math.sin(f),3)/s,v=d-m,b=p-y,m=l-m,y=c-y,x=Math.hypot(b,v),w=Math.hypot(y,m);f+=x*Math.asin((v*y-b*m)/(x*w))/Math.sqrt(u+h-d*d-p*p),f=Math.min(Math.PI/2,Math.max(0,f))}return{x:t+gr(d,n),y:e+gr(p,r)}};function yr(t,e,n,r,i,a){return n*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+t}function vr(t,e,n,r,i,a){return n*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function br(t,e,n){return{x:t*Math.cos(n),y:e*Math.sin(n)}}function xr(t,e,n){var r=Math.cos(n),n=Math.sin(n);return[t*r-e*n,t*n+e*r]}var wr={box:function(t,e,n,r,i,a,o){for(var s=Math.atan(-r/n*Math.tan(i)),l=1/0,c=-1/0,u=[a,o],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=yr(t,0,n,r,i,u[d]);p<l&&(l=p),c<p&&(c=p)}for(var g=Math.atan(r/(n*Math.tan(i))),m=1/0,y=-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=vr(0,e,n,r,i,v[w]);k<m&&(m=k),y<k&&(y=k)}return{x:l,y:m,width:c-l,height:y-m}},length:function(t,e,n,r,i,a,o){},nearestPoint:function(t,e,n,r,i,a,o,s,l){var s=xr(s-t,l-e,-i),l=s[0],s=s[1],l=mr(0,0,n,r,l,s),c=(s=l.x,c=l.y,(Math.atan2(c*n,s*r)+2*Math.PI)%(2*Math.PI)),s=(c<a?l=br(n,r,a):o<c&&(l=br(n,r,o)),xr(l.x,l.y,i));return{x:s[0]+t,y:s[1]+e}},pointDistance:function(t,e,n,r,i,a,o,s,l){t=this.nearestPoint(t,e,n,r,i,a,o,s,l);return Zn(t.x,t.y,s,l)},pointAt:function(t,e,n,r,i,a,o,s){o=(o-a)*s+a;return{x:yr(t,0,n,r,i,o),y:vr(0,e,n,r,i,o)}},tangentAngle:function(t,e,n,r,i,a,o,s){var l,o=(o-a)*s+a,s=(s=r,a=i,l=o,-1*n*Math.cos(a)*Math.sin(l)-s*Math.sin(a)*Math.cos(l)),i=(a=r,l=i,r=o,-1*n*Math.sin(l)*Math.sin(r)+a*Math.cos(l)*Math.cos(r));return tr(Math.atan2(i,s))}};function kr(t){for(var e=0,n=[],r=0;r<t.length-1;r++){var i=t[r],a=t[r+1],o=Zn(i[0],i[1],a[0],a[1]);n.push({from:i,to:a,length:o}),e+=o}return{segments:n,totalLength:e}}var Mr,Er,Or={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 Jn(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+=Zn(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=kr(t),r=e.segments,i=e.totalLength;if(0===i)return{x:t[0][0],y:t[0][1]};for(var a=0,o=null,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=er.pointAt(c[0],c[1],u[0],u[1],(n-a)/l);break}a+=l}return o},pointDistance:function(t,e,n){for(var r=t,i=e,a=n,o=1/0,s=0;s<r.length-1;s++){var l=r[s],c=r[s+1],l=er.pointDistance(l[0],l[1],c[0],c[1],i,a);l<o&&(o=l)}return o},tangentAngle:function(t,e){var n=e;if(1<n||n<0||t.length<2)return 0;for(var r=(t=kr(t)).segments,i=t.totalLength,a=0,o=0,s=0;s<r.length;s++){var l=r[s],c=l.from,u=l.to,l=l.length/i;if(a<=n&&n<=a+l){o=Math.atan2(u[1]-c[1],u[0]-c[0]);break}a+=l}return o}},e={exports:{}};function Sr(){}function _r(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function Ar(t,e,n,r,i){if("function"!=typeof n)throw new TypeError("The listener must be a function");n=new _r(n,r||t,i),r=Er?Er+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 Pr(t,e){0==--t._eventsCount?t._events=new Sr:delete t._events[e]}function Tr(){this._events=new Sr,this._eventsCount=0}r=e,Mr=Object.prototype.hasOwnProperty,Er="~",Object.create&&(Sr.prototype=Object.create(null),(new Sr).__proto__||(Er=!1)),Tr.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)Mr.call(t,e)&&n.push(Er?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},Tr.prototype.listeners=function(t){var t=Er?Er+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},Tr.prototype.listenerCount=function(t){t=Er?Er+t:t,t=this._events[t];return t?t.fn?1:t.length:0},Tr.prototype.emit=function(t,e,n,r,i,a){var o=Er?Er+t:t;if(!this._events[o])return!1;var s,l=this._events[o],c=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,e),!0;case 3:return l.fn.call(l.context,e,n),!0;case 4:return l.fn.call(l.context,e,n,r),!0;case 5:return l.fn.call(l.context,e,n,r,i),!0;case 6:return l.fn.call(l.context,e,n,r,i,a),!0}for(f=1,s=new Array(c-1);f<c;f++)s[f-1]=arguments[f];l.fn.apply(l.context,s)}else for(var u,h=l.length,f=0;f<h;f++)switch(l[f].once&&this.removeListener(t,l[f].fn,void 0,!0),c){case 1:l[f].fn.call(l[f].context);break;case 2:l[f].fn.call(l[f].context,e);break;case 3:l[f].fn.call(l[f].context,e,n);break;case 4:l[f].fn.call(l[f].context,e,n,r);break;default:if(!s)for(u=1,s=new Array(c-1);u<c;u++)s[u-1]=arguments[u];l[f].fn.apply(l[f].context,s)}return!0},Tr.prototype.on=function(t,e,n){return Ar(this,t,e,n,!1)},Tr.prototype.once=function(t,e,n){return Ar(this,t,e,n,!0)},Tr.prototype.removeListener=function(t,e,n,r){t=Er?Er+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||Pr(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:Pr(this,t)}}else Pr(this,t);return this},Tr.prototype.removeAllListeners=function(t){return t?(t=Er?Er+t:t,this._events[t]&&Pr(this,t)):(this._events=new Sr,this._eventsCount=0),this},Tr.prototype.off=Tr.prototype.removeListener,Tr.prototype.addListener=Tr.prototype.on,Tr.prefixed=Er,r.exports=Tr.EventEmitter=Tr;var i,g,Lr,Nr,Cr,jr=e.exports;function Rr(){Rr=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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 Ir(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Br(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Ir(r,e,n,i,a,"next",t)}function a(t){Ir(r,e,n,i,a,"throw",t)}i(void 0)})}}function Fr(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 Dr(t,e,n){e&&Fr(t.prototype,e),n&&Fr(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function f(){return(f=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 a(t,e){t.prototype=Object.create(e.prototype),zr(t.prototype.constructor=t,e)}function zr(t,e){return(zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Gr(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 Wr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Yr(t,e){var n,r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){var n;if(t)return"string"==typeof t?Hr(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)?Hr(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=i=i||{}).COORDINATE="<coordinate>",n.COLOR="<color>",n.PAINT="<paint>",n.NUMBER="<number>",n.ANGLE="<angle>",n.OPACITY_VALUE="<opacity-value>",n.SHADOW_BLUR="<shadow-blur>",n.LENGTH="<length>",n.PERCENTAGE="<percentage>",n.LENGTH_PERCENTAGE="<length> | <percentage>",n.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",n.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",n.LIST_OF_POINTS="<list-of-points>",n.PATH="<path>",n.FILTER="<filter>",n.Z_INDEX="<z-index>",n.OFFSET_DISTANCE="<offset-distance>",n.DEFINED_PATH="<defined-path>",n.MARKER="<marker>",n.TRANSFORM="<transform>",n.TRANSFORM_ORIGIN="<transform-origin>",n.TEXT="<text>",n.TEXT_TRANSFORM="<text-transform>",(r=g=g||{})[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",(e=Lr=Lr||{})[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=Nr=Nr||{})[n.kYes=0]="kYes",n[n.kNo=1]="kNo",(r=Cr=Cr||{})[r.kYes=0]="kYes",r[r.kNo=1]="kNo";function Vr(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 qr(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 Ur,Xr,$r=[{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}],Kr=((e=Ur=Ur||{})[e.kUnknownType=0]="kUnknownType",e[e.kUnparsedType=1]="kUnparsedType",e[e.kKeywordType=2]="kKeywordType",e[e.kUnitType=3]="kUnitType",e[e.kSumType=4]="kSumType",e[e.kProductType=5]="kProductType",e[e.kNegateType=6]="kNegateType",e[e.kInvertType=7]="kInvertType",e[e.kMinType=8]="kMinType",e[e.kMaxType=9]="kMaxType",e[e.kClampType=10]="kClampType",e[e.kTransformType=11]="kTransformType",e[e.kPositionType=12]="kPositionType",e[e.kURLImageType=13]="kURLImageType",e[e.kColorType=14]="kColorType",e[e.kUnsupportedColorType=15]="kUnsupportedColorType",function(e){return $r.find(function(t){return t.name===e}).unit_type}),n=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(Nr.kNo,Cr.kNo,"")},e.isNumericValue=function(){return this.getType()>=Ur.kUnitType&&this.getType()<=Ur.kClampType},t}(),r=function(n){function t(t){var e=n.call(this)||this;return e.colorSpace=void 0,e.colorSpace=t,e}a(t,n);var e=t.prototype;return e.getType=function(){return Ur.kColorType},e.to=function(t){return this},t}(n),Zr=((e=Xr=Xr||{})[e.Constant=0]="Constant",e[e.LinearGradient=1]="LinearGradient",e[e.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}a(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 Ur.kColorType},t}(n)),Qr=function(n){function t(t){var e=n.call(this)||this;return e.value=void 0,e.value=t,e}a(t,n);var e=t.prototype;return e.clone=function(){return new t(this.value)},e.getType=function(){return Ur.kKeywordType},e.buildCSSText=function(t,e,n){return n+this.value},t}(n);function Jr(o,s){if("function"!=typeof o||null!=s&&"function"!=typeof s)throw new TypeError("Expected a function");function l(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r,i=s?s.apply(this,e):e[0],a=l.cache;return a.has(i)?a.get(i):(r=o.apply(this,e),l.cache=a.set(i,r)||a,r)}return l.cache=new(Jr.Cache||Map),l}Jr.Cache=Map;function ti(t){return t.split("").map(function(t,e){return t.toUpperCase()===t?(0!==e?"-":"")+t.toLowerCase():t}).join("")}var ei=Jr(function(t){return(t=void 0===t?"":t).replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})});function ni(t){return"function"==typeof t}function ri(t,e){void 0===e&&(e="");var n="";if(Number.isFinite(t)){if(!Number.isNaN(t))throw new Error;n="NaN"}else n=0<t?"infinity":"-infinity";return n+e}function ii(t){switch(function(t){switch(t){case g.kNumber:case g.kInteger:return Lr.kUNumber;case g.kPercentage:return Lr.kUPercent;case g.kPixels:return Lr.kULength;case g.kMilliseconds:case g.kSeconds:return Lr.kUTime;case g.kDegrees:case g.kRadians:case g.kGradians:case g.kTurns:return Lr.kUAngle;default:return Lr.kUOther}}(t)){case Lr.kUNumber:return g.kNumber;case Lr.kULength:return g.kPixels;case Lr.kUPercent:return g.kPercentage;case Lr.kUTime:return g.kSeconds;case Lr.kUAngle:return g.kDegrees;default:return g.kUnknown}}function ai(t){return pi[t]||(pi[t]=new Qr(t)),pi[t]}var oi={d:{alias:"path"},strokeDasharray:{alias:"lineDash"},strokeWidth:{alias:"lineWidth"},textAnchor:{alias:"textAlign"},src:{alias:"img"}},si=Jr(function(t){var t=ei(t),e=oi[t];return(null==e?void 0:e.alias)||t}),li=function(i){function n(t,e){var n,r;return void 0===e&&(e=g.kNumber),(n=i.call(this)||this).unit=void 0,n.value=void 0,r="string"==typeof e?(r=e)?"number"===r?g.kNumber:"percent"===r||"%"===r?g.kPercentage:Kr(r):g.kUnknown:e,n.unit=r,n.value=t,n}a(n,i);var t=n.prototype;return t.clone=function(){return new n(this.value,this.unit)},t.equals=function(t){return this.value===t.value&&this.unit===t.unit},t.getType=function(){return Ur.kUnitType},t.convertTo=function(t){var e;return this.unit===t?new n(this.value,this.unit):(e=ii(this.unit))!==ii(t)||e===g.kUnknown?null:(e=Vr(this.unit)/Vr(t),new n(this.value*e,t))},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=qr(this.unit);i=a<-999999||999999<a?(r=qr(this.unit),!Number.isFinite(a)||Number.isNaN(a)?ri(a,r):a+(r||"")):""+a+o}return n+=i},n}(n),ci=new li(0,"px"),ui=(new li(1,"px"),new li(0,"deg")),hi=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}a(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}(r),fi=function(t){var e=t.name,n=t.inherits,r=t.interpolable,i=t.initialValue,t=t.syntax;A.styleValueRegistry.registerMetadata({n:e,inh:n,int:r,d:i,syntax:t})},di=new Qr("unset"),e=new Qr("initial"),n=new Qr("inherit"),pi={"":di,unset:di,initial:e,inherit:n},gi=new hi(0,0,0,0,!0),mi=new hi(0,0,0,0),yi=Jr(function(t,e,n,r){return new hi(t,e,n,r)},function(t,e,n,r){return"rgba("+t+","+e+","+n+","+r+")"}),vi=function(t,e){return void 0===e&&(e=g.kNumber),new li(t,e)},bi=new li(50,"%"),xi={},wi=0;var ki="undefined"!=typeof window&&void 0!==window.document;function Mi(t,e){var n=Number(t.parsedStyle.zIndex),r=Number(e.parsedStyle.zIndex);if(n===r){var i=t.parentNode;if(i)return(i=i.childNodes||[]).indexOf(t)-i.indexOf(e)}return n-r}function Ei(t){var e,n=t;do{if(null==(e=n.parsedStyle)?void 0:e.clipPath)return n}while(null!==(n=n.parentElement));return null}function Oi(t,e){if(ki)return document.defaultView.getComputedStyle(t,null).getPropertyValue(e)}var Si="Method not implemented.",_i="Use document.documentElement instead.",Ai={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"};function Pi(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function Ti(t,e,n){t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2]}function Li(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function Ni(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function Ci(t){return void 0===t?0:360<t||t<-360?t%360:t}function ji(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Array.isArray(t)&&3===t.length?Ft(t):sn(t)?zt(t,e,n):zt(t[0],t[1]||e,t[2]||n)}function Ri(t){return t*(Math.PI/180)}function Ii(t){return t*(180/Math.PI)}function Bi(t,e){return 16===e.length?(n=t,r=e,o=.5*Math.PI,s=(c=At(y(),r))[0],l=c[1],c=c[2],(u=Math.asin(-r[2]/s))<o?-o<u?(i=Math.atan2(r[6]/l,r[10]/c),a=Math.atan2(r[1]/s,r[0]/s)):(a=0,i=-Math.atan2(r[4]/l,r[5]/l)):(a=0,i=Math.atan2(r[4]/l,r[5]/l)),n[0]=i,n[1]=u,n[2]=a,n):(o=t,s=(c=e)[0],r=c[1],l=c[2],c=c[3],.499995*(n=s*s+(i=r*r)+(u=l*l)+(a=c*c))<(t=s*c-r*l)?(o[0]=Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):t<-.499995*n?(o[0]=-Math.PI/2,o[1]=2*Math.atan2(r,s),o[2]=0):(o[0]=Math.asin(2*(s*l-c*r)),o[1]=Math.atan2(2*(s*c+r*l),1-2*(u+a)),o[2]=Math.atan2(2*(s*r+l*c),1-2*(i+u))),o);var n,r,i,a,o,s,l,c,u}function Fi(t,e,n,r,i){var a,o,s,l,c=Math.cos(t),t=Math.sin(t);return a=r*c,o=i*t,r=-r*t,t=i*c,c=i=0,e=e,n=n,s=1,(l=new Q(9))[0]=a,l[1]=o,l[2]=i,l[3]=r,l[4]=t,l[5]=c,l[6]=e,l[7]=n,l[8]=s,l}function Di(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=Ii(Math.atan2(n,e));return[t[6],t[7],a,o,r]}var zi=ht(),Gi=ht(),Wi=ee(),d=[y(),y(),y()],Hi=y();function Yi(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}(zi,t)&&(dt(Gi,zi),Gi[3]=0,Gi[7]=0,Gi[11]=0,Gi[15]=1,!(Math.abs(vt(Gi))<1e-8))){var t=zi[3],o=zi[7],s=zi[11],l=zi[12],c=zi[13],u=zi[14],h=zi[15];if(0!==t||0!==o||0!==s){if(Wi[0]=t,Wi[1]=o,Wi[2]=s,Wi[3]=h,!yt(Gi,Gi))return;mt(Gi,Gi),ne(i,Wi,Gi)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=l,e[1]=c,e[2]=u,t=zi,(o=d)[0][0]=t[0],o[0][1]=t[1],o[0][2]=t[2],o[1][0]=t[4],o[1][1]=t[5],o[1][2]=t[6],o[2][0]=t[8],o[2][1]=t[9],o[2][2]=t[10],n[0]=Dt(d[0]),qt(d[0],d[0]),r[0]=Ut(d[0],d[1]),Vi(d[1],d[1],d[0],1,-r[0]),n[1]=Dt(d[1]),qt(d[1],d[1]),r[0]/=n[1],r[1]=Ut(d[0],d[2]),Vi(d[2],d[2],d[0],1,-r[1]),r[2]=Ut(d[1],d[2]),Vi(d[2],d[2],d[1],1,-r[2]),n[2]=Dt(d[2]),qt(d[2],d[2]),r[1]/=n[2],r[2]/=n[2],Xt(Hi,d[1],d[2]),Ut(d[0],Hi)<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])}}function Vi(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 qi=ht();function Ui(t,l){var c,u;return t&&t.length&&(u=c=0,l?(c=l.parsedStyle.defX||0,u=l.parsedStyle.defY||0,l.resetLocalTransform(),l.setLocalPosition(c,u)):l=new rl({}),t.forEach(function(t){var e,n,r,i,a,o,s=t.t,t=t.d;"scale"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1],l.scaleLocal(o[0],o[1],1)):"scalex"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(o[0],1,1)):"scaley"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,o[0],1)):"scalez"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1],l.scaleLocal(1,1,o[0])):"scale3d"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[1,1,1],l.scaleLocal(o[0],o[1],o[2])):"translate"===s?(o=t||[ci,ci],l.translateLocal(o[0].value,o[1].value,0)):"translatex"===s?(o=t||[ci],l.translateLocal(o[0].value,0,0)):"translatey"===s?(o=t||[ci],l.translateLocal(0,o[0].value,0)):"translatez"===s?(o=t||[ci],l.translateLocal(0,0,o[0].value)):"translate3d"===s?(o=t||[ci,ci,ci],l.translateLocal(o[0].value,o[1].value,o[2].value)):"rotate"===s?(o=t||[ui],l.rotateLocal(0,0,_o(o[0]))):"rotatex"===s?(o=t||[ui],l.rotateLocal(_o(o[0]),0,0)):"rotatey"===s?(o=t||[ui],l.rotateLocal(0,_o(o[0]),0)):"rotatez"===s?(o=t||[ui],l.rotateLocal(0,0,_o(o[0]))):"rotate3d"!==s&&("skew"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0,0],l.setLocalSkew(Ri(o[0]),Ri(o[1]))):"skewx"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(Ri(o[0]),l.getLocalSkew()[1])):"skewy"===s?(o=(null==t?void 0:t.map(function(t){return t.value}))||[0],l.setLocalSkew(l.getLocalSkew()[0],Ri(o[0]))):"matrix"===s?(e=(o=t.map(function(t){return t.value}))[0],n=o[1],r=o[2],i=o[3],a=o[4],o=o[5],l.setLocalTransform(pt(qi,e,n,0,0,r,i,0,0,0,0,1,0,a+c,o+u,0,1))):"matrix3d"===s&&(pt.apply(Bt,[qi].concat(t.map(function(t){return t.value}))),qi[12]+=c,qi[13]+=u,l.setLocalTransform(qi)))})),l.getLocalTransform()}Xi={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]+\.?))/},$i="";var Xi,$i,k,Ki=function(t){return $i=t,Qi()};function Zi(t){throw new Error($i+": "+t)}function Qi(){var t=la(Ji);return 0<$i.length&&Zi("Invalid input not EOF"),t}function Ji(){return ta("linear-gradient",Xi.linearGradient,na)||ta("repeating-linear-gradient",Xi.repeatingLinearGradient,na)||ta("radial-gradient",Xi.radialGradient,ra)||ta("repeating-radial-gradient",Xi.repeatingRadialGradient,ra)||ta("conic-gradient",Xi.conicGradient,ra)}function ta(n,t,r){return ea(t,function(t){var e=r();return e&&!ga(Xi.comma)&&Zi("Missing comma before color stops"),{type:n,orientation:e,colorStops:la(ca)}})}function ea(t,e){t=ga(t);if(t)return ga(Xi.startCall)||Zi("Missing ("),e=e(t),ga(Xi.endCall)||Zi("Missing )"),e}function na(){return pa("directional",Xi.sideOrCorner,1)||pa("angular",Xi.angleValue,1)}function ra(){var t,e,n=ia();return n&&((t=[]).push(n),e=$i,ga(Xi.comma))&&((n=ia())?t.push(n):$i=e),t}function ia(){var t,e=function(){var t=pa("shape",/^(circle)/i,0);t&&(t.style=da()||aa());return t}()||function(){var t=pa("shape",/^(ellipse)/i,0);t&&(t.style=ha()||aa());return t}();return e?e.at=oa():(t=aa())?(e=t,(t=oa())&&(e.at=t)):(t=sa())&&(e={type:"default-radial",at:t}),e}function aa(){return pa("extent-keyword",Xi.extentKeywords,1)}function oa(){var t;if(pa("position",/^at/,0))return(t=sa())||Zi("Missing positioning value"),t}function sa(){var t={x:ha(),y:ha()};if(t.x||t.y)return{type:"position",value:t}}function la(t){var e=t(),n=[];if(e)for(n.push(e);ga(Xi.comma);)(e=t())?n.push(e):Zi("One extra comma");return n}function ca(){var t=pa("hex",Xi.hexColor,1)||ea(Xi.rgbaColor,function(){return{type:"rgba",value:la(ua)}})||ea(Xi.rgbColor,function(){return{type:"rgb",value:la(ua)}})||pa("literal",Xi.literalColor,0);return t||Zi("Expected color definition"),t.length=ha(),t}function ua(){return ga(Xi.number)[1]}function ha(){return pa("%",Xi.percentageValue,1)||fa()||da()}function fa(){return pa("position-keyword",Xi.positionKeywords,1)}function da(){return pa("px",Xi.pixelValue,1)||pa("em",Xi.emValue,1)}function pa(t,e,n){e=ga(e);if(e)return{type:t,value:e[n]}}function ga(t){var e=/^[\n\r\t\s]+/.exec($i),e=(e&&ma(e[0].length),t.exec($i));return e&&ma(e[0].length),e}function ma(t){$i=$i.substring(t)}function ya(t){var e;return 0===t.parsedStyle.path.totalLength&&(t.parsedStyle.path.totalLength=He(t.parsedStyle.path.absolutePath,void 0,v(v({},e),{bbox:!1,length:!0})).length),t.parsedStyle.path.totalLength}function va(t,e){return t[0]===e[0]&&t[1]===e[1]}function ba(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 xa(t,e){return[e[0]+(e[0]-t[0]),e[1]+(e[1]-t[1])]}(r=k=k||{}).GROUP="g",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh";function wa(t,e,n,r,i,a,o,s){var l,c,u;return e=Math.abs(e),n=Math.abs(n),r=Ri(r=cn(r,360)),t.x===o.x&&t.y===o.y?{x:t.x,y:t.y,ellipticalArcAngle:0}:0===e||0===n?{x:0,y:0,ellipticalArcAngle:0}:(u=(t.x-o.x)/2,c=(t.y-o.y)/2,u={x:Math.cos(r)*u+Math.sin(r)*c,y:-Math.sin(r)*u+Math.cos(r)*c},1<(c=Math.pow(u.x,2)/Math.pow(e,2)+Math.pow(u.y,2)/Math.pow(n,2))&&(e=Math.sqrt(c)*e,n=Math.sqrt(c)*n),c=(c=(Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(u.y,2)-Math.pow(n,2)*Math.pow(u.x,2))/(Math.pow(e,2)*Math.pow(u.y,2)+Math.pow(n,2)*Math.pow(u.x,2)))<0?0:c,i=(i!==a?1:-1)*Math.sqrt(c),c=e*u.y/n*i,i*=-n*u.x/e,t={x:Math.cos(r)*c-Math.sin(r)*i+(t.x+o.x)/2,y:Math.sin(r)*c+Math.cos(r)*i+(t.y+o.y)/2},l=ka({x:1,y:0},o={x:(u.x-c)/e,y:(u.y-i)/n}),o=ka(o,{x:(-u.x-c)/e,y:(-u.y-i)/n}),!a&&0<o?o-=2*Math.PI:a&&o<0&&(o+=2*Math.PI),c=l+(o%=2*Math.PI)*s,u=e*Math.cos(c),i=n*Math.sin(c),{x:Math.cos(r)*u-Math.sin(r)*i+t.x,y:Math.sin(r)*u+Math.cos(r)*i+t.y,ellipticalArcStartAngle:l,ellipticalArcEndAngle:l+o,ellipticalArcAngle:c,ellipticalArcCenter:t,resultantRx:e,resultantRy:n})}var ka=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 Ma(t){for(var e=[],n=null,r=null,i=null,a=0,o=t.length,s=0;s<o;s++){var l=t[s],r=t[s+1],c=l[0],u={command:c,prePoint:n,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(c){case"M":i=[l[1],l[2]],a=s;break;case"A":var h=function(t,e){var n=e[1],r=e[2],i=cn(Ri(e[3]),2*Math.PI),a=e[4],o=e[5],s=t[0],l=t[1],c=e[6],e=e[7],u=Math.cos(i)*(s-c)/2+Math.sin(i)*(l-e)/2,h=-1*Math.sin(i)*(s-c)/2+Math.cos(i)*(l-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+c)/2+Math.cos(i)*d-Math.sin(i)*f,l=(l+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=_a([1,0],p),h=_a(p,u);Sa(p,u)<=-1&&(h=Math.PI);1<=Sa(p,u)&&(h=0);0===o&&0<h&&(h-=2*Math.PI);1===o&&h<0&&(h+=2*Math.PI);return{cx:s,cy:l,rx:va(t,[c,e])?0:n,ry:va(t,[c,e])?0:r,startAngle:d,endAngle:d+h,xRotation:i,arcFlag:a,sweepFlag:o}}(n,l);u.arcParams=h}"Z"===c?(n=i,r=t[a+1]):n=[l[(v=l.length)-2],l[v-1]],r&&"Z"===r[0]&&(r=t[a],e[a])&&(e[a].prePoint=n),u.currentPoint=n,e[a]&&va(n,e[a].currentPoint)&&(e[a].prePoint=u.prePoint);var f,d,p,g,m,y,v=r?[r[r.length-2],r[r.length-1]]:null,b=(u.nextPoint=v,u.prePoint);["L","H","V"].includes(c)?(u.startTangent=[b[0]-n[0],b[1]-n[1]],u.endTangent=[n[0]-b[0],n[1]-b[1]]):"Q"===c?(f=[l[1],l[2]],u.startTangent=[b[0]-f[0],b[1]-f[1]],u.endTangent=[n[0]-f[0],n[1]-f[1]]):"T"===c?(d=xa((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"===c?(d=[l[1],l[2]],p=[l[3],l[4]],u.startTangent=[b[0]-d[0],b[1]-d[1]],u.endTangent=[n[0]-p[0],n[1]-p[1]],0===u.startTangent[0]&&0===u.startTangent[1]&&(u.startTangent=[d[0]-p[0],d[1]-p[1]]),0===u.endTangent[0]&&0===u.endTangent[1]&&(u.endTangent=[p[0]-d[0],p[1]-d[1]])):"S"===c?(g=xa((p=e[s-1]).currentPoint,b),m=[l[1],l[2]],"C"===p.command?(u.command="C",u.startTangent=[b[0]-g[0],b[1]-g[1]]):(u.command="SQ",u.startTangent=[b[0]-m[0],b[1]-m[1]]),u.endTangent=[n[0]-m[0],n[1]-m[1]]):"A"===c&&(b=(g=Ea(u,0)).x,m=g.y,y=(c=Ea(u,1,!1)).x,c=c.y,u.startTangent=[b,m],u.endTangent=[y,c]),e.push(u)}return e}function Ea(t,e,n){void 0===n&&(n=!0);var r=t.arcParams,i=r.rx,i=void 0===i?0:i,a=r.ry,a=void 0===a?0:a,o=r.xRotation,s=r.arcFlag,r=r.sweepFlag,l=wa({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},e),i=wa({x:t.prePoint[0],y:t.prePoint[1]},i,a,o,!!s,!!r,{x:t.currentPoint[0],y:t.currentPoint[1]},n?e+.005:e-.005),a=i.x-l.x,o=i.y-l.y,s=Math.sqrt(a*a+o*o);return{x:-a/s,y:-o/s}}function Oa(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Sa(t,e){return Oa(t)*Oa(e)?(t[0]*e[0]+t[1]*e[1])/(Oa(t)*Oa(e)):1}function _a(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Sa(t,e))}function Aa(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 Pa(t,e){void 0===e&&(e=t.getLocalTransform());var n,r,i,a,o,s,l,c,u,h,f,d=[];switch(t.nodeName){case k.LINE:var p=t.parsedStyle,d=[["M",p.x1,p.y1],["L",p.x2,p.y2]];break;case k.CIRCLE:var p=t.parsedStyle,g=p.r;d=Aa(g,g,p.cx,p.cy);break;case k.ELLIPSE:var g=t.parsedStyle;d=Aa(g.rx,g.ry,g.cx,g.cy);break;case k.POLYLINE:case k.POLYGON:p=t.parsedStyle.points;g=p.points,p=t.nodeName===k.POLYGON,g=g.map(function(t,e){return[0===e?"M":"L",t[0],t[1]]}),p&&g.push(["Z"]),d=g;break;case k.RECT:var m=t.parsedStyle,y=m.width,v=m.height,b=m.x,x=m.y,m=m.radius,w=m&&m.some(function(t){return 0!==t});n=y,r=v,b=b,x=x,d=(w=w&&m.map(function(t){return on(t,0,Math.min(Math.abs(y)/2,Math.abs(v)/2))}))?(s=(m=0<n?1:-1)+(o=0<r?1:-1)!=0?1:0,[["M",m*(i=w[0])+b,x],["L",n-m*(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-m*a,r+x]:null,["L",b+m*(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,m*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 k.PATH:w=t.parsedStyle.path.absolutePath;d=[].concat(w)}if(d.length)return l=d,c=e,u=(e=(e=t).parsedStyle).defX,h=void 0===u?0:u,f=void 0===(u=e.defY)?0:u,l.reduce(function(t,e){var n,r,i,a="";return"M"===e[0]||"L"===e[0]?(n=zt(e[1]-h,e[2]-f,0),c&&Kt(n,n,c),a=""+e[0]+n[0]+","+n[1]):"Z"===e[0]?a=e[0]:"C"===e[0]?(n=zt(e[1]-h,e[2]-f,0),r=zt(e[3]-h,e[4]-f,0),i=zt(e[5]-h,e[6]-f,0),c&&(Kt(n,n,c),Kt(r,r,c),Kt(i,i,c)),a=""+e[0]+n[0]+","+n[1]+","+r[0]+","+r[1]+","+i[0]+","+i[1]):"A"===e[0]?(n=zt(e[6]-h,e[7]-f,0),c&&Kt(n,n,c),a=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+","+e[5]+","+n[0]+","+n[1]):"Q"===e[0]&&(r=zt(e[1]-h,e[2]-f,0),i=zt(e[3]-h,e[4]-f,0),c&&(Kt(r,r,c),Kt(i,i,c)),a=""+e[0]+e[1]+","+e[2]+","+e[3]+","+e[4]+"}"),t+a},"")}function Ta(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 La(){return this.call=this._createCall("sync"),this.call.apply(this,arguments)}function Na(){return this.callAsync=this._createCall("async"),this.callAsync.apply(this,arguments)}function Ca(){return this.promise=this._createCall("promise"),this.promise.apply(this,arguments)}function ja(t){return Wa.setup(this,t),Wa.create(t)}function Ra(t){return Ya.setup(this,t),Ya.create(t)}function Ia(){throw new Error("tapAsync is not supported on a SyncHook")}function Ba(){throw new Error("tapPromise is not supported on a SyncHook")}function Fa(t){return qa.setup(this,t),qa.create(t)}function Da(){throw new Error("tapAsync is not supported on a SyncWaterfallHook")}function za(){throw new Error("tapPromise is not supported on a SyncWaterfallHook")}function Ga(t){return Xa.setup(this,t),Xa.create(t)}var e=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=La,this.call=La,this._callAsync=Na,this.callAsync=Na,this._promise=Ca,this.promise=Ca,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=Yr(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}(),n=function(){function t(t){this.config=t,this.options=void 0,this._args=void 0}var e=t.prototype;return e.create=function(t){var e;switch(this.init(t),this.options.type){case"sync":e=new Function(this.args(),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"throw "+t+";\n"},onResult:function(t){return"return "+t+";\n"},resultReturns:!0,onDone:function(){return""},rethrowIfPossible:!0}));break;case"async":e=new Function(this.args({after:"_callback"}),'"use strict";\n'+this.header()+this.contentWithInterceptors({onError:function(t){return"_callback("+t+");\n"},onResult:function(t){return"_callback(null, "+t+");\n"},onDone:function(){return"_callback();\n"}}));break;case"promise":var n=!1,r=this.contentWithInterceptors({onError:function(t){return n=!0,"_error("+t+");\n"},onResult:function(t){return"_resolve("+t+");\n"},onDone:function(){return"_resolve();\n"}}),i="",i=(i+='"use strict";\n')+this.header()+"return new Promise((function(_resolve, _reject) {\n";n&&(i+="var _sync = true;\nfunction _error(_err) {\nif(_sync)\n_resolve(Promise.resolve().then((function() { throw _err; })));\nelse\n_reject(_err);\n};\n"),i+=r,n&&(i+="_sync = false;\n"),i+="}));\n",e=new Function(this.args(),i)}return this.deinit(),e},e.setup=function(t,e){t._x=e.taps.map(function(t){return t.fn})},e.init=function(t){this.options=t,this._args=t.args.slice()},e.deinit=function(){this.options=void 0,this._args=void 0},e.contentWithInterceptors=function(t){var r=this;if(0<this.options.interceptors.length){for(var i=t.onError,a=t.onResult,n=t.onDone,e="",o=0;o<this.options.interceptors.length;o++){var s=this.options.interceptors[o];s.call&&(e+=this.getInterceptor(o)+".call("+this.args({before:s.context?"_context":void 0})+");\n")}return e+=this.content(Object.assign(t,{onError:i&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].error&&(e+=r.getInterceptor(n)+".error("+t+");\n");return e+=i(t)},onResult:a&&function(t){for(var e="",n=0;n<r.options.interceptors.length;n++)r.options.interceptors[n].result&&(e+=r.getInterceptor(n)+".result("+t+");\n");return e+=a(t)},onDone:n&&function(){for(var t="",e=0;e<r.options.interceptors.length;e++)r.options.interceptors[e].done&&(t+=r.getInterceptor(e)+".done();\n");return t+=n()}}))}return this.content(t)},e.header=function(){var t="";return this.needContext()?t+="var _context = {};\n":t+="var _context;\n",t+="var _x = this._x;\n",0<this.options.interceptors.length&&(t+="var _taps = this.taps;\nvar _interceptors = this.interceptors;\n"),t},e.needContext=function(){for(var t,e=Yr(this.options.taps);!(t=e()).done;)if(t.value.context)return!0;return!1},e.callTap=function(t,e){for(var n=e.onError,r=e.onResult,i=e.onDone,a=e.rethrowIfPossible,o="",s=!1,l=0;l<this.options.interceptors.length;l++){var c=this.options.interceptors[l];c.tap&&(s||(o+="var _tap"+t+" = "+this.getTap(t)+";\n",s=!0),o+=this.getInterceptor(l)+".tap("+(c.context?"_context, ":"")+"_tap"+t+");\n")}o+="var _fn"+t+" = "+this.getTapFn(t)+";\n";var u=this.options.taps[t];switch(u.type){case"sync":a||(o=o+"var _hasError"+t+" = false;\ntry {\n"),o+=r?"var _result"+t+" = _fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n":"_fn"+t+"("+this.args({before:u.context?"_context":void 0})+");\n",a||(o=(o=(o=o+"} catch(_err) {\n_hasError"+t+" = true;\n")+n("_err"))+"}\nif(!_hasError"+t+") {\n"),r&&(o+=r("_result"+t)),i&&(o+=i()),a||(o+="}\n");break;case"async":var 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 i=this,a=t.onError,o=t.onResult,e=t.resultReturns,s=t.onDone,n=t.doneReturns,l=t.rethrowIfPossible;if(0===this.options.taps.length)return s();for(var c=this.options.taps.findIndex(function(t){return"sync"!==t.type}),u=e||n,h="",f=s,d=0,r=function(){function e(t){return t?"":s()}var n=p,r=(f!==s&&("sync"!==i.options.taps[n].type||20<d++)&&(d=0,h=(h+="function _next"+n+"() {\n")+f()+"}\n",f=function(){return(u?"return ":"")+"_next"+n+"();\n"}),f),t=i.callTap(n,{onError:function(t){return a(n,t,r,e)},onResult:o&&function(t){return o(n,t,r,e)},onDone:!o&&r,rethrowIfPossible:l&&(c<0||n<c)});f=function(){return t}},p=this.options.taps.length-1;0<=p;p--)r();return h+=f()},e.callTapsLooping=function(t){var e=t.onError,n=t.onDone,t=t.rethrowIfPossible;if(0===this.options.taps.length)return n();var a=this.options.taps.every(function(t){return"sync"===t.type}),r="";a||(r+="var _looper = (function() {\nvar _loopAsync = false;\n");for(var r=(r+="var _loop;\n")+"do {\n"+"_loop = false;\n",i=0;i<this.options.interceptors.length;i++){var o=this.options.interceptors[i];o.loop&&(r+=this.getInterceptor(i)+".loop("+this.args({before:o.context?"_context":void 0})+");\n")}return r=r+this.callTapsSeries({onError:e,onResult:function(t,e,n,r){var i=(i="")+("if("+e+" !== undefined) {\n")+"_loop = true;\n";return a||(i+="if(_loopAsync) _looper();\n"),i=(i=i+r(!0)+"} else {\n")+n()+"}\n"},onDone:n&&function(){var t="";return(t+="if(!_loop) {\n")+n()+"}\n"},rethrowIfPossible:t&&a})+"} while(_loop);\n",a||(r+="_loopAsync = true;\n});\n_looper();\n"),r},e.callTapsParallel=function(t){var e=this,a=t.onError,o=t.onResult,s=t.onDone,l=t.rethrowIfPossible,t=t.onTap,c=void 0===t?function(t,e){return e()}:t;if(this.options.taps.length<=1)return this.callTapsSeries({onError:a,onResult:o,onDone:s,rethrowIfPossible:l});for(var u="",n=(u=(u+="do {\n")+("var _counter = "+this.options.taps.length+";\n"),s&&(u=(u+="var _done = (function() {\n")+s()+"});\n"),function(n){function r(){return s?"if(--_counter === 0) _done();\n":"--_counter;"}function i(t){return t||!s?"_counter = 0;\n":"_counter = 0;\n_done();\n"}u=(u+="if(_counter <= 0) break;\n")+c(n,function(){return e.callTap(n,{onError:function(t){var e="";return(e+="if(_counter > 0) {\n")+a(n,t,r,i)+"}\n"},onResult:o&&function(t){var e="";return(e+="if(_counter > 0) {\n")+o(n,t,r,i)+"}\n"},onDone:!o&&r,rethrowIfPossible:l})},r,i)}),r=0;r<this.options.taps.length;r++)n(r);return u+="} while(false);\n"},e.args=function(t){var t=void 0===t?{}:t,e=t.before,t=t.after,n=this._args;return e&&(n=[e].concat(n)),0===(n=t?n.concat(t):n).length?"":n.join(", ")},e.getTapFn=function(t){return"_x["+t+"]"},e.getTap=function(t){return"_taps["+t+"]"},e.getInterceptor=function(t){return"_interceptors["+t+"]"},t}(),Wa=new(function(t){function e(){return t.apply(this,arguments)||this}return a(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}(n)),Ha=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=ja,t._call=void 0,t.call=void 0,t}return a(t,n),t}(e),Ya=new(function(t){function e(){return t.apply(this,arguments)||this}return a(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}(n)),Va=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=Ra,t._call=void 0,t.call=void 0,t}return a(t,n),t}(e),qa=new(function(t){function e(){return t.apply(this,arguments)||this}return a(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}(n)),Ua=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=Ia,t.tapPromise=Ba,t.compile=Fa,t}return a(t,n),t}(e),Xa=new(function(t){function e(){return t.apply(this,arguments)||this}return a(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}(n)),$a=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=Da,t.tapPromise=za,t.compile=Ga,t}return a(t,n),t}(Ua),Ka=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Za=/([\"\'])[^\'\"]+\1/;function Qa(t){if("function"!=typeof t)throw new TypeError(t+" is not a function");var n=Date.now(),e=16<(e=n-so)?0:16-e,r=no();return oo[r]=t,1<Object.keys(oo).length||setTimeout(function(){so=n;var e=oo;oo={},Object.keys(e).forEach(function(t){return e[t](ao())})},e),r}function Ja(t){delete oo[t]}function to(t){return"string"!=typeof t?Qa:""===t?ro.requestAnimationFrame:ro[t+"RequestAnimationFrame"]}var eo=1,no=function(){return eo++},ro="object"==typeof self&&self.self==self?self:"object"==typeof S&&S.global==S?S:{},io=Date.now(),ao=function(){return ro.performance&&"function"==typeof ro.performance.now?ro.performance.now():Date.now()-io},oo={},so=Date.now(),r=function(t,e){for(var n=0;void 0!==t[n];){if(e(t[n]))return t[n];n+=1}}(["","webkit","moz","ms","o"],to),lo=to(r),co="string"!=typeof(e=r)?Ja:""===e?ro.cancelAnimationFrame:ro[e+"CancelAnimationFrame"]||ro[e+"CancelRequestAnimationFrame"],uo=(ro.requestAnimationFrame=lo,ro.cancelAnimationFrame=co,/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i),ho=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,fo=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,po=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;var go={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},mo=Jr(function(t){t="angular"===t.type?Number(t.value):go[t.value]||0;return vi(t,"deg")}),yo=Jr(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:vi(n,i),cy:vi(r,a)}}),vo=Jr(function(t){if(-1<t.indexOf("linear")||-1<t.indexOf("radial"))return Ki(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 l,c=null==(l=r[s].length)?void 0:l.value;if(!_(c)&&!_(o)){for(var u=1;u<s-a;u++)r[a+u].length={type:"%",value:""+(o+(Number(c)-o)*u/(s-a))};a=s,o=Number(c)}}var h,f=t.map(function(t){return{offset:vi(Number(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 Zr(Xr.LinearGradient,{angle:n?mo(n):ui,steps:f}):"radial-gradient"===e&&"shape"===(n=n||[{type:"shape",value:"circle"}])[0].type&&"circle"===n[0].value?(e=(t=yo(n[0].at)).cx,t=t.cy,n[0].style&&(h=(n=n[0].style).type,n=n.value,h="extent-keyword"===h?ai(n):vi(n,h)),new Zr(Xr.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=uo.exec(t);if(n)return r=(null==(r=n[2].match(po))?void 0:r.map(function(t){return t.split(":")}))||[],[new Zr(Xr.LinearGradient,{angle:vi(parseFloat(n[1]),"deg"),steps:r.map(function(t){var e=t[0],t=t[1];return{offset:vi(100*Number(e),"%"),color:t}})})]}else if("r"===e){n=function(t){var t=ho.exec(t);if(t)return t=(null==(t=t[4].match(po))?void 0:t.map(function(t){return t.split(":")}))||[],{cx:vi(50,"%"),cy:vi(50,"%"),steps:t.map(function(t){var e=t[0],t=t[1];return{offset:vi(100*Number(e),"%"),color:t}})};return null}(t);if(n&&!an(n))return[new Zr(Xr.RadialGradient,n)]}else if("p"===e){var r=t;if(r=fo.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 bo(t){return t&&t.image}function xo(t){return t&&!_(t.r)&&!_(t.g)&&!_(t.b)}var wo=Jr(function(t){var e;return bo(t)?f({repetition:"repeat"},t):"transparent"===(t=_(t)?"":t)?mi:vo(t="currentColor"===t?"black":t)||(e=[0,0,0,0],null!==(t=zn(t))&&(e[0]=t.r||0,e[1]=t.g||0,e[2]=t.b||0,e[3]=t.opacity),yi.apply(void 0,e))});function ko(t,e){if(xo(t)&&xo(e))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(on(e[n],0,255));return e[3]=on(e[3],0,1),"rgba("+e.join(",")+")"}]}function Mo(t,e){if(_(e))return vi(0,"px");if(e=(""+e).trim().toLowerCase(),isFinite(Number(e))){if(0<="px".search(t))return vi(Number(e),"px");if(0<="deg".search(t))return vi(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 vi(Number(e.replace(new RegExp("U"+t,"g"),"").replace(new RegExp(r,"g"),"*0")),t)})[0]}var Eo=Jr(function(t){return Mo(new RegExp("px","g"),t)}),Oo=(Jr(function(t){return Mo(new RegExp("%","g"),t)}),function(t){return sn(t)||isFinite(Number(t))?vi(Number(t)||0,"px"):Mo(new RegExp("px|%|em|rem","g"),t)}),So=Jr(function(t){return Mo(new RegExp("deg|rad|grad|turn","g"),t)});function _o(t){var e=0;return t.unit===g.kDegrees?e=t.value:t.unit===g.kRadians?e=Ii(Number(t.value)):t.unit===g.kTurns&&(e=360*Number(t.value)),e}function Ao(t,e){var n;return Array.isArray(t)?n=t.map(function(t){return Number(t)}):an(t)?n=t.split(" ").map(function(t){return Number(t)}):sn(t)&&(n=[t]),2===e?1===n.length?[n[0],n[0]]:[n[0],n[1]]:1===n.length?[n[0],n[0],n[0],n[0]]:2===n.length?[n[0],n[1],n[0],n[1]]:3===n.length?[n[0],n[1],n[2],n[1]]:[n[0],n[1],n[2],n[3]]}function Po(t){return an(t)?t.split(" ").map(function(t){return Oo(t)}):t.map(function(t){return Oo(t.toString())})}function To(t,e,n){return 0===t.value?0:t.unit===g.kPixels?Number(t.value):t.unit===g.kPercentage&&n?(n=n.nodeName===k.GROUP?n.getLocalBounds():n.geometry.contentBounds,t.value/100*n.halfExtents[e]*2):0}var Lo=function(t){return Mo(/deg|rad|grad|turn|px|%/g,t)},No=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Co(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<No.indexOf(e[1])&&r.push({name:e[1],params:e[2].split(" ").map(function(t){return Lo(t)||wo(t)})}),n.lastIndex===t.length)return r}return[]}function jo(t){return t.toString()}var Ro=Jr(function(t){return"number"==typeof t?vi(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?vi(Number(t)):vi(0)});function Io(t,e){return[t,e,jo]}function Bo(n,r){return function(t,e){return[t,e,function(t){return jo(on(t,n,r))}]}}function Fo(t,e){if(t.length===e.length)return[t,e,function(t){return t}]}Jr(function(t){return(an(t)?t.split(" "):t).map(Ro)});var Do=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=Le(e)}catch(t){n=Le(""),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]])}return 0<r.length&&n.push(r),{polygons:e,polylines:n}}(n),r=t.polygons,t=t.polylines,i=Ma(n),a=function(t,e){for(var n=[],r=[],i=[],a=0;a<t.length;a++){var o=t[a],s=o.currentPoint,l=o.params,c=o.prePoint,u=void 0;switch(o.command){case"Q":u=lr.box(c[0],c[1],l[1],l[2],l[3],l[4]);break;case"C":u=pr.box(c[0],c[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var h=o.arcParams,u=wr.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)}var 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}),f=nn(n),d=nn(r),p=en(n),g=en(r);if(0!==i.length)for(var m=0;m<i.length;m++){var y=i[m],v=y.currentPoint;v[0]===f?f-=ba(y,e).xExtra:v[0]===p&&(p+=ba(y,e).xExtra),v[1]===d?d-=ba(y,e).yExtra:v[1]===g&&(g+=ba(y,e).yExtra)}return{x:f,y:d,width:p-f,height:g-d}}(i,0),o=a.x,s=a.y,l=a.width,a=a.height;return{absolutePath:n,hasArc:e,segments:i,polygons:r,polylines:t,totalLength:0,rect:{x:Number.isFinite(o)?o:0,y:Number.isFinite(s)?s:0,width:Number.isFinite(l)?l:0,height:Number.isFinite(a)?a:0}}},zo=Jr(Do);function Go(t,e){t=(an(t)?zo:Do)(t);return e&&(e.parsedStyle.defX=t.rect.x,e.parsedStyle.defY=t.rect.y),t}function Wo(t,e,n){var r,i,a,o,s,l,c,u,h,f=t.curve,d=e.curve,t=(f&&0!==f.length||(f=Fe(t.absolutePath,!1),t.curve=f),d&&0!==d.length||(d=Fe(e.absolutePath,!1),e.curve=d),[f,d]),f=Ye((t=f.length!==d.length?function t(e,n,r){var i,e=Ve(e),n=Ve(n),a=e.length,o=n.length,s=e.filter(function(t){return t.l}).length,l=n.filter(function(t){return t.l}).length,s=e.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/s||0,l=n.filter(function(t){return t.l}).reduce(function(t,e){return t+e.l},0)/l||0,c=r||Math.max(a,o),u=[s,l],h=[c-a,c-o],r=[e,n].map(function(t,n){return t.l===c?t.map(function(t){return t.s}):t.map(function(t,e){return i=e&&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],c)}(f,d):t)[0])!==Ye(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))}))):ge(t[0]);return[f,(i=t[1],a=f,c=i.length-1,u=[],h=0,s=(o=i).length,l=s-1,(d=o.map(function(t,r){return o.map(function(t,e){var n=r+e;return 0===e||o[n]&&"M"===o[n][0]?(e=o[n],["M"].concat(e.slice(-2))):(s<=n&&(n-=l),o[n])})})).forEach(function(t,n){i.slice(1).forEach(function(t,e){h+=Re(i[(n+e)%c].slice(-2),a[e%c].slice(-2))}),u[n]=h,h=0}),d[u.indexOf(Math.min.apply(null,u))]),function(t){return t}]}function Ho(t,e){var n,r,i=an(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=Or.length(i),t=(i.forEach(function(t,e){i[e+1]&&((n=[0,0])[0]=o/s,r=er.length(t[0],t[1],i[e+1][0],i[e+1][1]),o+=r,n[1]=o/s,a.push(n))}),Math.min.apply(Math,i.map(function(t){return t[0]}))),l=Math.min.apply(Math,i.map(function(t){return t[1]}));return e&&(e.parsedStyle.defX=t,e.parsedStyle.defY=l),{points:i,totalLength:s,segments:a}}function Yo(t,e){return[t.points,e.points,function(t){return t}]}var Vo=null;function qo(t){return function(e){var n=0;return t.map(function(t){return t===Vo?e[n++]:t})}}function Uo(t){return t}var Xo={matrix:["NNNNNN",[Vo,Vo,0,0,Vo,Vo,0,0,0,0,1,0,Vo,Vo,0,1],Uo],matrix3d:["NNNNNNNNNNNNNNNN",Uo],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",qo([Vo,Vo,new li(1)]),Uo],scalex:["N",qo([Vo,new li(1),new li(1)]),qo([Vo,new li(1)])],scaley:["N",qo([new li(1),Vo,new li(1)]),qo([new li(1),Vo])],scalez:["N",qo([new li(1),new li(1),Vo])],scale3d:["NNN",Uo],skew:["Aa",null,Uo],skewx:["A",null,qo([Vo,ui])],skewy:["A",null,qo([ui,Vo])],translate:["Tt",qo([Vo,Vo,ci]),Uo],translatex:["T",qo([Vo,ci,ci]),qo([Vo,ci])],translatey:["T",qo([ci,Vo,ci]),qo([ci,Vo])],translatez:["L",qo([ci,ci,Vo])],translate3d:["TTL",Uo]};function $o(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=Xo[a];if(!o)return[];var s=e[2].split(","),l=o[0];if(l.length<s.length)return[];for(var c=[],u=0;u<l.length;u++){var h=s[u],f=l[u],d=void 0;if(void 0===(d=h?{A:function(t){return"0"===t.trim()?ui:So(t)},N:Ro,T:Oo,L:Eo}[f.toUpperCase()](h):{a:ui,n:c[0],t:ci}[f]))return[];c.push(d)}if(r.push({t:a,d:c}),n.lastIndex===t.length)return r}return[]}function Ko(t){switch(t.t){case"rotatex":return i=Ri(_o(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=Ri(_o(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=Ri(_o(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=Ri(_o(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=Ri(_o(t.d[0])),a=Ri(_o(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=Ri(_o(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=Ri(_o(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=To(t.d[0],0,null)||0,n=To(t.d[1],0,null)||0,0,1];case"translatex":return[1,0,0,0,0,1,0,0,0,0,1,0,e=To(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=To(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=To(t.d[0],0,null)||0,1];case"translate3d":return[1,0,0,0,0,1,0,0,0,0,1,0,e=To(t.d[0],0,null)||0,n=To(t.d[1],0,null)||0,r=To(t.d[2],0,null)||0,1];case"perspective":a=To(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 Zo(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 Qo(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 Yi(0===(t=t).length?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:t.map(Ko).reduce(Zo),e,n,r,i,a),[[e,n,r,a,i]]}var Jo=function(t,e,n,r,i){for(var a=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],o=0;o<4;o++)a[o][3]=i[o];for(var s=0;s<3;s++)for(var l=0;l<3;l++)a[3][s]+=t[l]*a[l][s];var c=r[0],u=r[1],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*(c*u-h*r),f[0][2]=2*(c*h+u*r),f[1][0]=2*(c*u+h*r),f[1][1]=1-2*(c*c+h*h),f[1][2]=2*(u*h-c*r),f[2][0]=2*(c*h-u*r),f[2][1]=2*(u*h+c*r),f[2][2]=1-2*(c*c+u*u),a=ts(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=ts(a,h)),n[1]&&(h[2][1]=0,h[2][0]=n[0],a=ts(a,h)),n[0]&&(h[2][0]=0,h[1][0]=n[0],a=ts(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 ts(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 es(t){return t.toFixed(6).replace(".000000","")}function ns(e,n){var r,i;return e.decompositionPair!==n&&(e.decompositionPair=n,r=Qo(e)),n.decompositionPair!==e&&(n.decompositionPair=e,i=Qo(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=on(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 Jo(t[0],t[1],t[2],e,t[4]).map(es).join(",")}])}function rs(t){return t.replace(/[xy]/,"")}function is(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var as=function(t,e){return"perspective"===t&&"perspective"===e||("matrix"===t||"matrix3d"===t)&&("matrix"===e||"matrix3d"===e)};function os(r,i,t){var e=!1;if(!r.length||!i.length){r.length||(e=!0,r=i,i=[]);for(var a=0;a<r.length;a++)!function(){var t=r[a],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?vi(n):vi(n,t.unit)})})}()}var n=[],o=[],s=[];if(r.length!==i.length)var l=ns(r,i),n=[l[0]],o=[l[1]],s=[["matrix",[l[2]]]];else for(var c=0;c<r.length;c++){var u=r[c].t,h=i[c].t,f=r[c].d,d=i[c].d,p=Xo[u],g=Xo[h],m=void 0;if(as(u,h)){var y=ns([r[c]],[i[c]]);n.push(y[0]),o.push(y[1]),s.push(["matrix",[y[2]]])}else{if(u===h)m=u;else if(p[2]&&g[2]&&rs(u)===rs(h))m=rs(u),f=p[2](f),d=g[2](d);else{if(!p[1]||!g[1]||is(u)!==is(h)){y=ns(r,i);n=[y[0]],o=[y[1]],s=[["matrix",[y[2]]]];break}m=is(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,l=ii(t.unit),c=t.convertTo(l),l=e.convertTo(l);return c&&l?(o=c.value,s=l.value,a=qr(t.unit)):(li.isLength(t.unit)||li.isLength(e.unit))&&(o=To(t,i,n),s=To(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])}n.push(v),o.push(b),s.push([m,x])}}return e&&(l=n,n=o,o=l),[n,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 ss=Jr(function(t){var e;return an(t)?"text-anchor"===t?[vi(0,"px"),vi(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:[Oo(ls(e[0])),Oo(ls(e[1]))]):[vi(t[0]||0,"px"),vi(t[1]||0,"px")]});function ls(t){return"center"===t?"50%":"left"===t||"top"===t?"0":"right"===t||"bottom"===t?"100%":t}var n=function(){function t(){this.parser=So,this.parserWithCSSDisabled=null,this.mixer=Io}return t.prototype.calculator=function(t,e,n,r){return _o(n)},t}(),r=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){return n instanceof Qr&&(n=null),A.sceneGraphService.updateDisplayObjectDependency(t,e,n,r),"clipPath"===t&&r.forEach(function(t){0===t.childNodes.length&&A.sceneGraphService.dirtifyToRoot(t)}),n},t}(),e=function(){function t(){this.parser=wo,this.parserWithCSSDisabled=wo,this.mixer=ko}return t.prototype.calculator=function(t,e,n,r){return n instanceof Qr?"none"===n.value?gi:mi:n},t}(),cs=function(){function t(){this.parser=Co}return t.prototype.calculator=function(t,e,n){return n instanceof Qr?[]:n},t}();function us(t){t=t.parsedStyle.fontSize;return _(t)?null:t}function hs(){this.parser=ss}var fs,o=function(){function t(){this.parser=Oo,this.parserWithCSSDisabled=null,this.mixer=Io}return t.prototype.calculator=function(t,e,n,r,i){if(sn(n))return n;if(!li.isRelativeUnit(n.unit))return n.value;if(n.unit===g.kPercentage)return 0;if(n.unit===g.kEms){if(r.parentNode){var a=us(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=us(r.ownerDocument.documentElement);if(a)return a*=n.value}return i.addUnresolveProperty(r,t),0}},t}(),ds=function(){function t(){this.mixer=Fo}var e=t.prototype;return e.parser=function(t){t=Po(sn(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}(),ps=function(){function t(){this.mixer=Fo}var e=t.prototype;return e.parser=function(t){t=Po(sn(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}(),gs=function(t){function e(){return t.apply(this,arguments)||this}return a(e,t),e.prototype.postProcessor=function(t,e){var n,r;switch(t.nodeName){case k.CIRCLE:case k.ELLIPSE:var i=t.parsedStyle,a=i.cx,i=i.cy;_(a)||(l=a),_(i)||(c=i);break;case k.LINE:var a=t.parsedStyle,i=a.x1,o=a.x2,s=a.y1,a=a.y2,l=Math.min(i,o),c=Math.min(s,a),u=0;break;case k.RECT:case k.IMAGE:case k.GROUP:case k.HTML:case k.TEXT:case k.MESH:_(t.parsedStyle.x)||(l=t.parsedStyle.x),_(t.parsedStyle.y)||(c=t.parsedStyle.y)}t.nodeName!==k.PATH&&t.nodeName!==k.POLYLINE&&t.nodeName!==k.POLYGON&&(t.parsedStyle.defX=l||0,t.parsedStyle.defY=c||0),_(l)&&_(c)&&_(u)||-1!==e.indexOf("transform")||((e=t.parsedStyle.transform)&&e.length?Ui(e,t):(n=(e=t.getLocalPosition())[0],r=e[1],e=e[2],t.setLocalPosition(_(l)?n:l,_(c)?r:c,_(u)?e:u)))},e}(o),ms=function(){function t(){}return t.prototype.calculator=function(t,e,n,r){n=null==(n=n=n instanceof Qr?null:n)?void 0:n.cloneNode(!0);return n&&(n.style.isMarker=!0),n},t}(),ys=function(){function t(){this.mixer=Io,this.parser=Ro,this.parserWithCSSDisabled=null}return t.prototype.calculator=function(t,e,n){return n.value},t}(),vs=function(){function t(){this.parser=Ro,this.parserWithCSSDisabled=null,this.mixer=Bo(0,1)}var e=t.prototype;return e.calculator=function(t,e,n){return n.value},e.postProcessor=function(t){var e,n=t.parsedStyle,r=n.offsetPath,n=n.offsetDistance;!r||(e=r.nodeName)!==k.LINE&&e!==k.PATH&&e!==k.POLYLINE||(e=r.getPoint(n))&&(t.parsedStyle.defX=e.x,t.parsedStyle.defY=e.y,t.setLocalPosition(e.x,e.y))},t}(),bs=function(){function t(){this.parser=Ro,this.parserWithCSSDisabled=null,this.mixer=Bo(0,1)}return t.prototype.calculator=function(t,e,n){return n.value},t}(),xs=function(){function m(){this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}m.isEmpty=function(t){return!t||0===t.halfExtents[0]&&0===t.halfExtents[1]&&0===t.halfExtents[2]};var t=m.prototype;return t.update=function(t,e){Pi(this.center,t),Pi(this.halfExtents,e),Ti(this.min,this.center,this.halfExtents),Li(this.max,this.center,this.halfExtents)},t.setMinMax=function(t,e){Li(this.center,e,t),Ni(this.center,this.center,.5),Ti(this.halfExtents,e,t),Ni(this.halfExtents,this.halfExtents,.5),Pi(this.min,t),Pi(this.max,e)},t.getMin=function(){return this.min},t.getMax=function(){return this.max},t.add=function(t){var e,n,r,i,a,o,s,l,c,u,h,f,d,p,g;m.isEmpty(t)||(m.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],l=(f=t.center)[0],g=f[1],f=f[2],c=(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=l-c)<(a=n-i)?g:a)+(o=(o=n+i)<(f=l+c)?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],l=e[1],c=e[5],u=e[9],h=e[2],f=e[6],d=e[10],p=Math.abs(a),g=Math.abs(o),m=Math.abs(s),y=Math.abs(l),v=Math.abs(c),b=Math.abs(u),x=Math.abs(h),w=Math.abs(f),k=Math.abs(d);n[0]=e[12]+a*i[0]+o*i[1]+s*i[2],n[1]=e[13]+l*i[0]+c*i[1]+u*i[2],n[2]=e[14]+h*i[0]+f*i[1]+d*i[2],r[0]=p*t[0]+g*t[1]+m*t[2],r[1]=y*t[0]+v*t[1]+b*t[2],r[2]=x*t[0]+w*t[1]+k*t[2],Ti(this.min,n,r),Li(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 m,i=[0,0,0],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=[0,0,0],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.getNegativeFarPoint=function(t){return 273===t.pnVertexFlag?Pi([0,0,0],this.min):272===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:257===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:256===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:17===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:16===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:1===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]},t.getPositiveFarPoint=function(t){return 273===t.pnVertexFlag?Pi([0,0,0],this.max):272===t.pnVertexFlag?[this.max[0],this.max[1],this.min[2]]:257===t.pnVertexFlag?[this.max[0],this.min[1],this.max[2]]:256===t.pnVertexFlag?[this.max[0],this.min[1],this.min[2]]:17===t.pnVertexFlag?[this.min[0],this.max[1],this.max[2]]:16===t.pnVertexFlag?[this.min[0],this.max[1],this.min[2]]:1===t.pnVertexFlag?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]},m}(),ws=function(){function t(t,e){this.distance=void 0,this.normal=void 0,this.pnVertexFlag=void 0,this.distance=t||0,this.normal=e||zt(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 Ut(t,this.normal)-this.distance},e.normalize=function(){var t=1/te(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&&$t(n,t,e,r),i},t}(),ks=((Os=fs=fs||{})[Os.OUTSIDE=4294967295]="OUTSIDE",Os[Os.INSIDE=0]="INSIDE",Os[Os.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 ws)}return t.prototype.extractFromVPMatrix=function(t){var e=t[0],n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],t=t[15];Wt(this.planes[0].normal,i-e,l-a,f-c),this.planes[0].distance=t-d,Wt(this.planes[1].normal,i+e,l+a,f+c),this.planes[1].distance=t+d,Wt(this.planes[2].normal,i+n,l+o,f+u),this.planes[2].distance=t+p,Wt(this.planes[3].normal,i-n,l-o,f-u),this.planes[3].distance=t-p,Wt(this.planes[4].normal,i-r,l-s,f-h),this.planes[4].distance=t-g,Wt(this.planes[5].normal,i+r,l+s,f+h),this.planes[5].distance=t+g,this.planes.forEach(function(t){t.normalize(),t.updatePNVertexFlag()})},t}()),Ms=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}(),Es=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}(),Os=function(){function t(){this.parser=Go,this.parserWithCSSDisabled=Go,this.mixer=Wo}var e=t.prototype;return e.calculator=function(t,e,n){return n instanceof Qr&&"unset"===n.value?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Es(0,0,0,0)}:n},e.postProcessor=function(t,e){var n;t.nodeName===k.PATH&&-1===e.indexOf("transform")&&(n=(e=t.parsedStyle).defX,e=e.defY,t.setLocalPosition(void 0===n?0:n,void 0===e?0:e))},t}(),Ss=function(){function t(){this.parser=Ho,this.mixer=Yo}return t.prototype.postProcessor=function(t,e){var n;t.nodeName!==k.POLYGON&&t.nodeName!==k.POLYLINE||-1!==e.indexOf("transform")||(n=(e=t.parsedStyle).defX,e=e.defY,t.setLocalPosition(n,e))},t}(),_s=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=Bo(0,1/0),t}return a(t,i),t}(o),As=function(){function t(){}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Qr?"unset"===n.value?"":n.value:""+n},e.postProcessor=function(t){t.nodeValue=""+t.parsedStyle.text||""},t}(),Ps=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}(),Ts=function(){function t(){this.parser=$o,this.parserWithCSSDisabled=$o,this.mixer=os}var e=t.prototype;return e.calculator=function(t,e,n,r){return n instanceof Qr?[]:n},e.postProcessor=function(t){Ui(t.parsedStyle.transform,t)},t}(),Ls=function(){function t(){this.parser=Ro}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}(),Ns=function(){function t(){this.registry={},this.define(k.CIRCLE,al),this.define(k.ELLIPSE,cl),this.define(k.RECT,Sl),this.define(k.IMAGE,gl),this.define(k.LINE,yl),this.define(k.GROUP,hl),this.define(k.PATH,xl),this.define(k.POLYGON,kl),this.define(k.POLYLINE,El),this.define(k.TEXT,Al),this.define(k.HTML,dl)}var e=t.prototype;return e.define=function(t,e){this.registry[t]=e},e.get=function(t){return this.registry[t]},t}();var Cs,b,js=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 Ms,this.page=new Ms,this.canvas=new Ms,this.viewport=new Ms,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(Si)},Dr(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}(),Rs=function(r){function t(t,e){var n=r.call(this,null)||this;return n.type=t,n.detail=e,Object.assign(Wr(n),e),n}return a(t,r),t}(js),Is=function(){function t(){this.emitter=new jr}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=fn(n)&&n||Ze(n)&&n.capture,n=Ze(n)&&n.once,s=ni(e)?void 0:e,l=!1,c="";return-1<t.indexOf(":")&&(i=(r=t.split(":"))[0],t=r[1],c=i,l=!0),t=o?t+"capture":t,e=ni(e)?e:e.handleEvent,l&&(a=e,e=function(){for(var t,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];(null==(t=n[0].target)?void 0:t.name)===c&&a.apply(void 0,n)}),n?this.emitter.once(t,e,s):this.emitter.on(t,e,s),this},e.off=function(t,e,n){return t?this.removeEventListener(t,e,n):this.removeAllEventListeners(),this},e.removeAllEventListeners=function(){this.emitter.removeAllListeners()},e.removeEventListener=function(t,e,n){var r,n=fn(n)&&n||Ze(n)&&n.capture,i=ni(e)?void 0:e;return e=ni(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 Rs(t,e))},e.dispatchEvent=function(t,e){if(void 0===e&&(e=!1),!t.type)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}(),Bs=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}a(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(Si)},t.lookupNamespaceURI=function(t){throw new Error(Si)},t.lookupPrefix=function(t){throw new Error(Si)},t.normalize=function(){throw new Error(Si)},t.isEqualNode=function(t){return this===t},t.isSameNode=function(t){return this.isEqualNode(t)},t.compareDocumentPosition=function(t){if(t===this)return 0;if(!(t instanceof d))throw new TypeError("Node.compareDocumentPosition: Argument 1 does not implement interface Node.");for(var e=[i=t],n=[a=this];null!=(r=i.parentNode)?r:a.parentNode;)var r,i=i.parentNode?(e.push(i.parentNode),i.parentNode):i,a=a.parentNode?(n.push(a.parentNode),a.parentNode):a;if(i!==a)return d.DOCUMENT_POSITION_DISCONNECTED|d.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|d.DOCUMENT_POSITION_PRECEDING;var o=n.length<e.length?e:n,s=o===e?n:e;if(o[o.length-s.length]===s[0])return o===e?d.DOCUMENT_POSITION_CONTAINED_BY|d.DOCUMENT_POSITION_FOLLOWING:d.DOCUMENT_POSITION_CONTAINS|d.DOCUMENT_POSITION_PRECEDING;for(var l=o.length-s.length,c=s.length-1;0<=c;c--){var u,h=s[c],f=o[l+c];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,t){void 0===t&&(t=!1),e(this)||(t?this.childNodes.slice():this.childNodes).forEach(function(t){t.forEach(e)})},Dr(d,[{key:"textContent",get:function(){var t="";this.nodeName===k.TEXT&&(t+=this.style.text);for(var e=Yr(this.childNodes);!(n=e()).done;){var n=n.value;n.nodeName===k.TEXT?t+=n.nodeValue:t+=n.textContent}return t},set:function(t){var e=this;this.childNodes.slice().forEach(function(t){e.removeChild(t)}),this.nodeName===k.TEXT&&(this.style.text=""+t)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return 0<this.childNodes.length?this.childNodes[0]:null}},{key:"lastChild",get:function(){return 0<this.childNodes.length?this.childNodes[this.childNodes.length-1]:null}}]),d}(Is),Fs=(Bs.DOCUMENT_POSITION_DISCONNECTED=1,Bs.DOCUMENT_POSITION_PRECEDING=2,Bs.DOCUMENT_POSITION_FOLLOWING=4,Bs.DOCUMENT_POSITION_CONTAINS=8,Bs.DOCUMENT_POSITION_CONTAINED_BY=16,Bs.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 A.AnimationTimeline(Wr(t))}catch(t){}var r={};return Pl.forEach(function(t){var e=t.n,n=t.inh,t=t.d;n&&t&&(r[e]=ni(t)?t(k.GROUP):t)}),t.documentElement=new hl({id:"g-root",style:r}),t.documentElement.ownerDocument=Wr(t),t.documentElement.parentNode=Wr(t),t.childNodes=[t.documentElement],t}a(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?Al:hl),(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(Si)},n.destroy=function(){try{this.documentElement.destroyChildren(),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.displayObject,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=Br(Rr().mark(function t(e,n){var r,i,a,o,s,l;return Rr().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,l=s.picked,t.abrupt("return",l&&l[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=Br(Rr().mark(function t(e,n){var r,i,a,o,s,l;return Rr().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,(l=s.picked)[l.length-1]!==this.documentElement&&l.push(this.documentElement),t.abrupt("return",l);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(_i)},n.insertBefore=function(t,e){throw new Error(_i)},n.removeChild=function(t,e){throw new Error(_i)},n.replaceChild=function(t,e,n){throw new Error(_i)},n.append=function(){throw new Error(_i)},n.prepend=function(){throw new Error(_i)},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)},Dr(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}(Bs)),Ds=(Cs=Cs||{},Cs[Cs.Standard=0]="Standard",(Vs=b=b||{}).REPARENT="reparent",Vs.DESTROY="destroy",Vs.ATTR_MODIFIED="DOMAttrModified",Vs.INSERTED="DOMNodeInserted",Vs.REMOVED="removed",Vs.MOUNTED="DOMNodeInsertedIntoDocument",Vs.UNMOUNTED="DOMNodeRemovedFromDocument",Vs.BOUNDS_CHANGED="bounds-changed",Vs.RENDER_ORDER_CHANGED="render-order-changed",Vs.CULLED="culled",function(c){function t(t,e,n,r,i,a,o,s){var l=c.call(this,null)||this;return l.relatedNode=void 0,l.prevValue=void 0,l.newValue=void 0,l.attrName=void 0,l.attrChange=void 0,l.prevParsedValue=void 0,l.newParsedValue=void 0,l.relatedNode=e,l.prevValue=n,l.newValue=r,l.attrName=i,l.attrChange=a,l.prevParsedValue=o,l.newParsedValue=s,l.type=t,l}return a(t,c),t}(js)),zs=(Ds.ADDITION=2,Ds.MODIFICATION=1,Ds.REMOVAL=3,0),Gs=new Ds(b.INSERTED,null,"","","",0,"",""),Ws=new Ds(b.REMOVED,null,"","","",0,"",""),Hs=new Rs(b.DESTROY),Ys=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=zs++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1,proxyNodeName:void 0},t.cullable={strategy:Cs.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[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=A.enableCSSParsing?{anchor:di,opacity:di,fillOpacity:di,strokeOpacity:di,fill:di,stroke:di,transform:di,transformOrigin:di,visibility:di,pointerEvents:di,lineWidth:di,lineCap:di,lineJoin:di,increasedLineWidthForHitTesting:di,fontSize:di,fontFamily:di,fontStyle:di,fontWeight:di,fontVariant:di,textAlign:di,textBaseline:di,textTransform:di,zIndex:di,filter:di,shadowType:di}:null,t.parsedStyle={},t.attributes={},t}a(t,i),t.isElement=function(t){return!!t.getAttribute};var e=t.prototype;return e.cloneNode=function(t){throw new Error(Si)},e.appendChild=function(t,e){if(t.destroyed)throw new Error("Cannot append a destroyed element.");return A.sceneGraphService.attach(t,this,e),null!=(e=this.ownerDocument)&&e.defaultView&&this.ownerDocument.defaultView.mountChildren(t),Gs.relatedNode=this,t.dispatchEvent(Gs),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 Ws.relatedNode=this,t.dispatchEvent(Ws),null!=(e=t.ownerDocument)&&e.defaultView&&t.ownerDocument.defaultView.unmountChildren(t),A.sceneGraphService.detach(t),t},e.removeChildren=function(){for(var t=this.childNodes.length-1;0<=t;t--){var e=this.childNodes[t];this.removeChild(e)}},e.destroyChildren=function(){for(var t=this.childNodes.length-1;0<=t;t--){var e=this.childNodes[t];e.childNodes.length&&e.destroyChildren(),e.destroy()}},e.matches=function(t){return A.sceneGraphService.matches(t,this)},e.getElementById=function(t){return A.sceneGraphService.querySelector("#"+t,this)},e.getElementsByName=function(t){return A.sceneGraphService.querySelectorAll('[name="'+t+'"]',this)},e.getElementsByClassName=function(t){return A.sceneGraphService.querySelectorAll("."+t,this)},e.getElementsByTagName=function(t){return A.sceneGraphService.querySelectorAll(t,this)},e.querySelector=function(t){return A.sceneGraphService.querySelector(t,this)},e.querySelectorAll=function(t){return A.sceneGraphService.querySelectorAll(t,this)},e.closest=function(t){var e=this;do{if(A.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(Hs),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0},e.getGeometryBounds=function(){return A.sceneGraphService.getGeometryBounds(this)},e.getRenderBounds=function(){return A.sceneGraphService.getBounds(this,!0)},e.getBounds=function(){return A.sceneGraphService.getBounds(this)},e.getLocalBounds=function(){return A.sceneGraphService.getLocalBounds(this)},e.getBoundingClientRect=function(){return A.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;return"symbol"==typeof t?A.enableCSSParsing?null:void 0:void 0===(e=this.attributes[t])&&(t=si(t),e=this.attributes[t],A.enableCSSParsing)&&_(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(Si)},e.getAttributeNode=function(t){throw new Error(Si)},e.getAttributeNodeNS=function(t,e){throw new Error(Si)},e.hasAttributeNS=function(t,e){throw new Error(Si)},e.removeAttributeNS=function(t,e){throw new Error(Si)},e.removeAttributeNode=function(t){throw new Error(Si)},e.setAttributeNS=function(t,e,n){throw new Error(Si)},e.setAttributeNode=function(t){throw new Error(Si)},e.setAttributeNodeNS=function(t){throw new Error(Si)},e.toggleAttribute=function(t,e){throw new Error(Si)},Dr(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}(Bs),Vs=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 Ms,t.movement=new Ms,t.offset=new Ms,t.global=new Ms,t.screen=new Ms,t}a(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(Si)},Dr(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}(js),qs=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}a(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}(Vs),Us=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 a(t,i),t.prototype.clone=function(){return this.manager.cloneWheelEvent(this)},t}(Vs);function Xs(t){return null!=t&&t.nodeName}var $s,Ks,Zs,Qs=new Ds(b.ATTR_MODIFIED,null,null,null,null,Ds.MODIFICATION,null,null),Js={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:""},tl={anchor:[0,0],fill:gi,stroke:gi,transform:[],zIndex:0,filter:[],shadowType:"outer",miterLimit:10},el=f({},tl,{opacity:1,fillOpacity:1,strokeOpacity:1,visibility:"visible",pointerEvents:"auto",lineWidth:1,lineCap:"butt",lineJoin:"miter",increasedLineWidthForHitTesting:0,fillRule:"nonzero"}),nl=[].concat(["opacity","fillOpacity","strokeOpacity","transformOrigin","visibility","pointerEvents","lineWidth","lineCap","lineJoin","increasedLineWidthForHitTesting"],["fontSize","fontFamily","fontStyle","fontWeight","fontVariant","textAlign","textBaseline","textTransform"]),rl=function(i){function t(t){var r=i.call(this)||this,t=(r.config=void 0,r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.dataset=void 0,r.getClip=function(){return this.style.clipPath||null},r.config=t,r.config.interactive=null!=(t=r.config.capture)?t:r.config.interactive,r.id=r.config.id||"",r.name=r.config.name||"",(r.config.className||r.config.class)&&(r.className=r.config.className||r.config.class),r.nodeName=r.config.type||k.GROUP,r.config.style=r.config.style||r.config.attrs||{},Object.assign(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,A.enableCSSParsing?tl:el,r.config.initialParsedStyle),A.enableCSSParsing&&Object.assign(r.attributes,Js),r.initAttributes(r.config.style),A.globalThis.Proxy||function(){});return r.dataset=new t({},{get:function(t,e){e="data-"+ti(e);return void 0!==t[e]?t[e]:r.getAttribute(e)},set:function(t,e,n){return r.setAttribute("data-"+ti(e),n),!0}}),r.style=new t({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}}),r}a(t,i);var e=t.prototype;return e.destroy=function(){i.prototype.destroy.call(this),this.getAnimations().forEach(function(t){t.cancel()})},e.cloneNode=function(e,t){var n,r=f({},this.attributes);for(n in r){var i=r[n];Xs(i)&&"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},e.initAttributes=function(t){void 0===t&&(t={});var e,n=this.renderable,r={forceUpdateGeometry:!0},i=(A.enableCSSParsing&&(r.usedAttributes=nl),{});for(e in t)i[si(e)]=t[e];A.styleValueRegistry.processProperties(this,i,r),n.dirty=!0},e.setAttribute=function(t,e,n){void 0===n&&(n=!1);t=si(t);dn(e)||!n&&e===this.attributes[t]||(this.internalSetAttribute(t,e),i.prototype.setAttribute.call(this,t,e))},e.internalSetAttribute=function(t,e,n){void 0===n&&(n={});var r=this.renderable,i=this.attributes[t],a=this.parsedStyle[t],o=(A.styleValueRegistry.processProperties(this,((o={})[t]=e,o),n),r.dirty=!0,this.parsedStyle[t]);this.isConnected&&(Qs.relatedNode=this,Qs.prevValue=i,Qs.newValue=e,Qs.attrName=t,Qs.prevParsedValue=a,Qs.newParsedValue=o,this.isMutationObserved?this.dispatchEvent(Qs):(Qs.target=this).ownerDocument.defaultView.dispatchEvent(Qs,!0)),(this.isCustomElement&&this.isConnected||!this.isCustomElement)&&this.attributeChangedCallback&&this.attributeChangedCallback(t,i,e,a,o)},e.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 Es(n,e,r-n,t-e)},e.setOrigin=function(t,e,n){return A.sceneGraphService.setOrigin(this,ji(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getOrigin=function(){return A.sceneGraphService.getOrigin(this)},e.setPosition=function(t,e,n){return A.sceneGraphService.setPosition(this,ji(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.setLocalPosition=function(t,e,n){return A.sceneGraphService.setLocalPosition(this,ji(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translate=function(t,e,n){return A.sceneGraphService.translate(this,ji(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.translateLocal=function(t,e,n){return A.sceneGraphService.translateLocal(this,ji(t,e=void 0===e?0:e,n=void 0===n?0:n)),this},e.getPosition=function(){return A.sceneGraphService.getPosition(this)},e.getLocalPosition=function(){return A.sceneGraphService.getLocalPosition(this)},e.scale=function(t,e,n){return this.scaleLocal(t,e,n)},e.scaleLocal=function(t,e,n){return"number"==typeof t&&(t=ji(t,e=e||t,n=n||t)),A.sceneGraphService.scaleLocal(this,t),this},e.setLocalScale=function(t,e,n){return"number"==typeof t&&(t=ji(t,e=e||t,n=n||t)),A.sceneGraphService.setLocalScale(this,t),this},e.getLocalScale=function(){return A.sceneGraphService.getLocalScale(this)},e.getScale=function(){return A.sceneGraphService.getScale(this)},e.getEulerAngles=function(){return Ii(Bi(y(),A.sceneGraphService.getWorldTransform(this))[2])},e.getLocalEulerAngles=function(){return Ii(Bi(y(),A.sceneGraphService.getLocalRotation(this))[2])},e.setEulerAngles=function(t){return A.sceneGraphService.setEulerAngles(this,0,0,t),this},e.setLocalEulerAngles=function(t){return A.sceneGraphService.setLocalEulerAngles(this,0,0,t),this},e.rotateLocal=function(t,e,n){return _(e)&&_(n)?A.sceneGraphService.rotateLocal(this,0,0,t):A.sceneGraphService.rotateLocal(this,t,e,n),this},e.rotate=function(t,e,n){return _(e)&&_(n)?A.sceneGraphService.rotate(this,0,0,t):A.sceneGraphService.rotate(this,t,e,n),this},e.setRotation=function(t,e,n,r){return A.sceneGraphService.setRotation(this,t,e,n,r),this},e.setLocalRotation=function(t,e,n,r){return A.sceneGraphService.setLocalRotation(this,t,e,n,r),this},e.setLocalSkew=function(t,e){return A.sceneGraphService.setLocalSkew(this,t,e),this},e.getRotation=function(){return A.sceneGraphService.getRotation(this)},e.getLocalRotation=function(){return A.sceneGraphService.getLocalRotation(this)},e.getLocalSkew=function(){return A.sceneGraphService.getLocalSkew(this)},e.getLocalTransform=function(){return A.sceneGraphService.getLocalTransform(this)},e.getWorldTransform=function(){return A.sceneGraphService.getWorldTransform(this)},e.setLocalTransform=function(t){return A.sceneGraphService.setLocalTransform(this,t),this},e.resetLocalTransform=function(){A.sceneGraphService.resetLocalTransform(this)},e.getAnimations=function(){return this.activeAnimations},e.animate=function(t,e){var n=null==(n=this.ownerDocument)?void 0:n.timeline;return n?n.play(this,t,e):null},e.isVisible=function(){var t;return"visible"===(null==(t=this.parsedStyle)?void 0:t.visibility)},e.isInteractive=function(){var t;return"none"!==(null==(t=this.parsedStyle)?void 0:t.pointerEvents)},e.isCulled=function(){return!(!this.cullable||!this.cullable.enable||this.cullable.visible)},e.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},e.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},e.getConfig=function(){return this.config},e.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?Ze(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},e.getMatrix=function(t){var t=t||this.getWorldTransform(),e=_t(y(),t),n=e[0],e=e[1],r=At(y(),t),i=r[0],r=r[1],t=Pt(re(),t),t=Bi(y(),t),a=t[0],t=t[2];return Fi(a||t,n,e,i,r)},e.getLocalMatrix=function(){return this.getMatrix(this.getLocalTransform())},e.setMatrix=function(t){var t=Di(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)},e.setLocalMatrix=function(t){var t=Di(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)},e.show=function(){A.enableCSSParsing?this.style.visibility="visible":this.forEach(function(t){t.style.visibility="visible"})},e.hide=function(){A.enableCSSParsing?this.style.visibility="hidden":this.forEach(function(t){t.style.visibility="hidden"})},e.getCount=function(){return this.childElementCount},e.getParent=function(){return this.parentElement},e.getChildren=function(){return this.children},e.getFirst=function(){return this.firstElementChild},e.getLast=function(){return this.lastElementChild},e.getChildByIndex=function(t){return this.children[t]||null},e.add=function(t,e){return this.appendChild(t,e)},e.setClip=function(t){this.style.clipPath=t},e.set=function(t,e){this.config[t]=e},e.get=function(t){return this.config[t]},e.moveTo=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},e.move=function(t,e,n){return this.setPosition(t,e=void 0===e?0:e,n=void 0===n?0:n),this},e.setZIndex=function(t){return this.style.zIndex=t,this},Dr(t,[{key:"interactive",get:function(){return this.isInteractive()},set:function(t){this.style.pointerEvents=t?"auto":"none"}}]),t}(Ys),il=["style"],al=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,il);return n.call(this,f({type:k.CIRCLE,style:A.enableCSSParsing?f({cx:"",cy:"",r:""},e):f({},e),initialParsedStyle:{anchor:[.5,.5],transformOrigin:A.enableCSSParsing?null:[bi,bi]}},t))||this}return a(t,n),t}(rl),ol=["style"],sl=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,ol),e=n.call(this,f({style:A.enableCSSParsing?f({x:"",y:""},e):f({},e)},t))||this;return e.isCustomElement=!0,e}return a(t,n),t}(rl),ll=["style"],cl=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,ll);return n.call(this,f({type:k.ELLIPSE,style:A.enableCSSParsing?f({cx:"",cy:"",rx:"",ry:""},e):f({},e),initialParsedStyle:{anchor:[.5,.5],transformOrigin:A.enableCSSParsing?null:[bi,bi]}},t))||this}return a(t,n),t}(rl),ul=["style"],hl=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,ul);return n.call(this,f({type:k.GROUP,style:A.enableCSSParsing?f({x:"",y:"",width:"",height:""},e):f({},e)},t))||this}return a(t,n),t}(rl),fl=["style"],dl=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,fl),e=n.call(this,f({type:k.HTML,style:A.enableCSSParsing?f({x:"",y:"",width:"auto",height:"auto",innerHTML:""},e):f({},e)},t))||this;return e.cullable.enable=!1,e}a(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 xs).setMinMax([t,r,0],[t+n.width,r+n.height,0]),e):null},e.getLocalBounds=function(){if(this.parentNode){var t,e=yt(ht(),this.parentNode.getWorldTransform()),n=this.getBounds();if(!xs.isEmpty(n))return(t=new xs).setFromTransformedAABB(n,e),t}return this.getBounds()},t}(rl),pl=["style"],gl=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,pl);return n.call(this,f({type:k.IMAGE,style:A.enableCSSParsing?f({x:"",y:"",img:"",width:"",height:""},e):f({},e)},t))||this}return a(t,n),t}(rl),ml=["style"],yl=function(r){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,ml),e=r.call(this,f({type:k.LINE,style:f({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&&Xs(n)&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&Xs(t)&&(e.markerEndAngle=t.getLocalEulerAngles(),e.appendChild(t)),e.transformMarker(!0),e.transformMarker(!1),e}a(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&&Xs(r)&&(this.markerStartAngle=0,r.remove()),i&&Xs(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t&&(r&&Xs(r)&&(this.markerEndAngle=0,r.remove()),i)&&Xs(i)&&(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,l=o.markerEnd,c=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:l;s&&Xs(s)&&(l=0,t=t?(r=h-g,i=d-o,e=f-h,n=p-d,a=c||0,this.markerStartAngle):(r=f-g,i=p-o,e=h-f,n=d-p,a=u||0,this.markerEndAngle),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+t),s.setLocalPosition(r+Math.cos(l)*a,i+Math.sin(l)*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=er.pointAt(r,i,a,o,t),i=r.x,a=r.y,o=Kt(y(),zt(i-s,a-n,0),e?this.getWorldTransform():this.getLocalTransform());return new Ms(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 er.length(e,n,r,t)},t}(rl),vl=["style"],bl={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Es(0,0,0,0)},xl=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,vl),e=i.call(this,f({type:k.PATH,style:A.enableCSSParsing?f({path:"",miterLimit:""},e):f({},e),initialParsedStyle:A.enableCSSParsing?null:{miterLimit:4,path:f({},bl)}},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&Xs(n)&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&Xs(t)&&e.placeMarkerMid(t),r&&Xs(r)&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}a(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&&Xs(r)&&(this.markerStartAngle=0,r.remove()),i&&Xs(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&Xs(r)&&(this.markerEndAngle=0,r.remove()),i&&Xs(i)&&(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,l=o.markerEnd,c=o.markerStartOffset,u=o.markerEndOffset,h=o.defX,o=o.defY,s=t?s:l;s&&Xs(s)&&(l=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=c||0,this.markerStartAngle):(c=(t=this.getEndTangent())[0],e=(t=t[1])[0]-h,n=t[1]-o,r=c[0]-t[0],i=c[1]-t[1],a=u||0,this.markerEndAngle),l=Math.atan2(i,r),s.setLocalEulerAngles(180*l/Math.PI+h),s.setLocalPosition(e+Math.cos(l)*a,n+Math.sin(l)*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&&Xs(t))for(var a=1;a<n.length-1;a++){var o=n[a].currentPoint,s=o[0],o=o[1],l=1===a?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(s-r,o-i)}},e.getTotalLength=function(){return ya(this)},e.getPointAtLength=function(t,e){void 0===e&&(e=!1);var n=this.parsedStyle,r=n.defX,i=n.defY,n=He(n.path.absolutePath,t,v(v({},a),{bbox:!1,length:!0})).point,t=n.x,a=n.y,n=Kt(y(),zt(t-r,a-i,0),e?this.getWorldTransform():this.getLocalTransform());return new Ms(n[0],n[1])},e.getPoint=function(t,e){return void 0===e&&(e=!1),this.getPointAtLength(t*ya(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}(rl),wl=["style"],kl=function(i){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,wl),e=i.call(this,f({type:k.POLYGON,style:A.enableCSSParsing?f({points:"",miterLimit:"",isClosed:!0},e):f({},e),initialParsedStyle:A.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},t))||this,t=(e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[],e.parsedStyle),n=t.markerStart,r=t.markerEnd,t=t.markerMid;return n&&Xs(n)&&(e.markerStartAngle=n.getLocalEulerAngles(),e.appendChild(n)),t&&Xs(t)&&e.placeMarkerMid(t),r&&Xs(r)&&(e.markerEndAngle=r.getLocalEulerAngles(),e.appendChild(r)),e.transformMarker(!0),e.transformMarker(!1),e}a(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&&Xs(r)&&(this.markerStartAngle=0,r.remove()),i&&Xs(i)&&(this.markerStartAngle=i.getLocalEulerAngles(),this.appendChild(i),this.transformMarker(!0))):"markerEnd"===t?(r&&Xs(r)&&(this.markerEndAngle=0,r.remove()),i&&Xs(i)&&(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,l=o.markerEnd,c=o.markerStartOffset,u=o.markerEndOffset,h=o.points.points,f=o.defX,o=o.defY,s=t?s:l;s&&Xs(s)&&(i=h[l=0][0]-f,a=h[0][1]-o,c=t?(e=h[1][0]-h[0][0],n=h[1][1]-h[0][1],r=c||0,this.markerStartAngle):(t=h.length,n=this.parsedStyle.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),l=Math.atan2(n,e),s.setLocalEulerAngles(180*l/Math.PI+c),s.setLocalPosition(i+Math.cos(l)*r,a+Math.sin(l)*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&&Xs(t))for(var a=1;a<(this.parsedStyle.isClosed?n.length:n.length-1);a++){var o=n[a][0]-r,s=n[a][1]-i,l=1===a?t:t.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(o,s)}},t}(rl),Ml=["style"],El=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,Ml);return n.call(this,f({type:k.POLYLINE,style:A.enableCSSParsing?f({points:"",miterLimit:"",isClosed:!1},e):f({},e),initialParsedStyle:A.enableCSSParsing?null:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},t))||this}a(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)}),er.pointAt(a[s][0],a[s][1],a[s+1][0],a[s+1][1],o)),a=e.x,e=e.y,a=Kt(y(),zt(a-r,e-i,0),t?this.getWorldTransform():this.getLocalTransform());return new Ms(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}(kl),Ol=["style"],Sl=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,Ol);return n.call(this,f({type:k.RECT,style:A.enableCSSParsing?f({x:"",y:"",width:"",height:"",radius:""},e):f({},e)},t))||this}return a(t,n),t}(rl),_l=["style"],Al=function(n){function t(t){var t=void 0===t?{}:t,e=t.style,t=Gr(t,_l);return n.call(this,f({type:k.TEXT,style:A.enableCSSParsing?f({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):f({fill:"black"},e),initialParsedStyle:A.enableCSSParsing?{}:{x:0,y:0,fontSize:16,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",lineHeight:0,letterSpacing:0,textBaseline:"alphabetic",textAlign:"start",wordWrap:!1,wordWrapWidth:0,leading:0,dx:0,dy:0}},t))||this}a(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}(rl),Pl=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:i.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:i.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:i.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:i.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:i.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:i.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:i.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:i.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:i.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:i.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:i.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:i.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:i.FILTER},{n:"clipPath",syntax:i.DEFINED_PATH},{n:"textPath",syntax:i.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:i.TRANSFORM},{n:"transformOrigin",p:100,d:function(t){return t===k.CIRCLE||t===k.ELLIPSE?"center":t===k.TEXT?"text-anchor":"left top"},l:!0,syntax:i.TRANSFORM_ORIGIN},{n:"anchor",p:99,d:function(t){return t===k.CIRCLE||t===k.ELLIPSE?"0.5 0.5":"0 0"},l:!0,syntax:i.LENGTH_PERCENTAGE_12},{n:"cx",int:!0,d:"0",syntax:i.COORDINATE},{n:"cy",int:!0,d:"0",syntax:i.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"x",int:!0,d:"0",syntax:i.COORDINATE},{n:"y",int:!0,d:"0",syntax:i.COORDINATE},{n:"z",int:!0,d:"0",syntax:i.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:i.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:i.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:i.COORDINATE},{n:"y1",int:!0,l:!0,syntax:i.COORDINATE},{n:"z1",int:!0,l:!0,syntax:i.COORDINATE},{n:"x2",int:!0,l:!0,syntax:i.COORDINATE},{n:"y2",int:!0,l:!0,syntax:i.COORDINATE},{n:"z2",int:!0,l:!0,syntax:i.COORDINATE},{n:"path",int:!0,l:!0,d:"",a:["d"],syntax:i.PATH,p:50},{n:"points",int:!0,l:!0,syntax:i.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:i.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:i.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:i.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:i.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:i.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:i.NUMBER,d:function(t){return t===k.PATH||t===k.POLYGON||t===k.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:i.MARKER},{n:"markerEnd",syntax:i.MARKER},{n:"markerMid",syntax:i.MARKER},{n:"markerStartOffset",syntax:i.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:i.LENGTH,l:!0,int:!0,d:"0"}],Tl=Pl.filter(function(t){return!!t.l}).map(function(t){return t.n}),Ll={},Nl=new WeakMap,Vs=function(){function t(){var e=this;Pl.forEach(function(t){e.registerMetadata(t)})}var e=t.prototype;return e.registerMetadata=function(e){[e.n].concat(e.a||[]).forEach(function(t){Ll[t]=e})},e.unregisterMetadata=function(t){delete Ll[t]},e.getPropertySyntax=function(t){return A.CSSPropertySyntaxFactory[t]},e.processProperties=function(n,e,t){var r=this;if(void 0===t&&(t={skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[]}),A.enableCSSParsing){var i=t,a=i.skipUpdateAttribute,o=i.skipParse,s=i.forceUpdateGeometry,i=i.usedAttributes,l=s,c=Object.keys(e);c.forEach(function(t){a||(n.attributes[t]=e[t]),!l&&null!=(t=Ll[t])&&t.l&&(l=!0)}),o||c.forEach(function(t){n.computedStyle[t]=r.parseProperty(t,n.attributes[t],n)}),(c=null!=i&&i.length?Array.from(new Set(c.concat(i))):c).forEach(function(t){t in n.computedStyle&&(n.parsedStyle[t]=r.computeProperty(t,n.computedStyle[t],n))}),l&&this.updateGeometry(n),c.forEach(function(t){t in n.parsedStyle&&r.postProcessProperty(t,n,c)}),A.enableCSSParsing&&n.children.length&&c.forEach(function(e){e in n.parsedStyle&&r.isPropertyInheritable(e)&&n.children.forEach(function(t){t.internalSetAttribute(e,null,{skipUpdateAttribute:!0,skipParse:!0})})})}else{Object.assign(n.attributes,e);var s=Object.keys(e),o=n.parsedStyle.clipPath,i=n.parsedStyle.offsetPath,u=(n.parsedStyle=Object.assign(n.parsedStyle,e),!!t.forceUpdateGeometry);if(!u)for(var h=0;h<Tl.length;h++)if(Tl[h]in e){u=!0;break}e.fill&&(n.parsedStyle.fill=wo(e.fill)),e.stroke&&(n.parsedStyle.stroke=wo(e.stroke)),e.shadowColor&&(n.parsedStyle.shadowColor=wo(e.shadowColor)),e.filter&&(n.parsedStyle.filter=Co(e.filter)),_(e.radius)||(n.parsedStyle.radius=Ao(e.radius,4)),_(e.lineDash)||(n.parsedStyle.lineDash=Ao(e.lineDash,2)),e.points&&(n.parsedStyle.points=Ho(e.points,n)),""===e.path&&(n.parsedStyle.path=f({},bl)),e.path&&(n.parsedStyle.path=Go(e.path,n)),e.textTransform&&A.CSSPropertySyntaxFactory["<text-transform>"].calculator(null,null,{value:e.textTransform},n,null),e.clipPath&&A.CSSPropertySyntaxFactory["<defined-path>"].calculator("clipPath",o,e.clipPath,n,this),e.offsetPath&&A.CSSPropertySyntaxFactory["<defined-path>"].calculator("offsetPath",i,e.offsetPath,n,this),e.anchor&&(n.parsedStyle.anchor=Ao(e.anchor,2)),e.transform&&(n.parsedStyle.transform=$o(e.transform)),e.transformOrigin&&(n.parsedStyle.transformOrigin=ss(e.transformOrigin)),e.markerStart&&(n.parsedStyle.markerStart=A.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerStart,e.markerStart,null,null)),e.markerEnd&&(n.parsedStyle.markerEnd=A.CSSPropertySyntaxFactory["<marker>"].calculator(null,e.markerEnd,e.markerEnd,null,null)),e.markerMid&&(n.parsedStyle.markerMid=A.CSSPropertySyntaxFactory["<marker>"].calculator("",e.markerMid,e.markerMid,null,null)),(n.nodeName!==k.CIRCLE&&n.nodeName!==k.ELLIPSE||_(e.cx)&&_(e.cy))&&(n.nodeName!==k.RECT&&n.nodeName!==k.IMAGE&&n.nodeName!==k.GROUP&&n.nodeName!==k.HTML&&n.nodeName!==k.TEXT&&n.nodeName!==k.MESH||_(e.x)&&_(e.y)&&_(e.z))&&(n.nodeName!==k.LINE||_(e.x1)&&_(e.y1)&&_(e.z1)&&_(e.x2)&&_(e.y2)&&_(e.z2))||A.CSSPropertySyntaxFactory["<coordinate>"].postProcessor(n,s),_(e.zIndex)||A.CSSPropertySyntaxFactory["<z-index>"].postProcessor(n,s),e.path&&A.CSSPropertySyntaxFactory["<path>"].postProcessor(n,s),e.points&&A.CSSPropertySyntaxFactory["<list-of-points>"].postProcessor(n,s),_(e.offsetDistance)||A.CSSPropertySyntaxFactory["<offset-distance>"].postProcessor(n,s),e.transform&&A.CSSPropertySyntaxFactory["<transform>"].postProcessor(n,s),u&&this.updateGeometry(n)}},e.parseProperty=function(t,e,n){var r,t=Ll[t],i=e;return"unset"===(e=""!==e&&!_(e)?e:"unset")||"initial"===e||"inherit"===e?i=ai(e):t&&(r=t.k,t=(t=t.syntax)&&this.getPropertySyntax(t),r&&-1<r.indexOf(e)?i=ai(e):t&&t.parser&&(i=t.parser(e,n))),i},e.computeProperty=function(t,e,n){var r=Ll[t],i="g-root"===n.id,a=e;if(r){var o=r.syntax,s=r.inh,r=r.d;if(e instanceof Qr){var l=e.value;if("initial"===(l="unset"===l?s&&!i?"inherit":"initial":l))_(r)||(e=this.parseProperty(t,ni(r)?r(n.nodeName):r,n));else if("inherit"===l)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 Qr?e.value:e}return a},e.postProcessProperty=function(t,e,n){var t=Ll[t];t&&t.syntax&&(t=t.syntax&&this.getPropertySyntax(t.syntax))&&t.postProcessor&&t.postProcessor(e,n)},e.addUnresolveProperty=function(t,e){var n=Nl.get(t);n||(Nl.set(t,[]),n=Nl.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=Nl.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=Nl.get(e);t&&t.length&&(n={},t.forEach(function(t){n[t]=e.attributes[t]}),this.processProperties(e,n),Nl.delete(e))},e.updateGeometry=function(t){var s,e,n,r,i,a,o,l,c,u,h,f,d,p,g,m=t.nodeName,y=A.geometryUpdaterFactory[m];y&&((s=t.geometry).contentBounds||(s.contentBounds=new xs),s.renderBounds||(s.renderBounds=new xs),e=t.parsedStyle,n=(y=y.update(e,t)).width,r=y.height,h=void 0===(h=y.depth)?0:h,u=void 0===(u=y.offsetX)?0:u,p=void 0===(p=y.offsetY)?0:p,y=void 0===(y=y.offsetZ)?0:y,h=[Math.abs(n)/2,Math.abs(r)/2,h/2],l=e.stroke,c=e.lineWidth,g=e.increasedLineWidthForHitTesting,d=e.shadowType,f=e.shadowColor,i=void 0===(i=e.filter)?[]:i,a=e.transformOrigin,o=e.anchor,m===k.TEXT&&delete e.anchor,u=[(1-2*(o&&o[0]||0))*n/2+u,(1-2*(o&&o[1]||0))*r/2+p,(1-2*(o&&o[2]||0))*h[2]+y],s.contentBounds.update(u,h),p=m===k.POLYLINE||m===k.POLYGON||m===k.PATH?Math.SQRT2:.5,l&&!l.isNone&&(h[0]+=y=((c||0)+(g||0))*p,h[1]+=y),s.renderBounds.update(u,h),f&&d&&"inner"!==d&&(l=(m=s.renderBounds).min,c=m.max,g=e.shadowBlur||0,p=e.shadowOffsetX||0,y=e.shadowOffsetY||0,u=l[0]-g+p,h=c[0]+g+p,f=l[1]-g+y,d=c[1]+g+y,l[0]=Math.min(l[0],u),c[0]=Math.max(c[0],h),l[1]=Math.min(l[1],f),c[1]=Math.max(c[1],d),s.renderBounds.setMinMax(l,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,Li(s.renderBounds.halfExtents,s.renderBounds.halfExtents,[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,m=r<0,g=((p=n<0)?-1:1)*(a?To(a[0],0,t):0),y=(m?-1:1)*(a?To(a[1],1,t):0),g-=(p?-1:1)*(o&&o[0]||0)*s.contentBounds.halfExtents[0]*2,y-=(m?-1:1)*(o&&o[1]||0)*s.contentBounds.halfExtents[1]*2,t.setOrigin(g,y),A.sceneGraphService.dirtifyToRoot(t))},e.isPropertyInheritable=function(t){t=Ll[t];return!!t&&t.inh},t}();(Rl=$s=$s||{})[Rl.ORBITING=0]="ORBITING",Rl[Rl.EXPLORING=1]="EXPLORING",Rl[Rl.TRACKING=2]="TRACKING",(Rl=Ks=Ks||{})[Rl.DEFAULT=0]="DEFAULT",Rl[Rl.ROTATIONAL=1]="ROTATIONAL",Rl[Rl.TRANSLATIONAL=2]="TRANSLATIONAL",Rl[Rl.CINEMATIC=3]="CINEMATIC",(Rl=Zs=Zs||{})[Rl.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",Rl[Rl.PERSPECTIVE=1]="PERSPECTIVE";var Cl,jl="updated",Rl=function(){function t(){this.canvas=void 0,this.eventEmitter=new jr,this.matrix=ht(),this.right=zt(1,0,0),this.up=zt(0,1,0),this.forward=zt(0,0,1),this.position=zt(0,0,1),this.focalPoint=zt(0,0,0),this.distanceVector=zt(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=ht(),this.projectionMatrixInverse=ht(),this.jitteredProjectionMatrix=void 0,this.view=void 0,this.enableUpdate=!0,this.type=$s.EXPLORING,this.trackingMode=Ks.DEFAULT,this.projectionMode=Zs.PERSPECTIVE,this.frustum=new ks,this.orthoMatrix=ht()}var e=t.prototype;return e.isOrtho=function(){return this.projectionMode===Zs.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===$s.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===$s.TRACKING&&void 0!==e&&this.setTrackingMode(e),this},e.setProjectionMode=function(t){return this.projectionMode=t,this},e.setTrackingMode=function(t){if(this.type!==$s.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(ht(),this.matrix)},e.getWorldTransform=function(){return this.matrix},e.jitterProjectionMatrix=function(t,e){t=Et(ht(),[t,e,0]);this.jitteredProjectionMatrix=bt(ht(),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===Zs.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===Zs.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===Zs.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===Zs.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===Zs.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Zs.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=zt(t.x-r,t.y-n,0),e=Ut(i,this.right)/Dt(this.right),r=Ut(i,this.up)/Dt(this.up);return this.pan(-e,-r),this},e.setPerspective=function(t,e,n,r){this.projectionMode=Zs.PERSPECTIVE,this.fov=n,this.near=t,this.far=e,this.aspect=r;var i,a,o,s,n=this.near*Math.tan(Ri(.5*this.fov))/this.zoom,e=2*n,r=this.aspect*e,l=-.5*r;return null!=(i=this.view)&&i.enabled&&(i=this.view.fullWidth,a=this.view.fullHeight,l+=this.view.offsetX*r/i,n-=this.view.offsetY*e/a,r*=this.view.width/i,e*=this.view.height/a),i=this.projectionMatrix,l=(a=l)+r,n=(r=n)-e,e=this.far,o=2*t/(r-n),s=(l+a)/(l-a),r=(r+n)/(r-n),n=-(e+t)/(e-t),e=-2*e*t/(e-t),i[0]=2*t/(l-a),i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=o,i[6]=0,i[7]=0,i[8]=s,i[9]=r,i[10]=n,i[11]=-1,i[12]=0,i[13]=0,i[14]=e,i[15]=0,wt(this.projectionMatrix,this.projectionMatrix,zt(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this},e.setOrthographic=function(t,e,n,r,i,a){this.projectionMode=Zs.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),jt(this.projectionMatrix,s,n,r,e,i,a),wt(this.projectionMatrix,this.projectionMatrix,zt(1,-1,1)),yt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this},e.setPosition=function(t,e,n){t=ji(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=zt(0,1,0);return this.focalPoint=ji(t,e,n),this.trackingMode===Ks.CINEMATIC&&(t=(r=Yt(y(),this.focalPoint,this.position))[0],e=r[1],n=r[2],r=Dt(r),e=Ii(Math.asin(e/r)),r=90+Ii(Math.atan2(n,t)),Mt(n=ht(),n,Ri(r)),kt(n,n,Ri(e)),i=Kt(y(),[0,1,0],n)),yt(this.matrix,Rt(ht(),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=y(),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=Ci(t),this.computeMatrix(),this._getAxes(),this.type===$s.ORBITING||this.type===$s.EXPLORING?this._getPosition():this.type===$s.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getAzimuth=function(){return this.azimuth},e.setElevation=function(t){return this.elevation=Ci(t),this.computeMatrix(),this._getAxes(),this.type===$s.ORBITING||this.type===$s.EXPLORING?this._getPosition():this.type===$s.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this},e.getElevation=function(){return this.elevation},e.setRoll=function(t){return this.roll=Ci(t),this.computeMatrix(),this._getAxes(),this.type===$s.ORBITING||this.type===$s.EXPLORING?this._getPosition():this.type===$s.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=ie(re(),[0,0,1],Ri(this.roll)),e=(gt(this.matrix),ie(re(),[1,0,0],Ri((this.rotateWorld&&this.type!==$s.TRACKING||this.type===$s.TRACKING?1:-1)*this.elevation))),n=ie(re(),[0,1,0],Ri((this.rotateWorld&&this.type!==$s.TRACKING||this.type===$s.TRACKING?1:-1)*this.azimuth)),n=ae(re(),n,e),n=ae(re(),n,t),e=Lt(ht(),n);this.type===$s.ORBITING||this.type===$s.EXPLORING?(xt(this.matrix,this.matrix,this.focalPoint),bt(this.matrix,this.matrix,e),xt(this.matrix,this.matrix,[0,0,this.distance])):this.type===$s.TRACKING&&(xt(this.matrix,this.matrix,this.position),bt(this.matrix,this.matrix,e))},e._setPosition=function(t,e,n){this.position=ji(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(){Gt(this.right,ji(ne(ee(),[1,0,0,0],this.matrix))),Gt(this.up,ji(ne(ee(),[0,1,0,0],this.matrix))),Gt(this.forward,ji(ne(ee(),[0,0,1,0],this.matrix))),qt(this.right,this.right),qt(this.up,this.up),qt(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===$s.TRACKING||this.rotateWorld?(this.elevation=Ii(Math.asin(e/r)),this.azimuth=Ii(Math.atan2(-t,-n))):(this.elevation=-Ii(Math.asin(e/r)),this.azimuth=-Ii(Math.atan2(-t,-n)))},e._getPosition=function(){Gt(this.position,ji(ne(ee(),[0,0,0,1],this.matrix))),this._getDistance()},e._getFocalPoint=function(){var t,e;Zt(this.distanceVector,[0,0,-this.distance],(t=J(),e=this.matrix,t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t)),Ht(this.focalPoint,this.position,this.distanceVector),this._getDistance()},e._getDistance=function(){this.distanceVector=Yt(y(),this.focalPoint,this.position),this.distance=Dt(this.distanceVector),this.dollyingStep=this.distance/100},e._getOrthoMatrix=function(){var t,e;this.projectionMode===Zs.ORTHOGRAPHIC&&(t=this.position,e=ie(re(),[0,0,1],-this.roll*Math.PI/180),Tt(this.orthoMatrix,e,zt((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),zt(this.zoom,this.zoom,1),t))},e.triggerUpdate=function(){var t;this.enableUpdate&&(t=this.getViewTransform(),t=bt(ht(),this.getPerspective(),t),this.getFrustum().extractFromVPMatrix(t),this.eventEmitter.emit(jl))},e.rotate=function(t,e,n){throw new Error(Si)},e.pan=function(t,e){throw new Error(Si)},e.dolly=function(t){throw new Error(Si)},e.createLandmark=function(t,e){throw new Error(Si)},e.gotoLandmark=function(t,e){throw new Error(Si)},e.cancelLandmarkAnimation=function(){throw new Error(Si)},t}(),Il=function(){function t(){}return t.prototype.update=function(t,e){t=t.r;return{width:2*t,height:2*t}},t}(),Bl=function(){function t(){}return t.prototype.update=function(t,e){return{width:2*t.rx,height:2*t.ry}},t}(),Fl=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}(),s=function(){function t(){}return t.prototype.update=function(t){t=t.path.rect;return{width:t.width,height:t.height}},t}(),Dl=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}(),zl=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&&!an(n)&&(r||(r=n.width,t.width=r),i||(i=n.height,t.height=i)),{width:r,height:i}},t}(),Gl=function(){function t(t){this.globalRuntime=void 0,this.globalRuntime=t}var e=t.prototype;return e.isReadyToMeasure=function(t,e){var n=t.text,r=t.textAlign,i=t.textBaseline,a=t.fontSize,o=t.fontStyle,s=t.fontWeight,l=t.fontVariant,t=t.lineWidth;return n&&a&&o&&s&&l&&r&&i&&!_(t)},e.update=function(t,e){var n,r,i=t.text,a=t.textAlign,o=t.lineWidth,s=t.textBaseline,l=t.dx,c=t.dy,u=((null==e||null==(u=e.ownerDocument)||null==(u=u.defaultView)?void 0:u.getConfig())||{}).offscreenCanvas;return this.isReadyToMeasure(t,e)?(e=this.globalRuntime.textService.measureText(i,t,u),i=(t.metrics=e).width,u=e.height,n=e.lineHeight,e=e.fontProperties,i=[i/2,u/2,0],u=[0,1],r=0,"center"===a||"middle"===a?(r=o/2,u=[.5,1]):"right"!==a&&"end"!==a||(r=o,u=[1,1]),a=0,"middle"===s?a=i[1]:"top"===s||"hanging"===s?a=2*i[1]:"alphabetic"===s?a=A.enableCSSParsing?n-e.ascent:0:"bottom"!==s&&"ideographic"!==s||(a=0),l&&(r+=l),c&&(a+=c),t.anchor=[u[0],u[1],0],{width:2*i[0],height:2*i[1],offsetX:r,offsetY:a}):(t.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{width:0,height:0,x:0,y:0,offsetX:0,offsetY:0})},t}(),Wl=function(){function t(t,e){var c=this;this.globalRuntime=void 0,this.context=void 0,this.rootTarget=void 0,this.emitter=new jr,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.pickHandler=void 0,this.tmpMatrix=ht(),this.tmpVec3=y(),this.onPointerDown=function(t){var e,n=c.createPointerEvent(t);c.dispatchEvent(n,"pointerdown"),"touch"===n.pointerType?c.dispatchEvent(n,"touchstart"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(e=2===n.button,c.dispatchEvent(n,e?"rightdown":"mousedown")),c.trackingData(t.pointerId).pressTargetsByButton[t.button]=n.composedPath(),c.freeEvent(n)},this.onPointerUp=function(t){var e=performance.now(),n=c.createPointerEvent(t),r=(c.dispatchEvent(n,"pointerup"),"touch"===n.pointerType?c.dispatchEvent(n,"touchend"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(r=2===n.button,c.dispatchEvent(n,r?"rightup":"mouseup")),c.trackingData(t.pointerId)),i=c.findMountedTarget(r.pressTargetsByButton[t.button]),a=i;if(i&&!n.composedPath().includes(i)){for(var o,s=i;s&&!n.composedPath().includes(s);)n.currentTarget=s,c.notifyTarget(n,"pointerupoutside"),"touch"===n.pointerType?c.notifyTarget(n,"touchendoutside"):"mouse"!==n.pointerType&&"pen"!==n.pointerType||(o=2===n.button,c.notifyTarget(n,o?"rightupoutside":"mouseupoutside")),Bs.isNode(s)&&(s=s.parentNode);delete r.pressTargetsByButton[t.button],a=s}a&&((i=c.clonePointerEvent(n,"click")).target=a,i.path=[],r.clicksByButton[t.button]||(r.clicksByButton[t.button]={clickCount:0,target:i.target,timeStamp:e}),(a=r.clicksByButton[t.button]).target===i.target&&e-a.timeStamp<200?++a.clickCount:a.clickCount=1,a.target=i.target,a.timeStamp=e,i.detail=a.clickCount,null!=(r=n.detail)&&r.preventClick||(c.context.config.useNativeClickEvent||"mouse"!==i.pointerType&&"touch"!==i.pointerType||c.dispatchEvent(i,"click"),c.dispatchEvent(i,"pointertap")),c.freeEvent(i)),c.freeEvent(n)},this.onPointerMove=function(t){var e=c.createPointerEvent(t),n="mouse"===e.pointerType||"pen"===e.pointerType,r=c.trackingData(t.pointerId),i=c.findMountedTarget(r.overTargets);if(r.overTargets&&i!==e.target){var a="mousemove"===t.type?"mouseout":"pointerout",a=c.createPointerEvent(t,a,i||void 0);if(c.dispatchEvent(a,"pointerout"),n&&c.dispatchEvent(a,"mouseout"),!e.composedPath().includes(i)){var o=c.createPointerEvent(t,"pointerleave",i||void 0);for(o.eventPhase=o.AT_TARGET;o.target&&!e.composedPath().includes(o.target);)o.currentTarget=o.target,c.notifyTarget(o),n&&c.notifyTarget(o,"mouseleave"),Bs.isNode(o.target)&&(o.target=o.target.parentNode);c.freeEvent(o)}c.freeEvent(a)}if(i!==e.target){for(var a="mousemove"===t.type?"mouseover":"pointerover",t=c.clonePointerEvent(e,a),s=(c.dispatchEvent(t,"pointerover"),n&&c.dispatchEvent(t,"mouseover"),i&&Bs.isNode(i)&&i.parentNode);s&&s!==(Bs.isNode(c.rootTarget)&&c.rootTarget.parentNode)&&s!==e.target;)s=s.parentNode;if(!s||s===(Bs.isNode(c.rootTarget)&&c.rootTarget.parentNode)){var l=c.clonePointerEvent(e,"pointerenter");for(l.eventPhase=l.AT_TARGET;l.target&&l.target!==i&&l.target!==(Bs.isNode(c.rootTarget)&&c.rootTarget.parentNode);)l.currentTarget=l.target,c.notifyTarget(l),n&&c.notifyTarget(l,"mouseenter"),Bs.isNode(l.target)&&(l.target=l.target.parentNode);c.freeEvent(l)}c.freeEvent(t)}c.dispatchEvent(e,"pointermove"),"touch"===e.pointerType&&c.dispatchEvent(e,"touchmove"),n&&(c.dispatchEvent(e,"mousemove"),c.cursor=c.getCursor(e.target)),r.overTargets=e.composedPath(),c.freeEvent(e)},this.onPointerOut=function(t){var e=c.trackingData(t.pointerId);if(e.overTargets){var n="mouse"===t.pointerType||"pen"===t.pointerType,r=c.findMountedTarget(e.overTargets),i=c.createPointerEvent(t,"pointerout",r||void 0),a=(c.dispatchEvent(i),n&&c.dispatchEvent(i,"mouseout"),c.createPointerEvent(t,"pointerleave",r||void 0));for(a.eventPhase=a.AT_TARGET;a.target&&a.target!==(Bs.isNode(c.rootTarget)&&c.rootTarget.parentNode);)a.currentTarget=a.target,c.notifyTarget(a),n&&c.notifyTarget(a,"mouseleave"),Bs.isNode(a.target)&&(a.target=a.target.parentNode);e.overTargets=null,c.freeEvent(i),c.freeEvent(a)}c.cursor=null},this.onPointerOver=function(t){var e=c.trackingData(t.pointerId),t=c.createPointerEvent(t),n="mouse"===t.pointerType||"pen"===t.pointerType,r=(c.dispatchEvent(t,"pointerover"),n&&c.dispatchEvent(t,"mouseover"),"mouse"===t.pointerType&&(c.cursor=c.getCursor(t.target)),c.clonePointerEvent(t,"pointerenter"));for(r.eventPhase=r.AT_TARGET;r.target&&r.target!==(Bs.isNode(c.rootTarget)&&c.rootTarget.parentNode);)r.currentTarget=r.target,c.notifyTarget(r),n&&c.notifyTarget(r,"mouseenter"),Bs.isNode(r.target)&&(r.target=r.target.parentNode);e.overTargets=t.composedPath(),c.freeEvent(t),c.freeEvent(r)},this.onPointerUpOutside=function(t){var e=c.trackingData(t.pointerId),n=c.findMountedTarget(e.pressTargetsByButton[t.button]),r=c.createPointerEvent(t);if(n){for(var i=n;i;)r.currentTarget=i,c.notifyTarget(r,"pointerupoutside"),"touch"===r.pointerType||"mouse"!==r.pointerType&&"pen"!==r.pointerType||c.notifyTarget(r,2===r.button?"rightupoutside":"mouseupoutside"),Bs.isNode(i)&&(i=i.parentNode);delete e.pressTargetsByButton[t.button]}c.freeEvent(r)},this.onWheel=function(t){t=c.createWheelEvent(t);c.dispatchEvent(t),c.freeEvent(t)},this.onClick=function(t){c.context.config.useNativeClickEvent&&(t=c.createPointerEvent(t),c.dispatchEvent(t),c.freeEvent(t))},this.onPointerCancel=function(t){t=c.createPointerEvent(t);c.dispatchEvent(t),c.freeEvent(t)},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("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)},e.destroy=function(){this.emitter.removeAllListeners(),this.mappingTable={},this.mappingState={},this.eventPool.clear()},e.client2Viewport=function(t){var e=this.context.contextService.getBoundingClientRect();return new Ms(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 Ms(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=bt(this.tmpMatrix,n,a),a=Wt(this.tmpVec3,e/i*2-1,2*(1-t/r)-1,0);return Kt(a,a,n),new Ms(a[0],a[1])},e.canvas2Viewport=function(t){var e=this.rootTarget.defaultView.getCamera(),n=e.getPerspective(),e=e.getViewTransform(),n=bt(this.tmpMatrix,n,e),e=Wt(this.tmpVec3,t.x,t.y,0),t=(Kt(this.tmpVec3,this.tmpVec3,n),this.context.config),n=t.width,t=t.height;return new Ms((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++)Bs.isNode(t)&&t.parentNode&&(e.push(t.parentNode),t=t.parentNode);n&&e.push(n)}return e},e.hitTest=function(t){var e=t.viewportX,n=t.viewportY,r=this.context.config,i=r.width,r=r.height;return!(e<0||n<0||i<e||r<n)&&(this.pickHandler(t)||this.rootTarget)||null},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=Yr(t.nativeEvent.composedPath());!(n=e()).done;){var n=n.value,n=A.nativeHTMLMap.get(n);if(n)return n}return null},e.pickTarget=function(t){return this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})},e.createPointerEvent=function(t,e,n){var r=this.allocateEvent(qs),t=(this.copyPointerData(t,r),this.copyMouseData(t,r),this.copyData(t,r),r.nativeEvent=t.nativeEvent,r.originalEvent=t,this.getExistedHTML(r));return r.target=null!=n?n:t||this.isNativeEventFromCanvas(r)&&this.pickTarget(r),"string"==typeof e&&(r.type=e),r},e.createWheelEvent=function(t){var e=this.allocateEvent(Us),t=(this.copyWheelData(t,e),this.copyMouseData(t,e),this.copyData(t,e),e.nativeEvent=t.nativeEvent,e.originalEvent=t,this.getExistedHTML(e));return e.target=t||this.isNativeEventFromCanvas(e)&&this.pickTarget(e),e},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(Us);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(qs);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){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){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||Bs.isNode(r)&&r.parentNode===e))break;e=t[n]}return e},e.getCursor=function(t){for(var e=t;e;){var n=Ys.isElement(e)&&e.getAttribute("cursor");if(n)return n;e=Bs.isNode(e)&&e.parentNode}},t}(),Hl=function(){function t(){this.canvas=void 0,this.context=void 0}var e=t.prototype;return e.getOrCreateCanvas=function(t,e){if(!this.canvas){if(t)this.canvas=t,this.context=this.canvas.getContext("2d",e);else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",e),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",e)}this.canvas.width=10,this.canvas.height=10}return this.canvas},e.getOrCreateContext=function(t,e){return this.context||this.getOrCreateCanvas(t,e),this.context},t}(),Yl=((ql=Cl=Cl||{})[ql.CAMERA_CHANGED=0]="CAMERA_CHANGED",ql[ql.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",ql[ql.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 Rs(b.RENDER_ORDER_CHANGED),this.hooks={init:new Ha,dirtycheck:new $a(["object"]),cull:new $a(["object","camera"]),beginFrame:new Ua([]),beforeRender:new Ua(["objectToRender"]),render:new Ua(["objectToRender"]),afterRender:new Ua(["objectToRender"]),endFrame:new Ua([]),destroy:new Ua([]),pick:new Va(["result"]),pickSync:new $a(["result"]),pointerDown:new Ua(["event"]),pointerUp:new Ua(["event"]),pointerMove:new Ua(["event"]),pointerOut:new Ua(["event"]),pointerOver:new Ua(["event"]),pointerWheel:new Ua(["event"]),pointerCancel:new Ua(["event"]),click:new Ua(["event"])},this.globalRuntime=t,this.context=e}var e=t.prototype;return e.init=function(){var t=Br(Rr().mark(function t(){var e;return Rr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=f({},this.globalRuntime,this.context),this.context.renderingPlugins.forEach(function(t){t.apply(e,A)}),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(Cl.CAMERA_CHANGED)},e.render=function(t,e){var n=this,r=(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.context.renderingContext);this.globalRuntime.sceneGraphService.syncHierarchy(r.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),r.renderReasons.size&&this.inited&&(this.renderDisplayObject(r.root,t,r),this.hooks.beginFrame.call(),r.renderListCurrentFrame.forEach(function(t){n.hooks.beforeRender.call(t),n.hooks.render.call(t),n.hooks.afterRender.call(t)}),this.hooks.endFrame.call(),r.renderListCurrentFrame=[],r.renderReasons.clear(),e())},e.renderDisplayObject=function(t,e,n){var r=this,i=e.renderer.getConfig(),a=i.enableDirtyCheck,i=i.enableCulling,a=(this.globalRuntime.enableCSSParsing&&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(Mi),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(),this.globalRuntime.sceneGraphService.clearPendingEvents()},e.dirtify=function(){this.context.renderingContext.renderReasons.add(Cl.DISPLAY_OBJECT_CHANGED)},t}()),Vl=/\[\s*(.*)=(.*)\s*\]/,ql=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(Vl),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}();function Ul(t){t=t.renderable;t&&(t.renderBoundsDirty=!0,t.boundsDirty=!0)}var Xl,$l=new Ds(b.REPARENT,null,"","","",0,"",""),Kl=function(){function t(t){var o,i,a,r,s,l,c,u,h,n,f,d,g=this;this.runtime=void 0,this.pendingEvents=[],this.boundsChangedEvent=new Rs(b.BOUNDS_CHANGED),this.rotate=(o=re(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=zt(e,n,r));var i,a,n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(se(r=re(),e[0],e[1],e[2]),i=g.getRotation(t),a=g.getRotation(t.parentNode),ce(o,a),oe(o,o),ae(r,o,r),ae(n.localRotation,r,i),he(n.localRotation,n.localRotation),g.dirtifyLocal(t,n)):g.rotateLocal(t,e)}),this.rotateLocal=(i=re(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=zt(e,n,r));n=t.transformable;se(i,e[0],e[1],e[2]),ue(n.localRotation,n.localRotation,i),g.dirtifyLocal(t,n)}),this.setEulerAngles=(a=re(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=zt(e,n,r));n=t.transformable;null!==t.parentNode&&t.parentNode.transformable?(se(n.localRotation,e[0],e[1],e[2]),r=g.getRotation(t.parentNode),ce(a,oe(re(),r)),ue(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=zt(e,n,r));var i,a,o,s,l,c,u,h,f,d,p,n=t.transformable;Qt(e,y())||(i=r=e,a=n.localRotation,o=a[0],s=a[1],l=a[2],a=a[3],c=i[0],u=i[1],i=i[2],p=s*(d=o*u-s*c)-l*(f=l*c-o*i),l=l*(h=s*i-l*u)-o*d,o=o*f-s*h,f*=s=2*a,d*=s,l*=2,o*=2,r[0]=c+(h*=s)+(p*=2),r[1]=u+f+l,r[2]=i+d+o,Ht(n.localPosition,n.localPosition,e),g.dirtifyLocal(t,n))},this.setPosition=(r=ht(),s=y(),function(t,e){var n=t.transformable;s[0]=e[0],s[1]=e[1],s[2]=e[2]||0,Qt(g.getPosition(t),s)||(Gt(n.position,s),null!==t.parentNode&&t.parentNode.transformable?(e=t.parentNode.transformable,dt(r,e.worldTransform),yt(r,r),Kt(n.localPosition,s,r)):Gt(n.localPosition,s),g.dirtifyLocal(t,n))}),this.setLocalPosition=(l=y(),function(t,e){var n=t.transformable;l[0]=e[0],l[1]=e[1],l[2]=e[2]||0,Qt(n.localPosition,l)||(Gt(n.localPosition,l),g.dirtifyLocal(t,n))}),this.translate=(c=y(),u=y(),h=y(),function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),Qt(e="number"==typeof e?Wt(u,e,n,r):e,c)||(Ht(h,g.getPosition(t),e),g.setPosition(t,h))}),this.setRotation=function(){var o=re();return function(t,e,n,r,i){var a=t.transformable;"number"==typeof e&&(e=le(e,n,r,i)),null!==t.parentNode&&t.parentNode.transformable?(n=g.getRotation(t.parentNode),ce(o,n),oe(o,o),ae(a.localRotation,o,e),he(a.localRotation,a.localRotation),g.dirtifyLocal(t,a)):g.setLocalRotation(t,e)}},this.displayObjectDependencyMap=new WeakMap,this.calcLocalTransform=(n=ht(),f=y(),d=le(0,0,0,1),function(t){var e;0!==t.localSkew[0]||0!==t.localSkew[1]?(Tt(t.localTransform,t.localRotation,t.localPosition,zt(1,1,1),t.origin),0===t.localSkew[0]&&0===t.localSkew[1]||((e=gt(n))[4]=Math.tan(t.localSkew[0]),e[1]=Math.tan(t.localSkew[1]),bt(t.localTransform,t.localTransform,e)),e=Tt(n,d,f,t.localScale,t.origin),bt(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){var r=!1,n=(t.parentNode&&(r=t.parentNode!==e,this.detach(t)),t.parentNode=e,_(n)?t.parentNode.childNodes.push(t):t.parentNode.childNodes.splice(n,0,t),e.sortable),e=((null!=n&&null!=(e=n.sorted)&&e.length||null!=(e=t.style)&&e.zIndex)&&(n.dirty=!0),t.transformable);e&&this.dirtifyWorld(t,e),e.frozen&&this.unfreezeParentToRoot(t),r&&t.dispatchEvent($l)},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);var i=t.transformable;(e="number"==typeof e?[e,n,r]:e)[0]===i.origin[0]&&e[1]===i.origin[1]&&e[2]===i.origin[2]||((n=i.origin)[0]=e[0],n[1]=e[1],n[2]=e[2]||0,this.dirtifyLocal(t,i))},e.setLocalEulerAngles=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),"number"==typeof e&&(e=zt(e,n,r));n=t.transformable;se(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=zt(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=zt(e[0],e[1],e[2]||n.localScale[2]);Qt(e,n.localScale)||(Gt(n.localScale,e),this.dirtifyLocal(t,n))},e.setLocalRotation=function(t,e,n,r,i){"number"==typeof e&&(e=le(e,n,r,i));n=t.transformable;ce(n.localRotation,e),this.dirtifyLocal(t,n)},e.setLocalSkew=function(t,e,n){"number"==typeof e&&(i=e,n=n,(r=new Q(2))[0]=i,r[1]=n,e=r);var r,i=t.transformable;n=i.localSkew,r=e,n[0]=r[0],n[1]=r[1],this.dirtifyLocal(t,i)},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).isMutationObserved?t.dispatchEvent(n.boundsChangedEvent):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.clearPendingEvents(),i.clear()},e.clearPendingEvents=function(){this.pendingEvents=[]},e.dirtifyToRoot=function(t,e){void 0===e&&(e=!1);var n=t;for(n.renderable&&(n.renderable.dirty=!0);n;)Ul(n),n=n.parentNode;e&&t.forEach(function(t){Ul(t)}),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,!0),t.dispatchEvent(new Ds(b.ATTR_MODIFIED,t,n,n,e,Ds.MODIFICATION,n,n)),t.isCustomElement&&t.isConnected&&t.attributeChangedCallback&&t.attributeChangedCallback(e,n,n)})})},e.getPosition=function(t){var e=t.transformable;return _t(e.position,this.getWorldTransform(t,e))},e.getRotation=function(t){var e=t.transformable;return Pt(e.rotation,this.getWorldTransform(t,e))},e.getScale=function(t){var e=t.transformable;return At(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=_t(y(),e),r=Pt(re(),e),e=At(y(),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 xs.isEmpty(e)?null:((n=n||new xs).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 xs},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 xs).update(t.center,t.halfExtents))}),e&&(t=Ei(t))&&(t=t.parsedStyle.clipPath.getBounds(e),r?t&&(r=t.intersection(r)):r=t),(r=r||new xs)&&(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=ht(),r=(t.parentNode.transformable&&(n=yt(ht(),this.getWorldTransform(t.parentNode))),this.getBounds(t));if(!xs.isEmpty(r))return(e=new xs).setFromTransformedAABB(r,n),e}return this.getBounds(t)},e.getBoundingClientRect=function(t){var e,n,r,i=this.getGeometryBounds(t),i=(xs.isEmpty(i)||(r=new xs).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 Es(e+((null==i?void 0:i.left)||0),t+((null==i?void 0:i.top)||0),n-e,r-t)):new Es((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?bt(e.worldTransform,n.worldTransform,e.localTransform):dt(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}(),Zl={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]},Ql=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Jl=new RegExp(/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/.source+"|"+/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/.source+"|"+/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/.source+"|"+/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/.source),tc=new RegExp(/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/.source+"|"+/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/.source+"|"+/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/.source+"|"+/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/.source),ec=function(){function t(t){var n=this;this.runtime=void 0,this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(t,e){return!n.isBreakingSpace(e)&&!(!t||!tc.exec(e)&&!Jl.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,Zl.MetricsString+Zl.BaselineSymbol),a=Math.ceil(e.measureText(i).width),o=Math.ceil(e.measureText(Zl.BaselineSymbol).width),s=Zl.HeightMultiplier*o,o=o*Zl.BaselineMultiplier|0,l=(r.width=a,r.height=s,e.fillStyle="#f00",e.fillRect(0,0,a,s),e.font=t,e.textBaseline="alphabetic",e.fillStyle="#000",e.fillText(i,0,o),e.getImageData(0,0,a||1,s||1).data),r=l.length,c=4*a,u=0,h=0,f=!1,u=0;u<o;++u){for(var d=0;d<c;d+=4)if(255!==l[h+d]){f=!0;break}if(f)break;h+=c}for(n.ascent=o-u,h=r-c,f=!1,u=s;o<u;--u){for(var p=0;p<c;p+=4)if(255!==l[h+p]){f=!0;break}if(f)break;h-=c}return n.descent=u-o,n.fontSize=n.ascent+n.descent,this.fontMetricsCache[t]=n},e.measureText=function(t,e,n){var r=e.fontSize,i=e.wordWrap,a=e.lineHeight,o=e.lineWidth,s=e.textBaseline,l=e.textAlign,c=e.letterSpacing,u=e.textPath,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=sn(e)&&e+"px"||"16px",a=n.split(","),o=a.length-1;0<=o;o--){var s=a[o].trim();!Za.test(s)&&Ka.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)/),m=new Array(g.length),y=0;if(!u){for(var v=0;v<g.length;v++){var b=p.measureText(g[v]).width+(g[v].length-1)*c;m[v]=b,y=Math.max(y,b)}var r=y+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:m,lineHeight:x+=h,maxLineWidth:y,fontProperties:d,lineMetrics:m.map(function(t,e){var n=0;return"center"===l||"middle"===l?n-=t/2:"right"!==l&&"end"!==l||(n-=t),new Es(n-o/2,w+e*x,t+o,x)})}}u.getTotalLength();for(var k=0;k<g.length;k++)p.measureText(g[k]).width,g[k].length},e.setGraphemeOnPath=function(){},e.wordWrap=function(t,e,n){for(var r=this,i=e.wordWrapWidth,i=void 0===i?0:i,a=e.letterSpacing,o=e.maxLines,s=void 0===o?1/0:o,o=e.textOverflow,l=this.runtime.offscreenCanvas.getOrCreateContext(n),c=i+a,u="",h=("ellipsis"===o?u="...":o&&"clip"!==o&&(u=o),[]),f=0,d=0,p={},g=function(t){return r.getFromCache(t,a,p,l)},m=Array.from(u).reduce(function(t,e){return t+g(e)},0),y=Array.from(t),v=0;v<y.length;v++){var b=y[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&&c<d+k){if(s<=f+1){if(e.isOverflowing=!0,0<m&&m<=c){for(var M=h[f].length,E=0,O=M,S=0;S<M;S++){var _=g(h[f][S]);if(c<E+_+m){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<=Zl.BreakingSpaces.indexOf(t.charCodeAt(0))},e.isNewline=function(t){return"string"==typeof t&&0<=Zl.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||!Ql.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(!Ql.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}(),A={},Il=(zl=new zl,Dl=new Dl,(Gb={})[k.CIRCLE]=new Il,Gb[k.ELLIPSE]=new Bl,Gb[k.RECT]=zl,Gb[k.IMAGE]=zl,Gb[k.GROUP]=zl,Gb[k.LINE]=new Fl,Gb[k.TEXT]=new Gl(A),Gb[k.POLYLINE]=Dl,Gb[k.POLYGON]=Dl,Gb[k.PATH]=new s,Gb[k.HTML]=null,Gb[k.MESH]=null,Gb),Gl=(Bl=new e,zl=new o,(Fl={})[i.PERCENTAGE]=null,Fl[i.NUMBER]=new ys,Fl[i.ANGLE]=new n,Fl[i.DEFINED_PATH]=new r,Fl[i.PAINT]=Bl,Fl[i.COLOR]=Bl,Fl[i.FILTER]=new cs,Fl[i.LENGTH]=zl,Fl[i.LENGTH_PERCENTAGE]=zl,Fl[i.LENGTH_PERCENTAGE_12]=new ds,Fl[i.LENGTH_PERCENTAGE_14]=new ps,Fl[i.COORDINATE]=new gs,Fl[i.OFFSET_DISTANCE]=new vs,Fl[i.OPACITY_VALUE]=new bs,Fl[i.PATH]=new Os,Fl[i.LIST_OF_POINTS]=new Ss,Fl[i.SHADOW_BLUR]=new _s,Fl[i.TEXT]=new As,Fl[i.TEXT_TRANSFORM]=new Ps,Fl[i.TRANSFORM]=new Ts,Fl[i.TRANSFORM_ORIGIN]=new hs,Fl[i.Z_INDEX]=new Ls,Fl[i.MARKER]=new ms,Fl),Dl=(A.CameraContribution=Rl,A.AnimationTimeline=null,A.EasingFunction=null,A.offscreenCanvas=new Hl,A.nativeHTMLMap=new WeakMap,A.sceneGraphSelector=new ql,A.sceneGraphService=new Kl(A),A.textService=new ec(A),A.geometryUpdaterFactory=Il,A.CSSPropertySyntaxFactory=Gl,A.styleValueRegistry=new Vs,A.layoutRegistry=null,A.globalThis=function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==S)return S;throw new Error("Unable to locate global `this`")}(),A.enableCSSParsing=!0,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}()),s=function(){function t(t){this.plugins=[],this.config=void 0,this.config=f({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}(),nc=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 Rs(b.CULLED)),null))}),e.hooks.afterRender.tap(a.tag,function(t){t.cullable.visibilityPlaneMask=-1})},a}(),rc=(nc.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}()),ic=(rc.tag="DirtyCheck",function(){function e(){var a=this;this.autoPreventDefault=!1,this.rootPointerEvent=new qs(null),this.rootWheelEvent=new Us(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=Yr(a.normalizeToPointerEvent(t,n));!(i=r()).done;){var i=i.value,i=a.bootstrapEvent(a.rootPointerEvent,i,n,t);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(t){return a.context.renderingService.hooks.pickSync.call({position:t,picked:[],topmost:!0}).picked[0]||null}),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=Yr(e);!(r=n()).done;){var r=r.value,r=a.bootstrapEvent(a.rootPointerEvent,r,o,t);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=Yr(a.normalizeToPointerEvent(t,o));!(i=r()).done;){var i=i.value,i=a.bootstrapEvent(a.rootPointerEvent,i,o,t);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.hooks.click.tap(e.tag,this.onPointerMove),t.hooks.pointerCancel.tap(e.tag,function(t){for(var e=Yr(a.normalizeToPointerEvent(t,o));!(n=e()).done;){var n=n.value,n=a.bootstrapEvent(a.rootPointerEvent,n,o,t);a.context.eventService.mapEvent(n)}a.setCursor(a.context.eventService.cursor)})},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 Ms(i,t))).x,i.y):(e=n,r),{x:e,y:t}},t.bootstrapEvent=function(t,e,n,r){t.view=n,t.originalEvent=null,t.nativeEvent=r,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);n=this.getViewportXY(e),e=n.x,n=n.y,t.viewport.x=e,t.viewport.y=n,e=this.context.eventService.viewport2Canvas(t.viewport),n=e.x,e=e.y;return t.canvas.x=n,t.canvas.y=e,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=r.isTrusted,"pointerleave"===t.type&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=Ai[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];dn(i.button)&&(i.button=0),dn(i.buttons)&&(i.buttons=1),dn(i.isPrimary)&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),dn(i.width)&&(i.width=i.radiusX||1),dn(i.height)&&(i.height=i.radiusY||1),dn(i.tiltX)&&(i.tiltX=0),dn(i.tiltY)&&(i.tiltY=0),dn(i.pointerType)&&(i.pointerType="touch"),dn(i.pointerId)&&(i.pointerId=i.identifier||0),dn(i.pressure)&&(i.pressure=i.force||.5),dn(i.twist)&&(i.twist=0),dn(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,i.type=t.type,n.push(i)}else e.isMouseEvent(t)?(dn((e=t).isPrimary)&&(e.isPrimary=!0),dn(e.width)&&(e.width=1),dn(e.height)&&(e.height=1),dn(e.tiltX)&&(e.tiltX=0),dn(e.tiltY)&&(e.tiltY=0),dn(e.pointerType)&&(e.pointerType="mouse"),dn(e.pointerId)&&(e.pointerId=1),dn(e.pressure)&&(e.pressure=.5),dn(e.twist)&&(e.twist=0),dn(e.tangentialPressure)&&(e.tangentialPressure=0),e.isNormalized=!0,n.push(e)):n.push(t);return n},e}()),ac=(ic.tag="Event",[k.CIRCLE,k.ELLIPSE,k.IMAGE,k.RECT,k.LINE,k.POLYLINE,k.POLYGON,k.TEXT,k.PATH,k.HTML]),oc=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(),!xs.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||fs.INDETERMINATE,t.planes),i.visible=i.visibilityPlaneMask!==fs.OUTSIDE,i.visible))},e.computeVisibilityWithPlaneMask=function(t,e,n,r){if(n===fs.OUTSIDE||n===fs.INSIDE)return n;for(var i=fs.INSIDE,a=-1<ac.indexOf(t.nodeName),o=0,s=r.length;o<s;++o){var l=1<<o;if(0!=(n&l)&&(!a||4!==o&&5!==o)){var c=r[o],u=c.normal,c=c.distance;if(Ut(u,e.getPositiveFarPoint(r[o]))+c<0)return fs.OUTSIDE;Ut(u,e.getNegativeFarPoint(r[o]))+c<0&&(i|=l)}}return i},t}(),sc=function(){function c(){this.rBush=void 0,this.toSync=new Set}var t=c.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,A.enableCSSParsing&&A.styleValueRegistry.recalc(t),A.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),A.sceneGraphService.dirtifyToRoot(t),o.dirtify()}var a=this,o=t.renderingService,s=t.renderingContext,t=t.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=t;o.hooks.init.tapPromise(c.tag,Br(Rr().mark(function t(){return Rr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:l.addEventListener(b.MOUNTED,r),l.addEventListener(b.UNMOUNTED,i),l.addEventListener(b.ATTR_MODIFIED,e),l.addEventListener(b.BOUNDS_CHANGED,n);case 4:case"end":return t.stop()}},t)}))),o.hooks.destroy.tap(c.tag,function(){l.removeEventListener(b.MOUNTED,r),l.removeEventListener(b.UNMOUNTED,i),l.removeEventListener(b.ATTR_MODIFIED,e),l.removeEventListener(b.BOUNDS_CHANGED,n),a.toSync.clear()}),o.hooks.endFrame.tap(c.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.displayObject=t,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()},c}(),lc=(sc.tag="Prepare",(Gb=Xl=Xl||{}).READY="ready",Gb.BEFORE_RENDER="beforerender",Gb.RERENDER="rerender",Gb.AFTER_RENDER="afterrender",Gb.BEFORE_DESTROY="beforedestroy",Gb.AFTER_DESTROY="afterdestroy",Gb.RESIZE="resize",Gb.DIRTY_RECTANGLE="dirtyrectangle",new Rs(b.MOUNTED)),cc=new Rs(b.UNMOUNTED),uc=new Rs(Xl.BEFORE_RENDER),hc=new Rs(Xl.RERENDER),fc=new Rs(Xl.AFTER_RENDER),dc=function(M){function t(t){var e=M.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=rl,e.frameId=void 0,e.inited=!1,e.readyPromise=void 0,e.resolveReadyPromise=void 0,e.context={},e.document=new Fs,e.document.defaultView=Wr(e),e.customElements=new Ns,t.container),r=t.canvas,i=t.offscreenCanvas,a=t.width,o=t.height,s=t.devicePixelRatio,l=t.renderer,c=t.background,u=t.cursor,h=t.document,f=t.requestAnimationFrame,d=t.cancelAnimationFrame,p=t.createImage,g=t.supportsPointerEvents,m=t.supportsTouchEvents,y=t.supportsCSSTransform,v=t.useNativeClickEvent,b=t.isTouchEvent,t=t.isMouseEvent,x=(x=n,w=Wr(e),x&&(x="string"==typeof x?x:x.id||wi++,xi[x]&&xi[x].destroy(),xi[x]=w),a),w=o,k=s;return r&&(k=1<=(k=s||ki&&window.devicePixelRatio||1)?Math.ceil(k):1,x=a||("auto"===(a=Oi(s=r,"width"))?s.offsetWidth:parseFloat(a))||r.width/k,w=o||("auto"===(a=Oi(s=r,"height"))?s.offsetHeight:parseFloat(a))||r.height/k),e.devicePixelRatio=k,e.requestAnimationFrame=null!=f?f:lo.bind(A.globalThis),e.cancelAnimationFrame=null!=d?d:co.bind(A.globalThis),e.supportsTouchEvents=null!=m?m:"ontouchstart"in A.globalThis,e.supportsPointerEvents=null!=g?g:!!A.globalThis.PointerEvent,e.isTouchEvent=null!=b?b:function(t){return e.supportsTouchEvents&&t instanceof A.globalThis.TouchEvent},e.isMouseEvent=null!=t?t:function(t){return!A.globalThis.MouseEvent||t instanceof A.globalThis.MouseEvent&&(!e.supportsPointerEvents||!(t instanceof A.globalThis.PointerEvent))},e.initRenderingContext({container:n,canvas:r,width:x,height:w,renderer:l,offscreenCanvas:i,devicePixelRatio:k,cursor:u||"default",background:c||"transparent",createImage:p,document:h,supportsCSSTransform:y,useNativeClickEvent:v}),e.initDefaultCamera(x,w),Br(Rr().mark(function t(){return Rr().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.initRenderer(l);case 2:e.dispatchEvent(new Rs(Xl.READY)),e.readyPromise&&e.resolveReadyPromise();case 4:case"end":return t.stop()}},t)}))(),e}a(t,M);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 A.CameraContribution;r.setType($s.EXPLORING,Ks.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(jl,function(){n.context.renderingContext.renderReasons.add(Cl.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 Rs(Xl.BEFORE_DESTROY)),this.frameId&&(this.getConfig().cancelAnimationFrame||cancelAnimationFrame)(this.frameId);var n=this.getRoot();this.unmountChildren(n),t&&(this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),t&&this.context.rBushRoot&&(this.context.rBushRoot.clear(),this.context.rBushRoot=null,this.context.renderingContext.root=null),e||this.dispatchEvent(new Rs(Xl.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===Zs.ORTHOGRAPHIC?n.setOrthographic(t/-2,t/2,e/2,e/-2,n.getNear(),n.getFar()):n.setAspect(t/e),this.dispatchEvent(new Rs(Xl.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(){var t=this;this.dispatchEvent(uc),this.getRenderingService().render(this.getConfig(),function(){t.dispatchEvent(hc)}),this.dispatchEvent(fc)},e.run=function(){var e=this;(function t(){e.render(),e.frameId=requestAnimationFrame(t)})()},e.initRenderer=function(){var e=Br(Rr().mark(function t(e){return Rr().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 K,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new ic,new sc,new rc,new nc([new oc])),this.loadRendererContainerModule(e),this.context.contextService=new this.context.ContextService(f({},A,this.context)),this.context.renderingService=new Yl(A,this.context),this.context.eventService=new Wl(A,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(A)})},e.setRenderer=function(){var e=Br(Rr().mark(function t(e){var n,r;return Rr().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(A)}),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(cc):(cc.target=t,this.dispatchEvent(cc,!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(lc):(lc.target=t,this.dispatchEvent(lc,!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})},Dr(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}(Is);function pc(t,e){return(pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}e=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),pc(n.prototype.constructor=n,t);var n=e.prototype;return n.rotate=function(t,e,n){if(this.relElevation=Ci(e),this.relAzimuth=Ci(t),this.relRoll=Ci(n),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===$s.EXPLORING){e=ie(re(),[1,0,0],Ri((this.rotateWorld?1:-1)*this.relElevation)),t=ie(re(),[0,1,0],Ri((this.rotateWorld?1:-1)*this.relAzimuth)),n=ie(re(),[0,0,1],Ri(this.relRoll)),t=ae(re(),t,e),t=ae(re(),t,n),e=Lt(ht(),t);xt(this.matrix,this.matrix,[0,0,-this.distance]),bt(this.matrix,this.matrix,e),xt(this.matrix,this.matrix,[0,0,this.distance])}else{if(90<Math.abs(this.elevation))return this;this.computeMatrix()}return this._getAxes(),this.type===$s.ORBITING||this.type===$s.EXPLORING?this._getPosition():this.type===$s.TRACKING&&this._getFocalPoint(),this._update(),this},n.pan=function(t,e){t=ji(t,e,0),e=Ft(this.position);return Ht(e,e,Vt(y(),this.right,t[0])),Ht(e,e,Vt(y(),this.up,t[1])),this._setPosition(e),this.triggerUpdate(),this},n.dolly=function(t){var e=this.forward,n=Ft(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===$s.ORBITING||this.type===$s.EXPLORING?this._getDistance():this.type===$s.TRACKING&&Ht(this.focalPoint,n,this.distanceVector),this.triggerUpdate(),this},n.cancelLandmarkAnimation=function(){void 0!==this.landmarkAnimationID&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)},n.createLandmark=function(t,e){var n,e=e=void 0===e?{}:e,r=e.position,r=void 0===r?this.position:r,i=e.focalPoint,i=void 0===i?this.focalPoint:i,a=e.roll,e=e.zoom,o=new A.CameraContribution,r=(o.setType(this.type,void 0),o.setPosition(r[0],null!=(n=r[1])?n:this.position[1],null!=(n=r[2])?n:this.position[2]),o.setFocalPoint(i[0],null!=(r=i[1])?r:this.focalPoint[1],null!=(n=i[2])?n:this.focalPoint[2]),o.setRoll(null!=a?a:this.roll),o.setZoom(null!=e?e:this.zoom),{name:t,matrix:ft(o.getWorldTransform()),right:Ft(o.right),up:Ft(o.up),forward:Ft(o.forward),position:Ft(o.getPosition()),focalPoint:Ft(o.getFocalPoint()),distanceVector:Ft(o.getDistanceVector()),distance:o.getDistance(),dollyingStep:o.getDollyingStep(),azimuth:o.getAzimuth(),elevation:o.getElevation(),roll:o.getRoll(),relAzimuth:o.relAzimuth,relElevation:o.relElevation,relRoll:o.relRoll,zoom:o.getZoom()});return this.landmarks.push(r),r},n.gotoLandmark=function(e,t){var n,s,r,i,l,c,u,h,f,d,p,g,m=this,a=(void 0===t&&(t={}),an(e)?this.landmarks.find(function(t){return t.name===e}):e);a&&(n=void 0===(n=(t=sn(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,l=.01,0===s?(this.syncFromLandmark(a),i&&i()):(this.cancelLandmarkAnimation(),c=a.position,u=a.focalPoint,h=a.zoom,f=a.roll,d=r||A.EasingFunction(n),g=function(){m.setFocalPoint(u),m.setPosition(c),m.setRoll(f),m.setZoom(h),m.computeMatrix(),m.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=y(),i=y(),a=1,o=0,$t(r,m.focalPoint,u,n),$t(i,m.position,c,n),o=m.roll*(1-n)+f*n,a=m.zoom*(1-n)+h*n,m.setFocalPoint(r),m.setPosition(i),m.setRoll(o),m.setZoom(a),Jt(r,u)+Jt(i,c)<=l)?g():(m.computeMatrix(),m.triggerUpdate(),e<s&&(m.landmarkAnimationID=m.canvas.requestAnimationFrame(t)))})))},n.syncFromLandmark=function(t){this.matrix=dt(this.matrix,t.matrix),this.right=Gt(this.right,t.right),this.up=Gt(this.up,t.up),this.forward=Gt(this.forward,t.forward),this.position=Gt(this.position,t.position),this.focalPoint=Gt(this.focalPoint,t.focalPoint),this.distanceVector=Gt(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}(Rl);function gc(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 mc(t,e,n){e&&gc(t.prototype,e),n&&gc(t,n),Object.defineProperty(t,"prototype",{writable:!1})}function yc(t,e){return(yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}A.CameraContribution=e;function vc(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(Wc?Float32Array:Array)(11),t=0;t<11;++t)w[t]=qc(.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=Uc(r,b,x);if(.001<=i){for(var a=t,o=r,s=b,l=x,c=0;c<Dc;++c){var u=Uc(o,s,l);if(0===u)return o;o-=(qc(o,s,l)-a)/u}return o}if(0===i)return r;for(var h,f,d=t,p=e,g=e+.1,m=b,y=x,v=0;0<(h=qc(f=p+(g-p)/2,m,y)-d)?g=f:p=f,Math.abs(h)>zc&&++v<Gc;);return f}return function(t){return 0===t||1===t?t:qc(r(t),e,n)}}function bc(t){return Math.pow(t,2)}function xc(t){return Math.pow(t,3)}function wc(t){return Math.pow(t,4)}function kc(t){return Math.pow(t,5)}function Mc(t){return Math.pow(t,6)}function Ec(t){return 1-Math.cos(t*Math.PI/2)}function Oc(t){return 1-Math.sqrt(1-t*t)}function Sc(t){return t*t*(3*t-2)}function _c(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 Ac(t,e){var n=(e=e=void 0===e?[]:e)[0],e=void 0===(e=e[1])?.5:e,n=on(Number(void 0===n?1:n),1,10),e=on(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 Pc(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=on(void 0===r?1:r,.1,1e3),i=on(i,.1,1e3),a=on(a,.1,1e3),e=on(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 Tc(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)(on(t,0,1)*n)/n}function Lc(t,e){var n=(e=e=void 0===e?[]:e)[0],r=e[1],i=e[2],e=e[3];return vc(n,r,i,e)(t)}function Nc(r){return function(t,e,n){return 1-r(1-t,e=void 0===e?[]:e,n)}}function Cc(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 jc(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 Rc(t){return t}var Ic=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),yc(t.prototype.constructor=t,e),n}(js),Bc=0,Fc=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=""+Bc++,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(Si)},e.addEventListener=function(t,e,n){throw new Error(Si)},e.removeEventListener=function(t,e,n){throw new Error(Si)},e.dispatchEvent=function(t){throw new Error(Si)},e.commitStyles=function(){throw new Error(Si)},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 Ic(null,this,this.currentTime,t),setTimeout(function(){n.onfinish&&n.onfinish(e)})),this._finishedFlag=!0):(this.onframe&&"running"===this.playState&&(t=new Ic(null,this,this.currentTime,t),this.onframe(t)),this._finishedFlag=!1)},mc(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}(),Dc=4,zc=1e-7,Gc=10,Wc="function"==typeof Float32Array,Hc=function(t,e){return 1-3*e+3*t},Yc=function(t,e){return 3*e-6*t},Vc=function(t){return 3*t},qc=function(t,e,n){return((Hc(e,n)*t+Yc(e,n))*t+Vc(e))*t},Uc=function(t,e,n){return 3*Hc(e,n)*t*t+2*Yc(e,n)*t+Vc(e)},o=vc(.42,0,1,1),Xc={steps:Tc,"step-start":function(t){return Tc(t,[1,"start"])},"step-end":function(t){return Tc(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":Lc,ease:function(t){return Lc(t,[.25,.1,.25,1])},in:o,out:Nc(o),"in-out":Cc(o),"out-in":jc(o),"in-quad":bc,"out-quad":Nc(bc),"in-out-quad":Cc(bc),"out-in-quad":jc(bc),"in-cubic":xc,"out-cubic":Nc(xc),"in-out-cubic":Cc(xc),"out-in-cubic":jc(xc),"in-quart":wc,"out-quart":Nc(wc),"in-out-quart":Cc(wc),"out-in-quart":jc(wc),"in-quint":kc,"out-quint":Nc(kc),"in-out-quint":Cc(kc),"out-in-quint":jc(kc),"in-expo":Mc,"out-expo":Nc(Mc),"in-out-expo":Cc(Mc),"out-in-expo":jc(Mc),"in-sine":Ec,"out-sine":Nc(Ec),"in-out-sine":Cc(Ec),"out-in-sine":jc(Ec),"in-circ":Oc,"out-circ":Nc(Oc),"in-out-circ":Cc(Oc),"out-in-circ":jc(Oc),"in-back":Sc,"out-back":Nc(Sc),"in-out-back":Cc(Sc),"out-in-back":jc(Sc),"in-bounce":_c,"out-bounce":Nc(_c),"in-out-bounce":Cc(_c),"out-in-bounce":jc(_c),"in-elastic":Ac,"out-elastic":Nc(Ac),"in-out-elastic":Cc(Ac),"out-in-elastic":jc(Ac),spring:Pc,"spring-in":Pc,"spring-out":Nc(Pc),"spring-in-out":Cc(Pc),"spring-out-in":jc(Pc)},$c=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 Kc(n,r){return function(t){var e;return 1<=t?1:(t+=r*(e=1/n))-t%e}}var ys="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",Zc=new RegExp("cubic-bezier\\("+ys+","+ys+","+ys+","+ys+"\\)"),Qc=/steps\(\s*(\d+)\s*\)/,Jc=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function tu(t){var e=Zc.exec(t);return e?vc.apply(void 0,e.slice(1).map(Number)):(e=Qc.exec(t))?Kc(Number(e[1]),0):(e=Jc.exec(t))?Kc(Number(e[1]),{start:1,middle:.5,end:0}[e[2]]):Xc[$c(t)]||Xc.linear}function eu(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 nu=0,ru=1,iu=2,au=3;function ou(t,e,n){c=t,i=n;var r,i,a,o,s,l=null===(l=e)?nu:(r=i.endTime,l<Math.min(i.delay,r)?ru:l>=Math.min(i.delay+c+i.endDelay,r)?iu:au),c=function(t,e,n,r,i){switch(r){case ru:return"backwards"===e||"both"===e?0:null;case au:return n-i;case iu:return"forwards"===e||"both"===e?t:null;case nu:return null}}(t,n.fill,e,l,n.delay);return null===c?null:(i="auto"===n.duration?0:n.duration,r=i,t=l,e=n.iterations,o=c,s=n.iterationStart,0===r?t!==ru&&(s+=e):s+=o/r,e=t=s,o=n.iterationStart,s=l,a=n.iterations,c=c,i=i,e=o=0!==(o=e===1/0?o%1:e%1)||s!==iu||0===a||0===c&&0!==i?o:1,s=n.iterations,a=e,c=t,i=l===iu&&s===1/0?1/0:1===a?Math.floor(c)-1:Math.floor(c),o=n.direction,t=i,l=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)?l:1-l,n.currentIteration=i,n.progress=a,n.easingFunction(a))}function su(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;lu(i)&&(a={offset:t[r].offset,computedOffset:t[r].computedOffset,easing:t[r].easing,easingFunction:tu(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,l=i[o].computedOffset,c=i[s].computedOffset,u=l,h=c;0===a&&(u=-1/0,0===c)&&(s=o),a===i.length-2&&(h=1/0,1===l)&&(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=Ll[t];if(i&&i.syntax&&i.int){i=A.styleValueRegistry.getPropertySyntax(i.syntax);if(i){o=A.enableCSSParsing?(a=A.styleValueRegistry.parseProperty(t,e,r),o=A.styleValueRegistry.parseProperty(t,n,r),a=A.styleValueRegistry.computeProperty(t,a,r),A.styleValueRegistry.computeProperty(t,o,r)):(t=i.parserWithCSSDisabled,a=t?t(e,r):e,t?t(n,r):n);var a,o,s,t=i.mixer(a,o,r);if(t)return s=cu.apply(void 0,t),function(t){return 0===t?e:1===t?n:s(t)}}}return cu(!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.setAttribute(t.property,t.interpolation(e))});else for(var t in a)lu(t)&&r.setAttribute(t,null)}}function lu(t){return"offset"!==t&&"easing"!==t&&"composite"!==t&&"computedOffset"!==t}var cu=function(e,n,r){return function(t){t=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)){for(var i=e.length,a=n.length,o=Math.max(i,a),s=[],l=0;l<o;l++)s.push(t(e[l<i?l:i-1],n[l<a?l:a-1],r));return s}throw new Error("Mismatched interpolation arguments "+e+":"+n)}(e,n,t);return!A.enableCSSParsing&&sn(t)?t:r(t)}};var uu=function(){function t(){this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Rc,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 mc(t,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=tu(t),this._easing=t}}]),t}();function hu(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,l=(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),c=Number(e[0].computedOffset),u=1;u<s;u++){var h=e[u].computedOffset;if(!_(h)&&!_(c)){for(var f=1;f<u-l;f++)e[l+f].computedOffset=c+(Number(h)-c)*f/(u-l);l=u,c=Number(h)}}return e}var fu="backwards|forwards|both|none".split("|"),du="reverse|alternate|alternate-reverse".split("|");function pu(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 uu,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===fu.indexOf(n[t])||"direction"===t&&-1===du.indexOf(n[t])||(i[t]=n[t])}):i.duration=n,i}var gu=function(){function t(t,e,n){var r=this,t=(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=pu(n,!1),(this.timing.effect=this).timing.activeDuration=eu(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=hu(e,this.timing),this.interpolations=su(this.normalizedKeyframes,this.timing,this.target),A.globalThis.Proxy);this.computedTiming=t?new t(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}}):this.timing}var e=t.prototype;return e.applyInterpolations=function(){this.interpolations(this.target,Number(this.timeFraction))},e.update=function(t){return null!==t&&(this.timeFraction=ou(this.timing.activeDuration,t,this.timing),null!==this.timeFraction)},e.getKeyframes=function(){return this.normalizedKeyframes},e.setKeyframes=function(t){this.normalizedKeyframes=hu(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[t]=e[t]})},t}();function mu(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(mu),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 gu(t,e,n),e=new Fc(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(mu),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=[],l=[];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:l).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,l]},t}();function yu(t,e){return(yu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function vu(t,e){e=e.r;t.arc(e,e,e,0,2*Math.PI,!1)}function bu(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 xu(t,e){var n,r,i=e.x1,a=e.y1,o=e.x2,s=e.y2,l=e.defX,l=void 0===l?0:l,c=e.defY,c=void 0===c?0:c,u=e.markerStart,h=e.markerEnd,f=e.markerStartOffset,e=e.markerEndOffset,d=0,p=0,g=0,m=0,y=0;u&&Xs(u)&&f&&(n=o-i,r=s-a,y=Math.atan2(r,n),d=Math.cos(y)*(f||0),p=Math.sin(y)*(f||0)),h&&Xs(h)&&e&&(n=i-o,r=a-s,y=Math.atan2(r,n),g=Math.cos(y)*(e||0),m=Math.sin(y)*(e||0)),t.moveTo(i-l+d,a-c+p),t.lineTo(o-l+g,s-c+m)}function wu(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,l=e.markerStartOffset,c=e.markerEndOffset,e=e.path,u=e.absolutePath,h=e.segments,f=0,d=0,p=0,g=0,e=0;i&&Xs(i)&&l&&(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)*(l||0),d=Math.sin(e)*(l||0)),s&&Xs(s)&&c&&(l=(i=s.parentNode.getEndTangent())[0],s=i[1],n=l[0]-s[0],r=l[1]-s[1],e=Math.atan2(r,n),p=Math.cos(e)*(c||0),g=Math.sin(e)*(c||0));for(var m=0;m<u.length;m++){var y=u[m],v=y[0],b=u[m+1],x=0===m&&(0!==f||0!==d),w=(m===u.length-1||b&&("M"===b[0]||"Z"===b[0]))&&0!==p&&0!==g;switch(v){case"M":x?(t.moveTo(y[1]-a+f,y[2]-o+d),t.lineTo(y[1]-a,y[2]-o)):t.moveTo(y[1]-a,y[2]-o);break;case"L":w?t.lineTo(y[1]-a+p,y[2]-o+g):t.lineTo(y[1]-a,y[2]-o);break;case"Q":t.quadraticCurveTo(y[1]-a,y[2]-o,y[3]-a,y[4]-o),w&&t.lineTo(y[3]-a+p,y[4]-o+g);break;case"C":t.bezierCurveTo(y[1]-a,y[2]-o,y[3]-a,y[4]-o,y[5]-a,y[6]-o),w&&t.lineTo(y[5]-a+p,y[6]-o+g);break;case"A":var k,M,E=h[m].arcParams,O=E.cx,S=E.cy,_=E.rx,A=E.ry,P=E.startAngle,T=E.endAngle,L=E.xRotation,E=E.sweepFlag;t.ellipse?t.ellipse(O-a,S-o,_,A,L,P,T,!!(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,P,T,!!(1-E)),t.scale(1/M,1/A),t.rotate(-L),t.translate(-(O-a),-(S-o))),w&&t.lineTo(y[6]-a+p,y[7]-o+g);break;case"Z":t.closePath()}}}function ku(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,l=e.markerStartOffset,c=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,m=0,y=0,v=0,b=0;i&&Xs(i)&&l&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),g=Math.cos(b)*(l||0),m=Math.sin(b)*(l||0)),s&&Xs(s)&&c&&(n=u[h-1][0]-u[0][0],r=u[h-1][1]-u[0][1],b=Math.atan2(r,n),y=Math.cos(b)*(c||0),v=Math.sin(b)*(c||0)),t.moveTo(e+(g||y),f+(m||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 Mu(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,l=e.markerStartOffset,c=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,m=0,y=0,v=0,b=0;i&&Xs(i)&&l&&(n=u[1][0]-u[0][0],r=u[1][1]-u[0][1],b=Math.atan2(r,n),g=Math.cos(b)*(l||0),m=Math.sin(b)*(l||0)),s&&Xs(s)&&c&&(n=u[h-2][0]-u[h-1][0],r=u[h-2][1]-u[h-1][1],b=Math.atan2(r,n),y=Math.cos(b)*(c||0),v=Math.sin(b)*(c||0)),t.moveTo(e+g,f+m);for(var x=1;x<h-1;x++){var w=u[x];t.lineTo(w[0]-a,w[1]-o)}t.lineTo(d+y,p+v)}function Eu(t,e){var n,r,i,a,o=e.radius,s=e.width,e=e.height,l=s,c=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 on(t,0,Math.min(Math.abs(l)/2,Math.abs(c)/2))}))[0],i=o[1],a=o[2],o=o[3],t.moveTo(s*r,0),t.lineTo(l-s*i,0),0!==i&&t.arc(l-s*i,e*i,i,-e*Math.PI/2,0<s?0:Math.PI,n),t.lineTo(l,c-e*a),0!==a&&t.arc(l-s*a,c-e*a,a,0<s?0:Math.PI,0<e?Math.PI/2:1.5*Math.PI,n),t.lineTo(s*o,c),0!==o&&t.arc(s*o,c-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,l,c)}A.EasingFunction=tu,A.AnimationTimeline=n;var Ou=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),yu(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){(t={})[k.CIRCLE]=vu,t[k.ELLIPSE]=bu,t[k.RECT]=Eu,t[k.LINE]=xu,t[k.POLYLINE]=Mu,t[k.POLYGON]=ku,t[k.PATH]=wu,t[k.TEXT]=void 0,t[k.GROUP]=void 0,t[k.IMAGE]=void 0,t[k.HTML]=void 0,t[k.MESH]=void 0;var t;this.context.pathGeneratorFactory=t},n.destroy=function(){delete this.context.pathGeneratorFactory},e}(Dl);function Su(){Su=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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 _u(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Au(t,e){return(Au=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Pu(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 Tu(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?Pu(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)?Pu(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 Lu=y(),Nu=y(),Cu=y(),ju=ht(),Ru=function(){function s(){var s=this;this.canvasConfig=void 0,this.pathGeneratorFactory=void 0,this.pointInPathPickerFactory=void 0,this.isHit=function(t,e,n,r,i){var a=s.pointInPathPickerFactory[t.nodeName];if(a){var n=yt(ju,n),e=Kt(Nu,Wt(Cu,e[0],e[1],0),n),n=t.getGeometryBounds().halfExtents,o=t.parsedStyle.anchor;if(e[0]+=(o&&o[0]||0)*n[0]*2,e[1]+=(o&&o[1]||0)*n[1]*2,a(t,new Ms(e[0],e[1]),r,s.isPointInPath,i))return!0}return!1},this.isPointInPath=function(t,e,n){var t=t.offscreenCanvas.getOrCreateContext(s.canvasConfig.offscreenCanvas),r=s.pathGeneratorFactory[e.nodeName];return r&&(t.beginPath(),r(t,e.parsedStyle),t.closePath()),t.isPointInPath(n.x,n.y)}}var t=s.prototype;return t.apply=function(t,n){var r=this,e=t.config,i=t.renderingService,a=t.renderingContext,o=t.pathGeneratorFactory,t=t.pointInPathPickerFactory,l=(this.canvasConfig=e,this.pathGeneratorFactory=o,this.pointInPathPickerFactory=t,null==(e=a.root)?void 0:e.ownerDocument);i.hooks.pick.tapPromise(s.tag,function(){s=Su().mark(function t(e){return Su().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",r.pick(l,e,n));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){_u(r,e,n,i,a,"next",t)}function a(t){_u(r,e,n,i,a,"throw",t)}i(void 0)})};return function(t){return e.apply(this,arguments)}}()),i.hooks.pickSync.tap(s.tag,function(t){return r.pick(l,t,n)})},t.pick=function(t,e,n){for(var r=e.topmost,i=e.position,a=i.x,i=i.y,o=Wt(Lu,a,i,0),s=[],l=Tu(t.elementsFromBBox(o[0],o[1],o[0],o[1]));!(c=l()).done;){var c=c.value,u=c.getWorldTransform();if(this.isHit(c,o,u,!1,n)){u=Ei(c);if(u){u=u.parsedStyle.clipPath;if(this.isHit(u,o,u.getWorldTransform(),!0,n)){if(r)return e.picked=[c],e;s.push(c)}}else{if(r)return e.picked=[c],e;s.push(c)}}}return e.picked=s,e},s}();function Iu(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function Bu(t,e){return Math.abs(t-e)<.001}function Fu(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 Du(t){return(t+2*Math.PI)%(2*Math.PI)}Ru.tag="CanvasPicker";var zu={box:function(t,e,n,r){return Fu([t,n],[e,r])},length:Iu,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?Iu(t,e,i,a):(n-t)*(n-t)+(r-e)*(r-e)<o?Iu(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 pe(n,[0,0])?Math.sqrt((i-t)*(i-t)+(a-e)*(a-e)):(fe(r=[-n[1],n[0]],r),Math.abs(de([i-t,a-e],r)))},tangentAngle:function(t,e,n,r){return Math.atan2(r-e,n-t)}};function Gu(t,e,n,r,i,a){for(var o=-1,s=1/0,l=[n,r],c=20,u=1/(c=a&&200<a?a/10:c),h=u/10,f=0;f<=c;f++){var d=f*u,p=[i.apply(void 0,t.concat([d])),i.apply(void 0,e.concat([d]))],p=Iu(l[0],l[1],p[0],p[1]);p<s&&(o=d,s=p)}if(0===o)return{x:t[0],y:e[0]};if(1===o)return{x:t[(n=t.length)-1],y:e[n-1]};for(var s=1/0,g=0;g<32&&!(h<1e-4);g++){var m=o-h,y=o+h,v=[i.apply(void 0,t.concat([m])),i.apply(void 0,e.concat([m]))],v=Iu(l[0],l[1],v[0],v[1]);0<=m&&v<s?(o=m,s=v):(m=[i.apply(void 0,t.concat([y])),i.apply(void 0,e.concat([y]))],v=Iu(l[0],l[1],m[0],m[1]),y<=1&&v<s?(o=y,s=v):h*=.5)}return{x:i.apply(void 0,t.concat([o])),y:i.apply(void 0,e.concat([o]))}}function Wu(t,e,n,r){var i=1-r;return i*i*t+2*r*i*e+r*r*n}function Hu(t,e,n){n=t+n-2*e;return Bu(n,0)?[.5]:(t=(t-e)/n)<=1&&0<=t?[t]:[]}function Yu(t,e,n,r){return 2*(1-r)*(e-t)+2*r*(n-e)}function Vu(t,e,n,r,i,a,o){var s=Wu(t,n,i,o),l=Wu(e,r,a,o),c=zu.pointAt(t,e,n,r,o),n=zu.pointAt(n,r,i,a,o);return[[t,e,c.x,c.y,s,l],[s,l,n.x,n.y,i,a]]}function qu(t,e,n,r,i,a,o){return 0===o?(Iu(t,e,n,r)+Iu(n,r,i,a)+Iu(t,e,i,a))/2:(e=(t=Vu(t,e,n,r,i,a,.5))[0],n=t[1],e.push(o-1),n.push(o-1),qu.apply(void 0,e)+qu.apply(void 0,n))}var Uu={box:function(t,e,n,r,i,a){var o=Hu(t,n,i)[0],s=Hu(e,r,a)[0],l=[t,i],c=[e,a];return void 0!==o&&l.push(Wu(t,n,i,o)),void 0!==s&&c.push(Wu(e,r,a,s)),Fu(l,c)},length:function(t,e,n,r,i,a){return qu(t,e,n,r,i,a,3)},nearestPoint:function(t,e,n,r,i,a,o,s){return Gu([t,n,i],[e,r,a],o,s,Wu)},pointDistance:function(t,e,n,r,i,a,o,s){t=this.nearestPoint(t,e,n,r,i,a,o,s);return Iu(t.x,t.y,o,s)},interpolationAt:Wu,pointAt:function(t,e,n,r,i,a,o){return{x:Wu(t,n,i,o),y:Wu(e,r,a,o)}},divide:Vu,tangentAngle:function(t,e,n,r,i,a,o){t=Yu(t,n,i,o),n=Yu(e,r,a,o);return Du(Math.atan2(n,t))}};function Xu(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 $u(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 Ku(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 Bu(r,0)?Bu(n,0)||0<=(i=-e/n)&&i<=1&&t.push(i):Bu(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 Zu(t,e,n,r,i,a,o,s,l){var c=Xu(t,n,i,o,l),u=Xu(e,r,a,s,l),h=zu.pointAt(t,e,n,r,l),n=zu.pointAt(n,r,i,a,l),r=zu.pointAt(i,a,o,s,l),i=zu.pointAt(h.x,h.y,n.x,n.y,l),a=zu.pointAt(n.x,n.y,r.x,r.y,l);return[[t,e,h.x,h.y,i.x,i.y,c,u],[c,u,a.x,a.y,r.x,r.y,o,s]]}function Qu(t,e,n,r,i,a,o,s,l){if(0===l){for(var c=[t,n,i,o],u=[e,r,a,s],h=0,f=c.length,d=0;d<f;d++)h+=Iu(c[d],u[d],c[(d+1)%f],u[(d+1)%f]);return h/2}t=Zu(t,e,n,r,i,a,o,s,.5),e=[].concat(t[0],[l-1]),n=[].concat(t[1],[l-1]);return Qu.apply(void 0,e)+Qu.apply(void 0,n)}var Ju={extrema:Ku,box:function(t,e,n,r,i,a,o,s){for(var l=[t,o],c=[e,s],u=Ku(t,n,i,o),h=Ku(e,r,a,s),f=0;f<u.length;f++)l.push(Xu(t,n,i,o,u[f]));for(var d=0;d<h.length;d++)c.push(Xu(e,r,a,s,h[d]));return Fu(l,c)},length:function(t,e,n,r,i,a,o,s){return Qu(t,e,n,r,i,a,o,s,3)},nearestPoint:function(t,e,n,r,i,a,o,s,l,c,u){return Gu([t,n,i,o],[e,r,a,s],l,c,Xu,u)},pointDistance:function(t,e,n,r,i,a,o,s,l,c,u){t=this.nearestPoint(t,e,n,r,i,a,o,s,l,c,u);return Iu(t.x,t.y,l,c)},interpolationAt:Xu,pointAt:function(t,e,n,r,i,a,o,s,l){return{x:Xu(t,n,i,o,l),y:Xu(e,r,a,s,l)}},divide:Zu,tangentAngle:function(t,e,n,r,i,a,o,s,l){t=$u(t,n,i,o,l),n=$u(e,r,a,s,l);return Du(Math.atan2(n,t))}};function th(t,e,n,r){t-=n,n=e-r;return Math.sqrt(t*t+n*n)}function eh(t,e,n,r,i,a){return t<=i&&i<=t+n&&e<=a&&a<=e+r}function nh(t,e,n,r,i,a,o,s){var l=(Math.atan2(s-e,o-t)+2*Math.PI)%(2*Math.PI),t={x:t+n*Math.cos(l),y:e+n*Math.sin(l)};return th(t.x,t.y,o,s)<=a/2}function rh(t,e,n,r,i,a,o){var s=Math.min(t,n),l=Math.max(t,n),c=Math.min(e,r),u=Math.max(e,r),h=i/2;return s-h<=a&&a<=l+h&&c-h<=o&&o<=u+h&&zu.pointToLine(t,e,n,r,a,o)<=i/2}function ih(t,e,n,r,i){var a=t.length;if(!(a<2)){for(var o=0;o<a-1;o++)if(rh(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(rh(i[0],i[1],s[0],s[1],e,n,r))return!0}}return!1}var ah=1e-6;function oh(t){return Math.abs(t)<ah?0:t<0?-1:1}function sh(t,e,n){var r=!1,i=t.length;if(i<=2)return!1;for(var a,o,s,l=0;l<i;l++){var c=t[l],u=t[(l+1)%i];if(o=u,((s=[e,n])[0]-(a=c)[0])*(o[1]-a[1])==(o[0]-a[0])*(s[1]-a[1])&&Math.min(a[0],o[0])<=s[0]&&s[0]<=Math.max(a[0],o[0])&&Math.min(a[1],o[1])<=s[1]&&s[1]<=Math.max(a[1],o[1]))return!0;0<oh(c[1]-n)!=0<oh(u[1]-n)&&oh(e-(n-c[1])*(c[0]-u[0])/(c[1]-u[1])-c[0])<0&&(r=!r)}return r}function lh(t,e,n){for(var r=!1,i=0;i<t.length&&!(r=sh(t[i],e,n));i++);return r}function ch(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=th(r,r,e.x,e.y),e=Ta(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 uh(t,e,n,r){return t/(n*n)+e/(r*r)}function hh(t,e,n){var t=t.parsedStyle,r=t.rx,i=t.ry,a=t.fill,o=t.stroke,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,t=t.pointerEvents,c=e.x,e=e.y,t=Ta(t,a,o),a=t[0],o=t[1],t=((s||0)+(l||0))/2,s=(c-r)*(c-r),l=(e-i)*(e-i);return a&&o||n?uh(s,l,r+t,i+t)<=1:a?uh(s,l,r,i)<=1:!!o&&1<=uh(s,l,r-t,i-t)&&uh(s,l,r+t,i+t)<=1}function fh(t,e,n){var t=t.parsedStyle,r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.lineWidth,l=t.increasedLineWidthForHitTesting,c=t.defX,u=t.defY;return!(!Ta(t.pointerEvents,t.fill,t.stroke)[1]&&!n||!s)&&rh(r,i,a,o,(s||0)+(l||0),e.x+(void 0===c?0:c),e.y+(void 0===u?0:u))}function dh(t,e,n,r,i){var a=t.parsedStyle,o=a.lineWidth,s=a.increasedLineWidthForHitTesting,l=a.stroke,c=a.fill,u=a.defX,u=void 0===u?0:u,h=a.defY,h=void 0===h?0:h,f=a.path,a=a.pointerEvents,d=f.segments,p=f.hasArc,g=f.polylines,f=f.polygons,a=Ta(a,(null==f?void 0:f.length)&&c,l),c=a[0],l=a[1],a=ya(t),m=!1;return c||n?p?r(i,t,e):lh(f,e.x+u,e.y+h)||lh(g,e.x+u,e.y+h):l||n?function(t,e,n,r,i){for(var a=!1,o=e/2,s=0;s<t.length;s++){var l=t[s],c=l.currentPoint,u=l.params,h=l.prePoint,f=l.box;if(!f||eh(f.x-o,f.y-o,f.width+e,f.height+e,n,r))switch(l.command){case"L":case"Z":if(a=rh(h[0],h[1],c[0],c[1],e,n,r))return!0;break;case"Q":if(a=Uu.pointDistance(h[0],h[1],u[1],u[2],u[3],u[4],n,r)<=e/2)return!0;break;case"C":if(a=Ju.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":l.cubicParams||(l.cubicParams=Ce(h[0],h[1],u[1],u[2],u[3],u[4],u[5],u[6],u[7],void 0));for(var d=l.cubicParams,p=h,g=0;g<d.length;g+=6){var m=Ju.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=m<=e/2)return!0}}}return a}(d,(o||0)+(s||0),e.x+u,e.y+h,a):m}function ph(t,e,n){var t=t.parsedStyle,r=t.stroke,i=t.fill,a=t.lineWidth,o=t.increasedLineWidthForHitTesting,s=t.points,l=t.defX,l=void 0===l?0:l,c=t.defY,c=void 0===c?0:c,t=Ta(t.pointerEvents,i,r),i=t[0],r=!1;return r=(r=t[1]||n?ih(s.points,(a||0)+(o||0),e.x+l,e.y+c,!0):r)||!i&&!n?r:sh(s.points,e.x+l,e.y+c)}function gh(t,e,n){var t=t.parsedStyle,r=t.lineWidth,i=t.increasedLineWidthForHitTesting,a=t.points,o=t.defX,s=t.defY;return!(!Ta(t.pointerEvents,t.fill,t.stroke)[1]&&!n||!r)&&ih(a.points,(r||0)+(i||0),e.x+(void 0===o?0:o),e.y+(void 0===s?0:s),!1)}function mh(t,e,n,r,i){var a,o,s,l,c,u,h,f,d,p=t.parsedStyle,g=p.radius,m=p.fill,y=p.stroke,v=p.lineWidth,b=p.increasedLineWidthForHitTesting,x=p.width,w=p.height,p=Ta(p.pointerEvents,m,y),m=p[0],y=p[1],p=(v||0)+(b||0);return g&&g.some(function(t){return 0!==t})?(v=!1,(y||n)&&(h=b=0,l=x,u=w,g=g.map(function(t){return on(t,0,Math.min(Math.abs(x)/2,Math.abs(w)/2))}),d=p,a=e.x,o=e.y,f=g[0],s=g[1],c=g[2],g=g[3],v=rh(b+f,h,b+l-s,h,d,a,o)||rh(b+l,h+s,b+l,h+u-c,d,a,o)||rh(b+l-c,h+u,b+g,h+u,d,a,o)||rh(b,h+u-g,b,h+f,d,a,o)||nh(b+l-s,h+s,s,Math.PI,Math.PI,d,a,o)||nh(b+l-c,h+u-c,c,0,Math.PI,d,a,o)||nh(b+g,h+u-g,g,Math.PI,Math.PI,d,a,o)||nh(b+f,h+f,f,Math.PI,Math.PI,d,a,o)),v||!m&&!n?v:r(i,t,e)):(s=p/2,m&&y||n?eh(0-s,0-s,x+s,w+s,e.x,e.y):m?eh(0,0,x,w,e.x,e.y):!!y&&(c=l=0,u=x,g=w,b=p,h=e.x,f=e.y,eh(l-(d=b/2),c-d,u,b,h,f)||eh(l+u-d,c-d,b,g,h,f)||eh(l+d,c+g-d,u,b,h,f)||eh(l-d,c+d,b,g,h,f)))}var yh=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),Au(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){function t(){return!0}(e={})[k.CIRCLE]=ch,e[k.ELLIPSE]=hh,e[k.RECT]=mh,e[k.LINE]=fh,e[k.POLYLINE]=gh,e[k.POLYGON]=ph,e[k.PATH]=dh,e[k.TEXT]=t,e[k.GROUP]=null,e[k.IMAGE]=t,e[k.HTML]=null,e[k.MESH]=null;var e;this.context.pointInPathPickerFactory=e,this.addRenderingPlugin(new Ru)},n.destroy=function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()},e}(Dl);function vh(){vh=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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 bh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function xh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){bh(r,e,n,i,a,"next",t)}function a(t){bh(r,e,n,i,a,"throw",t)}i(void 0)})}}function wh(){return(wh=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 kh(t,e){return(kh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Mh=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=ht(),this.dprMatrix=ht(),this.tmpMat4=ht(),this.vec3a=y(),this.vec3b=y(),this.vec3c=y(),this.vec3d=y(),this.canvasRendererPluginOptions=t}var t=r.prototype;return t.apply=function(t,c){function a(t){(t=t.target.rBushNode).aabb&&h.removedRBushNodeAABBs.push(t.aabb)}function o(t){(t=t.target.rBushNode).aabb&&h.removedRBushNodeAABBs.push(t.aabb)}function u(t,e){t.isVisible()&&!t.isCulled()&&(h.renderDisplayObject(t,e,h.context,h.restoreStack,c),h.saveDirtyAABB(t)),(t.sortable.sorted||t.childNodes).forEach(function(t){u(t,e)})}var h=this,f=(this.context=t).config,d=t.camera,l=t.renderingService,p=t.renderingContext,e=t.rBushRoot,n=t.pathGeneratorFactory,g=(this.rBush=e,this.pathGeneratorFactory=n,t.contextService),m=p.root.ownerDocument.defaultView;l.hooks.init.tapPromise(r.tag,xh(vh().mark(function t(){var e,n,r,i;return vh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:m.addEventListener(b.UNMOUNTED,a),m.addEventListener(b.CULLED,o),e=g.getDPR(),n=f.width,r=f.height,i=g.getContext(),h.clearRect(i,0,0,n*e,r*e,f.background);case 6:case"end":return t.stop()}},t)}))),l.hooks.destroy.tap(r.tag,function(){m.removeEventListener(b.UNMOUNTED,a),m.removeEventListener(b.CULLED,o)}),l.hooks.beginFrame.tap(r.tag,function(){var t=g.getContext(),e=g.getDPR(),n=f.width,r=f.height,i=h.canvasRendererPluginOptions,a=i.dirtyObjectNumThreshold,i=i.dirtyObjectRatioThreshold,o=l.getStats(),s=o.total,o=o.rendered,s=o/s;h.clearFullScreen=l.disableDirtyRectangleRendering()||a<o&&i<s,t&&(t.resetTransform?t.resetTransform():t.setTransform(1,0,0,1,0,0),h.clearFullScreen)&&h.clearRect(t,0,0,n*e,r*e,f.background)});l.hooks.endFrame.tap(r.tag,function(){var e=g.getContext(),t=g.getDPR();if(Ot(h.dprMatrix,[t,t,1]),bt(h.vpMatrix,h.dprMatrix,d.getOrthoMatrix()),h.clearFullScreen)u(p.root,e);else{t=h.safeMergeAABB.apply(h,[h.mergeDirtyAABBs(h.renderQueue)].concat(h.removedRBushNodeAABBs.map(function(t){var e=t.minX,n=t.minY,r=t.maxX,t=t.maxY,i=new xs;return i.setMinMax([e,n,0],[r,t,0]),i})));if(h.removedRBushNodeAABBs=[],xs.isEmpty(t))return void(h.renderQueue=[]);var n=h.convertAABB2Rect(t),r=n.x,i=n.y,a=n.width,n=n.height,o=Kt(h.vec3a,[r,i,0],h.vpMatrix),s=Kt(h.vec3b,[r+a,i,0],h.vpMatrix),l=Kt(h.vec3c,[r,i+n,0],h.vpMatrix),r=Kt(h.vec3d,[r+a,i+n,0],h.vpMatrix),a=Math.min(o[0],s[0],r[0],l[0]),i=Math.min(o[1],s[1],r[1],l[1]),n=Math.max(o[0],s[0],r[0],l[0]),o=Math.max(o[1],s[1],r[1],l[1]),s=Math.floor(a),r=Math.floor(i),l=Math.ceil(n-a),n=Math.ceil(o-i);e.save(),h.clearRect(e,s,r,l,n,f.background),e.beginPath(),e.rect(s,r,l,n),e.clip(),e.setTransform(h.vpMatrix[0],h.vpMatrix[1],h.vpMatrix[4],h.vpMatrix[5],h.vpMatrix[12],h.vpMatrix[13]),f.renderer.getConfig().enableDirtyRectangleRenderingDebug&&m.dispatchEvent(new Rs(Xl.DIRTY_RECTANGLE,{dirtyRect:{x:s,y:r,width:l,height:n}})),h.searchDirtyObjects(t).sort(function(t,e){return t.sortable.renderOrder-e.sortable.renderOrder}).forEach(function(t){t&&t.isVisible()&&!t.isCulled()&&h.renderDisplayObject(t,e,h.context,h.restoreStack,c)}),e.restore(),h.renderQueue.forEach(function(t){h.saveDirtyAABB(t)}),h.renderQueue=[]}h.restoreStack.forEach(function(){e.restore()}),h.restoreStack=[]}),l.hooks.render.tap(r.tag,function(t){h.clearFullScreen||h.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,i){var a,o=t.nodeName,s=r[r.length-1],s=(!s||t.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINS||(e.restore(),r.pop()),this.context.styleRendererFactory[o]),o=this.pathGeneratorFactory[o],l=t.parsedStyle.clipPath;l&&(this.applyWorldTransform(e,l),a=this.pathGeneratorFactory[l.nodeName])&&(e.save(),r.push(t),e.beginPath(),a(e,l.parsedStyle),e.closePath(),e.clip()),s&&(this.applyWorldTransform(e,t),e.save(),this.applyAttributesToContext(e,t)),o&&(e.beginPath(),o(e,t.parsedStyle),t.nodeName!==k.LINE)&&t.nodeName!==k.PATH&&t.nodeName!==k.POLYLINE&&e.closePath(),s&&(s.render(e,t.parsedStyle,t,n,this,i),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 xs;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){return t.displayObject})},t.saveDirtyAABB=function(t){var e=t.renderable,t=(e.dirtyRenderBounds||(e.dirtyRenderBounds=new xs),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.geometry.contentBounds)&&2*o.halfExtents[0]||0),i=-a*(o&&2*o.halfExtents[1]||0)),n?(dt(this.tmpMat4,e.getLocalTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,xt(this.tmpMat4,this.tmpMat4,this.vec3a),bt(this.tmpMat4,n,this.tmpMat4)):(dt(this.tmpMat4,e.getWorldTransform()),this.vec3a[0]=r,this.vec3a[1]=i,this.vec3a[2]=0,xt(this.tmpMat4,this.tmpMat4,this.vec3a)),bt(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 xs,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}(),Eh=(Mh.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,a){var o=e.fill,s=e.fillRule,l=e.opacity,c=e.fillOpacity,u=e.stroke,h=e.strokeOpacity,f=e.lineWidth,d=e.lineCap,p=e.lineJoin,g=e.shadowType,m=e.shadowColor,y=e.shadowBlur,v=e.filter,e=e.miterLimit,b=!_(o)&&!o.isNone,x=!_(u)&&!u.isNone&&0<f,w=0===o.alpha,v=!(!v||!v.length),m=!_(m)&&0<y,y=n.nodeName,g="inner"===g,y=x&&m&&(y===k.PATH||y===k.LINE||y===k.POLYLINE||w||g);b&&(t.globalAlpha=l*c,y||Oh(n,t,m),this.fill(t,n,o,s,r,i,a),y||this.clearShadowAndFilter(t,v,m)),x&&(t.globalAlpha=l*h,t.lineWidth=f,_(e)||(t.miterLimit=e),_(d)||(t.lineCap=d),_(p)||(t.lineJoin=p),y&&(g&&(t.globalCompositeOperation="source-atop"),Oh(n,t,!0),g)&&(this.stroke(t,n,u,r,i,a),t.globalCompositeOperation="source-over",this.clearShadowAndFilter(t,v,!0)),this.stroke(t,n,u,r,i,a))},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,o){var s=this;Array.isArray(t)?t.forEach(function(t){e.fillStyle=s.getColor(t,n,e),r?e.fill(r):e.fill()}):(bo(t)&&(e.fillStyle=this.getPattern(t,n,e,i,a,o)),r?e.fill(r):e.fill())},e.stroke=function(e,n,t,r,i,a){var o=this;Array.isArray(t)?t.forEach(function(t){e.strokeStyle=o.getColor(t,n,e),e.stroke()}):(bo(t)&&(e.strokeStyle=this.getPattern(t,n,e,r,i,a)),e.stroke())},e.getPattern=function(t,e,n,r,i,a){var o,s,l,c,u,h,f;return"rect"===t.image.nodeName&&(o=(s=t.image.parsedStyle).width,s=s.height,l=r.contextService.getDPR(),c=r.config.offscreenCanvas,(u=a.offscreenCanvas.getOrCreateCanvas(c)).width=o*l,u.height=s*l,h=a.offscreenCanvas.getOrCreateContext(c),f=[],t.image.forEach(function(t){i.renderDisplayObject(t,h,r,f,a)}),f.forEach(function(){h.restore()})),this.imagePool.getOrCreatePatternSync(t,n,u,l,function(){e.renderable.dirty=!0,r.renderingService.dirtify()})},e.getColor=function(t,e,n){var r;return t.type!==Xr.LinearGradient&&t.type!==Xr.RadialGradient||(r=(e=e.getGeometryBounds())&&2*e.halfExtents[0]||1,e=e&&2*e.halfExtents[1]||1,r=this.imagePool.getOrCreateGradient(wh({type:t.type},t.value,{width:r,height:e}),n)),r},t}());function Oh(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 Sh=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=an(a)?this.imagePool.getImageSync(a):(r=r||a.width,i=i||a.height,a);if(a){Oh(n,t,!_(o)&&0<e);try{t.drawImage(a,0,0,r,i)}catch(t){}}},t}(),_h=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,l=e.letterSpacing,c=e.stroke,u=e.fill,h=e.fillOpacity,f=e.strokeOpacity,d=e.opacity,p=e.metrics,g=e.dx,m=e.dy,y=e.shadowColor,e=e.shadowBlur,v=p.font,b=p.lines,x=p.height,w=p.lineHeight,k=p.lineMetrics,p=(t.font=v,t.lineWidth=r,t.textAlign="middle"===i?"center":i,a),M=(A.enableCSSParsing||"alphabetic"!==p||(p="bottom"),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),v=(M+=m||0,1===b.length&&("bottom"===p?(p="middle",M-=.5*x):"top"===p&&(p="middle",M+=.5*x)),t.textBaseline=p,!_(y)&&0<e);Oh(n,t,v);for(var O=0;O<b.length;O++){var S=r/2+E;M+=w,_(c)||c.isNone||!r||this.drawLetterSpacing(t,b[O],k[O],i,S,M,l,h,f,d,!0),_(u)||this.drawLetterSpacing(t,b[O],k[O],i,S,M,l,h,f,d)}},e.drawLetterSpacing=function(t,e,n,r,i,a,o,s,l,c,u){if(void 0===u&&(u=!1),0===o)u?this.strokeText(t,e,i,a,l):this.fillText(t,e,i,a,s,c);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 m=d[g];u?this.strokeText(t,m,f,a,l):this.fillText(t,m,f,a,s,c),f+=p-(m=t.measureText(e.substring(g+1)).width)+o,p=m}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}(),Ah=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),kh(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){var t,e=wh({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),n=this.context.imagePool,r=new Eh(n),n=((t={})[k.CIRCLE]=r,t[k.ELLIPSE]=r,t[k.RECT]=r,t[k.IMAGE]=new Sh(n),t[k.TEXT]=new _h,t[k.LINE]=r,t[k.POLYLINE]=r,t[k.POLYGON]=r,t[k.PATH]=r,t[k.GROUP]=void 0,t[k.HTML]=void 0,t[k.MESH]=void 0,t);this.context.defaultStyleRendererFactory=n,this.context.styleRendererFactory=n,this.addRenderingPlugin(new Mh(e))},r.destroy=function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory},e}(Dl);function Ph(){Ph=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Lh(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 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(){this.context=void 0}return r.prototype.apply=function(t,i){function a(t){e.hooks.pointerWheel.call(t)}function o(t){e.hooks.click.call(t)}var s=this,e=t.renderingService,n=t.renderingContext,l=t.config,c=(this.context=t,n.root.ownerDocument.defaultView),u=function(t){e.hooks.pointerMove.call(t)},h=function(t){e.hooks.pointerUp.call(t)},f=function(t){e.hooks.pointerDown.call(t)},d=function(t){e.hooks.pointerOver.call(t)},p=function(t){e.hooks.pointerOut.call(t)},g=function(t){e.hooks.pointerCancel.call(t)};e.hooks.init.tapPromise(r.tag,Lh(Ph().mark(function t(){var r;return Ph().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=s.context.contextService.getDomElement(),i.globalThis.navigator.msPointerEnabled?(r.style.msContentZooming="none",r.style.msTouchAction="none"):c.supportsPointerEvents&&(r.style.touchAction="none"),c.supportsPointerEvents?(n=r,i.globalThis.document.addEventListener("pointermove",u,!0),n.addEventListener("pointerdown",f,!0),n.addEventListener("pointerleave",p,!0),n.addEventListener("pointerover",d,!0),i.globalThis.addEventListener("pointerup",h,!0)):(n=r,i.globalThis.document.addEventListener("mousemove",u,!0),n.addEventListener("mousedown",f,!0),n.addEventListener("mouseout",p,!0),n.addEventListener("mouseover",d,!0),i.globalThis.addEventListener("mouseup",h,!0)),c.supportsTouchEvents&&((e=r).addEventListener("touchstart",f,!0),e.addEventListener("touchend",h,!0),e.addEventListener("touchmove",u,!0),e.addEventListener("touchcancel",g,!0)),l.useNativeClickEvent&&r.addEventListener("click",o,!0),r.addEventListener("wheel",a,{passive:!0,capture:!0});case 6:case"end":return t.stop()}var e,n},t)}))),e.hooks.destroy.tap(r.tag,function(){var t,e,n=s.context.contextService.getDomElement();i.globalThis.navigator.msPointerEnabled?(n.style.msContentZooming="",n.style.msTouchAction=""):c.supportsPointerEvents&&(n.style.touchAction=""),c.supportsPointerEvents?(t=n,i.globalThis.document.removeEventListener("pointermove",u,!0),t.removeEventListener("pointerdown",f,!0),t.removeEventListener("pointerleave",p,!0),t.removeEventListener("pointerover",d,!0),i.globalThis.removeEventListener("pointerup",h,!0)):(t=n,i.globalThis.document.removeEventListener("mousemove",u,!0),t.removeEventListener("mousedown",f,!0),t.removeEventListener("mouseout",p,!0),t.removeEventListener("mouseover",d,!0),i.globalThis.removeEventListener("mouseup",h,!0)),c.supportsTouchEvents&&((e=n).removeEventListener("touchstart",f,!0),e.removeEventListener("touchend",h,!0),e.removeEventListener("touchmove",u,!0),e.removeEventListener("touchcancel",g,!0)),l.useNativeClickEvent&&n.removeEventListener("click",o,!0),n.removeEventListener("wheel",a,!0)})},r}(),jh=(Ch.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),Nh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new Ch)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Dl));function Rh(){Rh=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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 Ih(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Bh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Ih(r,e,n,i,a,"next",t)}function a(t){Ih(r,e,n,i,a,"throw",t)}i(void 0)})}}function Fh(t,e){return(Fh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Dh=function(){function f(){this.context=void 0,this.$camera=void 0}var t=f.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===k.HTML&&(s.$camera||(s.$camera=s.createCamera(l)),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),A.nativeHTMLMap.set(e,r))}function n(t){(t=t.target).nodeName===k.HTML&&s.$camera&&(t=s.getOrCreateEl(t))&&(t.remove(),A.nativeHTMLMap.delete(t))}function r(t){var e=t.target;e.nodeName===k.HTML&&(t=t.attrName,s.updateAttribute(t,e))}function a(t){var e;(t=t.target).nodeName===k.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,l=t.camera,c=t.renderingContext,u=t.renderingService,h=(this.context=t,c.root.ownerDocument.defaultView);u.hooks.init.tapPromise(f.tag,Bh(Rh().mark(function t(){return Rh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:h.addEventListener(Xl.RESIZE,o),h.addEventListener(b.MOUNTED,e),h.addEventListener(b.UNMOUNTED,n),h.addEventListener(b.ATTR_MODIFIED,r),h.addEventListener(b.BOUNDS_CHANGED,a);case 5:case"end":return t.stop()}},t)}))),u.hooks.endFrame.tap(f.tag,function(){s.$camera&&c.renderReasons.has(Cl.CAMERA_CHANGED)&&(s.$camera.style.transform=s.joinTransformMatrix(l.getOrthoMatrix()))}),u.hooks.destroy.tap(f.tag,function(){s.$camera&&s.$camera.remove(),h.removeEventListener(Xl.RESIZE,o),h.removeEventListener(b.MOUNTED,e),h.removeEventListener(b.UNMOUNTED,n),h.removeEventListener(b.ATTR_MODIFIED,r),h.removeEventListener(b.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;an(r)?n.innerHTML=r:(n.innerHTML="",n.appendChild(r));break;case"transformOrigin":var r=e.parsedStyle.transformOrigin;n.style["transform-origin"]=r[0].value+" "+r[1].value;break;case"width":A.enableCSSParsing?(r=e.computedStyleMap().get("width"),n.style.width=r.toString()):(r=e.parsedStyle.width,n.style.width=sn(r)?r+"px":r.toString());break;case"height":A.enableCSSParsing?(r=e.computedStyleMap().get("height"),n.style.height=r.toString()):(r=e.parsedStyle.height,n.style.height=sn(r)?r+"px":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="";xo(r)?i=r.isNone?"transparent":e.getAttribute("fill"):Array.isArray(r)?i=e.getAttribute("fill"):bo(r),n.style.background=i;break;case"stroke":r=e.parsedStyle.stroke,i="";xo(r)?i=r.isNone?"transparent":e.getAttribute("stroke"):Array.isArray(r)?i=e.getAttribute("stroke"):bo(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}},f}(),zh=(Dh.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),Fh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.addRenderingPlugin(new Dh)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Dl));function Gh(){Gh=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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 Wh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Hh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Wh(r,e,n,i,a,"next",t)}function a(t){Wh(r,e,n,i,a,"throw",t)}i(void 0)})}}function Yh(t,e){return(Yh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var Vh="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 qh=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):ki&&(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,l,c=this.generatePatternKey(t);return c&&this.patternCache[c]?this.patternCache[c]:(l=t.image,s=t.repetition,t=t.transform,a=!1,an(l)?o=this.getImageSync(l,i):n?(o=n,a=!0):o=l,(i=o&&e.createPattern(o,s))&&(e=t?Ui($o(t)):(n=new Vh(16),Vh!=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,(l=n)[0]=1,l[1]=0,l[2]=0,l[3]=0,l[4]=0,l[5]=1,l[6]=0,l[7]=0,l[8]=0,l[9]=0,l[10]=1,l[11]=0,l[12]=0,l[13]=0,l[14]=0,l[15]=1,l),a&&(s=o=e,n=(t=[1/r,1/r,1])[0],l=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]*l,o[5]=s[5]*l,o[6]=s[6]*l,o[7]=s[7]*l,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]})),c&&i&&(this.patternCache[c]=i),i)},e.getOrCreateGradient=function(t,e){var r,n,i,a,o,s=this.generateGradientKey(t),l=t.type,c=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,l===Xr.LinearGradient?(n=u,i=h,f=Ri((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)):l===Xr.RadialGradient&&(a=u,o=h,f=p,n=t,l=(i=d).value,u=f.value,i.unit===g.kPercentage&&(l=i.value/100*a),f.unit===g.kPercentage&&(u=f.value/100*o),i=Math.max(Re([0,0],[l,u]),Re([0,o],[l,u]),Re([a,o],[l,u]),Re([a,0],[l,u])),n&&(n instanceof li?i=n.value:n instanceof Qr&&("closest-side"===n.value?i=Math.min(l,a-l,u,o-u):"farthest-side"===n.value?i=Math.max(l,a-l,u,o-u):"closest-corner"===n.value&&(i=Math.min(Re([0,0],[l,u]),Re([0,o],[l,u]),Re([a,o],[l,u]),Re([a,0],[l,u]))))),r=e.createRadialGradient(p=(h={x:l,y:u,r:i}).x,t=h.y,0,p,t,h.r)),r&&(c.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 an(e)?"pattern-"+e+"-"+t:"rect"===e.nodeName?"pattern-"+e.entity+"-"+t:void 0},t}(),Uh=function(){function s(){}return s.prototype.apply=function(t){function e(t){var e=t.target,t=e.nodeName,n=e.attributes;t===k.IMAGE&&(t=n.img,an(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===k.IMAGE&&"img"===n&&an(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,Hh(Gh().mark(function t(){return Gh().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:o.addEventListener(b.MOUNTED,e),o.addEventListener(b.ATTR_MODIFIED,n);case 2:case"end":return t.stop()}},t)}))),r.hooks.destroy.tap(s.tag,function(){o.removeEventListener(b.MOUNTED,e),o.removeEventListener(b.ATTR_MODIFIED,n)})},s}(),Xh=(Uh.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),Yh(n.prototype.constructor=n,t);var n=e.prototype;return n.init=function(){this.context.imagePool=new qh(this.context.config),this.addRenderingPlugin(new Uh)},n.destroy=function(){this.removeAllRenderingPlugins()},e}(Dl));function $h(){$h=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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 Kh(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function Zh(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){Kh(r,e,n,i,a,"next",t)}function a(t){Kh(r,e,n,i,a,"throw",t)}i(void 0)})}}function Qh(t,e){t.prototype=Object.create(e.prototype),Jh(t.prototype.constructor=t,e)}function Jh(t,e){return(Jh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var tf=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=Zh($h().mark(function t(){var e,n;return $h().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=an(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||ki&&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,ki)&&n.style&&(n.style.width=t+"px",n.style.height=e+"px"),this.renderingContext.renderReasons.add(Cl.CAMERA_CHANGED)},e.applyCursorStyle=function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)},e.toDataURL=function(){var e=Zh($h().mark(function t(e){var n,r;return $h().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}(),ef=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}Qh(t,i);var e=t.prototype;return e.init=function(){this.context.ContextService=tf},e.destroy=function(){delete this.context.ContextService},t}(Dl),nf=function(e){function t(t){t=e.call(this,t)||this;return t.registerPlugin(new ef),t.registerPlugin(new Xh),t.registerPlugin(new Ou),t.registerPlugin(new Ah),t.registerPlugin(new jh),t.registerPlugin(new yh),t.registerPlugin(new zh),t}return Qh(t,e),t}(s);function rf(){rf=function(){return o};var o={},t=Object.prototype,l=t.hasOwnProperty,c=Object.defineProperty||function(t,e,n){t[e]=n.value},e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{a({},"")}catch(t){a=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var i,a,o,s,e=e&&e.prototype instanceof f?e:f,e=Object.create(e.prototype),r=new w(r||[]);return c(e,"_invoke",{value:(i=t,a=n,o=r,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return M()}for(o.method=t,o.arg=e;;){var n=o.delegate;if(n){n=function t(e,n){var r=n.method,i=e.iterator[r];if(void 0===i)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=void 0,t(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),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([]))),m=(g&&g!==t&&l.call(g,r)&&(e=g),p.prototype=f.prototype=Object.create(e));function y(t){["next","throw","return"].forEach(function(e){a(t,e,function(t){return this._invoke(e,t)})})}function v(o,s){var e;c(this,"_invoke",{value:function(n,r){function t(){return new s(function(t,e){!function e(t,n,r,i){var a,t=u(o[t],o,n);if("throw"!==t.type)return(n=(a=t.arg).value)&&"object"==typeof n&&l.call(n,"__await")?s.resolve(n.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):s.resolve(n).then(function(t){a.value=t,r(a)},function(t){return e("throw",t,r,i)});i(t.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}})}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function w(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function k(e){if(e){var n,t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return n=-1,(t=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t}).next=t}return{next:M}}function M(){return{value:void 0,done:!0}}return c(m,"constructor",{value:d.prototype=p,configurable:!0}),c(p,"constructor",{value:d,configurable:!0}),d.displayName=a(p,i,"GeneratorFunction"),o.isGeneratorFunction=function(t){t="function"==typeof t&&t.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,a(t,i,"GeneratorFunction")),t.prototype=Object.create(m),t},o.awrap=function(t){return{__await:t}},y(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()})},y(m),a(m,i,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),o.keys=function(t){var e,n=Object(t),r=[];for(e in n)r.push(e);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},o.values=k,w.prototype={constructor:w,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return a.type="throw",a.arg=n,r.next=t,e&&(r.method="next",r.arg=void 0),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var o=l.call(i,"catchLoc"),s=l.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,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 af(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(t){return void n(t)}s.done?e(l):Promise.resolve(l).then(r,i)}function of(s){return function(){var t=this,o=arguments;return new Promise(function(e,n){var r=s.apply(t,o);function i(t){af(r,e,n,i,a,"next",t)}function a(t){af(r,e,n,i,a,"throw",t)}i(void 0)})}}function sf(){return(sf=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 lf(t,e){return(lf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}var cf=function(){function i(t){this.dragndropPluginOptions=void 0,this.dragndropPluginOptions=t}return i.prototype.apply=function(t){function e(t){var a,o,s,l,c,e,u=t.target,h=u===p,f=h&&d.dragndropPluginOptions.isDocumentDraggable?p:u.closest&&u.closest("[draggable=true]");f&&(a=!1,o=t.timeStamp,s=[t.clientX,t.clientY],l=null,c=[t.clientX,t.clientY],e=function(){var e=of(rf().mark(function t(e){var n,r,i;return rf().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a)t.next=8;else{if(n=e.timeStamp-o,r=Re([e.clientX,e.clientY],s),n<=d.dragndropPluginOptions.dragstartTimeThreshold||r<=d.dragndropPluginOptions.dragstartDistanceThreshold)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-c[0],e.dy=e.clientY-c[1],f.dispatchEvent(e),c=[e.clientX,e.clientY],h){t.next=21;break}return n="pointer"===d.dragndropPluginOptions.overlap?[e.canvasX,e.canvasY]:u.getBounds().center,t.next=17,p.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]"))||(d.dragndropPluginOptions.isDocumentDroppable?p:null),l!==i&&(l&&(e.type="dragleave",(e.target=l).dispatchEvent(e)),i&&(e.type="dragenter",(e.target=i).dispatchEvent(e)),l=i)&&(e.type="dragover",(e.target=l).dispatchEvent(e));case 21:case"end":return t.stop()}},t)}));return function(t){return e.apply(this,arguments)}}(),r.addEventListener("pointermove",e),u.addEventListener("pointerup",t=function(t){a&&(t.detail={preventClick:!0},t=t.clone(),l&&(t.type="drop",(t.target=l).dispatchEvent(t)),t.type="dragend",f.dispatchEvent(t),a=!1),r.removeEventListener("pointermove",e)},{once:!0}),u.addEventListener("pointerupoutside",t,{once:!0}))}var d=this,n=t.renderingService,p=t.renderingContext.root.ownerDocument,r=p.defaultView;n.hooks.init.tapPromise(i.tag,of(rf().mark(function t(){return rf().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(i.tag,function(){r.removeEventListener("pointerdown",e)})},i}(),uf=(cf.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),lf(r.prototype.constructor=r,t);var r=e.prototype;return r.init=function(){this.addRenderingPlugin(new cf(sf({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))},r.destroy=function(){this.removeAllRenderingPlugins()},r.setOptions=function(t){Object.assign(this.plugins[0].dragndropPluginOptions,t)},e}(Dl)),hf=(ff.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},ff.prototype.once=function(t,e){return this.on(t,e,!0)},ff.prototype.emit=function(a){for(var o=this,s=[],t=1;t<arguments.length;t++)s[t-1]=arguments[t];function e(t){for(var e,n,r=t.length,i=0;i<r;i++)t[i]&&(n=(e=t[i]).callback,e.once&&(t.splice(i,1),0===t.length&&delete o._events[a],r--,i--),n.apply(o,s))}var n=this._events[a]||[],r=this._events["*"]||[];e(n),e(r)},ff.prototype.off=function(t,e){if(t)if(e){for(var n=this._events[t]||[],r=n.length,i=0;i<r;i++)n[i].callback===e&&(n.splice(i,1),r--,i--);0===n.length&&delete this._events[t]}else delete this._events[t];else this._events={};return this},ff.prototype.getEvents=function(){return this._events},ff);function ff(){this._events={}}const df=()=>[["cartesian"]],pf=(df.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),gf=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=pf(t);return[["translate",0,.5],["reflect.y"],["translate",0,-.5],["polar",t,e,n,r]]},mf=(gf.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]]),yf=(mf.props={},()=>[["transpose"],["translate",.5,.5],["reflect.x"],["translate",-.5,-.5]]),vf=(yf.props={transform:!0},t=>{[t={}]=[t],e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};var{startAngle:e,endAngle:t,innerRadius:n,outerRadius:r}=Object.assign(Object.assign({},e),t);return[...yf(),...gf({startAngle:e,endAngle:t,innerRadius:n,outerRadius:r})]}),bf=(vf.props={},(t={})=>{var e={startAngle:-Math.PI/2,endAngle:3*Math.PI/2,innerRadius:0,outerRadius:1};return Object.assign(Object.assign({},e),t)}),xf=t=>{var{startAngle:t,endAngle:e,innerRadius:n,outerRadius:r}=bf(t);return[["transpose"],["translate",.5,.5],["reflect"],["translate",-.5,-.5],...gf({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]},wf=(xf.props={},()=>[["parallel",0,1,0,1]]),kf=(wf.props={},({focusX:t=0,focusY:e=0,distortionX:n=2,distortionY:r=2,visual:i=!1})=>[["fisheye",t,e,n,r,i]]),Mf=(kf.props={transform:!0},t=>{var{startAngle:t=-Math.PI/2,endAngle:e=3*Math.PI/2,innerRadius:n=0,outerRadius:r=1}=t;return[...wf(),...gf({startAngle:t,endAngle:e,innerRadius:n,outerRadius:r})]}),Ef=(Mf.props={},({value:e})=>t=>t.map(()=>e)),Of=(Ef.props={},({value:e})=>t=>t.map(e)),Sf=(Of.props={},({value:e})=>t=>t.map(t=>t[e])),_f=(Sf.props={},({value:t})=>()=>t);function Af(t,e){return t.parent===e.parent?1:2}function Pf(t,e){return t+e.x}function Tf(t,e){return Math.max(t,e.y)}function Lf(){var s=Af,l=1,c=1,u=!1;function e(e){var r,i=0,t=(e.eachAfter(function(t){var e,n=t.children;n?(t.x=(e=n).reduce(Pf,0)/e.length,t.y=1+n.reduce(Tf,0)):(t.x=r?i+=s(t,r):0,t.y=0,r=t)}),function(t){for(var e;e=t.children;)t=e[0];return t}(e)),n=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),a=t.x-s(t,n)/2,o=n.x+s(n,t)/2;return e.eachAfter(u?function(t){t.x=(t.x-e.x)*l,t.y=(e.y-t.y)*c}:function(t){t.x=(t.x-a)/(o-a)*l,t.y=(1-(e.y?t.y/e.y:1))*c})}return e.separation=function(t){return arguments.length?(s=t,e):s},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function Nf(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 Cf(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=Rf)):void 0===e&&(e=jf);for(var n,r,i,a,o,t=new Ff(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 Ff(i[a])),r.parent=n,r.depth=n.depth+1;return t.eachBefore(Bf)}function jf(t){return t.children}function Rf(t){return Array.isArray(t)?t[1]:null}function If(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Bf(t){for(var e=0;t.height=e,(t=t.parent)&&t.height<++e;);}function Ff(t){this.data=t,this.depth=this.height=0,this.parent=null}function Df(t){return null==t?null:zf(t)}function zf(t){if("function"!=typeof t)throw new Error;return t}function Gf(){return 0}function Wf(t){return function(){return t}}_f.props={},Ff.prototype=Cf.prototype={constructor:Ff,count:function(){return this.eachAfter(Nf)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,a=this,o=[a],s=[],l=-1;a=o.pop();)if(s.push(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r]);for(;a=s.pop();)t.call(e,a,++l,this);return this},eachBefore:function(t,e){for(var n,r,i,a=[this],o=-1;n=a.pop();)if(t.call(e,n,++o,this),r=n.children)for(i=r.length-1;0<=i;--i)a.push(r[i]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},sum:function(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;0<=--r;)e+=n[r].value;t.value=e})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,n=[];return e.each(function(t){t!==e&&n.push({source:t.parent,target:t})}),n},copy:function(){return Cf(this).eachBefore(If)},[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 Hf=4294967296;function Yf(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&&qf(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 Xf(t[0],t[1]);case 3:return $f(t[0],t[1],t[2])}}(o=function(t,e){var n,r;if(Uf(e,t))return[e];for(n=0;n<t.length;++n)if(Vf(e,t[n])&&Uf(Xf(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(Vf(Xf(t[n],t[r]),e)&&Vf(Xf(t[n],e),t[r])&&Vf(Xf(t[r],e),t[n])&&Uf($f(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}(o,n)),i=0);return r}function Vf(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 qf(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 Uf(t,e){for(var n=0;n<e.length;++n)if(!qf(t,e[n]))return;return 1}function Xf(t,e){var n=t.x,r=t.y,t=t.r,i=e.x,a=e.y,e=e.r,o=i-n,s=a-r,l=e-t,c=Math.sqrt(o*o+s*s);return{x:(n+i+o/c*l)/2,y:(r+a+s/c*l)/2,r:(c+t+e)/2}}function $f(t,e,n){var r=t.x,i=t.y,t=t.r,a=e.x,o=e.y,e=e.r,s=n.x,l=n.y,n=n.r,c=r-a,u=r-s,h=i-o,f=i-l,d=e-t,p=n-t,g=r*r+i*i-t*t,a=g-a*a-o*o+e*e,o=g-s*s-l*l+n*n,e=u*h-c*f,g=(h*o-f*a)/(2*e)-r,s=(f*d-h*p)/e,l=(u*a-c*o)/(2*e)-i,n=(c*p-u*d)/e,f=s*s+n*n-1,h=2*(t+g*s+l*n),a=g*g+l*l-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+l+n*o,r:o}}function Kf(t,e,n){var r,i,a,o,s=t.x-e.x,l=t.y-e.y,c=s*s+l*l;c?(i=e.r+n.r,o=t.r+n.r,(o*=o)<(i*=i)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*l,n.y=t.y-r*l+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*l,n.y=e.y+r*l+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Zf(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 Qf(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 Jf(t){this._=t,this.next=null,this.previous=null}function td(t,e){if(!(a=(t="object"==typeof(n=t)&&"length"in n?n:Array.from(n)).length))return 0;var n,r,i,a,o,s,l,c,u,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;Kf(r,d,i=t[2]),d=new Jf(d),r=new Jf(r),i=new Jf(i),((d.next=i.previous=r).next=d.previous=i).next=r.previous=d;t:for(l=3;l<a;++l){Kf(d._,r._,i=t[l]),i=new Jf(i),c=r.next,u=d.previous,h=r._.r,f=d._.r;do{if(h<=f){if(Zf(c._,i._)){r=c,(d.next=r).previous=d,--l;continue t}h+=c._.r,c=c.next}else{if(Zf(u._,i._)){((d=u).next=r).previous=d,--l;continue t}f+=u._.r,u=u.previous}}while(c!==u.next);for(i.previous=d,i.next=r,d.next=r.previous=r=i,o=Qf(d);(i=i.next)!==r;)(s=Qf(i))<o&&(d=i,o=s);r=d.next}for(d=[r._],i=r;(i=i.next)!==r;)d.push(i._);for(i=Yf(d,e),l=0;l<a;++l)(d=t[l]).x-=i.x,d.y-=i.y;return i.r}function ed(t){return Math.sqrt(t.value)}function nd(){var n=null,r=1,i=1,a=Gf;function e(t){var e=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Hf)/Hf}();return t.x=r/2,t.y=i/2,n?t.eachBefore(rd(n)).eachAfter(id(a,.5,e)).eachBefore(ad(1)):t.eachBefore(rd(ed)).eachAfter(id(Gf,1,e)).eachAfter(id(a,t.r/Math.min(r,i),e)).eachBefore(ad(Math.min(r,i)/(2*t.r))),t}return e.radius=function(t){return arguments.length?(n=Df(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:Wf(+t),e):a},e}function rd(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function id(o,s,l){return function(t){if(e=t.children){var e,n,r,i=e.length,a=o(t)*s||0;if(a)for(n=0;n<i;++n)e[n].r+=a;if(r=td(e,l),a)for(n=0;n<i;++n)e[n].r-=a;t.r=r+a}}}function ad(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 od(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 sd(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(r-e)/t.value;++s<l;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}var ld={depth:-1},cd={},ud={};function hd(t){return t.id}function fd(t){return t.parentId}function dd(){var m,y=hd,v=fd;function e(n){var e,t,r,i,a,o,s,l,c=Array.from(n),u=y,h=v,f=new Map;if(null!=m){const p=c.map((t,e)=>{t=m(t,e,n),e=(t=""+t).length;return"/"===(t=gd(t,e-1)&&!gd(t,e-2)?t.slice(0,-1):t)[0]?t:"/"+t}),g=p.map(pd);var d=new Set(p).add("");for(const r of g)d.has(r)||(d.add(r),p.push(r),g.push(pd(r)),c.push(ud));u=(t,e)=>p[e],h=(t,e)=>g[e]}for(r=0,e=c.length;r<e;++r)t=c[r],o=c[r]=new Ff(t),null!=(s=u(t,r,n))&&(s+="")&&(l=o.id=s,f.set(l,f.has(l)?cd:o)),null!=(s=h(t,r,n))&&(s+="")&&(o.parent=s);for(r=0;r<e;++r)if(s=(o=c[r]).parent){if(!(a=f.get(s)))throw new Error("missing: "+s);if(a===cd)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!=m){for(;i.data===ud&&1===i.children.length;)i=i.children[0],--e;for(let t=c.length-1;0<=t&&(o=c[t]).data===ud;--t)o.data=null}if(i.parent=ld,i.eachBefore(function(t){t.depth=t.parent.depth+1,--e}).eachBefore(Bf),i.parent=null,0<e)throw new Error("cycle");return i}return e.id=function(t){return arguments.length?(y=Df(t),e):y},e.parentId=function(t){return arguments.length?(v=Df(t),e):v},e.path=function(t){return arguments.length?(m=Df(t),e):m},e}function pd(t){let e=t.length;if(e<2)return"";for(;1<--e&&!gd(t,e););return t.slice(0,e)}function gd(e,n){if("/"===e[n]){let t=0;for(;0<n&&"\\"===e[--n];)++t;if(0==(1&t))return 1}}function md(t,e){return t.parent===e.parent?1:2}function yd(t){var e=t.children;return e?e[0]:t.t}function vd(t){var e=t.children;return e?e[e.length-1]:t.t}function bd(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 xd(){var f=md,l=1,c=1,u=null;function e(t){var e,n,r,i,a,o,s=function(t){for(var e,n,r,i,a,o=[t=new bd(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 bd(r[i],i)),n.parent=e;return(t.parent=new bd(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=l/(n.x+s+i),o=c/(r.depth||1),t.eachBefore(function(t){t.x=(t.x+i)*a,t.y=t.depth*o})),t}function 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,l=s.length;0<=--l;)(i=s[l]).z+=a,i.m+=a,a+=i.s+(o+=i.c);e=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+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],l=i.m,c=a.m,u=o.m,h=s.m;o=vd(o),i=yd(i),o&&i;)s=yd(s),(a=vd(a)).a=t,0<(r=o.z+u-i.z-l+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),l+=r,c+=r),u+=o.m,l+=i.m,h+=s.m,c+=a.m;o&&!vd(a)&&(a.t=o,a.m+=u-c),i&&!yd(s)&&(s.t=i,s.m+=l-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*=l,t.y=t.depth*c}return e.separation=function(t){return arguments.length?(f=t,e):f},e.size=function(t){return arguments.length?(u=!1,l=+t[0],c=+t[1],e):u?null:[l,c]},e.nodeSize=function(t){return arguments.length?(u=!0,l=+t[0],c=+t[1],e):u?[l,c]:null},e}function wd(t,e,n,r,i){for(var a,o=t.children,s=-1,l=o.length,c=t.value&&(i-n)/t.value;++s<l;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}bd.prototype=Object.create(Ff.prototype);r=(1+Math.sqrt(5))/2;function kd(t,e,n,r,i,a){for(var o,s,l,c,u,h,f,d,p,g,m,y=[],v=e.children,b=0,x=0,w=v.length,k=e.value;b<w;){for(l=i-n,c=a-r;!(u=v[x++].value)&&x<w;);for(m=(h=f=u)*u*(g=Math.max(c/l,l/c)/(k*t)),p=Math.max(f/m,m/h);x<w;++x){if(u+=s=v[x].value,s<h&&(h=s),f<s&&(f=s),m=u*u*g,p<(d=Math.max(f/m,m/h))){u-=s;break}p=d}y.push(o={value:u,dice:l<c,children:v.slice(b,x)}),o.dice?sd(o,n,r,i,k?r+=c*u/k:a):wd(o,n,r,k?n+=l*u/k:i,a),k-=u,b=x}return y}var Md=function e(a){function t(t,e,n,r,i){kd(a,t,e,n,r,i)}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(r);function Ed(t,e,n,r,i){var a,o,g=t.children,s=g.length,m=new Array(s+1);for(m[0]=o=a=0;a<s;++a)m[a+1]=o+=g[a].value;!function t(e,n,r,i,a,o,s){if(n-1<=e)return(l=g[e]).x0=i,l.y0=a,l.x1=o,void(l.y1=s);var l=m[e],c=r/2+l,u=e+1,h=n-1;for(;u<h;){var f=u+h>>>1;m[f]<c?u=1+f:h=f}c-m[u-1]<m[u]-c&&e+1<u&&--u;var l=m[u]-l,d=r-l;{var p;s-a<o-i?(t(e,u,l,i,a,p=r?(i*d+o*l)/r:o,s),t(u,n,d,p,a,o,s)):(t(e,u,l,i,a,o,p=r?(a*d+s*l)/r:s),t(u,n,d,i,p,o,s))}}(0,s,t.value,e,n,r,i)}function Od(t,e,n,r,i){(1&t.depth?wd:sd)(t,e,n,r,i)}var Sd=function e(d){function t(t,e,n,r,i){if((a=t._squarify)&&a.ratio===d)for(var a,o,s,l,c,u=-1,h=a.length,f=t.value;++u<h;){for(s=(o=a[u]).children,l=o.value=0,c=s.length;l<c;++l)o.value+=s[l].value;o.dice?sd(o,e,n,r,f?n+=(i-n)*o.value/f:i):wd(o,e,n,f?e+=(r-e)*o.value/f:r,i),f-=o.value}else t._squarify=a=kd(d,t,e,n,r,i),a.ratio=d}return t.ratio=function(t){return e(1<(t=+t)?t:1)},t}(r);function _d(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 Ad(t={}){return[..._d(t),{name:"title",scale:"identity"}]}function Pd(){return[{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["x","y"]}]}function Td(){return[{type:"maybeTitle",channel:"x"},{type:"maybeTooltip",channel:["y"]}]}function Ld(t={}){return _d(t)}function Nd(){return[{type:"maybeKey"}]}function Cd(t,e){return t.getBandWidth(t.invert(e))}function jd(t,e,n={}){const{x:a,y:o,series:s}=e,{x:l,y:c,series:u}=t,{style:{bandOffset:r=u?0:.5,bandOffsetX:h=r,bandOffsetY:f=r}={}}=n,d=!(null===l||void 0===l||!l.getBandWidth),p=!(null===c||void 0===c||!c.getBandWidth),g=!(null===u||void 0===u||!u.getBandWidth);return d||p?(t,e)=>{const n=d?Cd(l,a[e]):0;var r=p?Cd(c,o[e]):0,e=g&&s?(Cd(u,s[e])/2+ +s[e])*n:0,[t,i]=t;return[t+h*n+e,i+f*r]}:t=>t}function Rd(t){return parseFloat(t)/100}function Id(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?Rd(e)*o:+e,"string"==typeof t?Rd(t)*s:+t]]})]}function Bd(e){return"function"==typeof e?e:t=>t[e]}function Fd(t,e){return Array.from(t,Bd(e))}function Dd(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=Fd(t,e),o=Fd(t,n),s=Fd(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 zd(t,e){return t.getBandWidth(t.invert(e))}const Gd=()=>(t,e,n,i)=>{const{x:a,y:o,y1:s,series:l,size:r}=n,c=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=zd(c,a[t]),n=e*(u?zd(u,null===l||void 0===l?void 0:l[t]):1),e=(+(null===l||void 0===l?void 0:l[t])||0)*e,e=+a[t]+e,[e,n]=d(e,n,t),r=+o[t],t=+s[t];return[[e,r],[n,r],[n,t],[e,t]].map(t=>i.map(t))})]};Gd.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["rect","hollow","funnel","pyramid"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"},{name:"size"}],preInference:[...Nd(),{type:"maybeZeroY1"},{type:"maybeZeroX"}],postInference:[...Td()],interaction:{shareTooltip:!0}};const Wd=()=>(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 Hd(t,e){return null==t||null==e?NaN:t<e?-1:e<t?1:e<=t?0:NaN}function Yd(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=Hd,o=(t,e)=>Hd(n(t),e),(t,e)=>n(t)-e):(a=n===Hd||n===function(t,e){return null==t||null==e?NaN:e<t?-1:t<e?1:t<=e?0:NaN}?n:Vd,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 Vd(){return 0}function*qd(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)}}Wd.props={defaultShape:"rect",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["rect","hollow"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Nd(),{type:"maybeZeroY1"}],postInference:[...Td()],interaction:{shareTooltip:!0}};Bl=Yd(Hd);const Ud=Bl.right,Xd=Bl.left,$d=Yd(function(t){return null===t?NaN:+t}).center;function Kd(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 Zd(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 Qd(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 Jd{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 tp 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(ep(this,t))}has(t){return super.has(ep(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 ep({_intern:t,_key:e},n){e=e(n);return t.has(e)?t.get(e):n}function np(t){return t}function rp(t,...e){return op(t,np,np,e)}function ip(t,e,...n){return op(t,np,e,n)}function ap(t,e,...n){return op(t,Array.from,e,n)}function op(t,u,h,f){return function t(e,n){if(n>=f.length)return h(e);var r=new tp,i=f[n++];let a=-1;for(const l of e){var o=i(l,++a,e),s=r.get(o);s?s.push(l):r.set(o,[l])}for(const[c,e]of r)r.set(c,t(e,n));return u(r)}(t,0)}function sp(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=cp(r[t],r[e]);if(n)return n}})):(n=e.map(n),t.sort((t,e)=>cp(n[t],n[e]))),r=e,Array.from(t,t=>r[t])):e.sort(lp(n))}function lp(r=Hd){if(r===Hd)return cp;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 cp(t,e){return(null==t||!(t<=t))-(null==e||!(e<=e))||(t<e?-1:e<t?1:0)}var up=Array.prototype.slice;function hp(t){return()=>t}const fp=Math.sqrt(50),dp=Math.sqrt(10),pp=Math.sqrt(2);function gp(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),r=r/Math.pow(10,i),r=r>=fp?10:r>=dp?5:r>=pp?2:1;let a,o,s;return i<0?(s=Math.pow(10,-i)/r,a=Math.round(t*s),o=Math.round(e*s),a/s<t&&++a,o/s>e&&--o,s=-s):(s=Math.pow(10,i)*r,a=Math.round(t/s),o=Math.round(e/s),a*s<t&&++a,o*s>e&&--o),o<a&&.5<=n&&n<2?gp(t,e,2*n):[a,o,s]}function mp(t,e,n){return gp(t=+t,e=+e,n=+n)[2]}function yp(t){return Math.max(1,Math.ceil(Math.log(Kd(t))/Math.LN2)+1)}function vp(){var y=np,v=Qd,b=yp;function e(t){for(var e,n,r=(t=Array.isArray(t)?t:Array.from(t)).length,i=new Array(r),a=0;a<r;++a)i[a]=y(t[a],a,t);var o=v(i),s=o[0],l=o[1],c=b(i,s,l);if(!Array.isArray(c)){var o=l,u=+c;if(v===Qd&&([s,l]=function(t,e,n){let r;for(;;){var i=mp(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];0<i?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(s,l,u)),(c=function(t,e,n){if(!(0<(n=+n)))return[];if((t=+t)===(e=+e))return[t];var r=e<t,[i,a,o]=r?gp(e,t,n):gp(t,e,n);if(!(i<=a))return[];var s=a-i+1,l=new Array(s);if(r)if(o<0)for(let t=0;t<s;++t)l[t]=(a-t)/-o;else for(let t=0;t<s;++t)l[t]=(a-t)*o;else if(o<0)for(let t=0;t<s;++t)l[t]=(i+t)/-o;else for(let t=0;t<s;++t)l[t]=(i+t)*o;return l}(s,l,u))[0]<=s&&(n=mp(s,l,u)),c[c.length-1]>=l)if(l<=o&&v===Qd){const n=mp(s,l,u);isFinite(n)&&(0<n?l=(Math.floor(l/n)+1)*n:n<0&&(l=(Math.ceil(l*-n)+1)/-n))}else c.pop()}for(var h=c.length,f=0,d=h;c[f]<=s;)++f;for(;c[d-1]>l;)--d;(f||d<h)&&(c=c.slice(f,d),h=d-f);var p,g,m=new Array(h+1);for(a=0;a<=h;++a)(p=m[a]=[]).x0=0<a?c[a-1]:s,p.x1=a<h?c[a]:l;if(isFinite(n)){if(0<n)for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&m[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<=l&&(g=Math.floor((s-e)*n),m[Math.min(h,g+(c[g]<=e))].push(t[a]))}else for(a=0;a<r;++a)null!=(e=i[a])&&s<=e&&e<=l&&m[Ud(c,e,0,h)].push(t[a]);return m}return e.value=function(t){return arguments.length?(y="function"==typeof t?t:hp(t),e):y},e.domain=function(t){return arguments.length?(v="function"==typeof t?t:hp([t[0],t[1]]),e):v},e.thresholds=function(t){return arguments.length?(b="function"==typeof t?t:hp(Array.isArray(t)?up.call(t):t),e):b},e}function bp(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 xp(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 wp(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 kp(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 Mp(n,r,i=0,a=1/0,o){if(r=Math.floor(r),i=Math.floor(Math.max(0,i)),a=Math.floor(Math.min(n.length-1,a)),i<=r&&r<=a)for(o=void 0===o?cp:lp(o);i<a;){600<a-i&&(s=a-i+1,l=r-i+1,u=Math.log(s),c=.5*Math.exp(2*u/3),u=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1),Mp(n,r,Math.max(i,Math.floor(r-l*c/s+u)),Math.min(a,Math.floor(r+(s-l)*c/s+u)),o));var s,l,c,u,h=n[r];let t=i,e=a;for(Ep(n,i,r),0<o(n[a],h)&&Ep(n,i,a);t<e;){for(Ep(n,t,e),++t,--e;o(n[t],h)<0;)++t;for(;0<o(n[e],h);)--e}0===o(n[i],h)?Ep(n,i,e):Ep(n,++e,a),e<=r&&(i=e+1),r<=e&&(a=e-1)}return n}function Ep(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function Op(t,e,n){var r;if((n=(t=Float64Array.from(qd(t,n))).length)&&!isNaN(e=+e))return e<=0||n<2?wp(t):1<=e?bp(t):(n=(n-1)*e,(r=bp(Mp(t,e=Math.floor(n)).subarray(0,e+1)))+(wp(t.subarray(e+1))-r)*(n-e))}function Sp(r,t,i){if((i=(r=Float64Array.from(qd(r,i))).length)&&!isNaN(t=+t)){if(t<=0||i<2)return kp(r);if(1<=t)return xp(r);t=Math.floor((i-1)*t),i=Mp(Uint32Array.from(r,(t,e)=>e),t,0,i-1,(t,e)=>cp(r[t],r[e]));{var i=i.subarray(0,t+1),a=t=>r[t];let e,n=!1;if(1===a.length){let t;for(const s of i){var o=a(s);(n?0<Hd(o,t):0===Hd(o,o))&&(e=s,t=o,n=!0)}}else for(const l of i)(n?0<a(l,e):0===a(l,l))&&(e=l,n=!0);return e}}}function _p(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 Ap(t,e){return Op(t,.5,e)}function Pp(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function Tp(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 Lp(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 Np(t){t=t.getOptions().transformations;return t.map(([t])=>t).filter(t=>"transpose"===t).length%2!=0}function Cp(t){t=t.getOptions().transformations;return t.some(([t])=>"polar"===t)}function jp(t){t=t.getOptions().transformations;return t.some(([t])=>"reflect"===t)&&t.some(([t])=>t.startsWith("transpose"))}function Rp(t){t=t.getOptions().transformations;return t.some(([t])=>"helix"===t)}function Ip(t){t=t.getOptions().transformations;return t.some(([t])=>"parallel"===t)}function Bp(t){t=t.getOptions().transformations;return t.some(([t])=>"fisheye"===t)}function Fp(t){return Rp(t)||Cp(t)}function Dp(t){var t=t.getOptions()["transformations"],[,,,t,e]=t.find(t=>"polar"===t[0]);return[+t,+e]}function zp(t,e=!0){var t=t.getOptions()["transformations"],[,t,n]=t.find(t=>"polar"===t[0]);return e?[180*+t/Math.PI,180*+n/Math.PI]:[t,n]}const Gp=(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],l=t.map(t=>t[0]);const c=((null==(i=null==n?void 0:n.getBandWidth)?void 0:i.call(n))||0)/2,u=((null==(i=null==e?void 0:e.getBandWidth)?void 0:i.call(e))||0)/2;return[l,Array.from(t,t=>t.map(t=>r.map([+o[t]+c,+s[t]+u]))),t]},Wp=(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})]},Hp=()=>(t,e,n,r)=>{return(Ip(r)?Wp:Gp)(t,e,n,r)};Hp.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["line","smooth"]}),{name:"x"},{name:"y"},{name:"position",independent:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...Nd(),{type:"maybeSeries"},{type:"maybeGradient"}],postInference:[...Td(),{type:"maybeTitle",channel:"color"},{type:"maybeTooltip",channel:["position"]}],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Yp=g=>(t,e,n,o)=>{const{x:r,y:i,x1:a,y1:s,size:l,dx:c,dy:u}=n,[h,f]=o.getSize(),d=jd(e,n,g),p=t=>{var e=+((null===c||void 0===c?void 0:c[t])||0),n=+((null===u||void 0===u?void 0:u[t])||0);return[(a?(+r[t]+ +a[t])/2:+r[t])+e,(s?(+i[t]+ +s[t])/2:+i[t])+n]};return[t,l?Array.from(t,t=>{var[e,n]=p(t),r=+l[t],i=r/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))])]};Yp.props={defaultShape:"hollow",defaultLabelShape:"label",composite:!1,channels:[...Ad({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:[...Nd(),{type:"maybeZeroY"},{type:"maybeZeroX"}],postInference:[{type:"maybeSize"},...Pd()]};const Vp=s=>{const{cartesian:l=!1}=s;return l?Id:(t,e,n,r)=>{if(l)return Id(t,0,n,r);const{x:i,y:a}=n,o=jd(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};Vp.props={defaultShape:"text",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["text","badge"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"text",scale:"identity"},{name:"fontSize"},{name:"rotate"}],preInference:[...Nd(),{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...Pd()]};const qp=()=>(t,e,n,i)=>{const{x:a,y:o}=n,s=e.x,l=e.y;return[t,Array.from(t,t=>{var e=s.getBandWidth(s.invert(+a[t])),n=l.getBandWidth(l.invert(+o[t])),r=+a[t],t=+o[t];return[[r,t],[r+e,t],[r+e,t+n],[r,t+n]].map(t=>i.map(t))})]};qp.props={defaultShape:"cell",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["cell","hollow"]}),{name:"x",required:!0,scale:"band"},{name:"y",required:!0,scale:"band"}],preInference:[...Nd(),{type:"maybeZeroX"},{type:"maybeZeroY"},{type:"maybeZeroPadding"}],postInference:[...Pd()]};const Up=()=>(t,e,n,a)=>{const{x:o,y:s,y1:l,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],+l[i]])}return r}),n]};Up.props={defaultShape:"area",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["area","smooth","hvh","hv","vh"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"size"},{name:"series",scale:"identity"}],preInference:[...Nd(),{type:"maybeSeries"},{type:"maybeZeroY1"},{type:"maybeZeroPadding"}],postInference:[...Td()],interaction:{shareTooltip:!0,seriesTooltip:!0,crosshairs:!0}};const Xp=c=>(t,e,n,r)=>{const{x:i,y:a,x1:o=i,y1:s=a}=n,l=jd(e,n,c);e=t.map(t=>[r.map(l([+i[t],+a[t]],t)),r.map(l([+o[t],+s[t]],t))]);return[t,e]};Xp.props={defaultShape:"link",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["link","arc","vhv","smooth"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Nd(),{type:"maybeIdentityY"},{type:"maybeIdentityX"}],postInference:[...Pd()]};const $p=s=>{var t=s["cartesian"];return t?Id:(t,e,n,r)=>{const{x:i,y:a}=n,o=jd(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}};$p.props={defaultShape:"image",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["image"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"src",scale:"identity"},{name:"size"}],preInference:[...Nd(),{type:"maybeTuple"},{type:"maybeVisualPosition"}],postInference:[...Pd()]};const Kp=()=>(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]};Kp.props={defaultShape:"polygon",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["polygon","ribbon"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Nd()],postInference:[...Pd()]};const Zp=()=>(t,e,n,s)=>{const{x:l,y:c,y1:u,y2:h,y3:f,y4:d,series:p}=n,g=e.x,m=e.series;return[t,Array.from(t,t=>{var e=g.getBandWidth(g.invert(+l[t])),n=e*(m?m.getBandWidth(m.invert(+(null===p||void 0===p?void 0:p[t]))):1),e=(+(null===p||void 0===p?void 0:p[t])||0)*e,e=+l[t]+e+n/2,[t,r,i,a,o]=[+c[t],+u[t],+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))})]},Qp=(Zp.props={defaultShape:"box",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["box"]}),{name:"x",scale:"band",required:!0},{name:"y",required:!0},{name:"series",scale:"band"}],preInference:[...Nd(),{type:"maybeZeroX"}],postInference:[...Td()],interaction:{shareTooltip:!0}},()=>(t,e,n,i)=>{const{x:a,y:o,size:s,rotate:l}=n,[c,u]=i.getSize();n=t.map(t=>{var e=+l[t]/180*Math.PI,n=+s[t],r=n/c,n=n/u,r=r*Math.cos(e),n=-n*Math.sin(e);return[i.map([+a[t]-r/2,+o[t]-n/2]),i.map([+a[t]+r/2,+o[t]+n/2])]});return[t,n]});Qp.props={defaultShape:"vector",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["vector"]}),{name:"x",required:!0},{name:"y",required:!0},{name:"rotate",required:!0,scale:"identity"},{name:"size",required:!0}],preInference:[...Nd()],postInference:[...Pd()]};const Jp=()=>(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))})]};Jp.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...Ld({shapes:["line"]}),{name:"y",required:!0}],preInference:[...Nd(),{type:"maybeTupleY"}],postInference:[]};const t0=()=>(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))})]};t0.props={defaultShape:"line",defaultLabelShape:"label",composite:!1,channels:[...Ld({shapes:["line"]}),{name:"x",required:!0}],preInference:[...Nd(),{type:"maybeTupleX"}],postInference:[]};const e0=(...t)=>Xp(...t);function n0(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 r0(t={}){const{extendX:r=!1,extendY:s=!1}=t;return(t,e,n,i)=>{const a=n0("x",r,n,e.x),o=n0("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))})]}}e0.props={defaultShape:"connector",defaultLabelShape:"label",composite:!1,channels:[...Ld({shapes:["connector"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Nd()],postInference:[]};const i0=()=>r0();i0.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...Ld({shapes:["range"]}),{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Nd()],postInference:[]};const a0=()=>r0({extendY:!0});a0.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...Ld({shapes:["range"]}),{name:"x",required:!0}],preInference:[...Nd()],postInference:[]};const o0=()=>r0({extendX:!0});function s0(t){return t.target.depth}function l0(t,e){return t.sourceLinks.length?t.depth:e-1}function c0(t){return function(){return t}}function u0(t,e){return f0(t.source,e.source)||t.index-e.index}function h0(t,e){return f0(t.target,e.target)||t.index-e.index}function f0(t,e){return t.y0-e.y0}function d0(t){return t.value}function p0(t){return t.index}function g0(t){return t.nodes}function m0(t){return t.links}function y0(t,e){t=t.get(e);if(t)return t;throw new Error("missing: "+e)}function v0({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 b0(){let x=0,w=0,k=1,M=1,E=24,O=8,S,_=p0,A=l0,P,T,L,N=g0,C=m0,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=y0(g,n)),"object"!=typeof r&&(r=t.target=y0(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 m of t)m.value=void 0===m.fixedValue?Math.max(Lp(m.sourceLinks,d0),Lp(m.targetLinks,d0)):m.fixedValue;{var a=e.nodes,o=a.length;let t=new Set(a),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.depth=r;for(var{target:e}of t.sourceLinks)n.add(e)}),++r>o)throw new Error("circular link");t=n,n=new Set}if(P){var s,l=Math.max(bp(a,t=>t.depth)+1,0);for(let t=0;t<a.length;t++)(s=a[t]).depth=P.call(null,s,l)}}{var c=(i=e.nodes).length;let t=new Set(i),n=new Set,r=0;for(;t.size;){if(t.forEach(t=>{t.height=r;for(var{source:e}of t.targetLinks)n.add(e)}),++r>c)throw new Error("circular link");t=n,n=new Set}}var u=function({nodes:t}){var e=Math.max(bp(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(T)for(const o of r)o.sort(T);return r}(e),t=(S=Math.min(O,(M-w)/(bp(u,t=>t.length)-1)),u),h=wp(t,t=>(M-w-(t.length-1)*S)/Lp(t,d0));for(const y of t){let e=w;for(const v of y){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)/(y.length+1);for(let t=0;t<y.length;++t){var f=y[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(h0),n.sort(u0)}(y)}for(let t=0;t<j;++t){var d=Math.pow(.99,t),p=Math.max(1-d,(t+1)/j);!function(n,r,i){for(let t=n.length,e=t-2;0<=e;--e){var a,o=n[e];for(const c of o){let t=0,e=0;for(var{target:s,value:l}of c.sourceLinks){l=l*(s.layer-c.layer);t+=function(t,e){let n=e.y0-(e.targetLinks.length-1)*S/2;for(var{source:r,width:i}of e.targetLinks){if(r===t)break;n+=i+S}for(var{target:a,width:o}of t.sourceLinks){if(a===e)break;n-=o}return n}(c,s)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===T&&o.sort(f0),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 c of o){let t=0,e=0;for(var{source:s,value:l}of c.targetLinks){l=l*(c.layer-s.layer);t+=function(t,e){let n=t.y0-(t.sourceLinks.length-1)*S/2;for(var{target:r,width:i}of t.sourceLinks){if(r===e)break;n+=i+S}for(var{source:a,width:o}of e.targetLinks){if(a===t)break;n-=o}return n}(s,c)*l,e+=l}0<e&&(a=(t/e-c.y0)*r,c.y0+=a,c.y1+=a,I(c))}void 0===T&&o.sort(f0),o.length&&R(o,i)}}(u,d,p)}return v0(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 I({sourceLinks:t,targetLinks:e}){if(void 0===L){for(const{source:{sourceLinks:t}}of e)t.sort(h0);for(const{target:{targetLinks:e}}of t)e.sort(u0)}}return e.update=function(t){return v0(t),t},e.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:c0(t),e):_},e.nodeAlign=function(t){return arguments.length?(A="function"==typeof t?t:c0(t),e):A},e.nodeDepth=function(t){return arguments.length?(P=t,e):P},e.nodeSort=function(t){return arguments.length?(T=t,e):T},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:c0(t),e):N},e.links=function(t){return arguments.length?(C="function"==typeof t?t:c0(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}o0.props={defaultShape:"range",defaultLabelShape:"label",composite:!1,channels:[...Ld({shapes:["range"]}),{name:"y",required:!0}],preInference:[...Nd()],postInference:[]};const x0={nodeAlign:"justify",nodeWidth:.008,nodePadding:.03,nodes:t=>t.nodes,links:t=>t.links,nodeSort:void 0,linkSort:void 0,iterations:6},w0={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?wp(t.sourceLinks,s0)-1:0},justify:l0};const k0=h=>t=>{var{nodeId:e,nodeSort:n,nodeAlign:r,nodeWidth:i,nodePadding:a,nodeDepth:o,nodes:s,links:l,linkSort:c,iterations:u}=Object.assign({},x0,h),l=b0().nodeSort(n).linkSort(c).links(l).nodes(s).nodeWidth(i).nodePadding(a).nodeDepth(o).nodeAlign("string"==(c=typeof(n=r))?w0[n]||l0:"function"==c?n:l0).iterations(u).extent([[0,0],[1,1]]),s=("function"==typeof e&&l.nodeId(e),l(t)),{nodes:i,links:a}=s;return{nodes:i.map(t=>{var{x0:e,x1:n,y0:r,y1:i}=t;return Object.assign(Object.assign({},t),{x:[e,n,n,e],y:[r,r,i,i]})}),links:a.map(t=>{var{source:e,target:n}=t,e=e.x1,n=n.x0,r=t.width/2;return Object.assign(Object.assign({},t),{x:[e,e,n,n],y:[t.y0+r,t.y0-r,t.y1+r,t.y1-r]})})}};function M0(t){return t}function E0(t){return t.replace(/( |^)[a-z]/g,t=>t.toUpperCase())}function O0(t=""){throw new Error(t)}function S0(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 _0(t){return null!=t&&!Number.isNaN(t)}function rt(t,e){return A0(t,e)||{}}function A0(t,n){t=Object.entries(t||{}).filter(([t])=>t.startsWith(n)).map(([t,e])=>[un(t.replace(n,"").trim()),e]).filter(([t])=>!!t);return 0===t.length?null:Object.fromEntries(t)}function P0(t,e){return void 0===t?null:"number"==typeof t?t:(t=+t.replace("%",""),Number.isNaN(t)?null:t/100*e)}function T0(t){return!("object"!=typeof t||t instanceof Date||null===t||Array.isArray(t))}function L0(t){return null===t||!1===t}function N0(t,e,n={},r=!1){return L0(t)||Array.isArray(t)&&r?t:(r=rt(t,e),nt(n,r))}function C0(t,e={}){return!L0(t)&&!Array.isArray(t)&&j0(t)?nt(e,t):t}function j0(t){var e;return 0===Object.keys(t).length||({title:t,items:e}=t,void 0!==t)||void 0!==e}function R0(t,e){return"object"==typeof t?rt(t,e):t}k0.props={};const I0=v=>{const b={nodeId:t=>t.key,nodeWidth:.02,nodePadding:.02},x={type:"polygon",axis:!1,legend:!1,encode:{shape:"polygon",x:"x",y:"y"},scale:{x:{type:"identity"},y:{type:"identity"}},style:{stroke:"#000"}},w={type:"polygon",axis:!1,legend:!1,encode:{shape:"ribbon",x:"x",y:"y"},style:{fillOpacity:.5,stroke:void 0}},k={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={},tooltip:l={}}=v,{links:t,nodes:c}=Dd(t,e),u=rt(e,"node"),e=rt(e,"link"),{key:h=t=>t.key,color:f=h}=u,{links:i,nodes:t}=k0(Object.assign(Object.assign(Object.assign({},b),{nodeId:Bd(h)}),i))({links:t,nodes:c});const d=rt(r,"label"),{text:p=h,spacing:g=5}=d,m=et(d,["text","spacing"]),y=Bd(h);c=N0(l,"node",{title:y,items:[{field:"value"}]},!0),h=N0(l,"link",{title:"",items:[t=>({name:"source",value:y(t.source)}),t=>({name:"target",value:y(t.target)})]});return[nt({},x,{data:t,encode:Object.assign(Object.assign({},u),{color:f}),scale:n,style:rt(r,"node"),labels:[Object.assign(Object.assign(Object.assign({},k),{text:p,dx:t=>t.x[0]<.5?g:-g}),m),...a],tooltip:c,animate:R0(s,"node"),axis:!1}),nt({},w,{data:i,encode:e,labels:o,style:Object.assign({fill:e.color?void 0:"#aaa",strokeWidth:0},rt(r,"link")),tooltip:h,animate:R0(s,"link")})]}},B0=(I0.props={},t=>(t,e,n,r)=>[t,t.map(()=>[[0,0]])]);B0.props={defaultShape:"path",defaultLabelShape:"label",composite:!1,channels:[...Ad({shapes:["path","hollow"]}),{name:"d",scale:"identity"}],preInference:[...Nd()],postInference:[]};const F0=t=>t?parseInt(t):0;function D0(t,e,n,r){var i;return e?(e=t,t=getComputedStyle(e),i=e.clientWidth||F0(t.width),e=e.clientHeight||F0(t.height),{width:(i={width:i-(F0(t.paddingLeft)+F0(t.paddingRight)),height:e-(F0(t.paddingTop)+F0(t.paddingBottom))}).width,height:i.height}):{width:n,height:r}}function z0(t){var{height:t,width:e,padding:n=0,paddingLeft:r=n,paddingRight:i=n,paddingTop:a=n,paddingBottom:n=n,margin:o=0,marginLeft:s=o,marginRight:l=o,marginTop:c=o,marginBottom:o=o,inset:u=0,insetLeft:h=u,insetRight:f=u,insetTop:d=u,insetBottom:u=u}=t;return{width:e-r-i-s-l-h-f,height:t-a-n-c-o-d-u}}function G0(t,e,n){const r=n["value"];var o,i,a,s,l,c,u,h,f,d,n=function(t,e){var n={treemapBinary:Ed,treemapDice:sd,treemapSlice:wd,treemapSliceDice:Od,treemapSquarify:Md,treemapResquarify:Sd};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?dd().path(p):dd():Cf)(t));function g(t){return t.x0=t.y0=0,t.x1=a,t.y1=s,t.eachBefore(m),l=[0],i&&t.eachBefore(od),t}function m(t){var e=l[t.depth],n=t.x0+e,r=t.y0+e,i=t.x1-e,a=t.y1-e;i<n&&(n=i=(n+i)/2),a<r&&(r=a=(r+a)/2),t.x0=n,t.y0=r,t.x1=i,t.y1=a,t.children&&(e=l[t.depth+1]=c(t)/2,n+=d(t)-e,r+=u(t)-e,(i-=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:Bd(r)(t)).sort(e.sort):p.count(),o=Md,i=!1,s=a=1,l=[0],d=f=h=u=c=Gf,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=zf(t),g):o},g.padding=function(t){return arguments.length?g.paddingInner(t).paddingOuter(t):g.paddingInner()},g.paddingInner=function(t){return arguments.length?(c="function"==typeof t?t:Wf(+t),g):c},g.paddingOuter=function(t){return arguments.length?g.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):g.paddingTop()},g.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:Wf(+t),g):u},g.paddingRight=function(t){return arguments.length?(h="function"==typeof t?t:Wf(+t),g):h},g.paddingBottom=function(t){return arguments.length?(f="function"==typeof t?t:Wf(+t),g):f},g.paddingLeft=function(t){return arguments.length?(d="function"==typeof t?t:Wf(+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 W0=h=>t=>{var{width:t,height:e}=z0(t),{data:n,encode:r={},scale:i,style:a={},layout:o={},labels:s=[],tooltip:l={}}=h,c=et(h,["data","encode","scale","style","layout","labels","tooltip"]),u={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=G0(n,nt({},u,o),r),n=rt(a,"label");return[nt({},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}),n),...s]},c),{tooltip:C0(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]},H0=(W0.props={},h=>t=>{var{width:t,height:e}=z0(t),{data:n,encode:r={},scale:i={},style:a={},layout:o={},labels:s=[],tooltip:l={}}=h,c=et(h,["data","encode","scale","style","layout","labels","tooltip"]),u={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=(Ke(t)?dd().path(e.path):Cf)(t);return r?n.sum(t=>Bd(r)(t)).sort(e.sort):n.count(),nd().size(e.size).padding(e.padding)(n),n.descendants()})(n,nt({},{size:[t,e],padding:0,sort:(t,e)=>e.value-t.value},o),nt({},u.encode,r)),t=rt(a,"label");return[nt({},u,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}),t),...s]},c),{tooltip:C0(l,{title:t=>t.data.name,items:[{field:"value"}]}),axis:!1}))]});function Y0(t,e){return wp(t,t=>e[t])}function V0(t,e){return bp(t,t=>e[t])}function q0(t,e){const n=2.5*U0(t,e)-1.5*$0(t,e);return wp(t,t=>e[t]>=n?e[t]:NaN)}function U0(t,e){return Op(t,.25,t=>e[t])}function X0(t,e){return Op(t,.5,t=>e[t])}function $0(t,e){return Op(t,.75,t=>e[t])}function K0(t,e){const n=2.5*$0(t,e)-1.5*U0(t,e);return bp(t,t=>e[t]<=n?e[t]:NaN)}function Z0(){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=q0(t,i),n=K0(t,i);return t.filter(t=>i[t]<e||i[t]>n)}),e]}}H0.props={};const Q0=h=>()=>{var t,{data:e,encode:n,style:r={},tooltip:i={},animate:a}=h,o=et(h,["data","encode","style","tooltip","transform","animate"]),{point:s=!0}=r,r=et(r,["point"]),l=n["y"],l={y:l,y1:l,y2:l,y3:l,y4:l},c={y1:U0,y2:X0,y3:$0},u=N0(i,"box",{items:[{channel:"y",name:"min"},{channel:"y1",name:"q1"},{channel:"y2",name:"q2"},{channel:"y3",name:"q3"},{channel:"y4",name:"max"}]},!0),i=N0(i,"point",{title:{channel:"x"},items:[{name:"outlier",channel:"y"}]});return s?(s=rt(r,"box"),t=rt(r,"point"),[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:q0},c),{y4:K0})],encode:Object.assign(Object.assign({},n),l),style:s,tooltip:u,animate:R0(a,"box")},o),{type:"point",data:e,transform:[{type:Z0}],encode:n,style:Object.assign({},t),tooltip:i,animate:R0(a,"point")}]):[Object.assign({type:"box",data:e,transform:[Object.assign(Object.assign({type:"groupX",y:Y0},c),{y4:V0})],encode:Object.assign(Object.assign({},n),l),style:r,tooltip:u},o)]},J0=(Q0.props={},s=>{var t=s["cartesian"];return t?Id:(t,e,n,r)=>{const{x:i,y:a}=n,o=jd(e,n,s);return[t,Array.from(t,t=>{var e=[+i[t],+a[t]];return[r.map(o(e,t))]})]}});function tg(t,e,n,r){if(!isNaN(e)&&!isNaN(n)){var i,a,o,s,l,c,u,h,f,d=t._root,p={data:r},g=t._x0,m=t._y0,y=t._x1,v=t._y1;if(d){for(;d.length;)if((c=e>=(a=(g+y)/2))?g=a:y=a,(u=n>=(o=(m+v)/2))?m=o:v=o,!(d=(i=d)[h=u<<1|c]))return i[h]=p,t;if(s=+t._x.call(null,d.data),l=+t._y.call(null,d.data),e===s&&n===l)p.next=d,i?i[h]=p:t._root=p;else{for(;i=i?i[h]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+y)/2))?g=a:y=a,(u=n>=(o=(m+v)/2))?m=o:v=o,(h=u<<1|c)==(f=(o<=l)<<1|a<=s););i[f]=d,i[h]=p}}else t._root=p}return t}function eg(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function ng(t){return t[0]}function rg(t){return t[1]}function ig(t,e,n){e=new ag(null==e?ng:e,null==n?rg:n,NaN,NaN,NaN,NaN);return null==t?e:e.addAll(t)}function ag(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}J0.props={defaultShape:"shape",defaultLabelShape:"label",composite:!1,channels:[{name:"x",required:!0},{name:"y",required:!0}],preInference:[...Nd(),{type:"maybeTuple"},{type:"maybeVisualPosition"},{type:"maybeFunctionAttribute"}]};cs=ig.prototype=ag.prototype;function sg(t){return function(){return t}}function lg(t){return 1e-6*(t()-.5)}function cg(t){return t.index}function ug(t,e){t=t.get(e);if(t)return t;throw new Error("node not found: "+e)}function hg(c){var u,h,a,o,f,d,s=cg,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=c.length;e<p;++e)for(var r,i,a,o,s,l=0;l<n;++l)r=(i=c[l]).source,a=(i=i.target).x+i.vx-r.x-r.vx||lg(d),o=i.y+i.vy-r.y-r.vy||lg(d),a*=s=((s=Math.sqrt(a*a+o*o))-h[l])/s*t*u[l],o*=s,i.vx-=a*(s=f[l]),i.vy-=o*s,r.vx+=a*(s=1-s),r.vy+=o*s}function i(){if(a){var t,e=a.length,n=c.length,r=new Map(a.map((t,e)=>[s(t,e,a),t])),i=0;for(o=new Array(e);i<n;++i)(t=c[i]).index=i,"object"!=typeof t.source&&(t.source=ug(r,t.source)),"object"!=typeof t.target&&(t.target=ug(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=c[i],f[i]=o[t.source.index]/(o[t.source.index]+o[t.target.index]);u=new Array(n),l(),h=new Array(n),g()}}function l(){if(a)for(var t=0,e=c.length;t<e;++t)u[t]=+n(c[t],t,c)}function g(){if(a)for(var t=0,e=c.length;t<e;++t)h[t]=+r(c[t],t,c)}return null==c&&(c=[]),e.initialize=function(t,e){a=t,d=e,i()},e.links=function(t){return arguments.length?(c=t,i(),e):c},e.id=function(t){return arguments.length?(s=t,e):s},e.iterations=function(t){return arguments.length?(p=+t,e):p},e.strength=function(t){return arguments.length?(n="function"==typeof t?t:sg(+t),l(),e):n},e.distance=function(t){return arguments.length?(r="function"==typeof t?t:sg(+t),g(),e):r},e}cs.copy=function(){var t,e,n=new ag(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},cs.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return tg(this.cover(e,n),e,n,t)},cs.addAll=function(t){for(var e,n,r=t.length,i=new Array(r),a=new Array(r),o=1/0,s=1/0,l=-1/0,c=-1/0,u=0;u<r;++u)isNaN(e=+this._x.call(null,n=t[u]))||isNaN(n=+this._y.call(null,n))||((i[u]=e)<o&&(o=e),l<e&&(l=e),(a[u]=n)<s&&(s=n),c<n&&(c=n));if(!(l<o||c<s))for(this.cover(o,s).cover(l,c),u=0;u<r;++u)tg(this,i[u],a[u],t[u]);return this},cs.cover=function(t,e){if(!isNaN(t=+t)&&!isNaN(e=+e)){var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,l=i-n||1,c=this._root;t<n||i<=t||e<r||a<=e;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,l*=2,s){case 0:i=n+l,a=r+l;break;case 1:n=i-l,a=r+l;break;case 2:i=n+l,r=a-l;break;case 3:n=i-l,r=a-l}this._root&&this._root.length&&(this._root=c)}this._x0=n,this._y0=r,this._x1=i,this._y1=a}return this},cs.data=function(){var e=[];return this.visit(function(t){if(!t.length)for(;e.push(t.data),t=t.next;);}),e},cs.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]]},cs.find=function(t,e,n){var r,i,a,o,s,l,c,u,h=this._x0,f=this._y0,d=this._x1,p=this._y1,g=[],m=this._root;for(m&&g.push(new eg(m,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();)!(m=r.node)||(s=r.x0)>d||(l=r.y0)>p||(o=r.x1)<h||(i=r.y1)<f||(m.length?(g.push(new eg(m[3],a=(s+o)/2,c=(l+i)/2,o,i),new eg(m[2],s,c,a,i),new eg(m[1],a,l,o,c),new eg(m[0],s,l,a,c)),(i=(c<=e)<<1|a<=t)&&(r=g[g.length-1],g[g.length-1]=g[g.length-1-i],g[g.length-1-i]=r)):(l=(o=t-+this._x.call(null,m.data))*o+(s=e-+this._y.call(null,m.data))*s)<n&&(h=t-(c=Math.sqrt(n=l)),f=e-c,d=t+c,p=e+c,u=m.data));return u},cs.remove=function(t){if(!isNaN(a=+this._x.call(null,t))&&!isNaN(o=+this._y.call(null,t))){var e,n,r,i,a,o,s,l,c,u,h,f=this._root,d=this._x0,p=this._y0,g=this._x1,m=this._y1;if(f){if(f.length)for(;;){if((l=a>=(s=(d+g)/2))?d=s:g=s,(c=o>=(s=(p+m)/2))?p=s:m=s,!(f=(e=f)[u=c<<1|l]))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},cs.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},cs.root=function(){return this._root},cs.size=function(){var e=0;return this.visit(function(t){if(!t.length)for(;++e,t=t.next;);}),e},cs.visit=function(t){var e,n,r,i,a,o,s,l=[],c=this._root;for(c&&l.push(new eg(c,this._x0,this._y0,this._x1,this._y1));a=l.pop();)!t(c=a.node,n=a.x0,r=a.y0,i=a.x1,a=a.y1)&&c.length&&(o=(n+i)/2,s=(r+a)/2,(e=c[3])&&l.push(new eg(e,o,s,i,a)),(e=c[2])&&l.push(new eg(e,n,s,o,a)),(e=c[1])&&l.push(new eg(e,o,r,i,s)),e=c[0])&&l.push(new eg(e,n,r,o,s));return this},cs.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new eg(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i,a,o,s,l,c,u,h=e.node;h.length&&(a=e.x0,o=e.y0,c=(a+(s=e.x1))/2,u=(o+(l=e.y1))/2,(i=h[0])&&n.push(new eg(i,a,o,c,u)),(i=h[1])&&n.push(new eg(i,c,o,s,u)),(i=h[2])&&n.push(new eg(i,a,u,c,l)),i=h[3])&&n.push(new eg(i,c,u,s,l)),r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},cs.x=function(t){return arguments.length?(this._x=t,this):this._x},cs.y=function(t){return arguments.length?(this._y=t,this):this._y};var fg={value:()=>{}};function dg(){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 pg(r)}function pg(t){this._=t}function gg(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=fg,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}pg.prototype=dg.prototype={constructor:pg,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]=gg(i[n],t.name,e);else if(null==e)for(n in i)i[n]=gg(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 pg(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 mg,yg,vg=0,bg=0,xg=0,wg=1e3,kg=0,Mg=0,Eg=0,Og="object"==typeof performance&&performance.now?performance:Date,Sg="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function _g(){return Mg||(Sg(Ag),Mg=Og.now()+Eg)}function Ag(){Mg=0}function Pg(){this._call=this._time=this._next=null}function Tg(t,e,n){var r=new Pg;return r.restart(t,e,n),r}function Lg(){Mg=(kg=Og.now())+Eg,vg=bg=0;try{_g(),++vg;for(var t,e=mg;e;)0<=(t=Mg-e._time)&&e._call.call(void 0,t),e=e._next;--vg}finally{for(var n,r,i=mg,a=1/(vg=0);i;)i=i._call?(a>i._time&&(a=i._time),(n=i)._next):(r=i._next,i._next=null,n?n._next=r:mg=r);yg=n,Cg(a),Mg=0}}function Ng(){var t=Og.now(),e=t-kg;wg<e&&(Eg-=e,kg=t)}function Cg(t){vg||(bg=bg&&clearTimeout(bg),24<t-Mg?(t<1/0&&(bg=setTimeout(Lg,t-Og.now()-Eg)),xg=xg&&clearInterval(xg)):(xg||(kg=Og.now(),xg=setInterval(Ng,wg)),vg=1,Sg(Lg)))}Pg.prototype=Tg.prototype={constructor:Pg,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?_g():+n)+(null==e?0:+e),this._next||yg===this||(yg?yg._next=this:mg=this,yg=this),this._call=t,this._time=n,Cg()},stop:function(){this._call&&(this._call=null,this._time=1/0,Cg())}};const jg=4294967296;function Rg(t){return t.x}function Ig(t){return t.y}var Bg=10,Fg=Math.PI*(3-Math.sqrt(5));function Dg(l){var a,o=1,e=.001,s=1-Math.pow(e,1/300),c=0,u=.6,h=new Map,t=Tg(i),n=dg("tick","end"),r=function(){let t=1;return()=>(t=(1664525*t+1013904223)%jg)/jg}();function i(){f(),n.call("tick",a),o<e&&(t.stop(),n.call("end",a))}function f(t){var e,n,r=l.length;void 0===t&&(t=1);for(var i=0;i<t;++i)for(o+=(c-o)*s,h.forEach(function(t){t(o)}),e=0;e<r;++e)null==(n=l[e]).fx?n.x+=n.vx*=u:(n.x=n.fx,n.vx=0),null==n.fy?n.y+=n.vy*=u:(n.y=n.fy,n.vy=0);return a}function d(){for(var t,e,n,r=0,i=l.length;r<i;++r)(n=l[r]).index=r,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),(isNaN(n.x)||isNaN(n.y))&&(t=Bg*Math.sqrt(.5+r),e=r*Fg,n.x=t*Math.cos(e),n.y=t*Math.sin(e)),(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}function p(t){return t.initialize&&t.initialize(l,r),t}return null==l&&(l=[]),d(),a={tick:f,restart:function(){return t.restart(i),a},stop:function(){return t.stop(),a},nodes:function(t){return arguments.length?(l=t,d(),h.forEach(p),a):l},alpha:function(t){return arguments.length?(o=+t,a):o},alphaMin:function(t){return arguments.length?(e=+t,a):e},alphaDecay:function(t){return arguments.length?(s=+t,a):+s},alphaTarget:function(t){return arguments.length?(c=+t,a):c},velocityDecay:function(t){return arguments.length?(u=1-t,a):1-u},randomSource:function(t){return arguments.length?(r=t,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=l.length;for(null==n?n=1/0:n*=n,o=0;o<s;++o)(r=(r=t-(i=l[o]).x)*r+(r=e-i.y)*r)<n&&(a=i,n=r);return a},on:function(t,e){return 1<arguments.length?(n.on(t,e),a):n.on(t)}}}function zg(t,e,n){var i,l,c,u,h,r,f,d,p,{nodes:t,links:a}=t,{joint:e,nodeStrength:o,linkStrength:s}=e,{linkKey:n=t=>t.id}=n,I=(r=sg(-30),d=(f=1)/0,p=.81,g.initialize=function(t,e){i=t,c=e,B()},g.strength=function(t){return arguments.length?(r="function"==typeof t?t:sg(+t),B(),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=ig(i,Rg,Ig).visitAfter(F);for(u=t,e=0;e<n;++e)l=i[e],r.visit(D)}function B(){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 F(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-l.x,a=t.y-l.y,o=r-e,s=i*i+a*a;if(o*o/p<s)return s<d&&(0===i&&(s+=(i=lg(c))*i),0===a&&(s+=(a=lg(c))*a),s<f&&(s=Math.sqrt(f*s)),l.vx+=i*t.value*u/s,l.vy+=a*t.value*u/s),!0;if(!(t.length||d<=s))for((t.data!==l||t.next)&&(0===i&&(s+=(i=lg(c))*i),0===a&&(s+=(a=lg(c))*a),s<f)&&(s=Math.sqrt(f*s));t.data!==l&&(o=h[t.data.index]*u/s,l.vx+=i*o,l.vy+=a*o),t=t.next;);}var m,y,v,b,x,w,k,M,E,O,S,_,A,P,n=hg(a).id(Bd(n)),T=("function"==typeof o&&I.strength(o),"function"==typeof s&&n.strength(s),Dg(t).force("link",n).force("charge",I));function L(t){for(var e,n=0,r=y.length;n<r;++n)(e=y[n]).vy+=(b[n]-e.y)*v[n]*t}function N(){if(y){var t,e=y.length;for(v=new Array(e),b=new Array(e),t=0;t<e;++t)v[t]=isNaN(b[t]=+m(y[t],t,y))?0:+x(y[t],t,y)}}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)*P,r=(r/e-_)*P,i=0;i<e;++i)(t=A[i]).x-=n,t.y-=r}e?T.force("center",(P=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?(P=+t,R):P},R)):T.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 m&&(m=sg(null==m?0:+m)),L.initialize=function(t){y=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?(m="function"==typeof t?t:sg(+t),N(),L):m},L)),T.stop();var z=Math.ceil(Math.log(T.alphaMin())/Math.log(1-T.alphaDecay()));for(let t=0;t<z;t++)T.tick();return{nodesData:t,linksData:a}}const Gg=g=>()=>{var{data:t,encode:e={},scale:n,style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=g;const{nodeKey:c=t=>t.id,linkKey:u=t=>t.id}=e,h=et(e,["nodeKey","linkKey"]);var e=Object.assign({nodeKey:c,linkKey:u},h),f=rt(e,"node"),d=rt(e,"link"),{links:t,nodes:p}=Dd(t,e),{nodesData:t,linksData:p}=zg({links:t,nodes:p},nt({},{joint:!0},i),e),i=N0(l,"link",{items:[t=>({name:"source",value:Bd(u)(t.source)}),t=>({name:"target",value:Bd(u)(t.target)})]}),e=N0(l,"node",{items:[t=>({name:"key",value:Bd(c)(t)})]},!0);return[nt({},{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:p,encode:d,labels:o,style:rt(r,"link"),tooltip:i,animate:R0(s,"link")}),nt({},{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({},f),scale:n,style:rt(r,"node"),tooltip:e,labels:[Object.assign(Object.assign({},{text:""}),rt(r,"label")),...a],animate:R0(s,"link")})]},Wg=(Gg.props={},h=>u=>t=>{const{field:e="value",nodeSize:n,separation:r,sortBy:i,as:a=["x","y"]}=u,[o,s]=a;var t=Cf(t,t=>t.children).sum(t=>t[e]).sort(i),l=h();l.size([1,1]),n&&l.nodeSize(n),r&&l.separation(r),l(t);const c=[];t.each(t=>{t[o]=t.x,t[s]=t.y,t.name=t.data.name,c.push(t)});l=t.links();return l.forEach(t=>{t[o]=[t.source[o],t.target[o]],t[s]=[t.source[s],t.target[s]]}),{nodes:c,edges:l}}),Hg=t=>Wg(Lf)(t),Yg=(Hg.props={},t=>Wg(xd)(t)),Vg=(Yg.props={},u=>{const h={sortBy:(t,e)=>e.value-t.value},f={axis:!1,legend:!1,type:"point",encode:{x:"x",y:"y",size:2,shape:"point"}},d={type:"link",encode:{x:"x",y:"y",shape:"smooth"}},p={text:"",fontSize:10};return()=>{var{data:t,encode:e={},scale:n={},style:r={},layout:i={},nodeLabels:a=[],linkLabels:o=[],animate:s={},tooltip:l={}}=u,c=null==e?void 0:e.value,{nodes:i,edges:c}=Yg(Object.assign(Object.assign(Object.assign({},h),i),{field:c}))(t),t=N0(l,"node",{title:"name",items:["value"]},!0),l=N0(l,"link",{title:"",items:[t=>({name:"source",value:t.source.name}),t=>({name:"target",value:t.target.name})]});return[nt({},d,{data:c,encode:rt(e,"link"),scale:rt(n,"link"),labels:o,style:Object.assign({stroke:"#999"},rt(r,"link")),tooltip:l,animate:R0(s,"link")}),nt({},f,{data:i,scale:rt(n,"node"),encode:rt(e,"node"),labels:[Object.assign(Object.assign({},p),rt(r,"label")),...a],style:Object.assign({},rt(r,"node")),tooltip:t,animate:R0(s,"node")})]}});Vg.props={};var qg={},Ug={},Xg=34,$g=10,Kg=13;function Zg(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function Qg(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 Jg(t,e){var t=t+"",n=t.length;return n<e?new Array(e-n+1).join(0)+t:t}function tm(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Jg(-e,6):9999<e?"+"+Jg(e,6):Jg(e,4))+"-"+Jg(t.getUTCMonth()+1,2)+"-"+Jg(t.getUTCDate(),2)+(a?"T"+Jg(n,2)+":"+Jg(r,2)+":"+Jg(i,2)+"."+Jg(a,3)+"Z":i?"T"+Jg(n,2)+":"+Jg(r,2)+":"+Jg(i,2)+"Z":r||n?"T"+Jg(n,2)+":"+Jg(r,2)+"Z":"")}function em(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,l=!1;function c(){if(s)return Ug;if(l)return l=!1,qg;var t,e,n=a;if(r.charCodeAt(n)===Xg){for(;a++<i&&r.charCodeAt(a)!==Xg||r.charCodeAt(++a)===Xg;);return(t=a)>=i?s=!0:(e=r.charCodeAt(a++))===$g?l=!0:e===Kg&&(l=!0,r.charCodeAt(a)===$g)&&++a,r.slice(n+1,t-1).replace(/""/g,'"')}for(;a<i;){if((e=r.charCodeAt(t=a++))===$g)l=!0;else if(e===Kg)l=!0,r.charCodeAt(a)===$g&&++a;else if(e!==h)continue;return r.slice(n,t)}return s=!0,r.slice(n,i)}for(r.charCodeAt(i-1)===$g&&--i,r.charCodeAt(i-1)===Kg&&--i;(e=c())!==Ug;){for(var u=[];e!==qg&&e!==Ug;)u.push(e),e=c();t&&null==(u=t(u,o++))||n.push(u)}return n}function i(t,n){return t.map(function(e){return n.map(function(t){return o(e[t])}).join(r)})}function a(t){return t.map(o).join(r)}function o(t){return null==t?"":t instanceof Date?tm(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=Zg(n=t),function(t,e){return r(i(t),e,n)}):Zg(t)})).columns=s||[],t},parseRows:n,format:function(t,e){return[(e=null==e?Qg(t):e).map(o).join(r)].concat(i(t,e)).join("\n")},formatBody:function(t,e){return i(t,e=null==e?Qg(t):e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}function nm(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;rm&&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 rm=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),im=t=>{const{value:n,format:r=n.split(".").pop(),delimiter:i=",",autoType:a=!0}=t;return()=>ve(void 0,void 0,void 0,function*(){var t,e=yield fetch(n);if("csv"===r)return t=yield e.text(),em(i).parse(t,a?nm:M0);if("json"===r)return yield e.json();throw new Error(`Unknown format: ${r}.`)})};im.props={};const am=t=>{const{fields:n,key:r="key",value:i="value"}=t;return t=>{var e;return(e=n)&&0!==Object.keys(e).length?t.flatMap(e=>n.map(t=>Object.assign(Object.assign({},e),{[r]:t,[i]:e[t]}))):t}};am.props={};const om=t=>{const{callback:e=function(t){return null!=t&&!Number.isNaN(t)}}=t;return t=>t.filter(e)},sm=(om.props={},t=>{const e=t["callback"];return t=>Array.isArray(t)?[...t].sort(e):t});sm.props={};const lm=t=>{const e=t["fields"];return t=>t.map(t=>{return[n,t=[]]=[t,e],t.reduce((t,e)=>(e in n&&(t[e]=n[e]),t),{});var n})};lm.props={};const cm=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};cm.props={};const um=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))}},hm=(um.props={},t=>{const e=t["value"];return()=>e}),fm=(hm.props={},t=>{const{callback:e=M0}=t;return t=>e(t)}),dm=(fm.props={},t=>{const{callback:e=M0}=t;return t=>Array.isArray(t)?t.map(e):t});dm.props={};var pm=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 gm={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 mm(t){const{y:c,thickness:u,weight:h,marginRatio:f,id:d,source:p,target:g,sourceWeight:m,targetWeight:y,sortBy:v}=Object.assign(Object.assign({},gm),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=m(t),t.targetWeight=y(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=Lp(e,t=>t.sourceWeight)+Lp(n,t=>t.targetWeight)})}if(r=e,(n="function"==typeof v?v:pm[v])&&r.sort(n),!(n=(r=e).length))throw O0("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=c-u/2,a=i+u;return e.x=[n,r,r,n],e.y=[i,i,a,a],t+e.width+2*o},0)}else{const l=1/n;r.forEach((t,e)=>{t.x=(e+.5)*l,t.y=c})}return function(t,e){const r=new Map(t.map(t=>[t.id,t]));if(!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=[c,c,c,c]});const s=rp(e,t=>t.source),l=rp(e,t=>t.target);t.forEach(n=>{const{width:r,value:i,id:t}=n;var e=s.get(t)||[],a=l.get(t)||[];let o=0;e.map(t=>{var e=t.sourceWeight/i*r;t.x[0]=n.x[0]+o,t.x[1]=n.x[0]+o+e,o+=e}),a.forEach(t=>{var e=t.targetWeight/i*r;t.x[3]=n.x[0]+o,t.x[2]=n.x[0]+o+e,o+=e})})}(e,t),{nodes:e,edges:t}}}const ym=e=>t=>mm(e)(t),vm=(ym.props={},Math.PI/180),bm=64,xm=2048;function wm(t){return t.text}function km(){return"serif"}function Mm(){return"normal"}function Em(t){return t.value}function Om(){return 90*~~(2*Math.random())}function Sm(){return 1}function _m(){}function Am(t,o,r,s){if(!o.sprite){var l=t.context,c=t.ratio;l.clearRect(0,0,(bm<<5)/c,xm/c);let i=0,a=0,n=0;var u,h,f,d,e=r.length;for(--s;++s<e;){o=r[s],l.save(),l.font=o.style+" "+o.weight+" "+~~((o.size+1)/c)+"px "+o.font;let t=l.measureText(o.text+"m").width*c,e=o.size<<1;if(o.rotate?(d=Math.sin(o.rotate*vm),f=Math.cos(o.rotate*vm),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>=bm<<5&&(i=0,a+=n,n=0),a+e>=xm)break;l.translate((i+(t>>1))/c,(a+(e>>1))/c),o.rotate&&l.rotate(o.rotate*vm),l.fillText(o.text,0,0),o.padding&&(l.lineWidth=2*o.padding,l.strokeText(o.text,0,0)),l.restore(),o.width=t,o.height=e,o.xoff=i,o.yoff=a,o.x1=t>>1,o.y1=e>>1,o.x0=-o.x1,o.y0=-o.y1,o.hasText=!0,i+=t}for(var p=l.getImageData(0,0,(bm<<5)/c,xm/c).data,g=[];0<=--s;)if((o=r[s]).hasText){var m=o.width,y=m>>5;let n=o.y1-o.y0;for(let t=0;t<n*y;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<m;t++){var v=y*e+(t>>5),b=p[(a+e)*(bm<<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)*y)}}}function Pm(t){const e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Tm(t){var e=[];let n=-1;for(;++n<t;)e[n]=0;return e}function Lm(){return document.createElement("canvas")}function Nm(t){return"function"==typeof t?t:function(){return t}}const Cm={archimedean:Pm,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 jm(){let b=[256,256],r=wm,i=km,p=Em,g=Mm,m=Om,y=Sm,x=Pm,w=Math.random,v=_m,k=[],M=null,E=1/0;const O=Mm,S=Lm,_={};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=(bm<<5)/e,t.height=xm/e,(t=t.getContext("2d")).fillStyle=t.strokeStyle="red",t.textAlign="center",{context:t,ratio:e}),l=_.board||Tm((b[0]>>5)*b[1]),c=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=m.call(this,t,e,n),t.size=~~p.call(this,t,e,n),t.padding=y.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<c;){var i=h[f];i.x=a*(w()+.5)>>1,i.y=o*(w()+.5)>>1,Am(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 l,c=-s,u,h;for(;(l=o(c+=s))&&(u=~~l[0],h=~~l[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,l=t.y1-t.y0;let c=(t.y+t.y0)*(r>>=5)+(e>>5),u;for(let e=0;e<l;e++){for(let t=u=0;t<=a;t++)if((u<<s|(t<a?(u=i[e*a+t])>>>o:0))&n[c+t])return 1;c+=r}}(t,i,b[0]))&&(!e||function(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}(t,e))){var f=t.sprite,d=t.width>>5,p=b[0]>>5,g=t.x-(d<<4),m=127&g,y=32-m,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<<y|(t<d?(n=f[e*d+t])>>>m:0);r+=p}return delete t.sprite,1}return}(l,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>=c&&(_.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=Tm((n>>5)*r),e=(e.width=n,e.height=r,e.getContext("2d")),o=(e.drawImage(t,0,0,t.width,t.height,0,0,n,r),e.getImageData(0,0,n,r).data);for(let e=0;e<r;e++)for(let t=0;t<n;t++){var s=i*e+(t>>5),l=e*n+t<<2,l=250<=o[l]&&250<=o[1+l]&&250<=o[2+l]?1<<31-t%32:0;a[s]|=l}_.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=Nm(t)},_.font=function(t){i=Nm(t)},_.fontWeight=function(t){g=Nm(t)},_.rotate=function(t){m=Nm(t)},_.spiral=function(t){x=Cm[t]||t},_.fontSize=function(t){p=Nm(t)},_.padding=function(t){y=Nm(t)},_.random=function(t){w=Nm(t)},_.on=function(t){v=Nm(t)},_}const Rm={size:[500,500],fontSize:[14,28]};function Im(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 Bm=f=>h=>ve(void 0,void 0,void 0,function*(){var i,a,t=Object.assign({},Rm,f),e=jm(),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 ve(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=[wp(e),bp(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",Im,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=et(t,["x","y"]);return Object.assign(Object.assign({},t),{x:e+r/2,y:n+o/2})}),[{x:e,y:s},{x:l,y:c}]=e,u={text:"",value:0,opacity:0,fontSize:0};return t.push(Object.assign(Object.assign({},u),{x:n?0:e,y:n?0:s}),Object.assign(Object.assign({},u),{x:n?r:l,y:n?o:c})),t});function Fm(e){return"string"==typeof e?t=>t[e]:e}Bm.props={};const Dm=t=>{const{join:e,on:n,select:i=[],as:a=i,unknown:o=NaN}=t;var[t,r]=n;const s=Fm(r),l=Fm(t),c=ip(e,([t])=>t,t=>s(t));return t=>t.map(t=>{const r=c.get(l(t));return Object.assign(Object.assign({},t),i.reduce((t,e,n)=>(t[a[n]]=r?r[e]:o,t),{}))})},zm=(Dm.props={},t=>{const{start:e,end:n}=t;return t=>t.slice(e,n)});zm.props={};const Gm=u=>c=>ve(void 0,void 0,void 0,function*(){var{width:t,height:e}=z0(c),{data:n,encode:r={},scale:i,style:a={},layout:o={}}=u,s=et(u,["data","encode","scale","style","layout"]),l={size:[t,e]},t={axis:!1,type:"text",encode:{x:"x",y:"y",text:"text",rotate:"rotate",fontSize:"size"},scale:{x:{domain:[0,t],range:[0,1]},y:{domain:[0,e],range:[0,1]},fontSize:{type:"identity"},rotate:{type:"identity"}},style:{textAlign:"center"}},e=function(t,e){const{text:n="text",value:r="value"}=e;return t.map(t=>Object.assign(Object.assign({},t),{text:t[n],value:t[r]}))}(n,r),n=yield Bm(Object.assign(Object.assign({},l),o))(e);return[nt({},t,Object.assign(Object.assign({data:n,encode:r,scale:i,style:a},s),{axis:!1}))]});function Wm(t,...e){return e.reduce((e,n)=>t=>e(n(t)),t)}function Hm(e,n){return n-e?t=>(t-e)/(n-e):t=>.5}function Ym(t,e,n,r,i){let a=n||0,o=r||t.length;for(var s=i||(t=>t);a<o;){var l=Math.floor((a+o)/2);s(t[l])>e?o=l:a=l+1}return a}Gm.props={};const Vm=Math.sqrt(50),qm=Math.sqrt(10),Um=Math.sqrt(2);function Xm(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>=Vm?10:n>=qm?5:n>=Um?2:1)*10**t:-(10**-t)/(n>=Vm?10:n>=qm?5:n>=Um?2:1)}function $m(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>=Vm?r*=10:n>=qm?r*=5:n>=Um&&(r*=2),e<t?-r:r}const Km=(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=Xm(a,o,n))?(a=Math.floor(a/s)*s,o=Math.ceil(o/s)*s,s=Xm(a,o,n)):s<0&&(a=Math.ceil(a*s)/s,o=Math.floor(o*s)/s,s=Xm(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},Zm=36e5,Qm=864e5,Jm=7*Qm;Qm,Qm;function ty(t,n,s,r){const i=(t,e)=>{let n=e;for(;n&&r(t)%e!=0;)s(t,-1),--n;return t},l=(t,e)=>{e&&i(t,e),n(t)};const c=(t,e)=>{t=new Date(+t-1);return l(t,e),s(t,e),l(t),t};return{ceil:c,floor:(t,e)=>{t=new Date(+t);return l(t,e),t},range:(t,e,n,r)=>{for(var i=[],a=Math.floor(n),o=r?c(t,n):c(t);+o<+e;s(o,a),l(o))i.push(new Date(+o));return i},duration:t}}zl=ty(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),ds=ty(1e3,t=>{t.setMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getSeconds()),ps=ty(6e4,t=>{t.setSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getMinutes()),gs=ty(Zm,t=>{t.setMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Zm*e)},t=>t.getHours()),vs=ty(Qm,t=>{t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Qm*e)},t=>t.getDate()-1);const ey=ty(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());bs=ty(Jm,t=>{t.setDate(t.getDate()-t.getDay()%7),t.setHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Jm*e)},t=>{var e=ey.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Jm)}),Os=ty(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 ny={millisecond:zl,second:ds,minute:ps,hour:gs,day:vs,week:bs,month:ey,year:Os};Ss=ty(1,t=>t,(t,e=1)=>{t.setTime(+t+e)},t=>t.getTime()),_s=ty(1e3,t=>{t.setUTCMilliseconds(0)},(t,e=1)=>{t.setTime(+t+1e3*e)},t=>t.getUTCSeconds()),As=ty(6e4,t=>{t.setUTCSeconds(0,0)},(t,e=1)=>{t.setTime(+t+6e4*e)},t=>t.getUTCMinutes()),Ps=ty(Zm,t=>{t.setUTCMinutes(0,0,0)},(t,e=1)=>{t.setTime(+t+Zm*e)},t=>t.getUTCHours()),Ts=ty(Qm,t=>{t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Qm*e)},t=>t.getUTCDate()-1);const ry=ty(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());Ls=ty(Jm,t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7)%7),t.setUTCHours(0,0,0,0)},(t,e=1)=>{t.setTime(+t+Jm*e)},t=>{var e=ry.floor(t),t=new Date(+t);return Math.floor((+t-+e)/Jm)}),ms=ty(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 iy={millisecond:Ss,second:_s,minute:As,hour:Ps,day:Ts,week:Ls,month:ry,year:ms};function ay(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?iy:ny;return{tickIntervals:[[o,1],[o,5],[o,15],[o,30],[a,1],[a,5],[a,15],[a,30],[i,1],[i,3],[i,6],[i,12],[r,1],[r,2],[n,1],[e,1],[e,3],[t,1]],year:t,millisecond:s}}(i),s=([t,e])=>t.duration*e,n=r?(e-t)/r:n||5,l=r||(e-t)/n,c=i.length,u=Ym(i,l,0,c,s);let h;return h=u===c?[a,$m(t/a.duration,e/a.duration,n)]:u?([c,a]=l/s(i[u-1])<s(i[u])/l?i[u-1]:i[u],[c,r?Math.ceil(r/c.duration):a]):[o,Math.max($m(t,e,n),1)]}const oy=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=ay(o,t,n,r,i),r=[e.floor(o,n),e.ceil(t,n)];return a?r.reverse():r};function sy(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)}function ly(t){return hy(t,"Function")}function cy(t){return null==t}var uy={}.toString,hy=function(t,e){return uy.call(t)==="[object "+e+"]"},fy=function(t){return Array.isArray?Array.isArray(t):hy(t,"Array")};var dy=function(t){if("object"!=typeof(e=t)||null===e||!hy(t,"Object"))return!1;var e;if(null===Object.getPrototypeOf(t))return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n},py=function(t){return hy(t,"Number")},gy=Object.values?function(t){return Object.values(t)}:function(n){var t,r=[],e=n,i=function(t,e){ly(n)&&"prototype"===e||r.push(t)};if(e)if(fy(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},my=5;function yy(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||my,n){var o;n.hasOwnProperty(a)&&(null!==(o=n[a])&&dy(o)?(dy(e[a])||(e[a]={}),r<i?t(e[a],o,r+1,i):e[a]=n[a]):fy(o)?(e[a]=[],e[a]=e[a].concat(o)):void 0!==o&&(e[a]=o))}}(t,e[r]);return t}function vy(t){return t}var by,xy=function(t,e){if(!sy(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};function wy(t){return cy(t)?0:(sy(t)?t:Object.keys(t)).length}function ky(t){return null!=t&&!Number.isNaN(t)}!function(a,o){var s;if(ly(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(by=by||document.createElement("canvas").getContext("2d")).font=[a,e,i,n+"px",r].join(" "),by.measureText(hy(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],gy(e=void 0===e?{}:e)).join("")});const My=e=>t=>-e(-t),Ey=(t,e)=>{const n=Math.log(t);t=t===Math.E?Math.log:t=>Math.log(t)/n;return e?My(t):t},Oy=(e,t)=>{var n=e===Math.E?Math.exp:t=>e**t;return t?My(n):n},Sy=(t,e,n,r)=>{var i=t<0,a=Ey(r,i),r=Oy(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 _y(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 py(t)?Math.round(t):t}):i;this.output=Wm(a,r,e,t)},t.prototype.invert=void 0}}var Ay,Fl={exports:{}},Hl={exports:{}},Py=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))},Ty=Array.prototype.concat,Ly=Array.prototype.slice,Ny=Hl.exports=function(t){for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];Py(i)?e=Ty.call(e,Ly.call(i)):e.push(i)}return e},Cy=(Ny.wrap=function(t){return function(){return t(Ny(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]}),jy=Hl.exports,Ry=Object.hasOwnProperty,Iy=Object.create(null);for(Ay in Cy)Ry.call(Cy,Ay)&&(Iy[Cy[Ay]]=Ay);var By=Fl.exports={to:{},get:{}};function Fy(t,e,n){return Math.min(Math.max(e,t),n)}function Dy(t){t=Math.round(t).toString(16).toUpperCase();return t.length<2?"0"+t:t}By.get=function(t){var e,n;switch(t.substring(0,3).toLowerCase()){case"hsl":e=By.get.hsl(t),n="hsl";break;case"hwb":e=By.get.hwb(t),n="hwb";break;default:e=By.get.rgb(t),n="rgb"}return e?{model:n,value:e}:null},By.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]:Ry.call(Cy,e[1])?((i=Cy[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]=Fy(i[n],0,255);return i[3]=Fy(i[3],0,1),i},By.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,Fy(parseFloat(t[2]),0,100),Fy(parseFloat(t[3]),0,100),Fy(isNaN(e)?1:e,0,1)]):null},By.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,Fy(parseFloat(t[2]),0,100),Fy(parseFloat(t[3]),0,100),Fy(isNaN(e)?1:e,0,1)]):null},By.to.hex=function(){var t=jy(arguments);return"#"+Dy(t[0])+Dy(t[1])+Dy(t[2])+(t[3]<1?Dy(Math.round(255*t[3])):"")},By.to.rgb=function(){var t=jy(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]+")"},By.to.rgb.percent=function(){var t=jy(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]+")"},By.to.hsl=function(){var t=jy(arguments);return t.length<4||1===t[3]?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"},By.to.hwb=function(){var t=jy(arguments),e="";return 4<=t.length&&1!==t[3]&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"},By.to.keyword=function(t){return Iy[t.slice(0,3)]};var zy=Fl.exports;function Gy(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 Wy(t){var e,n,r,t=zy.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*Gy(n=2*r-(r=r<.5?r*(1+n):r+n-r*n),r,e+1/3),255*Gy(n,r,e),255*Gy(n,r,e-1/3),t]):null):null}const Hy=(e,n)=>t=>e*(1-t)+n*t,Yy=(t,e)=>{if("number"==typeof t&&"number"==typeof e)return Hy(t,e);if("string"!=typeof t||"string"!=typeof e)return()=>t;{var n=t,r=e;const l=Wy(n),c=Wy(r);return null===l||null===c?l?()=>n:()=>r:e=>{var n=new Array(4);for(let t=0;t<4;t+=1){var r=l[t],i=c[t];n[t]=r*(1-e)+i*e}var[t,a,o,s]=n;return`rgba(${Math.round(t)}, ${Math.round(a)}, ${Math.round(o)}, ${s})`}}},Vy=(t,e)=>{const n=Hy(t,e);return t=>Math.round(n(t))};function qy({map:t,initKey:e},n){e=e(n);return t.has(e)?t.get(e):n}function Uy(t){return"object"==typeof t?t.valueOf():t}class Xy extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=Uy,null!==t)for(var[e,n]of t)this.set(e,n)}get(t){return super.get(qy({map:this.map,initKey:this.initKey},t))}has(t){return super.has(qy({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 $y{constructor(t){this.options=yy({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=yy({},this.options,t),this.rescale(t)}rescale(t){}}const Ky=Symbol("defaultUnknown");function Zy(e,n,r){for(let t=0;t<n.length;t+=1)e.has(n[t])||e.set(r(n[t]),t)}function Qy(t){var{value:t,from:e,to:n,mapper:r,notFoundReturn:i}=t;let a=r.get(t);if(void 0===a){if(i!==Ky)return i;a=e.push(t)-1,r.set(t,a)}return n[a%n.length]}function Jy(t){return t instanceof Date?t=>""+t:"object"==typeof t?t=>JSON.stringify(t):t=>t}class t1 extends $y{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[],unknown:Ky}}map(t){return 0===this.domainIndexMap.size&&Zy(this.domainIndexMap,this.getDomain(),this.domainKey),Qy({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return 0===this.rangeIndexMap.size&&Zy(this.rangeIndexMap,this.getRange(),this.rangeKey),Qy({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=Jy(e),this.rangeKey=Jy(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 t1(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 e1(t){const{domain:e,range:n,paddingOuter:r,paddingInner:i,flex:a,round:o,align:s}=t;var l=e.length,c=0<(c=(t=l)-(u=a).length)?[...u,...new Array(c).fill(1)]:c<0?u.slice(0,t):u,[t,u]=n,u=u-t,h=u/(2/l*r+1-1/l*i);const f=h*i/l;h-=l*f;const d=function(t){const e=Math.min(...t);return t.map(t=>t/e)}(c),p=h/d.reduce((t,e)=>t+e);var c=new Xy(e.map((t,e)=>{e=d[e]*p;return[t,o?Math.floor(e):e]})),g=new Xy(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/l*i))*s;let m=o?Math.round(t):t;var y=new Array(l);for(let t=0;t<l;t+=1){y[t]=(v=m,Math.round(1e12*v)/1e12);var v=e[t];m+=g.get(v)}return{valueBandWidth:c,valueStep:g,adjustedRange:y}}class n1 extends t1{constructor(t){super(t)}getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:Ky,flex:[]}}clone(){return new n1(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 e1(t);var{range:n,paddingOuter:t,paddingInner:r,round:i,align:a}=t;let o,s,l=n[0];return n=n[1]-l,o=n/Math.max(1,2*t+(e-r)),i&&(o=Math.floor(o)),l+=(n-o*(e-r))*a,s=o*(1-r),i&&(l=Math.round(l),s=Math.round(s)),t=new Array(e).fill(0).map((t,e)=>l+e*o),{valueStep:o,valueBandWidth:s,adjustedRange:t}}({align:t,range:n,round:r,flex:i,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=r,this.valueBandWidth=n,this.adjustedRange=t}}const r1=(t,e,n)=>{let r,i,a=t,o=e;if(a===o&&0<n)return[a];let s=Xm(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};class i1 extends $y{getDefaultOptions(){return{range:[0],domain:[0,1],unknown:void 0,tickCount:5,tickMethod:r1}}map(t){var[e]=this.options.range;return void 0!==e?e:this.options.unknown}invert(t){var[e]=this.options.range;return t===e&&void 0!==e?this.options.domain:[]}getTicks(){var{tickMethod:t,domain:e,tickCount:n}=this.options,[e,r]=e;return py(e)&&py(r)?t(e,r,n):[]}clone(){return new i1(this.options)}}function a1(t){return Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}const o1=[1,5,2,2.5,4,3],s1=100*Number.EPSILON;const l1=(n,r,t=5,i=!0,a=o1,o=[.25,.2,.5,.05])=>{var s=t<0?0:Math.round(t);if(Number.isNaN(n)||Number.isNaN(r)||"number"!=typeof n||"number"!=typeof r||!s)return[];if(r-n<1e-15||1===s)return[n];var l,c,u,h,f,d,p,g={score:-2,lmin:0,lmax:0,lstep:0};let m=1;for(;m<1/0;){for(let t=0;t<a.length;t+=1){var y=a[t],v=(h=y,f=a,d=m,p=void 0,p=wy(f),1-xy(f,h)/(p-1)-d+1);if(o[0]*v+o[1]+o[2]+o[3]<g.score){m=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)/m/y;let t=Math.ceil(Math.log10(x));for(;t<1/0;){var w=m*y*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)*m-(e-1)*m,E=Math.ceil(n/w)*m;if(M<=E){var O=E-M;for(let t=0;t<=O;t+=1){var S=(M+t)*(w/m),_=S+w*(e-1),A=w,P=function(t,e,n,r,i,a){var o=wy(e),e=xy(e,t);let s=0;return t=(r%a+a)%a,1-e/(o-1)-n+(s=(t<s1||a-t<s1)&&r<=0&&0<=i?1:s)}(y,a,m,S,_,A),T=1-.5*((r-_)**2+(n-S)**2)/(.1*(r-n))**2,L=(l=e,L=n,l=(l-1)/(_-(N=S)),c=((c=s)-1)/(Math.max(_,r)-Math.min(L,N)),2-Math.max(l/c,c/l)),N=o[0]*P+o[1]*T+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}}m+=1}var t=a1(g.lmax),e=a1(g.lmin),C=a1(g.lstep),j=Math.floor((t=(t-e)/C,Math.round(1e12*t)/1e12))+1,R=new Array(j);R[0]=a1(e);for(let t=1;t<j;t+=1)R[t]=a1(R[t-1]+C);return R};class c1 extends $y{getDefaultOptions(){return{domain:[0,1],range:[0,1],tickCount:5,unknown:void 0,tickMethod:l1}}map(t){return ky(t)?t:this.options.unknown}invert(t){return this.map(t)}clone(){return new c1(this.options)}getTicks(){var{domain:t,tickCount:e,tickMethod:n}=this.options,[t,r]=t;return py(t)&&py(r)?n(t,r,e):[]}}const u1=(t,e,n)=>{var[t,r]=t,[e,i]=e;let a,o;return Wm(o=t<r?(a=Hm(t,r),n(e,i)):(a=Hm(r,t),n(i,e)),a)},h1=(r,t,e)=>{const i=Math.min(r.length,t.length)-1,a=new Array(i),o=new Array(i);var n=r[0]>r[i],s=n?[...r].reverse():r,l=n?[...t].reverse():t;for(let t=0;t<i;t+=1)a[t]=Hm(s[t],s[t+1]),o[t]=e(l[t],l[t+1]);return t=>{var e=Ym(r,t,1,i)-1,n=a[e];return Wm(o[e],n)(t)}},f1=(t,e,n,r)=>{return(2<Math.min(t.length,e.length)?h1:u1)(t,e,r?Vy:n)};class d1 extends $y{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Hy,tickCount:5}}map(t){return ky(t)?this.output(t):this.options.unknown}invert(t){return ky(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 Km}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 vy}composeOutput(t,e){var{domain:n,range:r,round:i,interpolate:a}=this.options,n=f1(n.map(t),r,a,i);this.output=Wm(n,e,t)}composeInput(t,e,n){var{domain:r,range:i}=this.options,i=f1(i,r.map(t),Hy);this.input=Wm(e,n,i)}}class p1 extends d1{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Yy,tickMethod:r1,tickCount:5}}chooseTransforms(){return[vy,vy]}clone(){return new p1(this.options)}}class g1 extends n1{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,padding:0,unknown:Ky,paddingInner:1,paddingOuter:0}}constructor(t){super(t)}getPaddingInner(){return 1}clone(){return new g1(this.options)}update(t){super.update(t)}getPaddingOuter(){return this.options.padding}}const m1=t=>t<0?-Math.sqrt(-t):Math.sqrt(t);class y1 extends d1{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,exponent:2,interpolate:Yy,tickMethod:r1,tickCount:5}}constructor(t){super(t)}chooseTransforms(){var t,e,n,r=this.options["exponent"];return 1===r?[vy,vy]:(t=.5===r?m1:(e=r,t=>t<0?-((-t)**e):t**e),n=r,[t,t=>t<0?-((-t)**(1/n)):t**(1/n)])}clone(){return new y1(this.options)}}class v1 extends y1{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Yy,tickMethod:r1,tickCount:5,exponent:.5}}constructor(t){super(t)}update(t){super.update(t)}clone(){return new v1(this.options)}}class b1 extends $y{constructor(t){super(t)}getDefaultOptions(){return{domain:[.5],range:[0,1]}}map(t){return ky(t)?(t=Ym(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 b1(this.options)}rescale(){var{domain:t,range:e}=this.options;this.n=Math.min(t.length,e.length-1),this.thresholds=t}}const x1=(t,e,n,r=10)=>{var i=t<0,a=Oy(r,i),o=Ey(r,i),s=e<t,l=s?e:t,c=s?t:e;let u=o(l),h=o(c),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(c<p)break;l<=p&&f.push(p)}}else for(;u<=h;u+=1){var g=a(u);for(let t=1;t<r;t+=1){var m=g*t;if(c<m)break;l<=m&&f.push(m)}}2*f.length<n&&(f=r1(l,c,n))}else f=r1(u,h,Math.min(h-u,n)).map(a);return s?f.reverse():f};class w1 extends d1{getDefaultOptions(){return{domain:[1,10],range:[0,1],base:10,interpolate:Yy,tickMethod:x1,tickCount:5}}chooseNice(){return Sy}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[Ey(t,e),Oy(t,e)]}clone(){return new w1(this.options)}}class k1 extends b1{getDefaultOptions(){return{domain:[0,1],range:[.5],nice:!1,tickCount:5,tickMethod:l1}}constructor(t){super(t)}nice(){var t,e,n=this.options["nice"];n&&([n,t,e]=this.getTickMethodOptions(),this.options.domain=Km(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 k1(this.options)}}function M1(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 E1 extends b1{getDefaultOptions(){return{domain:[],range:[],tickCount:5,unknown:void 0,tickMethod:l1}}constructor(t){super(t)}rescale(){var{domain:t,range:e}=this.options;this.n=e.length-1,this.thresholds=M1(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 E1(this.options)}getTicks(){var{tickCount:t,domain:e,tickMethod:n}=this.options,r=e.length-1;return n(e[0],e[r],t)}}var O1=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,S1=/\[([^]*?)\]/gm;function _1(t,e){for(var n=[],r=0,i=t.length;r<i;r++)n.push(t[r].substr(0,e));return n}function A1(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 P1(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t}var T1,ql=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Kl=["January","February","March","April","May","June","July","August","September","October","November","December"],ec=_1(Kl,3),L1=A1({},{dayNamesShort:_1(ql,3),dayNames:ql,monthNamesShort:ec,monthNames:Kl,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][3<t%10?0:(t-t%10!=10?1:0)*t%10]}}),N1={D:function(t){return String(t.getDate())},DD:function(t){return P1(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return P1(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 P1(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 P1(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return P1(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return P1(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return P1(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return P1(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return P1(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return P1(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return P1(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?"-":"+")+P1(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(t){t=t.getTimezoneOffset();return(0<t?"-":"+")+P1(Math.floor(Math.abs(t)/60),2)+":"+P1(Math.abs(t)%60,2)}},C1={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 j1=(t,e,n,r,i)=>{var a=e<t,o=a?e:t,t=a?t:e,[e,n]=ay(o,t,n,r,i),r=e.range(o,new Date(+t+1),n,!0);return a?r.reverse():r};function R1(t){var e=t.getTimezoneOffset(),t=new Date(t);return t.setMinutes(t.getMinutes()+e,t.getSeconds(),t.getMilliseconds()),t}class I1 extends d1{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:j1,interpolate:Hy,mask:void 0,utc:!1}}chooseTransforms(){return[t=>+t,t=>new Date(t)]}chooseNice(){return oy}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?iy:ny,s=t?R1:vy;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=C1.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=C1[t]||t).replace(S1,function(t,e){return r.push(e),"@@@"}),A1(A1({},L1),n));return(t=t.replace(O1,function(t){return N1[t](e,i)})).replace(/@@@/g,function(){return r.shift()})}}clone(){return new I1(this.options)}}var B1;let F1=T1=class extends p1{getDefaultOptions(){return{domain:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:vy,tickMethod:r1,tickCount:5}}constructor(t){super(t)}clone(){return new T1(this.options)}};F1=T1=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}([_y(function(t){return[t(0),t(1)]},t=>{var[t,e]=t;return Wm(Hy(0,1),Hm(t,e))})],F1);let D1=B1=class extends p1{getDefaultOptions(){return{domain:[0,.5,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolator:vy,tickMethod:r1,tickCount:5}}constructor(t){super(t)}clone(){return new B1(this.options)}};function z1(r,i){return Object.entries(r).reduce((t,[e,n])=>(t[e]=i(n,e,r),t),{})}function G1(t){return t.map((t,e)=>e)}function W1(t,e){const n=[[],[]];return t.forEach(t=>{n[e(t)?0:1].push(t)}),n}function H1(n,t=n.length){if(1===t)return n.map(t=>[t]);const r=[];for(let e=0;e<n.length;e++)H1(n.slice(e+1),t-1).forEach(t=>{r.push([n[e],...t])});return r}function Y1(e){if(1===e.length)return[e];var n=[];for(let t=1;t<=e.length;t++)n.push(...H1(e,t));return n}function V1([t,e],[n,r]){return[t-n,e-r]}function q1([t,e],[n,r]){return Math.sqrt(Math.pow(t-n,2)+Math.pow(e-r,2))}function U1([t,e]){return Math.atan2(e,t)}function X1([t,e]){return U1([t,e])+Math.PI/2}function $1(t,e){t=U1(t),e=U1(e);return t<e?e-t:2*Math.PI-(t-e)}function K1(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 Z1([t,e],[n,r]){return[(t+n)/2,(e+r)/2]}function P(t,e){for(var[n,r]of Object.entries(e))t.style(n,r)}function Q1(t,e,n){var n=n["arrowSize"],n="string"==typeof n?+parseFloat(n)/100*q1(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 J1(t,e,n,r,i){e=U1(V1(r,e))+Math.PI,n=U1(V1(r,n))+Math.PI;t.arc(r[0],r[1],i,e,n,n-e<0)}function tv(e,t,n,r="y",i="between"){const a="y"===r||!0===r?n:t;var n="y"===r||!0===r?90:0,t=G1(a),[r,o]=Qd(t,t=>a[t]);const s=new p1({domain:[r,o],range:[0,100]}),l=t=>s.map(a[t]);r={between:t=>`${e[t]} ${l(t)}%`,start:t=>0===t?`${e[t]} ${l(t)}%`:`${e[t-1]} ${l(t)}%, ${e[t]} ${l(t)}%`,end:t=>t===e.length-1?`${e[t]} ${l(t)}%`:`${e[t]} ${l(t)}%, ${e[t+1]} ${l(t)}%`};return`linear-gradient(${n}deg, ${t.sort((t,e)=>l(t)-l(e)).map(r[i]||r.between).join(",")})`}function ev(t){var[t,e,n,r]=t;return[r,t,e,n]}function nv(t,e,n){var[e,r,,i]=Np(t)?ev(e):e,[n,a]=n,t=t.getCenter(),o=X1(V1(e,t)),r=X1(V1(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:q1(i,t),outerRadius:q1(e,t)}}function rv(t,e,n,r){var i=t["defaultColor"],t=t[e]||{},e=t[n]||t[r];return Object.assign({defaultColor:i},e)}function iv(t){var{opacityAttribute:t="fill"}=t;return t+"Opacity"}function av(t,e){return Cp(t)?(e=e["transform"],`translate(${(t=t.getCenter())[0]}, ${t[1]}) `+(e||"")):""}function ov(t){var e,n,r;return 1===t.length?t[0]:([[t,e],[n,r]]=t,[(t+n)/2,(e+r)/2])}function it(t){return new sv([t],null,t,t.ownerDocument)}D1=B1=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}([_y(function(t){return[t(0),t(.5),t(1)]},t=>{const[e,n,r]=t,i=Wm(Hy(0,.5),Hm(e,n)),a=Wm(Hy(.5,1),Hm(n,r));return t=>(e>r?t<n?a:i:t<n?i:a)(t)})],D1);class sv{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 sv(t,null,this._elements[0],this._document)}selectFacetAll(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new sv(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 sv([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 sv(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 sv(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 sv([r],null,this._parent,this._document)}data(e,n=t=>t,r=()=>null){var i=[],a=[],o=new Set(this._elements),s=[],l=new Set,c=new Map(this._elements.map((t,e)=>[n(t.__data__,e),t])),u=new Map(this._facetElements.map((t,e)=>[n(t.__data__,e),t])),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(c.has(d)){var g=c.get(d);g.__data__=f,g.__facet__=!1,a.push(g),o.delete(g),c.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 m of rp)o.delete(m);h.delete(d)}else c.has(p)?((d=c.get(p)).__toData__?d.__toData__.push(f):d.__toData__=[f],l.add(d),o.delete(d)):i.push(f)}var t=[new sv([],i,this._parent,this._document),new sv(a,null,this._parent,this._document),new sv(o,null,this._parent,this._document),new sv([],s,this._parent,this._document),new sv(l,null,this._parent,this._document)];return new sv(this._elements,null,this._parent,this._document,t)}merge(t){var e=[...this._elements,...t._elements],t=[...this._transitions,...t._transitions];return new sv(e,null,this._parent,this._document,void 0,t)}createElement(t){var e;return this._document?this._document.createElement(t,{}):(e=sv.registry[t])?new e:O0("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++){var e=this._transitions[t];e?(e=Array.isArray(e)?e:[e],Promise.all(e.map(t=>t.finished)).then(()=>{this._elements[t].remove()})):this._elements[t].remove()}return new sv([],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}}sv.registry={g:hl,rect:Sl,circle:al,path:xl,text:Al,ellipse:cl,image:gl,line:yl,polygon:kl,polyline:El,html:dl};const lv=t=>{const u=t["radius"],h=et(t,["shape","radius"]);var t=rt(h,"pointer"),e=rt(h,"pin");const f=t["shape"],d=et(t,["shape"]),p=e["shape"],g=et(e,["shape"]);return(t,e,n,r)=>{var t=t.map(t=>n.invert(t)),[i,a,o]=function(t,e){var[,...t]=(t=t.getOptions()["transformations"]).find(t=>t[0]===e);return t}(n,"polar");const s=n.clone();var l=e["color"],i=xf({startAngle:i,endAngle:a,innerRadius:o,outerRadius:u});i.push(["cartesian"]),s.update({transformations:i});const c=t.map(t=>s.map(t));var[a,o]=ov(c),[i,t]=n.getCenter(),a=Object.assign(Object.assign({x1:a,y1:o,x2:i,y2:t,stroke:l},d),h),o=Object.assign(Object.assign({cx:i,cy:t,stroke:l},g),h),i=it(new hl);return L0(f)||("function"==typeof f?i.append(()=>f(c,e,s,r)):i.append("line").call(P,a).node()),L0(p)||("function"==typeof p?i.append(()=>p(c,e,s,r)):i.append("circle").call(P,o).node()),i.node()}},cv=h=>{const f={coordinate:{type:"radial",innerRadius:.9,outerRadius:1,startAngle:-1.1*Math.PI,endAngle:.1*Math.PI},axis:{x:!1},legend:!1,tooltip:!1,encode:{x:"x",y:"y",color:"color"},scale:{color:{range:["#30BF78","#D0D0D0"]}}},d={style:{shape:lv,lineWidth:4,pointerLineCap:"round",pinR:10,pinFill:"#fff",radius:.6}},p={type:"text",style:{x:"50%",y:"60%",textAlign:"center",textBaseline:"middle",fontSize:20,fontWeight:800,fill:"#888"}};return()=>{var t,{data:e={},scale:n={},style:r={},animate:i={}}=h,a=et(h,["data","scale","style","animate","transform"]),{targetData:e,totalData:n,target:o,total:s,scale:l}=function(t,e){const{name:n="score",target:r,total:i,percent:a}=t;var t=a||r,o=a?1:i,s=e["color"],e=Object.assign({y:{domain:[0,o]}},e);if(!s)return{targetData:[{x:n,y:t,color:"target"}],totalData:[{x:n,y:t,color:"target"},{x:n,y:o-t,color:"total"}],target:t,total:o,scale:e};const{domain:l=[]}=s;return{targetData:[{x:n,y:t,color:"target"}],totalData:l.map((t,e)=>({x:n,y:1<=e?t-l[e-1]:t,color:e})),target:t,total:o,scale:e}}(e,n),c=rt(r,"text"),u=(t=["pointer","pin"],Object.fromEntries(Object.entries(r).filter(([e])=>t.find(t=>e.startsWith(t)))));return[nt({},f,Object.assign({type:"interval",transform:[{type:"stackY"}],data:n,scale:l,style:rt(r,"arc"),animate:"object"==typeof i?rt(i,"arc"):i},a)),nt({},f,d,Object.assign({type:"point",data:e,scale:l,style:u,animate:"object"==typeof i?rt(i,"indicator"):i},a)),nt({},p,{style:Object.assign({text:([n,{target:r,total:e}]=[c,{target:o,total:s}],(n=n.content)?n(r,e):r.toString())},c),animate:"object"==typeof i?rt(i,"text"):i})]}},uv=(cv.props={},()=>["#5B8FF9","#5AD8A6","#5D7092","#F6BD16","#6F5EF9","#6DC8EC","#945FB9","#FF9845","#1E9493","#FF99C3"]),hv=(uv.props={},()=>["#5B8FF9","#CDDDFD","#5AD8A6","#CDF3E4","#5D7092","#CED4DE","#F6BD16","#FCEBB9","#6F5EF9","#D3CEFD","#6DC8EC","#D3EEF9","#945FB9","#DECFEA","#FF9845","#FFE0C7","#1E9493","#BBDEDE","#FF99C3","#FFE0ED"]),fv=(hv.props={},t=>new n1(t)),dv=(fv.props={},t=>new p1(t)),pv=(dv.props={},t=>new t1(t)),gv=(pv.props={},t=>new c1(t)),mv=(gv.props={},t=>new g1(t)),yv=(mv.props={},t=>new I1(t)),vv=(yv.props={},t=>new w1(t)),bv=(vv.props={},t=>new y1(t)),xv=(bv.props={},t=>new b1(t)),wv=(xv.props={},t=>new E1(t)),kv=(wv.props={},t=>new k1(t)),Mv=(kv.props={},t=>new v1(t)),Ev=(Mv.props={},t=>new F1(t)),Ov=(Ev.props={},t=>new i1(t));function Sv(t){return function(){return t}}Ov.props={};const _v=Math.abs,Av=Math.atan2,Pv=Math.cos,Tv=Math.max,Lv=Math.min,Nv=Math.sin,Cv=Math.sqrt,jv=1e-12,Rv=Math.PI,Iv=Rv/2,Bv=2*Rv;function Fv(t){return 1<=t?Iv:t<=-1?-Iv:Math.asin(t)}const Dv=Math.PI,zv=2*Dv,Gv=1e-6,Wv=zv-Gv;function Hv(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=arguments[t]+n[t]}class Yv{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Hv:function(t){var e=Math.floor(t);if(!(0<=e))throw new Error("invalid digits: "+t);if(15<e)return Hv;const r=10**e;return function(n){this._+=n[0];for(let t=1,e=n.length;t<e;++t)this._+=Math.round(arguments[t]*r)/r+n[t]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,r){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(t,e,n,r,i,a){this._append`C${+t},${+e},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,n,r,i){if(t=+t,e=+e,n=+n,r=+r,(i=+i)<0)throw new Error("negative radius: "+i);var a,o,s=this._x1,l=this._y1,c=n-t,u=r-e,h=s-t,f=l-e,d=h*h+f*f;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:d>Gv&&(Math.abs(f*c-u*h)>Gv&&i?(o=c*c+u*u,r=(n=n-s)*n+(s=r-l)*s,l=Math.sqrt(o),a=Math.sqrt(d),d=(o=i*Math.tan((Dv-Math.acos((o+d-r)/(2*l*a)))/2))/a,r=o/l,Math.abs(d-1)>Gv&&this._append`L${t+d*h},${e+d*f}`,this._append`A${i},${i},0,0,${+(h*s<f*n)},${this._x1=t+r*c},${this._y1=e+r*u}`):this._append`L${this._x1=t},${this._y1=e}`)}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error("negative radius: "+n);let o=n*Math.cos(r),s=n*Math.sin(r),l=t+o,c=e+s,u=1^a,h=a?r-i:i-r;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>Gv||Math.abs(this._y1-c)>Gv)&&this._append`L${l},${c}`,n&&((h=h<0?h%zv+zv:h)>Wv?this._append`A${n},${n},0,1,${u},${t-o},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:h>Gv&&this._append`A${n},${n},0,${+(h>=Dv)},${u},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Vv(){return new Yv}function qv(n){let r=3;return n.digits=function(t){if(!arguments.length)return r;if(null==t)r=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);r=e}return n},()=>new Yv(r)}function Uv(t){return t.innerRadius}function Xv(t){return t.outerRadius}function $v(t){return t.startAngle}function Kv(t){return t.endAngle}function Zv(t){return t&&t.padAngle}function Qv(t,e,n,r,i,a,o){var s=t-n,l=e-r,o=(o?a:-a)/Cv(s*s+l*l),l=o*l,o=-o*s,s=t+l,t=e+o,e=n+l,n=r+o,r=(s+e)/2,c=(t+n)/2,u=e-s,h=n-t,f=u*u+h*h,a=i-a,s=s*n-e*t,n=(h<0?-1:1)*Cv(Tv(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-c,n=d-r,f=s-c;return n*n+f*f<u*u+h*h&&(e=d,t=s),{cx:e,cy:t,x01:-l,y01:-o,x11:e*(i/a-1),y11:t*(i/a-1)}}function Jv(){var A=Uv,P=Xv,T=Sv(0),L=null,N=$v,C=Kv,j=Zv,R=null,I=qv(e);function e(){var t,e,n,r,i,a,o,s,l,c,u,h,f,d,p,g,m,y,v,b,x,w,k=+A.apply(this,arguments),M=+P.apply(this,arguments),E=N.apply(this,arguments)-Iv,O=C.apply(this,arguments)-Iv,S=_v(O-E),_=E<O;if(R=R||(t=I()),M<k&&(e=M,M=k,k=e),M>jv?S>Bv-jv?(R.moveTo(M*Pv(E),M*Nv(E)),R.arc(0,0,M,E,O,!_),k>jv&&(R.moveTo(k*Pv(O),k*Nv(O)),R.arc(0,0,k,O,E,_))):(r=e=E,i=n=O,o=a=S,f=(u=j.apply(this,arguments)/2)>jv&&(L?+L.apply(this,arguments):Cv(k*k+M*M)),w=x=s=Lv(_v(M-k)/2,+T.apply(this,arguments)),f>jv&&(h=Fv(f/k*Nv(u)),f=Fv(f/M*Nv(u)),(a-=2*h)>jv?(r+=h*=_?1:-1,i-=h):(a=0,r=i=(E+O)/2),(o-=2*f)>jv?(e+=f*=_?1:-1,n-=f):(o=0,e=n=(E+O)/2)),u=M*Pv(e),h=M*Nv(e),f=k*Pv(i),E=k*Nv(i),s>jv&&(d=M*Pv(n),p=M*Nv(n),g=k*Pv(r),m=k*Nv(r),S<Rv)&&((O=function(t,e,n,r,i,a,o,s){var l=(s=s-a)*(n=n-t)-(o=o-i)*(r=r-e);if(!(l*l<jv))return[t+(l=(o*(e-a)-s*(t-i))/l)*n,e+l*r]}(u,h,g,m,d,p,f,E))?(S=u-O[0],v=h-O[1],b=d-O[0],y=p-O[1],v=1/Nv((1<(S=(S*b+v*y)/(Cv(S*S+v*v)*Cv(b*b+y*y)))?0:S<-1?Rv:Math.acos(S))/2),b=Cv(O[0]*O[0]+O[1]*O[1]),x=Lv(s,(k-b)/(v-1)),w=Lv(s,(M-b)/(1+v))):x=w=0),o>jv?w>jv?(l=Qv(g,m,u,h,M,w,_),c=Qv(d,p,f,E,M,w,_),R.moveTo(l.cx+l.x01,l.cy+l.y01),w<s?R.arc(l.cx,l.cy,w,Av(l.y01,l.x01),Av(c.y01,c.x01),!_):(R.arc(l.cx,l.cy,w,Av(l.y01,l.x01),Av(l.y11,l.x11),!_),R.arc(0,0,M,Av(l.cy+l.y11,l.cx+l.x11),Av(c.cy+c.y11,c.cx+c.x11),!_),R.arc(c.cx,c.cy,w,Av(c.y11,c.x11),Av(c.y01,c.x01),!_))):(R.moveTo(u,h),R.arc(0,0,M,e,n,!_)):R.moveTo(u,h),k>jv&&a>jv?x>jv?(l=Qv(f,E,d,p,k,-x,_),c=Qv(u,h,g,m,k,-x,_),R.lineTo(l.cx+l.x01,l.cy+l.y01),x<s?R.arc(l.cx,l.cy,x,Av(l.y01,l.x01),Av(c.y01,c.x01),!_):(R.arc(l.cx,l.cy,x,Av(l.y01,l.x01),Av(l.y11,l.x11),!_),R.arc(0,0,k,Av(l.cy+l.y11,l.cx+l.x11),Av(c.cy+c.y11,c.cx+c.x11),_),R.arc(c.cx,c.cy,x,Av(c.y11,c.x11),Av(c.y01,c.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)+ +P.apply(this,arguments))/2,e=(+N.apply(this,arguments)+ +C.apply(this,arguments))/2-Rv/2;return[Pv(e)*t,Nv(e)*t]},e.innerRadius=function(t){return arguments.length?(A="function"==typeof t?t:Sv(+t),e):A},e.outerRadius=function(t){return arguments.length?(P="function"==typeof t?t:Sv(+t),e):P},e.cornerRadius=function(t){return arguments.length?(T="function"==typeof t?t:Sv(+t),e):T},e.padRadius=function(t){return arguments.length?(L=null==t?null:"function"==typeof t?t:Sv(+t),e):L},e.startAngle=function(t){return arguments.length?(N="function"==typeof t?t:Sv(+t),e):N},e.endAngle=function(t){return arguments.length?(C="function"==typeof t?t:Sv(+t),e):C},e.padAngle=function(t){return arguments.length?(j="function"==typeof t?t:Sv(+t),e):j},e.context=function(t){return arguments.length?(R=null==t?null:t,e):R},e}function tb(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function eb(t){this._context=t}function nb(t){return new eb(t)}function rb(t){return t[0]}function ib(t){return t[1]}function ab(o,s){var l=Sv(!0),c=null,u=nb,h=null,f=qv(e);function e(t){var e,n,r,i=(t=tb(t)).length,a=!1;for(null==c&&(h=u(r=f())),e=0;e<=i;++e)!(e<i&&l(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?rb:Sv(o),s="function"==typeof s?s:void 0===s?ib:Sv(s),e.x=function(t){return arguments.length?(o="function"==typeof t?t:Sv(+t),e):o},e.y=function(t){return arguments.length?(s="function"==typeof t?t:Sv(+t),e):s},e.defined=function(t){return arguments.length?(l="function"==typeof t?t:Sv(!!t),e):l},e.curve=function(t){return arguments.length?(u=t,null!=c&&(h=u(c)),e):u},e.context=function(t){return arguments.length?(null==t?c=h=null:h=u(c=t),e):c},e}function ob(u,h,f){var d=null,p=Sv(!0),g=null,m=nb,y=null,v=qv(e);function e(t){var e,n,r,i,a,o=(t=tb(t)).length,s=!1,l=new Array(o),c=new Array(o);for(null==g&&(y=m(a=v())),e=0;e<=o;++e){if(!(e<o&&p(i=t[e],e,t))===s)if(s=!s)n=e,y.areaStart(),y.lineStart();else{for(y.lineEnd(),y.lineStart(),r=e-1;n<=r;--r)y.point(l[r],c[r]);y.lineEnd(),y.areaEnd()}s&&(l[e]=+u(i,e,t),c[e]=+h(i,e,t),y.point(d?+d(i,e,t):l[e],f?+f(i,e,t):c[e]))}if(a)return y=null,a+""||null}function t(){return ab().defined(p).curve(m).context(g)}return u="function"==typeof u?u:void 0===u?rb:Sv(+u),h="function"==typeof h?h:Sv(void 0===h?0:+h),f="function"==typeof f?f:void 0===f?ib:Sv(+f),e.x=function(t){return arguments.length?(u="function"==typeof t?t:Sv(+t),d=null,e):u},e.x0=function(t){return arguments.length?(u="function"==typeof t?t:Sv(+t),e):u},e.x1=function(t){return arguments.length?(d=null==t?null:"function"==typeof t?t:Sv(+t),e):d},e.y=function(t){return arguments.length?(h="function"==typeof t?t:Sv(+t),f=null,e):h},e.y0=function(t){return arguments.length?(h="function"==typeof t?t:Sv(+t),e):h},e.y1=function(t){return arguments.length?(f=null==t?null:"function"==typeof t?t:Sv(+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:Sv(!!t),e):p},e.curve=function(t){return arguments.length?(m=t,null!=g&&(y=m(g)),e):m},e.context=function(t){return arguments.length?(null==t?g=y=null:y=m(g=t),e):g},e}Vv.prototype=Yv.prototype,eb.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 sb=cb(nb);function lb(t){this._curve=t}function cb(e){function t(t){return new lb(e(t))}return t._curve=e,t}function ub(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(cb(t)):e()._curve},t}function hb(){}function fb(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 db(t,e){this._context=t,this._k=(1-e)/6}function pb(t,e){this._context=t,this._k=(1-e)/6}function gb(t,e,n){var r,i,a=t._x1,o=t._y1,s=t._x2,l=t._y2;t._l01_a>jv&&(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>jv&&(r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),s=(s*r+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*r+t._y1*t._l23_2a-n*t._l12_2a)/i),t._context.bezierCurveTo(a,o,s,l,t._x2,t._y2)}function mb(t,e){this._context=t,this._alpha=e}lb.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))}},db.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:fb(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:fb(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 db(t,n)}return t.tension=function(t){return e(+t)},t}(0),pb.prototype={areaStart:hb,areaEnd:hb,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:fb(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 pb(t,n)}return t.tension=function(t){return e(+t)},t}(0),mb.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:gb(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 yb=function e(n){function t(t){return n?new mb(t,n):new db(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function vb(t,e){this._context=t,this._alpha=e}vb.prototype={areaStart:hb,areaEnd:hb,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:gb(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 bb=function e(n){function t(t){return n?new vb(t,n):new pb(t,0)}return t.alpha=function(t){return e(+t)},t}(.5);function xb(t){this._context=t}function wb(t){return new xb(t)}function kb(t,e){this._context=t,this._t=e}function Mb(t){return new kb(t,.5)}function Eb(t){return new kb(t,0)}function Ob(t){return new kb(t,1)}function Sb(t,e,n,r={}){var{inset:i=0,radius:a=0,insetLeft:o=i,insetTop:s=i,insetRight:l=i,insetBottom:c=i,radiusBottomLeft:u=a,radiusBottomRight:h=a,radiusTopLeft:f=a,radiusTopRight:d=a}=r,r=et(r,["inset","radius","insetLeft","insetTop","insetRight","insetBottom","radiusBottomLeft","radiusBottomRight","radiusTopLeft","radiusTopRight"]);if(!Cp(n)&&!Rp(n)){var[p,,g]=!!Np(n)?ev(t):t;const[x,v]=p;var[g,p]=V1(g,p),m=(0<g?x:x+g)+o,y=(0<p?v:v+p)+s,g=Math.abs(g)-(o+l),o=Math.abs(p)-(s+c);return it(new Sl({})).style("x",m).style("y",y).style("width",g).style("height",o).style("radius",[f,d,h,u]).call(P,r).node()}const{y:v,y1:b}=e;l=n.getCenter(),p=nv(n,t,[v,b]),s=Jv().cornerRadius(a).padAngle(i*Math.PI/180);return it(new xl({})).style("path",s(p)).style("transform",`translate(${l[0]}, ${l[1]})`).style("radius",a).style("inset",i).call(P,r).node()}xb.prototype={areaStart:hb,areaEnd:hb,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))}},kb.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}};const _b=E=>{const{colorAttribute:O,first:S=!0,last:_=!0}=E,A=et(E,["colorAttribute","opacityAttribute","first","last"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),{defaultColor:i,radius:a=0}=r,o=et(r,["defaultColor","radius"]),r=o.lineWidth||1,{stroke:s,radius:a=a,radiusTopLeft:l=a,radiusTopRight:c=a,radiusBottomRight:u=a,radiusBottomLeft:h=a,innerRadius:f=0,innerRadiusTopLeft:d=f,innerRadiusTopRight:p=f,innerRadiusBottomRight:g=f,innerRadiusBottomLeft:f=f,lineWidth:r="stroke"===O||s?r:0,inset:m=0,insetLeft:y=m,insetRight:v=m,insetBottom:b=m,insetTop:x=m}=A,w=et(A,["stroke","radius","radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft","innerRadius","innerRadiusTopLeft","innerRadiusTopRight","innerRadiusBottomRight","innerRadiusBottomLeft","lineWidth","inset","insetLeft","insetRight","insetBottom","insetTop"]),{color:i=i,opacity:k}=e;const M=[S?l:d,S?c:p,_?u:g,_?h:f];l=["radiusTopLeft","radiusTopRight","radiusBottomRight","radiusBottomLeft"],Np(n)&&l.push(l.shift()),d=Object.assign(Object.assign({radius:a},Object.fromEntries(l.map((t,e)=>[t,M[e]]))),{inset:m,insetLeft:y,insetRight:v,insetBottom:b,insetTop:x});return it(Sb(t,e,n,d)).call(P,o).style("fill","transparent").style(O,i).style(iv(E),k).style("lineWidth",r).style("stroke",void 0===s?i:s).call(P,w).node()}},Ab=(_b.props={defaultEnterAnimation:"scaleInY",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>_b(Object.assign({colorAttribute:"fill"},t))),Pb=(Ab.props=Object.assign(Object.assign({},_b.props),{defaultMarker:"square"}),t=>_b(Object.assign({colorAttribute:"stroke"},t)));Pb.props=Object.assign(Object.assign({},_b.props),{defaultMarker:"hollowSquare"});const Tb=t=>{const{adjustPoints:c=function(t,e,n){var[t,r,i,a]=t;if(Np(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,u=et(t,["adjustPoints"]);return(t,e,n,r,i)=>{var{index:a,mark:o,shape:s,defaultShape:l}=e,r=rv(r,o,s,l),o=r["defaultColor"],s=et(r,["defaultColor"]),l=i[a+1],r=c(t,l,n),[i,a,t,l]=!!Np(n)?ev(r):r,{color:n=o,opacity:r}=e,e=ab().curve(wb)([i,a,t,l]);return it(new xl({})).call(P,s).style("path",e).style("fill",n).style("fillOpacity",r).call(P,u).node()}};function Lb(t,e,n){var[t,r,i,a]=t;if(Np(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]}Tb.props={defaultMarker:"square"};const Nb=t=>Tb(Object.assign({adjustPoints:Lb},t));function Cb(t){const e="function"==typeof t?t:t.render;return class extends sl{connectedCallback(){this.draw()}attributeChangedCallback(){this.draw()}draw(){e(this)}}}Nb.props={defaultMarker:"square"};const jb=Cb(t=>{var{d1:e,d2:n,style1:r,style2:i}=t.attributes;it(t).maybeAppend("line",()=>new xl({})).style("d",e).call(P,r),it(t).maybeAppend("line1",()=>new xl({})).style("d",n).call(P,i)});const Rb=t=>{const{curve:h,gradient:f=!1,gradientColor:d="between",defined:p=t=>!Number.isNaN(t)&&null!=t,connect:g=!1}=t,m=et(t,["curve","gradient","gradientColor","defined","connect"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a,seriesColor:a,seriesX:s,seriesY:l}=e,a=f&&a?tv(a,s,l,f,d):r,s=av(n,e),l=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},o),a&&{stroke:a}),i&&{lineWidth:i}),s&&{transform:s}),m);let c;if(Cp(n)){const u=n.getCenter();c=n=>ub(ab().curve(sb)).angle((t,e)=>X1(V1(n[e],u))).radius((t,e)=>q1(n[e],u)).defined(([t,e])=>p(t)&&p(e)).curve(h)(n)}else c=ab().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=rt(l,"connect"),a=!!e.length;return(!a||g&&!Object.keys(o).length?it(new xl({})).style("d",c(r)||[]).call(P,l):a&&!g?it(new xl({})).style("d",c(t)).call(P,l):it(new jb).style("style1",Object.assign(Object.assign({},l),o)).style("style2",l).style("d1",e.map(c).join(",")).style("d2",c(t))).node()}},Ib=(Rb.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=Cp(n)?wb:nb;return Rb(Object.assign({curve:i},a))(t,e,n,r)}),Bb=(Ib.props=Object.assign(Object.assign({},Rb.props),{defaultMarker:"line"}),t=>{const{alpha:a=.5}=t,o=et(t,["alpha"]);return(t,e,n,r)=>{var i=Cp(n)?bb:yb;return Rb(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),Fb=(Bb.props=Object.assign(Object.assign({},Rb.props),{defaultMarker:"smooth"}),t=>Rb(Object.assign({curve:Ob},t))),Db=(Fb.props=Object.assign(Object.assign({},Rb.props),{defaultMarker:"hv"}),t=>Rb(Object.assign({curve:Eb},t))),zb=(Db.props=Object.assign(Object.assign({},Rb.props),{defaultMarker:"vh"}),t=>Rb(Object.assign({curve:Mb},t)));zb.props=Object.assign(Object.assign({},Rb.props),{defaultMarker:"hvh"});var Il=(t,e,n)=>[["M",t-n,e],["A",n,n,0,1,0,t+n,e],["A",n,n,0,1,0,t-n,e],["Z"]],Gl=(Il.style=["fill"],Il.bind(void 0)),Vs=(Gl.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]),Gb=(Vs.style=["fill"],Vs.bind(void 0)),Is=(Gb.style=["fill"],Vs.bind(void 0)),Rl=(Is.style=["stroke","lineWidth"],(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"]]}),e=(Rl.style=["fill"],Rl.bind(void 0)),js=(e.style=["stroke","lineWidth"],(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"]]}),o=(js.style=["fill"],js.bind(void 0)),ys=(o.style=["stroke","lineWidth"],(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"]]}),n=(ys.style=["fill"],ys.bind(void 0)),s=(n.style=["stroke","lineWidth"],(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"]]}),Dl=(s.style=["fill"],s.bind(void 0)),r=(Dl.style=["stroke","lineWidth"],(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"]]}),Bl=(r.style=["fill"],r.bind(void 0)),cs=(Bl.style=["stroke","lineWidth"],(t,e,n)=>[["M",t,e+n],["L",t,e-n]]),zl=(cs.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e-n],["L",t+n,e+n],["M",t+n,e-n],["L",t-n,e+n]]),ds=(zl.style=["stroke","lineWidth"],(t,e,n)=>[["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]]),ps=(ds.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]),gs=(ps.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e]]),vs=(gs.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n,e],["L",t+n,e]]),bs=(vs.style=["stroke","lineWidth"],vs.bind(void 0)),Os=(bs.style=["stroke","lineWidth"],(t,e,n)=>[["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]]),Ss=(Os.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n-1,e-2.5],["L",t,e-2.5],["L",t,e+2.5],["L",t+n+1,e+2.5]]),_s=(Ss.style=["stroke","lineWidth"],(t,e,n)=>[["M",t-n-1,e+2.5],["L",t,e+2.5],["L",t,e-2.5],["L",t+n+1,e-2.5]]),As=(_s.style=["stroke","lineWidth"],(t,e,n)=>[["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]]),Ps=(As.style=["stroke","lineWidth"],(t,e,n)=>[["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]]);Ps.style=["stroke","lineWidth"];const Wb=new Map([["bowtie",r],["cross",zl],["dash",bs],["diamond",Rl],["dot",vs],["hexagon",s],["hollowBowtie",Bl],["hollowDiamond",e],["hollowHexagon",Dl],["hollowPoint",Gl],["hollowSquare",Is],["hollowTriangle",o],["hollowTriangleDown",n],["hv",Ss],["hvh",As],["hyphen",gs],["line",cs],["plus",ps],["point",Il],["rect",Gb],["smooth",Os],["square",Vs],["tick",ds],["triangleDown",ys],["triangle",js],["vh",_s],["vhv",Ps]]);const l=u=>{const{colorAttribute:h,symbol:t,mode:f="auto"}=u,d=et(u,["colorAttribute","symbol","mode"]),p=Wb.get(t)||Wb.get("point");return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),r=d.stroke?a||1:a,{color:a=i,transform:i,opacity:s}=e,[l,c]=ov(t),t=function(t,e,n,r){var i;if(1!==e.length)return n=n["size"],"fixed"!==t&&("normal"===t||Bp(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}(f,t,e,n)||d.r||o.r;return it(new xl).call(P,o).style("fill","transparent").style("d",p(l,c,t)).style("lineWidth",r).style("transform",i).style("stroke",a).style(iv(u),s).style(h,a).call(P,d).node()}},Hb=(l.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>l(Object.assign({colorAttribute:"fill",symbol:"bowtie"},t))),Yb=(Hb.props=Object.assign({defaultMarker:"bowtie"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"cross"},t))),Vb=(Yb.props=Object.assign({defaultMarker:"cross"},l.props),t=>l(Object.assign({colorAttribute:"fill",symbol:"diamond"},t))),qb=(Vb.props=Object.assign({defaultMarker:"diamond"},l.props),t=>l(Object.assign({colorAttribute:"fill",symbol:"hexagon"},t))),Ub=(qb.props=Object.assign({defaultMarker:"hexagon"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"bowtie"},t))),Xb=(Ub.props=Object.assign({defaultMarker:"hollowBowtie"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"diamond"},t))),$b=(Xb.props=Object.assign({defaultMarker:"hollowDiamond"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"hexagon"},t))),Kb=($b.props=Object.assign({defaultMarker:"hollowHexagon"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"point"},t))),Zb=(Kb.props=Object.assign({defaultMarker:"hollowPoint"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"square"},t))),Qb=(Zb.props=Object.assign({defaultMarker:"hollowSquare"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"triangle"},t))),Jb=(Qb.props=Object.assign({defaultMarker:"hollowTriangle"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"triangle-down"},t))),t2=(Jb.props=Object.assign({defaultMarker:"hollowTriangleDown"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"hyphen"},t))),e2=(t2.props=Object.assign({defaultMarker:"hyphen"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"line"},t))),n2=(e2.props=Object.assign({defaultMarker:"line"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"plus"},t))),r2=(n2.props=Object.assign({defaultMarker:"plus"},l.props),t=>l(Object.assign({colorAttribute:"fill",symbol:"point"},t))),i2=(r2.props=Object.assign({defaultMarker:"point"},l.props),t=>l(Object.assign({colorAttribute:"fill",symbol:"square"},t))),a2=(i2.props=Object.assign({defaultMarker:"square"},l.props),t=>l(Object.assign({colorAttribute:"stroke",symbol:"tick"},t))),o2=(a2.props=Object.assign({defaultMarker:"tick"},l.props),t=>l(Object.assign({colorAttribute:"fill",symbol:"triangle"},t))),s2=(o2.props=Object.assign({defaultMarker:"triangle"},l.props),t=>l(Object.assign({colorAttribute:"fill",symbol:"triangle-down"},t))),l2=(s2.props=Object.assign({defaultMarker:"triangleDown"},l.props),t=>{const{arrowSize:u="40%"}=t,h=et(t,["arrowSize"]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=rv(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),[a,r]=t,[t,l]=Q1(a,r,{arrowSize:u}),c=Vv();return c.moveTo(...a),c.lineTo(...r),c.moveTo(...r),c.lineTo(...t),c.moveTo(...r),c.lineTo(...l),it(new xl).call(P,i).style("d",c.toString()).style("stroke",o||e).style("transform",s).call(P,h).node()}});function c2(t){h2(t,!0)}function u2(t){h2(t,!1)}function h2(t,e){var n=e?"visible":"hidden";!function e(t,n){n(t),t.children&&t.children.forEach(function(t){t&&e(t,n)})}(t,function(t){t.attr("visibility",n)})}l2.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};ye(p2,f2=hl);var f2,d2=p2;function p2(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=f2.apply(this,m([],w(t),!1))||this;return n.addEventListener(b.INSERTED,function(){u2(n)}),n}function g2(t){t=t.appendChild(new d2({class:"offscreen"}));return u2(t),t}ye(v2,m2=Al),Object.defineProperty(v2.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=g2(this)),this._offscreen},enumerable:!1,configurable:!0}),v2.prototype.disconnectedCallback=function(){var t;null!=(t=this._offscreen)&&t.destroy()};var m2,y2=v2;function v2(t){var e=(t=void 0===t?{}:t).style,t=et(t,["style"]);return m2.call(this,v({style:v({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},e)},t))||this}function b2(t){return t*Math.PI/180}function x2(t){return Number((180*t/Math.PI).toPrecision(5))}Object.defineProperty(k2.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(k2.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(k2.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(k2.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),k2.fromRect=function(t){return new k2(t.x,t.y,t.width,t.height)},k2.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}};var w2=k2;function k2(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=r}function M2(t,e){return Ue(t)?t.apply(void 0,m([],w(e),!1)):t}function E2(t,e){function r(t){return"".concat(e,"-").concat(t)}return t=Object.fromEntries(Object.entries(t).map(function(t){var t=w(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 O2(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];for(var r=0;r<e.length;r+=1)S2(t,e[r]);return t}var S2=function(r,i,a,o){void 0===a&&(a=0),void 0===o&&(o=5),Object.entries(i).forEach(function(t){var t=w(t,2),e=t[0],t=t[1],n=r;Object.prototype.hasOwnProperty.call(i,e)&&(t?tn(t)?(tn(r[e])||(n[e]={}),a<o?S2(r[e],t,a+1,o):n[e]=i[e]):Ke(t)?(n[e]=[],n[e]=n[e].concat(t)):n[e]=t:n[e]=t)})},_2=function(t){return void 0!==t&&null!=t&&!Number.isNaN(t)};function A2(t,e,n){void 0===n&&(n="..."),"text"===t.nodeName&&t.attr({wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:n})}function P2(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]}function T2(t){return"function"==typeof t?t():an(t)||sn(t)?new y2({style:{text:String(t)}}):t}function L2(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 N2(t,e,n){var r=t;(!t.length||e<t[0]||e===t[0]&&n<t[1])&&(r[0]=e,r[1]=n)}function C2(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),r=e[0],e=e[1];return Math.pow(Math.pow(n-r,2)+Math.pow(t-e,2),.5)}function j2(t,e,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=function(t){t.node().removeChildren()}),t?n(e):(r&&i(e),null)}function R2(t,e,n,r,i){return(r=void 0===r?!0:r)&&t===e||i&&t===n||e<t&&t<n}var I2=function(e,n){return function(t){return e*(1-t)+n*t}};function B2(e,t){var i,a,o,s,n,r,l;return"number"==typeof e&&"number"==typeof t?I2(e,t):Array.isArray(e)&&Array.isArray(t)?(i=e,o=(a=t)?a.length:0,s=i?Math.min(o,i.length):0,function(t){for(var e=new Array(s),n=new Array(o),r=0,r=0;r<s;++r)e[r]=B2(i[r],a[r]);for(;r<o;++r)n[r]=a[r];for(r=0;r<s;++r)n[r]=e[r](t);return n}):"object"==typeof e&&"object"==typeof t?(void 0===(n=e)&&(n={}),void 0===(t=t)&&(t={}),r={},l={},Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];e in n?r[e]=B2(n[e],t):l[e]=t}),function(n){return Object.entries(r).forEach(function(t){var t=w(t,2),e=t[0],t=t[1];return l[e]=t(n)}),l}):function(t){return e}}function F2(t){for(var e=1/0,n=1/0,r=-1/0,i=-1/0,a=0;a<t.length;a++){var o=t[a],s=o.x,l=o.y,o=w([s+o.width,l+o.height],2),c=o[0],o=o[1];s<e&&(e=s),l<n&&(n=l),r<c&&(r=c),i<o&&(i=o)}return new w2(e,n,r-e,i-n)}function D2(n,t,e){function r(t){var e=w(u?["height",a]:["width",i],2),n=e[0],r=e[1];switch(c){case"flex-start":return 0;case"flex-end":return r-t[n];case"center":return r/2-t[n]/2;default:return 0}}var i=n.width,a=n.height,o=void 0===(o=e.flexDirection)?"row":o,s=(e.flexWrap,e.justifyContent),l=void 0===s?"flex-start":s;e.alignContent;var c=void 0===(s=e.alignItems)?"flex-start":s,u="row"===o,e="row"===o||"column"===o,h=u?e?[1,0]:[-1,0]:e?[0,1]:[0,-1],f=(s=w([0,0],2))[0],d=s[1],e=F2(o=t.map(function(t){var e=t.width,t=t.height,n=w([f,d],2),r=n[0],n=n[1],i=w([f+e*h[0],d+t*h[1]],2);return f=i[0],d=i[1],new w2(r,n,e,t)})),p={"flex-start":0,"flex-end":u?i-e.width:a-e.height,center:u?(i-e.width)/2:(a-e.height)/2};return F2(s=o.map(function(t){var e=t.x,n=t.y,t=w2.fromRect(t);return t.x=u?e+p[l]:e,t.y=u?n:n+p[l],t})),s.map(function(t){var e=t.x,n=t.y,t=w2.fromRect(t);return t.x=u?e:e+r(t),t.y=u?n+r(t):n,t}).map(function(t){var e,t=w2.fromRect(t);return t.x+=null!=(e=n.x)?e:0,t.y+=null!=(e=n.y)?e:0,t})}function z2(t,e,n){return[]}function G2(t,e){return[t[0]*e,t[1]*e]}function W2(t,e){return[t[0]+e[0],t[1]+e[1]]}function H2(t,e){return[t[0]-e[0],t[1]-e[1]]}function Y2(t,e){return[Math.min(t[0],e[0]),Math.min(t[1],e[1])]}function V2(t,e){return[Math.max(t[0],e[0]),Math.max(t[1],e[1])]}function q2(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function U2(t){var e;return 0===t[0]&&0===t[1]?[0,0]:(e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)),[t[0]/e,t[1]/e])}function X2(t,e){e=Math.pow(10,e);return~~(t*e)/e}function $2(t,e){var n,r={},i=Array.isArray(e)?e:[e];for(n in t)i.includes(n)||(r[n]=t[n]);return r}function K2(t,e,n){void 0===n&&(n=[[0,0],[1,1]]);for(var e=!!(e=void 0===e?!1:e),r=[],i=0,a=t.length;i<a;i+=2)r.push([t[i],t[i+1]]);for(var o,s,l,c=function(t,e,n,r){var i,a=[],o=!!r,s=[1/0,1/0],l=[-1/0,-1/0];if(o){s=(r=w(r,2))[0],l=r[1];for(var c=0,u=t.length;c<u;c+=1)s=Y2(s,x=t[c]),l=V2(l,x)}for(var c=0,h=t.length;c<h;c+=1){var f,d,p,g,m,y,v,b,x=t[c];0!==c||n?c!==h-1||n?(f=t[[c?c-1:h-1,c-1][n?0:1]],y=[0,0],y=G2(y=H2(d=t[n?(c+1)%h:c+1],f),e),0!==(m=(p=q2(x,f))+(g=q2(x,d)))&&(p/=m,g/=m),m=G2(y,-p),y=G2(y,g),v=W2(x,m),b=Y2(b=W2(x,y),V2(d,x)),b=V2(b,Y2(d,x)),v=Y2(v=W2(x,m=G2(m=H2(b,x),-p/g)),V2(f,x)),b=W2(x,y=G2(y=H2(x,v=V2(v,Y2(f,x))),g/p)),o&&(v=Y2(v=V2(v,s),l),b=Y2(b=V2(b,s),l)),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=c[2*i],s=c[2*i+1],h.push(["C",o[0],o[1],s[0],s[1],(l=r[i+1])[0],l[1]]);return e&&(o=c[u],s=c[u+1],l=w(r,1)[0],h.push(["C",o[0],o[1],s[0],s[1],l[0],l[1]])),h}var Z2=["$el","anchor","cx","cy","d","defX","defY","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function Q2(t){var e,n,r={};for(e in t)n=e,Z2.includes(n)&&(r[e]=t[e]);return r}function J2(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)}M.prototype.selectAll=function(t){return new M("string"==typeof t?this._parent.querySelectorAll(t):t,null,this._elements[0],this._document)},M.prototype.selectFacetAll=function(t){t="string"==typeof t?this._parent.querySelectorAll(t):t;return new M(this._elements,null,this._parent,this._document,void 0,void 0,t)},M.prototype.select=function(t){t="string"==typeof t?this._parent.querySelectorAll(t)[0]||null:t;return new M([t],null,t,this._document)},M.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=w(Array.isArray(a)?a:[a,null],2),o=a[0],a=a[1];(l=n(o,i)).__data__=o,null!==a&&(l.__fromElements__=a),this._parent.appendChild(l),r.push(l)}return new M(r,null,this._parent,this._document)}for(i=0;i<this._elements.length;i++){var s=this._elements[i],l=n(o=s.__data__,i);s.appendChild(l),r.push(l)}return new M(r,null,r[0],this._document)},M.prototype.maybeAppend=function(t,e){e=be(this,tx,"m",ex).call(this,"#"===t[0]?t:"#".concat(t),e);return e.attr("id",t),e},M.prototype.maybeAppendByClassName=function(t,e){t=t.toString(),e=be(this,tx,"m",ex).call(this,"."===t[0]?t:".".concat(t),e);return e.attr("className",t),e},M.prototype.maybeAppendByName=function(t,e){e=be(this,tx,"m",ex).call(this,'[name="'.concat(t,'"]'),e);return e.attr("name",t),e},M.prototype.data=function(t,n,e){void 0===n&&(n=function(t){return t}),void 0===e&&(e=function(){return null});for(var r,i,a=[],o=[],s=new Set(this._elements),l=[],c=new Set,u=new Map(this._elements.map(function(t,e){return[n(t.__data__,e),t]})),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),m=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 y=f.get(g);l.push([p,y]);try{r=void 0;for(var v=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(y),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(m)?((x=u.get(m)).__toData__?x.__toData__.push(p):x.__toData__=[p],c.add(x),s.delete(x)):a.push(p)}var w=[new M([],a,this._parent,this._document),new M(o,null,this._parent,this._document),new M(s,null,this._parent,this._document),new M([],l,this._parent,this._document),new M(c,null,this._parent,this._document)];return new M(this._elements,null,this._parent,this._document,w)},M.prototype.merge=function(t){var e=m(m([],w(this._elements),!1),w(t._elements),!1),t=m(m([],w(this._transitions),!1),w(t._transitions),!1);return new M(e,null,this._parent,this._document,void 0,t)},M.prototype.createElement=function(t){if(this._document)return this._document.createElement(t,{});var e=M.registry[t];if(e)return new e;throw e="Unknown node type: ".concat(t),new Error(e)},M.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)},M.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 M([],null,this._parent,this._document,void 0,this._transitions)},M.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},M.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))})},M.prototype.style=function(n,r,t){void 0===t&&(t=!0);var i="function"==typeof r&&t?r:function(){return r};return this.each(function(t,e){void 0!==r&&(this.style[n]=i.call(this,t,e))})},M.prototype.styles=function(t,o){return void 0===t&&(t={}),void 0===o&&(o=!0),this.each(function(r,i){var a=this;Object.entries(t).forEach(function(t){var t=w(t,2),e=t[0],n=t[1],t="function"==typeof n&&o?n:function(){return n};void 0!==n&&a.attr(e,t.call(a,r,i))})})},M.prototype.update=function(n,t){void 0===t&&(t=!0);var r="function"==typeof n&&t?n:function(){return n};return this.each(function(t,e){n&&this.update&&this.update(r.call(this,t,e))})},M.prototype.maybeUpdate=function(n,t){void 0===t&&(t=!0);var r="function"==typeof n&&t?n:function(){return n};return this.each(function(t,e){n&&this.update&&this.update(r.call(this,t,e))})},M.prototype.transition=function(n){var r=this._transitions;return this.each(function(t,e){r[e]=n.call(this,t,e)})},M.prototype.on=function(t,e){return this.each(function(){this.addEventListener(t,e)}),this},M.prototype.call=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return t.call.apply(t,m([this._parent,this],w(e),!1)),this},M.prototype.node=function(){return this._elements[0]},M.prototype.nodes=function(){return this._elements},M.prototype.transitions=function(){return this._transitions.filter(function(t){return!!t})},M.prototype.parent=function(){return this._parent},tx=new WeakSet,ex=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 M([t],null,this._parent,this._document)},M.registry={g:hl,rect:Sl,circle:al,path:xl,text:y2,ellipse:cl,image:gl,line:yl,polygon:kl,polyline:El,html:dl};var tx,ex,nx,rx=M;function M(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=[]),tx.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 x(t){return new rx([t],null,t,t.ownerDocument)}function ix(t,e,n){return t.querySelector(e)?x(t).select(e):x(t).append(n)}function ax(t){if(sn(t))return[t,t,t,t];if(Ke(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]}function ox(t){var t=t.getLocalBounds(),t=w([t.min,t.max],2),e=w(t[0],2),n=e[0],e=e[1],t=w(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 sx(t){return t.toString().charAt(0).toUpperCase()+t.toString().slice(1)}function lx(t,e,n){void 0===n&&(n=!0);var e=e||(null==(e=t.match(/^([a-z][a-z0-9]+)/))?void 0:e[0])||"",t=t.replace(new RegExp("^(".concat(e,")")),"");return n?(e=t).toString().charAt(0).toLowerCase()+e.toString().slice(1):t}function E(t,r,i){void 0===i&&(i=!1);var a={};return Object.entries(t).forEach(function(t){var e,t=w(t,2),n=t[0],t=t[1];"className"!==n&&"class"!==n&&(n.startsWith("show")&&lx(n,"show").startsWith(r)!==i?n===(e=r,"".concat("show").concat(sx(e)))?a[n]=t:a[n.replace(new RegExp(sx(r)),"")]=t:n.startsWith("show")||n.startsWith(r)===i||"filter"===(e=lx(n,r))&&"function"==typeof t||(a[e]=t))}),a}function cx(t,r){return Object.entries(t).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1];return n.startsWith("show")?t["show".concat(r).concat(n.slice(4))]=e:t["".concat(r).concat(sx(n))]=e,t},{})}function ux(t,n){void 0===n&&(n=["x","y","class","className"]);var 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=w(t,2),e=t[0],t=t[1];n.includes(e)||(-1!==r.indexOf(e)?a[e]=t:i[e]=t)}),[i,a]}function hx(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,hx)}function fx(){this.constructor=nx}nx=hx,Ts=Error,fx.prototype=Ts.prototype,nx.prototype=new fx,hx.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 dx;var px=bn(function(t,e){var n=an(t)?t:t.style.text.toString(),e=e||gx(t),t=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,e=e.fontVariant;return(dx=dx||document.createElement("canvas").getContext("2d")).font=[a,e,i,"".concat(t,"px"),r].join(" "),dx.measureText(n).width},function(t,e){return[an(t)?t:t.style.text.toString(),Object.values(e||gx(t)).join()].join("")}),gx=function(t){var e=t.style.fontFamily||"sans-serif",n=t.style.fontWeight||"normal",r=t.style.fontStyle||"normal",i=t.style.fontVariant,t=t.style.fontSize;return{fontSize:"object"==typeof t?t.value:t,fontFamily:e,fontWeight:n,fontStyle:r,fontVariant:i}};function mx(o,t){if(t)try{var e=t.replace(/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,function(t,e,n){return"translate(".concat((e=e,n=n,i=(r=(r=o).getBBox()).width,a=r.height,[(r=w([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",e)}catch(t){}}ye(vx,yx=sl),Object.defineProperty(vx.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=g2(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(vx.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),vx.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},vx.prototype.disconnectedCallback=function(){var t;null!=(t=this._offscreen)&&t.destroy()},vx.prototype.attributeChangedCallback=function(t){"visibility"===t&&!function(){h2(this,"hidden"!==this.attributes.visibility)}.call(this)},vx.prototype.update=function(t,e){return this.attr(O2({},this.attributes,t=void 0===t?{}:t)),null==(t=this.render)?void 0:t.call(this,this.attributes,this,e)},vx.prototype.clear=function(){this.removeChildren()},vx.prototype.bindEvents=function(t,e){};var yx,Ls=vx;function vx(t,e){t=yx.call(this,O2({},{style:e=void 0===e?{}:e},t))||this;return t.initialized=!1,t._defaultOptions=e,t}function bx(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 xx(t,e,n){return[["M",t,e+n],["L",t,e-n]]}function wx(t,e,n){return[["M",t-n,e],["L",t+n,e]]}ms=bx,Hl=wx;function kx(t){n="default",Ze(e=t)&&e instanceof Image?n="image":Ue(e)?n="symbol":an(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}ye(Ox,Mx=Ls),Ox.prototype.render=function(t,e){var r=t.symbol,n=t.size,i=void 0===n?16:n,a=et(t,["symbol","size"]),o=kx(r);j2(!!o,x(e),function(t){t.maybeAppendByClassName("marker",o).attr("className","marker ".concat(o,"-marker")).call(function(t){var e,n;"image"===o?t.styles({img:r,width:e=2*i,height:e,x:-i,y:-i}):(e=i/2,n=Ue(r)?r:Ox.getSymbol(r),t.styles(v({path:null==n?void 0:n(0,0,e)},a)))})})},Ox.MARKER_SYMBOL_MAP=new Map,Ox.registerSymbol=function(t,e){Ox.MARKER_SYMBOL_MAP.set(t,e)},Ox.getSymbol=function(t){return Ox.MARKER_SYMBOL_MAP.get(t)};var Mx,Ex=Ox;function Ox(){return null!==Mx&&Mx.apply(this,arguments)||this}Ex.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]]}),Ex.registerSymbol("hyphen",function(t,e,n){return[["M",t-n,e],["L",t+n,e]]}),Ex.registerSymbol("line",xx),Ex.registerSymbol("plus",function(t,e,n){return[["M",t-n,e],["L",t+n,e],["M",t,e-n],["L",t,e+n]]}),Ex.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]]}),Ex.registerSymbol("circle",bx),Ex.registerSymbol("point",ms),Ex.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"]]}),Ex.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"]]}),Ex.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"]]}),Ex.registerSymbol("diamond",function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]}),Ex.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"]]}),Ex.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"]]}),Ex.registerSymbol("line",xx),Ex.registerSymbol("dot",wx),Ex.registerSymbol("dash",Hl),Ex.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]]}),Ex.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]]}),Ex.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]]}),Ex.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]]}),Ex.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]]});ye(Ax,Sx=Ls),Ax.prototype.render=function(t,e){var n,r,i=t.padding,i=void 0===i?0:i,a=t.marker,o=t.text,s=t.radius,l=t.spacing,c=t.align,u=t.verticalAlign,h=E(t,"label"),t=E(t,"background"),i=w(ax(i),4),f=i[0],d=i[1],p=i[2],i=i[3],g=ix(e,".tag-content","g").attr("className","tag-content").style("zIndex",0).node(),m=a?{marker:a}:{symbol:"triangle",size:0},a=ix(g,".tag-marker",function(){return new Ex({style:m})}).attr("className","tag-marker").call(function(t){t.node().clear()}).update(m).node(),l=(l=l,{x:(y=(a=a).getLocalBounds()).halfExtents[0]?y.max[0]+(l||0):a.style.x,y:y.halfExtents[1]?(y.min[1]+y.max[1])/2:a.style.y}),y=l.x,a=l.y,a=(x(g).maybeAppendByClassName("tag-text",function(){return new y2}).styles(v(v({fontSize:12,text:_(o)?"":"".concat(o),x:y,y:a},h),{textBaseline:"middle"})).call(function(t){o||t.remove()}),l=i,y=f,a=c||"start",h=u||"top",u=(c=g).getLocalBounds(),r=n=0,"start"===a&&(n=l),"center"===a&&(n=-u.halfExtents[0]),"end"===a&&(n=-l-2*u.halfExtents[0]),"top"===h&&(r=y+u.halfExtents[1]),"middle"===h&&(r=0),"bottom"===h&&(r=y-2*u.halfExtents[1]),c.setLocalPosition([n,r]),g.getLocalBounds());x(e).maybeAppendByClassName("tag-background","rect").styles(v({zIndex:-1,y:a.min[1]-f,x:a.min[0]-i,width:null!==t?i+d+2*a.halfExtents[0]:0,height:null!==t?f+p+2*a.halfExtents[1]:0,radius:null!=s?s:2,fill:"#fafafa",stroke:"#d9d9d9",lineWidth:1},t))},Ax.tag="tag";var Sx,_x=Ax;function Ax(t){return Sx.call(this,t,{padding:4,spacing:4})||this}var Px,Tx,Lx={small:{textFontSize:10,buttonWidth:40,buttonHeight:20,markerSize:8},middle:{textFontSize:12,buttonWidth:60,buttonHeight:30,markerSize:12},large:{textFontSize:16,buttonWidth:80,buttonHeight:40,markerSize:16}},Nx={primary:{default:{textFill:"#fff",buttonFill:"#1890ff",buttonLineWidth:0,markerFill:"#1890ff"},active:{buttonFill:"#40a9ff",markerFill:"#40a9ff"},disabled:{}},dashed:{default:{buttonFill:"transparent",buttonStroke:"#bbb",buttonLineDash:[5,5]},active:{},disabled:{}},link:{default:{textFill:"#1890ff",buttonFill:"transparent",buttonLineWidth:0,markerFill:"#1890ff"},active:{},disabled:{}},text:{default:{textFill:"#000",buttonFill:"transparent",buttonLineWidth:0,markerFill:"#000"},active:{},disabled:{}},default:{default:{textFill:"#000",buttonFill:"transparent",buttonStroke:"#bbb",markerFill:"#bbb"},active:{textFill:"#1890ff",buttonStroke:"#1890ff",markerStroke:"#1890ff"},disabled:{}}},Cx={strict:{textFill:"#b8b8b8"},buttonStroke:"#d9d9d9",buttonFill:"#f5f5f5",markerStroke:"#d9d9d9"};function jx(t){var n=Px.call(this,t,{cursor:"pointer",padding:10,size:"middle",type:"default",text:"",state:"default",markerAlign:"left",markerSpacing:5,default:{buttonLineWidth:1,buttonRadius:5},active:{}})||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=t,n.render(n.attributes,n)},n}function Rx(t){return Tx.call(this,nt({},Rx.defaultOptions,t))||this}ye(jx,Px=Ls),Object.defineProperty(jx.prototype,"markerSize",{get:function(){var t=this.attributes.markerSymbol,e=this.getStyle("marker");return t?(null==e?void 0:e.size)||2:0},enumerable:!1,configurable:!0}),Object.defineProperty(jx.prototype,"textAvailableWidth",{get:function(){var t=this.attributes,e=t.markerSymbol,n=t.padding,r=t.ellipsis,i=t.width,t=t.markerSpacing;return r?(r=dn(i)?this.getStyle("button").width:i,e?r-2*n-t-this.markerSize:r-2*n):1/0},enumerable:!1,configurable:!0}),Object.defineProperty(jx.prototype,"buttonHeight",{get:function(){var t=this.attributes.height;return t?+t:+this.getStyle("button").height},enumerable:!1,configurable:!0}),jx.prototype.getStyle=function(t){var e=this.attributes,n=e.size,e=e.type,r=this.state,i=nt({},Lx[n],Nx[e][r],this.attributes.default,this.attributes[r]);return"disabled"===r&&(Object.keys(i).forEach(function(t){t in Cx&&(i[t]=Cx[t])}),Object.keys(Cx.strict).forEach(function(t){i[t]=Cx.strict[t]}),nt(i,this.attributes.disabled||{})),E(i,t)},jx.prototype.render=function(t,e){var n=t.text,n=void 0===n?"":n,r=t.padding,r=void 0===r?0:r,i=t.markerSymbol,t=t.markerSpacing,t=void 0===t?0:t,r=(e.attr("cursor","disabled"===this.state?"not-allowed":"pointer"),w(ax(r),4)),a=(r[0],r[1]),r=(r[2],r[3]),o=this.buttonHeight,s=this.getStyle("marker"),l=this.markerSize,c=v(v({},s),{symbol:i,x:r+l/2,y:o/2,size:l}),s=ix(e,".marker",function(){return new Ex({className:"marker",style:c})}).update({style:c}).node().getLocalBounds(),i=this.getStyle("text"),s=(this.textShape=ix(e,".text","text").attr("className","text").styles(v(v({x:l?s.max[0]+t:r,y:o/2},i),{text:n,textAlign:"left",textBaseline:"middle",wordWrap:!0,wordWrapWidth:this.textAvailableWidth,maxLines:1,textOverflow:"..."})).node(),this.textShape.getLocalBounds()),i=this.getStyle("button");x(e).maybeAppendByClassName(".background","rect").styles(v(v({zIndex:-1},i),{height:o,width:r+(l?l+t:0)+2*s.halfExtents[0]+a}))},jx.prototype.update=function(t){this.attr(nt({},this.attributes,t=void 0===t?{}:t));t=this.attributes.state;this.state=t,this.render(this.attributes,this)},jx.prototype.setState=function(t){this.update({state:t})},jx.prototype.hide=function(){this.style.visibility="hidden"},jx.prototype.show=function(){this.style.visibility="visible"},jx.prototype.bindEvents=function(){this.addEventListener("click",this.clickEvents),this.addEventListener("mouseenter",this.mouseenterEvent),this.addEventListener("mouseleave",this.mouseleaveEvent)},jx.tag="button",ye(Rx,Tx=Ls),Rx.prototype.render=function(t,e){for(var n=t.x,r=t.y,c=t.items,i=(t.textStyle,t.padding),u=t.width,h=t.separator,i=w(ax(void 0===i?0:i),3),a=i[0],f=i[1],i=i[2],d=E(t,"tag"),p=ix(e,".container","g").styles({className:"container",x:n+i,y:r+a}),g=0,m=0,o=(p.node().removeChildren(),function(t){var e,n,r,i=c[t],a=new _x({className:"breadcrumb-item",style:v(v(v(v({x:g,y:m},d),{text:_(i.text)?i.id:i.text}),(o=["marker"],null!==(e=i)&&tn(e)?(n={},Qe(o,function(t){On.call(e,t)&&(n[t]=e[t])}),n):{})),{padding:0})}),o=(p.append(function(){return a}),a.getLocalBounds()),s=2*o.halfExtents[0],o=2*o.halfExtents[1],s=(g+=s,_(u)||u-f<g&&(a.attr({x:0,y:m+o}),g=s,m+=o),y.bindInnerEvents(a,i),h||{}),i=s.spacing,i=void 0===i?0:i,l=s.text,l=void 0===l?"/":l,s=s.style;t!==c.length-1&&(r=new y2({className:"".concat(Rx.tag,"-separator"),id:"".concat(Rx.tag,"-separator-").concat(t),style:v(v({x:g+i,y:m+o/2},s),{text:l,textAlign:"end",textBaseline:"middle"})}),p.append(function(){return r}),t=r.getLocalBounds(),g+=2*t.halfExtents[0]+i)}),y=this,s=0;s<c.length;s++)o(s)},Rx.prototype.update=function(t){this.attr(nt({},this.attributes,t)),this.render(this.attributes,this)},Rx.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)})},Rx.tag="breadcrumb",Rx.defaultOptions={style:{separator:{text:"/",style:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},spacing:8},textStyle:{default:{fontSize:14,fill:"rgba(0, 0, 0, 0.45)"},active:{fill:"#5468ff",cursor:"pointer"}},padding:[8,8,8,8]}};ye(Fx,Ix=rl),Fx.prototype.render=function(){var t=this.attributes.columns;x(this.columnsGroup).selectAll(".column").data(t.flat()).join(function(t){return t.append("rect").attr("className","column").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},Fx.prototype.update=function(t){this.attr(O2({},this.attributes,t)),this.render()},Fx.prototype.clear=function(){this.removeChildren()};var Ix,Bx=Fx;function Fx(t){var e=this,n=t.style,t=et(t,["style"]);return(e=Ix.call(this,nt({},{type:"column"},v({style:n},t)))||this).columnsGroup=new hl({name:"columns"}),e.appendChild(e.columnsGroup),e.render(),e}ye(Gx,Dx=rl),Gx.prototype.render=function(){var t=this.attributes,e=t.lines,t=t.areas;e&&this.renderLines(e),t&&this.renderAreas(t)},Gx.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},Gx.prototype.update=function(t){this.attr(O2({},this.attributes,t)),this.render()},Gx.prototype.renderLines=function(t){x(this.linesGroup).selectAll(".line").data(t).join(function(t){return t.append("path").attr("className","line").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.attr(t)})},function(t){return t.remove()})},Gx.prototype.renderAreas=function(t){x(this.linesGroup).selectAll(".area").data(t).join(function(t){return t.append("path").attr("className","area").each(function(t){this.attr(t)})},function(t){return t.each(function(t){this.style(t)})},function(t){return t.remove()})};var Dx,zx=Gx;function Gx(t){var e=this,n=t.style,t=et(t,["style"]);return(e=Dx.call(this,nt({},{type:"lines"},v({style:n},t)))||this).linesGroup=e.appendChild(new hl),e.areasGroup=e.appendChild(new hl),e.render(),e}function Wx(t,e){var n=(e=void 0===e?!1:e)?t.length-1:0,t=t.map(function(t,e){return m([e===n?"M":"L"],w(t),!1)});return e?t.reverse():t}function Hx(t,e){if(void 0===e&&(e=!1),t.length<=2)return Wx(t);for(var n=[],r=t.length,i=0;i<r;i+=1){var a=e?t[r-i-1]:t[i];Mn(a,n.slice(-2))||n.push.apply(n,m([],w(a),!1))}var o=K2(n,!1);return e?o.unshift(m(["M"],w(t[r-1]),!1)):o.unshift(m(["M"],w(t[0]),!1)),o}function Yx(t,e,n){t=yn(t);return t.push(["L",e,n],["L",0,n],["Z"]),t}function Vx(t){return 0===t.length?[0,0]:[nn(function(t,e){if(Ke(t)){for(var n,r=1/0,i=0;i<t.length;i++){var a=t[i],o=Ue(e)?e(a):a[e];o<r&&(n=a,r=o)}return n}}(t,function(t){return nn(t)||0})),en(function(t,e){if(Ke(t)){for(var n,r=-1/0,i=0;i<t.length;i++){var a=t[i],o=Ue(e)?e(a):a[e];r<o&&(n=a,r=o)}return n}}(t,function(t){return en(t)||0}))]}function qx(t){for(var e=yn(t),n=e[0].length,t=w([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}ye($x,Ux=Ls),Object.defineProperty($x.prototype,"rawData",{get:function(){var t=this.attributes.data;return t&&0!==(null==t?void 0:t.length)?(t=yn(t),sn(t[0])?[t]:t):[[]]},enumerable:!1,configurable:!0}),Object.defineProperty($x.prototype,"data",{get:function(){return this.attributes.isStack?qx(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty($x.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty($x.prototype,"baseline",{get:function(){var t=this.scales.y,e=w(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($x.prototype,"containerShape",{get:function(){var t=this.attributes;return{width:t.width,height:t.height}},enumerable:!1,configurable:!0}),Object.defineProperty($x.prototype,"linesStyle",{get:function(){var n=this,t=this.attributes,e=t.type,r=t.isStack,i=t.smooth;if("line"!==e)throw new Error("linesStyle can only be used in line type");var a,o,s,l,c,u,h,f,d,p=E(this.attributes,"area"),g=E(this.attributes,"line"),t=this.containerShape.width,e=this.data;return 0===e[0].length?{lines:[],areas:[]}:(a=this.scales,u=a.x,a=a.y,e=e,o=(u={type:"line",x:u,y:a}).x,s=u.y,l=(u=w(s.getOptions().range||[0,0],2))[0],c=u[1],l<c&&(u=w([l,c],2),c=u[0],l=u[1]),a=e.map(function(t){return t.map(function(t,e){return[o.map(e),on(s.map(t),c,l)]})}),u=[],p&&(e=this.baseline,u=r?(i?function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=t[i],s=Hx(o),l=void 0,l=0===i?Yx(s,e,n):(a=Hx(t[i-1],!0),o=o[0],a[0][0]="L",m(m(m([],w(s),!1),w(a),!1),[m(["M"],w(o),!1),["Z"]],!1));r.push(l)}return r}:function(t,e,n){for(var r=[],i=t.length-1;0<=i;--i){var a,o=Wx(t[i]),s=void 0,s=0===i?Yx(o,e,n):((a=Wx(t[i-1],!0))[0][0]="L",m(m(m([],w(o),!1),w(a),!1),[["Z"]],!1));r.push(s)}return r})(a,t,e):(h=i,f=t,d=e,a.map(function(t){return Yx((h?Hx:Wx)(t),f,d)}))),{lines:a.map(function(t,e){return v({stroke:n.getColor(e),path:(i?Hx:Wx)(t)},g)}),areas:u.map(function(t,e){return v({path:t,fill:n.getColor(e)},p)})})},enumerable:!1,configurable:!0}),Object.defineProperty($x.prototype,"columnsStyle",{get:function(){var i=this,a=E(this.attributes,"column"),t=this.attributes,o=t.isStack;if("column"!==t.type)throw new Error("columnsStyle can only be used in column type");var t=this.containerShape.height,s=this.rawData;if(!s)return{columns:[]};o&&(s=qx(s));var e=this.createScales(s),l=e.x,c=e.y,e=w(Vx(s),2),n=e[0],e=e[1],u=new p1({domain:[0,e-(0<n?0:n)],range:[0,t]}),h=l.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:l.map(e),y:c.map(t),width:h,height:u.map(f[r][e])}:{x:l.map(e)+n*r,y:0<=t?c.map(t):c.map(0),width:n,height:u.map(Math.abs(t))})})})}},enumerable:!1,configurable:!0}),$x.prototype.render=function(t,e){this.container=ix(e,".container","rect").attr("className","container").node();var n=t.type,r="spark".concat(n),i="line"===n?this.linesStyle:this.columnsStyle;this.spark=ix(e,".".concat(r),function(){return new("line"===n?zx:Bx)({className:r,style:i})}).styles(i).node()},$x.prototype.getColor=function(t){var e=this.attributes.color;return Ke(e)?e[t%e.length]:Ue(e)?e.call(null,t):e},$x.prototype.createScales=function(t){var e,n=this.attributes,r=n.type,i=n.range,i=void 0===i?[]:i,a=n.isGroup,n=n.spacing,o=this.containerShape,s=o.width,o=o.height,l=w(Vx(t),2),c=l[0],l=l[1],c=new p1({domain:[null!=(e=i[0])?e:c,null!=(e=i[1])?e:l],range:[o,0]});return"line"===r?{type:r,x:new p1({domain:[0,t[0].length-1],range:[0,s]}),y:c}:{type:r,x:new n1({domain:t[0].map(function(t,e){return e}),range:[0,s],paddingInner:a?n:0}),y:c}},$x.tag="sparkline";var Ux,Xx=$x;function $x(t){return Ux.call(this,t,{type:"line",width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff"})||this}function Kx(n){var e,r;return n?(e=["enter","update","exit"],r=Object.fromEntries(Object.entries(n).filter(function(t){t=w(t,1)[0];return!e.includes(t)})),Object.fromEntries(e.map(function(t){var e;return"boolean"!=typeof(e=n)&&"enter"in e&&"update"in e&&"exit"in e?!1===n[t]?[t,!1]:[t,v(v({},n[t]),r)]:[t,r]}))):{enter:!1,update:!1,exit:!1}}function Zx(t,e){t?t.finished.then(e):e()}function Qx(t,e){"update"in t?t.update(e):t.attr(e)}function Jx(t,e,n){return 0===e.length?null:n?t.animate(e,n):(Qx(t,{style:e.slice(-1)[0]}),null)}function tw(r,t,e){var i={},a={};return Object.entries(t).forEach(function(t){var e,t=w(t,2),n=t[0],t=t[1];_(t)||(e=r.style[n]||r.parsedStyle[n]||0)!==t&&(i[n]=e,a[n]=t)}),e?Jx(r,[i,a],v({fill:"both"},e)):(Qx(r,a),null)}function ew(t,e){return t.style.opacity||(t.style.opacity=1),tw(t,{opacity:0},e)}var nw,rw={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},iw={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},aw={orientation:"horizontal",showLabel:!0,type:"start"},ow=E2({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track"},"slider"),sw=E2({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),lw=(ye(cw,nw=Ls),cw.prototype.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.orientation,t=et(t,["size","radius","orientation"]),a=2.4*n,r=x(e).maybeAppendByClassName(sw.iconRect,"rect").styles(v(v({},t),{width:n,height:a,radius:r,x:-n/2,y:-a/2})),o=1/3*n,s=2/3*n,l=.25*a,c=.75*a;r.maybeAppendByClassName("".concat(sw.iconLine,"-1"),"line").styles(v({x1:o,x2:o,y1:l,y2:c},t)),r.maybeAppendByClassName("".concat(sw.iconLine,"-2"),"line").styles(v({x1:s,x2:s,y1:l,y2:c},t)),r.node().setOrigin(n/2,a/2),"vertical"===i?e.setLocalEulerAngles(90):e.setLocalEulerAngles(0)},cw);function cw(){return null!==nw&&nw.apply(this,arguments)||this}ye(fw,uw=Ls),fw.prototype.renderLabel=function(t){var e=this,n=this.attributes.showLabel,r=w(ux(E(this.attributes,"label"),[]),2),i=r[0],r=r[1];j2(!!n,x(t).maybeAppendByClassName(sw.labelGroup,"g").styles(r),function(t){e.label=t.maybeAppendByClassName(sw.label,"text").styles(v(v({},iw),i)),e.label.on("mousedown",function(t){t.stopPropagation()}),e.label.on("touchstart",function(t){t.stopPropagation()})})},fw.prototype.renderIcon=function(t){var e=this.attributes.orientation,n=v(v({orientation:e},rw),E(this.attributes,"icon")),e=this.attributes.iconShape,r=void 0===e?function(){return new lw({style:n})}:e;x(t).maybeAppendByClassName(sw.iconGroup,"g").selectAll(sw.icon.class).data([r]).join(function(t){return t.append(r).attr("className",sw.icon.name)},function(t){return t.update(n)},function(t){return t.remove()})},fw.prototype.render=function(t,e){this.renderIcon(e),this.renderLabel(e)};var uw,hw=fw;function fw(t){return uw.call(this,t,aw)||this}ye(gw,dw=Ls),Object.defineProperty(gw.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(gw.prototype,"sparklineStyle",{get:function(){var t;return"horizontal"!==this.attributes.orientation?null:(t=E(this.attributes,"sparkline"),v(v({zIndex:0},this.availableSpace),t))},enumerable:!1,configurable:!0}),Object.defineProperty(gw.prototype,"shape",{get:function(){var t=this.attributes,e=t.trackLength,t=t.trackSize,t=w(this.getOrientVal([[e,t],[t,e]]),2);return{width:t[0],height:t[1]}},enumerable:!1,configurable:!0}),Object.defineProperty(gw.prototype,"availableSpace",{get:function(){var t=w(ax(this.attributes.padding),4),e=t[0],n=t[1],r=t[2],t=t[3],i=this.shape;return{x:t,y:e,width:i.width-(t+n),height:i.height-(e+r)}},enumerable:!1,configurable:!0}),gw.prototype.getValues=function(){return this.values},gw.prototype.setValues=function(t,e){void 0===e&&(e=!1),this.attributes.values=t=void 0===t?[0,0]:t;t=!1!==e&&this.attributes.animate;tw(this.selectionShape.node(),this.selectionStyle,t),this.updateHandlesPosition(t)},gw.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(tw(this.startHandle,this.getHandleStyle("start"),t),tw(this.endHandle,this.getHandleStyle("end"),t))},gw.prototype.innerSetValues=function(t,e){void 0===e&&(e=!1);var n=this.values,t=this.clampValues(t=void 0===t?[0,0]:t);this.attr("values",t),this.setValues(t),e&&this.onValueChange(n)},gw.prototype.renderTrack=function(t){var e=this.attributes.brushable,n=E(this.attributes,"track");this.trackShape=x(t).maybeAppendByClassName(ow.track,"rect").styles(v(v({cursor:e?"crosshair":"default"},this.shape),n))},gw.prototype.renderSparkline=function(t){var n=this;j2("horizontal"===this.attributes.orientation,x(t).maybeAppendByClassName(ow.sparklineGroup,"g"),function(t){var e=n.sparklineStyle;t.maybeAppendByClassName(ow.sparkline,function(){return new Xx({style:e})}).update(e)})},Object.defineProperty(gw.prototype,"selectionStyle",{get:function(){var t=E(this.attributes,"selection");return v(v({},t),this.calcMask())},enumerable:!1,configurable:!0}),gw.prototype.renderHandles=function(){var t,e=this,n=(this.attributes.showHandle?["start","end"]:[]).map(function(t){return{type:t}}),r=this;null!=(t=this.foregroundGroup)&&t.selectAll(ow.handle.class).data(n,function(t){return t.type}).join(function(t){return t.append(function(t){t=t.type;return new hw({style:e.getHandleStyle(t)})}).each(function(t){var e=t.type,t=(this.attr("class","".concat(ow.handle.name," ").concat(e,"-handle")),"".concat(e,"Handle"));(r[t]=this).addEventListener("pointerdown",function(t){r.onDragStart(e)(t)})})},function(t){return t.each(function(t){t=t.type;this.update(r.getHandleStyle(t))})},function(t){return t.each(function(t){t=t.type,t="".concat(t,"Handle");r[t]=void 0}).remove()})},gw.prototype.renderSelection=function(t){this.foregroundGroup=x(t).maybeAppendByClassName(ow.foreground,"g"),this.selectionShape=this.foregroundGroup.maybeAppendByClassName(ow.selection,"rect").styles(this.selectionStyle),this.renderHandles()},gw.prototype.render=function(t,e){this.renderTrack(e),this.renderSparkline(e),this.renderSelection(e)},gw.prototype.clampValues=function(t,e){void 0===e&&(e=4);var n=w(this.range,2),r=n[0],n=n[1],i=w(this.getValues().map(function(t){return X2(t,e)}),2),a=i[0],i=i[1],t=w((t||[a,i]).map(function(t){return X2(t,e)}),2),o=t[0],t=t[1],s=(t<o&&(o=(s=w([t,o],2))[0],t=s[1]),t-o);return n-r<s?[r,n]:o<r?a===r&&i===t?[r,t]:[r,s+r]:n<t?i===n&&a===o?[o,n]:[n-s,n]:[o,t]},gw.prototype.calcMask=function(t){var t=w(this.clampValues(t),2),e=t[0],t=t[1],n=this.availableSpace,r=n.x,i=n.y,a=n.width,n=n.height;return this.getOrientVal([{y:i,height:n,x:e*a+r,width:(t-e)*a},{x:r,width:a,y:e*n+i,height:(t-e)*n}])},gw.prototype.calcHandlePosition=function(t){var e=this.availableSpace,n=e.x,r=e.y,i=e.width,e=e.height,a=w(this.clampValues(),2),o=a[0],a=a[1],t=("start"===t?o:a)*this.getOrientVal([i,e]);return{x:n+this.getOrientVal([t,i/2]),y:r+this.getOrientVal([e/2,t])}},gw.prototype.calcHandleText=function(t){var e,n=this.attributes,r=n.orientation,n=n.formatter,i=E(this.attributes,"handle"),a=E(i,"label"),i=i.spacing,o=this.getHandleSize(),s=this.clampValues(),l=this.availableSpace,c=l.width,l=l.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=new y2({style:v(v({},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<c-h-d-r?e:-e):(e=i+o,g="start"===t?a<f-o?-e:e:a<l-f-u-o?e:-e),{x:s,y:g,text:n}},gw.prototype.getHandleLabelStyle=function(t){var e;return this.attributes.showLabel?(e=E(this.attributes,"handleLabel"),v(v({},e),this.calcHandleText(t))):{}},gw.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,e=E(this.attributes,"handleIcon"),n=this.getOrientVal(["ew-resize","ns-resize"]),r=this.getHandleSize();return v({cursor:n,shape:t,size:r},e)},gw.prototype.getHandleStyle=function(t){var e=this.attributes,n=e.showLabel,e=e.orientation,r=this.calcHandlePosition(t),i=this.calcHandleText(t);return v(v(v(v({},cx(this.getHandleIconStyle(),"icon")),cx(v(v({},this.getHandleLabelStyle(t)),i),"label")),r),{orientation:e,showLabel:n,type:t,zIndex:3})},gw.prototype.getHandleSize=function(){var t=this.attributes,e=t.handleIconSize,n=t.width,t=t.height;return e||Math.floor((this.getOrientVal([+t,+n])+4)/2.4)},gw.prototype.getOrientVal=function(t){var t=w(t,2),e=t[0],t=t[1];return"horizontal"===this.attributes.orientation?e:t},gw.prototype.setValuesOffset=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=!1);var r=w(this.getValues(),2),t=[r[0]+t,r[1]+e].sort();n?this.setValues(t):this.innerSetValues(t,!0)},gw.prototype.getRatio=function(t){var e=this.availableSpace,n=e.width,e=e.height;return t/this.getOrientVal([n,e])},gw.prototype.dispatchCustomEvent=function(t,e,n){var r=this;t.on(e,function(t){t.stopPropagation(),r.dispatchEvent(new Rs(n,{detail:t}))})},gw.prototype.bindEvents=function(){var t=this.selectionShape,t=(this.addEventListener("wheel",this.onScroll),t.on("mousedown",this.onDragStart("selection")),t.on("touchstart",this.onDragStart("selection")),this.dispatchCustomEvent(t,"mouseenter","selectionMouseenter"),this.dispatchCustomEvent(t,"mouseleave","selectionMouseleave"),this.dispatchCustomEvent(t,"click","selectionClick"),this.trackShape);this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"mouseenter","trackMouseenter"),this.dispatchCustomEvent(t,"mouseleave","trackMouseleave"),t.on("mousedown",this.onDragStart("track")),t.on("touchstart",this.onDragStart("track"))},gw.prototype.onScroll=function(t){var e;this.attributes.scrollable&&(e=t.deltaX,t=t.deltaY,t=this.getRatio(t||e),this.setValuesOffset(t,t,!0))},gw.tag="slider";var dw,pw=gw;function gw(t){var a=dw.call(this,t,v(v(v({animate:{duration:100,fill:"both"},brushable:!0,formatter:function(t){return t.toString()},handleSpacing:2,orientation:"horizontal",padding:0,scrollable:!0,selectionCursor:"move",selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1]},cx(aw,"handle")),cx(rw,"handleIcon")),cx(iw,"handleLabel")))||this;return a.range=[0,1],a.onDragStart=function(i){return function(t){t.stopPropagation(),a.target=i,a.prevPos=a.getOrientVal(P2(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,document.addEventListener("mousemove",a.onDragging),document.addEventListener("touchmove",a.onDragging),document.addEventListener("mouseup",a.onDragEnd),document.addEventListener("touchend",a.onDragEnd)}},a.onDragging=function(t){var e=a.attributes,n=e.slidable,r=e.brushable,e=(t.stopPropagation(),a.getOrientVal(P2(t))),t=e-a.prevPos;if(t){var i=a.getRatio(t);switch(a.target){case"start":n&&a.setValuesOffset(i);break;case"end":n&&a.setValuesOffset(0,i);break;case"selection":n&&a.setValuesOffset(i,i);break;case"track":if(!r)return;a.selectionWidth+=i,a.innerSetValues([a.selectionStartPos,a.selectionStartPos+a.selectionWidth].sort(),!0)}a.prevPos=e}},a.onDragEnd=function(){document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mousemove",a.onDragging),document.removeEventListener("mouseup",a.onDragEnd),document.removeEventListener("touchend",a.onDragEnd)},a.onValueChange=function(t){t=new Rs("valuechange",{detail:{oldValue:t,value:a.getValues()}});a.dispatchEvent(t)},a.selectionStartPos=0,a.selectionWidth=0,a.prevPos=0,a.target="",a}ye(vw,mw=Ls),Object.defineProperty(vw.prototype,"padding",{get:function(){return ax(this.attributes.padding)},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"value",{get:function(){var t=this.attributes.value,e=w(this.range,2),n=e[0],e=e[1];return on(t,n,e)},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"trackLength",{get:function(){var t=this.attributes,e=t.viewportLength,t=t.trackLength;return void 0===t?e:t},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"availableSpace",{get:function(){var t=this.attributes.trackSize,e=this.trackLength,n=w(this.padding,4),r=n[0],i=n[1],a=n[2],n=n[3],t=w(this.getOrientVal([[e,t],[t,e]]),2);return{x:n,y:r,width:+t[0]-(n+i),height:+t[1]-(r+a)}},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"trackRadius",{get:function(){var t=this.attributes,e=t.isRound,t=t.trackSize;return e?t/2:0},enumerable:!1,configurable:!0}),Object.defineProperty(vw.prototype,"thumbRadius",{get:function(){var t,e=this.attributes,n=e.isRound,e=e.thumbRadius;return n?(t=(n=this.availableSpace).width,n=n.height,e||this.getOrientVal([n,t])/2):0},enumerable:!1,configurable:!0}),vw.prototype.getValues=function(t){void 0===t&&(t=this.value);var e=this.attributes,e=e.viewportLength/e.contentLength,n=w(this.range,2),r=n[0],t=t*(n[1]-r-e);return[t,t+e]},vw.prototype.getValue=function(){return this.value},vw.prototype.renderSlider=function(t){var e=this.attributes,n=e.orientation,r=e.trackSize,i=e.padding,e=e.slidable,a=E(this.attributes,"track"),o=E(this.attributes,"thumb"),s=v(v({brushable:!1,orientation:n,padding:i,selectionRadius:this.thumbRadius,showHandle:!1,slidable:e,trackLength:this.trackLength,trackRadius:this.trackRadius,trackSize:r,values:this.getValues()},cx(a,"track")),cx(o,"selection"));this.slider=x(t).maybeAppendByClassName("scrollbar",function(){return new pw({style:s})}).update(s).node()},vw.prototype.render=function(t,e){this.renderSlider(e)},vw.prototype.setValue=function(t,e){void 0===e&&(e=!1);var n=this.attributes.value,r=w(this.range,2),i=r[0],r=r[1];this.slider.setValues(this.getValues(on(t,i,r)),e),this.onValueChange(n)},vw.prototype.bindEvents=function(){var e=this;this.slider.addEventListener("trackClick",function(t){t.stopPropagation(),e.onTrackClick(t.detail)}),this.onHover()},vw.prototype.getOrientVal=function(t){return"horizontal"===this.attributes.orientation?t[0]:t[1]},vw.prototype.onHover=function(){this.slider.addEventListener("selectionMouseenter",this.onThumbMouseenter),this.slider.addEventListener("trackMouseenter",this.onTrackMouseenter),this.slider.addEventListener("selectionMouseleave",this.onThumbMouseleave),this.slider.addEventListener("trackMouseleave",this.onTrackMouseleave)},vw.tag="scrollbar";var mw,yw=vw;function vw(t){var a=mw.call(this,t,{isRound:!0,orientation:"vertical",padding:[2,2,2,2],scrollable:!0,slidable:!0,thumbCursor:"default",trackSize:10,value:0})||this;return a.range=[0,1],a.onValueChange=function(t){var e=a.attributes.value;t!==e&&(a.dispatchEvent(new Rs("scroll",t={detail:{oldValue:t,value:e}})),a.dispatchEvent(new Rs("valuechange",t)))},a.onTrackClick=function(t){var e,n,r,i;a.attributes.slidable&&(r=(e=w(a.getLocalPosition(),2))[0],e=e[1],n=(i=w(a.padding,4))[0],i=i[3],r=a.getOrientVal([r+i,e+n]),i=(a.getOrientVal(P2(t))-r)/a.trackLength,a.setValue(i,!0))},a.onThumbMouseenter=function(t){a.dispatchEvent(new Rs("thumbMouseenter",{detail:t.detail}))},a.onTrackMouseenter=function(t){a.dispatchEvent(new Rs("trackMouseenter",{detail:t.detail}))},a.onThumbMouseleave=function(t){a.dispatchEvent(new Rs("thumbMouseleave",{detail:t.detail}))},a.onTrackMouseleave=function(t){a.dispatchEvent(new Rs("trackMouseleave",{detail:t.detail}))},a}var bw={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new xl({style:{path:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],anchor:"0.5 0.5",fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",tickStrokeOpacity:.65,labelOverlap:[]},xw=(nt({},bw,{style:{type:"arc"}}),nt({},bw,{style:{}}),E2({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")),ww=E2({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function kw(t){return t.reduce(function(t,e,n){return t.push(m([0===n?"M":"L"],w(e),!1)),t},[])}function Mw(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)?kw(r):e?(i=q2(r[0],e),a=n?0:1,r.reduce(function(t,e,n){return 0===n?t.push(m(["M"],w(e),!1)):t.push(m(["A",i,i,0,0,a],w(e),!1)),t},[])):[]):kw(t)}function Ew(t,e,n){function r(t,e){return[l,t,c,e,s].flat()}var i=n.type,a=n.connect,o=n.center,s=n.closed?[["Z"]]:[],n=w([Mw(t,n),Mw(e.slice().reverse(),n,!0)],2),l=n[0],c=n[1],n=w([t[0],e.slice(-1)[0]],2),t=n[0],e=n[1];if("line"===a||"surround"===i)return r([m(["L"],w(e),!1)],[m(["L"],w(t),!1)]);if(o)return a=(n=w([q2(e,o),q2(t,o)],2))[0],i=n[1],r([m(["A",a,a,0,0,1],w(e),!1),m(["L"],w(e),!1)],[m(["A",i,i,0,0,0],w(t),!1),m(["L"],w(t),!1)]);throw new Error("Arc grid need to specified center")}function Ow(t,e,n){var r=n.animate,i=n.connect,a=n.areaFill;if(e.length<2||!a||!i)return[];for(var o=Array.isArray(a)?a:[a,"transparent"],s=[],l=0;l<e.length-1;l++){var c=w([e[l].points,e[l+1].points],2),c=Ew(c[0],c[1],n);s.push({path:c,fill:o[l%o.length]})}return t.selectAll(ww.region.class).data(s,function(t,e){return e}).join(function(t){return t.append("path").each(function(t,e){t=M2(t,[t,e,s]);this.attr(t)}).attr("className",ww.region.name)},function(t){return t.transition(function(t,e){return tw(this,M2(t,[t,e,s]),r.update)})},function(t){return t.transition(function(){var t=this,e=ew(this,r.exit);return Zx(e,function(){return t.remove()}),e})}).transitions()}ye(Aw,Sw=Ls),Aw.prototype.render=function(t,e){t.type,t.center,t.areaFill,t.closed;var n,r,i,a,o=et(t,["type","center","areaFill","closed"]),s=(s=void 0===(s=t.data)?[]:s,t.closed?s.map(function(t){var e=t.points,n=w(e,1)[0];return v(v({},t),{points:m(m([],w(e),!1),[n],!1)})}):s),l=x(e).maybeAppendByClassName(ww.lineGroup,"g"),e=x(e).maybeAppendByClassName(ww.regionGroup,"g"),o=(l=l,r=o,i=(n=t).animate,a=s.map(function(t,e){return{id:t.id||"grid-line-".concat(e),path:Mw(t.points,n)}}),l.selectAll(ww.line.class).data(a,function(t){return t.id}).join(function(t){return t.append("path").each(function(t,e){t=M2(Q2(v({path:t.path},r)),[t,e,a]);this.attr(v({class:ww.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4]},t))})},function(t){return t.each(function(t,e){tw(this,M2(Q2(v({path:t.path},r)),[t,e,a]),i.update)})},function(t){return t.transition(function(){var t=this,e=ew(this,i.exit);return Zx(e,function(){return t.remove()}),e})}).transitions()),l=Ow(e,s,t);return m(m([],w(o),!1),w(l),!1)};var Sw,_w=Aw;function Aw(){return null!==Sw&&Sw.apply(this,arguments)||this}function Pw(t,e){return Object.fromEntries(Object.entries(t).map(function(t){t=w(t,2);return[t[0],M2(t[1],e)]}))}function Tw(t,e){return e&&Ue(e)?t.filter(e):t}var Lw=bn(function(t,e){var n=e.startAngle;return(e.endAngle-n)*t+n},function(t,e){return[t,e.startAngle,e.endAngle].join()}),Nw=bn(function(t,e){var n,r,i;return"linear"===e.type?(r=(n=w(e.startPos,2))[0],n=n[1],i=w(e.endPos,2),U2([(r=w([i[0]-r,i[1]-n],2))[0],r[1]])):(i=b2(Lw(t,e)),[-Math.sin(i),Math.cos(i)])},function(t,e){var n,r,i,a="linear"===(n=e).type?(a=n.startPos,r=n.endPos,m(m([],w(a),!1),w(r),!1)):(a=n.startAngle,r=n.endAngle,i=n.center,n=n.radius,m(m([a,r],w(i),!1),[n],!1));return"arc"===e.type&&a.push(t),a.join()});function Cw(t,e,n){t=Nw(t,n);return n=t,"positive"!==e?[n[1],-n[0]]:[-n[1],n[0]]}var jw=bn(function(t,e){var n=w(e.startPos,2),r=n[0],n=n[1],e=w(e.endPos,2),e=w([e[0]-r,e[1]-n],2);return[r+e[0]*t,n+e[1]*t]},function(t,e){return m(m([t],w(e.startPos),!1),w(e.endPos),!1).join()}),Rw=bn(function(t,e){var n=e.radius,r=w(e.center,2),i=r[0],r=r[1],t=b2(Lw(t,e));return[i+n*Math.cos(t),r+n*Math.sin(t)]},function(t,e){return m([t,e.startAngle,e.endAngle,e.radius],w(e.center),!1).join()});function Iw(t,e){return("linear"===e.type?jw:Rw)(t,e)}function Bw(t,e){return e-t==360}function Fw(t,e,n,r,i){function a(t){return[n+i*Math.cos(t),r+i*Math.sin(t)]}var o=e-t,s=w([i,i],2),l=s[0],s=s[1],c=w([b2(t),b2(e)],2),u=c[0],c=c[1],h=w(a(u),2),f=h[0],h=h[1],d=w(a(c),2),p=d[0],d=d[1];return Bw(t,e)?[["M",f,h],["A",l,s,0,1,0,(c=w(a((c+u)/2),2))[0],c[1]],["A",l,s,0,1,0,p,d]]:(u=180<o?1:0,c=e<t?0:1,"M".concat(f,",").concat(h,",A").concat(l,",").concat(s,",0,").concat(u,",").concat(c,",").concat(p,",").concat(d))}function Dw(t,e,n,s){var l=e.startAngle,c=e.endAngle,u=e.center,h=e.radius;return t.selectAll(xw.line.class).data([{path:Fw.apply(void 0,m(m([l,c],w(u),!1),[h],!1))}],function(t,e){return e}).join(function(t){return t.append("path").attr("className",xw.line.name).styles(e).styles({path:function(t){return t.path}})},function(t){return t.transition(function(){var t,r,e,n,i,a=this,o=(o=(i=(i=t=this).attributes).startAngle,e=i.endAngle,n=i.center,i=i.radius,o=m(m([o,e],w(n),!1),[i],!1),e=m(m([l,c],w(u),!1),[h],!1),(n=s.update)?(i=void 0===(i=n.duration)?0:i,r=B2(o,e),o=Math.ceil(+i/16),i=new Array(o).fill(0).map(function(t,e,n){return{__keyframe_data__:r(e/(n.length-1))}}),t.animate(i,v({fill:"both"},n))):(t.attr("__keyframe_data__",e),null));return o&&(o.onframe=i=function(){var t=En(a.attributes,"__keyframe_data__");a.style.path=Fw.apply(void 0,m([],w(t),!1))},o.onfinish=i),o}).styles(e)},function(t){return t.remove()}).styles(n).transitions()}function zw(t){var t=w(t,2),e=w(t[0],2),n=e[0],e=e[1],t=w(t[1],2);return{x1:n,y1:e,x2:t[0],y2:t[1]}}function Gw(e,t,n,r){function i(t){return e.selectAll(xw.line.class).data(t,function(t,e){return e}).join(function(t){return t.append("line").attr("className",function(t){return"".concat(xw.line.name," ").concat(t.className)}).styles(n).transition(function(t){return tw(this,zw(t.line),!1)})},function(t){return t.styles(n).transition(function(t){return tw(this,zw(t.line),r.update)})},function(t){return t.remove()}).transitions()}var a,o,s,l=t.showTrunc,c=t.startPos,u=t.endPos,h=t.truncRange,f=t.lineExtension,d=w([c,u],2),p=w(d[0],2),g=p[0],p=p[1],d=w(d[1],2),m=d[0],d=d[1],u=w(f?(c=w([c=c,u=u,f=void 0===(f=f)?[0,0]:f],3),f=(u=w(c[0],2))[0],u=u[1],y=(a=w(c[1],2))[0],a=a[1],v=(c=w(c[2],2))[0],c=c[1],f=(y=w([y-f,a-u],2))[0],a=y[1],u=Math.sqrt(Math.pow(f,2)+Math.pow(a,2)),v=(y=w([-v/u,c/u],2))[0],c=y[1],[v*f,v*a,c*f,c*a]):new Array(4).fill(0),4),y=u[0],v=u[1],f=u[2],c=u[3];return l&&h?(u=(a=w(h,2))[0],l=a[1],o=(u=w([g+(h=m-g)*u,p+(s=d-p)*u],2))[0],u=u[1],s=(h=w([g+h*l,p+s*l],2))[0],l=h[1],h=i([{line:[[g+y,p+v],[o,u]],className:xw.lineFirst.name},{line:[[s,l],[m+f,d+c]],className:xw.lineSecond.name}]),t.truncRange,t.truncShape,t.lineExtension,h):i([{line:[[g+y,p+v],[m+f,d+c]],className:xw.line.name}])}function Ww(t,e,n){var r,i,a,o,s,l=e.type,c=E(e,"line"),n=("linear"===l?Gw:Dw)(t,e,$2(c,"arrow"),n);return t=t,l=l,c=c,r=(e=e).showArrow,i=e.showTrunc,a=e.lineArrow,o=e.lineArrowOffset,s=e.lineArrowSize,l="arc"!==l&&i?t.select(xw.lineSecond.class):t.select(xw.line.class),!r||!a||"arc"===e.type&&Bw(e.startAngle,e.endAngle)?(i=l.node())&&(i.style.markerEnd=void 0):((t=T2(a)).attr(c),J2(t,s,!0),l.style("markerEnd",t).style("markerEndOffset",-o)),n}function Hw(t){var e=t.type,n=t.gridCenter;return"linear"===e?n:n||t.center}function Yw(t,i){var a=i.gridLength;return t.map(function(t,e){var t=t.value,n=w(Iw(t,i),2),r=n[0],n=n[1],t=w(G2(Cw(t,i.gridDirection,i),a),2);return{id:e,points:[[r,n],[r+t[0],n+t[1]]]}})}function Vw(t,e,n,r){var i=E(n,"grid"),a=i.type,o=i.areaFill,s=Hw(n),l=Tw(e,n.gridFilter),e=("segment"===a?Yw:function(t,o){var s,l,c=o.gridControlAngles,e=Hw(o);if(!e)throw new Error("grid center is not provide");if(t.length<2)throw new Error("Invalid grid data");if(c&&0!==c.length)return e=w(e,2),s=e[0],l=e[1],t.map(function(t,e){var t=w(Iw(t.value,o),2),n=t[0],t=t[1],n=w([n-s,t-l],2),r=n[0],i=n[1],a=[];return c.forEach(function(t){var t=b2(t),t=w([Math.cos(t),Math.sin(t)],2),e=t[0],t=t[1];a.push([r*e-i*t+s,r*t+i*e+l])}),{points:a,id:e}});throw new Error("Invalid gridControlAngles")})(l,n),c=v(v({},i),{center:s,areaFill:Ue(o)?l.map(function(t,e){return M2(o,[t,e,l])}):o,animate:r,data:e});return t.selectAll(xw.grid.class).data([1]).join(function(t){return t.append(function(){return new _w({style:c})}).attr("className",xw.grid.name)},function(t){return t.transition(function(){return this.update(c)})},function(t){return t.remove()}).transitions()}Object.defineProperty(Uw.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(Uw.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(Uw.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(Uw.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(Uw.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(Uw.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),Uw.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},Uw.prototype.empty=function(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},Uw.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},Uw.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])},Uw.prototype.rotatedPoints=function(t,e,n){var r=this.x1,i=this.y1,a=this.x2,o=this.y2,s=Math.cos(t),t=Math.sin(t),l=e-e*s+n*t,e=n-e*t-n*s;return[[s*r-t*i+l,t*r+s*i+e],[s*r-t*o+l,t*r+s*o+e],[s*a-t*o+l,t*a+s*o+e],[s*a-t*i+l,t*a+s*i+e]].flat(1)},Uw.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},Uw.prototype.intersects=function(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},Uw.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE};var qw=Uw;function Uw(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 Xw(t,c){return[[t[0],t[1],t[2],t[3]],[t[2],t[3],t[4],t[5]],[t[4],t[5],t[6],t[7]],[t[6],t[7],t[0],t[1]]].some(function(t){return t=t,n=(e=w(e=c,4))[0],r=e[1],i=e[2],e=e[3],a=(t=w(t,4))[0],o=t[1],i-=n,e-=r,s=t[2]-a,t=t[3]-o,0!=(l=i*t-s*e)&&(o=i*(i=r-o)-e*(r=n-a))<0!=(e=0<l)&&(n=s*i-t*r)<0!=e&&l<o!=e&&l<n!=e;var e,n,r,i,a,o,s,l})}function $w(t,e){void 0===e&&(e=[0,0,0,0]);var n=t.getEulerAngles()||0,r=(t.setEulerAngles(0),t.getLocalBounds()),i=w(r.min,2),a=i[0],i=i[1],r=w(r.max,2),o=r[0],r=r[1],s=t.getBBox(),l=s.width,s=s.height,c=0,u=0,h=a,f=i,d=("text"===t.tagName&&(s-=1.5,d=t.style.textAlign,p=t.style.textBaseline,c=+t.style.dx,u=+t.style.dy,"center"===d?h=(a+o)/2:"right"!==d&&"end"!==d||(h=o),"middle"===p?f=(i+r)/2:"bottom"!==p&&"baseline"!==p||(f=r)),w(e,4)),o=d[0],p=void 0===o?0:o,r=d[1],e=void 0===r?0:r,o=d[2],r=void 0===o?p:o,o=d[3],d=void 0===o?e:o,o=new qw;return o.set((c+=a)-d,(u+=i)-p,c+l+e,u+s+r),t.setEulerAngles(n),o.rotatedPoints(b2(n),h,f)}function Kw(t,a){var o;return m([],w(t.reduce(function(t,e,n){return n&&o&&(n=e,r=$w(r=o,i=a),Xw(n=$w(n,i),[r[0],r[1],r[2],r[3]])||Xw(n,[r[0],r[1],r[4],r[5]])||Xw(n,[r[4],r[5],r[6],r[7]])||Xw(n,[r[2],r[3],r[6],r[7]]))?(t.add(o),t.add(e)):o=e,t;var r,i},new Set)),!1)}function Zw(t,e){return void 0===e&&(e={}),_(t)?0:"number"==typeof t?t:Math.floor(px(t,e))}var Qw=function(t,e){var e=e.seq,n=void 0===e?2:e;return t.filter(function(t,e){return!(e%n&&(u2(t),1))})};var Jw=new Map([["hide",function(t,e,n,r){var i=t.length,a=e.keepHeader,o=e.keepTail;if(!(i<=1||2===i&&a&&o)){var s,l,c=Qw,u=function(t){return t.forEach(r.show),t},h=2,f=t.slice(),d=t.slice(),p=Math.min.apply(Math,m([1],w(t.map(function(t){return t.getBBox().width})),!1));for("linear"!==n.type||0!==Nw(0,n)[1]&&0!==Nw(0,n)[0]||(n=ox(t[0]).left,t=ox(t[i-1]).right,t=Math.abs(t-n)||1,h=Math.max(Math.floor(i*p/t),h)),a&&(s=f.splice(0,1)[0]),o&&(l=f.splice(-1,1)[0],f.reverse()),u(f);Kw((l?m(m([l],w(d),!1),[s],!1):m([s],w(d),!1)).filter(_2),null==e?void 0:e.margin).length;)(l&&!s&&h%2==0||l&&s)&&f.splice(0,1).forEach(r.hide),d=c(u(f),{seq:h}),h++}}],["rotate",function(t,e,n,r){for(var i=void 0===(o=e.optionalAngles)?[0,45,90]:o,a=e.margin,e=void 0===(o=e.recoverWhenFailed)||o,o=t.map(function(t){return t.getLocalEulerAngles()}),s=function(n){return t.forEach(function(t,e){e=Ke(n)?n[e]:n;r.rotate(t,+e)})},l=0;l<i.length;l++)if(s(i[l]),Kw(t,a).length<1)return;e&&s(o)}],["ellipsis",function(t,e,n,r){if(!(t.length<=1))for(var i=void 0===(a=e.suffix)?"...":a,a=e.minLength,o=void 0===(o=e.maxLength)?1/0:o,s=void 0===(s=e.step)?" ":s,l=void 0===(e=e.margin)?[0,0,0,0]:e,e=gx(r.getTextShape(t[0])),c=Zw(s,e),u=a?Zw(a,e):c,s=Zw(o,e),h=(!_(s)&&s!==1/0||(s=Math.max.apply(null,t.map(function(t){return t.getBBox().width}))),t.slice()),f=((a=w(l,4))[0],a[1],a[2],a[3],s);u+c<f;f-=c){var d=function(e){if(h.forEach(function(t){r.ellipsis(r.getTextShape(t),e,i)}),(h=Kw(t,l)).length<1)return{value:void 0}}(f);if("object"==typeof d)return d.value}}]]);function tk(r,i,a){var t=i.labelOverlap,t=void 0===t?[]:t;t.length&&t.forEach(function(t){var e=t.type,n=Jw.get(e);!function(t,e,n){if(!(e.labelOverlap.length<1))if("hide"===n){for(var r=t[0];r;){if("offscreen"===r.className)return;r=r.parent}return 1}else return"rotate"===n?!t.some(function(t){return!(null==(t=t.attr("transform"))||!t.includes("rotate"))}):"ellipsis"!==n||1<t.map(function(t){return t.querySelector("text")}).length}(r,i,e)||null==n||n(r,t,i,a)})}function ek(t){for(var e=t;e<0;)e+=360;return Math.round(e%360)}var nk=bn(function(t,e){var t=w(t,2),n=t[0],t=t[1],e=w(e,2),r=e[0],e=e[1],n=w([n*r+t*e,n*e-t*r],2),e=n[0],t=n[1];return Math.atan2(t,e)},function(t,e){return m(m([],w(t),!1),w(e),!1).join()});function rk(t,e){return Cw(t,e.labelDirection,e)}function ik(t,e,n){var r,i=n.labelAlign;return(null==(r=e.style.transform)?void 0:r.includes("rotate"))?e.getLocalEulerAngles():(r=0,e=rk(t.value,n),t=Nw(t.value,n),"horizontal"===i?0:(r="perpendicular"===i?nk([1,0],e):nk([t[0]<0?-1:1,0],t),R2(n=((n=x2(r))+360)%180,-90,90)||(n+=180),n))}function ak(t,e,n){var r=n.type,i=n.labelAlign,t=rk(t,n),n=ek(e),e=ek(x2(nk([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":R2(n,90,270)?R2(e,90,270)?"start":"end":R2(e,90,270)?"end":"start";if(0===e){if(R2(n,0,90,!1,!0))return"start";if(R2(n,0,90)||R2(n,270,360))return"start"}if(90===e){if(R2(n,0,90,!1,!0))return"start";if(R2(n,90,180)||R2(n,270,360))return"end"}if(270===e){if(R2(n,0,90,!1,!0))return"end";if(R2(n,90,180)||R2(n,270,360))return"start"}if(180===e){if(90===n)return"start";if(R2(n,0,90)||R2(n,270,360))return"end"}return"start"}function ok(t,e,n){var r=n.showTick,i=n.tickLength,a=n.tickDirection,o=n.labelDirection,s=n.labelSpacing,l=e.indexOf(t),s=M2(s,[t,l,e]),o=w([rk(t.value,n),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)}(o,a)],2),a=w(W2(G2(o[0],s+(1===o[1]?M2(r?i:0,[t,l,e]):0)),Iw(t.value,n)),2);return{x:a[0],y:a[1]}}function sk(t,e){"text"===t.nodeName&&t.attr(e)}function lk(r){tk(this.node().childNodes,r,{hide:u2,show:c2,rotate:function(t,e){var n;e=+e,n=r,(t=t).setLocalEulerAngles(e),e=ak(t.__data__.value,e,n),(n=t.querySelector(xw.labelItem.class))&&sk(n,{textAlign:e})},ellipsis:function(t,e,n){void 0===e&&(e=1/0),t&&A2(t,e,n)},getTextShape:function(t){return t.querySelector("text")}})}function ck(t,e,n,r,i){var a,o,s,l,c,u=n.indexOf(e),h=x(t).append((a=e,o=u,s=n,c=(l=i).labelFormatter,Ue(c)?function(){return T2(M2(c,[a,o,s,rk(a.value,l)]))}:function(){return T2(a.label||"")})).attr("className",xw.labelItem.name).node(),r=w(ux(Pw(r,[e,u,n])),2),u=r[0],n=r[1],r=n.transform,n=et(n,["transform"]),f=(mx(t,r),ik(e,t,i));return t.setLocalEulerAngles(+f),sk(h,v({textAlign:ak(e.value,f,i),textBaseline:"middle"},u)),mx(t,r),t.attr(n),h}function uk(n,f,d,p){var t=Tw(f,d.labelFilter),g=E(d,"label");return n.selectAll(xw.label.class).data(t,function(t,e){return e}).join(function(t){return t.append("g").attr("className",xw.label.name).transition(function(t){return ck(this,t,f,g,d),this.attr(ok(t,f,d)),null}).call(function(){return lk.call(n,d)})},function(t){return t.transition(function(t){var e,n,r,i,a,o,s,l=this.querySelector(xw.labelItem.class),c=ck(this,t,f,g,d),u=(e=l,n=c,l=p.update,void 0===r&&(r="destroy"),l?(c=void 0===(c=l.duration)?0:c,i=void 0===(i=l.delay)?0:i,a=Math.ceil(+c/2),c=+c/4,o=(u=w((s=function(t){var e,n;return"circle"===t.nodeName?(n=(e=w(t.getLocalPosition(),2))[0],e=e[1],[n-(n=t.attr("r")),e-n]):t.getLocalPosition()})(e),2))[0],u=u[1],s=w(s(n),2),s=(o=w([(o+s[0])/2-o,(u+s[1])/2-u],2))[0],u=o[1],o=e.animate([{opacity:1,transform:"translate(0, 0)"},{opacity:0,transform:"translate(".concat(s,", ").concat(u,")")}],v(v({fill:"both"},l),{duration:i+a+c})),Zx(s=n.animate([{opacity:0,transform:"translate(".concat(-s,", ").concat(-u,")"),offset:.01},{opacity:1,transform:"translate(0, 0)"}],v(v({fill:"both"},l),{duration:a+c,delay:i+a-c})),h),[o,s]):(h(),[null]));function h(){"destroy"===r?e.destroy():"hide"===r&&u2(e),n.isVisible()&&c2(n)}l=tw(this,ok(t,f,d),p.update);return m(m([],w(u),!1),[l],!1)}).call(function(t){var e,t=En(t,"_transitions").flat().filter(_2);e=function(){return lk.call(n,d)},0===(t=t).length?e():Promise.all(t.map(function(t){return null==t?void 0:t.finished})).then(e)})},function(t){return t.transition(function(){var t=this,e=ew(this,p.exit);return Zx(e,function(){return x(t).remove()}),e})}).transitions()}function hk(t,e){return Cw(t,e.tickDirection,e)}var fk=bn(function(t,e){t=w(t,2);return[[0,0],[t[0]*e,t[1]*e]]},function(t,e){return m(m([],w(t),!1),[e],!1).join()});function dk(t,e,n,r,i,a,o){var s=hk(t.value,a),a=(c=t,u=e,h=n,l=s,a=(a=a).tickLength,l=w(fk(l,M2(a,[c,u,h])),2),a=w(l[0],2),c=a[0],u=a[1],h=w(l[1],2),{x1:c,x2:h[0],y1:u,y2:h[1]}),l=a.x1,c=a.x2,u=a.y1,h=a.y2,a=w(ux(Pw(o,[t,e,n,s])),2),o=a[0],t=a[1];"line"===r.node().nodeName&&r.styles(v({x1:l,x2:c,y1:u,y2:h},o)),i.attr(t),r.styles(o)}function pk(t,e,n,r,i,a){o=x(this),s=t,l=e,c=n,h=(u=r).tickFormatter,f=hk(s.value,u),u="line",Ue(h)&&(u=function(){return M2(h,[s,l,c,f])});dk(t,e,n,o.append(u).attr("className",xw.tickItem.name),this,r,i);var o,s,l,c,u,h,f,e=w(Iw(t.value,r),2);return tw(this,{x:e[0],y:e[1]},a)}var gk=E2({text:"text"},"title");function mk(t){return/\S+-\S+/g.test(t)?t.split("-").map(function(t){return t[0]}):2<t.length?[t[0]]:t.split("")}function yk(r,t){t=Object.entries(t).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1];return r.node().attr(n)||(t[n]=e),t},{});r.styles(t)}ye(xk,vk=Ls),xk.prototype.getAvailableSpace=function(){var t=this.attributes,r=t.width,i=t.height,e=t.position,n=t.spacing,t=t.inset,a=this.querySelector(gk.text.class);if(!a)return new w2(0,0,+r,+i);var a=a.getBBox(),o=a.width,s=a.height,a=w(ax(n),4),l=a[0],c=a[1],u=a[2],h=a[3],n=w([0,0,+r,+i],4),f=n[0],d=n[1],p=n[2],g=n[3],a=mk(e);if(a.includes("i"))return new w2(f,d,p,g);a.forEach(function(t,e){var n;"t"===t&&(n=w(0===e?[s+u,+i-s-u]:[0,+i],2),d=n[0],g=n[1]),"r"===t&&(n=w([+r-o-h],1),p=n[0]),"b"===t&&(n=w([+i-s-l],1),g=n[0]),"l"===t&&(n=w(0===e?[o+c,+r-o-c]:[0,+r],2),f=n[0],p=n[1])});n=w(ax(t),4),e=n[0],a=n[1],t=n[2],n=n[3],a=w([n+a,e+t],2),t=a[0],a=a[1];return new w2(f+n,d+e,p-t,g-a)},xk.prototype.getBBox=function(){return this.title?this.title.getBBox():new w2(0,0,0,0)},xk.prototype.render=function(t,e){var n,r,i,a,o,s,l=this,c=(t.width,t.height,t.position,t.spacing,et(t,["width","height","position","spacing"])),u=w(ux(c),1)[0],h=(h=(t=t).width,r=t.height,t=t.position,i=w([+h/2,+r/2],2),a=(i=w([+i[0],+i[1],"center","middle"],4))[0],o=i[1],s=i[2],i=i[3],(t=mk(t)).includes("l")&&(a=(n=w([0,"start"],2))[0],s=n[1]),t.includes("r")&&(a=(n=w([+h,"end"],2))[0],s=n[1]),t.includes("t")&&(o=(h=w([0,"top"],2))[0],i=h[1]),t.includes("b")&&(o=(n=w([+r,"bottom"],2))[0],i=n[1]),{x:a,y:o,textAlign:s,textBaseline:i}),f=h.x,d=h.y,p=h.textAlign,g=h.textBaseline;j2(!!c.text,x(e),function(t){l.title=t.maybeAppendByClassName(gk.text,"text").styles(u).call(yk,{x:f,y:d,textAlign:p,textBaseline:g}).node()})};var vk,bk=xk;function xk(t){return vk.call(this,t,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}function wk(t,e,n,r,i){var a,o,s,l,c,u,h,f,d=w(ux(E(r,"title")),2),p=d[0],d=d[1],g=d.transform,g=void 0===g?"":g,d=et(d,["transform"]),m=(t.styles(p),e.styles(d),mx(t.node(),g),p=x(n._offscreen||n.querySelector(xw.mainGroup.class)),d=e,r=void 0===(r=(n=r).titlePosition)?"lb":r,a=n.titleSpacing,o=mk(r),p=p.node().getLocalBounds(),s=(l=w(p.min,2))[0],l=l[1],c=(p=w(p.halfExtents,2))[0],p=p[1],u=(d=w(d.node().getLocalBounds().halfExtents,2))[0],d=d[1],l=(s=w([s+c,l+p],2))[0],s=s[1],y=(a=w(ax(a),4))[0],h=a[1],f=a[2],a=a[3],["start","end"].includes(r)&&"linear"===n.type?(m=n.startPos,n=n.endPos,n=(r=w("start"===r?[m,n]:[n,m],2))[0],m=(r=w(G2(U2([-(m=r[1])[0]+n[0],-m[1]+n[1]]),y),2))[0],r=r[1],{x:n[0]+m,y:n[1]+r}):(o.includes("t")&&(s-=p+d+y),o.includes("r")&&(l+=c+u+h),o.includes("l")&&(l-=c+u+a),o.includes("b")&&(s+=p+d+f),{x:l,y:s})),n=m.x,r=m.y,y=tw(e.node(),{x:n,y:r},i);return mx(t.node(),g),y}function kk(e,t,o,s){var n=e.showLine,r=e.showTick,i=e.showLabel,n=j2(n,t.maybeAppendByClassName(xw.lineGroup,"g"),function(t){return Ww(t,e,s)})||[],r=j2(r,t.maybeAppendByClassName(xw.tickGroup,"g"),function(t){return t=t,r=s,i=Tw(o,(n=e).tickFilter),a=E(n,"tick"),t.selectAll(xw.tick.class).data(i,function(t){return t.id||t.label}).join(function(t){return t.append("g").attr("className",xw.tick.name).transition(function(t,e){return pk.call(this,t,e,i,n,a,!1)})},function(t){return t.transition(function(t,e){return this.removeChildren(),pk.call(this,t,e,i,n,a,r.update)})},function(t){return t.transition(function(){var t=this,e=ew(this,r.exit);return Zx(e,function(){return t.remove()}),e})}).transitions();var n,r,i,a})||[],i=j2(i,t.maybeAppendByClassName(xw.labelGroup,"g"),function(t){return uk(t,o,e,s)})||[];return m(m(m([],w(n),!1),w(r),!1),w(i),!1).filter(function(t){return!!t})}ye(Ok,Mk=Ls),Ok.prototype.render=function(o,t,e){var s=this,n=o.titleText,r=o.data,i=o.animate,a=o.showTitle,l=o.showGrid,c=o.dataThreshold,u=o.truncRange,h=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}(r,c).filter(function(t){t=t.value;return!(u&&t>u[0]&&t<u[1])}),f=Kx(void 0===e?i:e),r=j2(l,x(t).maybeAppendByClassName(xw.gridGroup,"g"),function(t){return Vw(t,h,o,f)})||[],c=x(t).maybeAppendByClassName(xw.mainGroup,"g"),i=(n&&(!this.initialized&&f.enter||this.initialized&&f.update)&&kk(o,x(this.offscreenGroup),h,Kx(!1)),kk(o,x(c.node()),h,f)),e=j2(a,x(t).maybeAppendByClassName(xw.titleGroup,"g"),function(t){return e=t,n=s,i=f,(r=o).titleText?(a=r.titleText,e.selectAll(xw.title.class).data([{title:a}],function(t,e){return t.title}).join(function(t){return t.append(function(){return T2(a)}).attr("className",xw.title.name).transition(function(){return wk(x(this),e,n,r,i.enter)})},function(t){return t.transition(function(){return wk(x(this),e,n,r,i.update)})},function(t){return t.remove()}).transitions()):null;var e,n,r,i,a})||[];return m(m(m([],w(r),!1),w(i),!1),w(e),!1).flat().filter(function(t){return!!t})};var Mk,Ek=Ok;function Ok(t){return Mk.call(this,t,bw)||this}var Sk,_k=E2({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"),Ak=(ye(Pk,Sk=Ls),Object.defineProperty(Pk.prototype,"defaultPage",{get:function(){var t=this.attributes.initPage;return on(t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(Pk.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(Pk.prototype,"controllerShape",{get:function(){return 1<this.totalPages?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(Pk.prototype,"pageShape",{get:function(){var n,t=this.pageViews,t=w((n=t.map(function(t){t=t.getBBox();return[t.width,t.height]}),((null==(t=n[0])?void 0:t.map(function(t,e){return n.map(function(t){return t[e]})}))||[]).map(function(t){return Math.max.apply(Math,m([],w(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}),Pk.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(Pk.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(Pk.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),Pk.prototype.getBBox=function(){var t=Sk.prototype.getBBox.call(this),e=t.x,t=t.y,n=this.controllerShape,r=this.pageShape,i=r.pageWidth,r=r.pageHeight;return new w2(e,t,i+n.width,r)},Pk.prototype.goTo=function(t){var e=this,n=this.attributes.animate,r=this.currPage,i=this.playState,a=this.playWindow,o=this.pageViews;if("idle"!==i||t<0||o.length<=0||t>=o.length)return null;o[r].setLocalPosition(0,0),this.prepareFollowingPage(t);i=w(this.getFollowingPageDiff(t),2),o=i[0],r=i[1],this.playState="running",i=Jx(a,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-o,", ").concat(-r,")")}],n);return Zx(i,function(){e.innerCurrPage=t,e.playState="idle",e.setVisiblePages([t]),e.updatePageInfo()}),i},Pk.prototype.prev=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&n<=0?null:(t=t?(n-1+e)%e:on(n-1,0,e),this.goTo(t))},Pk.prototype.next=function(){var t=this.attributes.loop,e=this.pageViews.length,n=this.currPage;return!t&&e-1<=n?null:(t=t?(n+1)%e:on(n+1,0,e),this.goTo(t))},Pk.prototype.renderClipPath=function(t){var e=this.pageShape,n=e.pageWidth,e=e.pageHeight;n&&e?(this.clipPath=t.maybeAppendByClassName(_k.clipPath,"rect").styles({width:n,height:e}),this.contentGroup.attr("clipPath",this.clipPath.node())):this.contentGroup.style.clipPath=void 0},Pk.prototype.setVisiblePages=function(n){this.playWindow.children.forEach(function(t,e){(n.includes(e)?c2:u2)(t)})},Pk.prototype.adjustControllerLayout=function(){var t=this.prevBtnGroup,e=this.nextBtnGroup,n=this.pageInfoGroup,r=this.attributes,i=r.orientation,r=r.controllerPadding,a=n.getBBox(),o=a.width,a=(a.height,w("horizontal"===i?[-180,0]:[-90,90],2)),s=a[0],a=a[1],s=(t.setLocalEulerAngles(s),e.setLocalEulerAngles(a),t.getBBox()),a=s.width,s=s.height,l=e.getBBox(),c=l.width,l=l.height,c=Math.max(a,o,c),i="horizontal"===i?{offset:[[0,0],[a/2+r,0],[a+o+2*r,0]],textAlign:"start"}:{offset:[[c/2,-s-r],[c/2,0],[c/2,l+r]],textAlign:"center"},a=w(i.offset,3),o=w(a[0],2),s=o[0],c=o[1],l=w(a[1],2),r=l[0],o=l[1],l=w(a[2],2),a=l[0],l=l[1],i=i.textAlign,u=n.querySelector("text");u&&(u.style.textAlign=i),t.setLocalPosition(s,c),n.setLocalPosition(r,o),e.setLocalPosition(a,l)},Pk.prototype.updatePageInfo=function(){var t,e=this.currPage,n=this.pageViews,r=this.attributes.formatter;n.length<2||(null!=(t=this.pageInfoGroup.querySelector(_k.pageInfo.class))&&t.attr("text",r(e+1,n.length)),this.adjustControllerLayout())},Pk.prototype.getFollowingPageDiff=function(t){var e,n,r,i=this.currPage;return i===t?[0,0]:(e=this.attributes.orientation,n=(r=this.pageShape).pageWidth,r=r.pageHeight,t=t<i?-1:1,"horizontal"===e?[t*n,0]:[0,t*r])},Pk.prototype.prepareFollowingPage=function(t){var e,n=this.currPage,r=this.pageViews;this.setVisiblePages([t,n]),t!==n&&(e=(n=w(this.getFollowingPageDiff(t),2))[0],n=n[1],r[t].setLocalPosition(e,n))},Pk.prototype.renderController=function(t){var e,n,r,i,a,o=this,s=this.attributes.controllerSpacing,l=this.pageShape,c=l.pageWidth,l=l.pageHeight,u=2<=this.pageViews.length,t=t.maybeAppendByClassName(_k.controller,"g");h2(t.node(),u),u&&(u=E(this.attributes,"button"),e=E(this.attributes,"pageNum"),i=(u=w(ux(u),2))[0],u=u[1],n=i.size,r=et(i,["size"]),i=!t.select(_k.prevBtnGroup.class).node(),a=t.maybeAppendByClassName(_k.prevBtnGroup,"g").styles(u),this.prevBtnGroup=a.node(),a=a.maybeAppendByClassName(_k.prevBtn,"path"),u=t.maybeAppendByClassName(_k.nextBtnGroup,"g").styles(u),this.nextBtnGroup=u.node(),[a,u.maybeAppendByClassName(_k.nextBtn,"path")].forEach(function(t){t.styles(v(v({},r),{transformOrigin:"center"})),J2(t.node(),n,!0)}),a=t.maybeAppendByClassName(_k.pageInfoGroup,"g"),this.pageInfoGroup=a.node(),a.maybeAppendByClassName(_k.pageInfo,"text").styles(e),this.updatePageInfo(),t.node().setLocalPosition(c+s,l/2),i)&&(this.prevBtnGroup.addEventListener("click",function(){o.prev()}),this.nextBtnGroup.addEventListener("click",function(){o.next()}))},Pk.prototype.render=function(t,e){e=x(e);this.renderClipPath(e),this.renderController(e),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},Pk.prototype.bindEvents=function(){var t=this,e=vn(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(b.INSERTED,e),this.playWindow.addEventListener(b.REMOVED,e)},Pk);function Pk(t){var e,n,t=Sk.call(this,t,{animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonPath:[["M",(t=0)-(n=6),(e=0)-n],["L",t+n,e],["L",t-n,e+n],["Z"]],buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(t,e){return"".concat(t,"/").concat(e)},initPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return t.playState="idle",t.contentGroup=t.appendChild(new hl({class:_k.contentGroup.name})),t.playWindow=t.contentGroup.appendChild(new hl({class:_k.playWindow.name})),t.innerCurrPage=t.defaultPage,t}function Tk(t,e,n){return"horizontal"===(t=void 0===t?"horizontal":t)?e:n}Ex.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"]]}),Ex.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]]}),Ex.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=E2({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");ye(jk,Nk=Ls),Object.defineProperty(jk.prototype,"showValue",{get:function(){var t=this.attributes.valueText;return!!t&&("string"==typeof t||"number"==typeof t?""!==t:"function"==typeof t||""!==t.attr("text"))},enumerable:!1,configurable:!0}),Object.defineProperty(jk.prototype,"actualSpace",{get:function(){var t=this.labelGroup,e=this.valueGroup,n=this.attributes.markerSize,t=t.node().getBBox(),r=t.width,t=t.height,e=e.node().getBBox(),i=e.width,e=e.height;return{markerWidth:n,labelWidth:r,valueWidth:i,height:Math.max(n,t,e)}},enumerable:!1,configurable:!0}),Object.defineProperty(jk.prototype,"span",{get:function(){var t,e=this.attributes.span;return e?(t=(e=w(ax(e),2))[0],e=e[1],[t/(e=t+(t=this.showValue?e:0)),t/e]):[1,1]},enumerable:!1,configurable:!0}),Object.defineProperty(jk.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=w(this.spacing,2),s=o[0],o=o[1];return t&&(t=t-e-s-o,e=w(this.span,2),a=(e=w([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(jk.prototype,"spacing",{get:function(){var t,e=this.attributes.spacing;return e?(t=(e=w(ax(e),2))[0],e=e[1],this.showValue?[t,e]:[t,0]):[0,0]},enumerable:!1,configurable:!0}),Object.defineProperty(jk.prototype,"layout",{get:function(){var t=this.shape,e=t.markerWidth,n=t.labelWidth,r=t.valueWidth,i=t.width,t=t.height,a=w(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}),Object.defineProperty(jk.prototype,"scaleSize",{get:function(){var t=(t=(t=this.markerGroup.node()).querySelector(Lk.marker.class))?t.style:{},e=this.attributes,n=e.markerSize,r=e.markerStrokeWidth,r=void 0===r?t.strokeWidth:r,i=e.markerLineWidth,i=void 0===i?t.lineWidth:i,e=e.markerStroke,t=void 0===e?t.stroke:e,e=+(r||i||(t?1:0))*Math.sqrt(2),r=this.markerGroup.node().getBBox(),i=r.width,t=r.height;return(1-e/Math.max(i,t))*n},enumerable:!1,configurable:!0}),jk.prototype.renderMarker=function(t){var e=this,n=this.attributes.marker,r=E(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(Lk.markerGroup,"g").style("zIndex",0),j2(!!n,this.markerGroup,function(){e.markerGroup.maybeAppendByClassName(Lk.marker,n).styles(r),e.markerGroup.node().scale(1/e.markerGroup.node().getScale()[0]),J2(e.markerGroup.node(),e.scaleSize,!0)})},jk.prototype.renderLabel=function(t){var e=E(this.attributes,"label"),n=e.text,e=et(e,["text"]);this.labelGroup=t.maybeAppendByClassName(Lk.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(Lk.label,function(){return T2(n)}).styles(e)},jk.prototype.renderValue=function(t){var e=this,n=E(this.attributes,"value"),r=n.text,i=et(n,["text"]);this.valueGroup=t.maybeAppendByClassName(Lk.valueGroup,"g").style("zIndex",0),j2(this.showValue,this.valueGroup,function(){e.valueGroup.maybeAppendByClassName(Lk.value,function(){return T2(r)}).styles(i)})},jk.prototype.renderBackground=function(t){var e=this.shape,n=e.width,e=e.height,r=E(this.attributes,"background");this.background=t.maybeAppendByClassName(Lk.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(Lk.background,"rect").styles(v({width:n,height:e},r))},jk.prototype.adjustLayout=function(){var t=this.layout,e=t.labelWidth,n=t.valueWidth,r=t.height,t=w(t.position,3),i=t[0],a=t[1],t=t[2],r=r/2;this.markerGroup.styles({x:i,y:r}),this.labelGroup.styles({x:a,y:r}),A2(this.labelGroup.select(Lk.label.class).node(),Math.ceil(e)),this.showValue&&(this.valueGroup.styles({x:t,y:r}),A2(this.valueGroup.select(Lk.value.class).node(),Math.ceil(n)))},jk.prototype.render=function(t,e){e=x(e);this.renderMarker(e),this.renderLabel(e),this.renderValue(e),this.renderBackground(e),this.adjustLayout()};var Nk,Ck=jk;function jk(t){return Nk.call(this,t,{span:[1,1],marker:function(){return new al({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}function Rk(t,e,n){return void 0===n&&(n=!0),t?e(t):n}var Ik,Bk=E2({page:"item-page",navigator:"navigator",item:"item"},"items"),Fk=(ye(Dk,Ik=Ls),Object.defineProperty(Dk.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(Dk.prototype,"grid",{get:function(){var t=this.attributes,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(Dk.prototype,"renderData",{get:function(){var t=this.attributes,a=t.data,o=t.layout,s=E(this.attributes,"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,labelText:r,valueText:i},Object.fromEntries(Object.entries(s).map(function(t){t=w(t,2);return[t[0],M2(t[1],[e,n,a])]})))}})},enumerable:!1,configurable:!0}),Dk.prototype.getGridLayout=function(){var u=this,t=this.attributes,h=t.orientation,f=t.width,d=t.rowPadding,p=t.colPadding,g=w(this.navigatorShape,1)[0],t=w(this.grid,2),m=t[0],y=t[1],v=y*m,b=0;return this.pageViews.children.map(function(t,e){var n,r=Math.floor(e/v),i=e%v,a=u.ifHorizontal(y,m),a=[Math.floor(i/a),i%a],a=("vertical"===h&&a.reverse(),w(a,2)),o=a[0],a=a[1],s=(f-g-(y-1)*p)/y,t=t.getBBox().height,l=w([0,0],2),c=l[0],l=l[1];return b="horizontal"===h?(c=(n=w([b,o*(t+d)],2))[0],l=n[1],a===y-1?0:b+s+p):(c=(n=w([a*(s+p),b],2))[0],l=n[1],o===m-1?0:b+t+d),{page:r,index:e,row:o,col:a,pageIndex:i,width:s,height:t,x:c,y:l}})},Dk.prototype.getFlexLayout=function(){var t=this.attributes,e=t.width,n=t.height,a=t.rowPadding,o=t.colPadding,t=w(this.navigatorShape,1)[0],r=w(this.grid,2),s=r[0],l=r[1],r=w([e-t,n],2),c=r[0],u=r[1],e=w([0,0,0,0,0,0,0,0],8),h=e[0],f=e[1],d=e[2],p=e[3],g=e[4],m=e[5],y=e[6],v=e[7];return this.pageViews.children.map(function(t,e){var t=t.getBBox(),n=t.width,t=t.height,r=0===y?0:o,i=y+r+n;return i<=c&&Rk(g,function(t){return t<l})?(r=w([y+r,v,i],3),h=r[0],f=r[1],y=r[2]):(i=w([m+1,0,0,v+t+a],4),m=i[0],g=i[1],y=i[2],(v=i[3])+a+t<=u&&Rk(m,function(t){return t<s})?(r=w([y,v,n],3),h=r[0],f=r[1],y=r[2]):(i=w([0,0,n,0,d+1,0,0,0],8),h=i[0],f=i[1],y=i[2],v=i[3],d=i[4],p=i[5],m=i[6],g=i[7])),{width:n,height:t,x:h,y:f,page:d,index:e,pageIndex:p++,row:m,col:g++}})},Object.defineProperty(Dk.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}),Dk.prototype.ifHorizontal=function(t,e){return Tk(this.attributes.orientation,t,e)},Dk.prototype.flattenPage=function(e){e.querySelectorAll(Bk.item.class).forEach(function(t){e.appendChild(t)}),e.querySelectorAll(Bk.page.class).forEach(function(t){e.removeChild(t).destroy()})},Dk.prototype.renderItems=function(t){var e=this.attributes,n=e.click,r=e.mouseenter,i=e.mouseleave,a=(this.flattenPage(t),this.dispatchCustomEvent.bind(this));x(t).selectAll(Bk.item.class).data(this.renderData,function(t){return t.id}).join(function(t){return t.append(function(t){t=t.style;return new Ck({style:t})}).attr("className",Bk.item.name).on("click",function(){null!=n&&n(this),a("itemClick",{item:this})}).on("pointerenter",function(){null!=r&&r(this),a("itemMouseenter",{item:this})}).on("pointerleave",function(){null!=i&&i(this),a("itemMouseleave",{item:this})})},function(t){return t.each(function(t){t=t.style;this.update(t)})},function(t){return t.remove()})},Dk.prototype.relayoutNavigator=function(){var t=this.attributes,e=t.layout,t=t.width,n=(null==(n=this.pageViews.children[0])?void 0:n.getBBox().height)||0,r=w(this.navigatorShape,2),i=r[0],r=r[1];this.navigator.update("grid"===e?{pageWidth:t-i,pageHeight:n-r}:{})},Dk.prototype.adjustLayout=function(){var n,e=this,t=Object.entries((t=this.itemsLayout,n="page",t.reduce(function(t,e){return(t[e[n]]=t[e[n]]||[]).push(e),t},{}))).map(function(t){t=w(t,2);return{page:t[0],layouts:t[1]}}),u=m([],w(this.navigator.getContainer().children),!1);t.forEach(function(t){var t=t.layouts,c=e.pageViews.appendChild(new hl({className:Bk.page.name}));t.forEach(function(t){var n,r,i,e=t.x,a=t.y,o=t.index,s=t.width,l=t.height,o=u[o];c.appendChild(o),n=t,r=o,(i=an(t="__layout__")?t.split("."):t).forEach(function(t,e){e<i.length-1?(Ze(r[t])||(r[t]=sn(i[e+1])?[]:{}),r=r[t]):r[t]=n}),o.update({x:e,y:a,width:s,height:l})})}),this.relayoutNavigator()},Dk.prototype.renderNavigator=function(t){var e=this.attributes.orientation,n=E(this.attributes,"nav"),r=O2({orientation:e},n),i=this;return t.selectAll(Bk.navigator.class).data(["nav"]).join(function(t){return t.append(function(){return new Ak({style:r})}).attr("className",Bk.navigator.name).each(function(){i.navigator=this})},function(t){return t.each(function(){this.update(r)})},function(t){return t.remove()}),this.navigator},Dk.prototype.getBBox=function(){return this.navigator.getBBox()},Dk.prototype.render=function(t,e){var n=this.attributes.data;n&&0!==n.length&&(n=this.renderNavigator(x(e)),this.renderItems(n.getContainer()),this.adjustLayout())},Dk.prototype.dispatchCustomEvent=function(t,e){t=new Rs(t,{detail:e});this.dispatchEvent(t)},Dk);function Dk(t){t=Ik.call(this,t,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:kn,mouseenter:kn,mouseleave:kn})||this;return t.navigatorShape=[0,0],t}var zk,Gk=E2({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),Wk={showLabel:!0,formatter:function(t){return t.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},Hk=(ye(Yk,zk=Ls),Yk.prototype.render=function(t,e){var n=x(e).maybeAppendByClassName(Gk.markerGroup,"g"),n=(this.renderMarker(n),x(e).maybeAppendByClassName(Gk.labelGroup,"g"));this.renderLabel(n)},Yk.prototype.renderMarker=function(t){var r=this,e=this.attributes,n=e.orientation,e=e.markerSymbol,i=void 0===e?Tk(n,"horizontalHandle","verticalHandle"):e;j2(!!i,t,function(t){var e=E(r.attributes,"marker"),n=v({symbol:i},e);r.marker=t.maybeAppendByClassName(Gk.marker,function(){return new Ex({style:n})}).update(n)})},Yk.prototype.renderLabel=function(t){var s=this,e=this.attributes,n=e.showLabel,l=e.orientation,r=e.spacing,c=void 0===r?0:r,u=e.formatter;j2(n,t,function(t){var e=E(s.attributes,"label"),n=e.text,e=et(e,["text"]),r=(null==(r=t.select(Gk.marker.class))?void 0:r.node().getBBox())||{},i=r.width,r=r.height,r=w(Tk(l,[0,(void 0===r?0:r)+c,"center","top"],[(void 0===i?0:i)+c,0,"start","middle"]),4),i=r[0],a=r[1],o=r[2],r=r[3];t.maybeAppendByClassName(Gk.label,"text").styles(v(v({},e),{x:i,y:a,text:u(n).toString(),textAlign:o,textBaseline:r}))})},Yk);function Yk(t){return zk.call(this,t,Wk)||this}var Vk,Fl={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},qk=O2({},Fl,{}),Uk=O2({},Fl,cx(Wk,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),Xk=E2({title:"title",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),$k=(ye(Kk,Vk=Ls),Kk.prototype.renderTitle=function(t,e,n){var r=this.attributes,i=r.showTitle,r=r.titleText,a=w(ux(E(this.attributes,"title")),2),o=a[0],a=a[1],s=(this.titleGroup=t.maybeAppendByClassName(Xk.titleGroup,"g").styles(a),v(v({width:e,height:n},o),{text:i?r:""}));this.title=this.titleGroup.maybeAppendByClassName(Xk.title,function(){return new bk({style:s})}).update(s)},Kk.prototype.renderItems=function(t,e){var n=e.x,r=e.y,i=e.width,e=e.height,a=w(ux(E(this.attributes,"title",!0)),2),o=a[0],a=a[1],s=v(v({},o),{width:i,height:e,x:0,y:0}),l=(this.itemsGroup=t.maybeAppendByClassName(Xk.itemsGroup,"g").styles(v({x:n,y:r},a)),this);this.itemsGroup.selectAll(Xk.items.class).data(["items"]).join(function(t){return t.append(function(){return new Fk({style:s})}).attr("className",Xk.items.name).each(function(){l.items=x(this)})},function(t){return t.update(s)},function(t){return t.remove()})},Kk.prototype.adjustLayout=function(){var t,e;this.attributes.showTitle&&(t=(e=this.title.node().getAvailableSpace()).x,e=e.y,this.itemsGroup.node().setLocalPosition(t,e))},Object.defineProperty(Kk.prototype,"availableSpace",{get:function(){var t=this.attributes,e=t.showTitle,n=t.width,t=t.height;return e?this.title.node().getAvailableSpace():new w2(0,0,n,t)},enumerable:!1,configurable:!0}),Kk.prototype.getBBox=function(){var t,e,n,r,i,a,o,s,l,c,u=null==(u=this.title)?void 0:u.node(),h=null==(h=this.items)?void 0:h.node();return u&&h?(h=h,t=(r=(u=u).attributes).position,e=r.spacing,n=r.inset,r=r.text,u=u.getBBox(),i=h.getBBox(),t=mk(t),e=(r=w(ax(r?e:0),4))[0],a=r[1],o=r[2],r=r[3],s=(n=w(ax(n),4))[0],l=n[1],c=n[2],n=n[3],a=(r=w([r+a,e+o],2))[0],e=r[1],r=(o=w([n+l,s+c],2))[0],n=o[1],"l"===t[0]?new w2(u.x,u.y,i.width+u.width+a+r,Math.max(i.height+n,u.height)):"t"===t[0]?new w2(u.x,u.y,Math.max(i.width+r,u.width),i.height+u.height+e+n):(s=(l=w([h.attributes.width||i.width,h.attributes.height||i.height],2))[0],c=l[1],new w2(i.x,i.y,s+u.width+a+r,c+u.height+e+n))):Vk.prototype.getBBox.call(this)},Kk.prototype.render=function(t,e){var n=t.width,t=t.height,e=x(e);this.renderTitle(e,n,t),this.renderItems(e,this.availableSpace),this.adjustLayout()},Kk);function Kk(t){return Vk.call(this,t,qk)||this}var Zk,Qk={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(t){return t.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",zIndex:999},Jk=E2({background:"background",labelGroup:"label-group",label:"label"},"indicator"),tM=(ye(eM,Zk=Ls),eM.prototype.renderBackground=function(){var t,e,n,r,i,a,o;this.label&&(t=(i=this.attributes).position,o=(i=w(ax(i.padding),4))[0],e=i[1],n=i[2],i=i[3],a=(r=this.label.node().getLocalBounds()).min,r=r.max,i=[[a[0]-i,a[1]-o],[r[0]+e,r[1]+n]],a=this.getPath(t,i),o=E(this.attributes,"background"),this.background=x(this.group).maybeAppendByClassName(Jk.background,"path").styles(v(v({},o),{path:a})),this.group.appendChild(this.label.node()))},eM.prototype.renderLabel=function(){var t=this.attributes,e=t.formatter,n=t.labelText,t=w(ux(E(this.attributes,"label")),2),r=t[0],t=t[1],r=(r.text,et(r,["text"]));this.label=x(this.group).maybeAppendByClassName(Jk.labelGroup,"g").styles(t),n&&this.label.maybeAppendByClassName(Jk.label,function(){return T2(e(n))}).style("text",e(n).toString()).selectAll("text").styles(r)},eM.prototype.adjustLayout=function(){var t=w(this.point,2),e=t[0],t=t[1];this.group.attr("x",-e).attr("y",-t)},eM.prototype.getPath=function(n,t){var r=this,t=w(t,2),e=w(t[0],2),i=e[0],e=e[1],t=w(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=w(t,2),e=t[0],t=t[1];return e===o[n]?r.createCorner(t):[m(["M"],w(t[0]),!1),m(["L"],w(t[1]),!1)]});return a.push([["Z"]]),a.flat().filter(function(t,e,n){return 0===e||"M"!==t[0]})},eM.prototype.createCorner=function(t,e){void 0===e&&(e=10);var n=function(t,e){var n=(t=w(t,2))[0],t=t[1],r=(e=w(e,2))[0],e=e[1];return n!==r&&t===e}.apply(void 0,m([],w(t),!1)),t=w(t,2),r=w(t[0],2),i=r[0],r=r[1],t=w(t[1],2),a=t[0],t=t[1],a=w(n?[a-i,[i,a]]:[t-r,[r,t]],2),t=a[0],a=w(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=w([o,o+s-t,o+s,o+s+t,a],5),s=o[0],t=o[1],a=o[2],l=o[3],o=o[4];return n?(this.point=[a,r-e],[["M",s,r],["L",t,r],["L",a,r-e],["L",l,r],["L",o,r]]):(this.point=[i+e,a],[["M",i,s],["L",i,t],["L",i+e,a],["L",i,l],["L",i,o]])},eM.prototype.bindEvents=function(){this.label.on(b.BOUNDS_CHANGED,this.renderBackground)},eM.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout()},eM);function eM(t){t=Zk.call(this,t,Qk)||this;return t.point=[0,0],t.group=t.appendChild(new hl({})),t.isMutationObserved=!0,t}function nM(t,e){var t=w(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 rM=E2({trackGroup:"background-group",track:"background",selectionGroup:"ribbon-group",selection:"ribbon",clipPath:"clip-path"},"ribbon");function iM(t){var e=t.orientation,n=t.size,t=t.length;return Tk(e,[t,n],[n,t])}function aM(t){var e=t.type,t=w(iM(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 oM(t){var i,a,o,e=t.orientation,r=t.color,n=t.block,t=t.partition,s=(l=Ue(r)?new Array(20).fill(0).map(function(t,e,n){return r(e/(n.length-1))}):r).length,l=l.map(function(t){return wo(t).toString()});return s?1===s?l[0]:n?(i=t,n=e,a=Array.from(l),o=i.length,new Array(o).fill(0).reduce(function(t,e,n){var r=a[n%a.length];return t+" ".concat(i[n],":").concat(r).concat(n<o-1?" ".concat(i[n+1],":").concat(r):"")},"l(".concat("horizontal"===n?"0":"270",")"))):l.reduce(function(t,e,n){return t+" ".concat(n/(s-1),":").concat(e)},"l(".concat(Tk(e,"0","270"),")")):""}function sM(t,e){var n,r,i,a=E(e,"selection"),o=oM(e),t=t.maybeAppendByClassName(rM.selection,"path").styles(v({path:aM(e),fill:o},a)),a=t.maybeAppendByClassName(rM.clipPath,"path").styles({path:(a=(o=e).orientation,(e=o.range)?(r=(o=w(iM(o),2))[0],o=o[1],n=(e=w(e,2))[0],e=e[1],i=Tk(a,n*r,0),n=Tk(a,0,n*o),r=Tk(a,e*r,r),[["M",i,n],["L",i,i=Tk(a,o,e*o)],["L",r,i],["L",r,n],["Z"]]):[])}).node();t.style("clip-path",a)}ye(uM,lM=Ls),uM.prototype.render=function(t,e){var n,r,i=x(e).maybeAppendByClassName(rM.trackGroup,"g");i=i,r=E(n=t,"track"),i.maybeAppendByClassName(rM.track,"path").styles(v({path:aM(n)},r)),sM(x(e).maybeAppendByClassName(rM.selectionGroup,"g"),t)};var lM,cM=uM;function uM(t){return lM.call(this,t,{type:"color",orientation:"horizontal",size:30,range:[0,1],length:200,block:!1,partition:[],color:["#fff","#000"],trackFill:"#e5e5e5"})||this}var hM,fM,dM,pM,gM=bn(function(t){return{min:Math.min.apply(Math,m([],w(t.map(function(t){return t.value})),!1)),max:Math.max.apply(Math,m([],w(t.map(function(t){return t.value})),!1))}},function(t){return t.map(function(t){return t.id})}),mM=(ye(c,hM=Ls),Object.defineProperty(c.prototype,"handleOffsetRatio",{get:function(){return this.ifHorizontal(.7,.9)},enumerable:!1,configurable:!0}),c.prototype.getBBox=function(){var t=this.attributes,e=t.width,t=t.height;return new w2(0,0,e,t)},c.prototype.render=function(t,e){var n=this,t=t.showLabel,r=(this.renderTitle(x(e)),this.availableSpace),i=r.x,r=r.y,e=x(e).maybeAppendByClassName(Xk.contentGroup,"g").styles({x:i,y:r}),i=(j2(!!t,e.maybeAppendByClassName(Xk.labelGroup,"g").styles({zIndex:1}),function(t){n.renderLabel(t)}),e.maybeAppendByClassName(Xk.ribbonGroup,"g").styles({zIndex:0}));this.handlesGroup=e.maybeAppendByClassName(Xk.handlesGroup,"g").styles({zIndex:2}),this.renderHandles(),this.renderRibbon(i),this.renderIndicator(e),this.adjustLabel(),this.adjustHandles()},Object.defineProperty(c.prototype,"range",{get:function(){var t=this.attributes.data;return gM(t)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ribbonScale",{get:function(){var t=this.range,e=t.min,t=t.max;return this.innerRibbonScale.update({domain:[e,t],range:[0,1]}),this.innerRibbonScale},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ribbonRange",{get:function(){var t=w(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(c.prototype,"selection",{get:function(){var t=this.range,e=t.min,t=t.max,n=this.attributes.defaultValue,e=w(void 0===n?[e,t]:n,2);return[e[0],e[1]]},enumerable:!1,configurable:!0}),c.prototype.ifHorizontal=function(t,e){return Tk(this.attributes.orientation,"function"==typeof t?t():t,"function"==typeof e?e():e)},c.prototype.renderTitle=function(t){var e=this.attributes,n=e.showTitle,r=e.titleText,i=e.width,e=e.height,a=E(this.attributes,"title"),o=v(v({},a),{width:i,height:e,text:r}),s=this;t.selectAll(Xk.title.class).data(n?[r]:[]).join(function(t){return t.append(function(){return new bk({style:o})}).attr("className",Xk.title.name).each(function(){s.title=this})},function(t){return t.update(o)},function(t){return t.each(function(){s.title=void 0}).remove()})},Object.defineProperty(c.prototype,"availableSpace",{get:function(){var t,e;return this.title?this.title.getAvailableSpace():(t=(e=this.attributes).width,e=e.height,new w2(0,0,t,e))},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"labelFixedSpacing",{get:function(){return this.attributes.showTick?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"labelPosition",{get:function(){var t=this.attributes,e=t.orientation,t=t.labelDirection;return{vertical:{positive:"right",negative:"left"},horizontal:{positive:"bottom",negative:"top"}}[e][t]},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"labelBBox",{get:function(){var t,e;return this.attributes.showLabel?(this.cacheLabelBBox||(t=(e=(null==(e=this.label.querySelector(xw.labelGroup.class))?void 0:e.children.slice(-1)[0]).getBBox()).width,e=e.height,this.cacheLabelBBox=new w2(0,0,t,e)),this.cacheLabelBBox):new w2(0,0,0,0)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"labelShape",{get:function(){var t,e=this.attributes,n=e.showLabel,e=e.labelSpacing,e=void 0===e?0:e;return n?{width:t=(n=this.labelBBox).width,height:n=n.height,size:this.ifHorizontal(n,t)+e+this.labelFixedSpacing,length:this.ifHorizontal(t,n)}:{width:0,height:0,size:0,length:0}},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ribbonBBox",{get:function(){var t=this.attributes.showHandle,e=this.availableSpace,n=e.width,e=e.height,r=this.labelShape,i=r.size,r=r.length,n=w(this.ifHorizontal([e,n],[n,e]),2),e=n[0],n=n[1],t=t?this.handleShape:{size:0,length:0},a=t.size,t=t.length,o=this.handleOffsetRatio,s=0,l=this.labelPosition,s=["bottom","right"].includes(l)?Math.min(e-i,(e-a)/o):a<e*(1-o)?Math.max(e-i,0):Math.max((e-i-a)/o,0),e=Math.max(t,r),a=n-e,o=w(this.ifHorizontal([a,s],[s,a]),2),t=o[0],r=o[1],n=["top","left"].includes(l)?i:0,s=w(this.ifHorizontal([e/2,n],[n,e/2]),2),a=s[0],o=s[1];return new w2(a,o,t,r)},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"ribbonShape",{get:function(){var t=this.ribbonBBox,e=t.width,t=t.height;return this.ifHorizontal({size:t,length:e},{size:e,length:t})},enumerable:!1,configurable:!0}),c.prototype.renderRibbon=function(t){var e=this.attributes,n=e.data,r=e.type,i=e.orientation,a=e.color,e=e.block,o=E(this.attributes,"ribbon"),s=this.range,l=s.min,c=s.max,s=this.ribbonBBox,u=s.x,s=s.y,h=this.ribbonShape,f=h.length,h=h.size,d=O2({x:u,y:s,length:f,size:h,type:r,orientation:i,color:a,block:e,partition:n.map(function(t){return(t.value-l)/(c-l)}),range:this.ribbonRange},o);this.ribbon=t.maybeAppendByClassName(Xk.ribbon,function(){return new cM({style:d})}).update(d)},c.prototype.getHandleClassName=function(t){return"".concat(Xk.prefix("".concat(t,"-handle")))},c.prototype.renderHandles=function(){var t=this.attributes,e=t.showHandle,t=t.orientation,n=E(this.attributes,"handle"),r=w(this.selection,2),i=r[0],r=r[1],a=v(v({},n),{orientation:t}),o=this;this.handlesGroup.selectAll(Xk.handle.class).data(e?[{value:i,type:"start"},{value:r,type:"end"}]:[],function(t){return t.type}).join(function(t){return t.append(function(){return new Hk({style:a})}).attr("className",function(t){t=t.type;return"".concat(Xk.handle," ").concat(o.getHandleClassName(t))}).each(function(t){var e=t.type,t=t.value,t=(this.update({labelText:t}),"".concat(e,"Handle"));(o[t]=this).addEventListener("pointerdown",o.onDragStart(e))})},function(t){return t.update(a).each(function(t){t=t.value;this.update({labelText:t})})},function(t){return t.each(function(t){t=t.type,t="".concat(t,"Handle");o[t]=void 0}).remove()})},c.prototype.adjustHandles=function(){var t=w(this.selection,2),e=t[0],t=t[1];this.setHandlePosition("start",e),this.setHandlePosition("end",t)},Object.defineProperty(c.prototype,"handleBBox",{get:function(){if(!this.cacheHandleBBox){if(!this.attributes.showHandle)return new w2(0,0,0,0);var t=this.startHandle.getBBox(),e=t.width,t=t.height,n=this.endHandle.getBBox(),r=n.width,n=n.height,e=w([Math.max(e,r),Math.max(t,n)],2),r=e[0],t=e[1];this.cacheHandleBBox=new w2(0,0,r,t)}return this.cacheHandleBBox},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"handleShape",{get:function(){var t=this.handleBBox,e=t.width,t=t.height,n=w(this.ifHorizontal([t,e],[e,t]),2);return{width:e,height:t,size:n[0],length:n[1]}},enumerable:!1,configurable:!0}),c.prototype.setHandlePosition=function(t,e){var n=this.attributes.handleFormatter,r=this.ribbonBBox,i=r.x,r=r.y,a=this.ribbonShape.size,e=this.getOffset(e),i=w(this.ifHorizontal([i+e,r+a*this.handleOffsetRatio],[i+a*this.handleOffsetRatio,r+e]),2),a=i[0],r=i[1],e=this.handlesGroup.select(".".concat(this.getHandleClassName(t))).node();null!=e&&e.update({x:a,y:r,formatter:n})},c.prototype.renderIndicator=function(t){var e=E(this.attributes,"indicator");this.indicator=t.maybeAppendByClassName(Xk.indicator,function(){return new tM({})}).update(e)},Object.defineProperty(c.prototype,"labelData",{get:function(){var s=this;return this.attributes.data.reduce(function(t,e,n,r){var i,a,o=null!=(o=null==e?void 0:e.id)?o:n.toString();return t.push(v(v({},e),{id:o,index:n,type:"value",label:null!=(i=null==e?void 0:e.label)?i:e.value.toString(),value:s.ribbonScale.map(e.value)})),n<r.length-1&&(i=r[n+1],a=((i=(r=w([e.value,i.value],2))[0])+(r=r[1]))/2,t.push(v(v({},e),{id:o,index:n,type:"range",range:[i,r],label:[i,r].join("~"),value:s.ribbonScale.map(a)}))),t},[])},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"labelStyle",{get:function(){var t=w(["center","middle"],2),e=t[0],t=t[1],n=this.labelPosition;return"top"===n?t="bottom":"bottom"===n?t="top":"left"===n?e="end":"right"===n&&(e="start"),{labelTextAlign:e,labelTextBaseline:t}},enumerable:!1,configurable:!0}),c.prototype.renderLabel=function(t){var e=this.attributes,n=e.showTick,n=void 0!==n&&n,r=e.labelFilter,e=e.labelFormatter,i=E(this.attributes,"label"),a=i.align,o=E(i,"tick"),i=E(i,"tick",!0),n=O2(v({showLine:!1,showGrid:!1,showTick:n,type:"linear",startPos:[0,0],endPos:[0,0],tickDirection:"negative",labelTransform:"rotate(0)"},this.labelStyle),cx(o,"tick"),cx(i,"label"),{data:this.labelData}),o={tickFilter:function(t,e,n){return"value"===(null==t?void 0:t.type)&&(!r||r(t,t.index,n.filter(function(t){return"value"!==t.type})))},labelFilter:function(t,e,n){return(null==t?void 0:t.type)===a&&(!r||r(t,t.index,n.filter(function(t){return t.type===a})))},labelFormatter:e},s=v(v({},n),o);this.label=t.maybeAppendByClassName(Xk.label,function(){return new Ek({style:s})}).node(),this.label.update(s,!1)},Object.defineProperty(c.prototype,"labelAxisStyle",{get:function(){var t=this.attributes,e=t.showTick,n=t.labelDirection,t=t.labelSpacing,r=this.ribbonShape.size,i=this.labelPosition,a=this.labelFixedSpacing,o=w([0,0,0],3),s=o[0],l=o[1],o=o[2],c=r+t;return e?(o=c,l=a,"positive"===n?"right"===i?o=s=c:"bottom"===i&&(s=o):"negative"!==n||"top"!==i&&"left"!==i||(s=r)):"positive"===n?"right"===i?l=c:"bottom"===i&&(s=r+a,l=t):"negative"!==n||"left"!==i&&"top"!==i||(l=t),{offset:s,spacing:l,tickLength:o}},enumerable:!1,configurable:!0}),c.prototype.adjustLabel=function(){var t,e,n,r,i,a,o;this.attributes.showLabel&&(o=(a=this.ribbonBBox).x,t=a.y,i=a.width,a=a.height,e=(r=this.labelAxisStyle).offset,n=r.spacing,r=r.tickLength,a=(i=w(this.ifHorizontal([[o,t+e],[o+i,t+e]],[[o+e,t+a],[o+e,t]]),2))[0],o=i[1],this.label.update({startPos:a,endPos:o,tickLength:r,labelSpacing:n},!1))},c.prototype.bindEvents=function(){this.ribbon.on("pointerdown",this.onDragStart("ribbon")),this.ribbon.on("pointermove",this.onHovering),this.addEventListener("pointerout",this.hideIndicator)},c.prototype.showIndicator=function(t,e){var n,r,i,a;void 0===e&&(e="".concat(t)),this.attributes.showIndicator&&"number"==typeof t?(i=(a=this.range).min,a=a.max,n=(r=this.ribbonBBox).x,r=r.y,t=on(t,i,a),i=this.getOffset(t),a=this.ifHorizontal([i+n,r],[n,i+r]),this.indicator.update({x:a[0],y:a[1],position:this.ifHorizontal("top","left"),labelText:e}),c2(this.indicator.node())):this.hideIndicator()},c.prototype.hideIndicator=function(){u2(this.indicator.node())},c.prototype.updateMouse=function(){this.attributes.slidable&&(this.style.cursor="grabbing")},c.prototype.setSelection=function(t,e){this.updateSelection(t,e)},c.prototype.updateSelection=function(t,e,n){void 0===n&&(n=!1);var r,i,a,o,s,l=w(this.selection,2),c=l[0],l=l[1],t=w([t,e],2),e=t[0],t=t[1],n=(n&&(e+=c,t+=l),this.range),c=n.min,l=n.max,u=w((n=[c,l],c=[e,t],l=this.selection,void 0===r&&(r=4),i=(n=w(n,2))[0],n=n[1],a=(c=w(c,2))[0],c=c[1],o=(l=w(l,2))[0],l=l[1],c=(a=w([a,c],2))[0],s=(a=a[1])-c,a<c&&(c=(u=w([a,c],2))[0],a=u[1]),n-i<s?[i,n]:c<i?o===i&&l===a?[i,a]:[i,s+i]:n<a?l===n&&o===c?[c,n]:[n-s,n]:[X2(c,r),X2(a,r)]),2),e=u[0],t=u[1];this.update({defaultValue:[e,t]}),this.dispatchSelection()},Object.defineProperty(c.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 dn(t)?X2(.01*(e-n),0):t},enumerable:!1,configurable:!0}),c.prototype.getTickValue=function(t){var e=this.attributes,n=e.data,e=e.block,r=this.range.min;return e?nM(n.map(function(t){return t.value}),t).tick:(e=this.step,r+Math.round((t-r)/e)*e)},c.prototype.getValueByCanvasPoint=function(t,e){var n=this.range,r=n.min,n=n.max,i=w(this.ribbon.node().getPosition(),2),a=i[0],i=i[1],a=this.ifHorizontal(a,i),i=this.ifHorizontal.apply(this,m([],w(P2(t)),!1));return on(this.getOffset(i-a,!0),r,n)},c.prototype.getOffset=function(t,e){void 0===e&&(e=!1);var n=this.range,r=n.min,n=n.max,i=this.ribbonShape.length,a=this.eventToOffsetScale;return a.update({domain:[r,n],range:[0,i]}),e?a.invert(t):a.map(t)},c.prototype.dispatchSelection=function(){var t=new Rs("valuechange",{detail:{value:this.selection}});this.dispatchEvent(t)},c.prototype.dispatchIndicated=function(t,e){t=new Rs("indicate",{detail:{value:t,range:e}});this.dispatchEvent(t)},c);function c(t){var a=hM.call(this,t,Uk)||this;return a.eventToOffsetScale=new p1({}),a.innerRibbonScale=new p1({}),a.cacheLabelBBox=null,a.cacheHandleBBox=null,a.onHovering=function(t){var e=a.attributes,n=e.data,e=e.block,t=(t.stopPropagation(),a.getValueByCanvasPoint(t));e?(e=nM(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(),w(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 yM(t){fM||(fM=document.createElement("table"),pM=document.createElement("tr"),dM=/^\s*<(\w+|!)[^>]*>/,pM={tr:document.createElement("tbody"),tbody:fM,thead:fM,tfoot:fM,td:pM,th:pM,"*":document.createElement("div")});var e=dM.test(t)&&RegExp.$1,e=(e&&e in pM||(e="*"),pM[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 vM,bM,xM,wM="tooltip",kM="tooltip-title",MM="tooltip-list",EM="tooltip-list-item",OM="tooltip-list-item-name",SM="tooltip-list-item-marker",_M="tooltip-list-item-name-label",AM="tooltip-list-item-value",ql="tooltip-crosshair-x",ec="tooltip-crosshair-y",Kl={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"},PM=((r={})[".".concat(wM)]={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"},r[".".concat(kM)]={color:"rgba(0, 0, 0, 0.45)"},r[".".concat(MM)]={margin:"0px","list-style-type":"none",padding:"0px"},r[".".concat(EM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},r[".".concat(SM)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},r[".".concat(OM)]={display:"flex","align-items":"center","max-width":"216px"},r[".".concat(_M)]=v({flex:1},Kl),r[".".concat(AM)]=v({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},Kl),r[".".concat(ql)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r[".".concat(ec)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},r),TM=(ye(LM,vM=Ls),Object.defineProperty(LM.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),LM.prototype.getContainer=function(){return this.element},Object.defineProperty(LM.prototype,"position",{set:function(t){var t=w(t,2),e=t[0],t=t[1];this.attributes.x=e,this.attributes.y=t,this.updatePosition()},enumerable:!1,configurable:!0}),Object.defineProperty(LM.prototype,"elementSize",{get:function(){return{width:this.element.offsetWidth,height:this.element.offsetHeight}},enumerable:!1,configurable:!0}),Object.defineProperty(LM.prototype,"HTMLTooltipItemsElements",{get:function(){var t=this.attributes,e=t.data,o=t.template;return e.map(function(t,e){var n,r=t.name,r=void 0===r?"":r,i=t.color,i=void 0===i?"black":i,a=t.index,t=et(t,["name","color","index"]),r=v({name:r,color:i,index:null!=a?a:e},t);return yM((i=o.item,n=r,i&&n?i.replace(/\\?\{([^{}]+)\}/g,function(t,e){return"\\"===t.charAt(0)?t.slice(1):void 0===n[e]?"":n[e]}):i))})},enumerable:!1,configurable:!0}),LM.prototype.render=function(t,e){this.renderHTMLTooltipElement(),this.updatePosition()},LM.prototype.destroy=function(){var t;null!=(t=this.element)&&t.remove(),vM.prototype.destroy.call(this)},LM.prototype.show=function(t,e){var n,r=this;void 0!==t&&void 0!==e&&(n=this.element.style.transition,this.element.style.transition="none",this.position=[null!=t?t:+this.attributes.x,null!=e?e:+this.attributes.y],setTimeout(function(){r.element.style.transition=n},10)),this.element.style.visibility="visible"},LM.prototype.hide=function(){this.element.style.visibility="hidden"},LM.prototype.initShape=function(){var t=this.attributes.template;this.element=yM(t.container),this.id&&this.element.setAttribute("id",this.id)},LM.prototype.renderCustomContent=function(){var t;(void 0===this.prevCustomContentKey||this.prevCustomContentKey!==this.attributes.contentKey)&&(this.prevCustomContentKey=this.attributes.contentKey,t=this.attributes.content)&&("string"==typeof t?this.element.innerHTML=t:this.element.replaceChildren(t))},LM.prototype.renderHTMLTooltipElement=function(){var r,t=this.attributes,e=t.template,n=t.title,i=t.enterable,a=t.style,t=t.content,o=this.element;this.element.style.pointerEvents=i?"auto":"none",t?this.renderCustomContent():(n?(o.innerHTML=e.title,o.getElementsByClassName(kM)[0].innerHTML=n):null!=(t=null==(i=o.getElementsByClassName(kM))?void 0:i[0])&&t.remove(),e=this.HTMLTooltipItemsElements,(n=document.createElement("ul")).className=MM,n.replaceChildren.apply(n,m([],w(e),!1)),(i=this.element.querySelector(".".concat(MM)))?i.replaceWith(n):o.appendChild(n)),r=o,Object.entries(a).forEach(function(t){var t=w(t,2),e=t[0],n=t[1];m([r],w(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(":"),";")},""))})})},LM.prototype.getRelativeOffsetFromCursor=function(t){var e=this.attributes,n=e.position,i=e.offset,e=t||n,t=("auto"===e?"bottom-right":e).split("-"),a={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},n=this.elementSize,o=n.width,s=n.height,l=[-o/2,-s/2];return t.forEach(function(t){var e=w(l,2),n=e[0],e=e[1],t=w(a[t],2),r=t[0],t=t[1];l=[n+(o/2+i[0])*r,e+(s/2+i[1])*t]}),l},LM.prototype.setOffsetPosition=function(t){var t=w(t,2),e=t[0],t=t[1],n=this.attributes,r=n.x,i=n.y,i=void 0===i?0:i,n=n.container,a=n.x,n=n.y;this.element.style.left="".concat(+(void 0===r?0:r)+a+e,"px"),this.element.style.top="".concat(+i+n+t,"px")},LM.prototype.updatePosition=function(){this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor()))},LM.prototype.autoPosition=function(t){var e,n,r,i,t=w(t,2),a=t[0],t=t[1],o=this.attributes,s=o.x,l=o.y,c=o.bounding,u=o.position,o=o.defaultPosition;return"auto"!==u?[a,t]:(e=(u=this.element).offsetWidth,u=u.offsetHeight,a=(s=w([+s+a,+l+t],2))[0],l=s[1],n={left:"right",right:"left",top:"bottom",bottom:"top"},t=c.x,s=c.y,r={left:a<t,right:t+c.width<a+e,top:l<s,bottom:s+c.height<l+u},i=[],o.split("-").forEach(function(t){i.push(r[t]?n[t]:t)}),t=i.join("-"),this.getRelativeOffsetFromCursor(t))},LM.tag="tooltip",t([(void 0===(bM=100)&&(bM=0),void 0===(xM=!0)&&(xM=!1),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,xM&&i.apply(t,e),r=window.setTimeout(function(){i.apply(t,e),r=null},bM))})})],LM.prototype,"updatePosition",null),LM);function LM(t){t=vM.call(this,t,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",defaultPosition:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:{x:0,y:0,width:0,height:0},template:{container:'<div class="'.concat(wM,'"></div>'),title:'<div class="'.concat(kM,'"></div>'),item:'<li class="'.concat(EM,'" data-index={index}>\n <span class="').concat(OM,'">\n <span class="').concat(SM,'" style="background:{color}"></span>\n <span class="').concat(_M,'" title="{name}">{name}</span>\n </span>\n <span class="').concat(AM,'" title="{value}">{value}</span>\n </li>')},style:PM})||this;return t.prevCustomContentKey=t.attributes.contentKey,t.initShape(),t.render(t.attributes,t),t}var NM,CM={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 jM(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 RM(t){return NM.call(this,t,{x:0,y:0,size:"default",spacing:2,checked:!0,disabled:!1})||this}ye(RM,NM=Ls),RM.prototype.render=function(t,e){var i=this,n=t.size,a=t.spacing,r=t.disabled,o=t.checked,s=t.unCheckedChildren,t=t.checkedChildren,e=(this.attributes,x(e).maybeAppendByClassName("switch-content","g").node()),l=e.getLocalBounds(),n=En(CM,n,CM.default),c=n.sizeStyle,u=n.tagStyle,h=r?"no-drop":"pointer",n=o?"#1890FF":"#00000040",f=c,d=o?t:s,p=((t||s)&&x(e).maybeAppendByClassName("switch-tag",function(){return new _x({})}).call(function(t){var e,t=t.node(),n=(t.update(v(v({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]+c.radius,r=r[1]-n[1],n=Math.max(i+c.height+2,c.width);f=v(v({},c),{width:n}),t.update((t={x:l.min[0],y:l.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}))}),x(e).maybeAppendByClassName("switch-background","rect").styles(v({zIndex:(e.style.zIndex||0)-1,x:l.min[0],y:l.min[1],fill:n,cursor:h,fillOpacity:r?.4:1},f)).node()),g=x(e).maybeAppendByClassName("switch-background-stroke","rect").styles(v({zIndex:(e.style.zIndex||0)-2,x:l.min[0],y:l.min[1],stroke:n,lineWidth:0},f)).node();x(e).maybeAppendByClassName("switch-handle","rect").styles({fill:"#fff",cursor:h}).call(function(t){var e,t=t.node(),n=jM(p,a,o),r=jM(p,a,!o);t.attr("x")&&!Mn(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},RM.tag="switch";var IM,BM,FM,DM,zM={tagText:"",lineStroke:"#416180",lineStrokeOpacity:.45,lineLineWidth:1,lineLineDash:[5,5]},zl=O2({},zM,{type:"line",tagPosition:"start",tagAlign:"center",tagVerticalAlign:"bottom"}),bs=O2({},zM,{type:"circle",defaultRadius:0}),Rl=O2({},zM,{type:"polygon",defaultRadius:0,startAngle:0}),vs=(ye(GM,IM=Ls),Object.defineProperty(GM.prototype,"localPointer",{get:function(){var t=w(this.getPosition(),2),e=t[0],t=t[1],n=w(this.pointer,2);return[n[0]-e,n[1]-t]},enumerable:!1,configurable:!0}),Object.defineProperty(GM.prototype,"tagStyle",{get:function(){return E(this.attributes,"tag")},enumerable:!1,configurable:!0}),Object.defineProperty(GM.prototype,"crosshairStyle",{get:function(){var t=E(this.attributes,"line");return v(v({},t),{path:this.crosshairPath})},enumerable:!1,configurable:!0}),GM.prototype.render=function(t,e){var e=x(e).maybeAppendByClassName(".crosshair-group","g").node(),n=(this.shapesGroup=e,this.tagStyle),r=this.crosshairStyle;this.tagShape=x(e).maybeAppendByClassName("crosshair-tag",function(){return new _x({style:n})}).styles(n).node(),this.crosshairShape=x(e).maybeAppendByClassName(".crosshair-path","path").styles(r).node(),this.adjustLayout()},GM.prototype.setPointer=function(t){this.pointer=t},GM.tag="crosshair-base",GM);function GM(t){return IM.call(this,t,zM)||this}function WM(t){return BM.call(this,O2({},WM.defaultOptions,t))||this}function HM(t){return FM.call(this,O2({},HM.defaultOptions,t))||this}function YM(t){return DM.call(this,O2({},YM.defaultOptions,t))||this}ye(WM,BM=vs),Object.defineProperty(WM.prototype,"crosshairPath",{get:function(){var t=this.attributes,e=w(t.startPos,2),n=e[0],e=e[1],t=w(t.endPos,2);return[["M",0,0],["L",t[0]-n,t[1]-e],["Z"]]},enumerable:!1,configurable:!0}),Object.defineProperty(WM.prototype,"localPointer",{get:function(){var t,e,n;return this.pointer?(t=(e=w(this.getPosition(),2))[0],e=e[1],[(n=w(this.pointer,2))[0]-t,n[1]-e]):this.attributes.startPos},enumerable:!1,configurable:!0}),Object.defineProperty(WM.prototype,"isVertical",{get:function(){var t=this.attributes,e=w(t.startPos,2),n=e[0],e=e[1],t=w(t.endPos,2),r=t[0],t=t[1];return n===r&&e!==t},enumerable:!1,configurable:!0}),Object.defineProperty(WM.prototype,"tagShapeSpace",{get:function(){var t,e=(t=(t=this.tagShape)&&t.getRenderBounds())?(e=t.getMax(),t=t.getMin(),{width:e[0]-t[0],height:e[1]-t[1]}):{width:0,height:0};return{width:e.width,height:e.height}},enumerable:!1,configurable:!0}),WM.prototype.update=function(t){BM.prototype.update.call(this,t)},WM.prototype.setPointer=function(t){BM.prototype.setPointer.call(this,t),this.adjustPosition()},WM.prototype.setText=function(t){this.tagShape.update({text:t}),this.adjustTag()},WM.prototype.adjustLayout=function(){this.adjustPosition(),this.adjustTag()},WM.prototype.adjustPosition=function(){var t=w(this.localPointer,2),e=t[0],t=t[1],n=w(this.attributes.startPos,2),r=n[0],n=n[1],r=this.getOrientVal([r,t],[e,n]);this.shapesGroup.setLocalPosition(r)},WM.prototype.adjustTag=function(){var t,e=this.attributes,n=e.tagText,r=e.tagPosition,i=w(e.startPos,2),a=i[0],i=i[1],e=w(e.endPos,2),o=e[0],e=e[1];n&&""!==n?(c2(this.tagShape),t=(n=this.tagShapeSpace).width,n=n.height,a=(o=w(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)):u2(this.tagShape)},WM.prototype.getOrientVal=function(t,e){return this.isVertical?e:t},WM.tag="line-crosshair",WM.defaultOptions={style:zl},ye(HM,FM=vs),Object.defineProperty(HM.prototype,"crosshairPath",{get:function(){return this.createCirclePath()},enumerable:!1,configurable:!0}),HM.prototype.update=function(t){FM.prototype.update.call(this,t)},HM.prototype.setPointer=function(t){var t=w(t,2),e=t[0],t=t[1],e=(FM.prototype.setPointer.call(this,[e,t]),w(this.localPointer,2)),t=e[0],e=e[1],n=w(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})},HM.prototype.adjustLayout=function(){u2(this.tagShape)},HM.prototype.createCirclePath=function(t){var e=this.attributes,n=w(e.center,2),r=n[0],n=n[1],e=e.defaultRadius;return bx(r,n,t||e)},HM.tag="circle-crosshair",HM.defaultOptions={style:bs},ye(YM,DM=vs),Object.defineProperty(YM.prototype,"crosshairPath",{get:function(){return this.createPolygonPath()},enumerable:!1,configurable:!0}),YM.prototype.update=function(t){DM.prototype.update.call(this,t)},Object.defineProperty(YM.prototype,"points",{get:function(){for(var t,e,n,r,i,a,o=this.attributes,s=o.startAngle,l=o.sides,c=2*Math.PI/l,u=[1,0],h=[],f=0;f<l;f+=1)h.push((t=u,e=[0,0],n=s/180*Math.PI+c*f,a=r=i=r=void 0,r=(t=w(t,2))[0],t=t[1],i=(e=w(e,2))[0],e=e[1],r-=i,t-=e,a=Math.sin(n),n=Math.cos(n),[r*n-t*a+i,r*a+t*n+e]));return h},enumerable:!1,configurable:!0}),YM.prototype.setPointer=function(t){var t=w(t,2),e=t[0],t=t[1],e=(DM.prototype.setPointer.call(this,[e,t]),w(this.localPointer,2)),t=e[0],e=e[1],n=this.attributes.center,r=w(this.intersection([t,e]),2),i=r[0],r=r[1];i&&r&&(t=C2(n,[t,e])/C2(n,[i,r]),e=this.createPolygonPath(t),this.crosshairShape.attr({path:e}))},YM.prototype.adjustLayout=function(){u2(this.tagShape)},YM.prototype.createPolygonPath=function(r){var t=this.attributes,i=t.defaultRadius,t=w(t.center,2),a=t[0],o=t[1],t=this.points.map(function(t,e){var t=w(t,2),t=w(G2([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},YM.prototype.intersection=function(t){for(var e,n,r,i,a,o,s,l,t=w(t,2),c=t[0],u=t[1],h=this.points,t=w(this.attributes.center,2),f=t[0],d=t[1],p=1;p<=h.length;p+=1){var g=w(h[p-1],2),m=g[0],g=g[1],y=w(h[p%h.length],2),v=y[0],y=y[1],m=(i=[f,d],m=[m+f,g+d],g=[v+f,y+d],l=s=o=a=y=v=void 0,y=(r=w(r=[c,u],2))[0],r=r[1],a=(i=w(i,2))[0],i=i[1],o=(m=w(m,2))[0],m=m[1],s=(g=w(g,2))[0],g=g[1],l=[],(g-m)*(a-y)==(i-r)*(s-o)?(i-r)*(o-y)==(m-r)*(a-y)&&(L2(y,a,r,i,o,m)&&N2(l,o,m),L2(y,a,r,i,s,g)&&N2(l,s,g),L2(o,s,m,g,y,r)&&N2(l,y,r),L2(o,s,m,g,a,i))&&N2(l,a,i):(v=(y*(i-r)+m*(a-y)-r*(a-y)-o*(i-r))/((s-o)*(i-r)-(a-y)*(g-m)),0<=(g=(o*(g-m)+r*(s-o)-m*(s-o)-y*(g-m))/((a-y)*(g-m)-(s-o)*(i-r)))&&g<=1&&0<=v&&v<=1&&(l[0]=y+g*(a-y),l[1]=r+g*(i-r))),l);0!==m.length&&(e=(s=w(m,2))[0],n=s[1])}return[e,n]},YM.tag="polygon-crosshair",YM.defaultOptions={style:Rl};var VM,qM=cx({fill:"rgba(0,0,0,0.45)",fontSize:10,textAlign:"start",textBaseline:"middle",overflow:"clip"},"label"),UM={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"}},XM={path:[["M",3,6],["L","5","8.5"],["L","8.5","4"]],lineWidth:1,cursor:"pointer"};function $M(t){return VM.call(this,t,v({x:0,y:0,labelText:"",spacing:4,checked:!1},qM))||this}ye($M,VM=Ls),$M.prototype.render=function(t,e){var n=t.checked,r=t.spacing,n=(this.checked=!!n,ix(e,".checkbox-content","g").attr("className","checkbox-content").node()),e=E(t,"box"),i=E(t,"checked"),t=E(t,"label"),e=v(v({},this.checked?UM.selected:UM.default),e),i=v(v({},XM),i),i=(this.checkboxBoxShape=ix(n,".checkbox-box","rect").styles(v({className:"checkbox-box",zIndex:(n.style.zIndex||0)-1},e)).node(),ix(this.checkboxBoxShape,".checkbox-checked","path").styles(v({className:"checkbox-box-checked",stroke:"#fff"},i)),e=this.checkboxBoxShape,i=Number(r),{x:(r=e.getLocalBounds()).halfExtents[0]?r.max[0]+(i||0):e.style.x,y:r.halfExtents[1]?(r.min[1]+r.max[1])/2:e.style.y}),r=i.x,e=i.y;ix(n,".checkbox-label","text").styles(v({className:"checkbox-label",x:r,y:e},t))},$M.tag="checkbox";var KM="gui-poptip",ZM="gui-poptip-arrow",QM="gui-poptip-text",JM=((s={})[".".concat(KM)]={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"},s[".".concat(QM)]={"text-align":"center"},s[".".concat(KM,"[data-position='top']")]={transform:"translate(-50%, -100%)"},s[".".concat(KM,"[data-position='left']")]={transform:"translate(-100%, -50%)"},s[".".concat(KM,"[data-position='right']")]={transform:"translate(0, -50%)"},s[".".concat(KM,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},s[".".concat(KM,"[data-position='top-left']")]={transform:"translate(0,-100%)"},s[".".concat(KM,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},s[".".concat(KM,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},s[".".concat(KM,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},s[".".concat(KM,"[data-position='right-top']")]={transform:"translate(0, 0)"},s[".".concat(KM,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},s[".".concat(KM,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},s[".".concat(KM,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},s[".".concat(ZM)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},s[".".concat(KM,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},s["[data-position='top'] .".concat(ZM)]={bottom:"-2px"},s[".".concat(KM,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},s["[data-position='left'] .".concat(ZM)]={right:"-2px"},s[".".concat(KM,"[data-position='right']")]={transform:"translate(5px, -50%)"},s["[data-position='right'] .".concat(ZM)]={left:"-2px"},s[".".concat(KM,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},s["[data-position='bottom'] .".concat(ZM)]={top:"-2px"},s[".".concat(KM,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},s["[data-position='top-left'] .".concat(ZM)]={left:"10px",bottom:"-2px"},s[".".concat(KM,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},s["[data-position='top-right'] .".concat(ZM)]={right:"10px",bottom:"-2px"},s[".".concat(KM,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},s["[data-position='left-top'] .".concat(ZM)]={right:"-2px",top:"8px"},s[".".concat(KM,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},s["[data-position='left-bottom'] .".concat(ZM)]={right:"-2px",bottom:"8px"},s[".".concat(KM,"[data-position='right-top']")]={transform:"translate(5px, 0)"},s["[data-position='right-top'] .".concat(ZM)]={left:"-2px",top:"8px"},s[".".concat(KM,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},s["[data-position='right-bottom'] .".concat(ZM)]={left:"-2px",bottom:"8px"},s[".".concat(KM,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},s["[data-position='bottom-left'] .".concat(ZM)]={top:"-2px",left:"8px"},s[".".concat(KM,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},s["[data-position='bottom-right'] .".concat(ZM)]={top:"-2px",right:"8px"},s),tE=void 0;var eE;function nE(t){var e=t&&document.getElementById(t);return e||((e=document.createElement("div")).setAttribute("id",t),document.body.appendChild(e)),e}function rE(t){var n,r;return n=nE,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return r=r||n.apply(tE,t)}(t)}function iE(t){t=eE.call(this,nt({style:{id:"gui-poptip"}},iE.defaultOptions,t))||this;return t.visibility="visible",t.map=new Map,t.domStyles="",t.initShape(),t.render(t.attributes,t),t}ye(iE,eE=Ls),Object.defineProperty(iE.prototype,"visible",{get:function(){return"visible"===this.visibility},enumerable:!1,configurable:!0}),iE.prototype.render=function(t,e){this.visibility=this.style.visibility,this.updatePoptipElement()},iE.prototype.update=function(t){this.attr(nt({},this.style,t)),this.render(this.attributes,this)},iE.prototype.bind=function(u,h){var f,t,e,d=this;u&&(f=this.style.text,e=function(){d.hideTip()},u.addEventListener("mousemove",t=function(t){var e,n,r=u,i=d.style,a=f,o=(h&&(n=(s="function"==typeof h?h.call(null,t):h).html,e=s.target,s=et(s,["html","target"]),c={},o=d.style,s=s,o&&gn(c,o),s&&gn(c,s),l&&gn(c,l),i=c,!e&&!1!==e||(r=e),"string"==typeof n)&&(a=n),i.position),s=i.arrowPointAtCenter,l=i.follow,c=i.offset;r?(n=(e=w(function(t,e,n,r,i,a){if(void 0===i&&(i=!1),a=void 0===a?!1:a)return[t,e];var o=(a=n.getBoundingClientRect()).x,s=a.y,l=a.width,c=a.height;switch(r){case"top":return i?[o+l/2,s]:[t,s];case"left":return i?[o,s+c/2]:[o,e];case"bottom":return i?[o+l/2,s+c]:[t,s+c];case"right":return i?[o+l,s+c/2]:[o+l,e];case"top-right":case"right-top":return[o+l,s];case"left-bottom":case"bottom-left":return[o,s+c];case"right-bottom":case"bottom-right":return[o+l,s+c];default:return[o,s]}}(t.clientX,t.clientY,r,o,s,l),2))[0],i=e[1],d.showTip(n,i,{text:a,position:o,offset:c})):d.hideTip()}),u.addEventListener("mouseleave",e),this.map.set(u,[t,e]))},iE.prototype.unbind=function(t){var e,n;this.map.has(t)&&(e=(n=w(this.map.get(t)||[],2))[0],n=n[1],e&&t.removeEventListener("mousemove",e),n&&t.removeEventListener("mouseleave",n),this.map.delete(t))},iE.prototype.clear=function(){this.container.innerHTML=""},iE.prototype.destroy=function(){var t,e=this;m([],w(this.map.keys()),!1).forEach(function(t){return e.unbind(t)}),null!=(t=this.container)&&t.remove(),eE.prototype.destroy.call(this)},iE.prototype.showTip=function(t,e,n){var r,i=En(n,"text");i&&"string"!=typeof i||(this.applyStyles(),t&&e&&n&&(r=n.offset,(n=n.position)&&this.container.setAttribute("data-position",n),this.setOffsetPosition(t,e,r),"string"==typeof i&&(n=this.container.querySelector(".".concat(QM)))&&(n.innerHTML=i),this.visibility="visible",this.container.style.visibility="visible"))},iE.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},iE.prototype.getContainer=function(){return this.container},iE.prototype.getClassName=function(){var t=this.style.containerClassName;return"".concat(KM).concat(t?" ".concat(t):"")},iE.prototype.initShape=function(){var t=this,e=this.style.id;this.container=rE(e),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",function(){return t.showTip()}),this.container.addEventListener("mouseleave",function(){return t.hideTip()})},iE.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.className=this.getClassName(),'<span class="'.concat(ZM,'"></span>'));t.innerHTML=n,an(r)?t.innerHTML+=r:r&&pn(r)&&t.appendChild(r),e&&(t.getElementsByClassName(QM)[0].textContent=e),this.applyStyles(),this.container.style.visibility=this.visibility},iE.prototype.applyStyles=function(){var t,e=O2({},JM,this.style.domStyles),e=Object.entries(e).reduce(function(t,e){var e=w(e,2),n=e[0],e=e[1],e=Object.entries(e).reduce(function(t,e){var e=w(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))},iE.prototype.setOffsetPosition=function(t,e,n){var n=w(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")},iE.tag="poptip",iE.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:JM,template:'<div class="'.concat(QM,'"></div>')}};ye(oE,aE=hl),Object.defineProperty(oE.prototype,"margin",{get:function(){return this.$margin},set:function(t){this.$margin=ax(t)},enumerable:!1,configurable:!0}),Object.defineProperty(oE.prototype,"padding",{get:function(){return this.$padding},set:function(t){this.$padding=ax(t)},enumerable:!1,configurable:!0}),oE.prototype.getBBox=function(){var t=this.attributes,e=t.x,e=void 0===e?0:e,n=t.y,n=void 0===n?0:n,r=t.width,t=t.height,i=w(this.$margin,4),a=i[0],o=i[1],s=i[2],i=i[3];return new w2(e-i,n-a,r+i+o,t+a+s)},oE.prototype.appendChild=function(t,e){return t.isMutationObserved=!0,aE.prototype.appendChild.call(this,t,e),t},oE.prototype.getAvailableSpace=function(){var t=this.attributes,e=t.width,t=t.height,n=w(this.$padding,4),r=n[0],i=n[1],a=n[2],n=n[3],o=w(this.$margin,4),s=o[0],o=o[3];return new w2(n+o,r+s,e-n-i,t-r-a)},oE.prototype.layout=function(){var t,e,n,r;if(this.attributes.display&&this.isConnected&&!this.children.some(function(t){return!t.isConnected}))try{t=this.getAvailableSpace(),e=this.children.map(function(t){return t.getBBox()}),n=this.attributes;var i=0!==e.length&&(null==(r=n.display in(r={flex:D2,grid:z2})?r[n.display]:null)?void 0:r.call(null,t,e,n))||[];this.children.forEach(function(t,e){var e=i[e],n=e.x,e=e.y;t.attr({x:n,y:e})})}catch(t){}},oE.prototype.bindEvents=function(){var e=this;this.layoutEvents.forEach(function(t){e.addEventListener(t,function(t){t.target.isMutationObserved=!0,e.layout()})})},oE.prototype.attributeChangedCallback=function(t,e,n){"margin"===t?this.margin=n:"padding"===t&&(this.padding=n),this.layout()};var aE,Bl=oE;function oE(t){var e=aE.call(this,t)||this,t=(e.layoutEvents=[b.BOUNDS_CHANGED,b.INSERTED,b.REMOVED],e.$margin=ax(0),e.$padding=ax(0),t.style||{}),n=t.margin,t=t.padding,t=void 0===t?0:t;return e.margin=void 0===n?0:n,e.padding=t,e.isMutationObserved=!0,e.bindEvents(),e}A.enableCSSParsing=!1;function sE(r,t,e,n){var[[t,i],[a,o]]=t,[s,l]=function(t){var{min:[t,e],max:[n,r]}=t.getLocalBounds();let i=0,a=0;return 0<t&&(i=t),n<0&&(i=n),0<e&&(a=e),r<0&&(a=r),[i,a]}(r);if(t===a&&i===o)return ab()([[0,0],[s,l]]);s=[[t-a,i-o]].concat(e.length?e:[0,0]);const c=[n[0]-a,n[1]-o],[u,h]=s;return l=c,t=u,i=h,e=q1(l,t),t=q1(t,i),i=q1(i,l),0<(Math.pow(e,2)+Math.pow(t,2)-Math.pow(i,2))/(2*e*t)&&(a=(()=>{var{min:t,max:e}=r.getLocalBounds(),n=u[0]+(u[1]-c[1])*+u[1]/(u[0]-c[0]);return e[0]<c[0]?Math.min(e[0],n):Math.max(t[0],n)})(),s.splice(1,1,[a,0])),ab()(s)}const lE=Cb(t=>{var e=t.attributes,{x:n,y:r,x0:i=n,y0:a=r,background:o,connector:s,startMarker:l,endMarker:c,coordCenter:u}=e,e=et(e,["class","transform","rotate","x","y","x0","y0","background","connector","startMarker","endMarker","coordCenter"]),h=rt(e,"background"),f=h["padding"],h=et(h,["padding"]),d=rt(e,"connector"),{points:p=[]}=d,d=et(d,["points"]),i=[[+i,+a],[+n,+r]],a=it(t).maybeAppend("text","text").style("zIndex",0).call(P,Object.assign({textBaseline:"middle"},e)).node(),n=sE(it(t).maybeAppend("background","rect").style("zIndex",-1).call(P,function(t,e=[]){var[e=0,n=0,r=e,i=n]=e,a=t.parentNode,o=a.getEulerAngles(),{min:t,halfExtents:s}=(a.setEulerAngles(0),t.getLocalBounds()),[t,l]=t,[s,c]=s;return a.setEulerAngles(o),{x:t-i,y:l-e,width:2*s+i+n,height:2*c+e+r}}(a,f)).call(P,o?h:{}).node(),i,p,u),r=l&&new Ex({id:"startMarker",style:Object.assign({x:0,y:0},rt(e,"startMarker"))}),a=c&&new Ex({id:"endMarker",style:Object.assign({x:0,y:0},rt(e,"endMarker"))});it(t).maybeAppend("connector","path").style("zIndex",0).style("path",n).style("markerStart",r).style("markerEnd",a).call(P,s?d:{})}),cE=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=et(rv(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 it(new lE).style("x",i).style("y",o).call(P,r).style("transform",s+`rotate(${+e})`).style("coordCenter",n.getCenter()).call(P,a).call(P,l).node()}};cE.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const uE=Cb(t=>{var e=et(t.attributes,["class","x","y"]);const n=rt(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])]}(it(t).maybeAppend("marker",()=>new Ex({})).call(t=>t.node().update(Object.assign({symbol:r},n))).node());it(t).maybeAppend("text","text").style("x",i).style("y",a).call(P,e)}),hE=t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o,text:r=""}=e,e={text:String(r),stroke:o||i,fill:o||i},[[r,o]]=t;return it(new uE).call(P,a).style("x",r).style("y",o).call(P,e).call(P,s).node()}},fE=(hE.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},Cb(t=>{var{areaPath:e,connectPath:n,areaStyle:r,connectStyle:i}=t.attributes;it(t).maybeAppend("connect-path",()=>new xl({})).style("d",n).call(P,i),it(t).maybeAppend("area-path",()=>new xl({})).style("d",e).call(P,r)}));const dE=t=>{const{curve:u,gradient:l=!1,defined:h=t=>!Number.isNaN(t)&&null!=t,connect:f=!1}=t,d=et(t,["curve","gradient","defined","connect"]);return(t,e,c,n)=>{var{mark:r,shape:i,defaultShape:a}=e,n=rv(n,r,i,a),r=n["defaultColor"],i=et(n,["defaultColor"]),{color:a=r,seriesColor:n,seriesX:r,seriesY:o}=e,e=av(c,e),n=l&&n?tv(n,r,o,l):a;const s=Object.assign(Object.assign(Object.assign(Object.assign({},i),{stroke:n,fill:n}),e&&{transform:e}),d);var[r,o]=function(e,n){var r=[],i=[],a=[];let o=!1,s=null;var l=e.length/2;for(let t=0;t<l;t++){var c,u,h=e[t],f=e[t+l];[...h,...f].some(t=>!n(t))?o=!0:(r.push(h),i.push(f),o&&s&&(o=!1,[c,u]=s,a.push([c,h,u,f])),s=[h,f])}return[r.concat(i),a]}(t,h),a=rt(s,"connect"),i=!!o.length,n=t=>it(new xl({})).style("d",t).call(P,s).node();return Cp(c)?(e=t=>{const n=c.getCenter(),r=t.slice(0,t.length/2),i=t.slice(t.length/2);return t=ob().curve(sb),e=t.curve,a=t.lineX0,o=t.lineX1,s=t.lineY0,l=t.lineY1,t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return ub(a())},delete t.lineX0,t.lineEndAngle=function(){return ub(o())},delete t.lineX1,t.lineInnerRadius=function(){return ub(s())},delete t.lineY0,t.lineOuterRadius=function(){return ub(l())},delete t.lineY1,t.curve=function(t){return arguments.length?e(cb(t)):e()._curve},t.angle((t,e)=>X1(V1(r[e],n))).outerRadius((t,e)=>q1(r[e],n)).innerRadius((t,e)=>q1(i[e],n)).defined((t,e)=>[...r[e],...i[e]].every(h)).curve(u)(i);var e,a,o,s,l},!i||f&&!Object.keys(a).length?n(e(r)):i&&!f?n(e(t)):it(new fE).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(Np(c)?ob().y((t,e)=>n[e][1]).x1((t,e)=>n[e][0]).x0((t,e)=>r[e][0]).defined((t,e)=>[...n[e],...r[e]].every(h)):ob().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)):it(new fE).style("areaStyle",s).style("connectStyle",Object.assign(Object.assign({},a),d)).style("areaPath",e(t)).style("connectPath",o.map(e).join("")).node())}},pE=(dE.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},a=>(t,e,n,r)=>{var i=Cp(n)?wb:nb;return dE(Object.assign({curve:i},a))(t,e,n,r)}),gE=(pE.props=Object.assign(Object.assign({},dE.props),{defaultMarker:"point"}),t=>{const{alpha:a=.5}=t,o=et(t,["alpha"]);return(t,e,n,r)=>{var i=Cp(n)?bb:yb;return dE(Object.assign({curve:i.alpha(a)},o))(t,e,n,r)}}),mE=(gE.props=Object.assign(Object.assign({},dE.props),{defaultMarker:"smooth"}),i=>(t,e,n,r)=>dE(Object.assign({curve:Mb},i))(t,e,n,r)),yE=(mE.props=Object.assign(Object.assign({},dE.props),{defaultMarker:"hvh"}),i=>(t,e,n,r)=>dE(Object.assign({curve:Eb},i))(t,e,n,r)),vE=(yE.props=Object.assign(Object.assign({},dE.props),{defaultMarker:"vh"}),i=>(t,e,n,r)=>dE(Object.assign({curve:Ob},i))(t,e,n,r)),bE=(vE.props=Object.assign(Object.assign({},dE.props),{defaultMarker:"hv"}),t=>{const l=t["arrowSize"],c=et(t,["arrowSize"]);return(t,e,n,r)=>{var i,{mark:a,shape:o,defaultShape:s}=e,r=rv(r,a,o,s),a=r["defaultColor"],o=et(r,["defaultColor"]),{color:s=a,transform:r}=e,[e,a]=t,t=Vv();return t.moveTo(...e),t.lineTo(...a),l&&([e,i]=Q1(e,a,{arrowSize:l}),t.moveTo(...a),t.lineTo(...e),t.moveTo(...a),t.lineTo(...i)),it(new xl).call(P,o).style("d",t.toString()).style("stroke",s).style("transform",r).call(P,c).node()}}),xE=(bE.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=Vv();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]),it(new xl).call(P,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(P,s).node()}});xE.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const wE=t=>{const{cornerRatio:u=1/3}=t,h=et(t,["cornerRatio"]);return(t,e,n,r)=>{var i,a,{mark:o,shape:s,defaultShape:l}=e,r=rv(r,o,s,l),o=r["defaultColor"],s=et(r,["defaultColor"]),{color:l=o,transform:r}=e,[e,o]=t,c=(t=e,e=o,o=n,n=u,a=Vv(),Cp(o)?(i=q1(t,c=o.getCenter()),i=(q1(e,c)-i)*n+i,a.moveTo(t[0],t[1]),J1(a,t,e,c,i)):Np(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 it(new xl).call(P,s).style("d",c.toString()).style("stroke",l).style("transform",r).call(P,h).node()}},kE=(wE.props={defaultMarker:"vhv",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,transform:r}=e,[e,i]=t,t=Vv();return t.moveTo(e[0],e[1]),Cp(n)?(n=n.getCenter(),t.quadraticCurveTo(n[0],n[1],i[0],i[1])):J1(t,e,i,Z1(e,i),q1(e,i)/2),it(new xl).call(P,a).style("d",t.toString()).style("stroke",o).style("transform",r).call(P,s).node()}}),ME=(kE.props={defaultMarker:"smooth",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const u=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),i=r["defaultColor"],a=et(r,["defaultColor"]),{color:o=i,src:r="",size:e=32,transform:i=""}=e,{width:s=e,height:l=e}=u,[[t,c]]=t,t=t-Number(s)/2,s=c-Number(l)/2;return it(new gl).call(P,a).style("x",t).style("y",s).style("width",e).style("height",e).style("img",r).style("stroke",o).style("transform",i).call(P,u).node()}});ME.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const EE=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=rv(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),a=function(i,t){const a=Vv();if(Cp(t)){const o=t.getCenter();t=[...i,i[0]];const s=t.map(t=>q1(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?J1(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 it(new xl).call(P,i).style("d",a.toString()).style("stroke",o||e).style("fill",o||e).style("transform",s).call(P,l).node()}};EE.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const OE=t=>{const l=et(t,[]);return(t,e,n,r)=>{var{mark:e,shape:i,defaultShape:a,color:o,transform:s}=e,r=rv(r,e,i,a),e=r["defaultColor"],i=et(r,["defaultColor"]),a=function(t,e){var n,[t,r,i,a]=t,o=Vv();return Cp(e)?(n=q1(e=e.getCenter(),t),o.moveTo(t[0],t[1]),o.quadraticCurveTo(e[0],e[1],i[0],i[1]),J1(o,i,a,e,n),o.quadraticCurveTo(e[0],e[1],r[0],r[1]),J1(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 it(new xl).call(P,i).style("d",a.toString()).style("fill",o||e).style("stroke",o||e).style("transform",s).call(P,l).node()}};OE.props={defaultMarker:"square",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const SE=t=>{const m=et(t,[]);return(t,e,n,r)=>{var i,a,o,s,l,c,u,{mark:e,shape:h,defaultShape:f,color:d,transform:p}=e,r=rv(r,e,h,f),{defaultColor:e,fill:h=e,stroke:f=e}=r,e=et(r,["defaultColor","fill","stroke"]),g=(r=t,t=n,n=Vv(),Cp(t)?([i,a]=t=t.getCenter(),o=U1(V1(r[0],t)),s=U1(V1(r[1],t)),g=q1(t,r[2]),l=q1(t,r[3]),c=q1(t,r[8]),u=q1(t,r[10]),t=q1(t,r[11]),n.moveTo(...r[0]),n.arc(i,a,g,o,s),n.arc(i,a,g,s,o,!0),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.arc(i,a,l,o,s),n.lineTo(...r[6]),n.arc(i,a,u,s,o,!0),n.closePath(),n.moveTo(...r[8]),n.arc(i,a,c,o,s),n.arc(i,a,c,s,o,!0),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.arc(i,a,t,o,s),n.arc(i,a,t,s,o,!0)):(n.moveTo(...r[0]),n.lineTo(...r[1]),n.moveTo(...r[2]),n.lineTo(...r[3]),n.moveTo(...r[4]),n.lineTo(...r[5]),n.lineTo(...r[6]),n.lineTo(...r[7]),n.closePath(),n.moveTo(...r[8]),n.lineTo(...r[9]),n.moveTo(...r[10]),n.lineTo(...r[11]),n.moveTo(...r[12]),n.lineTo(...r[13])),n);return it(new xl).call(P,e).style("d",g.toString()).style("stroke",f).style("fill",d||h).style("transform",p).call(P,m).node()}};SE.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const _E=t=>{const s=et(t,[]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),{defaultColor:i,lineWidth:a}=r,o=et(r,["defaultColor","lineWidth"]),{color:r=i,size:i=a}=e,t=(a=t,Cp(t=n)?(t=t.getCenter(),Jv()({startAngle:0,endAngle:2*Math.PI,outerRadius:q1(a[0],t),innerRadius:q1(a[1],t)})):ab().x(t=>t[0]).y(t=>t[1])(a)),a=(a=n,n=e.transform,Cp(a)?([a,e]=a.getCenter(),`translate(${a}, ${e}) `+(n||"")):n);return it(new xl({})).call(P,o).style("d",t).style("stroke",r).style("lineWidth",i).style("transform",a).call(P,s).node()}};function AE(t,e,n){return[["M",t,e],["L",t+2*n,e-n],["L",t+2*n,e+n],["Z"]]}_E.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};const PE=Cb(t=>{var e=t.attributes,{points:n,endMarker:r=!0}=e,e=et(e,["points","class","endMarker","direction"]),i=rt(e,"endMarker"),n=(n=n,ab().x(t=>t[0]).y(t=>t[1])(n));it(t).maybeAppend("connector","path").style("path",n).style("markerEnd",r?new Ex({className:"marker",style:Object.assign(Object.assign({},i),{symbol:AE})}):null).call(P,e)});const TE=t=>{const{offset:s=0,connectLength1:l}=t,c=et(t,["offset","connectLength1"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=rv(r,i,a,o),{defaultColor:i,connectLength1:a=l}=r,o=et(r,["defaultColor","connectLength1"]),{color:r,transform:e}=e,n=function(t,e,n,r=0){var[[e,i],[a,o]]=e;if(Np(t)){const l=n;var t=e+l,s=t+r;return[[t,i],[s,i],[s,o],[a+l,o]]}const l=-n;return t=i+l,[[e,t],[e,s=t+-r],[a,s],[a,o+l]]}(n,t,s,a);return it(new PE).call(P,o).style("points",n).style("stroke",r||i).style("transform",e).call(P,c).node()}};function LE(t,e,a,n){var r=a["bounds"];const[[o,s],[i,l]]=r,c=i-o,u=l-s;r=t=>{var{x:e,y:n}=t,r=P0(a.x,c),i=P0(a.y,u);return Object.assign(Object.assign({},t),{x:(r||e)+o,y:(i||n)+s})};return r("left"===t?{x:0,y:u/2,textAnchor:"start",textBaseline:"middle"}:"right"===t?{x:c,y:u/2,textAnchor:"end",textBaseline:"middle"}:"top"===t?{x:c/2,y:0,textAnchor:"center",textBaseline:"top"}:"bottom"===t?{x:c/2,y:u,textAnchor:"center",textBaseline:"bottom"}:"top-left"===t?{x:0,y:0,textAnchor:"start",textBaseline:"top"}:"top-right"===t?{x:c,y:0,textAnchor:"end",textBaseline:"top"}:"bottom-left"===t?{x:0,y:u,textAnchor:"start",textBaseline:"bottom"}:"bottom-right"===t?{x:c,y:u,textAnchor:"end",textBaseline:"bottom"}:{x:c/2,y:u/2,textAnchor:"center",textBaseline:"middle"})}function NE(r,i,t,e){var{y:t,y1:n,autoRotate:a,rotateToAlignArc:o}=t;const s=e.getCenter(),{innerRadius:l,outerRadius:c,startAngle:u,endAngle:h}=nv(e,i,[t,n]),f="inside"===r?(u+h)/2:h;e=jE(f,a,o),t=(()=>{var[t,e]=i,n=l+.5*(c-l),[n,t]="inside"===r?CE(s,f,n):Z1(t,e);return{x:n,y:t}})();return Object.assign(Object.assign({},t),{textAlign:"inside"===r?"center":"start",textBaseline:"middle",rotate:e})}function CE(t,e,n){return[t[0]+Math.sin(e)*n,t[1]-Math.cos(e)*n]}function jE(t,e,n){return e?(e=n?0:Math.sin(t)<0?90:-90,t/Math.PI*180+e):0}function RE(t,e,n,r){var{y:n,y1:i,autoRotate:a,rotateToAlignArc:o,radius:s=.5,offset:l=0}=n,e=nv(r,e,[n,i]),{startAngle:n,endAngle:i}=e,r=r.getCenter(),n=(n+i)/2,i={textAlign:"center",textBaseline:"middle",rotate:jE(n,a,o)},{innerRadius:a,outerRadius:o}=e,[e,r]=CE(r,n,a+(o-a)*s+l);return Object.assign({x:e,y:r},i)}function IE(t,e,n){var n=n["bounds"],[n]=n;return{x:n[0],y:n[1]}}function BE(t,e,n,r){var i=n["bounds"];return 1===i.length?IE(0,0,n):(jp(r)?NE:Fp(r)?RE:LE)(t,e,n,r)}function FE(t,e,n){var{innerRadius:n,outerRadius:t}=nv(n,t,[e.y,e.y1]);return n+(t-n)}function DE(t,e,n){var{startAngle:n,endAngle:t}=nv(n,t,[e.y,e.y1]);return(n+t)/2}function zE(t,e,n,r){var{autoRotate:i,rotateToAlignArc:a,offset:o=0,connector:s=!0,connectorLength:l=o,connectorLength2:c=0,connectorDistance:u=0}=n,h=r.getCenter(),f=DE(e,n,r),d=0<Math.sin(f)?1:-1,i=jE(f,i,a),a={textAlign:0<d||jp(r)?"start":"end",textBaseline:"middle",rotate:i},i=FE(e,n,r),[[e,n],[r,h],[f,i]]=function(t,e,n,r,i){var[n,a]=CE(t,e,n),[t,r]=CE(t,e,r);return[[n,a],[t,r],[t+(0<Math.sin(e)?1:-1)*i,r]]}(h,f,i,i+(s?l:o),s?c:0),l=s?+u*d:0,o=f+l,c={connector:s,connectorPoints:[[r-o,h-i],[f-o,i-i]]};return Object.assign(Object.assign({x0:e,y0:n,x:f+l,y:i},a),c)}TE.props={defaultMarker:"line",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"};var GE=Object.freeze({__proto__:null,area:function(t,e,n,r){var i=e.length/2;const a=e.slice(0,i),o=e.slice(i);var e=xp(a,(t,e)=>Math.abs(t[1]-o[e][1])),i=(l=t=>[a[t][0],(a[t][1]+o[t][1])/2])(e=Math.max(Math.min(e,i-2),1)),s=l(e-1),l=U1(V1(l(e+1),s))/Math.PI*180;return{x:i[0],y:i[1],transform:`rotate(${l})`,textAlign:"center",textBaseline:"middle"}},bottom:BE,bottomLeft:BE,bottomRight:BE,inside:BE,left:BE,outside:function(t,e,n,r){var i=n["bounds"];return 1===i.length?IE(0,0,n):(jp(r)?NE:Fp(r)?zE:LE)(t,e,n,r)},right:BE,spider:function(t,e,n,r){var i,a,o,s,l,c;return Fp(r)?({connectorLength:c,connectorLength2:i,connectorDistance:a}=n,o=et(zE(0,e,n,r),[]),s=r.getCenter(),l=FE(e,n,r),e=DE(e,n,r),n=l+c+i,r=0<Math.sin(e)?1:-1,l=o["x"],c=s[0]+(n+ +a)*r-l,o.x+=c,o.connectorPoints[0][0]-=c,o):{}},surround:function(t,e,n,r){var i,a,o,s,l;return Fp(r)?({connectorLength:o,connectorLength2:i,connectorDistance:a}=n,{x0:n,y0:s}=e=et(zE(0,e,n,r),[]),l=r.getCenter(),r=function(t){if(Fp(t)){var[e,n]=t.getSize(),t=t.getOptions().transformations.find(t=>"polar"===t[0]);if(t)return Math.max(e,n)/2*t[4]}return 0}(r)+o,o=X1([n-l[0],s-l[1]]),n=0<Math.sin(o)?1:-1,[s,l]=CE(l,o,r),e.x=s+(i+a)*n,e.y=l,e):{}},top:BE,topLeft:BE,topRight:BE});function WE(t,e,n,r,i){var a=e["position"],a=(o=n,void 0!==(a=a)?a:Fp(o)?"inside":Np(o)?"right":"top"),o=r["inside"===a?"innerLabel":"label"],r=Object.assign({},o,e),e=GE[a.replace(/-(\w)/g,function(t,e){return e.toUpperCase()})];if(e)return Object.assign(Object.assign({},o),e(a,t,r,n,i));throw new Error("Unknown position: "+a)}const HE=o=>(t,e,n,r)=>{var i=e["text"],a=et(e,["text","x","y"]),t=WE(t,e,n,r,o),{rotate:e=0,transform:r=""}=t,t=et(t,["rotate","transform"]);return it(new lE).call(P,t).style("text",""+i).style("transform",r+`rotate(${+e})`).style("coordCenter",n.getCenter()).call(P,a).node()},YE=(HE.props={defaultMarker:"point"},t=>{const s=t["colorAttribute"],l=et(t,["arrow","colorAttribute"]);return(t,e,n,r)=>{var{mark:i,shape:a,defaultShape:o}=e,r=et(rv(r,i,a,o),["stroke"]),{d:i,color:a}=e;return it(new xl).call(P,r).style("d",i).style(s,a).call(P,l).node()}}),VE=(YE.props={defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>YE(Object.assign({colorAttribute:"fill"},t))),qE=(VE.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>YE(Object.assign({fill:"none",colorAttribute:"stroke"},t))),UE=(qE.props={defaultMarker:"hvh",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},t=>{const a=t["render"],o=et(t,["render"]);return(t,e,n,r)=>{var[[t,i]]=t;return a(Object.assign(Object.assign({},o),{x:t,y:i}))}}),XE=(UE.props={defaultMarker:"point",defaultEnterAnimation:"fadeIn",defaultUpdateAnimation:"morphing",defaultExitAnimation:"fadeOut"},{BLACK:"#000",WHITE:"#fff",STROKE:"#416180"}),$E=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:XE.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}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{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:XE.BLACK,lineWidth:1}},text:{text:{fill:"#1D2129",fontSize:12,strokeWidth:0,connectorStroke:XE.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:XE.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:XE.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:XE.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:XE.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:XE.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:XE.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:XE.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:XE.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:XE.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:.5,gridStroke:XE.BLACK,gridStrokeOpacity:.05,labelAlign:"horizontal",labelFill:XE.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,line:!1,lineLineWidth:.5,lineStroke:XE.BLACK,lineStrokeOpacity:.45,tickLength:4,tickLineWidth:1,tickStroke:XE.BLACK,tickStrokeOpacity:.25,titleFill:XE.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:12,tickDirection:"positive",titlePosition:"bottom",titleSpacing:10,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelAutoRotate:!1,labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:10,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleSpacing:0},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:XE.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemValueFill:XE.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:XE.BLACK,navButtonFillOpacity:.65,navPageNumFill:XE.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:XE.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:XE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:XE.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:XE.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:XE.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal",labelSpacing:8,tick:!0},label:{fill:XE.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:XE.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:XE.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:XE.STROKE,trackFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:XE.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:XE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{padding:[2,2,2,2],trackSize:10,isRound:!0,slidable:!0,scrollable:!0,trackFill:"#e5e5e5",trackFillOpacity:0,thumbFill:"#000",thumbFillOpacity:.15,thumbHighlightedFillOpacity:.2},title:{titleFill:XE.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:XE.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},KE=($E.props={},{BLACK:"#fff",WHITE:"#000",STROKE:"#416180"}),ZE=t=>{var e={defaultColor:"#5B8FF9",defaultCategory10:"category10",defaultCategory20:"category20",defaultSize:1,elementActiveStroke:KE.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}},point:{point:{r:3,fillOpacity:.95,lineWidth:0},hollow:{r:3,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0}},polygon:{polygon:{fillOpacity:.95}},cell:{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:KE.BLACK,lineWidth:1}},text:{text:{fill:KE.BLACK,fillOpacity:.65,fontSize:12,strokeWidth:0,connectorStroke:KE.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:KE.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:KE.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:KE.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:KE.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:KE.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:KE.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:KE.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:KE.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:KE.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:.5,gridStroke:KE.BLACK,gridStrokeOpacity:.05,labelAlign:"horizontal",labelFill:KE.BLACK,labelFillOpacity:.65,labelFontSize:12,labelFontWeight:"lighter",labelSpacing:8,lineLineWidth:.5,lineStroke:KE.BLACK,lineStrokeOpacity:.45,tickLength:4,tickLineWidth:1,tickStroke:KE.BLACK,tickStrokeOpacity:.25,titleFill:KE.BLACK,titleFillOpacity:.65,titleFontSize:12,titleFontWeight:"normal",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:12,tickDirection:"positive",titlePosition:"bottom",titleSpacing:10,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelAutoRotate:!1,labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:10,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleTextBaseline:"bottom"},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:KE.BLACK,itemLabelFillOpacity:.65,itemLabelFontSize:12,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,8],itemValueFill:KE.BLACK,itemValueFillOpacity:.65,itemValueFontSize:12,itemValueFontWeight:"normal",navButtonFill:KE.BLACK,navButtonFillOpacity:.45,navPageNumFill:KE.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:12,padding:8,title:!1,titleFill:KE.BLACK,titleFillOpacity:.45,titleFontSize:12,titleFontWeight:"normal",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:KE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal",handleMarkerFill:KE.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:KE.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:KE.BLACK,labelFillOpacity:.45,labelFontSize:12,labelFontWeight:"normal"},label:{fill:KE.BLACK,fillOpacity:.65,fontSize:12,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:KE.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:KE.WHITE,fontSize:12,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:KE.STROKE,trackFillOpacity:1,selectionFill:"#5B8FF9",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:KE.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:KE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:12,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:KE.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:KE.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)},QE=(ZE.props={},{BLACK:"#000",WHITE:"#fff",STROKE:"#888"}),JE=t=>{var e={defaultColor:"#4e79a7",defaultCategory10:"tableau10",defaultCategory20:"tableau10",defaultSize:1,elementActiveStroke:QE.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,strokeOpacity:.95,lineWidth:1},plus:{r:3,strokeOpacity:.95,lineWidth:3},diamond:{r:3,strokeOpacity:.95,lineWidth:1}},interval:{rect:{fillOpacity:.95},hollow:{fill:"",strokeOpacity:1,lineWidth:2}},area:{area:{fillOpacity:.85,lineWidth:0,connectFill:QE.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:10,strokeWidth:0,connectorStroke:QE.STROKE,connectorStrokeOpacity:.45,connectorLineWidth:1,backgroundFill:QE.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:QE.STROKE,markerFillOpacity:.25,markerStrokeOpacity:0}},lineX:{line:{stroke:QE.STROKE,strokeOpacity:.45,lineWidth:1}},lineY:{line:{stroke:QE.STROKE,strokeOpacity:.45,lineWidth:1}},rangeX:{range:{fill:QE.STROKE,fillOpacity:.15,lineWidth:0}},rangeY:{range:{fill:QE.STROKE,fillOpacity:.15,lineWidth:0}},connector:{connector:{stroke:QE.STROKE,strokeOpacity:.45,lineWidth:1,connectLength1:12,endMarker:!0,endMarkerSize:6,endMarkerFill:QE.STROKE,endMarkerFillOpacity:.95}},interaction:{active:{line:{line:{lineWidth:3}},interval:{rect:{stroke:QE.BLACK}},area:{area:{fillOpacity:.5}}},inactive:{area:{area:{fillOpacity:.3}}},selected:{},disabled:{}},axis:{arrow:!1,gridLineDash:[0,0],gridLineWidth:1,gridStroke:"#ddd",gridStrokeOpacity:1,labelAlign:"horizontal",labelAutoRotate:!1,labelFill:QE.BLACK,labelFillOpacity:1,labelFontSize:10,labelFontWeight:"normal",labelSpacing:4,line:!0,lineLineWidth:1,lineStroke:"#888",lineStrokeOpacity:1,tickLength:5,tickLineWidth:1,tickStroke:QE.STROKE,tickStrokeOpacity:1,titleFill:QE.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:12,titleTransformOrigin:"center"},axisTop:{gridDirection:"positive",labelDirection:"negative",tickDirection:"negative",titlePosition:"top",titleSpacing:0,titleTextBaseline:"middle"},axisBottom:{gridDirection:"negative",labelDirection:"positive",labelSpacing:8,tickDirection:"positive",titlePosition:"bottom",titleSpacing:4,titleTextBaseline:"bottom"},axisLeft:{gridDirection:"negative",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",titlePosition:"left",titleSpacing:4,titleTextBaseline:"middle",titleTransform:"translate(50%, 0) rotate(-90) translate(0, -50%)",titleTransformOrigin:"center"},axisRight:{gridDirection:"positive",labelDirection:"negative",labelSpacing:4,tickDirection:"negative",titlePosition:"right",titleSpacing:0,titleTextBaseline:"top",titleTransform:"translate(-50%, 0) rotate(-90)",titleTransformOrigin:"center"},axisLinear:{girdClosed:!0,gridConnect:"arc",gridDirection:"negative",gridType:"surround",titlePosition:"top",titleTextBaseline:"bottom"},axisRadar:{girdClosed:!0,gridStrokeOpacity:.3,gridType:"surround",label:!1,tick:!1,titlePosition:"start"},legend:{backgroundFill:"transparent",itemBackgroundFill:"transparent",itemLabelFill:QE.BLACK,itemLabelFillOpacity:1,itemLabelFontSize:10,itemLabelFontWeight:"normal",itemMarkerFillOpacity:1,itemMarkerSize:8,itemSpacing:[5,4],itemValueFill:QE.BLACK,itemValueFillOpacity:1,itemValueFontSize:10,itemValueFontWeight:"normal",navButtonFill:QE.BLACK,navButtonFillOpacity:.45,navButtonSize:6,navPageNumFill:QE.BLACK,navPageNumFillOpacity:.45,navPageNumFontSize:10,padding:8,title:!1,titleFill:QE.BLACK,titleFillOpacity:1,titleFontSize:11,titleFontWeight:"bold",titleSpacing:4},continuousLegend:{handleHeight:12,handleLabelFill:QE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal",handleMarkerFill:QE.BLACK,handleMarkerFillOpacity:.6,handleMarkerLineWidth:1,handleMarkerStroke:QE.BLACK,handleMarkerStrokeOpacity:.25,handleWidth:10,labelFill:QE.BLACK,labelFillOpacity:.45,labelFontSize:10,labelFontWeight:"normal",title:!1},label:{fill:QE.BLACK,fillOpacity:.65,fontSize:10,fontWeight:"normal",stroke:void 0,offset:12,connectorStroke:QE.BLACK,connectorStrokeOpacity:.45,connectorLineWidth:1,connectorLength:12,connectorLength2:8,connectorDistance:4},innerLabel:{fill:QE.WHITE,fontSize:10,fillOpacity:.85,fontWeight:"normal",stroke:void 0,offset:0},slider:{trackSize:16,trackFill:QE.STROKE,trackFillOpacity:.05,selectionFill:"#4e79a7",selectionFillOpacity:.15,handleIconSize:10,handleIconFill:"#f7f7f7",handleIconFillOpacity:1,handleIconStroke:QE.BLACK,handleIconStrokeOpacity:.25,handleIconLineWidth:1,handleIconRadius:2,handleLabelFill:QE.BLACK,handleLabelFillOpacity:.45,handleLabelFontSize:10,handleLabelFontWeight:"normal"},scrollbar:{},title:{titleFill:QE.BLACK,titleFillOpacity:.85,titleFontSize:14,titleFontWeight:"bold",titleTextBaseline:"top",subtitleFill:QE.BLACK,subtitleFillOpacity:.65,subtitleFontSize:12,subtitleFontWeight:"normal",subtitleTextBaseline:"top"}};return Object.assign({},e,t)};function t5(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)]}JE.props={};var e5,n5=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function r5(t){var e;if(e=n5.exec(t))return new i5({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 i5(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 a5(t,e){var n,e=t5(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+""}r5.prototype=i5.prototype,i5.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 o5={"%":(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)=>a5(100*t,e),r:a5,s:function(t,e){var n,r,i=t5(t,e);return i?(n=i[0],(i=(i=i[1])-(e5=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")+t5(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 s5(t){return t}var l5,c5=Array.prototype.map,u5=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function h5(t){var e,s,l,k=void 0===t.grouping||void 0===t.thousands?s5:(s=c5.call(t.grouping,Number),l=t.thousands+"",function(t,e){for(var n=t.length,r=[],i=0,a=s[0],o=0;0<n&&0<a&&(e<o+a+1&&(a=Math.max(1,e-o)),r.push(t.substring(n-=a,n+a)),!((o+=a+1)>e));)a=s[i=(i+1)%s.length];return r.reverse().join(l)}),r=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",M=void 0===t.decimal?".":t.decimal+"",E=void 0===t.numerals?s5:(e=c5.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 c=(t=r5(t)).fill,u=t.align,h=t.sign,e=t.symbol,f=t.zero,d=t.width,p=t.comma,g=t.precision,m=t.trim,y=t.type,v=("n"===y?(p=!0,y="g"):o5[y]||(void 0===g&&(g=12),m=!0,y="g"),(f||"0"===c&&"="===u)&&(f=!0,c="0",u="="),"$"===e?r:"#"===e&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),b="$"===e?i:/[%p]/.test(y)?a:"",x=o5[y],w=/[defgprs%]/.test(y);function n(t){var e,n,r,i=v,a=b;if("c"===y)a=x(t)+a,t="";else{var o=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:x(Math.abs(t),g),m&&(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"===y?u5[8+e5/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,l=s<d?new Array(d-s+1).join(c):"";switch(p&&f&&(t=k(l+t,l.length?d-a.length:1/0),l=""),u){case"<":t=i+t+a+l;break;case"=":t=i+l+t+a;break;case"^":t=l.slice(0,s=l.length>>1)+i+t+a+l.slice(s);break;default:t=l+i+t+a}return E(t)}return g=void 0===g?6:/[gprs]/.test(y)?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=r5(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor((t=e,((t=t5(Math.abs(t)))?t[1]:NaN)/3)))),r=Math.pow(10,-e),i=u5[8+e/3];return function(t){return n(r*t)+i}}}}function f5(t,e,n){return t.querySelector(e)?it(t).select(e):it(t).append(n)}function d5(t){return Array.isArray(t)?t.join(", "):""+(t||"")}function p5(t,e){var n={display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"center"};if(e)return Object.assign(Object.assign({},n),e);let{flexDirection:r,justifyContent:i,alignItems:a}=n;e={top:["row","flex-start","center"],bottom:["row","flex-start","center"],left:["colunm","center","center"],right:["colunm","center","center"],center:["column","center","center"]};return t in e&&([r,i,a]=e[t]),{display:"flex",flexDirection:r,justifyContent:i,alignItems:a}}e=h5({thousands:",",grouping:[3],currency:["$",""]}),l5=e.format,e.formatPrefix;class g5 extends Bl{update(t){this.attr(t);var e,t=et(t,["width","height"]);null!=(e=null==(e=this.children)?void 0:e[0])&&e.update(t)}}function m5(t,e){return null==(t=t.filter(t=>t.getOptions().name===e))?void 0:t[0]}function y5(t,e,n){var t=t["bbox"],{position:e="top",size:r,length:i}=e,e=["top","bottom","center"].includes(e),[t,a]=e?[t.height,t.width]:[t.width,t.height],{defaultSize:n,defaultLength:o}=n.props,r=r||n||t,n=i||o||a,[t,i]=e?[n,r]:[r,n];return{orientation:e?"horizontal":"vertical",width:t,height:i,size:r,length:n}}function v5(t){const n=["arrow","crosshairs","grid","handle","handleLabel","indicator","label","line","tick","tip","title","trunc"],r={};return Object.entries(t).forEach(([t,e])=>{n.includes(t)?r["show"+hn(t)]=e:r[t]=e}),r}function b5(t){var{innerWidth:t,innerHeight:e}=t.getOptions();return[t,e]}function x5(t){return"number"!=typeof t||Math.abs(t)<1e-15?t:parseFloat(t.toFixed(15))}function w5(a,t,e,n,r,i,o,s){void 0===e&&void 0===i||a.update(Object.assign(Object.assign({},e&&{tickCount:e}),i&&{tickMethod:i})),e=t,t=i;var l,t=(i=a).getTicks?i.getTicks():t?([c,l]=Qd(e,t=>+t),i=i.getOptions()["tickCount"],t(c,l,i)):e,c=r?t.filter(r):t;const u=(null==(l=a.getFormatter)?void 0:l.call(a))||n,h=t=>"object"==typeof t?t:String(t),f=function(t,e){var{innerWidth:e,innerHeight:n,insetTop:r,insetBottom:i,insetLeft:a,insetRight:o}=e.getOptions(),[t,r,i]="left"===t||"right"===t?[r,i,n]:[a,o,e];const s=new p1({domain:[0,1],range:[t/i,1-r/i]});return t=>s.map(t)}(o,s),d=function(r,i){const{width:a,height:o}=i.getOptions();return t=>{var e,n;return Bp(i)?(e=i.map("bottom"===r?[t,1]:[0,t]),"bottom"===r?(n=e[0],new p1({domain:[0,a],range:[0,1]}).map(n)):"left"===r?(n=e[1],new p1({domain:[0,o],range:[0,1]}).map(n)):t):t}}(o,s);return Cp(s)||Np(s)?(i=c.map((t,e,n)=>{var r,i=(null==(i=a.getBandWidth)?void 0:i.call(a,t))/2||0,i=f(a.map(t)+i);return{value:Np(s)&&null!=(r=a.getTicks)&&r.call(a)?1-i:i,label:h(u(x5(t),e,n)),id:String(e)}}),jp(s)&&"center"===o?i.map(t=>{var e=t["value"],t=et(t,["value"]);return Object.assign({value:1-e},t)}):i):c.map((t,e,n)=>{var r=(null==(r=a.getBandWidth)?void 0:r.call(a,t))/2||0;return{value:d(f(a.map(t)+r)),label:h(u(x5(t),e,n)),id:String(e)}})}function k5(t,e,n){var r;return!(Cp(r=e)&&Np(r)||Ip(e))&&(void 0===t?!!n.getTicks:t)}function M5(t,e,n,r,i,a){n=function(t,e){var n=t.axis;let r=t.axisLinear;return["top","right","bottom","left"].includes(e)&&(r=t["axis"+E0(e)]),Object.assign({},n,r)}(n,i);return"center"===i?Object.assign(Object.assign(Object.assign(Object.assign({},n),{labelDirection:"right"===r?"negative":"positive"}),"center"===r?{labelTransform:"translate(50%,0)"}:null),{tickDirection:"right"===r?"negative":"positive",labelSpacing:"center"===r?0:4,titleSpacing:"vertical"===(i=a)||i===-Math.PI/2?10:0,tick:"center"!==r&&void 0}):n}var E5,Dl=r=>t=>{var{labelFormatter:e=t=>""+t}=t,e="string"==typeof e?l5(e):e;const n=Object.assign(Object.assign({},t),{labelFormatter:e});return(...t)=>r(n)(...t)};const O5=Dl(t=>{const{direction:o="left",important:s={},labelFormatter:l=t=>""+t,orientation:c,position:u,style:h={},title:f,tickCount:d,tickFilter:p,tickMethod:g,transform:m}=t,y=et(t,["direction","important","labelFormatter","order","orientation","position","size","style","title","tickCount","tickFilter","tickMethod","transform"]);return({scales:[t],value:e,coordinate:n,theme:r})=>{var e=e["bbox"],i=t.getOptions()["domain"],r=M5(0,0,r,o,u,c),r=Object.assign(Object.assign(Object.assign({},r),h),y),a=function(t,e){var[e,n]=b5(e);return t.includes("bottom")||t.includes("top")?n:e}(u,n),e=function(t,e,n,r){var{x:n,y:i,width:a,height:o}=n;if("bottom"===t)return{startPos:[n,i],endPos:[n+a,i]};if("left"===t)return{startPos:[n+a,i],endPos:[n+a,i+o]};if("right"===t)return{endPos:[n,i+o],startPos:[n,i]};if("top"===t)return{startPos:[n,i+o],endPos:[n+a,i+o]};if("center"===t){if("vertical"===e)return{startPos:[n+a,i],endPos:[n+a,i+o]};if("horizontal"===e)return{startPos:[n,i+o],endPos:[n+a,i+o]};if("number"==typeof e){var[t,s]=r.getCenter(),[l,c]=Dp(r);const[u,h]=zp(r);var r=Math.min(a,o)/2,a=l*r,o=c*r,[l,c]=[t+n,s+i],[r,e]=[Math.cos(e),Math.sin(e)];return{startPos:[l+o*r,c+o*e],endPos:[l+a*r,c+a*e],gridClosed:h-u==360,gridCenter:[t+n,i+s],gridControlAngles:new Array(3).fill(0).map((t,e,n)=>(h-u)/(n.length-1)*e)}}}return{}}(u,c,e,n),i=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},r),{type:"linear",data:w5(t,i,d,l,p,g,u,n),titleText:d5(f),labelOverlap:function(t=[],e){var{labelAutoRotate:e=!0,labelAutoHide:n=!1,labelAutoEllipsis:r=!1}=e;const i=[...t];return(t=(e,t)=>{t?-1!==(t=i.findIndex(t=>t.type===e.type))?i[t]=e:i.push(e):-1!==(t=i.findIndex(t=>t.type===e.type))&&i.splice(t,1)})({type:"rotate",optionalAngles:[0,15,30,45,60,90]},e),t({type:"ellipsis",minLength:20},r),t({type:"hide"},n),i}(m,r),grid:k5(r.grid,n,t),gridLength:a,line:!0}),r.line?null:{lineOpacity:0}),e),s);return new Ek({className:"axis",style:v5(i)})}}),S5=Dl(t=>{const{position:o,labelFormatter:s=t=>""+t,tickFilter:l,tickCount:c,tickMethod:u,important:h={},style:e={}}=t,f=et(t,["order","size","position","orientation","labelFormatter","tickFilter","tickCount","tickMethod","important","style"]),{title:d,grid:p=!1}=e;return({scales:[t],value:e,coordinate:n,theme:r})=>{var e=e["bbox"],i=t.getOptions()["domain"],t=w5(t,i,c,s,l,u,o,n),[i,a]=Dp(n),e=function(t,e,n,r,i){var{x:e,y:a,width:o,height:s}=e,e=[e+o/2,a+s/2],a=Math.min(o,s)/2,[o,s]=zp(i),[l,c]=b5(i),e={center:e,radius:a,startAngle:o,endAngle:s,titleFillOpacity:0,titlePosition:"inner",line:!1,tick:!0,gridLength:(r-n)*(Math.min(l,c)/2)};return"inner"===t?(b5(i),Object.assign(Object.assign({},e),{labelAlign:"perpendicular",labelDirection:"positive",labelSpacing:4,tickDirection:"positive",gridDirection:"negative"})):Object.assign(Object.assign({},e),{labelAlign:"parallel",labelDirection:"negative",labelSpacing:8,tickDirection:"negative",gridDirection:"positive"})}(o,e,i,a,n),i=r["axis"];return new Ek({style:v5(nt({},i,e,Object.assign(Object.assign({type:"arc",data:t,titleText:d5(d),grid:p},f),h)))})}}),_5=(O5.props={defaultPosition:"center",defaultSize:45,defaultOrder:0},S5.props={defaultPosition:"outer",defaultOrientation:"vertical",defaultSize:45,defaultOrder:0},t=>O5(t)),A5=(_5.props=Object.assign(Object.assign({},O5.props),{defaultPosition:"bottom"}),t=>O5(t));A5.props=Object.assign(Object.assign({},O5.props),{defaultPosition:"left"});const P5=a=>{const{important:o={}}=a,s=et(a,["important"]);return t=>{var e,{theme:n,coordinate:r,value:i}=t;return O5(Object.assign(Object.assign(Object.assign({},s),(e=a.orientation,(e%=2*Math.PI)==Math.PI/2?{titleTransform:"translate(0, 50%)"}:e>-Math.PI/2&&e<Math.PI/2?{titleTransform:"translate(50%, 0)"}:e>Math.PI/2&&e<3*Math.PI/2?{titleTransform:"translate(-50%, 0)"}:{})),{important:Object.assign(Object.assign({},function(t,e,n,r){const i=t["radar"];var[{name:t}]=r["scales"];const[a,o]=zp(n);var{axisRadar:r={}}=e;return Object.assign(Object.assign({},r),{grid:"position"===t,gridConnect:"line",gridControlAngles:new Array(i.count).fill(0).map((t,e)=>{return(o-a)/i.count*e})})}(a,n,r,i)),o)}))(t)}};function T5(t,e,n,r,i={}){const a=(null==(e=null==(e=e["shape."+t])?void 0:e.props)?void 0:e.defaultMarker)||function(t){if(qe(t))return t[t.length-1]}(t.split("."));return()=>function(t,e){var{fill:n,stroke:r,lineWidth:i,color:a}=e,o=et(e,["d","fill","strokeWidth","path","stroke","lineWidth","color"]);const s=Wb.get(t)||Wb.get("point");return(...t)=>{return new xl({style:Object.assign(Object.assign({},o),{path:s(...t),stroke:s.style.includes("stroke")?a||r:"",fill:s.style.includes("fill")?a||n:"",lineWidth:s.style.includes("lineWidth")?i||2:0})})}}(a,i)(0,0,6)}function L5(t,{scales:e,library:n,markState:r}){var i=m5(e,"shape");const[a,o]=function(t,e){const n=m5(t,"shape");var r=m5(t,"color");const i=[];for(const[l,c]of e){var a=l.type,o=(0<(null==r?void 0:r.getOptions().domain.length)?null==r?void 0:r.getOptions().domain:c.data).map((t,e)=>{return n?n.map(t||"point"):(null==(t=null===l||void 0===l?void 0:l.style)?void 0:t.shape)||c.defaultShape||"point"});"string"==typeof a&&i.push([a,o])}if(0===i.length)return["point",["point"]];if(1===i.length)return i[0];if(!n)return i[0];const s=n.getOptions()["range"];return i.map(([t,e])=>{let n=0;for(let t=0;t<i.length;t++){var r=s[t%s.length];e[t]===r&&n++}return[n/e.length,[t,e]]}).sort((t,e)=>e[0]-t[0])[0][1]}(e,r),s=t["itemMarker"];return i&&!s?(t,e)=>T5(a+"."+o[e],n,0,0,{color:t.color}):"function"==typeof s?s:(t,e)=>T5(s||o[e],n,0,0,{color:t.color})}function N5(t,e){var{labelFormatter:n=t=>""+t}=t,r=e["scales"],e={itemMarker:L5(t,e),itemMarkerSize:(t=m5(t=r,"size"))?2*t.map(NaN):8,itemMarkerOpacity:function(t){if(t=m5(t,"opacity")){const n=t.getOptions()["range"];return(t,e)=>n[e]}}(r)};const i="string"==typeof n?l5(n):n,a=m5(r,"color");t=r.find(t=>0<t.getOptions().domain.length).getOptions().domain;return Object.assign(Object.assign({},e),{data:t.map(t=>({id:t,label:i(t),color:a.map(t)}))})}P5.props=Object.assign(Object.assign({},O5.props),{defaultPosition:"center"});const C5=l=>{const{position:c,title:u}=l,h=et(l,["labelFormatter","layout","order","orientation","position","size","title"]),{gridCol:f,gridRow:d}=h;return t=>{var{value:e,theme:n}=t,r=e["bbox"],{width:i,height:a}=function(t,e,n){var r;if("center"===(r=e["position"])){r=t["bbox"];const{width:i,height:a}=r;return{width:i,height:a}}const{width:i,height:a}=y5(t,e,n);return{width:i,height:a}}(e,l,C5),e=p5(c,null==(e=null==(e=null==(e=e.scales)?void 0:e[0])?void 0:e.guide)?void 0:e.layout),[o,s]=function(t,e,n){var[r,i]=[e||100,n||100];switch(t){case"top":case"bottom":case"top-left":case"top-right":case"bottom-left":case"bottom-right":return[1,i];case"left":case"right":return[r,1];default:return[e,n]}}(c,d,f),i=Object.assign({orientation:["right","left","center"].includes(c)?"vertical":"horizontal",width:i,height:a,gridCol:null!==f&&void 0!==f?f:s,gridRow:null!==d&&void 0!==d?d:o,rowPadding:0,colPadding:8,titleText:d5(u)},N5(l,t)),{legend:a={}}=n,s=new g5({style:Object.assign({x:r.x,y:r.y,width:r.width,height:r.height},e)});return s.appendChild(new $k({className:"legend-category",style:v5(Object.assign({},a,i,h))})),s}};C5.props={defaultPosition:"top",defaultOrder:1,defaultSize:40};const j5=l=>{const{labelFormatter:c,position:u,title:h,style:f}=l,d=et(l,["labelFormatter","layout","order","orientation","position","size","title","style"]);return({scales:t,value:e,theme:n})=>{var r=e["bbox"],{x:r,y:i,width:a,height:o}=r,s=p5(u,null==(s=null==(s=null==(s=e.scales)?void 0:s[0])?void 0:s.guide)?void 0:s.layout),r=new g5({style:Object.assign({x:r,y:i,width:a,height:o},s)}),{continuousLegend:i={}}=n;return r.appendChild(new mM({style:v5(Object.assign({},i,Object.assign(Object.assign({titleText:d5(h),titleFontSize:12,handle:!1,indicator:!1,labelAlign:"value",labelFormatter:"string"==typeof c?t=>l5(c)(t.label):c},function(t,e,n,r){const a=m5(t,"color");var{domain:i,range:o}=a.getOptions();const[s,l]=[i[0],i.slice(-1)[0]],{orientation:c,width:u,height:h,length:f}=y5(e,n,r);if(i={orientation:c,width:u,height:h},a instanceof b1){e=a.thresholds;if(a instanceof k1||a instanceof E1)return Object.assign(Object.assign({color:o},i),{data:[s,...e,l].map((t,e)=>({value:t/l,label:t}))});const p=[-1/0,...e,1/0].map((t,e)=>({value:e,label:t}));return Object.assign(Object.assign({data:p},i),{color:o,labelFilter:(t,e)=>0<e&&e<p.length-1})}const d=m5(t,"opacity");return Object.assign(Object.assign({},i),{data:a.getTicks().map(t=>({value:t})),color:new Array(f).fill(0).map((t,e)=>{var e=(l-s)/(f-1)*e+s,n=a.map(e);const i=d?d.map(e):1;return n.replace(/rgb[a]*\(([\d]{1,3}), ([\d]{1,3}), ([\d]{1,3})[\S\s]*\)/,(t,e,n,r)=>`rgba(${e}, ${n}, ${r}, ${i})`)})})}(t,e,l,j5)),f),d))})),r}},R5=(j5.props={defaultPosition:"top",defaultOrientation:"vertical",defaultOrder:1,defaultSize:60,defaultLength:300},e=>(...t)=>j5(Object.assign({},{block:!0},e))(...t)),I5=(R5.props=Object.assign(Object.assign({},j5.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>j5(Object.assign({},{type:"size",block:!0,tick:!1},t))),B5=(I5.props=Object.assign(Object.assign({},j5.props),{defaultPosition:"top",defaultOrientation:"horizontal"}),t=>j5(Object.assign({},{type:"size",tick:!1,labelFilter:(t,e,n)=>0===e||e===n.length-1},t)));function F5(t,e,n,r){switch(r){case"center":return{x:t+n/2,y:e,textAlign:"middle"};case"right":return{x:t+n,y:e,textAlign:"right"};default:return{x:t,y:e,textAlign:"left"}}}B5.props=Object.assign(Object.assign({},j5.props),{defaultPosition:"top",defaultOrientation:"horizontal"});E5={render(t,e){const{y:n,width:r,title:i,subtitle:a}=t,o=t.style,{spacing:s=2,align:l="left"}=o,c=et(o,["spacing","align"]);t=rt(c,"title");const u=rt(c,"subtitle"),h=f5(e,".title","text").attr("className","title").call(P,Object.assign(Object.assign(Object.assign({},F5(0,n,r,l)),{fontSize:14,textBaseline:"top",text:i}),t)).node().getLocalBounds();f5(e,".sub-title","text").attr("className","sub-title").call(t=>{if(!a)return t.node().remove();t.node().attr(Object.assign(Object.assign(Object.assign({},F5(0,h.max[1]+s,r,l)),{fontSize:12,textBaseline:"top",text:a}),u))})}};const D5=class extends sl{constructor(t){super(t),this.descriptor=E5}connectedCallback(){var t,e;null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}update(t={}){var e;this.attr(nt({},this.attributes,t)),null!=(e=(t=this.descriptor).render)&&e.call(t,this.attributes,this)}},z5=a=>({value:t,theme:e})=>{var{x:t,y:n,width:r,height:i}=t.bbox;return new D5({style:nt({},{style:e.title},Object.assign({x:t,y:n,width:r,height:i},a))})};function G5(t){return t.getBandWidth}function W5(t,e,n){if(!G5(t))return t.invert(e);var r=t["adjustedRange"],i=t.getOptions()["domain"],a=n?-1:0;const o=t.getStep();var t=n?r:r.map(t=>t+o),n=Xd(t,e);return r=n+a,t=0,e=i.length-1,i[Math.min(e,Math.max(t,r))]}function H5(t,e){var n,r;return G5(t)?(t=t.getOptions()["domain"],[n,r]=e,n=t.indexOf(n),r=t.indexOf(r),t.slice(n,r+1)):sp(e)}z5.props={defaultPosition:"top",defaultOrder:2,defaultSize:36};const Y5=t=>{const{orientation:c,labelFormatter:u,style:h}=t,f=et(t,["orientation","labelFormatter","size","style"]);return({scales:[e],value:t,theme:n})=>{var r,t=t["bbox"],{x:t,y:i,width:a,height:o}=t,{slider:n={}}=n;const s=(null==(r=e.getFormatter)?void 0:r.call(e))||(t=>t.toString()),l="string"==typeof u?l5(u):u;return new pw({className:"slider",style:Object.assign({},n,Object.assign(Object.assign({x:t,y:i,trackLength:"horizontal"===c?a:o,orientation:c,formatter:t=>{return(l||s)(W5(e,t,!0))}},h),f))})}},V5=(Y5.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>Y5(Object.assign(Object.assign({},t),{orientation:"horizontal"}))),q5=(V5.props=Object.assign(Object.assign({},Y5.props),{defaultPosition:"bottom"}),t=>Y5(Object.assign(Object.assign({},t),{orientation:"vertical"}))),U5=(q5.props=Object.assign(Object.assign({},Y5.props),{defaultPosition:"left"}),t=>{const{orientation:a,style:o}=t,s=et(t,["orientation","labelFormatter","style"]);return({value:t,theme:e})=>{var t=t["bbox"],{x:t,y:n,width:r,height:i}=t,{scrollbar:e={}}=e;return new yw({className:"scrollbar",style:Object.assign({},e,Object.assign(Object.assign(Object.assign(Object.assign({},o),{x:t,y:n,trackLength:"horizontal"===a?r:i}),s),{orientation:a,value:0,contentLength:1500,viewportLength:"horizontal"===a?r:i}))})}}),X5=(U5.props={defaultPosition:"bottom",defaultSize:24,defaultOrder:1},t=>U5(Object.assign(Object.assign({},t),{orientation:"horizontal"}))),$5=(X5.props=Object.assign(Object.assign({},U5.props),{defaultPosition:"bottom"}),t=>U5(Object.assign(Object.assign({},t),{orientation:"vertical"})));$5.props=Object.assign(Object.assign({},U5.props),{defaultPosition:"left"});class K5{constructor(t){this.$value=t}static of(t){return new K5(t)}call(t,...e){return this.$value=t(this.$value,...e),this}value(){return this.$value}}function Z5(t,e,n){return K5.of({}).call(Q5,t).call(Q5,e).call(Q5,n).value()}function Q5(t,e){for(var[n,r]of Object.entries(e))void 0!==r&&(t[n]=e[n]);return t}function J5(t,e){var n={};for(const i of e){var r=t.style[i];r&&(n[i]=r)}return n}const tO=["fill","stroke","fillOpacity","strokeOpacity","opacity","lineWidth"],eO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=Np(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,Z5(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},nO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=Np(r)?[[0,t],"scale(1, 0.0001)"]:[[0,0],"scale(0.0001, 1)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,Z5(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},rO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=Np(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],t=[{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.01},{transform:(o+" scale(1, 1)").trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c}],o=(a.setOrigin(r),a.animate(t,Z5(i,n,u)));return o.finished.then(()=>a.setOrigin(0,0)),o}},iO=u=>{return(t,e,n,r,i)=>{const[a]=t;var t=a.getBoundingClientRect()["height"],{transform:o="",fillOpacity:s=1,strokeOpacity:l=1,opacity:c=1}=a.style,[r,t]=Np(r)?[[0,0],"scale(0.0001, 1)"]:[[0,t],"scale(1, 0.0001)"],s=[{transform:(o+" scale(1, 1)").trimStart()},{transform:(o+" "+t).trimStart(),fillOpacity:s,strokeOpacity:l,opacity:c,offset:.99},{transform:(o+" "+t).trimStart(),fillOpacity:0,strokeOpacity:0,opacity:0}],l=(a.setOrigin(r),a.animate(s,Z5(i,n,u)));return l.finished.then(()=>a.setOrigin(0,0)),l}},aO=l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=t.style;return t.animate([{fillOpacity:0,strokeOpacity:0,opacity:0},{fillOpacity:a,strokeOpacity:o,opacity:s}],Z5(i,n,l))},oO=(aO.props={},l=>(t,e,n,r,i)=>{var[t]=t,{fillOpacity:a=1,strokeOpacity:o=1,opacity:s=1}=t.style;return t.animate([{fillOpacity:a,strokeOpacity:o,opacity:s},{fillOpacity:0,strokeOpacity:0,opacity:0}],Z5(i,n,l))});function sO(t){var{min:t,max:e}=t.getLocalBounds(),[t,n]=t,[e,r]=e;return[t,n,e-t,r-n]}function lO(t,e){var[n,r,i,t]=sO(t),a=Math.ceil(Math.sqrt(e/(t/i))),o=[],s=t/Math.ceil(e/a);let l=0,c=e;for(;0<c;){var u=Math.min(c,a),h=i/u;for(let t=0;t<u;t++){var f=n+t*h,d=r+l*s;o.push(function(t){var[t,e,n,r]=t;return`
|
|
2
2
|
M ${t} ${e}
|
|
3
3
|
L ${t+n} ${e}
|
|
4
4
|
L ${t+n} ${e+r}
|