Socket
Socket
Sign inDemoInstall

@antv/util

Package Overview
Dependencies
Maintainers
61
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antv/util - npm Package Compare versions

Comparing version 3.2.5 to 3.3.0

esm/math/index.d.ts

2

dist/util.min.js

@@ -1,1 +0,1 @@

!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).util={})}(this,function(t){"use strict";function L(t){return[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16)]}function n(t){t=Math.round(t).toString(16);return 1===t.length?"0"+t:t}function z(t){return"#"+n(t[0])+n(t[1])+n(t[2])}var r,V=/rgba?\(([\s.,0-9]+)\)/;function B(t){if("#"===t[0]&&7===t.length)return t;r||((n=document.createElement("i")).title="Web Colour Picker",n.style.display="none",document.body.appendChild(n),r=n),r.style.color=t;var n=document.defaultView.getComputedStyle(r,"").getPropertyValue("color");return z(V.exec(n)[1].split(/\s*,\s*/).map(function(t){return Number(t)}))}function R(t,n,r,e){return t[e]+(n[e]-t[e])*r}var D=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,_=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Q=/[\d.]+:(#[^\s]+|[^)]+\))/gi;var a="undefined"!=typeof Float32Array?Float32Array:Array;function h(t,n,r){var e=n[0],a=n[1],i=n[2],u=n[3],o=n[4],c=n[5],f=n[6],l=n[7],n=n[8],s=r[0],h=r[1],p=r[2],y=r[3],v=r[4],m=r[5],g=r[6],x=r[7],r=r[8];return t[0]=s*e+h*u+p*f,t[1]=s*a+h*o+p*l,t[2]=s*i+h*c+p*n,t[3]=y*e+v*u+m*f,t[4]=y*a+v*o+m*l,t[5]=y*i+v*c+m*n,t[6]=g*e+x*u+r*f,t[7]=g*a+x*o+r*l,t[8]=g*i+x*c+r*n,t}function Z(){var t=new a(3);return a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function U(t,n,r){var e=new a(3);return e[0]=t,e[1]=n,e[2]=r,e}Math.hypot||(Math.hypot=function(){for(var t=0,n=arguments.length;n--;)t+=arguments[n]*arguments[n];return Math.sqrt(t)});function W(){var t=new a(4);return a!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}Z(),q=new a(4),a!=Float32Array&&(q[0]=0,q[1]=0,q[2]=0,q[3]=0);function H(t,n,r){var e,a,i=[0,0,0,0,0,0,0,0,0];e=i,r=r,a=Math.sin(r),r=Math.cos(r),e[0]=r,e[1]=a,e[2]=0,e[3]=-a,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,h(t,i,n)}function G(t,n){return t[0]*n[1]-n[0]*t[1]}function g(t){return t.map(function(t){return Array.isArray(t)?[].concat(t):t})}Z(),U(1,0,0),U(0,1,0),W(),W(),q=new a(9),a!=Float32Array&&(q[1]=0,q[2]=0,q[3]=0,q[5]=0,q[6]=0,q[7]=0),q[0]=1,q[4]=1,q[8]=1,q=new a(2),a!=Float32Array&&(q[0]=0,q[1]=0);var x=function(){return(x=Object.assign||function(t){for(var n,r=1,e=arguments.length;r<e;r++)for(var a in n=arguments[r])Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a]);return t}).apply(this,arguments)},K={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var p={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function $(t){return Array.isArray(t)&&t.every(function(t){var n=t[0].toLowerCase();return p[n]===t.length-1&&"achlmqstvz".includes(n)})}function J(t){return $(t)&&t.every(function(t){t=t[0];return t===t.toUpperCase()})}function X(t){return J(t)&&t.every(function(t){t=t[0];return"ACLMQZ".includes(t)})}function Y(t){for(var n=t.pathValue[t.segmentStart],r=n.toLowerCase(),e=t.data;e.length>=p[r]&&("m"===r&&2<e.length?(t.segments.push([n].concat(e.splice(0,2))),r="l",n="m"===n?"l":"L"):t.segments.push([n].concat(e.splice(0,p[r]))),p[r]););}function y(t){return 48<=t&&t<=57}function v(t){for(var n,r=t.pathValue,e=t.max;t.index<e&&(10===(n=r.charCodeAt(t.index))||13===n||8232===n||8233===n||32===n||9===n||11===n||12===n||160===n||5760<=n&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(n));)t.index+=1}function tt(t){var n,r,e,a,i,u=t.max,o=t.pathValue,c=t.index,f=o.charCodeAt(c),l=p[o[c].toLowerCase()];if(t.segmentStart=c,function(t){switch(32|t){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(f))if(t.index+=1,v(t),t.data=[],l){for(;;){for(var s=l;0<s;--s){if(97!=(32|f)||3!==s&&4!==s?function(t){var n,r,e=t.max,a=t.pathValue,i=t.index,u=i,o=!1,c=!1,f=!1;if(e<=u)t.err="[path-util]: Invalid path value at index "+u+', "pathValue" is missing param';else if(y(r=43!==(r=a.charCodeAt(u))&&45!==r?r:a.charCodeAt(u+=1))||46===r){if(46!==r){if(n=48===r,r=a.charCodeAt(u+=1),n&&u<e&&r&&y(r))return t.err="[path-util]: Invalid path value at index "+i+', "'+a[i]+'" illegal number';for(;u<e&&y(a.charCodeAt(u));)u+=1,o=!0;r=a.charCodeAt(u)}if(46===r){for(f=!0,u+=1;y(a.charCodeAt(u));)u+=1,c=!0;r=a.charCodeAt(u)}if(101===r||69===r){if(f&&!o&&!c)return t.err="[path-util]: Invalid path value at index "+u+', "'+a[u]+'" invalid float exponent';if(43!==(r=a.charCodeAt(u+=1))&&45!==r||(u+=1),!(u<e&&y(a.charCodeAt(u))))return t.err="[path-util]: Invalid path value at index "+u+', "'+a[u]+'" invalid integer exponent';for(;u<e&&y(a.charCodeAt(u));)u+=1}t.index=u,t.param=+t.pathValue.slice(i,u)}else t.err="[path-util]: Invalid path value at index "+u+', "'+a[u]+'" is not a number'}(t):(i=a=e=void 0,e=(r=t).index,a=r.pathValue,48===(i=a.charCodeAt(e))?(r.param=0,r.index+=1):49===i?(r.param=1,r.index+=1):r.err='[path-util]: invalid Arc flag "'+a[e]+'", expecting 0 or 1 at index '+e),t.err.length)return;t.data.push(t.param),v(t),t.index<u&&44===o.charCodeAt(t.index)&&(t.index+=1,v(t))}if(t.index>=t.max)break;if(!(48<=(n=o.charCodeAt(t.index))&&n<=57||43===n||45===n||46===n))break}Y(t)}else Y(t);else t.err='[path-util]: Invalid path value "'+o[c]+'" is not a path command'}var nt=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 rt(t){if($(t))return g(t);var n=new nt(t);for(v(n);n.index<n.max&&!n.err.length;)tt(n);return n.err||n.segments}function et(t){if(J(t))return g(t);var t=rt(t),u=0,o=0,c=0,f=0;return t.map(function(t){var n=t.slice(1).map(Number),t=t[0],r=t.toUpperCase();if("M"===t)return u=n[0],o=n[1],["M",c=u,f=o];if(t!==r)switch(r){case"A":a=[r,n[0],n[1],n[2],n[3],n[4],n[5]+u,n[6]+o];break;case"V":a=[r,n[0]+o];break;case"H":a=[r,n[0]+u];break;default:var e=n.map(function(t,n){return t+(n%2?o:u)}),a=[r].concat(e)}else a=[r].concat(n);var i=a.length;switch(r){case"Z":u=c,o=f;break;case"H":u=a[1];break;case"V":o=a[1];break;default:u=a[i-2],o=a[i-1],"M"===r&&(c=u,f=o)}return a})}function A(t){if(X(t))return g(t);for(var n,r,e,a,i,u,o,c=et(t),f=x({},K),l=0;l<c.length;l+=1){c[l]=(n=c[l],r=f,o=u=h=i=s=a=e=void 0,e=n[0],a=r.x1,s=r.y1,i=r.x2,h=r.y2,u=n.slice(1).map(Number),o=n,"TQ".includes(e)||(r.qx=null,r.qy=null),"H"===e?o=["L",n[1],s]:"V"===e?o=["L",a,n[1]]:"S"===e?(n=2*s-h,o=["C",r.x1=2*a-i,r.y1=n].concat(u)):"T"===e?(h=2*a-r.qx,i=2*s-r.qy,o=["Q",r.qx=h,r.qy=i].concat(u)):"Q"===e&&(n=u[0],a=u[1],r.qx=n,r.qy=a),o);var s=c[l],h=s.length;f.x1=+s[h-2],f.y1=+s[h-1],f.x2=+s[h-4]||f.x1,f.y2=+s[h-3]||f.y1}return c}function O(t,n,r){return{x:t*Math.cos(r)-n*Math.sin(r),y:t*Math.sin(r)+n*Math.cos(r)}}function c(t,n,r){var e=t[0],t=t[1];return[e+(n[0]-e)*r,t+(n[1]-t)*r]}function T(t,n){return Math.sqrt((t[0]-n[0])*(t[0]-n[0])+(t[1]-n[1])*(t[1]-n[1]))}function P(t,n,r,e,a){var i=T([t,n],[r,e]),u={x:0,y:0};return{length:i,point:u="number"==typeof a?a<=0?{x:t,y:n}:i<=a?{x:r,y:e}:{x:(a=c([t,n],[r,e],a/i))[0],y:a[1]}:u,min:{x:Math.min(t,r),y:Math.min(n,e)},max:{x:Math.max(t,r),y:Math.max(n,e)}}}function at(t,n,r,e){var t=[t,n],n=[r,e],a=c(t,n,.5),n=c(n,a,.5),i=c(a,n,.5),u=c(n,i,.5),o=c(i,u,.5),t=P(t[0],t[1],a[0],a[1],i[0]).point,a=P(o[0],o[1],u[0],u[1],n[0]).point;return[t.x,t.y,a.x,a.y,r,e]}function it(t,n){var r,e,a,i,u,o,c=t[0],f=t.slice(1).map(Number),l=f[0],s=f[1],h=n.x1,p=n.y1,y=n.x,v=n.y;switch("TQ".includes(c)||(n.qx=null,n.qy=null),c){case"M":return n.x=l,n.y=s,t;case"A":return o=[h,p].concat(f),["C"].concat(function t(n,r,e,a,i,u,o,c,f,l){var s=120*Math.PI/180,h=Math.PI/180*(+i||0),p=[],y=(l?(M=l[0],b=l[1],x=l[2],d=l[3]):(n=(m=O(n,r,-h)).x,r=m.y,1<(y=(v=(n-(c=(m=O(c,f,-h)).x))/2)*v/(e*e)+(m=(r-(f=m.y))/2)*m/(a*a))&&(e*=y=Math.sqrt(y),a*=y),y=e*e,g=a*a,x=(u=(u===o?-1:1)*Math.sqrt(Math.abs((y*g-y*m*m-g*v*v)/(y*m*m+g*v*v))))*e*m/a+(n+c)/2,d=u*-a*v/e+(r+f)/2,M=Math.asin(((r-d)/a*Math.pow(10,9)>>0)/Math.pow(10,9)),b=Math.asin(((f-d)/a*Math.pow(10,9)>>0)/Math.pow(10,9)),M=n<x?Math.PI-M:M,b=c<x?Math.PI-b:b,M<0&&(M=2*Math.PI+M),b<0&&(b=2*Math.PI+b),o&&b<M&&(M-=2*Math.PI),!o&&M<b&&(b-=2*Math.PI)),b-M),v=(Math.abs(y)>s&&(g=b,m=c,u=f,b=M+s*(o&&M<b?1:-1),p=t(c=x+e*Math.cos(b),f=d+a*Math.sin(b),e,a,i,0,o,m,u,[b,g,x,d])),y=b-M,Math.cos(M)),s=Math.sin(M),i=Math.cos(b),o=Math.sin(b),m=Math.tan(y/4),u=4/3*e*m,g=4/3*a*m,x=[n,r],d=[n+u*s,r-g*v],M=[c+u*o,f-g*i],b=[c,f];if(d[0]=2*x[0]-d[0],d[1]=2*x[1]-d[1],l)return d.concat(M,b,p);for(var w=[],A=0,C=(p=d.concat(M,b,p)).length;A<C;A+=1)w[A]=A%2?O(p[A-1],p[A],h).y:O(p[A],p[A+1],h).x;return w}(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9]));case"Q":return n.qx=l,n.qy=s,o=[h,p].concat(f),["C"].concat((r=o[0],e=o[1],a=o[2],i=o[3],u=o[4],o=o[5],[1/3*r+2/3*a,1/3*e+2/3*i,1/3*u+2/3*a,1/3*o+2/3*i,u,o]));case"L":return["C"].concat(at(h,p,l,s));case"Z":return h===y&&p===v?["C",h,p,y,v,y,v]:["C"].concat(at(h,p,y,v))}return t}function ut(t,n){var r;if(void 0===n&&(n=!1),X(r=t)&&r.every(function(t){t=t[0];return"MC".includes(t)}))return r=g(t),n?[r,[]]:r;for(var e,a=A(t),i=x({},K),u=[],o="",c=a.length,f=[],l=0;l<c;l+=1){a[l]&&(o=a[l][0]),u[l]=o;var s=it(a[l],i),h=(a[l]=s,m=v=y=p=h=void 0,a),p=u,y=l;if(7<h[y].length){h[y].shift();for(var v=h[y],m=y;v.length;)p[y]="A",h.splice(m+=1,0,["C"].concat(v.splice(0,6)));h.splice(y,1)}c=a.length,"Z"===o&&f.push(l),e=(s=a[l]).length,i.x1=+s[e-2],i.y1=+s[e-1],i.x2=+s[e-4]||i.x1,i.y2=+s[e-3]||i.y1}return n?[a,f]:a}function ot(t,n){var r=t.x,t=t.y,e=n.x,n=n.y,a=r*e+t*n,i=Math.sqrt((Math.pow(r,2)+Math.pow(t,2))*(Math.pow(e,2)+Math.pow(n,2)));return(r*n-t*e<0?-1:1)*Math.acos(a/i)}function ct(t,n,r,e,a,i,u,o,c,f,l){var s=l.bbox,h=void 0===s||s,s=l.length,p=void 0===s||s,s=l.sampleSize,y=void 0===s?30:s,v="number"==typeof f,m=0,g=[A=t,C=n,m],x=[A,C],d={x:0,y:0},M=[{x:A,y:C}];v&&f<=0&&(d={x:A,y:C});for(var b=0;b<=y;b+=1){var w,A=(w=function(t,n,r,e,a,i,u,o,c,f){var l=Math.abs,s=Math.sin,h=Math.cos,p=Math.sqrt,y=Math.PI,r=l(r),l=l(e),e=y/180*((a%360+360)%360);if(t===o&&n===c)return{x:t,y:n};if(0===r||0===l)return P(t,n,o,c,f).point;var a=(t-o)/2,v=(n-c)/2,a={x:h(e)*a+s(e)*v,y:-s(e)*a+h(e)*v};return 1<(v=Math.pow(a.x,2)/Math.pow(r,2)+Math.pow(a.y,2)/Math.pow(l,2))&&(r*=p(v),l*=p(v)),v=(Math.pow(r,2)*Math.pow(l,2)-Math.pow(r,2)*Math.pow(a.y,2)-Math.pow(l,2)*Math.pow(a.x,2))/(Math.pow(r,2)*Math.pow(a.y,2)+Math.pow(l,2)*Math.pow(a.x,2)),i=(i!==u?1:-1)*p(v=v<0?0:v),p=r*a.y/l*i,v=-l*a.x/r*i,i=h(e)*p-s(e)*v+(t+o)/2,t=s(e)*p+h(e)*v+(n+c)/2,n=ot({x:1,y:0},o={x:(a.x-p)/r,y:(a.y-v)/l}),c=ot(o,{x:(-a.x-p)/r,y:(-a.y-v)/l}),!u&&0<c?c-=2*y:u&&c<0&&(c+=2*y),o=n+(c%=2*y)*f,p=r*h(o),a=l*s(o),{x:h(e)*p-s(e)*a+i,y:s(e)*p+h(e)*a+t}}(t,n,r,e,a,i,u,o,c,b/y)).x,C=w.y;h&&M.push({x:A,y:C}),p&&(m+=T(x,[A,C])),x=[A,C],v&&f<=m&&f>g[2]&&(w=(m-f)/(m-g[2]),d={x:x[0]*(1-w)+g[0]*w,y:x[1]*(1-w)+g[1]*w}),g=[A,C,m]}return{length:m,point:d=v&&m<=f?{x:o,y:c}:d,min:{x:Math.min.apply(null,M.map(function(t){return t.x})),y:Math.min.apply(null,M.map(function(t){return t.y}))},max:{x:Math.max.apply(null,M.map(function(t){return t.x})),y:Math.max.apply(null,M.map(function(t){return t.y}))}}}function ft(t,n,r,e,a,i,u,o,c,f){var l=f.bbox,s=void 0===l||l,l=f.length,h=void 0===l||l,l=f.sampleSize,p=void 0===l?10:l,y="number"==typeof c,v=t,m=n,g=0,x=[v,m,g],d=[v,m],M={x:0,y:0},b=[{x:v,y:m}];y&&c<=0&&(M={x:v,y:m});for(var w,A,C,O,P,j,q,k,I,S,F=0;F<=p;F+=1)w=t,A=n,C=r,O=e,P=a,j=i,q=u,k=o,S=void 0,S=1-(I=F/p),v=(w={x:Math.pow(S,3)*w+3*Math.pow(S,2)*I*C+3*S*Math.pow(I,2)*P+Math.pow(I,3)*q,y:Math.pow(S,3)*A+3*Math.pow(S,2)*I*O+3*S*Math.pow(I,2)*j+Math.pow(I,3)*k}).x,m=w.y,s&&b.push({x:v,y:m}),h&&(g+=T(d,[v,m])),d=[v,m],y&&c<=g&&c>x[2]&&(C=(g-c)/(g-x[2]),M={x:d[0]*(1-C)+x[0]*C,y:d[1]*(1-C)+x[1]*C}),x=[v,m,g];return{length:g,point:M=y&&g<=c?{x:u,y:o}:M,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 lt(t,n,r,e,a,i,u,o){var c=o.bbox,f=void 0===c||c,c=o.length,l=void 0===c||c,c=o.sampleSize,s=void 0===c?10:c,h="number"==typeof u,p=t,y=n,v=0,m=[p,y,v],g=[p,y],x={x:0,y:0},d=[{x:p,y:y}];h&&u<=0&&(x={x:p,y:y});for(var M,b,w,A,C,O,P,j,q=0;q<=s;q+=1)M=t,b=n,w=r,A=e,C=a,O=i,j=void 0,j=1-(P=q/s),p=(M={x:Math.pow(j,2)*M+2*j*P*w+Math.pow(P,2)*C,y:Math.pow(j,2)*b+2*j*P*A+Math.pow(P,2)*O}).x,y=M.y,f&&d.push({x:p,y:y}),l&&(v+=T(g,[p,y])),g=[p,y],h&&u<=v&&u>m[2]&&(w=(v-u)/(v-m[2]),x={x:g[0]*(1-w)+m[0]*w,y:g[1]*(1-w)+m[1]*w}),m=[p,y,v];return{length:v,point:x=h&&v<=u?{x:a,y:i}:x,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,d.map(function(t){return t.x})),y:Math.max.apply(null,d.map(function(t){return t.y}))}}}function o(t,n,r){for(var e,a,i,u=A(t),o="number"==typeof n,c=[],f=0,l=0,s=0,h=0,p=[],y=[],v=0,m={x:0,y:0},g=m,x=m,d=m,M=0,b=0,w=u.length;b<w;b+=1)c=(e="M"===(a=(i=u[b])[0]))?c:[f,l].concat(i.slice(1)),e?(g=m={x:s=i[1],y:h=i[2]},v=0,o&&n<.001&&(d=m)):"L"===a?(v=(e=P(c[0],c[1],c[2],c[3],(n||0)-M)).length,m=e.min,g=e.max,x=e.point):"A"===a?(v=(e=ct(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],(n||0)-M,r||{})).length,m=e.min,g=e.max,x=e.point):"C"===a?(v=(e=ft(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],(n||0)-M,r||{})).length,m=e.min,g=e.max,x=e.point):"Q"===a?(v=(e=lt(c[0],c[1],c[2],c[3],c[4],c[5],(n||0)-M,r||{})).length,m=e.min,g=e.max,x=e.point):"Z"===a&&(v=(e=P((c=[f,l,s,h])[0],c[1],c[2],c[3],(n||0)-M)).length,m=e.min,g=e.max,x=e.point),o&&M<n&&n<=M+v&&(d=x),y.push(g),p.push(m),M+=v,f=(e="Z"!==a?i.slice(-2):[s,h])[0],l=e[1];return{length:M,point:d=o&&M<=n?{x:f,y:l}:d,min:{x:Math.min.apply(null,p.map(function(t){return t.x})),y:Math.min.apply(null,p.map(function(t){return t.y}))},max:{x:Math.max.apply(null,y.map(function(t){return t.x})),y:Math.max.apply(null,y.map(function(t){return t.y}))}}}function d(t,n){return o(t,void 0,x(x({},n),{bbox:!1,length:!0})).length}function st(t){var o=0,c=0,f=0;return ut(t).map(function(t){if("M"===t[0])return o=t[1],c=t[2],0;var n=t.slice(1),r=n[0],e=n[1],a=n[2],i=n[3],u=n[4],n=n[5];return f=3*((n-c)*(r+a)-(u-o)*(e+i)+e*(o-a)-r*(c-i)+n*(a+o/3)-u*(i+c/3))/20,e=t.slice(-2),o=e[0],c=e[1],f}).reduce(function(t,n){return t+n},0)}function M(t,n,r){return o(t,n,x(x({},r),{bbox:!1,length:!0})).point}function ht(t,r){for(var n,e,a,i,u,t=rt(t),o=A(t),c=d(t),f=function(t){var n=t.x-r.x,t=t.y-r.y;return n*n+t*t},l=8,s=0,h=1/0,p=0;p<=c;p+=l)(e=f(n=M(o,p)))<h&&(a=n,s=p,h=e);l/=2;for(var y,v,m,g;.5<l;)m=f(i=M(o,y=s-l)),g=f(u=M(o,v=s+l)),0<=y&&m<h?(a=i,s=y,h=m):v<=c&&g<h?(a=u,s=v,h=g):l/=2;t=function(t,n){if("string"==typeof(t=rt(t)))throw TypeError(t);var r=t.slice(),e=d(r),a=r.length-1,i=0,u=0,o=t[0],c={x:(c=o.slice(-2))[0],y:c[1]};if(a<=0||!n||!Number.isFinite(n))return{segment:o,index:0,length:u,point:c,lengthAtSegment:i};if(e<=n)return i=d(r=t.slice(0,-1)),{segment:t[a],index:a,length:u=e-i,lengthAtSegment:i};for(var f=[];0<a;)o=r[a],u=e-(i=d(r=r.slice(0,-1))),e=i,f.push({segment:o,index:a,length:u,lengthAtSegment:i}),--a;return f.find(function(t){return t.lengthAtSegment<=n})}(t,s);return{closest:a,distance:Math.sqrt(h),segment:t}}function pt(t){return t.map(function(t,n,r){var e,a,i,u,r=n&&r[n-1].slice(-2).concat(t.slice(1)),o=n?ft(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],{bbox:!1}).length:0,r=n?o?(void 0===e&&(e=.5),r=(n=r).slice(0,2),a=n.slice(2,4),i=n.slice(4,6),n=n.slice(6,8),r=c(r,a,e),a=c(a,i,e),i=c(i,n,e),u=c(r,a,e),a=c(a,i,e),e=c(u,a,e),[["C"].concat(r,u,e),["C"].concat(a,i,n)]):[t,t]:[t];return{s:t,ss:r,l:o}})}function e(t,n){return!!f(t)&&-1<t.indexOf(n)}function yt(t,n){if(!f(t))return t;for(var r=[],e=0;e<t.length;e++){var a=t[e];n(a,e)&&r.push(a)}return r}function i(t){var n=typeof t;return null!==t&&"object"==n||"function"==n}var f=function(t){return null!==t&&"function"!=typeof t&&isFinite(t.length)},vt={}.toString,u=function(t,n){return vt.call(t)==="[object "+n+"]"},l=function(t){return u(t,"Function")},s=function(t){return null==t},m=function(t){return Array.isArray?Array.isArray(t):u(t,"Array")};function b(t,n){if(t)if(m(t))for(var r=0,e=t.length;r<e&&!1!==n(t[r],r);r++);else if(i(t))for(var a in t)if(t.hasOwnProperty(a)&&!1===n(t[a],a))break}var mt=Object.keys?function(t){return Object.keys(t)}:function(r){var e=[];return b(r,function(t,n){l(r)&&"prototype"===n||e.push(n)}),e};function gt(t,n){var r=mt(n),e=r.length;if(s(t))return!e;for(var a=0;a<e;a+=1){var i=r[a];if(n[i]!==t[i]||!(i in t))return!1}return!0}var w=function(t){return"object"==typeof t&&null!==t},C=function(t){if(!w(t)||!u(t,"Object"))return!1;if(null===Object.getPrototypeOf(t))return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(t)===n};function xt(t,n){if(void 0===n&&(n=[]),m(t))for(var r=0;r<t.length;r+=1)xt(t[r],n);else n.push(t);return n}function dt(t){if(m(t))return t.reduce(function(t,n){return Math.max(t,n)},t[0])}function Mt(t){if(m(t))return t.reduce(function(t,n){return Math.min(t,n)},t[0])}function bt(t,n){if(!f(t))return[];for(var r=t?n.length:0,e=r-1;r--;){var a=void 0,i=n[r];r!==e&&i===a||Ot.call(t,a=i,1)}return t}function wt(t,r,n){if(!m(t)&&!C(t))return t;var e=n;return b(t,function(t,n){e=r(e,t,n)}),e}function j(t){return u(t,"String")}var q=Array.prototype,At=q.splice,Ct=q.indexOf,Ot=Array.prototype.splice;function Pt(t,n){void 0===n&&(n=new Map);var r=[];if(Array.isArray(t))for(var e=0,a=t.length;e<a;e++){var i=t[e];n.has(i)||(r.push(i),n.set(i,!0))}return r}var jt=Object.prototype.hasOwnProperty;function qt(t,n){if(!n||!m(t))return{};for(var r={},e=l(n)?n:function(t){return t[n]},a=0;a<t.length;a++){var i=t[a],u=e(i);jt.call(r,u)?r[u].push(i):r[u]=[i]}return r}function kt(t,n){return n?(l(n)||(a=m(n)?n:n.replace(/\s+/g,"").split("*"),n=function(t){for(var n="_",r=0,e=a.length;r<e;r++)n+=t[a[r]]&&t[a[r]].toString();return n}),qt(t,n)):{0:t};var a}var It={};function k(t){return u(t,"Number")}q=Number.isInteger||function(t){return k(t)&&t%1==0};function St(t,n){return t.hasOwnProperty(n)}function I(t){return s(t)?"":t.toString()}var Ft=180/Math.PI,Tt=parseInt,Et=Math.PI/180,Nt=Object.values?function(t){return Object.values(t)}:function(r){var e=[];return b(r,function(t,n){l(r)&&"prototype"===n||e.push(t)}),e};function Lt(t){return zt.call(t).replace(/^\[object /,"").replace(/]$/,"")}var zt={}.toString;function Vt(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||Bt)}var Bt=Object.prototype;function Rt(t,n){for(var r in n)n.hasOwnProperty(r)&&"constructor"!==r&&void 0!==n[r]&&(t[r]=n[r])}function S(t,n,r,e){return n&&Rt(t,n),r&&Rt(t,r),e&&Rt(t,e),t}function Dt(t){if("object"!=typeof t||null===t)return t;if(m(t))for(var n=[],r=0,e=t.length;r<e;r++)"object"==typeof t[r]&&null!=t[r]?n[r]=Dt(t[r]):n[r]=t[r];else for(var a in n={},t)"object"==typeof t[a]&&null!=t[a]?n[a]=Dt(t[a]):n[a]=t[a];return n}var _t=5;var Qt=Object.prototype.hasOwnProperty;function F(t,n){if(t===n)return!0;if(t&&n&&!j(t)&&!j(n)){if(f(t)||f(n)){if(t.length!==n.length)return!1;for(var r=!0,e=0;e<t.length&&(r=F(t[e],n[e]));e++);return r}if(w(t)||w(n)){var a=Object.keys(t),i=Object.keys(n);if(a.length!==i.length)return!1;for(r=!0,e=0;e<a.length&&(r=F(t[a[e]],n[a[e]]));e++);return r}}return!1}function Zt(t){return t}var Ut=Object.prototype.hasOwnProperty,E={};function N(){this.map={}}N.prototype.has=function(t){return void 0!==this.map[t]},N.prototype.get=function(t,n){t=this.map[t];return void 0===t?n:t},N.prototype.set=function(t,n){this.map[t]=n},N.prototype.clear=function(){this.map={}},N.prototype.delete=function(t){delete this.map[t]},N.prototype.size=function(){return Object.keys(this.map).length},t.Cache=N,t.angleTo=function(t,n,r){a=n,u=(e=t)[0],e=e[1],o=a[0],a=a[1],i=Math.sqrt(u*u+e*e)*Math.sqrt(o*o+a*a);var e,a,i,u=Math.acos(Math.min(Math.max(i&&(u*o+e*a)/i,-1),1)),o=0<=G(t,n);return r?o?2*Math.PI-u:u:o?u:2*Math.PI-u},t.assign=S,t.augment=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=t[0],e=1;e<t.length;e++){var a=t[e];l(a)&&(a=a.prototype),S(r.prototype,a)}},t.clamp=function(t,n,r){return t<n?n:r<t?r:t},t.clearAnimationFrame=function(t){(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout)(t)},t.clone=Dt,t.clonePath=g,t.contains=e,t.debounce=function(e,a,i){var u;return function(){var t=this,n=arguments,r=i&&!u;clearTimeout(u),u=setTimeout(function(){u=null,i||e.apply(t,n)},a),r&&e.apply(t,n)}},t.deepMix=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var e=0;e<n.length;e+=1)!function t(n,r,e,a){for(var i in e=e||0,a=a||_t,r){var u;r.hasOwnProperty(i)&&(null!==(u=r[i])&&C(u)?(C(n[i])||(n[i]={}),e<a?t(n[i],u,e+1,a):n[i]=r[i]):m(u)?(n[i]=[],n[i]=n[i].concat(u)):void 0!==u&&(n[i]=u))}}(t,n[e]);return t},t.difference=function(t,n){return void 0===n&&(n=[]),yt(t,function(t){return!e(n,t)})},t.direction=G,t.distanceSquareRoot=T,t.each=b,t.endsWith=function(t,n){return!(!m(t)&&!j(t))&&t[t.length-1]===n},t.equalizeSegments=function t(n,r,e){var a,n=pt(n),r=pt(r),i=n.length,u=r.length,o=n.filter(function(t){return t.l}).length,c=r.filter(function(t){return t.l}).length,o=n.filter(function(t){return t.l}).reduce(function(t,n){return t+n.l},0)/o||0,c=r.filter(function(t){return t.l}).reduce(function(t,n){return t+n.l},0)/c||0,f=e||Math.max(i,u),l=[o,c],s=[f-i,f-u],e=[n,r].map(function(t,r){return t.l===f?t.map(function(t){return t.s}):t.map(function(t,n){return a=n&&s[r]&&t.l>=l[r],s[r]-=a?1:0,a?t.ss:[t.s]}).flat()});return e[0].length===e[1].length?e:t(e[0],e[1],f)},t.every=function(t,n){for(var r=0;r<t.length;r++)if(!n(t[r],r))return!1;return!0},t.extend=function(t,n,r,e){l(n)||(r=n,n=t,t=function(){});var a=Object.create?function(t,n){return Object.create(t,{constructor:{value:n}})}:function(t,n){function r(){}r.prototype=t;t=new r;return t.constructor=n,t},i=a(n.prototype,t);return t.prototype=S(i,t.prototype),t.superclass=a(n.prototype,n),S(i,r),S(t,e),t},t.filter=yt,t.find=function(t,n){var r;if(m(t)&&(l(n)&&(r=n),r=C(n)?function(t){return gt(t,n)}:r))for(var e=0;e<t.length;e+=1)if(r(t[e]))return t[e];return null},t.findIndex=function(t,n,r){for(var e=r=void 0===r?0:r;e<t.length;e++)if(n(t[e],e))return e;return-1},t.firstValue=function(t,n){for(var r=null,e=0;e<t.length;e++){var a=t[e][n];if(!s(a)){r=m(a)?a[0]:a;break}}return r},t.fixedBase=function(t,n){var n=n.toString(),r=n.indexOf(".");if(-1===r)return Math.round(t);n=n.substr(r+1).length;return 20<n&&(n=20),parseFloat(t.toFixed(n))},t.flatten=function(t){if(!m(t))return[];for(var n=[],r=0;r<t.length;r++)n=n.concat(t[r]);return n},t.flattenDeep=xt,t.forIn=b,t.get=function(t,n,r){for(var e=0,a=j(n)?n.split("."):n;t&&e<a.length;)t=t[a[e++]];return void 0===t||e<a.length?r:t},t.getDrawDirection=function(t){return 0<=st(t)},t.getPathArea=st,t.getPathBBox=function(t,n){if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var t=o(t,void 0,x(x({},n),{length:!1})),r=(n=t.min).x,n=n.y,e=(t=t.max).x,t=t.y,a=e-r,i=t-n;return{width:a,height:i,x:r,y:n,x2:e,y2:t,cx:r+a/2,cy:n+i/2,cz:Math.max(a,i)+Math.min(a,i)/2}},t.getPathBBoxTotalLength=function(t,n){if(!t)return{length:0,x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var n=(t=o(t,void 0,x(x({},n),{bbox:!0,length:!0}))).length,r=(e=t.min).x,e=e.y,a=(t=t.max).x,t=t.y,i=a-r,u=t-e;return{length:n,width:i,height:u,x:r,y:e,x2:a,y2:t,cx:r+i/2,cy:e+u/2,cz:Math.max(i,u)+Math.min(i,u)/2}},t.getPointAtLength=M,t.getRange=function(t){var n=t.filter(function(t){return!isNaN(t)});if(!n.length)return{min:0,max:0};if(m(t[0])){for(var r=[],e=0;e<t.length;e++)r=r.concat(t[e]);n=r}var a=dt(n);return{min:Mt(n),max:a}},t.getRotatedCurve=function(e,a){var i,u,o,c=e.length-1,n=[],f=0,t=(u=(i=e).length,o=u-1,i.map(function(t,e){return i.map(function(t,n){var r=e+n;return 0===n||i[r]&&"M"===i[r][0]?(n=i[r],["M"].concat(n.slice(-2))):(u<=r&&(r-=o),i[r])})}));return t.forEach(function(t,r){e.slice(1).forEach(function(t,n){f+=T(e[(r+n)%c].slice(-2),a[n%c].slice(-2))}),n[r]=f,f=0}),t[n.indexOf(Math.min.apply(null,n))]},t.getTotalLength=d,t.getType=Lt,t.getWrapBehavior=function(t,n){return t["_wrap_"+n]},t.gradient=function(t){var i=("string"==typeof t?t.split("-"):t).map(function(t){return L(-1===t.indexOf("#")?B(t):t)});return function(t){return n=i,t=t,t=isNaN(Number(t))||t<0?0:1<t?1:Number(t),r=n.length-1,e=Math.floor(r*t),t=r*t-e,a=n[e],r=e===r?a:n[e+1],z([R(a,r,t,0),R(a,r,t,1),R(a,r,t,2)]);var n,r,e,a}},t.group=function(t,n){if(!n)return[t];var r,e=kt(t,n),a=[];for(r in e)a.push(e[r]);return a},t.groupBy=qt,t.groupToMap=kt,t.has=St,t.hasKey=St,t.hasValue=function(t,n){return e(Nt(t),n)},t.head=function(t){if(f(t))return t[0]},t.identity=function(t){return t},t.includes=e,t.indexOf=function(t,n){if(!f(t))return-1;var r=Array.prototype.indexOf;if(r)return r.call(t,n);for(var e=-1,a=0;a<t.length;a++)if(t[a]===n){e=a;break}return e},t.isArguments=function(t){return u(t,"Arguments")},t.isArray=m,t.isArrayLike=f,t.isBoolean=function(t){return u(t,"Boolean")},t.isDate=function(t){return u(t,"Date")},t.isDecimal=function(t){return k(t)&&t%1!=0},t.isElement=function(t){return t instanceof Element||t instanceof HTMLDocument},t.isEmpty=function(t){if(!s(t)){if(f(t))return!t.length;var n,r=Lt(t);if("Map"===r||"Set"===r)return!t.size;if(Vt(t))return!Object.keys(t).length;for(n in t)if(Qt.call(t,n))return!1}return!0},t.isEqual=F,t.isEqualWith=function(t,n,r){return l(r)?!!r(t,n):F(t,n)},t.isError=function(t){return u(t,"Error")},t.isEven=function(t){return k(t)&&t%2==0},t.isFinite=function(t){return k(t)&&isFinite(t)},t.isFunction=l,t.isInteger=q,t.isMatch=gt,t.isNegative=function(t){return k(t)&&t<0},t.isNil=s,t.isNull=function(t){return null===t},t.isNumber=k,t.isNumberEqual=function(t,n,r){return void 0===r&&(r=1e-5),Math.abs(t-n)<r},t.isObject=i,t.isObjectLike=w,t.isOdd=function(t){return k(t)&&t%2!=0},t.isPlainObject=C,t.isPointInStroke=function(t,n){return t=ht(t,n).distance,Math.abs(t)<.001},t.isPositive=function(t){return k(t)&&0<t},t.isPrototype=Vt,t.isRegExp=function(t){return u(t,"RegExp")},t.isString=j,t.isType=u,t.isUndefined=function(t){return void 0===t},t.keys=mt,t.last=function(t){if(f(t))return t[t.length-1]},t.lowerCase=function(t){return I(t).toLowerCase()},t.lowerFirst=function(t){t=I(t);return t.charAt(0).toLowerCase()+t.substring(1)},t.map=function(t,n){if(!f(t))return t;for(var r=[],e=0;e<t.length;e++){var a=t[e];r.push(n(a,e))}return r},t.mapValues=function(n,r){void 0===r&&(r=Zt);var e={};return i(n)&&!s(n)&&Object.keys(n).forEach(function(t){e[t]=r(n[t],t)}),e},t.max=dt,t.maxBy=function(t,n){if(m(t)){for(var r,e=-1/0,a=0;a<t.length;a++){var i=t[a],u=l(n)?n(i):i[n];e<u&&(r=i,e=u)}return r}},t.memoize=function(i,u){if(!l(i))throw new TypeError("Expected a function");function o(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=u?u.apply(this,t):t[0],e=o.cache;if(e.has(r))return e.get(r);var a=i.apply(this,t);return e.set(r,a),a}return o.cache=new Map,o},t.min=Mt,t.minBy=function(t,n){if(m(t)){for(var r,e=1/0,a=0;a<t.length;a++){var i=t[a],u=l(n)?n(i):i[n];u<e&&(r=i,e=u)}return r}},t.mix=S,t.mod=function(t,n){return(t%n+n)%n},t.noop=function(){},t.normalizePath=A,t.number2color=function(t){var n=It[t];if(!n){for(var r=t.toString(16),e=r.length;e<6;e++)r="0"+r;It[t]=n="#"+r}return n},t.omit=function(t,e){return wt(t,function(t,n,r){return e.includes(r)||(t[r]=n),t},{})},t.parseRadius=function(t){var n=0,r=0,e=0,a=0;return m(t)?1===t.length?n=r=e=a=t[0]:2===t.length?(n=e=t[0],r=a=t[1]):3===t.length?(n=t[0],r=a=t[1],e=t[2]):(n=t[0],r=t[1],e=t[2],a=t[3]):n=r=e=a=t,{r1:n,r2:r,r3:e,r4:a}},t.path2Absolute=et,t.path2Curve=ut,t.path2String=function(t,n){return function(t,r){if("off"===r)return g(t);var e="number"==typeof r&&1<=r?Math.pow(10,r):1;return t.map(function(t){var n=t.slice(1).map(Number).map(function(t){return r?Math.round(t*e)/e:Math.round(t)});return[t[0]].concat(n)})}(t,n=void 0===n?"off":n).map(function(t){return t[0]+t.slice(1).join(" ")}).join("")},t.pick=function(n,t){if(null===n||!C(n))return{};var r={};return b(t,function(t){Ut.call(n,t)&&(r[t]=n[t])}),r},t.pull=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];for(var e=0;e<n.length;e++)for(var a,i=n[e];-1<(a=Ct.call(t,i));)At.call(t,a,1);return t},t.pullAt=bt,t.reduce=wt,t.remove=function(t,n){var r=[];if(f(t)){for(var e=-1,a=[],i=t.length;++e<i;){var u=t[e];n(u,e,t)&&(r.push(u),a.push(e))}bt(t,a)}return r},t.requestAnimationFrame=function(t){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return setTimeout(t,16)})(t)},t.reverseCurve=function(e){var t=e.slice(1).map(function(t,n,r){return(n?r[n-1].slice(-2):e[0].slice(1)).concat(t.slice(1))}).map(function(r){return r.map(function(t,n){return r[r.length-n-2*(1-n%2)]})}).reverse();return[["M"].concat(t[0].slice(0,2))].concat(t.map(function(t){return["C"].concat(t.slice(2))}))},t.rgb2arr=L,t.set=function(t,n,r){var e=t,a=j(n)?n.split("."):n;return a.forEach(function(t,n){n<a.length-1?(i(e[t])||(e[t]=k(a[n+1])?[]:{}),e=e[t]):e[t]=r}),t},t.size=function(t){return s(t)?0:(f(t)?t:Object.keys(t)).length},t.some=function(t,n){for(var r=0;r<t.length;r++)if(n(t[r],r))return!0;return!1},t.sortBy=function(t,r){var a,n=l(r)?function(t,n){return r(t)-r(n)}:(a=[],j(r)?a.push(r):m(r)&&(a=r),function(t,n){for(var r=0;r<a.length;r+=1){var e=a[r];if(t[e]>n[e])return 1;if(t[e]<n[e])return-1}return 0});return t.sort(n),t},t.startsWith=function(t,n){return!(!m(t)&&!j(t))&&t[0]===n},t.substitute=function(t,r){return t&&r?t.replace(/\\?\{([^{}]+)\}/g,function(t,n){return"\\"===t.charAt(0)?t.slice(1):void 0===r[n]?"":r[n]}):t},t.throttle=function(r,e,a){function i(){l=!1===a.leading?0:Date.now(),u=null,f=r.apply(o,c),u||(o=c=null)}function t(){var t=Date.now(),n=(l||!1!==a.leading||(l=t),e-(t-l));return o=this,c=arguments,n<=0||e<n?(u&&(clearTimeout(u),u=null),l=t,f=r.apply(o,c),u||(o=c=null)):u||!1===a.trailing||(u=setTimeout(i,n)),f}var u,o,c,f,l=0;a=a||{};return t.cancel=function(){clearTimeout(u),l=0,u=o=c=null},t},t.toArray=function(t){return f(t)?Array.prototype.slice.call(t):[]},t.toCSSGradient=function(t){var n,r,e,a,i;return/^[r,R,L,l]{1}[\s]*\(/.test(t)?(r=void 0,"l"===t[0]?(n=+(a=D.exec(t))[1]+90,r=a[2],e="linear-gradient("+n+"deg, "):"r"===t[0]&&(e="radial-gradient(",r=(a=_.exec(t))[4]),(i=r.match(Q)).forEach(function(t,n){t=t.split(":");e+=t[1]+" "+100*Number(t[0])+"%",n!==i.length-1&&(e+=", ")}),e+=")"):t},t.toDegree=function(t){return Ft*t},t.toInteger=Tt,t.toRGB=B,t.toRadian=function(t){return Et*t},t.toString=I,t.transform=function(t,n){for(var r,e,a,i,u,o,c=t?[].concat(t):[1,0,0,0,1,0,0,0,1],f=0,l=n.length;f<l;f++){var s=n[f];switch(s[0]){case"t":a=e=c,i=[s[1],s[2]],u=void 0,i=i,(u=o=[0,0,0,0,0,0,0,0,0])[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=i[0],u[7]=i[1],u[8]=1,h(e,o,a);break;case"s":u=i=c,e=[s[1],s[2]],o=void 0,(o=a=[0,0,0,0,0,0,0,0,0])[0]=(e=e)[0],o[1]=0,o[2]=0,o[3]=0,o[4]=e[1],o[5]=0,o[6]=0,o[7]=0,o[8]=1,h(i,a,u);break;case"r":H(c,c,s[1]);break;case"m":r=s[1],h(c,r,c)}}return c},t.union=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Pt([].concat.apply([],t))},t.uniq=Pt,t.uniqueId=function(t){return E[t=t||"g"]?E[t]+=1:E[t]=1,t+E[t]},t.upperCase=function(t){return I(t).toUpperCase()},t.upperFirst=function(t){t=I(t);return t.charAt(0).toUpperCase()+t.substring(1)},t.values=Nt,t.valuesOfKey=function(t,n){for(var r=[],e={},a=0;a<t.length;a++){var i=t[a][n];if(!s(i)){m(i)||(i=[i]);for(var u=0;u<i.length;u++){var o=i[u];e[o]||(r.push(o),e[o]=!0)}}}return r},t.vertical=function(t,n,r){return r?(t[0]=n[1],t[1]=-1*n[0]):(t[0]=-1*n[1],t[1]=n[0]),t},t.wrapBehavior=function(n,r){return n["_wrap_"+r]||(n["_wrap_"+r]=t);function t(t){n[r](t)}},Object.defineProperty(t,"__esModule",{value:!0})});
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n="undefined"!=typeof globalThis?globalThis:n||self).util={})}(this,function(n){"use strict";function L(n){return[parseInt(n.substr(1,2),16),parseInt(n.substr(3,2),16),parseInt(n.substr(5,2),16)]}function t(n){n=Math.round(n).toString(16);return 1===n.length?"0"+n:n}function z(n){return"#"+t(n[0])+t(n[1])+t(n[2])}var r,V=/rgba?\(([\s.,0-9]+)\)/;function B(n){if("#"===n[0]&&7===n.length)return n;r||((t=document.createElement("i")).title="Web Colour Picker",t.style.display="none",document.body.appendChild(t),r=t),r.style.color=n;var t=document.defaultView.getComputedStyle(r,"").getPropertyValue("color");return z(V.exec(t)[1].split(/\s*,\s*/).map(function(n){return Number(n)}))}function R(n,t,r,e){return n[e]+(t[e]-n[e])*r}var D=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,_=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Q=/[\d.]+:(#[^\s]+|[^)]+\))/gi;var a="undefined"!=typeof Float32Array?Float32Array:Array;function s(n,t,r){var e=t[0],a=t[1],i=t[2],u=t[3],o=t[4],c=t[5],f=t[6],l=t[7],t=t[8],h=r[0],s=r[1],p=r[2],y=r[3],v=r[4],m=r[5],x=r[6],g=r[7],r=r[8];return n[0]=h*e+s*u+p*f,n[1]=h*a+s*o+p*l,n[2]=h*i+s*c+p*t,n[3]=y*e+v*u+m*f,n[4]=y*a+v*o+m*l,n[5]=y*i+v*c+m*t,n[6]=x*e+g*u+r*f,n[7]=x*a+g*o+r*l,n[8]=x*i+g*c+r*t,n}function X(){var n=new a(3);return a!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n}function Y(n,t,r){var e=new a(3);return e[0]=n,e[1]=t,e[2]=r,e}Math.hypot||(Math.hypot=function(){for(var n=0,t=arguments.length;t--;)n+=arguments[t]*arguments[t];return Math.sqrt(n)});function Z(){var n=new a(4);return a!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n[3]=1,n}X(),q=new a(4),a!=Float32Array&&(q[0]=0,q[1]=0,q[2]=0,q[3]=0);function U(n,t,r){var e,a,i=[0,0,0,0,0,0,0,0,0];e=i,r=r,a=Math.sin(r),r=Math.cos(r),e[0]=r,e[1]=a,e[2]=0,e[3]=-a,e[4]=r,e[5]=0,e[6]=0,e[7]=0,e[8]=1,s(n,i,t)}function W(n,t){return n[0]*t[1]-t[0]*n[1]}function x(n){return n.map(function(n){return Array.isArray(n)?[].concat(n):n})}X(),Y(1,0,0),Y(0,1,0),Z(),Z(),q=new a(9),a!=Float32Array&&(q[1]=0,q[2]=0,q[3]=0,q[5]=0,q[6]=0,q[7]=0),q[0]=1,q[4]=1,q[8]=1,q=new a(2),a!=Float32Array&&(q[0]=0,q[1]=0);var g=function(){return(g=Object.assign||function(n){for(var t,r=1,e=arguments.length;r<e;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(n[a]=t[a]);return n}).apply(this,arguments)},H={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};var p={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function G(n){return Array.isArray(n)&&n.every(function(n){var t=n[0].toLowerCase();return p[t]===n.length-1&&"achlmqstvz".includes(t)})}function K(n){return G(n)&&n.every(function(n){n=n[0];return n===n.toUpperCase()})}function $(n){return K(n)&&n.every(function(n){n=n[0];return"ACLMQZ".includes(n)})}function J(n){for(var t=n.pathValue[n.segmentStart],r=t.toLowerCase(),e=n.data;e.length>=p[r]&&("m"===r&&2<e.length?(n.segments.push([t].concat(e.splice(0,2))),r="l",t="m"===t?"l":"L"):n.segments.push([t].concat(e.splice(0,p[r]))),p[r]););}function y(n){return 48<=n&&n<=57}function v(n){for(var t,r=n.pathValue,e=n.max;n.index<e&&(10===(t=r.charCodeAt(n.index))||13===t||8232===t||8233===t||32===t||9===t||11===t||12===t||160===t||5760<=t&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].includes(t));)n.index+=1}function nn(n){var t,r,e,a,i,u=n.max,o=n.pathValue,c=n.index,f=o.charCodeAt(c),l=p[o[c].toLowerCase()];if(n.segmentStart=c,function(n){switch(32|n){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return 1;default:return}}(f))if(n.index+=1,v(n),n.data=[],l){for(;;){for(var h=l;0<h;--h){if(97!=(32|f)||3!==h&&4!==h?function(n){var t,r,e=n.max,a=n.pathValue,i=n.index,u=i,o=!1,c=!1,f=!1;if(e<=u)n.err="[path-util]: Invalid path value at index "+u+', "pathValue" is missing param';else if(y(r=43!==(r=a.charCodeAt(u))&&45!==r?r:a.charCodeAt(u+=1))||46===r){if(46!==r){if(t=48===r,r=a.charCodeAt(u+=1),t&&u<e&&r&&y(r))return n.err="[path-util]: Invalid path value at index "+i+', "'+a[i]+'" illegal number';for(;u<e&&y(a.charCodeAt(u));)u+=1,o=!0;r=a.charCodeAt(u)}if(46===r){for(f=!0,u+=1;y(a.charCodeAt(u));)u+=1,c=!0;r=a.charCodeAt(u)}if(101===r||69===r){if(f&&!o&&!c)return n.err="[path-util]: Invalid path value at index "+u+', "'+a[u]+'" invalid float exponent';if(43!==(r=a.charCodeAt(u+=1))&&45!==r||(u+=1),!(u<e&&y(a.charCodeAt(u))))return n.err="[path-util]: Invalid path value at index "+u+', "'+a[u]+'" invalid integer exponent';for(;u<e&&y(a.charCodeAt(u));)u+=1}n.index=u,n.param=+n.pathValue.slice(i,u)}else n.err="[path-util]: Invalid path value at index "+u+', "'+a[u]+'" is not a number'}(n):(i=a=e=void 0,e=(r=n).index,a=r.pathValue,48===(i=a.charCodeAt(e))?(r.param=0,r.index+=1):49===i?(r.param=1,r.index+=1):r.err='[path-util]: invalid Arc flag "'+a[e]+'", expecting 0 or 1 at index '+e),n.err.length)return;n.data.push(n.param),v(n),n.index<u&&44===o.charCodeAt(n.index)&&(n.index+=1,v(n))}if(n.index>=n.max)break;if(!(48<=(t=o.charCodeAt(n.index))&&t<=57||43===t||45===t||46===t))break}J(n)}else J(n);else n.err='[path-util]: Invalid path value "'+o[c]+'" is not a path command'}var tn=function(n){this.pathValue=n,this.segments=[],this.max=n.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""};function rn(n){if(G(n))return x(n);var t=new tn(n);for(v(t);t.index<t.max&&!t.err.length;)nn(t);return t.err||t.segments}function en(n){if(K(n))return x(n);var n=rn(n),u=0,o=0,c=0,f=0;return n.map(function(n){var t=n.slice(1).map(Number),n=n[0],r=n.toUpperCase();if("M"===n)return u=t[0],o=t[1],["M",c=u,f=o];if(n!==r)switch(r){case"A":a=[r,t[0],t[1],t[2],t[3],t[4],t[5]+u,t[6]+o];break;case"V":a=[r,t[0]+o];break;case"H":a=[r,t[0]+u];break;default:var e=t.map(function(n,t){return n+(t%2?o:u)}),a=[r].concat(e)}else a=[r].concat(t);var i=a.length;switch(r){case"Z":u=c,o=f;break;case"H":u=a[1];break;case"V":o=a[1];break;default:u=a[i-2],o=a[i-1],"M"===r&&(c=u,f=o)}return a})}function A(n){if($(n))return x(n);for(var t,r,e,a,i,u,o,c=en(n),f=g({},H),l=0;l<c.length;l+=1){c[l]=(t=c[l],r=f,o=u=s=i=h=a=e=void 0,e=t[0],a=r.x1,h=r.y1,i=r.x2,s=r.y2,u=t.slice(1).map(Number),o=t,"TQ".includes(e)||(r.qx=null,r.qy=null),"H"===e?o=["L",t[1],h]:"V"===e?o=["L",a,t[1]]:"S"===e?(t=2*h-s,o=["C",r.x1=2*a-i,r.y1=t].concat(u)):"T"===e?(s=2*a-r.qx,i=2*h-r.qy,o=["Q",r.qx=s,r.qy=i].concat(u)):"Q"===e&&(t=u[0],a=u[1],r.qx=t,r.qy=a),o);var h=c[l],s=h.length;f.x1=+h[s-2],f.y1=+h[s-1],f.x2=+h[s-4]||f.x1,f.y2=+h[s-3]||f.y1}return c}function O(n,t,r){return{x:n*Math.cos(r)-t*Math.sin(r),y:n*Math.sin(r)+t*Math.cos(r)}}function c(n,t,r){var e=n[0],n=n[1];return[e+(t[0]-e)*r,n+(t[1]-n)*r]}function E(n,t){return Math.sqrt((n[0]-t[0])*(n[0]-t[0])+(n[1]-t[1])*(n[1]-t[1]))}function P(n,t,r,e,a){var i=E([n,t],[r,e]),u={x:0,y:0};return{length:i,point:u="number"==typeof a?a<=0?{x:n,y:t}:i<=a?{x:r,y:e}:{x:(a=c([n,t],[r,e],a/i))[0],y:a[1]}:u,min:{x:Math.min(n,r),y:Math.min(t,e)},max:{x:Math.max(n,r),y:Math.max(t,e)}}}function an(n,t,r,e){var n=[n,t],t=[r,e],a=c(n,t,.5),t=c(t,a,.5),i=c(a,t,.5),u=c(t,i,.5),o=c(i,u,.5),n=P(n[0],n[1],a[0],a[1],i[0]).point,a=P(o[0],o[1],u[0],u[1],t[0]).point;return[n.x,n.y,a.x,a.y,r,e]}function un(n,t){var r,e,a,i,u,o,c=n[0],f=n.slice(1).map(Number),l=f[0],h=f[1],s=t.x1,p=t.y1,y=t.x,v=t.y;switch("TQ".includes(c)||(t.qx=null,t.qy=null),c){case"M":return t.x=l,t.y=h,n;case"A":return o=[s,p].concat(f),["C"].concat(function n(t,r,e,a,i,u,o,c,f,l){var h=120*Math.PI/180,s=Math.PI/180*(+i||0),p=[],y=(l?(M=l[0],b=l[1],g=l[2],d=l[3]):(t=(m=O(t,r,-s)).x,r=m.y,1<(y=(v=(t-(c=(m=O(c,f,-s)).x))/2)*v/(e*e)+(m=(r-(f=m.y))/2)*m/(a*a))&&(e*=y=Math.sqrt(y),a*=y),y=e*e,x=a*a,g=(u=(u===o?-1:1)*Math.sqrt(Math.abs((y*x-y*m*m-x*v*v)/(y*m*m+x*v*v))))*e*m/a+(t+c)/2,d=u*-a*v/e+(r+f)/2,M=Math.asin(((r-d)/a*Math.pow(10,9)>>0)/Math.pow(10,9)),b=Math.asin(((f-d)/a*Math.pow(10,9)>>0)/Math.pow(10,9)),M=t<g?Math.PI-M:M,b=c<g?Math.PI-b:b,M<0&&(M=2*Math.PI+M),b<0&&(b=2*Math.PI+b),o&&b<M&&(M-=2*Math.PI),!o&&M<b&&(b-=2*Math.PI)),b-M),v=(Math.abs(y)>h&&(x=b,m=c,u=f,b=M+h*(o&&M<b?1:-1),p=n(c=g+e*Math.cos(b),f=d+a*Math.sin(b),e,a,i,0,o,m,u,[b,x,g,d])),y=b-M,Math.cos(M)),h=Math.sin(M),i=Math.cos(b),o=Math.sin(b),m=Math.tan(y/4),u=4/3*e*m,x=4/3*a*m,g=[t,r],d=[t+u*h,r-x*v],M=[c+u*o,f-x*i],b=[c,f];if(d[0]=2*g[0]-d[0],d[1]=2*g[1]-d[1],l)return d.concat(M,b,p);for(var w=[],A=0,C=(p=d.concat(M,b,p)).length;A<C;A+=1)w[A]=A%2?O(p[A-1],p[A],s).y:O(p[A],p[A+1],s).x;return w}(o[0],o[1],o[2],o[3],o[4],o[5],o[6],o[7],o[8],o[9]));case"Q":return t.qx=l,t.qy=h,o=[s,p].concat(f),["C"].concat((r=o[0],e=o[1],a=o[2],i=o[3],u=o[4],o=o[5],[1/3*r+2/3*a,1/3*e+2/3*i,1/3*u+2/3*a,1/3*o+2/3*i,u,o]));case"L":return["C"].concat(an(s,p,l,h));case"Z":return s===y&&p===v?["C",s,p,y,v,y,v]:["C"].concat(an(s,p,y,v))}return n}function on(n,t){var r;if(void 0===t&&(t=!1),$(r=n)&&r.every(function(n){n=n[0];return"MC".includes(n)}))return r=x(n),t?[r,[]]:r;for(var e,a=A(n),i=g({},H),u=[],o="",c=a.length,f=[],l=0;l<c;l+=1){a[l]&&(o=a[l][0]),u[l]=o;var h=un(a[l],i),s=(a[l]=h,m=v=y=p=s=void 0,a),p=u,y=l;if(7<s[y].length){s[y].shift();for(var v=s[y],m=y;v.length;)p[y]="A",s.splice(m+=1,0,["C"].concat(v.splice(0,6)));s.splice(y,1)}c=a.length,"Z"===o&&f.push(l),e=(h=a[l]).length,i.x1=+h[e-2],i.y1=+h[e-1],i.x2=+h[e-4]||i.x1,i.y2=+h[e-3]||i.y1}return t?[a,f]:a}function cn(n,t){var r=n.x,n=n.y,e=t.x,t=t.y,a=r*e+n*t,i=Math.sqrt((Math.pow(r,2)+Math.pow(n,2))*(Math.pow(e,2)+Math.pow(t,2)));return(r*t-n*e<0?-1:1)*Math.acos(a/i)}function fn(n,t,r,e,a,i,u,o,c,f,l){var h=l.bbox,s=void 0===h||h,h=l.length,p=void 0===h||h,h=l.sampleSize,y=void 0===h?30:h,v="number"==typeof f,m=0,x=[A=n,C=t,m],g=[A,C],d={x:0,y:0},M=[{x:A,y:C}];v&&f<=0&&(d={x:A,y:C});for(var b=0;b<=y;b+=1){var w,A=(w=function(n,t,r,e,a,i,u,o,c,f){var l=Math.abs,h=Math.sin,s=Math.cos,p=Math.sqrt,y=Math.PI,r=l(r),l=l(e),e=y/180*((a%360+360)%360);if(n===o&&t===c)return{x:n,y:t};if(0===r||0===l)return P(n,t,o,c,f).point;var a=(n-o)/2,v=(t-c)/2,a={x:s(e)*a+h(e)*v,y:-h(e)*a+s(e)*v};return 1<(v=Math.pow(a.x,2)/Math.pow(r,2)+Math.pow(a.y,2)/Math.pow(l,2))&&(r*=p(v),l*=p(v)),v=(Math.pow(r,2)*Math.pow(l,2)-Math.pow(r,2)*Math.pow(a.y,2)-Math.pow(l,2)*Math.pow(a.x,2))/(Math.pow(r,2)*Math.pow(a.y,2)+Math.pow(l,2)*Math.pow(a.x,2)),i=(i!==u?1:-1)*p(v=v<0?0:v),p=r*a.y/l*i,v=-l*a.x/r*i,i=s(e)*p-h(e)*v+(n+o)/2,n=h(e)*p+s(e)*v+(t+c)/2,t=cn({x:1,y:0},o={x:(a.x-p)/r,y:(a.y-v)/l}),c=cn(o,{x:(-a.x-p)/r,y:(-a.y-v)/l}),!u&&0<c?c-=2*y:u&&c<0&&(c+=2*y),o=t+(c%=2*y)*f,p=r*s(o),a=l*h(o),{x:s(e)*p-h(e)*a+i,y:h(e)*p+s(e)*a+n}}(n,t,r,e,a,i,u,o,c,b/y)).x,C=w.y;s&&M.push({x:A,y:C}),p&&(m+=E(g,[A,C])),g=[A,C],v&&f<=m&&f>x[2]&&(w=(m-f)/(m-x[2]),d={x:g[0]*(1-w)+x[0]*w,y:g[1]*(1-w)+x[1]*w}),x=[A,C,m]}return{length:m,point:d=v&&m<=f?{x:o,y:c}:d,min:{x:Math.min.apply(null,M.map(function(n){return n.x})),y:Math.min.apply(null,M.map(function(n){return n.y}))},max:{x:Math.max.apply(null,M.map(function(n){return n.x})),y:Math.max.apply(null,M.map(function(n){return n.y}))}}}function ln(n,t,r,e,a,i,u,o,c,f){var l=f.bbox,h=void 0===l||l,l=f.length,s=void 0===l||l,l=f.sampleSize,p=void 0===l?10:l,y="number"==typeof c,v=n,m=t,x=0,g=[v,m,x],d=[v,m],M={x:0,y:0},b=[{x:v,y:m}];y&&c<=0&&(M={x:v,y:m});for(var w,A,C,O,P,j,q,I,k,S,F=0;F<=p;F+=1)w=n,A=t,C=r,O=e,P=a,j=i,q=u,I=o,S=void 0,S=1-(k=F/p),v=(w={x:Math.pow(S,3)*w+3*Math.pow(S,2)*k*C+3*S*Math.pow(k,2)*P+Math.pow(k,3)*q,y:Math.pow(S,3)*A+3*Math.pow(S,2)*k*O+3*S*Math.pow(k,2)*j+Math.pow(k,3)*I}).x,m=w.y,h&&b.push({x:v,y:m}),s&&(x+=E(d,[v,m])),d=[v,m],y&&c<=x&&c>g[2]&&(C=(x-c)/(x-g[2]),M={x:d[0]*(1-C)+g[0]*C,y:d[1]*(1-C)+g[1]*C}),g=[v,m,x];return{length:x,point:M=y&&x<=c?{x:u,y:o}:M,min:{x:Math.min.apply(null,b.map(function(n){return n.x})),y:Math.min.apply(null,b.map(function(n){return n.y}))},max:{x:Math.max.apply(null,b.map(function(n){return n.x})),y:Math.max.apply(null,b.map(function(n){return n.y}))}}}function hn(n,t,r,e,a,i,u,o){var c=o.bbox,f=void 0===c||c,c=o.length,l=void 0===c||c,c=o.sampleSize,h=void 0===c?10:c,s="number"==typeof u,p=n,y=t,v=0,m=[p,y,v],x=[p,y],g={x:0,y:0},d=[{x:p,y:y}];s&&u<=0&&(g={x:p,y:y});for(var M,b,w,A,C,O,P,j,q=0;q<=h;q+=1)M=n,b=t,w=r,A=e,C=a,O=i,j=void 0,j=1-(P=q/h),p=(M={x:Math.pow(j,2)*M+2*j*P*w+Math.pow(P,2)*C,y:Math.pow(j,2)*b+2*j*P*A+Math.pow(P,2)*O}).x,y=M.y,f&&d.push({x:p,y:y}),l&&(v+=E(x,[p,y])),x=[p,y],s&&u<=v&&u>m[2]&&(w=(v-u)/(v-m[2]),g={x:x[0]*(1-w)+m[0]*w,y:x[1]*(1-w)+m[1]*w}),m=[p,y,v];return{length:v,point:g=s&&v<=u?{x:a,y:i}:g,min:{x:Math.min.apply(null,d.map(function(n){return n.x})),y:Math.min.apply(null,d.map(function(n){return n.y}))},max:{x:Math.max.apply(null,d.map(function(n){return n.x})),y:Math.max.apply(null,d.map(function(n){return n.y}))}}}function o(n,t,r){for(var e,a,i,u=A(n),o="number"==typeof t,c=[],f=0,l=0,h=0,s=0,p=[],y=[],v=0,m={x:0,y:0},x=m,g=m,d=m,M=0,b=0,w=u.length;b<w;b+=1)c=(e="M"===(a=(i=u[b])[0]))?c:[f,l].concat(i.slice(1)),e?(x=m={x:h=i[1],y:s=i[2]},v=0,o&&t<.001&&(d=m)):"L"===a?(v=(e=P(c[0],c[1],c[2],c[3],(t||0)-M)).length,m=e.min,x=e.max,g=e.point):"A"===a?(v=(e=fn(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],c[8],(t||0)-M,r||{})).length,m=e.min,x=e.max,g=e.point):"C"===a?(v=(e=ln(c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],(t||0)-M,r||{})).length,m=e.min,x=e.max,g=e.point):"Q"===a?(v=(e=hn(c[0],c[1],c[2],c[3],c[4],c[5],(t||0)-M,r||{})).length,m=e.min,x=e.max,g=e.point):"Z"===a&&(v=(e=P((c=[f,l,h,s])[0],c[1],c[2],c[3],(t||0)-M)).length,m=e.min,x=e.max,g=e.point),o&&M<t&&t<=M+v&&(d=g),y.push(x),p.push(m),M+=v,f=(e="Z"!==a?i.slice(-2):[h,s])[0],l=e[1];return{length:M,point:d=o&&M<=t?{x:f,y:l}:d,min:{x:Math.min.apply(null,p.map(function(n){return n.x})),y:Math.min.apply(null,p.map(function(n){return n.y}))},max:{x:Math.max.apply(null,y.map(function(n){return n.x})),y:Math.max.apply(null,y.map(function(n){return n.y}))}}}function d(n,t){return o(n,void 0,g(g({},t),{bbox:!1,length:!0})).length}function sn(n){var o=0,c=0,f=0;return on(n).map(function(n){if("M"===n[0])return o=n[1],c=n[2],0;var t=n.slice(1),r=t[0],e=t[1],a=t[2],i=t[3],u=t[4],t=t[5];return f=3*((t-c)*(r+a)-(u-o)*(e+i)+e*(o-a)-r*(c-i)+t*(a+o/3)-u*(i+c/3))/20,e=n.slice(-2),o=e[0],c=e[1],f}).reduce(function(n,t){return n+t},0)}function M(n,t,r){return o(n,t,g(g({},r),{bbox:!1,length:!0})).point}function pn(n,r){for(var t,e,a,i,u,n=rn(n),o=A(n),c=d(n),f=function(n){var t=n.x-r.x,n=n.y-r.y;return t*t+n*n},l=8,h=0,s=1/0,p=0;p<=c;p+=l)(e=f(t=M(o,p)))<s&&(a=t,h=p,s=e);l/=2;for(var y,v,m,x;.5<l;)m=f(i=M(o,y=h-l)),x=f(u=M(o,v=h+l)),0<=y&&m<s?(a=i,h=y,s=m):v<=c&&x<s?(a=u,h=v,s=x):l/=2;n=function(n,t){if("string"==typeof(n=rn(n)))throw TypeError(n);var r=n.slice(),e=d(r),a=r.length-1,i=0,u=0,o=n[0],c={x:(c=o.slice(-2))[0],y:c[1]};if(a<=0||!t||!Number.isFinite(t))return{segment:o,index:0,length:u,point:c,lengthAtSegment:i};if(e<=t)return i=d(r=n.slice(0,-1)),{segment:n[a],index:a,length:u=e-i,lengthAtSegment:i};for(var f=[];0<a;)o=r[a],u=e-(i=d(r=r.slice(0,-1))),e=i,f.push({segment:o,index:a,length:u,lengthAtSegment:i}),--a;return f.find(function(n){return n.lengthAtSegment<=t})}(n,h);return{closest:a,distance:Math.sqrt(s),segment:n}}function yn(n){return n.map(function(n,t,r){var e,a,i,u,r=t&&r[t-1].slice(-2).concat(n.slice(1)),o=t?ln(r[0],r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],{bbox:!1}).length:0,r=t?o?(void 0===e&&(e=.5),r=(t=r).slice(0,2),a=t.slice(2,4),i=t.slice(4,6),t=t.slice(6,8),r=c(r,a,e),a=c(a,i,e),i=c(i,t,e),u=c(r,a,e),a=c(a,i,e),e=c(u,a,e),[["C"].concat(r,u,e),["C"].concat(a,i,t)]):[n,n]:[n];return{s:n,ss:r,l:o}})}function e(n,t){return!!f(n)&&-1<n.indexOf(t)}function vn(n,t){if(!f(n))return n;for(var r=[],e=0;e<n.length;e++){var a=n[e];t(a,e)&&r.push(a)}return r}function i(n){var t=typeof n;return null!==n&&"object"==t||"function"==t}var f=function(n){return null!==n&&"function"!=typeof n&&isFinite(n.length)},l=function(n){return"function"==typeof n},h=function(n){return null==n},mn={}.toString,u=function(n,t){return mn.call(n)==="[object "+t+"]"},m=function(n){return Array.isArray?Array.isArray(n):u(n,"Array")};function b(n,t){if(n)if(m(n))for(var r=0,e=n.length;r<e&&!1!==t(n[r],r);r++);else if(i(n))for(var a in n)if(n.hasOwnProperty(a)&&!1===t(n[a],a))break}var xn=Object.keys?function(n){return Object.keys(n)}:function(r){var e=[];return b(r,function(n,t){l(r)&&"prototype"===t||e.push(t)}),e};function gn(n,t){var r=xn(t),e=r.length;if(h(n))return!e;for(var a=0;a<e;a+=1){var i=r[a];if(t[i]!==n[i]||!(i in n))return!1}return!0}var w=function(n){return"object"==typeof n&&null!==n},C=function(n){if(!w(n)||!u(n,"Object"))return!1;if(null===Object.getPrototypeOf(n))return!0;for(var t=n;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(n)===t};function dn(n,t){if(void 0===t&&(t=[]),m(n))for(var r=0;r<n.length;r+=1)dn(n[r],t);else t.push(n);return t}function Mn(n){if(m(n))return n.reduce(function(n,t){return Math.max(n,t)},n[0])}function bn(n){if(m(n))return n.reduce(function(n,t){return Math.min(n,t)},n[0])}function wn(n,t){if(!f(n))return[];for(var r=n?t.length:0,e=r-1;r--;){var a=void 0,i=t[r];r!==e&&i===a||Pn.call(n,a=i,1)}return n}function An(n,r,t){if(!m(n)&&!C(n))return n;var e=t;return b(n,function(n,t){e=r(e,n,t)}),e}function j(n){return u(n,"String")}var q=Array.prototype,Cn=q.splice,On=q.indexOf,Pn=Array.prototype.splice;function jn(n,t){void 0===t&&(t=new Map);var r=[];if(Array.isArray(n))for(var e=0,a=n.length;e<a;e++){var i=n[e];t.has(i)||(r.push(i),t.set(i,!0))}return r}var qn=Object.prototype.hasOwnProperty;function In(n,t){if(!t||!m(n))return{};for(var r={},e=l(t)?t:function(n){return n[t]},a=0;a<n.length;a++){var i=n[a],u=e(i);qn.call(r,u)?r[u].push(i):r[u]=[i]}return r}function kn(n,t){return t?(l(t)||(a=m(t)?t:t.replace(/\s+/g,"").split("*"),t=function(n){for(var t="_",r=0,e=a.length;r<e;r++)t+=n[a[r]]&&n[a[r]].toString();return t}),In(n,t)):{0:n};var a}var Sn={};function I(n){return u(n,"Number")}q=Number.isInteger||function(n){return I(n)&&n%1==0};function Fn(n,t){return n.hasOwnProperty(t)}function k(n){return h(n)?"":n.toString()}var En=180/Math.PI,Tn=parseInt,Nn=Math.PI/180,Ln=Object.values?function(n){return Object.values(n)}:function(r){var e=[];return b(r,function(n,t){l(r)&&"prototype"===t||e.push(n)}),e};function zn(n){return Vn.call(n).replace(/^\[object /,"").replace(/]$/,"")}var Vn={}.toString;function Bn(n){var t=n&&n.constructor;return n===("function"==typeof t&&t.prototype||Rn)}var Rn=Object.prototype;function Dn(n,t){for(var r in t)t.hasOwnProperty(r)&&"constructor"!==r&&void 0!==t[r]&&(n[r]=t[r])}function S(n,t,r,e){return t&&Dn(n,t),r&&Dn(n,r),e&&Dn(n,e),n}function _n(n){if("object"!=typeof n||null===n)return n;if(m(n))for(var t=[],r=0,e=n.length;r<e;r++)"object"==typeof n[r]&&null!=n[r]?t[r]=_n(n[r]):t[r]=n[r];else for(var a in t={},n)"object"==typeof n[a]&&null!=n[a]?t[a]=_n(n[a]):t[a]=n[a];return t}var Qn=5;var Xn=Object.prototype.hasOwnProperty;function F(n,t){if(n===t)return!0;if(n&&t&&!j(n)&&!j(t)){if(f(n)||f(t)){if(n.length!==t.length)return!1;for(var r=!0,e=0;e<n.length&&(r=F(n[e],t[e]));e++);return r}if(w(n)||w(t)){var a=Object.keys(n),i=Object.keys(t);if(a.length!==i.length)return!1;for(r=!0,e=0;e<a.length&&(r=F(n[a[e]],t[a[e]]));e++);return r}}return!1}function Yn(n){return n}var Zn=Object.prototype.hasOwnProperty,T={};function N(){this.map={}}N.prototype.has=function(n){return void 0!==this.map[n]},N.prototype.get=function(n,t){n=this.map[n];return void 0===n?t:n},N.prototype.set=function(n,t){this.map[n]=t},N.prototype.clear=function(){this.map={}},N.prototype.delete=function(n){delete this.map[n]},N.prototype.size=function(){return Object.keys(this.map).length};var Un=1e-6;function Wn(n){return Math.abs(n)<Un?0:n<0?-1:1}function Hn(n,t,r){var e=!1,a=n.length;if(a<=2)return!1;for(var i,u,o,c=0;c<a;c++){var f=n[c],l=n[(c+1)%a];if(u=l,((o=[t,r])[0]-(i=f)[0])*(u[1]-i[1])==(u[0]-i[0])*(o[1]-i[1])&&Math.min(i[0],u[0])<=o[0]&&o[0]<=Math.max(i[0],u[0])&&Math.min(i[1],u[1])<=o[1]&&o[1]<=Math.max(i[1],u[1]))return!0;0<Wn(f[1]-r)!=0<Wn(l[1]-r)&&Wn(t-(r-f[1])*(f[0]-l[0])/(f[1]-l[1])-f[0])<0&&(e=!e)}return e}function Gn(n,t,r){return t<=n&&n<=r}function Kn(n){for(var t,r,e=[],a=n.length,i=0;i<a-1;i++){var u=n[i],o=n[i+1];e.push({from:{x:u[0],y:u[1]},to:{x:o[0],y:o[1]}})}return 1<e.length&&(t=n[0],r=n[a-1],e.push({from:{x:r[0],y:r[1]},to:{x:t[0],y:t[1]}})),e}function $n(n,f){var l=!1;return n.forEach(function(n){if(t=n.from,n=n.to,r=f.from,e=f.to,a=r.x-t.x,i=r.y-t.y,u=n.x-t.x,n=n.y-t.y,o=e.x-r.x,e=e.y-r.y,c=null,.001*(u*u+n*n)*(o*o+e*e)<(r=u*e-n*o)*r&&(Gn(e=(a*e-i*o)/r,0,1)&&Gn((a*n-i*u)/r,0,1)&&(c={x:t.x+e*u,y:t.y+e*n})),c)return!(l=!0);var t,r,e,a,i,u,o,c}),l}function Jn(n){var t=n.map(function(n){return n[0]}),n=n.map(function(n){return n[1]});return{minX:Math.min.apply(null,t),maxX:Math.max.apply(null,t),minY:Math.min.apply(null,n),maxY:Math.max.apply(null,n)}}n.Cache=N,n.angleTo=function(n,t,r){a=t,u=(e=n)[0],e=e[1],o=a[0],a=a[1],i=Math.sqrt(u*u+e*e)*Math.sqrt(o*o+a*a);var e,a,i,u=Math.acos(Math.min(Math.max(i&&(u*o+e*a)/i,-1),1)),o=0<=W(n,t);return r?o?2*Math.PI-u:u:o?u:2*Math.PI-u},n.assign=S,n.augment=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];for(var r=n[0],e=1;e<n.length;e++){var a=n[e];l(a)&&(a=a.prototype),S(r.prototype,a)}},n.clamp=function(n,t,r){return n<t?t:r<n?r:n},n.clearAnimationFrame=function(n){(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame||clearTimeout)(n)},n.clone=_n,n.clonePath=x,n.contains=e,n.debounce=function(e,a,i){var u;return function(){var n=this,t=arguments,r=i&&!u;clearTimeout(u),u=setTimeout(function(){u=null,i||e.apply(n,t)},a),r&&e.apply(n,t)}},n.deepMix=function(n){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var e=0;e<t.length;e+=1)!function n(t,r,e,a){for(var i in e=e||0,a=a||Qn,r){var u;r.hasOwnProperty(i)&&(null!==(u=r[i])&&C(u)?(C(t[i])||(t[i]={}),e<a?n(t[i],u,e+1,a):t[i]=r[i]):m(u)?(t[i]=[],t[i]=t[i].concat(u)):void 0!==u&&(t[i]=u))}}(n,t[e]);return n},n.difference=function(n,t){return void 0===t&&(t=[]),vn(n,function(n){return!e(t,n)})},n.direction=W,n.distanceSquareRoot=E,n.each=b,n.endsWith=function(n,t){return!(!m(n)&&!j(n))&&n[n.length-1]===t},n.equalizeSegments=function n(t,r,e){var a,t=yn(t),r=yn(r),i=t.length,u=r.length,o=t.filter(function(n){return n.l}).length,c=r.filter(function(n){return n.l}).length,o=t.filter(function(n){return n.l}).reduce(function(n,t){return n+t.l},0)/o||0,c=r.filter(function(n){return n.l}).reduce(function(n,t){return n+t.l},0)/c||0,f=e||Math.max(i,u),l=[o,c],h=[f-i,f-u],e=[t,r].map(function(n,r){return n.l===f?n.map(function(n){return n.s}):n.map(function(n,t){return a=t&&h[r]&&n.l>=l[r],h[r]-=a?1:0,a?n.ss:[n.s]}).flat()});return e[0].length===e[1].length?e:n(e[0],e[1],f)},n.every=function(n,t){for(var r=0;r<n.length;r++)if(!t(n[r],r))return!1;return!0},n.extend=function(n,t,r,e){l(t)||(r=t,t=n,n=function(){});var a=Object.create?function(n,t){return Object.create(n,{constructor:{value:t}})}:function(n,t){function r(){}r.prototype=n;n=new r;return n.constructor=t,n},i=a(t.prototype,n);return n.prototype=S(i,n.prototype),n.superclass=a(t.prototype,t),S(i,r),S(n,e),n},n.filter=vn,n.find=function(n,t){var r;if(m(n)&&(l(t)&&(r=t),r=C(t)?function(n){return gn(n,t)}:r))for(var e=0;e<n.length;e+=1)if(r(n[e]))return n[e];return null},n.findIndex=function(n,t,r){for(var e=r=void 0===r?0:r;e<n.length;e++)if(t(n[e],e))return e;return-1},n.firstValue=function(n,t){for(var r=null,e=0;e<n.length;e++){var a=n[e][t];if(!h(a)){r=m(a)?a[0]:a;break}}return r},n.fixedBase=function(n,t){var t=t.toString(),r=t.indexOf(".");if(-1===r)return Math.round(n);t=t.substr(r+1).length;return 20<t&&(t=20),parseFloat(n.toFixed(t))},n.flatten=function(n){if(!m(n))return[];for(var t=[],r=0;r<n.length;r++)t=t.concat(n[r]);return t},n.flattenDeep=dn,n.forIn=b,n.get=function(n,t,r){for(var e=0,a=j(t)?t.split("."):t;n&&e<a.length;)n=n[a[e++]];return void 0===n||e<a.length?r:n},n.getDrawDirection=function(n){return 0<=sn(n)},n.getPathArea=sn,n.getPathBBox=function(n,t){if(!n)return{x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var n=o(n,void 0,g(g({},t),{length:!1})),r=(t=n.min).x,t=t.y,e=(n=n.max).x,n=n.y,a=e-r,i=n-t;return{width:a,height:i,x:r,y:t,x2:e,y2:n,cx:r+a/2,cy:t+i/2,cz:Math.max(a,i)+Math.min(a,i)/2}},n.getPathBBoxTotalLength=function(n,t){if(!n)return{length:0,x:0,y:0,width:0,height:0,x2:0,y2:0,cx:0,cy:0,cz:0};var t=(n=o(n,void 0,g(g({},t),{bbox:!0,length:!0}))).length,r=(e=n.min).x,e=e.y,a=(n=n.max).x,n=n.y,i=a-r,u=n-e;return{length:t,width:i,height:u,x:r,y:e,x2:a,y2:n,cx:r+i/2,cy:e+u/2,cz:Math.max(i,u)+Math.min(i,u)/2}},n.getPointAtLength=M,n.getRange=function(n){var t=n.filter(function(n){return!isNaN(n)});if(!t.length)return{min:0,max:0};if(m(n[0])){for(var r=[],e=0;e<n.length;e++)r=r.concat(n[e]);t=r}var a=Mn(t);return{min:bn(t),max:a}},n.getRotatedCurve=function(e,a){var i,u,o,c=e.length-1,t=[],f=0,n=(u=(i=e).length,o=u-1,i.map(function(n,e){return i.map(function(n,t){var r=e+t;return 0===t||i[r]&&"M"===i[r][0]?(t=i[r],["M"].concat(t.slice(-2))):(u<=r&&(r-=o),i[r])})}));return n.forEach(function(n,r){e.slice(1).forEach(function(n,t){f+=E(e[(r+t)%c].slice(-2),a[t%c].slice(-2))}),t[r]=f,f=0}),n[t.indexOf(Math.min.apply(null,t))]},n.getTotalLength=d,n.getType=zn,n.getWrapBehavior=function(n,t){return n["_wrap_"+t]},n.gradient=function(n){var i=("string"==typeof n?n.split("-"):n).map(function(n){return L(-1===n.indexOf("#")?B(n):n)});return function(n){return t=i,n=n,n=isNaN(Number(n))||n<0?0:1<n?1:Number(n),r=t.length-1,e=Math.floor(r*n),n=r*n-e,a=t[e],r=e===r?a:t[e+1],z([R(a,r,n,0),R(a,r,n,1),R(a,r,n,2)]);var t,r,e,a}},n.group=function(n,t){if(!t)return[n];var r,e=kn(n,t),a=[];for(r in e)a.push(e[r]);return a},n.groupBy=In,n.groupToMap=kn,n.has=Fn,n.hasKey=Fn,n.hasValue=function(n,t){return e(Ln(n),t)},n.head=function(n){if(f(n))return n[0]},n.identity=function(n){return n},n.includes=e,n.indexOf=function(n,t){if(!f(n))return-1;var r=Array.prototype.indexOf;if(r)return r.call(n,t);for(var e=-1,a=0;a<n.length;a++)if(n[a]===t){e=a;break}return e},n.isArguments=function(n){return u(n,"Arguments")},n.isArray=m,n.isArrayLike=f,n.isBoolean=function(n){return u(n,"Boolean")},n.isDate=function(n){return u(n,"Date")},n.isDecimal=function(n){return I(n)&&n%1!=0},n.isElement=function(n){return n instanceof Element||n instanceof HTMLDocument},n.isEmpty=function(n){if(!h(n)){if(f(n))return!n.length;var t,r=zn(n);if("Map"===r||"Set"===r)return!n.size;if(Bn(n))return!Object.keys(n).length;for(t in n)if(Xn.call(n,t))return!1}return!0},n.isEqual=F,n.isEqualWith=function(n,t,r){return l(r)?!!r(n,t):F(n,t)},n.isError=function(n){return u(n,"Error")},n.isEven=function(n){return I(n)&&n%2==0},n.isFinite=function(n){return I(n)&&isFinite(n)},n.isFunction=l,n.isInteger=q,n.isMatch=gn,n.isNegative=function(n){return I(n)&&n<0},n.isNil=h,n.isNull=function(n){return null===n},n.isNumber=I,n.isNumberEqual=function(n,t,r){return void 0===r&&(r=1e-5),Math.abs(n-t)<r},n.isObject=i,n.isObjectLike=w,n.isOdd=function(n){return I(n)&&n%2!=0},n.isPlainObject=C,n.isPointInPolygon=Hn,n.isPointInStroke=function(n,t){return n=pn(n,t).distance,Math.abs(n)<.001},n.isPolygonsIntersect=function(t,r){if(t.length<2||r.length<2)return!1;var n=Jn(t),e=Jn(r);if(n=n,(e=e).minX>n.maxX||e.maxX<n.minX||e.minY>n.maxY||e.maxY<n.minY)return!1;var a=!1;if(r.forEach(function(n){if(Hn(t,n[0],n[1]))return!(a=!0)}),a)return!0;if(t.forEach(function(n){if(Hn(r,n[0],n[1]))return!(a=!0)}),a)return!0;var i=Kn(t),e=Kn(r),u=!1;return e.forEach(function(n){if($n(i,n))return!(u=!0)}),u},n.isPositive=function(n){return I(n)&&0<n},n.isPrototype=Bn,n.isRegExp=function(n){return u(n,"RegExp")},n.isString=j,n.isType=u,n.isUndefined=function(n){return void 0===n},n.keys=xn,n.last=function(n){if(f(n))return n[n.length-1]},n.lowerCase=function(n){return k(n).toLowerCase()},n.lowerFirst=function(n){n=k(n);return n.charAt(0).toLowerCase()+n.substring(1)},n.map=function(n,t){if(!f(n))return n;for(var r=[],e=0;e<n.length;e++){var a=n[e];r.push(t(a,e))}return r},n.mapValues=function(t,r){void 0===r&&(r=Yn);var e={};return i(t)&&!h(t)&&Object.keys(t).forEach(function(n){e[n]=r(t[n],n)}),e},n.max=Mn,n.maxBy=function(n,t){if(m(n)){for(var r,e=-1/0,a=0;a<n.length;a++){var i=n[a],u=l(t)?t(i):i[t];e<u&&(r=i,e=u)}return r}},n.memoize=function(i,u){if(!l(i))throw new TypeError("Expected a function");function o(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var r=u?u.apply(this,n):n[0],e=o.cache;if(e.has(r))return e.get(r);var a=i.apply(this,n);return e.set(r,a),a}return o.cache=new Map,o},n.min=bn,n.minBy=function(n,t){if(m(n)){for(var r,e=1/0,a=0;a<n.length;a++){var i=n[a],u=l(t)?t(i):i[t];u<e&&(r=i,e=u)}return r}},n.mix=S,n.mod=function(n,t){return(n%t+t)%t},n.noop=function(){},n.normalizePath=A,n.number2color=function(n){var t=Sn[n];if(!t){for(var r=n.toString(16),e=r.length;e<6;e++)r="0"+r;Sn[n]=t="#"+r}return t},n.omit=function(n,e){return An(n,function(n,t,r){return e.includes(r)||(n[r]=t),n},{})},n.parseRadius=function(n){var t=0,r=0,e=0,a=0;return m(n)?1===n.length?t=r=e=a=n[0]:2===n.length?(t=e=n[0],r=a=n[1]):3===n.length?(t=n[0],r=a=n[1],e=n[2]):(t=n[0],r=n[1],e=n[2],a=n[3]):t=r=e=a=n,{r1:t,r2:r,r3:e,r4:a}},n.path2Absolute=en,n.path2Curve=on,n.path2String=function(n,t){return function(n,r){if("off"===r)return x(n);var e="number"==typeof r&&1<=r?Math.pow(10,r):1;return n.map(function(n){var t=n.slice(1).map(Number).map(function(n){return r?Math.round(n*e)/e:Math.round(n)});return[n[0]].concat(t)})}(n,t=void 0===t?"off":t).map(function(n){return n[0]+n.slice(1).join(" ")}).join("")},n.pick=function(t,n){if(null===t||!C(t))return{};var r={};return b(n,function(n){Zn.call(t,n)&&(r[n]=t[n])}),r},n.pull=function(n){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var e=0;e<t.length;e++)for(var a,i=t[e];-1<(a=On.call(n,i));)Cn.call(n,a,1);return n},n.pullAt=wn,n.reduce=An,n.remove=function(n,t){var r=[];if(f(n)){for(var e=-1,a=[],i=n.length;++e<i;){var u=n[e];t(u,e,n)&&(r.push(u),a.push(e))}wn(n,a)}return r},n.requestAnimationFrame=function(n){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||function(n){return setTimeout(n,16)})(n)},n.reverseCurve=function(e){var n=e.slice(1).map(function(n,t,r){return(t?r[t-1].slice(-2):e[0].slice(1)).concat(n.slice(1))}).map(function(r){return r.map(function(n,t){return r[r.length-t-2*(1-t%2)]})}).reverse();return[["M"].concat(n[0].slice(0,2))].concat(n.map(function(n){return["C"].concat(n.slice(2))}))},n.rgb2arr=L,n.set=function(n,t,r){var e=n,a=j(t)?t.split("."):t;return a.forEach(function(n,t){t<a.length-1?(i(e[n])||(e[n]=I(a[t+1])?[]:{}),e=e[n]):e[n]=r}),n},n.size=function(n){return h(n)?0:(f(n)?n:Object.keys(n)).length},n.some=function(n,t){for(var r=0;r<n.length;r++)if(t(n[r],r))return!0;return!1},n.sortBy=function(n,r){var a,t=l(r)?function(n,t){return r(n)-r(t)}:(a=[],j(r)?a.push(r):m(r)&&(a=r),function(n,t){for(var r=0;r<a.length;r+=1){var e=a[r];if(n[e]>t[e])return 1;if(n[e]<t[e])return-1}return 0});return n.sort(t),n},n.startsWith=function(n,t){return!(!m(n)&&!j(n))&&n[0]===t},n.substitute=function(n,r){return n&&r?n.replace(/\\?\{([^{}]+)\}/g,function(n,t){return"\\"===n.charAt(0)?n.slice(1):void 0===r[t]?"":r[t]}):n},n.throttle=function(r,e,a){function i(){l=!1===a.leading?0:Date.now(),u=null,f=r.apply(o,c),u||(o=c=null)}function n(){var n=Date.now(),t=(l||!1!==a.leading||(l=n),e-(n-l));return o=this,c=arguments,t<=0||e<t?(u&&(clearTimeout(u),u=null),l=n,f=r.apply(o,c),u||(o=c=null)):u||!1===a.trailing||(u=setTimeout(i,t)),f}var u,o,c,f,l=0;a=a||{};return n.cancel=function(){clearTimeout(u),l=0,u=o=c=null},n},n.toArray=function(n){return f(n)?Array.prototype.slice.call(n):[]},n.toCSSGradient=function(n){var t,r,e,a,i;return/^[r,R,L,l]{1}[\s]*\(/.test(n)?(r=void 0,"l"===n[0]?(t=+(a=D.exec(n))[1]+90,r=a[2],e="linear-gradient("+t+"deg, "):"r"===n[0]&&(e="radial-gradient(",r=(a=_.exec(n))[4]),(i=r.match(Q)).forEach(function(n,t){n=n.split(":");e+=n[1]+" "+100*Number(n[0])+"%",t!==i.length-1&&(e+=", ")}),e+=")"):n},n.toDegree=function(n){return En*n},n.toInteger=Tn,n.toRGB=B,n.toRadian=function(n){return Nn*n},n.toString=k,n.transform=function(n,t){for(var r,e,a,i,u,o,c=n?[].concat(n):[1,0,0,0,1,0,0,0,1],f=0,l=t.length;f<l;f++){var h=t[f];switch(h[0]){case"t":a=e=c,i=[h[1],h[2]],u=void 0,i=i,(u=o=[0,0,0,0,0,0,0,0,0])[0]=1,u[1]=0,u[2]=0,u[3]=0,u[4]=1,u[5]=0,u[6]=i[0],u[7]=i[1],u[8]=1,s(e,o,a);break;case"s":u=i=c,e=[h[1],h[2]],o=void 0,(o=a=[0,0,0,0,0,0,0,0,0])[0]=(e=e)[0],o[1]=0,o[2]=0,o[3]=0,o[4]=e[1],o[5]=0,o[6]=0,o[7]=0,o[8]=1,s(i,a,u);break;case"r":U(c,c,h[1]);break;case"m":r=h[1],s(c,r,c)}}return c},n.union=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return jn([].concat.apply([],n))},n.uniq=jn,n.uniqueId=function(n){return T[n=n||"g"]?T[n]+=1:T[n]=1,n+T[n]},n.upperCase=function(n){return k(n).toUpperCase()},n.upperFirst=function(n){n=k(n);return n.charAt(0).toUpperCase()+n.substring(1)},n.values=Ln,n.valuesOfKey=function(n,t){for(var r=[],e={},a=0;a<n.length;a++){var i=n[a][t];if(!h(i)){m(i)||(i=[i]);for(var u=0;u<i.length;u++){var o=i[u];e[o]||(r.push(o),e[o]=!0)}}}return r},n.vertical=function(n,t,r){return r?(n[0]=t[1],n[1]=-1*t[0]):(n[0]=-1*t[1],n[1]=t[0]),n},n.wrapBehavior=function(t,r){return t["_wrap_"+r]||(t["_wrap_"+r]=n);function n(n){t[r](n)}},Object.defineProperty(n,"__esModule",{value:!0})});

@@ -5,1 +5,2 @@ export * from './color';

export * from './lodash';
export * from './math';

@@ -5,2 +5,3 @@ export * from './color';

export * from './lodash';
export * from './math';
//# sourceMappingURL=index.js.map
declare const _default: (value: any) => value is Function;
/**
* @see https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isfunction
*/
export default _default;
/**
* 是否为函数
* @param {*} fn 对象
* @return {Boolean} 是否函数
* @see https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isfunction
*/
import isType from './is-type';
export default (function (value) {
return isType(value, 'Function');
return typeof value === 'function';
});
//# sourceMappingURL=is-function.js.map

@@ -5,1 +5,2 @@ export * from './color';

export * from './lodash';
export * from './math';

@@ -8,2 +8,3 @@ "use strict";

(0, tslib_1.__exportStar)(require("./lodash"), exports);
(0, tslib_1.__exportStar)(require("./math"), exports);
//# sourceMappingURL=index.js.map
declare const _default: (value: any) => value is Function;
/**
* @see https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isfunction
*/
export default _default;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
/**
* 是否为函数
* @param {*} fn 对象
* @return {Boolean} 是否函数
* @see https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isfunction
*/
var is_type_1 = (0, tslib_1.__importDefault)(require("./is-type"));
exports.default = (function (value) {
return (0, is_type_1.default)(value, 'Function');
return typeof value === 'function';
});
//# sourceMappingURL=is-function.js.map
{
"name": "@antv/util",
"version": "3.2.5",
"version": "3.3.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "sideEffects": false,

@@ -204,4 +204,28 @@ # util

### isPointInPolygon
判断一个点是否在多边形内。多边形形如:
```js
const polygon = [
[0, 0],
[0, 100],
[30, 100],
[30, 0],
];
// [0, 0] 在多边形的边上
isPointInPolygon(polygon, 0, 0); // true
```
### isPolygonsIntersect
判断两个多边形是否相交:
```js
isPolygonsIntersect(polygon1, polygon2);
```
## License
MIT@[AntV](https://github.com/antvis).

@@ -5,1 +5,2 @@ export * from './color';

export * from './lodash';
export * from './math';
/**
* 是否为函数
* @param {*} fn 对象
* @return {Boolean} 是否函数
* @see https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isfunction
*/
import isType from './is-type';
export default (value: any): value is Function => {
return isType(value, 'Function');
return typeof value === 'function';
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc