diff --git a/404.html b/404.html index 128e6248..2bda5514 100644 --- a/404.html +++ b/404.html @@ -7,7 +7,7 @@
d&&(h=h-Math.PI*2),!l&&d>h&&(d=d-Math.PI*2)}let y=d-h;if(Math.abs(y)>Math.PI*120/180){const D=d,R=n,q=s;l&&d>h?d=h+Math.PI*120/180*1:d=h+Math.PI*120/180*-1,n=p+r*Math.cos(d),s=g+o*Math.sin(d),f=So(n,s,R,q,r,o,a,0,l,[d,D,p,g])}y=d-h;const _=Math.cos(h),v=Math.sin(h),k=Math.cos(d),w=Math.sin(d),P=Math.tan(y/4),E=4/3*r*P,A=4/3*o*P,H=[e,t],x=[e+E*v,t-A*_],K=[n+E*w,s-A*k],z=[n,s];if(x[0]=2*H[0]-x[0],x[1]=2*H[1]-x[1],c)return[x,K,z].concat(f);{f=[x,K,z].concat(f);const D=[];for(let R=0;R d&&(h=h-Math.PI*2),!l&&d>h&&(d=d-Math.PI*2)}let y=d-h;if(Math.abs(y)>Math.PI*120/180){const D=d,R=n,q=s;l&&d>h?d=h+Math.PI*120/180*1:d=h+Math.PI*120/180*-1,n=p+r*Math.cos(d),s=g+o*Math.sin(d),f=So(n,s,R,q,r,o,a,0,l,[d,D,p,g])}y=d-h;const _=Math.cos(h),v=Math.sin(h),k=Math.cos(d),w=Math.sin(d),P=Math.tan(y/4),E=4/3*r*P,A=4/3*o*P,H=[e,t],x=[e+E*v,t-A*_],K=[n+E*w,s-A*k],z=[n,s];if(x[0]=2*H[0]-x[0],x[1]=2*H[1]-x[1],c)return[x,K,z].concat(f);{f=[x,K,z].concat(f);const D=[];for(let R=0;R n.score===e.score?n.idx n.score===e.score?n.idx1&&r.push(o):r.push(o),r.push(e[t+3])}else{const a=e[t+0],i=e[t+1],l=e[t+2],c=e[t+3],u=pe(a,i,.5),f=pe(i,l,.5),h=pe(l,c,.5),d=pe(u,f,.5),p=pe(f,h,.5),g=pe(d,p,.5);Zn([a,u,d,g],0,n,r),Zn([g,p,h,c],0,n,r)}return r}function Au(e,t){return dn(e,0,e.length,t)}function dn(e,t,n,s,r){const o=r||[],a=e[t],i=e[n-1];let l=0,c=1;for(let u=t+1;u1&&r.push(o):r.push(o),r.push(e[t+3])}else{const a=e[t+0],i=e[t+1],l=e[t+2],c=e[t+3],u=pe(a,i,.5),f=pe(i,l,.5),h=pe(l,c,.5),d=pe(u,f,.5),p=pe(f,h,.5),g=pe(d,p,.5);Zn([a,u,d,g],0,n,r),Zn([g,p,h,c],0,n,r)}return r}function Au(e,t){return dn(e,0,e.length,t)}function dn(e,t,n,s,r){const o=r||[],a=e[t],i=e[n-1];let l=0,c=1;for(let u=t+1;ui&&(o=a,i=l)}i>r&&(o-e>1&&ft(t,e,o,r,n),n.push(t[o]),s-o>1&&ft(t,o,s,r,n))}function He(t,e){const s=t.length-1,r=[t[0]];return ft(t,0,s,e,r),r.push(t[s]),r}function Nt(t,e,s=!1){if(t.length<=2)return t;const r=e*e;return t=s?t:Ge(t,r),t=He(t,r),t}var qe=class z extends O{constructor(){super(...arguments),this.points=[],this.count=0}onStart(e){if(this.el=this.createElement("path",{fill:"transparent"}),this.points=[e],this.brush.arrowEnd){this.arrowId=Kt();const s=Rt(this.arrowId,this.brush.color);this.el.appendChild(s)}return this.el}onMove(e){return this.el||this.onStart(e),this.points[this.points.length-1]!==e&&(this.points.push(e),this.count+=1),this.count>5&&(this.points=Nt(this.points,1,!0),this.count=0),this.attr("d",z.toSvgData(this.points)),!0}onEnd(){const e=this.el;if(this.el=null,!e)return!1;if(e.setAttribute("d",z.toSvgData(Nt(this.points,1,!0))),!e.getTotalLength()){const{x:s,y:r}=this.points[0],n=this.brush.size/2;e.setAttribute("d",`M ${s-n} ${r} a ${n},${n} 0 1,0 ${n*2},0 a ${n},${n} 0 1,0 ${-n*2},0`),e.setAttribute("fill",this.brush.color),e.setAttribute("stroke-width","0")}return!0}static line(e,s){const r=s.x-e.x,n=s.y-e.y;return{length:Math.sqrt(r**2+n**2),angle:Math.atan2(n,r)}}static controlPoint(e,s,r,n){const i=s||e,o=r||e,a=.2,l=z.line(i,o),p=l.angle+(n?Math.PI:0),y=l.length*a,v=e.x+Math.cos(p)*y,S=e.y+Math.sin(p)*y;return{x:v,y:S}}static bezierCommand(e,s,r){const n=z.controlPoint(r[s-1],r[s-2],e),i=z.controlPoint(e,r[s-1],r[s+1],!0);return`C ${n.x.toFixed(C)},${n.y.toFixed(C)} ${i.x.toFixed(C)},${i.y.toFixed(C)} ${e.x.toFixed(C)},${e.y.toFixed(C)}`}static toSvgData(e){return e.reduce((s,r,n,i)=>n===0?`M ${r.x.toFixed(C)},${r.y.toFixed(C)}`:`${s} ${z.bezierCommand(r,n,i)}`,"")}},Ze=class extends O{constructor(){super(...arguments),this.pathSubFactor=20,this.pathFragments=[],this._erased=[]}onSelected(t){const e=(s,r)=>{if(s&&s.length)for(let n=0;ni&&(o=a,i=l)}i>r&&(o-e>1&&ft(t,e,o,r,n),n.push(t[o]),s-o>1&&ft(t,o,s,r,n))}function He(t,e){const s=t.length-1,r=[t[0]];return ft(t,0,s,e,r),r.push(t[s]),r}function Nt(t,e,s=!1){if(t.length<=2)return t;const r=e*e;return t=s?t:Ge(t,r),t=He(t,r),t}var qe=class z extends O{constructor(){super(...arguments),this.points=[],this.count=0}onStart(e){if(this.el=this.createElement("path",{fill:"transparent"}),this.points=[e],this.brush.arrowEnd){this.arrowId=Kt();const s=Rt(this.arrowId,this.brush.color);this.el.appendChild(s)}return this.el}onMove(e){return this.el||this.onStart(e),this.points[this.points.length-1]!==e&&(this.points.push(e),this.count+=1),this.count>5&&(this.points=Nt(this.points,1,!0),this.count=0),this.attr("d",z.toSvgData(this.points)),!0}onEnd(){const e=this.el;if(this.el=null,!e)return!1;if(e.setAttribute("d",z.toSvgData(Nt(this.points,1,!0))),!e.getTotalLength()){const{x:s,y:r}=this.points[0],n=this.brush.size/2;e.setAttribute("d",`M ${s-n} ${r} a ${n},${n} 0 1,0 ${n*2},0 a ${n},${n} 0 1,0 ${-n*2},0`),e.setAttribute("fill",this.brush.color),e.setAttribute("stroke-width","0")}return!0}static line(e,s){const r=s.x-e.x,n=s.y-e.y;return{length:Math.sqrt(r**2+n**2),angle:Math.atan2(n,r)}}static controlPoint(e,s,r,n){const i=s||e,o=r||e,a=.2,l=z.line(i,o),p=l.angle+(n?Math.PI:0),y=l.length*a,v=e.x+Math.cos(p)*y,S=e.y+Math.sin(p)*y;return{x:v,y:S}}static bezierCommand(e,s,r){const n=z.controlPoint(r[s-1],r[s-2],e),i=z.controlPoint(e,r[s-1],r[s+1],!0);return`C ${n.x.toFixed(C)},${n.y.toFixed(C)} ${i.x.toFixed(C)},${i.y.toFixed(C)} ${e.x.toFixed(C)},${e.y.toFixed(C)}`}static toSvgData(e){return e.reduce((s,r,n,i)=>n===0?`M ${r.x.toFixed(C)},${r.y.toFixed(C)}`:`${s} ${z.bezierCommand(r,n,i)}`,"")}},Ze=class extends O{constructor(){super(...arguments),this.pathSubFactor=20,this.pathFragments=[],this._erased=[]}onSelected(t){const e=(s,r)=>{if(s&&s.length)for(let n=0;n