}elseif(t&&t.getPath&&t.getPath()===this)returnt;returnnull},getOffsetsWithTangent:function(){vart=f.read(arguments);if(t.isZero())return[];for(vare=[],n=0,i=this.getCurves(),r=0,s=i.length;r<s;r++){for(vara=i[r],o=a.getTimesWithTangent(t),h=0,u=o.length;h<u;h++){varl=n+a.getOffsetAtTime(o[h]);e.indexOf(l)<0&&e.push(l)}n+=a.length}returne}}),newfunction(){functiont(t,e,n,i,r){functions(e){varn=u[e],i=u[e+1];a==n&&o==i||(t.beginPath(),t.moveTo(a,o),t.lineTo(n,i),t.moveTo(n-h,i),t.lineTo(n,i+h),t.lineTo(n+h,i),t.lineTo(n,i-h),t.closePath(),t.stroke())}if(!(i<=0))for(vara,o,h=i/2,u=newArray(6),l=0,c=e.length;l<c;l++){varf=e[l],d=f._selection;f._transformCoordinates(n,u),a=u[0],o=u[1],2&d&&!r&&s(2),4&d&&!r&&s(4),t.beginPath(),t.arc(a,o,h,0,2*Math.PI,!0),t.stroke();var_=t.fillStyle;1&d||(t.fillStyle="rgba(255, 255, 255, 0.5)"),t.fill(),t.fillStyle=_}}functione(t,e,n){functioni(e){if(n)e._transformCoordinates(n,_),r=_[0],s=_[1];else{vari=e._point;r=i._x,s=i._y}if(g)t.moveTo(r,s),g=!1;else{if(n)h=_[2],u=_[3];else{varf=e._handleIn;h=r+f._x,u=s+f._y}h===r&&u===s&&l===a&&c===o?t.lineTo(r,s):t.bezierCurveTo(l,c,h,u,r,s)}if(a=r,o=s,n)l=_[4],c=_[5];else{varf=e._handleOut;l=a+f._x,c=o+f._y}}for(varr,s,a,o,h,u,l,c,f=e._segments,d=f.length,_=newArray(6),g=!0,v=0;v<d;v++)i(f[v]);e._closed&&d>0&&i(f[0])}return{_draw:function(t,n,i,r){functions(t){returnc[(t%f+f)%f]}vara=n.dontStart,o=n.dontFinish||n.clip,h=this.getStyle(),u=h.hasFill(),l=h.hasStroke(),c=h.getDashArray(),f=!at.support.nativeDash&&l&&c&&c.length;if(a||t.beginPath(),(u||l&&!f||o)&&(e(t,this,r),this._closed&&t.closePath()),!o&&(u||l)&&(this._setStyles(t,n,i,r),u&&(t.fill(h.getFillRule()),t.shadowColor="rgba(0,0,0,0)"),l)){if(f){a||t.beginPath();vard,_=newB(this,.25,32,(!1),r),g=_.length,v=-h.getDashOffset(),p=0;for(v%=g;v>0;)v-=s(p--)+s(p--);for(;v<g;)d=v+s(p++),(v>0||d>0)&&_.drawPart(t,Math.max(v,0),Math.max(d,0)),v=d+s(p++)}t.stroke()}},_drawSelected:function(n,i){n.beginPath(),e(n,this,i),n.stroke(),t(n,this._segments,i,at.settings.handleSize,this.isFullySelected())}}},newfunction(){functiont(t){vare=t._segments;if(!e.length)thrownewError("Use a moveTo() command first");returne[e.length-1]}return{moveTo:function(){vart=this._segments;1===t.length&&this.removeSegment(0),t.length||this._add([newM(f.read(arguments))])},moveBy:function(){thrownewError("moveBy() is unsupported on Path items.")},lineTo:function(){this._add([newM(f.read(arguments))])},cubicCurveTo:function(){vare=arguments,n=f.read(e),i=f.read(e),r=f.read(e),s=t(this);s.setHandleOut(n.subtract(s._point)),this._add([newM(r,i.subtract(r))])},quadraticCurveTo:function(){vare=arguments,n=f.read(e),i=f.read(e),r=t(this)._point;this.cubicCurveTo(n.add(r.subtract(n).multiply(1/3)),n.add(i.subtract(n).multiply(1/3)),i)},curveTo:function(){vare=arguments,n=f.read(e),i=f.read(e),s=r.pick(r.read(e),.5),a=1-s,o=t(this)._point,h=n.subtract(o.multiply(a*a)).subtract(i.multiply(s*s)).divide(2*s*a);if(h.isNaN())thrownewError("Cannot put a curve through points with parameter = "+s);this.quadraticCurveTo(h,i)},arcTo:function(){vare,n,i,s,a,o=arguments,h=Math.abs,u=Math.sqrt,c=t(this),d=c._point,g=f.read(o),v=r.peek(o),p=r.pick(v,!0);if("boolean"==typeofp)varw=d.add(g).divide(2),e=w.add(w.subtract(d).rotate(p?-90:90));elseif(r.remain(o)<=2)e=g,g=f.read(o);elseif(!d.equals(g)){varx=_.read(o),b=l.isZero;if(b(x.width)||b(x.height))returnthis.lineTo(g);varC=r.read(o),p=!!r.read(o),S=!!r.read(o),w=d.add(g).divide(2),k=d.subtract(w).rotate(-C),I=k.x,P=k.y,T=h(x.width),A=h(x.height),z=T*T,O=A*A,L=I*I,E=P*P,N=u(L/z+E/O);if(N>1&&(T*=N,A*=N,z=T*T,O=A*A),N=(z*O-z*E-O*L)/(z*E+O*L),h(N)<1e-12&&(N=0),N<0)thrownewError("Cannot create an arc with the given arguments");n=newf(T*P/A,-A*I/T).multiply((S===p?-1:1)*u(N)).rotate(C).add(w),a=(newm).translate(n).rotate(C).scale(T,A),s=a._inverseTransform(d),i=s.getDirectedAngle(a._inverseTransform(g)),!p&&i>0?i-=360:p&&i<0&&(i+=360)}if(e){varB=newy(d.add(e).divide(2),e.subtract(d).rotate(90),(!0)),F=newy(e.add(g).divide(2),g.subtract(e).rotate(9
this._setProperty(o,h)}elses=h&&h.clone?h.clone():h;n[a]=s}returnn},_resolveValue:function(t,e){if(e){if(Array.isArray(e)&&2===e.length){varn=e[0];returnn&&n.match&&n.match(/^[+\-\*\/]=/)?this._calculate(t,n[0],e[1]):e}if("string"==typeofe){vari=e.match(/^[+\-*/]=(.*)/);if(i){varr=JSON.parse(i[1].replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": '));returnthis._calculate(t,e[0],r)}}}returne},_calculate:function(t,e,n){returnat.PaperScript.calculateBinary(t,e,n)},_parseKeys:function(t){for(vare={},n=0,i=t.length;n<i;n++){varr=t[n],s=r.replace(/\.([^.]*)/g,"/$1").replace(/\[['"]?([^'"\]]*)['"]?\]/g,"/$1");e[r]=s.split("/")}returne},_getProperty:function(t,e){for(varn=this.object,i=0,r=t.length-(e||0);i<r&&n;i++)n=n[t[i]];returnn},_setProperty:function(t,e){varn=this._getProperty(t,1);n&&(n[t[t.length-1]]=e)}}),et={request:function(e){varn=newt.XMLHttpRequest;returnn.open((e.method||"get").toUpperCase(),e.url,r.pick(e.async,!0)),e.mimeType&&n.overrideMimeType(e.mimeType),n.onload=function(){vart=n.status;0===t||200===t?e.onLoad&&e.onLoad.call(n,n.responseText):n.onerror()},n.onerror=function(){vart=n.status,i='Could not load "'+e.url+'" (Status: '+t+")";if(!e.onError)thrownewError(i);e.onError(i,t)},n.send(null)}},nt={canvases:[],getCanvas:function(t,e){if(!n)returnnull;varr,s=!0;"object"==typeoft&&(e=t.height,t=t.width),this.canvases.length?r=this.canvases.pop():(r=i.createElement("canvas"),s=!1);vara=r.getContext("2d");if(!a)thrownewError("Canvas "+r+" is unable to provide a 2D context.");returnr.width===t&&r.height===e?s&&a.clearRect(0,0,t+1,e+1):(r.width=t,r.height=e),a.save(),r},getContext:function(t,e){varn=this.getCanvas(t,e);returnn?n.getContext("2d"):null},release:function(t){vare=t&&t.canvas?t.canvas:t;e&&e.getContext&&(e.getContext("2d").restore(),this.canvases.push(e))}},it=newfunction(){functiont(t,e,n){return.2989*t+.587*e+.114*n}functione(e,n,i,r){vars=r-t(e,n,i);d=e+s,_=n+s,g=i+s;varr=t(d,_,g),a=v(d,_,g),o=p(d,_,g);if(a<0){varh=r-a;d=r+(d-r)*r/h,_=r+(_-r)*r/h,g=r+(g-r)*r/h}if(o>255){varu=255-r,l=o-r;d=r+(d-r)*u/l,_=r+(_-r)*u/l,g=r+(g-r)*u/l}}functionn(t,e,n){returnp(t,e,n)-v(t,e,n)}functioni(t,e,n,i){varr,s=[t,e,n],a=p(t,e,n),o=v(t,e,n);o=o===t?0:o===e?1:2,a=a===t?0:a===e?1:2,r=0===v(o,a)?1===p(o,a)?2:1:0,s[a]>s[o]?(s[r]=(s[r]-s[o])*i/(s[a]-s[o]),s[a]=i):s[r]=s[a]=0,s[o]=0,d=s[0],_=s[1],g=s[2]}vars,a,o,h,u,l,c,f,d,_,g,v=Math.min,p=Math.max,m=Math.abs,y={multiply:function(){d=u*s/255,_=l*a/255,g=c*o/255},screen:function(){d=u+s-u*s/255,_=l+a-l*a/255,g=c+o-c*o/255},overlay:function(){d=u<128?2*u*s/255:255-2*(255-u)*(255-s)/255,_=l<128?2*l*a/255:255-2*(255-l)*(255-a)/255,g=c<128?2*c*o/255:255-2*(255-c)*(255-o)/255},"soft-light":function(){vart=s*u/255;d=t+u*(255-(255-u)*(255-s)/255-t)/255,t=a*l/255,_=t+l*(255-(255-l)*(255-a)/255-t)/255,t=o*c/255,g=t+c*(255-(255-c)*(255-o)/255-t)/255},"hard-light":function(){d=s<128?2*s*u/255:255-2*(255-s)*(255-u)/255,_=a<128?2*a*l/255:255-2*(255-a)*(255-l)/255,g=o<128?2*o*c/255:255-2*(255-o)*(255-c)/255},"color-dodge":function(){d=0===u?0:255===s?255:v(255,255*u/(255-s)),_=0===l?0:255===a?255:v(255,255*l/(255-a)),g=0===c?0:255===o?255:v(255,255*c/(255-o))},"color-burn":function(){d=255===u?255:0===s?0:p(0,255-255*(255-u)/s),_=255===l?255:0===a?0:p(0,255-255*(255-l)/a),g=255===c?255:0===o?0:p(0,255-255*(255-c)/o)},darken:function(){d=u<s?u:s,_=l<a?l:a,g=c<o?c:o},lighten:function(){d=u>s?u:s,_=l>a?l:a,g=c>o?c:o},difference:function(){d=u-s,d<0&&(d=-d),_=l-a,_<0&&(_=-_),g=c-o,g<0&&(g=-g)},exclusion:function(){d=u+s*(255-u-u)/255,_=l+a*(255-l-l)/255,g=c+o*(255-c-c)/255},hue:function(){i(s,a,o,n(u,l,c)),e(d,_,g,t(u,l,c))},saturation:function(){i(u,l,c,n(s,a,o)),e(d,_,g,t(u,l,c))},luminosity:function(){e(u,l,c,t(s,a,o))},color:function(){e(s,a,o,t(u,l,c))},add:function(){d=v(u+s,255),_=v(l+a,255),g=v(c+o,255)},subtract:function(){d=p(u-s,0),_=p(l-a,0),g=p(c-o,0)},average:function(){d=(u+s)/2,_=(l+a)/2,g=(c+o)/2},negation:function(){d=255-m(255-s-u),_=255-m(255-a-l),g=255-m(255-o-c)}},w=this.nativeModes=r.each(["source-over","source-in","s
null!==_t&&(this.source=_t)}functionL(){vart=newz;returnct.locations&&(t.loc=newO),ct.directSourceFile&&(t.sourceFile=ct.directSourceFile),ct.ranges&&(t.range=[mt,0]),t}functionE(t){vare=newz;returne.start=t.start,ct.locations&&(e.loc=newO,e.loc.start=t.loc.start),ct.ranges&&(e.range=[t.range[0],0]),e}functionN(t,e){returnt.type=e,t.end=Tt,ct.locations&&(t.loc.end=Mt),ct.ranges&&(t.range[1]=Tt),t}functionB(t){returnct.ecmaVersion>=5&&"ExpressionStatement"===t.type&&"Literal"===t.expression.type&&"use strict"===t.expression.value}functionF(t){if(bt===t)returnM(),!0}functionj(){return!ct.strictSemicolons&&(bt===jt||bt===_e||Je.test(ft.slice(Tt,mt)))}functionD(){F(me)||j()||q()}functionR(t){bt===t?M():q()}functionq(){n(mt,"Unexpected token")}functionV(t){"Identifier"!==t.type&&"MemberExpression"!==t.type&&n(t.start,"Assigning to rvalue"),Ot&&"Identifier"===t.type&&Ve(t.name)&&n(t.start,"Assigning to "+t.name+" in strict mode")}functionU(t){Pt=Tt=pt,ct.locations&&(Mt=newr),At=Ot=null,zt=[],y();vare=t||L(),n=!0;for(t||(e.body=[]);bt!==jt;){vari=H();e.body.push(i),n&&B(i)&&A(!0),n=!1}returnN(e,"Program")}functionH(){(bt===be||bt===Se&&"/="==Ct)&&y(!0);vart=bt,e=L();switch(t){caseDt:caseVt:M();vari=t===Dt;F(me)||j()?e.label=null:bt!==Ft?q():(e.label=lt(),D());for(varr=0;r<zt.length;++r){vars=zt[r];if(null==e.label||s.name===e.label.name){if(null!=s.kind&&(i||"loop"===s.kind))break;if(e.label&&i)break}}returnr===zt.length&&n(e.start,"Unsyntactic "+t.keyword),N(e,i?"BreakStatement":"ContinueStatement");caseUt:returnM(),D(),N(e,"DebuggerStatement");caseZt:returnM(),zt.push(Ye),e.body=H(),zt.pop(),R(ne),e.test=Z(),D(),N(e,"DoWhileStatement");caseGt:if(M(),zt.push(Ye),R(ge),bt===me)return$(e,null);if(bt===ee){vara=L();returnM(),J(a,!0),N(a,"VariableDeclaration"),1===a.declarations.length&&F(ue)?G(e,a):$(e,a)}vara=X(!1,!0);returnF(ue)?(V(a),G(e,a)):$(e,a);caseJt:returnM(),ht(e,!0);caseXt:returnM(),e.test=Z(),e.consequent=H(),e.alternate=F(Wt)?H():null,N(e,"IfStatement");caseKt:returnAt||ct.allowReturnOutsideFunction||n(mt,"'return' outside of function"),M(),F(me)||j()?e.argument=null:(e.argument=X(),D()),N(e,"ReturnStatement");caseQt:M(),e.discriminant=Z(),e.cases=[],R(de),zt.push(tn);for(varo,h;bt!=_e;)if(bt===Rt||bt===Ht){varu=bt===Rt;o&&N(o,"SwitchCase"),e.cases.push(o=L()),o.consequent=[],M(),u?o.test=X():(h&&n(Pt,"Multiple default clauses"),h=!0,o.test=null),R(ye)}elseo||q(),o.consequent.push(H());returno&&N(o,"SwitchCase"),M(),zt.pop(),N(e,"SwitchStatement");caseYt:returnM(),Je.test(ft.slice(Tt,mt))&&n(Tt,"Illegal newline after throw"),e.argument=X(),D(),N(e,"ThrowStatement");casete:if(M(),e.block=W(),e.handler=null,bt===qt){varl=L();M(),R(ge),l.param=lt(),Ot&&Ve(l.param.name)&&n(l.param.start,"Binding "+l.param.name+" in strict mode"),R(ve),l.guard=null,l.body=W(),e.handler=N(l,"CatchClause")}returne.guardedHandlers=Lt,e.finalizer=F($t)?W():null,e.handler||e.finalizer||n(e.start,"Missing catch or finally clause"),N(e,"TryStatement");caseee:returnM(),J(e),D(),N(e,"VariableDeclaration");casene:returnM(),e.test=Z(),zt.push(Ye),e.body=H(),zt.pop(),N(e,"WhileStatement");caseie:returnOt&&n(mt,"'with' in strict mode"),M(),e.object=Z(),e.body=H(),N(e,"WithStatement");casede:returnW();caseme:returnM(),N(e,"EmptyStatement");default:varc=Ct,f=X();if(t===Ft&&"Identifier"===f.type&&F(ye)){for(varr=0;r<zt.length;++r)zt[r].name===c&&n(f.start,"Label '"+c+"' is already declared");vard=bt.isLoop?"loop":bt===Qt?"switch":null;returnzt.push({name:c,kind:d}),e.body=H(),zt.pop(),e.label=f,N(e,"LabeledStatement")}returne.expression=f,D(),N(e,"ExpressionStatement")}}functionZ(){R(ge);vart=X();returnR(ve),t}functionW(t){vare,n=L(),i=!0,r=!1;for(n.body=[],R(de);!F(_e);){vars=H();n.body.push(s),i&&t&&B(s)&&(e=r,A(r=!0)),i=!1}returnr&&!e&&A(!1),N(n,"BlockStatement")}function$(t,e){returnt.init=e,R(me),t.test=bt===me?null:X(),R(me),t.update=bt===ve?null:X(),R(ve),t.body=H(),zt.pop(),N(t,"ForStatement")}functionG(t,e){returnt.left=e,t.right=X(),R(ve),t.body=H(),zt.pop(),