_=c.read(arguments);else{varw=d.read(arguments),x=u.isZero;if(x(w.width)||x(w.height))returnthis.lineTo(_);varb=r.read(arguments),v=!!r.read(arguments),C=!!r.read(arguments),y=f.add(_).divide(2),S=f.subtract(y).rotate(-b),k=S.x,I=S.y,P=o(w.width),T=o(w.height),A=P*P,z=T*T,O=k*k,L=I*I,E=h(O/A+L/z);if(E>1&&(P*=E,T*=E,A=P*P,z=T*T),E=(A*z-A*L-z*O)/(A*L+z*O),o(E)<1e-12&&(E=0),E<0)thrownewError("Cannot create an arc with the given arguments");n=newc(P*I/T,-T*k/P).multiply((C===v?-1:1)*h(E)).rotate(b).add(y),a=(newp).translate(n).rotate(b).scale(P,T),s=a._inverseTransform(f),i=s.getDirectedAngle(a._inverseTransform(_)),!v&&i>0?i-=360:v&&i<0&&(i+=360)}if(e){varN=newm(f.add(e).divide(2),e.subtract(f).rotate(90),(!0)),B=newm(e.add(_).divide(2),_.subtract(e).rotate(90),(!0)),F=newm(f,_),j=F.getSide(e);if(n=N.intersect(B,!0),!n){if(!j)returnthis.lineTo(_);thrownewError("Cannot create an arc with the given arguments")}s=f.subtract(n),i=s.getDirectedAngle(_.subtract(n));varR=F.getSide(n);0===R?i=j*o(i):j===R&&(i+=i<0?360:-360)}for(varD=1e-7,q=o(i),V=q>=360?4:Math.ceil((q-D)/90),U=i/V,H=U*Math.PI/360,Z=4/3*Math.sin(H)/(1+Math.cos(H)),W=[],$=0;$<=V;$++){varS=_,G=null;if($<V&&(G=s.rotate(90).multiply(Z),a?(S=a._transformPoint(s),G=a._transformPoint(s.add(G)).subtract(S)):S=n.add(s)),$){varJ=s.rotate(-90).multiply(Z);a&&(J=a._transformPoint(s.add(J)).subtract(S)),W.push(newM(S,J,G))}elsel.setHandleOut(G);s=s.rotate(U)}this._add(W)},lineBy:function(){vare=c.read(arguments),n=t(this)._point;this.lineTo(n.add(e))},curveBy:function(){vare=c.read(arguments),n=c.read(arguments),i=r.read(arguments),s=t(this)._point;this.curveTo(s.add(e),s.add(n),i)},cubicCurveBy:function(){vare=c.read(arguments),n=c.read(arguments),i=c.read(arguments),r=t(this)._point;this.cubicCurveTo(r.add(e),r.add(n),r.add(i))},quadraticCurveBy:function(){vare=c.read(arguments),n=c.read(arguments),i=t(this)._point;this.quadraticCurveTo(i.add(e),i.add(n))},arcBy:function(){vare=t(this)._point,n=e.add(c.read(arguments)),i=r.pick(r.peek(arguments),!0);"boolean"==typeofi?this.arcTo(n,i):this.arcTo(n,e.add(c.read(arguments)))},closePath:function(t){this.setClosed(!0),this.join(this,t)}}},{_getBounds:function(t,e){varn=e.handle?"getHandleBounds":e.stroke?"getStrokeBounds":"getBounds";returnL[n](this._segments,this._closed,this,t,e)},statics:{getBounds:function(t,e,n,i,r,s){functiona(t){t._transformCoordinates(i,h);for(vare=0;e<2;e++)A._addBounds(u[e],u[e+4],h[e+2],h[e],e,s?s[e]:0,l,c,f);varn=u;u=h,h=n}varo=t[0];if(!o)returnnewg;for(varh=newArray(6),u=o._transformCoordinates(i,newArray(6)),l=u.slice(0,2),c=l.slice(),f=newArray(2),d=1,_=t.length;d<_;d++)a(t[d]);returne&&a(o),newg(l[0],l[1],c[0]-l[0],c[1]-l[1])},getStrokeBounds:function(t,e,n,i,r){functions(t){v=v.include(t)}functiona(t){v=v.unite(x.setCenter(t._point.transform(i)))}functiono(t,e){"round"===e||t.isSmooth()?a(t):L._addBevelJoin(t,e,p,w,i,f,s)}functionh(t,e){"round"===e?a(t):L._addSquareCap(t,e,p,i,f,s)}varu=n.getStyle(),l=u.hasStroke(),c=u.getStrokeWidth(),f=l&&n._getStrokeMatrix(i,r),_=l&&L._getStrokePadding(c,f),v=L.getBounds(t,e,n,i,r,_);if(!l)returnv;for(varp=c/2,m=u.getStrokeJoin(),y=u.getStrokeCap(),w=u.getMiterLimit(),x=newg(newd(_)),b=t.length-(e?0:1),C=1;C<b;C++)o(t[C],m);returne?o(t[0],m):b>0&&(h(t[0],y),h(t[t.length-1],y)),v},_getStrokePadding:function(t,e){if(!e)return[t,t];varn=newc(t,0).transform(e),i=newc(0,t).transform(e),r=n.getAngleInRadians(),s=n.getLength(),a=i.getLength(),o=Math.sin(r),h=Math.cos(r),u=Math.tan(r),l=Math.atan2(a*u,s),f=Math.atan2(a,u*s);return[Math.abs(s*Math.cos(l)*h+a*Math.sin(l)*o),Math.abs(a*Math.sin(f)*h+s*Math.cos(f)*o)]},_addBevelJoin:function(t,e,n,i,r,s,a,o){varh=t.getCurve(),u=h.getPrevious(),l=h.getPoint1().transform(r),f=u.getNormalAtTime(1).multiply(n).transform(s),d=h.getNormalAtTime(0).multiply(n).transform(s);if(f.getDirectedAngle(d)<0&&(f=f.negate(),d=d.negate()),o&&a(l),a(l.add(f)),"miter"===e){var_=newm(l.add(f),newc((-f.y),f.x),(!0)).intersect(newm(l.add(d),newc((-d.y),d.x),(!0)),!0);_&&l.getDistance(_)<
if("gradient"===this._type){for(vare=this._components,n=1,i=e.length;n<i;n++){varr=e[n];t._transformPoint(r,r,!0)}this._changed()}},statics:{_types:i,random:function(){vart=Math.random;returnnewR(t(),t(),t())}}})},newfunction(){vart={add:function(t,e){returnt+e},subtract:function(t,e){returnt-e},multiply:function(t,e){returnt*e},divide:function(t,e){returnt/e}};returnr.each(t,function(t,e){this[e]=function(e){e=R.read(arguments);for(varn=this._type,i=this._components,r=e._convert(n),s=0,a=i.length;s<a;s++)r[s]=t(i[s],r[s]);returnnewR(n,r,null!=this._alpha?t(this._alpha,e.getAlpha()):null)}},{})}),D=r.extend({_class:"Gradient",initialize:function(t,e){this._id=l.get(),t&&r.isPlainObject(t)&&(this.set(t),t=e=null),null==this._stops&&this.setStops(t||["white","black"]),null==this._radial&&this.setRadial("string"==typeofe&&"radial"===e||e||!1)},_serialize:function(t,e){returne.add(this,function(){returnr.serialize([this._stops,this._radial],t,!0,e)})},_changed:function(){for(vart=0,e=this._owners&&this._owners.length;t<e;t++)this._owners[t]._changed()},_addOwner:function(t){this._owners||(this._owners=[]),this._owners.push(t)},_removeOwner:function(t){varn=this._owners?this._owners.indexOf(t):-1;n!=-1&&(this._owners.splice(n,1),this._owners.length||(this._owners=e))},clone:function(){for(vart=[],e=0,n=this._stops.length;e<n;e++)t[e]=this._stops[e].clone();returnnewD(t,this._radial)},getStops:function(){returnthis._stops},setStops:function(t){if(t.length<2)thrownewError("Gradient stop list needs to contain at least two stops.");varn=this._stops;if(n)for(vari=0,r=n.length;i<r;i++)n[i]._owner=e;n=this._stops=q.readList(t,0,{clone:!0});for(vari=0,r=n.length;i<r;i++)n[i]._owner=this;this._changed()},getRadial:function(){returnthis._radial},setRadial:function(t){this._radial=t,this._changed()},equals:function(t){if(t===this)return!0;if(t&&this._class===t._class){vare=this._stops,n=t._stops,i=e.length;if(i===n.length){for(varr=0;r<i;r++)if(!e[r].equals(n[r]))return!1;return!0}}return!1}}),q=r.extend({_class:"GradientStop",initialize:function(t,n){vari=t,r=n;"object"==typeoft&&n===e&&(Array.isArray(t)&&"number"!=typeoft[0]?(i=t[0],r=t[1]):("color"int||"offset"int||"rampPoint"int)&&(i=t.color,r=t.offset||t.rampPoint||0)),this.setColor(i),this.setOffset(r)},clone:function(){returnnewq(this._color.clone(),this._offset)},_serialize:function(t,e){varn=this._color,i=this._offset;returnr.serialize(null==i?[n]:[n,i],t,!0,e)},_changed:function(){this._owner&&this._owner._changed(65)},getOffset:function(){returnthis._offset},setOffset:function(t){this._offset=t,this._changed()},getRampPoint:"#getOffset",setRampPoint:"#setOffset",getColor:function(){returnthis._color},setColor:function(){vart=R.read(arguments,0,{clone:!0});t&&(t._owner=this),this._color=t,this._changed()},equals:function(t){returnt===this||t&&this._class===t._class&&this._color.equals(t._color)&&this._offset==t._offset||!1}}),V=r.extend(newfunction(){vart={fillColor:null,fillRule:"nonzero",strokeColor:null,strokeWidth:1,strokeCap:"butt",strokeJoin:"miter",strokeScaling:!0,miterLimit:10,dashOffset:0,dashArray:[],shadowColor:null,shadowBlur:0,shadowOffset:newc,selectedColor:null},n=r.set({},t,{fontFamily:"sans-serif",fontWeight:"normal",fontSize:12,leading:null,justification:"left"}),i=r.set({},n,{fillColor:newR}),s={strokeWidth:97,strokeCap:97,strokeJoin:97,strokeScaling:105,miterLimit:97,fontFamily:9,fontWeight:9,fontSize:9,font:9,leading:9,justification:9},a={beans:!0},o={_class:"Style",beans:!0,initialize:function(e,r,s){this._values={},this._owner=r,this._project=r&&r._project||s||paper.project,this._defaults=!r||rinstanceofx?n:rinstanceofF?i:t,e&&this.set(e)}};returnr.each(n,function(t,n){vari=/Color$/.test(n),h="shadowOffset"===n,u=r.capitalize(n),l=s[n],f="set"+u,d="get"+u;o[f]=function(t){varr=this._owner,s=r&&r._children;if(s&&s.length>0&&!(rinstanceofE))for(vara=0,o=s.length;a<o;a++)s[a]._style[f](t);elseif(ninthis._defaults){varh=this._values[n];h!==t&&(i&&(h&&h._owner!==e&&(h._owner=e,h._canvasStyle=nu
"true":oe,"false":he,"new":re,"in":ue,"instanceof":{keyword:"instanceof",binop:7,beforeExpr:!0},"this":se,"typeof":{keyword:"typeof",prefix:!0,beforeExpr:!0},"void":{keyword:"void",prefix:!0,beforeExpr:!0},"delete":{keyword:"delete",prefix:!0,beforeExpr:!0}},ce={type:"[",beforeExpr:!0},fe={type:"]"},de={type:"{",beforeExpr:!0},_e={type:"}"},ge={type:"(",beforeExpr:!0},ve={type:")"},pe={type:",",beforeExpr:!0},me={type:";",beforeExpr:!0},ye={type:":",beforeExpr:!0},we={type:"."},xe={type:"?",beforeExpr:!0},be={binop:10,beforeExpr:!0},Ce={isAssign:!0,beforeExpr:!0},Se={isAssign:!0,beforeExpr:!0},ke={postfix:!0,prefix:!0,isUpdate:!0},Ie={prefix:!0,beforeExpr:!0},Pe={binop:1,beforeExpr:!0},Me={binop:2,beforeExpr:!0},Te={binop:3,beforeExpr:!0},Ae={binop:4,beforeExpr:!0},ze={binop:5,beforeExpr:!0},Oe={binop:6,beforeExpr:!0},Le={binop:7,beforeExpr:!0},Ee={binop:8,beforeExpr:!0},Ne={binop:9,prefix:!0,beforeExpr:!0},Be={binop:10,beforeExpr:!0};t.tokTypes={bracketL:ce,bracketR:fe,braceL:de,braceR:_e,parenL:ge,parenR:ve,comma:pe,semi:me,colon:ye,dot:we,question:xe,slash:be,eq:Ce,name:Ft,eof:jt,num:Et,regexp:Nt,string:Bt};for(varFeinle)t.tokTypes["_"+Fe]=le[Fe];varje,Re=i("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"),De=i("class enum extends super const export import"),qe=i("implements interface let package private protected public static yield"),Ve=i("eval arguments"),Ue=i("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"),He=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,Ze="\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u