Socket
Socket
Sign inDemoInstall

svg-pathdata

Package Overview
Dependencies
Maintainers
3
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svg-pathdata - npm Package Compare versions

Comparing version 5.0.3 to 5.0.4

9

CHANGELOG.md

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

## [5.0.4](https://github.com/nfroidure/svg-pathdata/compare/v4.0.0...v5.0.4) (2020-02-14)
### Bug Fixes
* **parser:** fix parsing merged numbers with arc flags ([d55d9f0](https://github.com/nfroidure/svg-pathdata/commit/d55d9f0db00c1bb341eecaea786ca05dd2c51e95))
## [5.0.3](https://github.com/nfroidure/svg-pathdata/compare/v4.0.0...v5.0.3) (2020-02-04)

@@ -2,0 +11,0 @@

2

lib/SVGPathData.js

@@ -15,3 +15,3 @@ !function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t=t||self).svgpathdata={})}(this,(function(t){"use strict";

and limitations under the License.
***************************************************************************** */var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(t,e)};function e(t,e){function a(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}function a(t,r){var e=t[0],a=t[1];return[e*Math.cos(r)-a*Math.sin(r),e*Math.sin(r)+a*Math.cos(r)]}function n(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=0;e<t.length;e++)if("number"!=typeof t[e])throw new Error("assertNumbers arguments["+e+"] is not a number. "+typeof t[e]+" == typeof "+t[e]);return!0}var i=Math.PI;function o(t,r,e){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var n=t.rX,o=t.rY,s=t.x,u=t.y;n=Math.abs(t.rX),o=Math.abs(t.rY);var h=a([(r-s)/2,(e-u)/2],-t.xRot/180*i),c=h[0],m=h[1],y=Math.pow(c,2)/Math.pow(n,2)+Math.pow(m,2)/Math.pow(o,2);1<y&&(n*=Math.sqrt(y),o*=Math.sqrt(y)),t.rX=n,t.rY=o;var p=Math.pow(n,2)*Math.pow(m,2)+Math.pow(o,2)*Math.pow(c,2),T=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(o,2)-p)/p)),O=n*m/o*T,_=-o*c/n*T,f=a([O,_],t.xRot/180*i);t.cX=f[0]+(r+s)/2,t.cY=f[1]+(e+u)/2,t.phi1=Math.atan2((m-_)/o,(c-O)/n),t.phi2=Math.atan2((-m-_)/o,(-c-O)/n),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*i),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*i),t.phi1*=180/i,t.phi2*=180/i}function s(t,r,e){n(t,r,e);var a=t*t+r*r-e*e;if(0>a)return[];if(0===a)return[[t*e/(t*t+r*r),r*e/(t*t+r*r)]];var i=Math.sqrt(a);return[[(t*e+r*i)/(t*t+r*r),(r*e-t*i)/(t*t+r*r)],[(t*e-r*i)/(t*t+r*r),(r*e+t*i)/(t*t+r*r)]]}var u=Math.PI/180;function h(t,r,e){return(1-e)*t+e*r}function c(t,r,e,a){return t+Math.cos(a/180*i)*r+Math.sin(a/180*i)*e}function m(t,r,e,a){var n=r-t,i=e-r,o=3*n+3*(a-e)-6*i,s=6*(i-n),u=3*n;return Math.abs(o)<1e-6?[-u/s]:function(t,r,e){void 0===e&&(e=1e-6);var a=t*t/4-r;if(a<-e)return[];if(a<=e)return[-t/2];var n=Math.sqrt(a);return[-t/2-n,-t/2+n]}(s/o,u/o,1e-6)}function y(t,r,e,a,n){var i=1-n;return t*(i*i*i)+r*(3*i*i*n)+e*(3*i*n*n)+a*(n*n*n)}!function(t){function r(){return p((function(t,r,e){return t.relative&&(void 0!==t.x1&&(t.x1+=r),void 0!==t.y1&&(t.y1+=e),void 0!==t.x2&&(t.x2+=r),void 0!==t.y2&&(t.y2+=e),void 0!==t.x&&(t.x+=r),void 0!==t.y&&(t.y+=e),t.relative=!1),t}))}function e(){var t=NaN,r=NaN,e=NaN,a=NaN;return p((function(n,i,o){return n.type&l.SMOOTH_CURVE_TO&&(n.type=l.CURVE_TO,t=isNaN(t)?i:t,r=isNaN(r)?o:r,n.x1=n.relative?i-t:2*i-t,n.y1=n.relative?o-r:2*o-r),n.type&l.CURVE_TO?(t=n.relative?i+n.x2:n.x2,r=n.relative?o+n.y2:n.y2):(t=NaN,r=NaN),n.type&l.SMOOTH_QUAD_TO&&(n.type=l.QUAD_TO,e=isNaN(e)?i:e,a=isNaN(a)?o:a,n.x1=n.relative?i-e:2*i-e,n.y1=n.relative?o-a:2*o-a),n.type&l.QUAD_TO?(e=n.relative?i+n.x1:n.x1,a=n.relative?o+n.y1:n.y1):(e=NaN,a=NaN),n}))}function i(){var t=NaN,r=NaN;return p((function(e,a,n){if(e.type&l.SMOOTH_QUAD_TO&&(e.type=l.QUAD_TO,t=isNaN(t)?a:t,r=isNaN(r)?n:r,e.x1=e.relative?a-t:2*a-t,e.y1=e.relative?n-r:2*n-r),e.type&l.QUAD_TO){t=e.relative?a+e.x1:e.x1,r=e.relative?n+e.y1:e.y1;var i=e.x1,o=e.y1;e.type=l.CURVE_TO,e.x1=((e.relative?0:a)+2*i)/3,e.y1=((e.relative?0:n)+2*o)/3,e.x2=(e.x+2*i)/3,e.y2=(e.y+2*o)/3}else t=NaN,r=NaN;return e}))}function p(t){var r=0,e=0,a=NaN,n=NaN;return function(i){if(isNaN(a)&&!(i.type&l.MOVE_TO))throw new Error("path must start with moveto");var o=t(i,r,e,a,n);return i.type&l.CLOSE_PATH&&(r=a,e=n),void 0!==i.x&&(r=i.relative?r+i.x:i.x),void 0!==i.y&&(e=i.relative?e+i.y:i.y),i.type&l.MOVE_TO&&(a=r,n=e),o}}function T(t,r,e,a,i,o){return n(t,r,e,a,i,o),p((function(n,s,u,h){var c=n.x1,m=n.x2,y=n.relative&&!isNaN(h),p=void 0!==n.x?n.x:y?0:s,T=void 0!==n.y?n.y:y?0:u;function O(t){return t*t}n.type&l.HORIZ_LINE_TO&&0!==r&&(n.type=l.LINE_TO,n.y=n.relative?0:u),n.type&l.VERT_LINE_TO&&0!==e&&(n.type=l.LINE_TO,n.x=n.relative?0:s),void 0!==n.x&&(n.x=n.x*t+T*e+(y?0:i)),void 0!==n.y&&(n.y=p*r+n.y*a+(y?0:o)),void 0!==n.x1&&(n.x1=n.x1*t+n.y1*e+(y?0:i)),void 0!==n.y1&&(n.y1=c*r+n.y1*a+(y?0:o)),void 0!==n.x2&&(n.x2=n.x2*t+n.y2*e+(y?0:i)),void 0!==n.y2&&(n.y2=m*r+n.y2*a+(y?0:o));var _=t*a-r*e;if(void 0!==n.xRot&&(1!==t||0!==r||0!==e||1!==a))if(0===_)delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag,n.type=l.LINE_TO;else{var f=n.xRot*Math.PI/180,v=Math.sin(f),N=Math.cos(f),E=1/O(n.rX),d=1/O(n.rY),A=O(N)*E+O(v)*d,x=2*v*N*(E-d),C=O(v)*E+O(N)*d,M=A*a*a-x*r*a+C*r*r,R=x*(t*a+r*e)-2*(A*e*a+C*t*r),S=A*e*e-x*t*e+C*t*t,I=(Math.atan2(R,M-S)+Math.PI)%Math.PI/2,g=Math.sin(I),V=Math.cos(I);n.rX=Math.abs(_)/Math.sqrt(M*O(V)+R*g*V+S*O(g)),n.rY=Math.abs(_)/Math.sqrt(M*O(g)-R*g*V+S*O(V)),n.xRot=180*I/Math.PI}return void 0!==n.sweepFlag&&0>_&&(n.sweepFlag=+!n.sweepFlag),n}))}function O(){return function(t){var r={};for(var e in t)r[e]=t[e];return r}}t.ROUND=function(t){function r(r){return Math.round(r*t)/t}return void 0===t&&(t=1e13),n(t),function(t){return void 0!==t.x1&&(t.x1=r(t.x1)),void 0!==t.y1&&(t.y1=r(t.y1)),void 0!==t.x2&&(t.x2=r(t.x2)),void 0!==t.y2&&(t.y2=r(t.y2)),void 0!==t.x&&(t.x=r(t.x)),void 0!==t.y&&(t.y=r(t.y)),void 0!==t.rX&&(t.rX=r(t.rX)),void 0!==t.rY&&(t.rY=r(t.rY)),t}},t.TO_ABS=r,t.TO_REL=function(){return p((function(t,r,e){return t.relative||(void 0!==t.x1&&(t.x1-=r),void 0!==t.y1&&(t.y1-=e),void 0!==t.x2&&(t.x2-=r),void 0!==t.y2&&(t.y2-=e),void 0!==t.x&&(t.x-=r),void 0!==t.y&&(t.y-=e),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,r,e){return void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===e&&(e=!0),p((function(a,n,i,o,s){if(isNaN(o)&&!(a.type&l.MOVE_TO))throw new Error("path must start with moveto");return r&&a.type&l.HORIZ_LINE_TO&&(a.type=l.LINE_TO,a.y=a.relative?0:i),e&&a.type&l.VERT_LINE_TO&&(a.type=l.LINE_TO,a.x=a.relative?0:n),t&&a.type&l.CLOSE_PATH&&(a.type=l.LINE_TO,a.x=a.relative?o-n:o,a.y=a.relative?s-i:s),a.type&l.ARC&&(0===a.rX||0===a.rY)&&(a.type=l.LINE_TO,delete a.rX,delete a.rY,delete a.xRot,delete a.lArcFlag,delete a.sweepFlag),a}))},t.NORMALIZE_ST=e,t.QT_TO_C=i,t.INFO=p,t.SANITIZE=function(t){void 0===t&&(t=0),n(t);var r=NaN,e=NaN,a=NaN,i=NaN;return p((function(n,o,s,u,h){var c=Math.abs,m=!1,y=0,p=0;if(n.type&l.SMOOTH_CURVE_TO&&(y=isNaN(r)?0:o-r,p=isNaN(e)?0:s-e),n.type&(l.CURVE_TO|l.SMOOTH_CURVE_TO)?(r=n.relative?o+n.x2:n.x2,e=n.relative?s+n.y2:n.y2):(r=NaN,e=NaN),n.type&l.SMOOTH_QUAD_TO?(a=isNaN(a)?o:2*o-a,i=isNaN(i)?s:2*s-i):n.type&l.QUAD_TO?(a=n.relative?o+n.x1:n.x1,i=n.relative?s+n.y1:n.y2):(a=NaN,i=NaN),n.type&l.LINE_COMMANDS||n.type&l.ARC&&(0===n.rX||0===n.rY||!n.lArcFlag)||n.type&l.CURVE_TO||n.type&l.SMOOTH_CURVE_TO||n.type&l.QUAD_TO||n.type&l.SMOOTH_QUAD_TO){var T=void 0===n.x?0:n.relative?n.x:n.x-o,O=void 0===n.y?0:n.relative?n.y:n.y-s;y=isNaN(a)?void 0===n.x1?y:n.relative?n.x:n.x1-o:a-o,p=isNaN(i)?void 0===n.y1?p:n.relative?n.y:n.y1-s:i-s;var _=void 0===n.x2?0:n.relative?n.x:n.x2-o,f=void 0===n.y2?0:n.relative?n.y:n.y2-s;c(T)<=t&&c(O)<=t&&c(y)<=t&&c(p)<=t&&c(_)<=t&&c(f)<=t&&(m=!0)}return n.type&l.CLOSE_PATH&&c(o-u)<=t&&c(s-h)<=t&&(m=!0),m?[]:n}))},t.MATRIX=T,t.ROTATE=function(t,r,e){void 0===r&&(r=0),void 0===e&&(e=0),n(t,r,e);var a=Math.sin(t),i=Math.cos(t);return T(i,a,-a,i,r-r*i+e*a,e-r*a-e*i)},t.TRANSLATE=function(t,r){return void 0===r&&(r=0),n(t,r),T(1,0,0,1,t,r)},t.SCALE=function(t,r){return void 0===r&&(r=t),n(t,r),T(t,0,0,r,0,0)},t.SKEW_X=function(t){return n(t),T(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return n(t),T(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),n(t),T(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),n(t),T(1,0,0,-1,0,t)},t.A_TO_C=function(){return p((function(t,r,e){return l.ARC===t.type?function(t,r,e){var n,i,s,c;t.cX||o(t,r,e);for(var m=Math.min(t.phi1,t.phi2),y=Math.max(t.phi1,t.phi2)-m,p=Math.ceil(y/90),T=new Array(p),O=r,_=e,f=0;f<p;f++){var v=h(t.phi1,t.phi2,f/p),N=h(t.phi1,t.phi2,(f+1)/p),E=N-v,d=4/3*Math.tan(E*u/4),A=[Math.cos(v*u)-d*Math.sin(v*u),Math.sin(v*u)+d*Math.cos(v*u)],x=A[0],C=A[1],M=[Math.cos(N*u),Math.sin(N*u)],R=M[0],S=M[1],I=[R+d*Math.sin(N*u),S-d*Math.cos(N*u)],g=I[0],V=I[1];T[f]={relative:t.relative,type:l.CURVE_TO};var L=function(r,e){var n=a([r*t.rX,e*t.rY],t.xRot),i=n[0],o=n[1];return[t.cX+i,t.cY+o]};n=L(x,C),T[f].x1=n[0],T[f].y1=n[1],i=L(g,V),T[f].x2=i[0],T[f].y2=i[1],s=L(R,S),T[f].x=s[0],T[f].y=s[1],t.relative&&(T[f].x1-=O,T[f].y1-=_,T[f].x2-=O,T[f].y2-=_,T[f].x-=O,T[f].y-=_),O=(c=[T[f].x,T[f].y])[0],_=c[1]}return T}(t,t.relative?0:r,t.relative?0:e):t}))},t.ANNOTATE_ARCS=function(){return p((function(t,r,e){return t.relative&&(r=0,e=0),l.ARC===t.type&&o(t,r,e),t}))},t.CLONE=O,t.CALCULATE_BOUNDS=function(){var t=function(t){var r={};for(var e in t)r[e]=t[e];return r},a=r(),n=i(),u=e(),h=p((function(r,e,i){var p=u(n(a(t(r))));function T(t){t>h.maxX&&(h.maxX=t),t<h.minX&&(h.minX=t)}function O(t){t>h.maxY&&(h.maxY=t),t<h.minY&&(h.minY=t)}if(p.type&l.DRAWING_COMMANDS&&(T(e),O(i)),p.type&l.HORIZ_LINE_TO&&T(p.x),p.type&l.VERT_LINE_TO&&O(p.y),p.type&l.LINE_TO&&(T(p.x),O(p.y)),p.type&l.CURVE_TO){T(p.x),O(p.y);for(var _=0,f=m(e,p.x1,p.x2,p.x);_<f.length;_++){0<(U=f[_])&&1>U&&T(y(e,p.x1,p.x2,p.x,U))}for(var v=0,N=m(i,p.y1,p.y2,p.y);v<N.length;v++){0<(U=N[v])&&1>U&&O(y(i,p.y1,p.y2,p.y,U))}}if(p.type&l.ARC){T(p.x),O(p.y),o(p,e,i);for(var E=p.xRot/180*Math.PI,d=Math.cos(E)*p.rX,A=Math.sin(E)*p.rX,x=-Math.sin(E)*p.rY,C=Math.cos(E)*p.rY,M=p.phi1<p.phi2?[p.phi1,p.phi2]:-180>p.phi2?[p.phi2+360,p.phi1+360]:[p.phi2,p.phi1],R=M[0],S=M[1],I=function(t){var r=t[0],e=t[1],a=180*Math.atan2(e,r)/Math.PI;return a<R?a+360:a},g=0,V=s(x,-d,0).map(I);g<V.length;g++){(U=V[g])>R&&U<S&&T(c(p.cX,d,x,U))}for(var L=0,D=s(C,-A,0).map(I);L<D.length;L++){var U;(U=D[L])>R&&U<S&&O(c(p.cY,A,C,U))}}return r}));return h.minX=1/0,h.maxX=-1/0,h.minY=1/0,h.maxY=-1/0,h}}(t.SVGPathDataTransformer||(t.SVGPathDataTransformer={}));var p,T,O=function(){function r(){}return r.prototype.round=function(r){return this.transform(t.SVGPathDataTransformer.ROUND(r))},r.prototype.toAbs=function(){return this.transform(t.SVGPathDataTransformer.TO_ABS())},r.prototype.toRel=function(){return this.transform(t.SVGPathDataTransformer.TO_REL())},r.prototype.normalizeHVZ=function(r,e,a){return this.transform(t.SVGPathDataTransformer.NORMALIZE_HVZ(r,e,a))},r.prototype.normalizeST=function(){return this.transform(t.SVGPathDataTransformer.NORMALIZE_ST())},r.prototype.qtToC=function(){return this.transform(t.SVGPathDataTransformer.QT_TO_C())},r.prototype.aToC=function(){return this.transform(t.SVGPathDataTransformer.A_TO_C())},r.prototype.sanitize=function(r){return this.transform(t.SVGPathDataTransformer.SANITIZE(r))},r.prototype.translate=function(r,e){return this.transform(t.SVGPathDataTransformer.TRANSLATE(r,e))},r.prototype.scale=function(r,e){return this.transform(t.SVGPathDataTransformer.SCALE(r,e))},r.prototype.rotate=function(r,e,a){return this.transform(t.SVGPathDataTransformer.ROTATE(r,e,a))},r.prototype.matrix=function(r,e,a,n,i,o){return this.transform(t.SVGPathDataTransformer.MATRIX(r,e,a,n,i,o))},r.prototype.skewX=function(r){return this.transform(t.SVGPathDataTransformer.SKEW_X(r))},r.prototype.skewY=function(r){return this.transform(t.SVGPathDataTransformer.SKEW_Y(r))},r.prototype.xSymmetry=function(r){return this.transform(t.SVGPathDataTransformer.X_AXIS_SYMMETRY(r))},r.prototype.ySymmetry=function(r){return this.transform(t.SVGPathDataTransformer.Y_AXIS_SYMMETRY(r))},r.prototype.annotateArcs=function(){return this.transform(t.SVGPathDataTransformer.ANNOTATE_ARCS())},r}(),_=function(t){return" "===t||"\t"===t||"\r"===t||"\n"===t},f=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},v=function(t){function r(){var r=t.call(this)||this;return r.curNumber="",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return e(r,t),r.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},r.prototype.parse=function(t,r){var e=this;void 0===r&&(r=[]);for(var a=function(t){r.push(t),e.curArgs.length=0,e.canParseCommandOrComma=!0},n=0;n<t.length;n++){var i=t[n];if(f(i))this.curNumber+=i,this.curNumberHasExpDigits=this.curNumberHasExp;else if("e"!==i&&"E"!==i)if("-"!==i&&"+"!==i||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==i||this.curNumberHasExp||this.curNumberHasDecimal){if(this.curNumber&&-1!==this.curCommandType){var o=Number(this.curNumber);if(isNaN(o))throw new SyntaxError("Invalid number ending at "+n);if(this.curCommandType===l.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>o)throw new SyntaxError('Expected positive number, got "'+o+'" at index "'+n+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+n+'"');this.curArgs.push(o),this.curArgs.length===N[this.curCommandType]&&(l.HORIZ_LINE_TO===this.curCommandType?a({type:l.HORIZ_LINE_TO,relative:this.curCommandRelative,x:o}):l.VERT_LINE_TO===this.curCommandType?a({type:l.VERT_LINE_TO,relative:this.curCommandRelative,y:o}):this.curCommandType===l.MOVE_TO||this.curCommandType===l.LINE_TO||this.curCommandType===l.SMOOTH_QUAD_TO?(a({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),l.MOVE_TO===this.curCommandType&&(this.curCommandType=l.LINE_TO)):this.curCommandType===l.CURVE_TO?a({type:l.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===l.SMOOTH_CURVE_TO?a({type:l.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===l.QUAD_TO?a({type:l.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===l.ARC&&a({type:l.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!_(i))if(","===i&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==i&&"-"!==i&&"."!==i){if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+n+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+i+'" at index '+n+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==i&&"Z"!==i)if("h"===i||"H"===i)this.curCommandType=l.HORIZ_LINE_TO,this.curCommandRelative="h"===i;else if("v"===i||"V"===i)this.curCommandType=l.VERT_LINE_TO,this.curCommandRelative="v"===i;else if("m"===i||"M"===i)this.curCommandType=l.MOVE_TO,this.curCommandRelative="m"===i;else if("l"===i||"L"===i)this.curCommandType=l.LINE_TO,this.curCommandRelative="l"===i;else if("c"===i||"C"===i)this.curCommandType=l.CURVE_TO,this.curCommandRelative="c"===i;else if("s"===i||"S"===i)this.curCommandType=l.SMOOTH_CURVE_TO,this.curCommandRelative="s"===i;else if("q"===i||"Q"===i)this.curCommandType=l.QUAD_TO,this.curCommandRelative="q"===i;else if("t"===i||"T"===i)this.curCommandType=l.SMOOTH_QUAD_TO,this.curCommandRelative="t"===i;else{if("a"!==i&&"A"!==i)throw new SyntaxError('Unexpected character "'+i+'" at index '+n+".");this.curCommandType=l.ARC,this.curCommandRelative="a"===i}else r.push({type:l.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=i,this.curNumberHasDecimal="."===i}else this.curNumber+=i,this.curNumberHasDecimal=!0;else this.curNumber+=i;else this.curNumber+=i,this.curNumberHasExp=!0}return r},r.prototype.transform=function(t){return Object.create(this,{parse:{value:function(r,e){void 0===e&&(e=[]);for(var a=0,n=Object.getPrototypeOf(this).parse.call(this,r);a<n.length;a++){var i=n[a],o=t(i);Array.isArray(o)?e.push.apply(e,o):e.push(o)}return e}}})},r}(O),l=function(r){function a(t){var e=r.call(this)||this;return e.commands="string"==typeof t?a.parse(t):t,e}return e(a,r),a.prototype.encode=function(){return a.encode(this.commands)},a.prototype.getBounds=function(){var r=t.SVGPathDataTransformer.CALCULATE_BOUNDS();return this.transform(r),r},a.prototype.transform=function(t){for(var r=[],e=0,a=this.commands;e<a.length;e++){var n=t(a[e]);Array.isArray(n)?r.push.apply(r,n):r.push(n)}return this.commands=r,this},a.encode=function(t){return E(t)},a.parse=function(t){var r=new v,e=[];return r.parse(t,e),r.finish(e),e},a.CLOSE_PATH=1,a.MOVE_TO=2,a.HORIZ_LINE_TO=4,a.VERT_LINE_TO=8,a.LINE_TO=16,a.CURVE_TO=32,a.SMOOTH_CURVE_TO=64,a.QUAD_TO=128,a.SMOOTH_QUAD_TO=256,a.ARC=512,a.LINE_COMMANDS=a.LINE_TO|a.HORIZ_LINE_TO|a.VERT_LINE_TO,a.DRAWING_COMMANDS=a.HORIZ_LINE_TO|a.VERT_LINE_TO|a.LINE_TO|a.CURVE_TO|a.SMOOTH_CURVE_TO|a.QUAD_TO|a.SMOOTH_QUAD_TO|a.ARC,a}(O),N=((p={})[l.MOVE_TO]=2,p[l.LINE_TO]=2,p[l.HORIZ_LINE_TO]=1,p[l.VERT_LINE_TO]=1,p[l.CLOSE_PATH]=0,p[l.QUAD_TO]=4,p[l.SMOOTH_QUAD_TO]=2,p[l.CURVE_TO]=6,p[l.SMOOTH_CURVE_TO]=4,p[l.ARC]=7,p);function E(t){var r="";Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var a=t[e];if(a.type===l.CLOSE_PATH)r+="z";else if(a.type===l.HORIZ_LINE_TO)r+=(a.relative?"h":"H")+a.x;else if(a.type===l.VERT_LINE_TO)r+=(a.relative?"v":"V")+a.y;else if(a.type===l.MOVE_TO)r+=(a.relative?"m":"M")+a.x+" "+a.y;else if(a.type===l.LINE_TO)r+=(a.relative?"l":"L")+a.x+" "+a.y;else if(a.type===l.CURVE_TO)r+=(a.relative?"c":"C")+a.x1+" "+a.y1+" "+a.x2+" "+a.y2+" "+a.x+" "+a.y;else if(a.type===l.SMOOTH_CURVE_TO)r+=(a.relative?"s":"S")+a.x2+" "+a.y2+" "+a.x+" "+a.y;else if(a.type===l.QUAD_TO)r+=(a.relative?"q":"Q")+a.x1+" "+a.y1+" "+a.x+" "+a.y;else if(a.type===l.SMOOTH_QUAD_TO)r+=(a.relative?"t":"T")+a.x+" "+a.y;else{if(a.type!==l.ARC)throw new Error('Unexpected command type "'+a.type+'" at index '+e+".");r+=(a.relative?"a":"A")+a.rX+" "+a.rY+" "+a.xRot+" "+ +a.lArcFlag+" "+ +a.sweepFlag+" "+a.x+" "+a.y}}return r}var d=function(r){function a(t){var e=r.call(this)||this;return e.commands="string"==typeof t?a.parse(t):t,e}return e(a,r),a.prototype.encode=function(){return a.encode(this.commands)},a.prototype.getBounds=function(){var r=t.SVGPathDataTransformer.CALCULATE_BOUNDS();return this.transform(r),r},a.prototype.transform=function(t){for(var r=[],e=0,a=this.commands;e<a.length;e++){var n=t(a[e]);Array.isArray(n)?r.push.apply(r,n):r.push(n)}return this.commands=r,this},a.encode=function(t){return E(t)},a.parse=function(t){var r=new v,e=[];return r.parse(t,e),r.finish(e),e},a.CLOSE_PATH=1,a.MOVE_TO=2,a.HORIZ_LINE_TO=4,a.VERT_LINE_TO=8,a.LINE_TO=16,a.CURVE_TO=32,a.SMOOTH_CURVE_TO=64,a.QUAD_TO=128,a.SMOOTH_QUAD_TO=256,a.ARC=512,a.LINE_COMMANDS=a.LINE_TO|a.HORIZ_LINE_TO|a.VERT_LINE_TO,a.DRAWING_COMMANDS=a.HORIZ_LINE_TO|a.VERT_LINE_TO|a.LINE_TO|a.CURVE_TO|a.SMOOTH_CURVE_TO|a.QUAD_TO|a.SMOOTH_QUAD_TO|a.ARC,a}(O),A=((T={})[d.MOVE_TO]=2,T[d.LINE_TO]=2,T[d.HORIZ_LINE_TO]=1,T[d.VERT_LINE_TO]=1,T[d.CLOSE_PATH]=0,T[d.QUAD_TO]=4,T[d.SMOOTH_QUAD_TO]=2,T[d.CURVE_TO]=6,T[d.SMOOTH_CURVE_TO]=4,T[d.ARC]=7,T);t.COMMAND_ARG_COUNTS=A,t.SVGPathData=d,t.SVGPathDataParser=v,t.encodeSVGPath=E,Object.defineProperty(t,"__esModule",{value:!0})}));
***************************************************************************** */var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(t,e)};function e(t,e){function a(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}function a(t){var r="";Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var a=t[e];if(a.type===_.CLOSE_PATH)r+="z";else if(a.type===_.HORIZ_LINE_TO)r+=(a.relative?"h":"H")+a.x;else if(a.type===_.VERT_LINE_TO)r+=(a.relative?"v":"V")+a.y;else if(a.type===_.MOVE_TO)r+=(a.relative?"m":"M")+a.x+" "+a.y;else if(a.type===_.LINE_TO)r+=(a.relative?"l":"L")+a.x+" "+a.y;else if(a.type===_.CURVE_TO)r+=(a.relative?"c":"C")+a.x1+" "+a.y1+" "+a.x2+" "+a.y2+" "+a.x+" "+a.y;else if(a.type===_.SMOOTH_CURVE_TO)r+=(a.relative?"s":"S")+a.x2+" "+a.y2+" "+a.x+" "+a.y;else if(a.type===_.QUAD_TO)r+=(a.relative?"q":"Q")+a.x1+" "+a.y1+" "+a.x+" "+a.y;else if(a.type===_.SMOOTH_QUAD_TO)r+=(a.relative?"t":"T")+a.x+" "+a.y;else{if(a.type!==_.ARC)throw new Error('Unexpected command type "'+a.type+'" at index '+e+".");r+=(a.relative?"a":"A")+a.rX+" "+a.rY+" "+a.xRot+" "+ +a.lArcFlag+" "+ +a.sweepFlag+" "+a.x+" "+a.y}}return r}function i(t,r){var e=t[0],a=t[1];return[e*Math.cos(r)-a*Math.sin(r),e*Math.sin(r)+a*Math.cos(r)]}function n(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=0;e<t.length;e++)if("number"!=typeof t[e])throw new Error("assertNumbers arguments["+e+"] is not a number. "+typeof t[e]+" == typeof "+t[e]);return!0}var o=Math.PI;function s(t,r,e){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var a=t.rX,n=t.rY,s=t.x,u=t.y;a=Math.abs(t.rX),n=Math.abs(t.rY);var h=i([(r-s)/2,(e-u)/2],-t.xRot/180*o),c=h[0],m=h[1],y=Math.pow(c,2)/Math.pow(a,2)+Math.pow(m,2)/Math.pow(n,2);1<y&&(a*=Math.sqrt(y),n*=Math.sqrt(y)),t.rX=a,t.rY=n;var p=Math.pow(a,2)*Math.pow(m,2)+Math.pow(n,2)*Math.pow(c,2),T=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(a,2)*Math.pow(n,2)-p)/p)),f=a*m/n*T,O=-n*c/a*T,v=i([f,O],t.xRot/180*o);t.cX=v[0]+(r+s)/2,t.cY=v[1]+(e+u)/2,t.phi1=Math.atan2((m-O)/n,(c-f)/a),t.phi2=Math.atan2((-m-O)/n,(-c-f)/a),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*o),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*o),t.phi1*=180/o,t.phi2*=180/o}function u(t,r,e){n(t,r,e);var a=t*t+r*r-e*e;if(0>a)return[];if(0===a)return[[t*e/(t*t+r*r),r*e/(t*t+r*r)]];var i=Math.sqrt(a);return[[(t*e+r*i)/(t*t+r*r),(r*e-t*i)/(t*t+r*r)],[(t*e-r*i)/(t*t+r*r),(r*e+t*i)/(t*t+r*r)]]}var h=Math.PI/180;function c(t,r,e){return(1-e)*t+e*r}function m(t,r,e,a){return t+Math.cos(a/180*o)*r+Math.sin(a/180*o)*e}function y(t,r,e,a){var i=r-t,n=e-r,o=3*i+3*(a-e)-6*n,s=6*(n-i),u=3*i;return Math.abs(o)<1e-6?[-u/s]:function(t,r,e){void 0===e&&(e=1e-6);var a=t*t/4-r;if(a<-e)return[];if(a<=e)return[-t/2];var i=Math.sqrt(a);return[-t/2-i,-t/2+i]}(s/o,u/o,1e-6)}function p(t,r,e,a,i){var n=1-i;return t*(n*n*n)+r*(3*n*n*i)+e*(3*n*i*i)+a*(i*i*i)}!function(t){function r(){return o((function(t,r,e){return t.relative&&(void 0!==t.x1&&(t.x1+=r),void 0!==t.y1&&(t.y1+=e),void 0!==t.x2&&(t.x2+=r),void 0!==t.y2&&(t.y2+=e),void 0!==t.x&&(t.x+=r),void 0!==t.y&&(t.y+=e),t.relative=!1),t}))}function e(){var t=NaN,r=NaN,e=NaN,a=NaN;return o((function(i,n,o){return i.type&_.SMOOTH_CURVE_TO&&(i.type=_.CURVE_TO,t=isNaN(t)?n:t,r=isNaN(r)?o:r,i.x1=i.relative?n-t:2*n-t,i.y1=i.relative?o-r:2*o-r),i.type&_.CURVE_TO?(t=i.relative?n+i.x2:i.x2,r=i.relative?o+i.y2:i.y2):(t=NaN,r=NaN),i.type&_.SMOOTH_QUAD_TO&&(i.type=_.QUAD_TO,e=isNaN(e)?n:e,a=isNaN(a)?o:a,i.x1=i.relative?n-e:2*n-e,i.y1=i.relative?o-a:2*o-a),i.type&_.QUAD_TO?(e=i.relative?n+i.x1:i.x1,a=i.relative?o+i.y1:i.y1):(e=NaN,a=NaN),i}))}function a(){var t=NaN,r=NaN;return o((function(e,a,i){if(e.type&_.SMOOTH_QUAD_TO&&(e.type=_.QUAD_TO,t=isNaN(t)?a:t,r=isNaN(r)?i:r,e.x1=e.relative?a-t:2*a-t,e.y1=e.relative?i-r:2*i-r),e.type&_.QUAD_TO){t=e.relative?a+e.x1:e.x1,r=e.relative?i+e.y1:e.y1;var n=e.x1,o=e.y1;e.type=_.CURVE_TO,e.x1=((e.relative?0:a)+2*n)/3,e.y1=((e.relative?0:i)+2*o)/3,e.x2=(e.x+2*n)/3,e.y2=(e.y+2*o)/3}else t=NaN,r=NaN;return e}))}function o(t){var r=0,e=0,a=NaN,i=NaN;return function(n){if(isNaN(a)&&!(n.type&_.MOVE_TO))throw new Error("path must start with moveto");var o=t(n,r,e,a,i);return n.type&_.CLOSE_PATH&&(r=a,e=i),void 0!==n.x&&(r=n.relative?r+n.x:n.x),void 0!==n.y&&(e=n.relative?e+n.y:n.y),n.type&_.MOVE_TO&&(a=r,i=e),o}}function T(t,r,e,a,i,s){return n(t,r,e,a,i,s),o((function(n,o,u,h){var c=n.x1,m=n.x2,y=n.relative&&!isNaN(h),p=void 0!==n.x?n.x:y?0:o,T=void 0!==n.y?n.y:y?0:u;function f(t){return t*t}n.type&_.HORIZ_LINE_TO&&0!==r&&(n.type=_.LINE_TO,n.y=n.relative?0:u),n.type&_.VERT_LINE_TO&&0!==e&&(n.type=_.LINE_TO,n.x=n.relative?0:o),void 0!==n.x&&(n.x=n.x*t+T*e+(y?0:i)),void 0!==n.y&&(n.y=p*r+n.y*a+(y?0:s)),void 0!==n.x1&&(n.x1=n.x1*t+n.y1*e+(y?0:i)),void 0!==n.y1&&(n.y1=c*r+n.y1*a+(y?0:s)),void 0!==n.x2&&(n.x2=n.x2*t+n.y2*e+(y?0:i)),void 0!==n.y2&&(n.y2=m*r+n.y2*a+(y?0:s));var O=t*a-r*e;if(void 0!==n.xRot&&(1!==t||0!==r||0!==e||1!==a))if(0===O)delete n.rX,delete n.rY,delete n.xRot,delete n.lArcFlag,delete n.sweepFlag,n.type=_.LINE_TO;else{var v=n.xRot*Math.PI/180,l=Math.sin(v),N=Math.cos(v),d=1/f(n.rX),x=1/f(n.rY),A=f(N)*d+f(l)*x,E=2*l*N*(d-x),C=f(l)*d+f(N)*x,M=A*a*a-E*r*a+C*r*r,R=E*(t*a+r*e)-2*(A*e*a+C*t*r),S=A*e*e-E*t*e+C*t*t,g=(Math.atan2(R,M-S)+Math.PI)%Math.PI/2,I=Math.sin(g),V=Math.cos(g);n.rX=Math.abs(O)/Math.sqrt(M*f(V)+R*I*V+S*f(I)),n.rY=Math.abs(O)/Math.sqrt(M*f(I)-R*I*V+S*f(V)),n.xRot=180*g/Math.PI}return void 0!==n.sweepFlag&&0>O&&(n.sweepFlag=+!n.sweepFlag),n}))}function f(){return function(t){var r={};for(var e in t)r[e]=t[e];return r}}t.ROUND=function(t){function r(r){return Math.round(r*t)/t}return void 0===t&&(t=1e13),n(t),function(t){return void 0!==t.x1&&(t.x1=r(t.x1)),void 0!==t.y1&&(t.y1=r(t.y1)),void 0!==t.x2&&(t.x2=r(t.x2)),void 0!==t.y2&&(t.y2=r(t.y2)),void 0!==t.x&&(t.x=r(t.x)),void 0!==t.y&&(t.y=r(t.y)),void 0!==t.rX&&(t.rX=r(t.rX)),void 0!==t.rY&&(t.rY=r(t.rY)),t}},t.TO_ABS=r,t.TO_REL=function(){return o((function(t,r,e){return t.relative||(void 0!==t.x1&&(t.x1-=r),void 0!==t.y1&&(t.y1-=e),void 0!==t.x2&&(t.x2-=r),void 0!==t.y2&&(t.y2-=e),void 0!==t.x&&(t.x-=r),void 0!==t.y&&(t.y-=e),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,r,e){return void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===e&&(e=!0),o((function(a,i,n,o,s){if(isNaN(o)&&!(a.type&_.MOVE_TO))throw new Error("path must start with moveto");return r&&a.type&_.HORIZ_LINE_TO&&(a.type=_.LINE_TO,a.y=a.relative?0:n),e&&a.type&_.VERT_LINE_TO&&(a.type=_.LINE_TO,a.x=a.relative?0:i),t&&a.type&_.CLOSE_PATH&&(a.type=_.LINE_TO,a.x=a.relative?o-i:o,a.y=a.relative?s-n:s),a.type&_.ARC&&(0===a.rX||0===a.rY)&&(a.type=_.LINE_TO,delete a.rX,delete a.rY,delete a.xRot,delete a.lArcFlag,delete a.sweepFlag),a}))},t.NORMALIZE_ST=e,t.QT_TO_C=a,t.INFO=o,t.SANITIZE=function(t){void 0===t&&(t=0),n(t);var r=NaN,e=NaN,a=NaN,i=NaN;return o((function(n,o,s,u,h){var c=Math.abs,m=!1,y=0,p=0;if(n.type&_.SMOOTH_CURVE_TO&&(y=isNaN(r)?0:o-r,p=isNaN(e)?0:s-e),n.type&(_.CURVE_TO|_.SMOOTH_CURVE_TO)?(r=n.relative?o+n.x2:n.x2,e=n.relative?s+n.y2:n.y2):(r=NaN,e=NaN),n.type&_.SMOOTH_QUAD_TO?(a=isNaN(a)?o:2*o-a,i=isNaN(i)?s:2*s-i):n.type&_.QUAD_TO?(a=n.relative?o+n.x1:n.x1,i=n.relative?s+n.y1:n.y2):(a=NaN,i=NaN),n.type&_.LINE_COMMANDS||n.type&_.ARC&&(0===n.rX||0===n.rY||!n.lArcFlag)||n.type&_.CURVE_TO||n.type&_.SMOOTH_CURVE_TO||n.type&_.QUAD_TO||n.type&_.SMOOTH_QUAD_TO){var T=void 0===n.x?0:n.relative?n.x:n.x-o,f=void 0===n.y?0:n.relative?n.y:n.y-s;y=isNaN(a)?void 0===n.x1?y:n.relative?n.x:n.x1-o:a-o,p=isNaN(i)?void 0===n.y1?p:n.relative?n.y:n.y1-s:i-s;var O=void 0===n.x2?0:n.relative?n.x:n.x2-o,v=void 0===n.y2?0:n.relative?n.y:n.y2-s;c(T)<=t&&c(f)<=t&&c(y)<=t&&c(p)<=t&&c(O)<=t&&c(v)<=t&&(m=!0)}return n.type&_.CLOSE_PATH&&c(o-u)<=t&&c(s-h)<=t&&(m=!0),m?[]:n}))},t.MATRIX=T,t.ROTATE=function(t,r,e){void 0===r&&(r=0),void 0===e&&(e=0),n(t,r,e);var a=Math.sin(t),i=Math.cos(t);return T(i,a,-a,i,r-r*i+e*a,e-r*a-e*i)},t.TRANSLATE=function(t,r){return void 0===r&&(r=0),n(t,r),T(1,0,0,1,t,r)},t.SCALE=function(t,r){return void 0===r&&(r=t),n(t,r),T(t,0,0,r,0,0)},t.SKEW_X=function(t){return n(t),T(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return n(t),T(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),n(t),T(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),n(t),T(1,0,0,-1,0,t)},t.A_TO_C=function(){return o((function(t,r,e){return _.ARC===t.type?function(t,r,e){var a,n,o,u;t.cX||s(t,r,e);for(var m=Math.min(t.phi1,t.phi2),y=Math.max(t.phi1,t.phi2)-m,p=Math.ceil(y/90),T=new Array(p),f=r,O=e,v=0;v<p;v++){var l=c(t.phi1,t.phi2,v/p),N=c(t.phi1,t.phi2,(v+1)/p),d=N-l,x=4/3*Math.tan(d*h/4),A=[Math.cos(l*h)-x*Math.sin(l*h),Math.sin(l*h)+x*Math.cos(l*h)],E=A[0],C=A[1],M=[Math.cos(N*h),Math.sin(N*h)],R=M[0],S=M[1],g=[R+x*Math.sin(N*h),S-x*Math.cos(N*h)],I=g[0],V=g[1];T[v]={relative:t.relative,type:_.CURVE_TO};var D=function(r,e){var a=i([r*t.rX,e*t.rY],t.xRot),n=a[0],o=a[1];return[t.cX+n,t.cY+o]};a=D(E,C),T[v].x1=a[0],T[v].y1=a[1],n=D(I,V),T[v].x2=n[0],T[v].y2=n[1],o=D(R,S),T[v].x=o[0],T[v].y=o[1],t.relative&&(T[v].x1-=f,T[v].y1-=O,T[v].x2-=f,T[v].y2-=O,T[v].x-=f,T[v].y-=O),f=(u=[T[v].x,T[v].y])[0],O=u[1]}return T}(t,t.relative?0:r,t.relative?0:e):t}))},t.ANNOTATE_ARCS=function(){return o((function(t,r,e){return t.relative&&(r=0,e=0),_.ARC===t.type&&s(t,r,e),t}))},t.CLONE=f,t.CALCULATE_BOUNDS=function(){var t=function(t){var r={};for(var e in t)r[e]=t[e];return r},i=r(),n=a(),h=e(),c=o((function(r,e,a){var o=h(n(i(t(r))));function T(t){t>c.maxX&&(c.maxX=t),t<c.minX&&(c.minX=t)}function f(t){t>c.maxY&&(c.maxY=t),t<c.minY&&(c.minY=t)}if(o.type&_.DRAWING_COMMANDS&&(T(e),f(a)),o.type&_.HORIZ_LINE_TO&&T(o.x),o.type&_.VERT_LINE_TO&&f(o.y),o.type&_.LINE_TO&&(T(o.x),f(o.y)),o.type&_.CURVE_TO){T(o.x),f(o.y);for(var O=0,v=y(e,o.x1,o.x2,o.x);O<v.length;O++){0<(H=v[O])&&1>H&&T(p(e,o.x1,o.x2,o.x,H))}for(var l=0,N=y(a,o.y1,o.y2,o.y);l<N.length;l++){0<(H=N[l])&&1>H&&f(p(a,o.y1,o.y2,o.y,H))}}if(o.type&_.ARC){T(o.x),f(o.y),s(o,e,a);for(var d=o.xRot/180*Math.PI,x=Math.cos(d)*o.rX,A=Math.sin(d)*o.rX,E=-Math.sin(d)*o.rY,C=Math.cos(d)*o.rY,M=o.phi1<o.phi2?[o.phi1,o.phi2]:-180>o.phi2?[o.phi2+360,o.phi1+360]:[o.phi2,o.phi1],R=M[0],S=M[1],g=function(t){var r=t[0],e=t[1],a=180*Math.atan2(e,r)/Math.PI;return a<R?a+360:a},I=0,V=u(E,-x,0).map(g);I<V.length;I++){(H=V[I])>R&&H<S&&T(m(o.cX,x,E,H))}for(var D=0,L=u(C,-A,0).map(g);D<L.length;D++){var H;(H=L[D])>R&&H<S&&f(m(o.cY,A,C,H))}}return r}));return c.minX=1/0,c.maxX=-1/0,c.minY=1/0,c.maxY=-1/0,c}}(t.SVGPathDataTransformer||(t.SVGPathDataTransformer={}));var T,f=function(){function r(){}return r.prototype.round=function(r){return this.transform(t.SVGPathDataTransformer.ROUND(r))},r.prototype.toAbs=function(){return this.transform(t.SVGPathDataTransformer.TO_ABS())},r.prototype.toRel=function(){return this.transform(t.SVGPathDataTransformer.TO_REL())},r.prototype.normalizeHVZ=function(r,e,a){return this.transform(t.SVGPathDataTransformer.NORMALIZE_HVZ(r,e,a))},r.prototype.normalizeST=function(){return this.transform(t.SVGPathDataTransformer.NORMALIZE_ST())},r.prototype.qtToC=function(){return this.transform(t.SVGPathDataTransformer.QT_TO_C())},r.prototype.aToC=function(){return this.transform(t.SVGPathDataTransformer.A_TO_C())},r.prototype.sanitize=function(r){return this.transform(t.SVGPathDataTransformer.SANITIZE(r))},r.prototype.translate=function(r,e){return this.transform(t.SVGPathDataTransformer.TRANSLATE(r,e))},r.prototype.scale=function(r,e){return this.transform(t.SVGPathDataTransformer.SCALE(r,e))},r.prototype.rotate=function(r,e,a){return this.transform(t.SVGPathDataTransformer.ROTATE(r,e,a))},r.prototype.matrix=function(r,e,a,i,n,o){return this.transform(t.SVGPathDataTransformer.MATRIX(r,e,a,i,n,o))},r.prototype.skewX=function(r){return this.transform(t.SVGPathDataTransformer.SKEW_X(r))},r.prototype.skewY=function(r){return this.transform(t.SVGPathDataTransformer.SKEW_Y(r))},r.prototype.xSymmetry=function(r){return this.transform(t.SVGPathDataTransformer.X_AXIS_SYMMETRY(r))},r.prototype.ySymmetry=function(r){return this.transform(t.SVGPathDataTransformer.Y_AXIS_SYMMETRY(r))},r.prototype.annotateArcs=function(){return this.transform(t.SVGPathDataTransformer.ANNOTATE_ARCS())},r}(),O=function(t){return" "===t||"\t"===t||"\r"===t||"\n"===t},v=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},l=function(t){function r(){var r=t.call(this)||this;return r.curNumber="",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return e(r,t),r.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},r.prototype.parse=function(t,r){var e=this;void 0===r&&(r=[]);for(var a=function(t){r.push(t),e.curArgs.length=0,e.canParseCommandOrComma=!0},i=0;i<t.length;i++){var n=t[i],o=!(this.curCommandType!==_.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),s=v(n)&&("0"===this.curNumber&&"0"===n||o);if(!v(n)||s)if("e"!==n&&"E"!==n)if("-"!==n&&"+"!==n||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==n||this.curNumberHasExp||this.curNumberHasDecimal||o){if(this.curNumber&&-1!==this.curCommandType){var u=Number(this.curNumber);if(isNaN(u))throw new SyntaxError("Invalid number ending at "+i);if(this.curCommandType===_.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>u)throw new SyntaxError('Expected positive number, got "'+u+'" at index "'+i+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+i+'"');this.curArgs.push(u),this.curArgs.length===N[this.curCommandType]&&(_.HORIZ_LINE_TO===this.curCommandType?a({type:_.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):_.VERT_LINE_TO===this.curCommandType?a({type:_.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===_.MOVE_TO||this.curCommandType===_.LINE_TO||this.curCommandType===_.SMOOTH_QUAD_TO?(a({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),_.MOVE_TO===this.curCommandType&&(this.curCommandType=_.LINE_TO)):this.curCommandType===_.CURVE_TO?a({type:_.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===_.SMOOTH_CURVE_TO?a({type:_.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===_.QUAD_TO?a({type:_.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===_.ARC&&a({type:_.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!O(n))if(","===n&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==n&&"-"!==n&&"."!==n)if(s)this.curNumber=n,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+i+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+n+'" at index '+i+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==n&&"Z"!==n)if("h"===n||"H"===n)this.curCommandType=_.HORIZ_LINE_TO,this.curCommandRelative="h"===n;else if("v"===n||"V"===n)this.curCommandType=_.VERT_LINE_TO,this.curCommandRelative="v"===n;else if("m"===n||"M"===n)this.curCommandType=_.MOVE_TO,this.curCommandRelative="m"===n;else if("l"===n||"L"===n)this.curCommandType=_.LINE_TO,this.curCommandRelative="l"===n;else if("c"===n||"C"===n)this.curCommandType=_.CURVE_TO,this.curCommandRelative="c"===n;else if("s"===n||"S"===n)this.curCommandType=_.SMOOTH_CURVE_TO,this.curCommandRelative="s"===n;else if("q"===n||"Q"===n)this.curCommandType=_.QUAD_TO,this.curCommandRelative="q"===n;else if("t"===n||"T"===n)this.curCommandType=_.SMOOTH_QUAD_TO,this.curCommandRelative="t"===n;else{if("a"!==n&&"A"!==n)throw new SyntaxError('Unexpected character "'+n+'" at index '+i+".");this.curCommandType=_.ARC,this.curCommandRelative="a"===n}else r.push({type:_.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=n,this.curNumberHasDecimal="."===n}else this.curNumber+=n,this.curNumberHasDecimal=!0;else this.curNumber+=n;else this.curNumber+=n,this.curNumberHasExp=!0;else this.curNumber+=n,this.curNumberHasExpDigits=this.curNumberHasExp}return r},r.prototype.transform=function(t){return Object.create(this,{parse:{value:function(r,e){void 0===e&&(e=[]);for(var a=0,i=Object.getPrototypeOf(this).parse.call(this,r);a<i.length;a++){var n=i[a],o=t(n);Array.isArray(o)?e.push.apply(e,o):e.push(o)}return e}}})},r}(f),_=function(r){function i(t){var e=r.call(this)||this;return e.commands="string"==typeof t?i.parse(t):t,e}return e(i,r),i.prototype.encode=function(){return i.encode(this.commands)},i.prototype.getBounds=function(){var r=t.SVGPathDataTransformer.CALCULATE_BOUNDS();return this.transform(r),r},i.prototype.transform=function(t){for(var r=[],e=0,a=this.commands;e<a.length;e++){var i=t(a[e]);Array.isArray(i)?r.push.apply(r,i):r.push(i)}return this.commands=r,this},i.encode=function(t){return a(t)},i.parse=function(t){var r=new l,e=[];return r.parse(t,e),r.finish(e),e},i.CLOSE_PATH=1,i.MOVE_TO=2,i.HORIZ_LINE_TO=4,i.VERT_LINE_TO=8,i.LINE_TO=16,i.CURVE_TO=32,i.SMOOTH_CURVE_TO=64,i.QUAD_TO=128,i.SMOOTH_QUAD_TO=256,i.ARC=512,i.LINE_COMMANDS=i.LINE_TO|i.HORIZ_LINE_TO|i.VERT_LINE_TO,i.DRAWING_COMMANDS=i.HORIZ_LINE_TO|i.VERT_LINE_TO|i.LINE_TO|i.CURVE_TO|i.SMOOTH_CURVE_TO|i.QUAD_TO|i.SMOOTH_QUAD_TO|i.ARC,i}(f),N=((T={})[_.MOVE_TO]=2,T[_.LINE_TO]=2,T[_.HORIZ_LINE_TO]=1,T[_.VERT_LINE_TO]=1,T[_.CLOSE_PATH]=0,T[_.QUAD_TO]=4,T[_.SMOOTH_QUAD_TO]=2,T[_.CURVE_TO]=6,T[_.SMOOTH_CURVE_TO]=4,T[_.ARC]=7,T);t.COMMAND_ARG_COUNTS=N,t.SVGPathData=_,t.SVGPathDataParser=l,t.encodeSVGPath=a,Object.defineProperty(t,"__esModule",{value:!0})}));
//# sourceMappingURL=SVGPathData.js.map

@@ -15,3 +15,3 @@ /*! *****************************************************************************

***************************************************************************** */
var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};function r(r,e){function i(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function e(t,r){var e=t[0],i=t[1];return[e*Math.cos(r)-i*Math.sin(r),e*Math.sin(r)+i*Math.cos(r)]}function i(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=0;e<t.length;e++)if("number"!=typeof t[e])throw new Error("assertNumbers arguments["+e+"] is not a number. "+typeof t[e]+" == typeof "+t[e]);return!0}var a=Math.PI;function n(t,r,i){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var n=t.rX,o=t.rY,s=t.x,u=t.y;n=Math.abs(t.rX),o=Math.abs(t.rY);var c=e([(r-s)/2,(i-u)/2],-t.xRot/180*a),h=c[0],y=c[1],p=Math.pow(h,2)/Math.pow(n,2)+Math.pow(y,2)/Math.pow(o,2);1<p&&(n*=Math.sqrt(p),o*=Math.sqrt(p)),t.rX=n,t.rY=o;var O=Math.pow(n,2)*Math.pow(y,2)+Math.pow(o,2)*Math.pow(h,2),m=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(o,2)-O)/O)),T=n*y/o*m,_=-o*h/n*m,v=e([T,_],t.xRot/180*a);t.cX=v[0]+(r+s)/2,t.cY=v[1]+(i+u)/2,t.phi1=Math.atan2((y-_)/o,(h-T)/n),t.phi2=Math.atan2((-y-_)/o,(-h-T)/n),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*a),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*a),t.phi1*=180/a,t.phi2*=180/a}function o(t,r,e){i(t,r,e);var a=t*t+r*r-e*e;if(0>a)return[];if(0===a)return[[t*e/(t*t+r*r),r*e/(t*t+r*r)]];var n=Math.sqrt(a);return[[(t*e+r*n)/(t*t+r*r),(r*e-t*n)/(t*t+r*r)],[(t*e-r*n)/(t*t+r*r),(r*e+t*n)/(t*t+r*r)]]}var s,u=Math.PI/180;function c(t,r,e){return(1-e)*t+e*r}function h(t,r,e,i){return t+Math.cos(i/180*a)*r+Math.sin(i/180*a)*e}function y(t,r,e,i){var a=r-t,n=e-r,o=3*a+3*(i-e)-6*n,s=6*(n-a),u=3*a;return Math.abs(o)<1e-6?[-u/s]:function(t,r,e){void 0===e&&(e=1e-6);var i=t*t/4-r;if(i<-e)return[];if(i<=e)return[-t/2];var a=Math.sqrt(i);return[-t/2-a,-t/2+a]}(s/o,u/o,1e-6)}function p(t,r,e,i,a){var n=1-a;return t*(n*n*n)+r*(3*n*n*a)+e*(3*n*a*a)+i*(a*a*a)}!function(t){function r(){return O((function(t,r,e){return t.relative&&(void 0!==t.x1&&(t.x1+=r),void 0!==t.y1&&(t.y1+=e),void 0!==t.x2&&(t.x2+=r),void 0!==t.y2&&(t.y2+=e),void 0!==t.x&&(t.x+=r),void 0!==t.y&&(t.y+=e),t.relative=!1),t}))}function a(){var t=NaN,r=NaN,e=NaN,i=NaN;return O((function(a,n,o){return a.type&l.SMOOTH_CURVE_TO&&(a.type=l.CURVE_TO,t=isNaN(t)?n:t,r=isNaN(r)?o:r,a.x1=a.relative?n-t:2*n-t,a.y1=a.relative?o-r:2*o-r),a.type&l.CURVE_TO?(t=a.relative?n+a.x2:a.x2,r=a.relative?o+a.y2:a.y2):(t=NaN,r=NaN),a.type&l.SMOOTH_QUAD_TO&&(a.type=l.QUAD_TO,e=isNaN(e)?n:e,i=isNaN(i)?o:i,a.x1=a.relative?n-e:2*n-e,a.y1=a.relative?o-i:2*o-i),a.type&l.QUAD_TO?(e=a.relative?n+a.x1:a.x1,i=a.relative?o+a.y1:a.y1):(e=NaN,i=NaN),a}))}function s(){var t=NaN,r=NaN;return O((function(e,i,a){if(e.type&l.SMOOTH_QUAD_TO&&(e.type=l.QUAD_TO,t=isNaN(t)?i:t,r=isNaN(r)?a:r,e.x1=e.relative?i-t:2*i-t,e.y1=e.relative?a-r:2*a-r),e.type&l.QUAD_TO){t=e.relative?i+e.x1:e.x1,r=e.relative?a+e.y1:e.y1;var n=e.x1,o=e.y1;e.type=l.CURVE_TO,e.x1=((e.relative?0:i)+2*n)/3,e.y1=((e.relative?0:a)+2*o)/3,e.x2=(e.x+2*n)/3,e.y2=(e.y+2*o)/3}else t=NaN,r=NaN;return e}))}function O(t){var r=0,e=0,i=NaN,a=NaN;return function(n){if(isNaN(i)&&!(n.type&l.MOVE_TO))throw new Error("path must start with moveto");var o=t(n,r,e,i,a);return n.type&l.CLOSE_PATH&&(r=i,e=a),void 0!==n.x&&(r=n.relative?r+n.x:n.x),void 0!==n.y&&(e=n.relative?e+n.y:n.y),n.type&l.MOVE_TO&&(i=r,a=e),o}}function m(t,r,e,a,n,o){return i(t,r,e,a,n,o),O((function(i,s,u,c){var h=i.x1,y=i.x2,p=i.relative&&!isNaN(c),O=void 0!==i.x?i.x:p?0:s,m=void 0!==i.y?i.y:p?0:u;function T(t){return t*t}i.type&l.HORIZ_LINE_TO&&0!==r&&(i.type=l.LINE_TO,i.y=i.relative?0:u),i.type&l.VERT_LINE_TO&&0!==e&&(i.type=l.LINE_TO,i.x=i.relative?0:s),void 0!==i.x&&(i.x=i.x*t+m*e+(p?0:n)),void 0!==i.y&&(i.y=O*r+i.y*a+(p?0:o)),void 0!==i.x1&&(i.x1=i.x1*t+i.y1*e+(p?0:n)),void 0!==i.y1&&(i.y1=h*r+i.y1*a+(p?0:o)),void 0!==i.x2&&(i.x2=i.x2*t+i.y2*e+(p?0:n)),void 0!==i.y2&&(i.y2=y*r+i.y2*a+(p?0:o));var _=t*a-r*e;if(void 0!==i.xRot&&(1!==t||0!==r||0!==e||1!==a))if(0===_)delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag,i.type=l.LINE_TO;else{var v=i.xRot*Math.PI/180,f=Math.sin(v),N=Math.cos(v),E=1/T(i.rX),A=1/T(i.rY),d=T(N)*E+T(f)*A,x=2*f*N*(E-A),C=T(f)*E+T(N)*A,M=d*a*a-x*r*a+C*r*r,R=x*(t*a+r*e)-2*(d*e*a+C*t*r),I=d*e*e-x*t*e+C*t*t,g=(Math.atan2(R,M-I)+Math.PI)%Math.PI/2,S=Math.sin(g),L=Math.cos(g);i.rX=Math.abs(_)/Math.sqrt(M*T(L)+R*S*L+I*T(S)),i.rY=Math.abs(_)/Math.sqrt(M*T(S)-R*S*L+I*T(L)),i.xRot=180*g/Math.PI}return void 0!==i.sweepFlag&&0>_&&(i.sweepFlag=+!i.sweepFlag),i}))}function T(){return function(t){var r={};for(var e in t)r[e]=t[e];return r}}t.ROUND=function(t){function r(r){return Math.round(r*t)/t}return void 0===t&&(t=1e13),i(t),function(t){return void 0!==t.x1&&(t.x1=r(t.x1)),void 0!==t.y1&&(t.y1=r(t.y1)),void 0!==t.x2&&(t.x2=r(t.x2)),void 0!==t.y2&&(t.y2=r(t.y2)),void 0!==t.x&&(t.x=r(t.x)),void 0!==t.y&&(t.y=r(t.y)),void 0!==t.rX&&(t.rX=r(t.rX)),void 0!==t.rY&&(t.rY=r(t.rY)),t}},t.TO_ABS=r,t.TO_REL=function(){return O((function(t,r,e){return t.relative||(void 0!==t.x1&&(t.x1-=r),void 0!==t.y1&&(t.y1-=e),void 0!==t.x2&&(t.x2-=r),void 0!==t.y2&&(t.y2-=e),void 0!==t.x&&(t.x-=r),void 0!==t.y&&(t.y-=e),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,r,e){return void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===e&&(e=!0),O((function(i,a,n,o,s){if(isNaN(o)&&!(i.type&l.MOVE_TO))throw new Error("path must start with moveto");return r&&i.type&l.HORIZ_LINE_TO&&(i.type=l.LINE_TO,i.y=i.relative?0:n),e&&i.type&l.VERT_LINE_TO&&(i.type=l.LINE_TO,i.x=i.relative?0:a),t&&i.type&l.CLOSE_PATH&&(i.type=l.LINE_TO,i.x=i.relative?o-a:o,i.y=i.relative?s-n:s),i.type&l.ARC&&(0===i.rX||0===i.rY)&&(i.type=l.LINE_TO,delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag),i}))},t.NORMALIZE_ST=a,t.QT_TO_C=s,t.INFO=O,t.SANITIZE=function(t){void 0===t&&(t=0),i(t);var r=NaN,e=NaN,a=NaN,n=NaN;return O((function(i,o,s,u,c){var h=Math.abs,y=!1,p=0,O=0;if(i.type&l.SMOOTH_CURVE_TO&&(p=isNaN(r)?0:o-r,O=isNaN(e)?0:s-e),i.type&(l.CURVE_TO|l.SMOOTH_CURVE_TO)?(r=i.relative?o+i.x2:i.x2,e=i.relative?s+i.y2:i.y2):(r=NaN,e=NaN),i.type&l.SMOOTH_QUAD_TO?(a=isNaN(a)?o:2*o-a,n=isNaN(n)?s:2*s-n):i.type&l.QUAD_TO?(a=i.relative?o+i.x1:i.x1,n=i.relative?s+i.y1:i.y2):(a=NaN,n=NaN),i.type&l.LINE_COMMANDS||i.type&l.ARC&&(0===i.rX||0===i.rY||!i.lArcFlag)||i.type&l.CURVE_TO||i.type&l.SMOOTH_CURVE_TO||i.type&l.QUAD_TO||i.type&l.SMOOTH_QUAD_TO){var m=void 0===i.x?0:i.relative?i.x:i.x-o,T=void 0===i.y?0:i.relative?i.y:i.y-s;p=isNaN(a)?void 0===i.x1?p:i.relative?i.x:i.x1-o:a-o,O=isNaN(n)?void 0===i.y1?O:i.relative?i.y:i.y1-s:n-s;var _=void 0===i.x2?0:i.relative?i.x:i.x2-o,v=void 0===i.y2?0:i.relative?i.y:i.y2-s;h(m)<=t&&h(T)<=t&&h(p)<=t&&h(O)<=t&&h(_)<=t&&h(v)<=t&&(y=!0)}return i.type&l.CLOSE_PATH&&h(o-u)<=t&&h(s-c)<=t&&(y=!0),y?[]:i}))},t.MATRIX=m,t.ROTATE=function(t,r,e){void 0===r&&(r=0),void 0===e&&(e=0),i(t,r,e);var a=Math.sin(t),n=Math.cos(t);return m(n,a,-a,n,r-r*n+e*a,e-r*a-e*n)},t.TRANSLATE=function(t,r){return void 0===r&&(r=0),i(t,r),m(1,0,0,1,t,r)},t.SCALE=function(t,r){return void 0===r&&(r=t),i(t,r),m(t,0,0,r,0,0)},t.SKEW_X=function(t){return i(t),m(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return i(t),m(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),i(t),m(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),i(t),m(1,0,0,-1,0,t)},t.A_TO_C=function(){return O((function(t,r,i){return l.ARC===t.type?function(t,r,i){var a,o,s,h;t.cX||n(t,r,i);for(var y=Math.min(t.phi1,t.phi2),p=Math.max(t.phi1,t.phi2)-y,O=Math.ceil(p/90),m=new Array(O),T=r,_=i,v=0;v<O;v++){var f=c(t.phi1,t.phi2,v/O),N=c(t.phi1,t.phi2,(v+1)/O),E=N-f,A=4/3*Math.tan(E*u/4),d=[Math.cos(f*u)-A*Math.sin(f*u),Math.sin(f*u)+A*Math.cos(f*u)],x=d[0],C=d[1],M=[Math.cos(N*u),Math.sin(N*u)],R=M[0],I=M[1],g=[R+A*Math.sin(N*u),I-A*Math.cos(N*u)],S=g[0],L=g[1];m[v]={relative:t.relative,type:l.CURVE_TO};var U=function(r,i){var a=e([r*t.rX,i*t.rY],t.xRot),n=a[0],o=a[1];return[t.cX+n,t.cY+o]};a=U(x,C),m[v].x1=a[0],m[v].y1=a[1],o=U(S,L),m[v].x2=o[0],m[v].y2=o[1],s=U(R,I),m[v].x=s[0],m[v].y=s[1],t.relative&&(m[v].x1-=T,m[v].y1-=_,m[v].x2-=T,m[v].y2-=_,m[v].x-=T,m[v].y-=_),T=(h=[m[v].x,m[v].y])[0],_=h[1]}return m}(t,t.relative?0:r,t.relative?0:i):t}))},t.ANNOTATE_ARCS=function(){return O((function(t,r,e){return t.relative&&(r=0,e=0),l.ARC===t.type&&n(t,r,e),t}))},t.CLONE=T,t.CALCULATE_BOUNDS=function(){var t=function(t){var r={};for(var e in t)r[e]=t[e];return r},e=r(),i=s(),u=a(),c=O((function(r,a,s){var O=u(i(e(t(r))));function m(t){t>c.maxX&&(c.maxX=t),t<c.minX&&(c.minX=t)}function T(t){t>c.maxY&&(c.maxY=t),t<c.minY&&(c.minY=t)}if(O.type&l.DRAWING_COMMANDS&&(m(a),T(s)),O.type&l.HORIZ_LINE_TO&&m(O.x),O.type&l.VERT_LINE_TO&&T(O.y),O.type&l.LINE_TO&&(m(O.x),T(O.y)),O.type&l.CURVE_TO){m(O.x),T(O.y);for(var _=0,v=y(a,O.x1,O.x2,O.x);_<v.length;_++){0<(V=v[_])&&1>V&&m(p(a,O.x1,O.x2,O.x,V))}for(var f=0,N=y(s,O.y1,O.y2,O.y);f<N.length;f++){0<(V=N[f])&&1>V&&T(p(s,O.y1,O.y2,O.y,V))}}if(O.type&l.ARC){m(O.x),T(O.y),n(O,a,s);for(var E=O.xRot/180*Math.PI,A=Math.cos(E)*O.rX,d=Math.sin(E)*O.rX,x=-Math.sin(E)*O.rY,C=Math.cos(E)*O.rY,M=O.phi1<O.phi2?[O.phi1,O.phi2]:-180>O.phi2?[O.phi2+360,O.phi1+360]:[O.phi2,O.phi1],R=M[0],I=M[1],g=function(t){var r=t[0],e=t[1],i=180*Math.atan2(e,r)/Math.PI;return i<R?i+360:i},S=0,L=o(x,-A,0).map(g);S<L.length;S++){(V=L[S])>R&&V<I&&m(h(O.cX,A,x,V))}for(var U=0,H=o(C,-d,0).map(g);U<H.length;U++){var V;(V=H[U])>R&&V<I&&T(h(O.cY,d,C,V))}}return r}));return c.minX=1/0,c.maxX=-1/0,c.minY=1/0,c.maxY=-1/0,c}}(s||(s={}));var O,m,T=function(){function t(){}return t.prototype.round=function(t){return this.transform(s.ROUND(t))},t.prototype.toAbs=function(){return this.transform(s.TO_ABS())},t.prototype.toRel=function(){return this.transform(s.TO_REL())},t.prototype.normalizeHVZ=function(t,r,e){return this.transform(s.NORMALIZE_HVZ(t,r,e))},t.prototype.normalizeST=function(){return this.transform(s.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(s.QT_TO_C())},t.prototype.aToC=function(){return this.transform(s.A_TO_C())},t.prototype.sanitize=function(t){return this.transform(s.SANITIZE(t))},t.prototype.translate=function(t,r){return this.transform(s.TRANSLATE(t,r))},t.prototype.scale=function(t,r){return this.transform(s.SCALE(t,r))},t.prototype.rotate=function(t,r,e){return this.transform(s.ROTATE(t,r,e))},t.prototype.matrix=function(t,r,e,i,a,n){return this.transform(s.MATRIX(t,r,e,i,a,n))},t.prototype.skewX=function(t){return this.transform(s.SKEW_X(t))},t.prototype.skewY=function(t){return this.transform(s.SKEW_Y(t))},t.prototype.xSymmetry=function(t){return this.transform(s.X_AXIS_SYMMETRY(t))},t.prototype.ySymmetry=function(t){return this.transform(s.Y_AXIS_SYMMETRY(t))},t.prototype.annotateArcs=function(){return this.transform(s.ANNOTATE_ARCS())},t}(),_=function(t){return" "===t||"\t"===t||"\r"===t||"\n"===t},v=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},f=function(t){function e(){var r=t.call(this)||this;return r.curNumber="",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return r(e,t),e.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},e.prototype.parse=function(t,r){var e=this;void 0===r&&(r=[]);for(var i=function(t){r.push(t),e.curArgs.length=0,e.canParseCommandOrComma=!0},a=0;a<t.length;a++){var n=t[a];if(v(n))this.curNumber+=n,this.curNumberHasExpDigits=this.curNumberHasExp;else if("e"!==n&&"E"!==n)if("-"!==n&&"+"!==n||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==n||this.curNumberHasExp||this.curNumberHasDecimal){if(this.curNumber&&-1!==this.curCommandType){var o=Number(this.curNumber);if(isNaN(o))throw new SyntaxError("Invalid number ending at "+a);if(this.curCommandType===l.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>o)throw new SyntaxError('Expected positive number, got "'+o+'" at index "'+a+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+a+'"');this.curArgs.push(o),this.curArgs.length===N[this.curCommandType]&&(l.HORIZ_LINE_TO===this.curCommandType?i({type:l.HORIZ_LINE_TO,relative:this.curCommandRelative,x:o}):l.VERT_LINE_TO===this.curCommandType?i({type:l.VERT_LINE_TO,relative:this.curCommandRelative,y:o}):this.curCommandType===l.MOVE_TO||this.curCommandType===l.LINE_TO||this.curCommandType===l.SMOOTH_QUAD_TO?(i({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),l.MOVE_TO===this.curCommandType&&(this.curCommandType=l.LINE_TO)):this.curCommandType===l.CURVE_TO?i({type:l.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===l.SMOOTH_CURVE_TO?i({type:l.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===l.QUAD_TO?i({type:l.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===l.ARC&&i({type:l.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!_(n))if(","===n&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==n&&"-"!==n&&"."!==n){if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+a+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+n+'" at index '+a+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==n&&"Z"!==n)if("h"===n||"H"===n)this.curCommandType=l.HORIZ_LINE_TO,this.curCommandRelative="h"===n;else if("v"===n||"V"===n)this.curCommandType=l.VERT_LINE_TO,this.curCommandRelative="v"===n;else if("m"===n||"M"===n)this.curCommandType=l.MOVE_TO,this.curCommandRelative="m"===n;else if("l"===n||"L"===n)this.curCommandType=l.LINE_TO,this.curCommandRelative="l"===n;else if("c"===n||"C"===n)this.curCommandType=l.CURVE_TO,this.curCommandRelative="c"===n;else if("s"===n||"S"===n)this.curCommandType=l.SMOOTH_CURVE_TO,this.curCommandRelative="s"===n;else if("q"===n||"Q"===n)this.curCommandType=l.QUAD_TO,this.curCommandRelative="q"===n;else if("t"===n||"T"===n)this.curCommandType=l.SMOOTH_QUAD_TO,this.curCommandRelative="t"===n;else{if("a"!==n&&"A"!==n)throw new SyntaxError('Unexpected character "'+n+'" at index '+a+".");this.curCommandType=l.ARC,this.curCommandRelative="a"===n}else r.push({type:l.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=n,this.curNumberHasDecimal="."===n}else this.curNumber+=n,this.curNumberHasDecimal=!0;else this.curNumber+=n;else this.curNumber+=n,this.curNumberHasExp=!0}return r},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function(r,e){void 0===e&&(e=[]);for(var i=0,a=Object.getPrototypeOf(this).parse.call(this,r);i<a.length;i++){var n=a[i],o=t(n);Array.isArray(o)?e.push.apply(e,o):e.push(o)}return e}}})},e}(T),l=function(t){function e(r){var i=t.call(this)||this;return i.commands="string"==typeof r?e.parse(r):r,i}return r(e,t),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=s.CALCULATE_BOUNDS();return this.transform(t),t},e.prototype.transform=function(t){for(var r=[],e=0,i=this.commands;e<i.length;e++){var a=t(i[e]);Array.isArray(a)?r.push.apply(r,a):r.push(a)}return this.commands=r,this},e.encode=function(t){return E(t)},e.parse=function(t){var r=new f,e=[];return r.parse(t,e),r.finish(e),e},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e}(T),N=((O={})[l.MOVE_TO]=2,O[l.LINE_TO]=2,O[l.HORIZ_LINE_TO]=1,O[l.VERT_LINE_TO]=1,O[l.CLOSE_PATH]=0,O[l.QUAD_TO]=4,O[l.SMOOTH_QUAD_TO]=2,O[l.CURVE_TO]=6,O[l.SMOOTH_CURVE_TO]=4,O[l.ARC]=7,O);function E(t){var r="";Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];if(i.type===l.CLOSE_PATH)r+="z";else if(i.type===l.HORIZ_LINE_TO)r+=(i.relative?"h":"H")+i.x;else if(i.type===l.VERT_LINE_TO)r+=(i.relative?"v":"V")+i.y;else if(i.type===l.MOVE_TO)r+=(i.relative?"m":"M")+i.x+" "+i.y;else if(i.type===l.LINE_TO)r+=(i.relative?"l":"L")+i.x+" "+i.y;else if(i.type===l.CURVE_TO)r+=(i.relative?"c":"C")+i.x1+" "+i.y1+" "+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===l.SMOOTH_CURVE_TO)r+=(i.relative?"s":"S")+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===l.QUAD_TO)r+=(i.relative?"q":"Q")+i.x1+" "+i.y1+" "+i.x+" "+i.y;else if(i.type===l.SMOOTH_QUAD_TO)r+=(i.relative?"t":"T")+i.x+" "+i.y;else{if(i.type!==l.ARC)throw new Error('Unexpected command type "'+i.type+'" at index '+e+".");r+=(i.relative?"a":"A")+i.rX+" "+i.rY+" "+i.xRot+" "+ +i.lArcFlag+" "+ +i.sweepFlag+" "+i.x+" "+i.y}}return r}var A=function(t){function e(r){var i=t.call(this)||this;return i.commands="string"==typeof r?e.parse(r):r,i}return r(e,t),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=s.CALCULATE_BOUNDS();return this.transform(t),t},e.prototype.transform=function(t){for(var r=[],e=0,i=this.commands;e<i.length;e++){var a=t(i[e]);Array.isArray(a)?r.push.apply(r,a):r.push(a)}return this.commands=r,this},e.encode=function(t){return E(t)},e.parse=function(t){var r=new f,e=[];return r.parse(t,e),r.finish(e),e},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e}(T),d=((m={})[A.MOVE_TO]=2,m[A.LINE_TO]=2,m[A.HORIZ_LINE_TO]=1,m[A.VERT_LINE_TO]=1,m[A.CLOSE_PATH]=0,m[A.QUAD_TO]=4,m[A.SMOOTH_QUAD_TO]=2,m[A.CURVE_TO]=6,m[A.SMOOTH_CURVE_TO]=4,m[A.ARC]=7,m);export{d as COMMAND_ARG_COUNTS,A as SVGPathData,f as SVGPathDataParser,s as SVGPathDataTransformer,E as encodeSVGPath};
var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};function r(r,e){function i(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}function e(t){var r="";Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];if(i.type===f.CLOSE_PATH)r+="z";else if(i.type===f.HORIZ_LINE_TO)r+=(i.relative?"h":"H")+i.x;else if(i.type===f.VERT_LINE_TO)r+=(i.relative?"v":"V")+i.y;else if(i.type===f.MOVE_TO)r+=(i.relative?"m":"M")+i.x+" "+i.y;else if(i.type===f.LINE_TO)r+=(i.relative?"l":"L")+i.x+" "+i.y;else if(i.type===f.CURVE_TO)r+=(i.relative?"c":"C")+i.x1+" "+i.y1+" "+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===f.SMOOTH_CURVE_TO)r+=(i.relative?"s":"S")+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===f.QUAD_TO)r+=(i.relative?"q":"Q")+i.x1+" "+i.y1+" "+i.x+" "+i.y;else if(i.type===f.SMOOTH_QUAD_TO)r+=(i.relative?"t":"T")+i.x+" "+i.y;else{if(i.type!==f.ARC)throw new Error('Unexpected command type "'+i.type+'" at index '+e+".");r+=(i.relative?"a":"A")+i.rX+" "+i.rY+" "+i.xRot+" "+ +i.lArcFlag+" "+ +i.sweepFlag+" "+i.x+" "+i.y}}return r}function i(t,r){var e=t[0],i=t[1];return[e*Math.cos(r)-i*Math.sin(r),e*Math.sin(r)+i*Math.cos(r)]}function a(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=0;e<t.length;e++)if("number"!=typeof t[e])throw new Error("assertNumbers arguments["+e+"] is not a number. "+typeof t[e]+" == typeof "+t[e]);return!0}var n=Math.PI;function o(t,r,e){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var a=t.rX,o=t.rY,s=t.x,u=t.y;a=Math.abs(t.rX),o=Math.abs(t.rY);var h=i([(r-s)/2,(e-u)/2],-t.xRot/180*n),c=h[0],y=h[1],p=Math.pow(c,2)/Math.pow(a,2)+Math.pow(y,2)/Math.pow(o,2);1<p&&(a*=Math.sqrt(p),o*=Math.sqrt(p)),t.rX=a,t.rY=o;var m=Math.pow(a,2)*Math.pow(y,2)+Math.pow(o,2)*Math.pow(c,2),O=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(a,2)*Math.pow(o,2)-m)/m)),T=a*y/o*O,v=-o*c/a*O,l=i([T,v],t.xRot/180*n);t.cX=l[0]+(r+s)/2,t.cY=l[1]+(e+u)/2,t.phi1=Math.atan2((y-v)/o,(c-T)/a),t.phi2=Math.atan2((-y-v)/o,(-c-T)/a),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*n),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*n),t.phi1*=180/n,t.phi2*=180/n}function s(t,r,e){a(t,r,e);var i=t*t+r*r-e*e;if(0>i)return[];if(0===i)return[[t*e/(t*t+r*r),r*e/(t*t+r*r)]];var n=Math.sqrt(i);return[[(t*e+r*n)/(t*t+r*r),(r*e-t*n)/(t*t+r*r)],[(t*e-r*n)/(t*t+r*r),(r*e+t*n)/(t*t+r*r)]]}var u,h=Math.PI/180;function c(t,r,e){return(1-e)*t+e*r}function y(t,r,e,i){return t+Math.cos(i/180*n)*r+Math.sin(i/180*n)*e}function p(t,r,e,i){var a=r-t,n=e-r,o=3*a+3*(i-e)-6*n,s=6*(n-a),u=3*a;return Math.abs(o)<1e-6?[-u/s]:function(t,r,e){void 0===e&&(e=1e-6);var i=t*t/4-r;if(i<-e)return[];if(i<=e)return[-t/2];var a=Math.sqrt(i);return[-t/2-a,-t/2+a]}(s/o,u/o,1e-6)}function m(t,r,e,i,a){var n=1-a;return t*(n*n*n)+r*(3*n*n*a)+e*(3*n*a*a)+i*(a*a*a)}!function(t){function r(){return u((function(t,r,e){return t.relative&&(void 0!==t.x1&&(t.x1+=r),void 0!==t.y1&&(t.y1+=e),void 0!==t.x2&&(t.x2+=r),void 0!==t.y2&&(t.y2+=e),void 0!==t.x&&(t.x+=r),void 0!==t.y&&(t.y+=e),t.relative=!1),t}))}function e(){var t=NaN,r=NaN,e=NaN,i=NaN;return u((function(a,n,o){return a.type&f.SMOOTH_CURVE_TO&&(a.type=f.CURVE_TO,t=isNaN(t)?n:t,r=isNaN(r)?o:r,a.x1=a.relative?n-t:2*n-t,a.y1=a.relative?o-r:2*o-r),a.type&f.CURVE_TO?(t=a.relative?n+a.x2:a.x2,r=a.relative?o+a.y2:a.y2):(t=NaN,r=NaN),a.type&f.SMOOTH_QUAD_TO&&(a.type=f.QUAD_TO,e=isNaN(e)?n:e,i=isNaN(i)?o:i,a.x1=a.relative?n-e:2*n-e,a.y1=a.relative?o-i:2*o-i),a.type&f.QUAD_TO?(e=a.relative?n+a.x1:a.x1,i=a.relative?o+a.y1:a.y1):(e=NaN,i=NaN),a}))}function n(){var t=NaN,r=NaN;return u((function(e,i,a){if(e.type&f.SMOOTH_QUAD_TO&&(e.type=f.QUAD_TO,t=isNaN(t)?i:t,r=isNaN(r)?a:r,e.x1=e.relative?i-t:2*i-t,e.y1=e.relative?a-r:2*a-r),e.type&f.QUAD_TO){t=e.relative?i+e.x1:e.x1,r=e.relative?a+e.y1:e.y1;var n=e.x1,o=e.y1;e.type=f.CURVE_TO,e.x1=((e.relative?0:i)+2*n)/3,e.y1=((e.relative?0:a)+2*o)/3,e.x2=(e.x+2*n)/3,e.y2=(e.y+2*o)/3}else t=NaN,r=NaN;return e}))}function u(t){var r=0,e=0,i=NaN,a=NaN;return function(n){if(isNaN(i)&&!(n.type&f.MOVE_TO))throw new Error("path must start with moveto");var o=t(n,r,e,i,a);return n.type&f.CLOSE_PATH&&(r=i,e=a),void 0!==n.x&&(r=n.relative?r+n.x:n.x),void 0!==n.y&&(e=n.relative?e+n.y:n.y),n.type&f.MOVE_TO&&(i=r,a=e),o}}function O(t,r,e,i,n,o){return a(t,r,e,i,n,o),u((function(a,s,u,h){var c=a.x1,y=a.x2,p=a.relative&&!isNaN(h),m=void 0!==a.x?a.x:p?0:s,O=void 0!==a.y?a.y:p?0:u;function T(t){return t*t}a.type&f.HORIZ_LINE_TO&&0!==r&&(a.type=f.LINE_TO,a.y=a.relative?0:u),a.type&f.VERT_LINE_TO&&0!==e&&(a.type=f.LINE_TO,a.x=a.relative?0:s),void 0!==a.x&&(a.x=a.x*t+O*e+(p?0:n)),void 0!==a.y&&(a.y=m*r+a.y*i+(p?0:o)),void 0!==a.x1&&(a.x1=a.x1*t+a.y1*e+(p?0:n)),void 0!==a.y1&&(a.y1=c*r+a.y1*i+(p?0:o)),void 0!==a.x2&&(a.x2=a.x2*t+a.y2*e+(p?0:n)),void 0!==a.y2&&(a.y2=y*r+a.y2*i+(p?0:o));var v=t*i-r*e;if(void 0!==a.xRot&&(1!==t||0!==r||0!==e||1!==i))if(0===v)delete a.rX,delete a.rY,delete a.xRot,delete a.lArcFlag,delete a.sweepFlag,a.type=f.LINE_TO;else{var l=a.xRot*Math.PI/180,_=Math.sin(l),N=Math.cos(l),x=1/T(a.rX),d=1/T(a.rY),A=T(N)*x+T(_)*d,E=2*_*N*(x-d),C=T(_)*x+T(N)*d,M=A*i*i-E*r*i+C*r*r,R=E*(t*i+r*e)-2*(A*e*i+C*t*r),g=A*e*e-E*t*e+C*t*t,I=(Math.atan2(R,M-g)+Math.PI)%Math.PI/2,S=Math.sin(I),L=Math.cos(I);a.rX=Math.abs(v)/Math.sqrt(M*T(L)+R*S*L+g*T(S)),a.rY=Math.abs(v)/Math.sqrt(M*T(S)-R*S*L+g*T(L)),a.xRot=180*I/Math.PI}return void 0!==a.sweepFlag&&0>v&&(a.sweepFlag=+!a.sweepFlag),a}))}function T(){return function(t){var r={};for(var e in t)r[e]=t[e];return r}}t.ROUND=function(t){function r(r){return Math.round(r*t)/t}return void 0===t&&(t=1e13),a(t),function(t){return void 0!==t.x1&&(t.x1=r(t.x1)),void 0!==t.y1&&(t.y1=r(t.y1)),void 0!==t.x2&&(t.x2=r(t.x2)),void 0!==t.y2&&(t.y2=r(t.y2)),void 0!==t.x&&(t.x=r(t.x)),void 0!==t.y&&(t.y=r(t.y)),void 0!==t.rX&&(t.rX=r(t.rX)),void 0!==t.rY&&(t.rY=r(t.rY)),t}},t.TO_ABS=r,t.TO_REL=function(){return u((function(t,r,e){return t.relative||(void 0!==t.x1&&(t.x1-=r),void 0!==t.y1&&(t.y1-=e),void 0!==t.x2&&(t.x2-=r),void 0!==t.y2&&(t.y2-=e),void 0!==t.x&&(t.x-=r),void 0!==t.y&&(t.y-=e),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,r,e){return void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===e&&(e=!0),u((function(i,a,n,o,s){if(isNaN(o)&&!(i.type&f.MOVE_TO))throw new Error("path must start with moveto");return r&&i.type&f.HORIZ_LINE_TO&&(i.type=f.LINE_TO,i.y=i.relative?0:n),e&&i.type&f.VERT_LINE_TO&&(i.type=f.LINE_TO,i.x=i.relative?0:a),t&&i.type&f.CLOSE_PATH&&(i.type=f.LINE_TO,i.x=i.relative?o-a:o,i.y=i.relative?s-n:s),i.type&f.ARC&&(0===i.rX||0===i.rY)&&(i.type=f.LINE_TO,delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag),i}))},t.NORMALIZE_ST=e,t.QT_TO_C=n,t.INFO=u,t.SANITIZE=function(t){void 0===t&&(t=0),a(t);var r=NaN,e=NaN,i=NaN,n=NaN;return u((function(a,o,s,u,h){var c=Math.abs,y=!1,p=0,m=0;if(a.type&f.SMOOTH_CURVE_TO&&(p=isNaN(r)?0:o-r,m=isNaN(e)?0:s-e),a.type&(f.CURVE_TO|f.SMOOTH_CURVE_TO)?(r=a.relative?o+a.x2:a.x2,e=a.relative?s+a.y2:a.y2):(r=NaN,e=NaN),a.type&f.SMOOTH_QUAD_TO?(i=isNaN(i)?o:2*o-i,n=isNaN(n)?s:2*s-n):a.type&f.QUAD_TO?(i=a.relative?o+a.x1:a.x1,n=a.relative?s+a.y1:a.y2):(i=NaN,n=NaN),a.type&f.LINE_COMMANDS||a.type&f.ARC&&(0===a.rX||0===a.rY||!a.lArcFlag)||a.type&f.CURVE_TO||a.type&f.SMOOTH_CURVE_TO||a.type&f.QUAD_TO||a.type&f.SMOOTH_QUAD_TO){var O=void 0===a.x?0:a.relative?a.x:a.x-o,T=void 0===a.y?0:a.relative?a.y:a.y-s;p=isNaN(i)?void 0===a.x1?p:a.relative?a.x:a.x1-o:i-o,m=isNaN(n)?void 0===a.y1?m:a.relative?a.y:a.y1-s:n-s;var v=void 0===a.x2?0:a.relative?a.x:a.x2-o,l=void 0===a.y2?0:a.relative?a.y:a.y2-s;c(O)<=t&&c(T)<=t&&c(p)<=t&&c(m)<=t&&c(v)<=t&&c(l)<=t&&(y=!0)}return a.type&f.CLOSE_PATH&&c(o-u)<=t&&c(s-h)<=t&&(y=!0),y?[]:a}))},t.MATRIX=O,t.ROTATE=function(t,r,e){void 0===r&&(r=0),void 0===e&&(e=0),a(t,r,e);var i=Math.sin(t),n=Math.cos(t);return O(n,i,-i,n,r-r*n+e*i,e-r*i-e*n)},t.TRANSLATE=function(t,r){return void 0===r&&(r=0),a(t,r),O(1,0,0,1,t,r)},t.SCALE=function(t,r){return void 0===r&&(r=t),a(t,r),O(t,0,0,r,0,0)},t.SKEW_X=function(t){return a(t),O(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return a(t),O(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),a(t),O(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),a(t),O(1,0,0,-1,0,t)},t.A_TO_C=function(){return u((function(t,r,e){return f.ARC===t.type?function(t,r,e){var a,n,s,u;t.cX||o(t,r,e);for(var y=Math.min(t.phi1,t.phi2),p=Math.max(t.phi1,t.phi2)-y,m=Math.ceil(p/90),O=new Array(m),T=r,v=e,l=0;l<m;l++){var _=c(t.phi1,t.phi2,l/m),N=c(t.phi1,t.phi2,(l+1)/m),x=N-_,d=4/3*Math.tan(x*h/4),A=[Math.cos(_*h)-d*Math.sin(_*h),Math.sin(_*h)+d*Math.cos(_*h)],E=A[0],C=A[1],M=[Math.cos(N*h),Math.sin(N*h)],R=M[0],g=M[1],I=[R+d*Math.sin(N*h),g-d*Math.cos(N*h)],S=I[0],L=I[1];O[l]={relative:t.relative,type:f.CURVE_TO};var H=function(r,e){var a=i([r*t.rX,e*t.rY],t.xRot),n=a[0],o=a[1];return[t.cX+n,t.cY+o]};a=H(E,C),O[l].x1=a[0],O[l].y1=a[1],n=H(S,L),O[l].x2=n[0],O[l].y2=n[1],s=H(R,g),O[l].x=s[0],O[l].y=s[1],t.relative&&(O[l].x1-=T,O[l].y1-=v,O[l].x2-=T,O[l].y2-=v,O[l].x-=T,O[l].y-=v),T=(u=[O[l].x,O[l].y])[0],v=u[1]}return O}(t,t.relative?0:r,t.relative?0:e):t}))},t.ANNOTATE_ARCS=function(){return u((function(t,r,e){return t.relative&&(r=0,e=0),f.ARC===t.type&&o(t,r,e),t}))},t.CLONE=T,t.CALCULATE_BOUNDS=function(){var t=function(t){var r={};for(var e in t)r[e]=t[e];return r},i=r(),a=n(),h=e(),c=u((function(r,e,n){var u=h(a(i(t(r))));function O(t){t>c.maxX&&(c.maxX=t),t<c.minX&&(c.minX=t)}function T(t){t>c.maxY&&(c.maxY=t),t<c.minY&&(c.minY=t)}if(u.type&f.DRAWING_COMMANDS&&(O(e),T(n)),u.type&f.HORIZ_LINE_TO&&O(u.x),u.type&f.VERT_LINE_TO&&T(u.y),u.type&f.LINE_TO&&(O(u.x),T(u.y)),u.type&f.CURVE_TO){O(u.x),T(u.y);for(var v=0,l=p(e,u.x1,u.x2,u.x);v<l.length;v++){0<(w=l[v])&&1>w&&O(m(e,u.x1,u.x2,u.x,w))}for(var _=0,N=p(n,u.y1,u.y2,u.y);_<N.length;_++){0<(w=N[_])&&1>w&&T(m(n,u.y1,u.y2,u.y,w))}}if(u.type&f.ARC){O(u.x),T(u.y),o(u,e,n);for(var x=u.xRot/180*Math.PI,d=Math.cos(x)*u.rX,A=Math.sin(x)*u.rX,E=-Math.sin(x)*u.rY,C=Math.cos(x)*u.rY,M=u.phi1<u.phi2?[u.phi1,u.phi2]:-180>u.phi2?[u.phi2+360,u.phi1+360]:[u.phi2,u.phi1],R=M[0],g=M[1],I=function(t){var r=t[0],e=t[1],i=180*Math.atan2(e,r)/Math.PI;return i<R?i+360:i},S=0,L=s(E,-d,0).map(I);S<L.length;S++){(w=L[S])>R&&w<g&&O(y(u.cX,d,E,w))}for(var H=0,U=s(C,-A,0).map(I);H<U.length;H++){var w;(w=U[H])>R&&w<g&&T(y(u.cY,A,C,w))}}return r}));return c.minX=1/0,c.maxX=-1/0,c.minY=1/0,c.maxY=-1/0,c}}(u||(u={}));var O,T=function(){function t(){}return t.prototype.round=function(t){return this.transform(u.ROUND(t))},t.prototype.toAbs=function(){return this.transform(u.TO_ABS())},t.prototype.toRel=function(){return this.transform(u.TO_REL())},t.prototype.normalizeHVZ=function(t,r,e){return this.transform(u.NORMALIZE_HVZ(t,r,e))},t.prototype.normalizeST=function(){return this.transform(u.NORMALIZE_ST())},t.prototype.qtToC=function(){return this.transform(u.QT_TO_C())},t.prototype.aToC=function(){return this.transform(u.A_TO_C())},t.prototype.sanitize=function(t){return this.transform(u.SANITIZE(t))},t.prototype.translate=function(t,r){return this.transform(u.TRANSLATE(t,r))},t.prototype.scale=function(t,r){return this.transform(u.SCALE(t,r))},t.prototype.rotate=function(t,r,e){return this.transform(u.ROTATE(t,r,e))},t.prototype.matrix=function(t,r,e,i,a,n){return this.transform(u.MATRIX(t,r,e,i,a,n))},t.prototype.skewX=function(t){return this.transform(u.SKEW_X(t))},t.prototype.skewY=function(t){return this.transform(u.SKEW_Y(t))},t.prototype.xSymmetry=function(t){return this.transform(u.X_AXIS_SYMMETRY(t))},t.prototype.ySymmetry=function(t){return this.transform(u.Y_AXIS_SYMMETRY(t))},t.prototype.annotateArcs=function(){return this.transform(u.ANNOTATE_ARCS())},t}(),v=function(t){return" "===t||"\t"===t||"\r"===t||"\n"===t},l=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},_=function(t){function e(){var r=t.call(this)||this;return r.curNumber="",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return r(e,t),e.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},e.prototype.parse=function(t,r){var e=this;void 0===r&&(r=[]);for(var i=function(t){r.push(t),e.curArgs.length=0,e.canParseCommandOrComma=!0},a=0;a<t.length;a++){var n=t[a],o=!(this.curCommandType!==f.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),s=l(n)&&("0"===this.curNumber&&"0"===n||o);if(!l(n)||s)if("e"!==n&&"E"!==n)if("-"!==n&&"+"!==n||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==n||this.curNumberHasExp||this.curNumberHasDecimal||o){if(this.curNumber&&-1!==this.curCommandType){var u=Number(this.curNumber);if(isNaN(u))throw new SyntaxError("Invalid number ending at "+a);if(this.curCommandType===f.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>u)throw new SyntaxError('Expected positive number, got "'+u+'" at index "'+a+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+a+'"');this.curArgs.push(u),this.curArgs.length===N[this.curCommandType]&&(f.HORIZ_LINE_TO===this.curCommandType?i({type:f.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):f.VERT_LINE_TO===this.curCommandType?i({type:f.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===f.MOVE_TO||this.curCommandType===f.LINE_TO||this.curCommandType===f.SMOOTH_QUAD_TO?(i({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),f.MOVE_TO===this.curCommandType&&(this.curCommandType=f.LINE_TO)):this.curCommandType===f.CURVE_TO?i({type:f.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===f.SMOOTH_CURVE_TO?i({type:f.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===f.QUAD_TO?i({type:f.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===f.ARC&&i({type:f.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!v(n))if(","===n&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==n&&"-"!==n&&"."!==n)if(s)this.curNumber=n,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+a+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+n+'" at index '+a+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==n&&"Z"!==n)if("h"===n||"H"===n)this.curCommandType=f.HORIZ_LINE_TO,this.curCommandRelative="h"===n;else if("v"===n||"V"===n)this.curCommandType=f.VERT_LINE_TO,this.curCommandRelative="v"===n;else if("m"===n||"M"===n)this.curCommandType=f.MOVE_TO,this.curCommandRelative="m"===n;else if("l"===n||"L"===n)this.curCommandType=f.LINE_TO,this.curCommandRelative="l"===n;else if("c"===n||"C"===n)this.curCommandType=f.CURVE_TO,this.curCommandRelative="c"===n;else if("s"===n||"S"===n)this.curCommandType=f.SMOOTH_CURVE_TO,this.curCommandRelative="s"===n;else if("q"===n||"Q"===n)this.curCommandType=f.QUAD_TO,this.curCommandRelative="q"===n;else if("t"===n||"T"===n)this.curCommandType=f.SMOOTH_QUAD_TO,this.curCommandRelative="t"===n;else{if("a"!==n&&"A"!==n)throw new SyntaxError('Unexpected character "'+n+'" at index '+a+".");this.curCommandType=f.ARC,this.curCommandRelative="a"===n}else r.push({type:f.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=n,this.curNumberHasDecimal="."===n}else this.curNumber+=n,this.curNumberHasDecimal=!0;else this.curNumber+=n;else this.curNumber+=n,this.curNumberHasExp=!0;else this.curNumber+=n,this.curNumberHasExpDigits=this.curNumberHasExp}return r},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function(r,e){void 0===e&&(e=[]);for(var i=0,a=Object.getPrototypeOf(this).parse.call(this,r);i<a.length;i++){var n=a[i],o=t(n);Array.isArray(o)?e.push.apply(e,o):e.push(o)}return e}}})},e}(T),f=function(t){function i(r){var e=t.call(this)||this;return e.commands="string"==typeof r?i.parse(r):r,e}return r(i,t),i.prototype.encode=function(){return i.encode(this.commands)},i.prototype.getBounds=function(){var t=u.CALCULATE_BOUNDS();return this.transform(t),t},i.prototype.transform=function(t){for(var r=[],e=0,i=this.commands;e<i.length;e++){var a=t(i[e]);Array.isArray(a)?r.push.apply(r,a):r.push(a)}return this.commands=r,this},i.encode=function(t){return e(t)},i.parse=function(t){var r=new _,e=[];return r.parse(t,e),r.finish(e),e},i.CLOSE_PATH=1,i.MOVE_TO=2,i.HORIZ_LINE_TO=4,i.VERT_LINE_TO=8,i.LINE_TO=16,i.CURVE_TO=32,i.SMOOTH_CURVE_TO=64,i.QUAD_TO=128,i.SMOOTH_QUAD_TO=256,i.ARC=512,i.LINE_COMMANDS=i.LINE_TO|i.HORIZ_LINE_TO|i.VERT_LINE_TO,i.DRAWING_COMMANDS=i.HORIZ_LINE_TO|i.VERT_LINE_TO|i.LINE_TO|i.CURVE_TO|i.SMOOTH_CURVE_TO|i.QUAD_TO|i.SMOOTH_QUAD_TO|i.ARC,i}(T),N=((O={})[f.MOVE_TO]=2,O[f.LINE_TO]=2,O[f.HORIZ_LINE_TO]=1,O[f.VERT_LINE_TO]=1,O[f.CLOSE_PATH]=0,O[f.QUAD_TO]=4,O[f.SMOOTH_QUAD_TO]=2,O[f.CURVE_TO]=6,O[f.SMOOTH_CURVE_TO]=4,O[f.ARC]=7,O);export{N as COMMAND_ARG_COUNTS,f as SVGPathData,_ as SVGPathDataParser,u as SVGPathDataTransformer,e as encodeSVGPath};
//# sourceMappingURL=SVGPathData.module.js.map
{
"name": "svg-pathdata",
"version": "5.0.3",
"version": "5.0.4",
"description": "Manipulate SVG path data (path[d] attribute content) simply and efficiently.",

@@ -5,0 +5,0 @@ "main": "lib/SVGPathData.js",

@@ -7,3 +7,4 @@ // Parse SVG PathData

// Private consts : Char groups
const isWhiteSpace = (c: string) => " " === c || "\t" === c || "\r" === c || "\n" === c;
const isWhiteSpace = (c: string) =>
" " === c || "\t" === c || "\r" === c || "\n" === c;
const isDigit = (c: string) =>

@@ -46,4 +47,15 @@ "0".charCodeAt(0) <= c.charCodeAt(0) && c.charCodeAt(0) <= "9".charCodeAt(0);

// White spaces parsing
const isAArcFlag = this.curCommandType === SVGPathData.ARC &&
(this.curArgs.length === 3 || this.curArgs.length === 4) &&
this.curNumber.length === 1 &&
(this.curNumber === "0" || this.curNumber === "1");
const isEndingDigit = isDigit(c) && (
(this.curNumber === "0" && c === "0") ||
isAArcFlag
);
if (isDigit(c)) {
if (
isDigit(c) &&
!isEndingDigit
) {
this.curNumber += c;

@@ -58,3 +70,7 @@ this.curNumberHasExpDigits = this.curNumberHasExp;

}
if (("-" === c || "+" === c) && this.curNumberHasExp && !this.curNumberHasExpDigits) {
if (
("-" === c || "+" === c) &&
this.curNumberHasExp &&
!this.curNumberHasExpDigits
) {
this.curNumber += c;

@@ -64,3 +80,3 @@ continue;

// if we already have a ".", it means we are starting a new number
if ("." === c && !this.curNumberHasExp && !this.curNumberHasDecimal) {
if ("." === c && !this.curNumberHasExp && !this.curNumberHasDecimal && !isAArcFlag) {
this.curNumber += c;

@@ -80,7 +96,11 @@ this.curNumberHasDecimal = true;

if (0 > val) {
throw new SyntaxError(`Expected positive number, got "${val}" at index "${i}"`);
throw new SyntaxError(
`Expected positive number, got "${val}" at index "${i}"`,
);
}
} else if (3 === this.curArgs.length || 4 === this.curArgs.length) {
if ("0" !== this.curNumber && "1" !== this.curNumber) {
throw new SyntaxError(`Expected a flag, got "${this.curNumber}" at index "${i}"`);
throw new SyntaxError(
`Expected a flag, got "${this.curNumber}" at index "${i}"`,
);
}

@@ -183,2 +203,8 @@ }

}
// if a 0 is detected, then parse the new number
if (isEndingDigit) {
this.curNumber = c;
this.curNumberHasDecimal = false;
continue;
}

@@ -190,3 +216,5 @@ // Adding residual command

if (!this.canParseCommandOrComma) {
throw new SyntaxError(`Unexpected character "${c}" at index ${i}. Command cannot follow comma`);
throw new SyntaxError(
`Unexpected character "${c}" at index ${i}. Command cannot follow comma`,
);
}

@@ -193,0 +221,0 @@ this.canParseCommandOrComma = false;

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