moreShopAdmin/dist/admin/assets/svg-pathdata.200d31ca.js

16 lines
19 KiB
JavaScript

import{n as Tr}from"./@babel.80d29b7b.js";var z={exports:{}},hr;function vr(){return hr||(hr=1,function(Or,cr){(function(v,W){W(cr)})(Tr,function(v){/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var W=function(e,t){return(W=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,n){c.__proto__=n}||function(c,n){for(var y in n)Object.prototype.hasOwnProperty.call(n,y)&&(c[y]=n[y])})(e,t)};function k(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function c(){this.constructor=e}W(e,t),e.prototype=t===null?Object.create(t):(c.prototype=t.prototype,new c)}var d=" ";function J(e){var t="";Array.isArray(e)||(e=[e]);for(var c=0;c<e.length;c++){var n=e[c];if(n.type===h.CLOSE_PATH)t+="z";else if(n.type===h.HORIZ_LINE_TO)t+=(n.relative?"h":"H")+n.x;else if(n.type===h.VERT_LINE_TO)t+=(n.relative?"v":"V")+n.y;else if(n.type===h.MOVE_TO)t+=(n.relative?"m":"M")+n.x+d+n.y;else if(n.type===h.LINE_TO)t+=(n.relative?"l":"L")+n.x+d+n.y;else if(n.type===h.CURVE_TO)t+=(n.relative?"c":"C")+n.x1+d+n.y1+d+n.x2+d+n.y2+d+n.x+d+n.y;else if(n.type===h.SMOOTH_CURVE_TO)t+=(n.relative?"s":"S")+n.x2+d+n.y2+d+n.x+d+n.y;else if(n.type===h.QUAD_TO)t+=(n.relative?"q":"Q")+n.x1+d+n.y1+d+n.x+d+n.y;else if(n.type===h.SMOOTH_QUAD_TO)t+=(n.relative?"t":"T")+n.x+d+n.y;else{if(n.type!==h.ARC)throw new Error('Unexpected command type "'+n.type+'" at index '+c+".");t+=(n.relative?"a":"A")+n.rX+d+n.rY+d+n.xRot+d+ +n.lArcFlag+d+ +n.sweepFlag+d+n.x+d+n.y}}return t}function B(e,t){var c=e[0],n=e[1];return[c*Math.cos(t)-n*Math.sin(t),c*Math.sin(t)+n*Math.cos(t)]}function g(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var c=0;c<e.length;c++)if(typeof e[c]!="number")throw new Error("assertNumbers arguments["+c+"] is not a number. "+typeof e[c]+" == typeof "+e[c]);return!0}var G=Math.PI;function K(e,t,c){e.lArcFlag=e.lArcFlag===0?0:1,e.sweepFlag=e.sweepFlag===0?0:1;var n=e.rX,y=e.rY,T=e.x,_=e.y;n=Math.abs(e.rX),y=Math.abs(e.rY);var r=B([(t-T)/2,(c-_)/2],-e.xRot/180*G),s=r[0],a=r[1],o=Math.pow(s,2)/Math.pow(n,2)+Math.pow(a,2)/Math.pow(y,2);1<o&&(n*=Math.sqrt(o),y*=Math.sqrt(o)),e.rX=n,e.rY=y;var m=Math.pow(n,2)*Math.pow(a,2)+Math.pow(y,2)*Math.pow(s,2),u=(e.lArcFlag!==e.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(y,2)-m)/m)),i=n*a/y*u,O=-y*s/n*u,p=B([i,O],e.xRot/180*G);e.cX=p[0]+(t+T)/2,e.cY=p[1]+(c+_)/2,e.phi1=Math.atan2((a-O)/y,(s-i)/n),e.phi2=Math.atan2((-a-O)/y,(-s-i)/n),e.sweepFlag===0&&e.phi2>e.phi1&&(e.phi2-=2*G),e.sweepFlag===1&&e.phi2<e.phi1&&(e.phi2+=2*G),e.phi1*=180/G,e.phi2*=180/G}function $(e,t,c){g(e,t,c);var n=e*e+t*t-c*c;if(0>n)return[];if(n===0)return[[e*c/(e*e+t*t),t*c/(e*e+t*t)]];var y=Math.sqrt(n);return[[(e*c+t*y)/(e*e+t*t),(t*c-e*y)/(e*e+t*t)],[(e*c-t*y)/(e*e+t*t),(t*c+e*y)/(e*e+t*t)]]}var H=Math.PI/180;function rr(e,t,c){return(1-c)*e+c*t}function er(e,t,c,n){return e+Math.cos(n/180*G)*t+Math.sin(n/180*G)*c}function tr(e,t,c,n){var y=1e-6,T=t-e,_=c-t,r=3*T+3*(n-c)-6*_,s=6*(_-T),a=3*T;return Math.abs(r)<y?[-a/s]:function(o,m,u){u===void 0&&(u=1e-6);var i=o*o/4-m;if(i<-u)return[];if(i<=u)return[-o/2];var O=Math.sqrt(i);return[-o/2-O,-o/2+O]}(s/r,a/r,y)}function ar(e,t,c,n,y){var T=1-y;return e*(T*T*T)+t*(3*T*T*y)+c*(3*T*y*y)+n*(y*y*y)}v.SVGPathDataTransformer=void 0,function(e){function t(){return y(function(r,s,a){return r.relative&&(r.x1!==void 0&&(r.x1+=s),r.y1!==void 0&&(r.y1+=a),r.x2!==void 0&&(r.x2+=s),r.y2!==void 0&&(r.y2+=a),r.x!==void 0&&(r.x+=s),r.y!==void 0&&(r.y+=a),r.relative=!1),r})}function c(){var r=NaN,s=NaN,a=NaN,o=NaN;return y(function(m,u,i){return m.type&h.SMOOTH_CURVE_TO&&(m.type=h.CURVE_TO,r=isNaN(r)?u:r,s=isNaN(s)?i:s,m.x1=m.relative?u-r:2*u-r,m.y1=m.relative?i-s:2*i-s),m.type&h.CURVE_TO?(r=m.relative?u+m.x2:m.x2,s=m.relative?i+m.y2:m.y2):(r=NaN,s=NaN),m.type&h.SMOOTH_QUAD_TO&&(m.type=h.QUAD_TO,a=isNaN(a)?u:a,o=isNaN(o)?i:o,m.x1=m.relative?u-a:2*u-a,m.y1=m.relative?i-o:2*i-o),m.type&h.QUAD_TO?(a=m.relative?u+m.x1:m.x1,o=m.relative?i+m.y1:m.y1):(a=NaN,o=NaN),m})}function n(){var r=NaN,s=NaN;return y(function(a,o,m){if(a.type&h.SMOOTH_QUAD_TO&&(a.type=h.QUAD_TO,r=isNaN(r)?o:r,s=isNaN(s)?m:s,a.x1=a.relative?o-r:2*o-r,a.y1=a.relative?m-s:2*m-s),a.type&h.QUAD_TO){r=a.relative?o+a.x1:a.x1,s=a.relative?m+a.y1:a.y1;var u=a.x1,i=a.y1;a.type=h.CURVE_TO,a.x1=((a.relative?0:o)+2*u)/3,a.y1=((a.relative?0:m)+2*i)/3,a.x2=(a.x+2*u)/3,a.y2=(a.y+2*i)/3}else r=NaN,s=NaN;return a})}function y(r){var s=0,a=0,o=NaN,m=NaN;return function(u){if(isNaN(o)&&!(u.type&h.MOVE_TO))throw new Error("path must start with moveto");var i=r(u,s,a,o,m);return u.type&h.CLOSE_PATH&&(s=o,a=m),u.x!==void 0&&(s=u.relative?s+u.x:u.x),u.y!==void 0&&(a=u.relative?a+u.y:u.y),u.type&h.MOVE_TO&&(o=s,m=a),i}}function T(r,s,a,o,m,u){return g(r,s,a,o,m,u),y(function(i,O,p,M){var A=i.x1,I=i.x2,x=i.relative&&!isNaN(M),l=i.x!==void 0?i.x:x?0:O,D=i.y!==void 0?i.y:x?0:p;function N(q){return q*q}i.type&h.HORIZ_LINE_TO&&s!==0&&(i.type=h.LINE_TO,i.y=i.relative?0:p),i.type&h.VERT_LINE_TO&&a!==0&&(i.type=h.LINE_TO,i.x=i.relative?0:O),i.x!==void 0&&(i.x=i.x*r+D*a+(x?0:m)),i.y!==void 0&&(i.y=l*s+i.y*o+(x?0:u)),i.x1!==void 0&&(i.x1=i.x1*r+i.y1*a+(x?0:m)),i.y1!==void 0&&(i.y1=A*s+i.y1*o+(x?0:u)),i.x2!==void 0&&(i.x2=i.x2*r+i.y2*a+(x?0:m)),i.y2!==void 0&&(i.y2=I*s+i.y2*o+(x?0:u));var f=r*o-s*a;if(i.xRot!==void 0&&(r!==1||s!==0||a!==0||o!==1))if(f===0)delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag,i.type=h.LINE_TO;else{var R=i.xRot*Math.PI/180,S=Math.sin(R),Q=Math.cos(R),L=1/N(i.rX),U=1/N(i.rY),F=N(Q)*L+N(S)*U,Z=2*S*Q*(L-U),P=N(S)*L+N(Q)*U,Y=F*o*o-Z*s*o+P*s*s,w=Z*(r*o+s*a)-2*(F*a*o+P*r*s),X=F*a*a-Z*r*a+P*r*r,C=(Math.atan2(w,Y-X)+Math.PI)%Math.PI/2,E=Math.sin(C),b=Math.cos(C);i.rX=Math.abs(f)/Math.sqrt(Y*N(b)+w*E*b+X*N(E)),i.rY=Math.abs(f)/Math.sqrt(Y*N(E)-w*E*b+X*N(b)),i.xRot=180*C/Math.PI}return i.sweepFlag!==void 0&&0>f&&(i.sweepFlag=+!i.sweepFlag),i})}function _(){return function(r){var s={};for(var a in r)s[a]=r[a];return s}}e.ROUND=function(r){function s(a){return Math.round(a*r)/r}return r===void 0&&(r=1e13),g(r),function(a){return a.x1!==void 0&&(a.x1=s(a.x1)),a.y1!==void 0&&(a.y1=s(a.y1)),a.x2!==void 0&&(a.x2=s(a.x2)),a.y2!==void 0&&(a.y2=s(a.y2)),a.x!==void 0&&(a.x=s(a.x)),a.y!==void 0&&(a.y=s(a.y)),a.rX!==void 0&&(a.rX=s(a.rX)),a.rY!==void 0&&(a.rY=s(a.rY)),a}},e.TO_ABS=t,e.TO_REL=function(){return y(function(r,s,a){return r.relative||(r.x1!==void 0&&(r.x1-=s),r.y1!==void 0&&(r.y1-=a),r.x2!==void 0&&(r.x2-=s),r.y2!==void 0&&(r.y2-=a),r.x!==void 0&&(r.x-=s),r.y!==void 0&&(r.y-=a),r.relative=!0),r})},e.NORMALIZE_HVZ=function(r,s,a){return r===void 0&&(r=!0),s===void 0&&(s=!0),a===void 0&&(a=!0),y(function(o,m,u,i,O){if(isNaN(i)&&!(o.type&h.MOVE_TO))throw new Error("path must start with moveto");return s&&o.type&h.HORIZ_LINE_TO&&(o.type=h.LINE_TO,o.y=o.relative?0:u),a&&o.type&h.VERT_LINE_TO&&(o.type=h.LINE_TO,o.x=o.relative?0:m),r&&o.type&h.CLOSE_PATH&&(o.type=h.LINE_TO,o.x=o.relative?i-m:i,o.y=o.relative?O-u:O),o.type&h.ARC&&(o.rX===0||o.rY===0)&&(o.type=h.LINE_TO,delete o.rX,delete o.rY,delete o.xRot,delete o.lArcFlag,delete o.sweepFlag),o})},e.NORMALIZE_ST=c,e.QT_TO_C=n,e.INFO=y,e.SANITIZE=function(r){r===void 0&&(r=0),g(r);var s=NaN,a=NaN,o=NaN,m=NaN;return y(function(u,i,O,p,M){var A=Math.abs,I=!1,x=0,l=0;if(u.type&h.SMOOTH_CURVE_TO&&(x=isNaN(s)?0:i-s,l=isNaN(a)?0:O-a),u.type&(h.CURVE_TO|h.SMOOTH_CURVE_TO)?(s=u.relative?i+u.x2:u.x2,a=u.relative?O+u.y2:u.y2):(s=NaN,a=NaN),u.type&h.SMOOTH_QUAD_TO?(o=isNaN(o)?i:2*i-o,m=isNaN(m)?O:2*O-m):u.type&h.QUAD_TO?(o=u.relative?i+u.x1:u.x1,m=u.relative?O+u.y1:u.y2):(o=NaN,m=NaN),u.type&h.LINE_COMMANDS||u.type&h.ARC&&(u.rX===0||u.rY===0||!u.lArcFlag)||u.type&h.CURVE_TO||u.type&h.SMOOTH_CURVE_TO||u.type&h.QUAD_TO||u.type&h.SMOOTH_QUAD_TO){var D=u.x===void 0?0:u.relative?u.x:u.x-i,N=u.y===void 0?0:u.relative?u.y:u.y-O;x=isNaN(o)?u.x1===void 0?x:u.relative?u.x:u.x1-i:o-i,l=isNaN(m)?u.y1===void 0?l:u.relative?u.y:u.y1-O:m-O;var f=u.x2===void 0?0:u.relative?u.x:u.x2-i,R=u.y2===void 0?0:u.relative?u.y:u.y2-O;A(D)<=r&&A(N)<=r&&A(x)<=r&&A(l)<=r&&A(f)<=r&&A(R)<=r&&(I=!0)}return u.type&h.CLOSE_PATH&&A(i-p)<=r&&A(O-M)<=r&&(I=!0),I?[]:u})},e.MATRIX=T,e.ROTATE=function(r,s,a){s===void 0&&(s=0),a===void 0&&(a=0),g(r,s,a);var o=Math.sin(r),m=Math.cos(r);return T(m,o,-o,m,s-s*m+a*o,a-s*o-a*m)},e.TRANSLATE=function(r,s){return s===void 0&&(s=0),g(r,s),T(1,0,0,1,r,s)},e.SCALE=function(r,s){return s===void 0&&(s=r),g(r,s),T(r,0,0,s,0,0)},e.SKEW_X=function(r){return g(r),T(1,0,Math.atan(r),1,0,0)},e.SKEW_Y=function(r){return g(r),T(1,Math.atan(r),0,1,0,0)},e.X_AXIS_SYMMETRY=function(r){return r===void 0&&(r=0),g(r),T(-1,0,0,1,r,0)},e.Y_AXIS_SYMMETRY=function(r){return r===void 0&&(r=0),g(r),T(1,0,0,-1,0,r)},e.A_TO_C=function(){return y(function(r,s,a){return h.ARC===r.type?function(o,m,u){var i,O,p,M;o.cX||K(o,m,u);for(var A=Math.min(o.phi1,o.phi2),I=Math.max(o.phi1,o.phi2)-A,x=Math.ceil(I/90),l=new Array(x),D=m,N=u,f=0;f<x;f++){var R=rr(o.phi1,o.phi2,f/x),S=rr(o.phi1,o.phi2,(f+1)/x),Q=S-R,L=4/3*Math.tan(Q*H/4),U=[Math.cos(R*H)-L*Math.sin(R*H),Math.sin(R*H)+L*Math.cos(R*H)],F=U[0],Z=U[1],P=[Math.cos(S*H),Math.sin(S*H)],Y=P[0],w=P[1],X=[Y+L*Math.sin(S*H),w-L*Math.cos(S*H)],C=X[0],E=X[1];l[f]={relative:o.relative,type:h.CURVE_TO};var b=function(q,j){var ir=B([q*o.rX,j*o.rY],o.xRot),yr=ir[0],pr=ir[1];return[o.cX+yr,o.cY+pr]};i=b(F,Z),l[f].x1=i[0],l[f].y1=i[1],O=b(C,E),l[f].x2=O[0],l[f].y2=O[1],p=b(Y,w),l[f].x=p[0],l[f].y=p[1],o.relative&&(l[f].x1-=D,l[f].y1-=N,l[f].x2-=D,l[f].y2-=N,l[f].x-=D,l[f].y-=N),D=(M=[l[f].x,l[f].y])[0],N=M[1]}return l}(r,r.relative?0:s,r.relative?0:a):r})},e.ANNOTATE_ARCS=function(){return y(function(r,s,a){return r.relative&&(s=0,a=0),h.ARC===r.type&&K(r,s,a),r})},e.CLONE=_,e.CALCULATE_BOUNDS=function(){var r=function(u){var i={};for(var O in u)i[O]=u[O];return i},s=t(),a=n(),o=c(),m=y(function(u,i,O){var p=o(a(s(r(u))));function M(E){E>m.maxX&&(m.maxX=E),E<m.minX&&(m.minX=E)}function A(E){E>m.maxY&&(m.maxY=E),E<m.minY&&(m.minY=E)}if(p.type&h.DRAWING_COMMANDS&&(M(i),A(O)),p.type&h.HORIZ_LINE_TO&&M(p.x),p.type&h.VERT_LINE_TO&&A(p.y),p.type&h.LINE_TO&&(M(p.x),A(p.y)),p.type&h.CURVE_TO){M(p.x),A(p.y);for(var I=0,x=tr(i,p.x1,p.x2,p.x);I<x.length;I++)0<(C=x[I])&&1>C&&M(ar(i,p.x1,p.x2,p.x,C));for(var l=0,D=tr(O,p.y1,p.y2,p.y);l<D.length;l++)0<(C=D[l])&&1>C&&A(ar(O,p.y1,p.y2,p.y,C))}if(p.type&h.ARC){M(p.x),A(p.y),K(p,i,O);for(var N=p.xRot/180*Math.PI,f=Math.cos(N)*p.rX,R=Math.sin(N)*p.rX,S=-Math.sin(N)*p.rY,Q=Math.cos(N)*p.rY,L=p.phi1<p.phi2?[p.phi1,p.phi2]:-180>p.phi2?[p.phi2+360,p.phi1+360]:[p.phi2,p.phi1],U=L[0],F=L[1],Z=function(E){var b=E[0],q=E[1],j=180*Math.atan2(q,b)/Math.PI;return j<U?j+360:j},P=0,Y=$(S,-f,0).map(Z);P<Y.length;P++)(C=Y[P])>U&&C<F&&M(er(p.cX,f,S,C));for(var w=0,X=$(Q,-R,0).map(Z);w<X.length;w++){var C;(C=X[w])>U&&C<F&&A(er(p.cY,R,Q,C))}}return u});return m.minX=1/0,m.maxX=-1/0,m.minY=1/0,m.maxY=-1/0,m}}(v.SVGPathDataTransformer||(v.SVGPathDataTransformer={}));var V,nr=function(){function e(){}return e.prototype.round=function(t){return this.transform(v.SVGPathDataTransformer.ROUND(t))},e.prototype.toAbs=function(){return this.transform(v.SVGPathDataTransformer.TO_ABS())},e.prototype.toRel=function(){return this.transform(v.SVGPathDataTransformer.TO_REL())},e.prototype.normalizeHVZ=function(t,c,n){return this.transform(v.SVGPathDataTransformer.NORMALIZE_HVZ(t,c,n))},e.prototype.normalizeST=function(){return this.transform(v.SVGPathDataTransformer.NORMALIZE_ST())},e.prototype.qtToC=function(){return this.transform(v.SVGPathDataTransformer.QT_TO_C())},e.prototype.aToC=function(){return this.transform(v.SVGPathDataTransformer.A_TO_C())},e.prototype.sanitize=function(t){return this.transform(v.SVGPathDataTransformer.SANITIZE(t))},e.prototype.translate=function(t,c){return this.transform(v.SVGPathDataTransformer.TRANSLATE(t,c))},e.prototype.scale=function(t,c){return this.transform(v.SVGPathDataTransformer.SCALE(t,c))},e.prototype.rotate=function(t,c,n){return this.transform(v.SVGPathDataTransformer.ROTATE(t,c,n))},e.prototype.matrix=function(t,c,n,y,T,_){return this.transform(v.SVGPathDataTransformer.MATRIX(t,c,n,y,T,_))},e.prototype.skewX=function(t){return this.transform(v.SVGPathDataTransformer.SKEW_X(t))},e.prototype.skewY=function(t){return this.transform(v.SVGPathDataTransformer.SKEW_Y(t))},e.prototype.xSymmetry=function(t){return this.transform(v.SVGPathDataTransformer.X_AXIS_SYMMETRY(t))},e.prototype.ySymmetry=function(t){return this.transform(v.SVGPathDataTransformer.Y_AXIS_SYMMETRY(t))},e.prototype.annotateArcs=function(){return this.transform(v.SVGPathDataTransformer.ANNOTATE_ARCS())},e}(),mr=function(e){return e===" "||e===" "||e==="\r"||e===`
`},or=function(e){return"0".charCodeAt(0)<=e.charCodeAt(0)&&e.charCodeAt(0)<="9".charCodeAt(0)},sr=function(e){function t(){var c=e.call(this)||this;return c.curNumber="",c.curCommandType=-1,c.curCommandRelative=!1,c.canParseCommandOrComma=!0,c.curNumberHasExp=!1,c.curNumberHasExpDigits=!1,c.curNumberHasDecimal=!1,c.curArgs=[],c}return k(t,e),t.prototype.finish=function(c){if(c===void 0&&(c=[]),this.parse(" ",c),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return c},t.prototype.parse=function(c,n){var y=this;n===void 0&&(n=[]);for(var T=function(m){n.push(m),y.curArgs.length=0,y.canParseCommandOrComma=!0},_=0;_<c.length;_++){var r=c[_],s=!(this.curCommandType!==h.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),a=or(r)&&(this.curNumber==="0"&&r==="0"||s);if(!or(r)||a)if(r!=="e"&&r!=="E")if(r!=="-"&&r!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(r!=="."||this.curNumberHasExp||this.curNumberHasDecimal||s){if(this.curNumber&&this.curCommandType!==-1){var o=Number(this.curNumber);if(isNaN(o))throw new SyntaxError("Invalid number ending at "+_);if(this.curCommandType===h.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>o)throw new SyntaxError('Expected positive number, got "'+o+'" at index "'+_+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+_+'"')}this.curArgs.push(o),this.curArgs.length===ur[this.curCommandType]&&(h.HORIZ_LINE_TO===this.curCommandType?T({type:h.HORIZ_LINE_TO,relative:this.curCommandRelative,x:o}):h.VERT_LINE_TO===this.curCommandType?T({type:h.VERT_LINE_TO,relative:this.curCommandRelative,y:o}):this.curCommandType===h.MOVE_TO||this.curCommandType===h.LINE_TO||this.curCommandType===h.SMOOTH_QUAD_TO?(T({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),h.MOVE_TO===this.curCommandType&&(this.curCommandType=h.LINE_TO)):this.curCommandType===h.CURVE_TO?T({type:h.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===h.SMOOTH_CURVE_TO?T({type:h.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===h.QUAD_TO?T({type:h.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===h.ARC&&T({type:h.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(!mr(r))if(r===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(r!=="+"&&r!=="-"&&r!==".")if(a)this.curNumber=r,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+_+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+r+'" at index '+_+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,r!=="z"&&r!=="Z")if(r==="h"||r==="H")this.curCommandType=h.HORIZ_LINE_TO,this.curCommandRelative=r==="h";else if(r==="v"||r==="V")this.curCommandType=h.VERT_LINE_TO,this.curCommandRelative=r==="v";else if(r==="m"||r==="M")this.curCommandType=h.MOVE_TO,this.curCommandRelative=r==="m";else if(r==="l"||r==="L")this.curCommandType=h.LINE_TO,this.curCommandRelative=r==="l";else if(r==="c"||r==="C")this.curCommandType=h.CURVE_TO,this.curCommandRelative=r==="c";else if(r==="s"||r==="S")this.curCommandType=h.SMOOTH_CURVE_TO,this.curCommandRelative=r==="s";else if(r==="q"||r==="Q")this.curCommandType=h.QUAD_TO,this.curCommandRelative=r==="q";else if(r==="t"||r==="T")this.curCommandType=h.SMOOTH_QUAD_TO,this.curCommandRelative=r==="t";else{if(r!=="a"&&r!=="A")throw new SyntaxError('Unexpected character "'+r+'" at index '+_+".");this.curCommandType=h.ARC,this.curCommandRelative=r==="a"}else n.push({type:h.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=r,this.curNumberHasDecimal=r==="."}else this.curNumber+=r,this.curNumberHasDecimal=!0;else this.curNumber+=r;else this.curNumber+=r,this.curNumberHasExp=!0;else this.curNumber+=r,this.curNumberHasExpDigits=this.curNumberHasExp}return n},t.prototype.transform=function(c){return Object.create(this,{parse:{value:function(n,y){y===void 0&&(y=[]);for(var T=0,_=Object.getPrototypeOf(this).parse.call(this,n);T<_.length;T++){var r=_[T],s=c(r);Array.isArray(s)?y.push.apply(y,s):y.push(s)}return y}}})},t}(nr),h=function(e){function t(c){var n=e.call(this)||this;return n.commands=typeof c=="string"?t.parse(c):c,n}return k(t,e),t.prototype.encode=function(){return t.encode(this.commands)},t.prototype.getBounds=function(){var c=v.SVGPathDataTransformer.CALCULATE_BOUNDS();return this.transform(c),c},t.prototype.transform=function(c){for(var n=[],y=0,T=this.commands;y<T.length;y++){var _=c(T[y]);Array.isArray(_)?n.push.apply(n,_):n.push(_)}return this.commands=n,this},t.encode=function(c){return J(c)},t.parse=function(c){var n=new sr,y=[];return n.parse(c,y),n.finish(y),y},t.CLOSE_PATH=1,t.MOVE_TO=2,t.HORIZ_LINE_TO=4,t.VERT_LINE_TO=8,t.LINE_TO=16,t.CURVE_TO=32,t.SMOOTH_CURVE_TO=64,t.QUAD_TO=128,t.SMOOTH_QUAD_TO=256,t.ARC=512,t.LINE_COMMANDS=t.LINE_TO|t.HORIZ_LINE_TO|t.VERT_LINE_TO,t.DRAWING_COMMANDS=t.HORIZ_LINE_TO|t.VERT_LINE_TO|t.LINE_TO|t.CURVE_TO|t.SMOOTH_CURVE_TO|t.QUAD_TO|t.SMOOTH_QUAD_TO|t.ARC,t}(nr),ur=((V={})[h.MOVE_TO]=2,V[h.LINE_TO]=2,V[h.HORIZ_LINE_TO]=1,V[h.VERT_LINE_TO]=1,V[h.CLOSE_PATH]=0,V[h.QUAD_TO]=4,V[h.SMOOTH_QUAD_TO]=2,V[h.CURVE_TO]=6,V[h.SMOOTH_CURVE_TO]=4,V[h.ARC]=7,V);v.COMMAND_ARG_COUNTS=ur,v.SVGPathData=h,v.SVGPathDataParser=sr,v.encodeSVGPath=J,Object.defineProperty(v,"__esModule",{value:!0})})}(z,z.exports)),z.exports}export{vr as r};