askui
Version:
Reliable, automated end-to-end-testing that depends on what is shown on your screen instead of the technology you are running on
11 lines (10 loc) • 327 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Annotated Image</title>
</head>
<body>
<bounding-box-renderer></bounding-box-renderer>
<script>
(()=>{var oe=Object.create;var Ot=Object.defineProperty;var he=Object.getOwnPropertyDescriptor;var le=Object.getOwnPropertyNames;var ce=Object.getPrototypeOf,fe=Object.prototype.hasOwnProperty;var ue=(c,i,a)=>i in c?Ot(c,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):c[i]=a;var pt=(c,i)=>()=>(i||c((i={exports:{}}).exports,i),i.exports);var de=(c,i,a,o)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of le(i))!fe.call(c,t)&&t!==a&&Ot(c,t,{get:()=>i[t],enumerable:!(o=he(i,t))||o.enumerable});return c};var Et=(c,i,a)=>(a=c!=null?oe(ce(c)):{},de(i||!c||!c.__esModule?Ot(a,"default",{value:c,enumerable:!0}):a,c));var at=(c,i,a)=>ue(c,typeof i!="symbol"?i+"":i,a);var gt=(c,i,a)=>new Promise((o,t)=>{var r=h=>{try{s(a.next(h))}catch(n){t(n)}},e=h=>{try{s(a.throw(h))}catch(n){t(n)}},s=h=>h.done?o(h.value):Promise.resolve(h.value).then(r,e);s((a=a.apply(c,i)).next())});var Lt=pt(()=>{});var It=pt(()=>{});var jt=pt(()=>{});var vt=pt(F=>{var u=u||{version:"5.1.0"};typeof F!="undefined"?F.fabric=u:typeof define=="function"&&define.amd&&define([],function(){return u});typeof document!="undefined"&&typeof window!="undefined"?(document instanceof(typeof HTMLDocument!="undefined"?HTMLDocument:Document)?u.document=document:u.document=document.implementation.createHTMLDocument(""),u.window=window):(Rt=Lt(),Pt=new Rt.JSDOM(decodeURIComponent("%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%3Cbody%3E%3C%2Fbody%3E%3C%2Fhtml%3E"),{features:{FetchExternalResources:["img"]},resources:"usable"}).window,u.document=Pt.document,u.jsdomImplForWrapper=It().implForWrapper,u.nodeCanvas=jt().Canvas,u.window=Pt,DOMParser=u.window.DOMParser);var Rt,Pt;u.isTouchSupported="ontouchstart"in u.window||"ontouchstart"in u.document||u.window&&u.window.navigator&&u.window.navigator.maxTouchPoints>0;u.isLikelyNode=typeof Buffer!="undefined"&&typeof window=="undefined";u.SHARED_ATTRIBUTES=["display","transform","fill","fill-opacity","fill-rule","opacity","stroke","stroke-dasharray","stroke-linecap","stroke-dashoffset","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","id","paint-order","vector-effect","instantiated_by_use","clip-path"];u.DPI=96;u.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)";u.commaWsp="(?:\\s+,?\\s*|,\\s*)";u.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/ig;u.reNonWord=/[ \n\.,;!\?\-]/;u.fontPaths={};u.iMatrix=[1,0,0,1,0,0];u.svgNS="http://www.w3.org/2000/svg";u.perfLimitSizeTotal=2097152;u.maxCacheSideLimit=4096;u.minCacheSideLimit=256;u.charWidthsCache={};u.textureSize=2048;u.disableStyleCopyPaste=!1;u.enableGLFiltering=!0;u.devicePixelRatio=u.window.devicePixelRatio||u.window.webkitDevicePixelRatio||u.window.mozDevicePixelRatio||1;u.browserShadowBlurConstant=1;u.arcToSegmentsCache={};u.boundsOfCurveCache={};u.cachesBoundsOfCurve=!0;u.forceGLPutImageData=!1;u.initFilterBackend=function(){if(u.enableGLFiltering&&u.isWebglSupported&&u.isWebglSupported(u.textureSize))return console.log("max texture size: "+u.maxTextureSize),new u.WebglFilterBackend({tileSize:u.textureSize});if(u.Canvas2dFilterBackend)return new u.Canvas2dFilterBackend};typeof document!="undefined"&&typeof window!="undefined"&&(window.fabric=u);(function(){function c(e,s){if(this.__eventListeners[e]){var h=this.__eventListeners[e];s?h[h.indexOf(s)]=!1:u.util.array.fill(h,!1)}}function i(e,s){if(this.__eventListeners||(this.__eventListeners={}),arguments.length===1)for(var h in e)this.on(h,e[h]);else this.__eventListeners[e]||(this.__eventListeners[e]=[]),this.__eventListeners[e].push(s);return this}function a(e,s){var h=function(){s.apply(this,arguments),this.off(e,h)}.bind(this);this.on(e,h)}function o(e,s){if(arguments.length===1)for(var h in e)a.call(this,h,e[h]);else a.call(this,e,s);return this}function t(e,s){if(!this.__eventListeners)return this;if(arguments.length===0)for(e in this.__eventListeners)c.call(this,e);else if(arguments.length===1&&typeof arguments[0]=="object")for(var h in e)c.call(this,h,e[h]);else c.call(this,e,s);return this}function r(e,s){if(!this.__eventListeners)return this;var h=this.__eventListeners[e];if(!h)return this;for(var n=0,l=h.length;n<l;n++)h[n]&&h[n].call(this,s||{});return this.__eventListeners[e]=h.filter(function(f){return f!==!1}),this}u.Observable={fire:r,on:i,once:o,off:t}})();u.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var c=0,i=arguments.length;c<i;c++)this._onObjectAdded(arguments[c]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(c,i,a){var o=this._objects;return a?o[i]=c:o.splice(i,0,c),this._onObjectAdded&&this._onObjectAdded(c),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var c=this._objects,i,a=!1,o=0,t=arguments.length;o<t;o++)i=c.indexOf(arguments[o]),i!==-1&&(a=!0,c.splice(i,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[o]));return this.renderOnAddRemove&&a&&this.requestRenderAll(),this},forEachObject:function(c,i){for(var a=this.getObjects(),o=0,t=a.length;o<t;o++)c.call(i,a[o],o,a);return this},getObjects:function(c){return typeof c=="undefined"?this._objects.concat():this._objects.filter(function(i){return i.type===c})},item:function(c){return this._objects[c]},isEmpty:function(){return this._objects.length===0},size:function(){return this._objects.length},contains:function(c,i){return this._objects.indexOf(c)>-1?!0:i?this._objects.some(function(a){return typeof a.contains=="function"&&a.contains(c,!0)}):!1},complexity:function(){return this._objects.reduce(function(c,i){return c+=i.complexity?i.complexity():0,c},0)}};u.CommonMethods={_setOptions:function(c){for(var i in c)this.set(i,c[i])},_initGradient:function(c,i){c&&c.colorStops&&!(c instanceof u.Gradient)&&this.set(i,new u.Gradient(c))},_initPattern:function(c,i,a){c&&c.source&&!(c instanceof u.Pattern)?this.set(i,new u.Pattern(c,a)):a&&a()},_setObject:function(c){for(var i in c)this._set(i,c[i])},set:function(c,i){return typeof c=="object"?this._setObject(c):this._set(c,i),this},_set:function(c,i){this[c]=i},toggle:function(c){var i=this.get(c);return typeof i=="boolean"&&this.set(c,!i),this},get:function(c){return this[c]}};(function(c){var i=Math.sqrt,a=Math.atan2,o=Math.pow,t=Math.PI/180,r=Math.PI/2;u.util={cos:function(e){if(e===0)return 1;e<0&&(e=-e);var s=e/r;switch(s){case 1:case 3:return 0;case 2:return-1}return Math.cos(e)},sin:function(e){if(e===0)return 0;var s=e/r,h=1;switch(e<0&&(h=-1),s){case 1:return h;case 2:return 0;case 3:return-h}return Math.sin(e)},removeFromArray:function(e,s){var h=e.indexOf(s);return h!==-1&&e.splice(h,1),e},getRandomInt:function(e,s){return Math.floor(Math.random()*(s-e+1))+e},degreesToRadians:function(e){return e*t},radiansToDegrees:function(e){return e/t},rotatePoint:function(e,s,h){var n=new u.Point(e.x-s.x,e.y-s.y),l=u.util.rotateVector(n,h);return new u.Point(l.x,l.y).addEquals(s)},rotateVector:function(e,s){var h=u.util.sin(s),n=u.util.cos(s),l=e.x*n-e.y*h,f=e.x*h+e.y*n;return{x:l,y:f}},createVector:function(e,s){return new u.Point(s.x-e.x,s.y-e.y)},calcAngleBetweenVectors:function(e,s){return Math.acos((e.x*s.x+e.y*s.y)/(Math.hypot(e.x,e.y)*Math.hypot(s.x,s.y)))},getHatVector:function(e){return new u.Point(e.x,e.y).multiply(1/Math.hypot(e.x,e.y))},getBisector:function(e,s,h){var n=u.util.createVector(e,s),l=u.util.createVector(e,h),f=u.util.calcAngleBetweenVectors(n,l),d=u.util.calcAngleBetweenVectors(u.util.rotateVector(n,f),l),g=f*(d===0?1:-1)/2;return{vector:u.util.getHatVector(u.util.rotateVector(n,g)),angle:f}},projectStrokeOnPoints:function(e,s,h){var n=[],l=s.strokeWidth/2,f=s.strokeUniform?new u.Point(1/s.scaleX,1/s.scaleY):new u.Point(1,1),d=function(g){var m=l/Math.hypot(g.x,g.y);return new u.Point(g.x*m*f.x,g.y*m*f.y)};return e.length<=1||e.forEach(function(g,m){var p=new u.Point(g.x,g.y),_,w;m===0?(w=e[m+1],_=h?d(u.util.createVector(w,p)).addEquals(p):e[e.length-1]):m===e.length-1?(_=e[m-1],w=h?d(u.util.createVector(_,p)).addEquals(p):e[0]):(_=e[m-1],w=e[m+1]);var D=u.util.getBisector(p,_,w),B=D.vector,N=D.angle,G,z;if(s.strokeLineJoin==="miter"&&(G=-l/Math.sin(N/2),z=new u.Point(B.x*G*f.x,B.y*G*f.y),Math.hypot(z.x,z.y)/l<=s.strokeMiterLimit)){n.push(p.add(z)),n.push(p.subtract(z));return}G=-l*Math.SQRT2,z=new u.Point(B.x*G*f.x,B.y*G*f.y),n.push(p.add(z)),n.push(p.subtract(z))}),n},transformPoint:function(e,s,h){return h?new u.Point(s[0]*e.x+s[2]*e.y,s[1]*e.x+s[3]*e.y):new u.Point(s[0]*e.x+s[2]*e.y+s[4],s[1]*e.x+s[3]*e.y+s[5])},makeBoundingBoxFromPoints:function(e,s){if(s)for(var h=0;h<e.length;h++)e[h]=u.util.transformPoint(e[h],s);var n=[e[0].x,e[1].x,e[2].x,e[3].x],l=u.util.array.min(n),f=u.util.array.max(n),d=f-l,g=[e[0].y,e[1].y,e[2].y,e[3].y],m=u.util.array.min(g),p=u.util.array.max(g),_=p-m;return{left:l,top:m,width:d,height:_}},invertTransform:function(e){var s=1/(e[0]*e[3]-e[1]*e[2]),h=[s*e[3],-s*e[1],-s*e[2],s*e[0]],n=u.util.transformPoint({x:e[4],y:e[5]},h,!0);return h[4]=-n.x,h[5]=-n.y,h},toFixed:function(e,s){return parseFloat(Number(e).toFixed(s))},parseUnit:function(e,s){var h=/\D{0,2}$/.exec(e),n=parseFloat(e);switch(s||(s=u.Text.DEFAULT_SVG_FONT_SIZE),h[0]){case"mm":return n*u.DPI/25.4;case"cm":return n*u.DPI/2.54;case"in":return n*u.DPI;case"pt":return n*u.DPI/72;case"pc":return n*u.DPI/72*12;case"em":return n*s;default:return n}},falseFunction:function(){return!1},getKlass:function(e,s){return e=u.util.string.camelize(e.charAt(0).toUpperCase()+e.slice(1)),u.util.resolveNamespace(s)[e]},getSvgAttributes:function(e){var s=["instantiated_by_use","style","id","class"];switch(e){case"linearGradient":s=s.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":s=s.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":s=s.concat(["offset","stop-color","stop-opacity"]);break}return s},resolveNamespace:function(e){if(!e)return u;var s=e.split("."),h=s.length,n,l=c||u.window;for(n=0;n<h;++n)l=l[s[n]];return l},loadImage:function(e,s,h,n){if(!e){s&&s.call(h,e);return}var l=u.util.createImage(),f=function(){s&&s.call(h,l,!1),l=l.onload=l.onerror=null};l.onload=f,l.onerror=function(){u.log("Error loading "+l.src),s&&s.call(h,null,!0),l=l.onload=l.onerror=null},e.indexOf("data")!==0&&n!==void 0&&n!==null&&(l.crossOrigin=n),e.substring(0,14)==="data:image/svg"&&(l.onload=null,u.util.loadImageInDom(l,f)),l.src=e},loadImageInDom:function(e,s){var h=u.document.createElement("div");h.style.width=h.style.height="1px",h.style.left=h.style.top="-100%",h.style.position="absolute",h.appendChild(e),u.document.querySelector("body").appendChild(h),e.onload=function(){s(),h.parentNode.removeChild(h),h=null}},enlivenObjects:function(e,s,h,n){e=e||[];var l=[],f=0,d=e.length;function g(){++f===d&&s&&s(l.filter(function(m){return m}))}if(!d){s&&s(l);return}e.forEach(function(m,p){if(!m||!m.type){g();return}var _=u.util.getKlass(m.type,h);_.fromObject(m,function(w,D){D||(l[p]=w),n&&n(m,w,D),g()})})},enlivenObjectEnlivables:function(e,s,h){var n=u.Object.ENLIVEN_PROPS.filter(function(l){return!!e[l]});u.util.enlivenObjects(n.map(function(l){return e[l]}),function(l){var f={};n.forEach(function(d,g){f[d]=l[g],s&&(s[d]=l[g])}),h&&h(f)})},enlivenPatterns:function(e,s){e=e||[];function h(){++l===f&&s&&s(n)}var n=[],l=0,f=e.length;if(!f){s&&s(n);return}e.forEach(function(d,g){d&&d.source?new u.Pattern(d,function(m){n[g]=m,h()}):(n[g]=d,h())})},groupSVGElements:function(e,s,h){var n;return e&&e.length===1?e[0]:(s&&(s.width&&s.height?s.centerPoint={x:s.width/2,y:s.height/2}:(delete s.width,delete s.height)),n=new u.Group(e,s),typeof h!="undefined"&&(n.sourcePath=h),n)},populateWithProperties:function(e,s,h){if(h&&Object.prototype.toString.call(h)==="[object Array]")for(var n=0,l=h.length;n<l;n++)h[n]in e&&(s[h[n]]=e[h[n]])},createCanvasElement:function(){return u.document.createElement("canvas")},copyCanvasElement:function(e){var s=u.util.createCanvasElement();return s.width=e.width,s.height=e.height,s.getContext("2d").drawImage(e,0,0),s},toDataURL:function(e,s,h){return e.toDataURL("image/"+s,h)},createImage:function(){return u.document.createElement("img")},multiplyTransformMatrices:function(e,s,h){return[e[0]*s[0]+e[2]*s[1],e[1]*s[0]+e[3]*s[1],e[0]*s[2]+e[2]*s[3],e[1]*s[2]+e[3]*s[3],h?0:e[0]*s[4]+e[2]*s[5]+e[4],h?0:e[1]*s[4]+e[3]*s[5]+e[5]]},qrDecompose:function(e){var s=a(e[1],e[0]),h=o(e[0],2)+o(e[1],2),n=i(h),l=(e[0]*e[3]-e[2]*e[1])/n,f=a(e[0]*e[2]+e[1]*e[3],h);return{angle:s/t,scaleX:n,scaleY:l,skewX:f/t,skewY:0,translateX:e[4],translateY:e[5]}},calcRotateMatrix:function(e){if(!e.angle)return u.iMatrix.concat();var s=u.util.degreesToRadians(e.angle),h=u.util.cos(s),n=u.util.sin(s);return[h,n,-n,h,0,0]},calcDimensionsMatrix:function(e){var s=typeof e.scaleX=="undefined"?1:e.scaleX,h=typeof e.scaleY=="undefined"?1:e.scaleY,n=[e.flipX?-s:s,0,0,e.flipY?-h:h,0,0],l=u.util.multiplyTransformMatrices,f=u.util.degreesToRadians;return e.skewX&&(n=l(n,[1,0,Math.tan(f(e.skewX)),1],!0)),e.skewY&&(n=l(n,[1,Math.tan(f(e.skewY)),0,1],!0)),n},composeMatrix:function(e){var s=[1,0,0,1,e.translateX||0,e.translateY||0],h=u.util.multiplyTransformMatrices;return e.angle&&(s=h(s,u.util.calcRotateMatrix(e))),(e.scaleX!==1||e.scaleY!==1||e.skewX||e.skewY||e.flipX||e.flipY)&&(s=h(s,u.util.calcDimensionsMatrix(e))),s},resetObjectTransform:function(e){e.scaleX=1,e.scaleY=1,e.skewX=0,e.skewY=0,e.flipX=!1,e.flipY=!1,e.rotate(0)},saveObjectTransform:function(e){return{scaleX:e.scaleX,scaleY:e.scaleY,skewX:e.skewX,skewY:e.skewY,angle:e.angle,left:e.left,flipX:e.flipX,flipY:e.flipY,top:e.top}},isTransparent:function(e,s,h,n){n>0&&(s>n?s-=n:s=0,h>n?h-=n:h=0);var l=!0,f,d,g=e.getImageData(s,h,n*2||1,n*2||1),m=g.data.length;for(f=3;f<m&&(d=g.data[f],l=d<=0,l!==!1);f+=4);return g=null,l},parsePreserveAspectRatioAttribute:function(e){var s="meet",h="Mid",n="Mid",l=e.split(" "),f;return l&&l.length&&(s=l.pop(),s!=="meet"&&s!=="slice"?(f=s,s="meet"):l.length&&(f=l.pop())),h=f!=="none"?f.slice(1,4):"none",n=f!=="none"?f.slice(5,8):"none",{meetOrSlice:s,alignX:h,alignY:n}},clearFabricFontCache:function(e){e=(e||"").toLowerCase(),e?u.charWidthsCache[e]&&delete u.charWidthsCache[e]:u.charWidthsCache={}},limitDimsByArea:function(e,s){var h=Math.sqrt(s*e),n=Math.floor(s/h);return{x:Math.floor(h),y:n}},capValue:function(e,s,h){return Math.max(e,Math.min(s,h))},findScaleToFit:function(e,s){return Math.min(s.width/e.width,s.height/e.height)},findScaleToCover:function(e,s){return Math.max(s.width/e.width,s.height/e.height)},matrixToSVG:function(e){return"matrix("+e.map(function(s){return u.util.toFixed(s,u.Object.NUM_FRACTION_DIGITS)}).join(" ")+")"},removeTransformFromObject:function(e,s){var h=u.util.invertTransform(s),n=u.util.multiplyTransformMatrices(h,e.calcOwnMatrix());u.util.applyTransformToObject(e,n)},addTransformToObject:function(e,s){u.util.applyTransformToObject(e,u.util.multiplyTransformMatrices(s,e.calcOwnMatrix()))},applyTransformToObject:function(e,s){var h=u.util.qrDecompose(s),n=new u.Point(h.translateX,h.translateY);e.flipX=!1,e.flipY=!1,e.set("scaleX",h.scaleX),e.set("scaleY",h.scaleY),e.skewX=h.skewX,e.skewY=h.skewY,e.angle=h.angle,e.setPositionByOrigin(n,"center","center")},sizeAfterTransform:function(e,s,h){var n=e/2,l=s/2,f=[{x:-n,y:-l},{x:n,y:-l},{x:-n,y:l},{x:n,y:l}],d=u.util.calcDimensionsMatrix(h),g=u.util.makeBoundingBoxFromPoints(f,d);return{x:g.width,y:g.height}},mergeClipPaths:function(e,s){var h=e,n=s;h.inverted&&!n.inverted&&(h=s,n=e),u.util.applyTransformToObject(n,u.util.multiplyTransformMatrices(u.util.invertTransform(h.calcTransformMatrix()),n.calcTransformMatrix()));var l=h.inverted&&n.inverted;return l&&(h.inverted=n.inverted=!1),new u.Group([h],{clipPath:n,inverted:l})}}})(F);(function(){var c=Array.prototype.join,i={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},a={m:"l",M:"L"};function o(v,b,S,C,P,x,y,T,E,L,k){var W=u.util.cos(v),Y=u.util.sin(v),V=u.util.cos(b),M=u.util.sin(b),O=S*P*V-C*x*M+y,j=C*P*V+S*x*M+T,R=L+E*(-S*P*Y-C*x*W),A=k+E*(-C*P*Y+S*x*W),X=O+E*(S*P*M+C*x*V),q=j+E*(C*P*M-S*x*V);return["C",R,A,X,q,O,j]}function t(v,b,S,C,P,x,y){var T=Math.PI,E=y*T/180,L=u.util.sin(E),k=u.util.cos(E),W=0,Y=0;S=Math.abs(S),C=Math.abs(C);var V=-k*v*.5-L*b*.5,M=-k*b*.5+L*v*.5,O=S*S,j=C*C,R=M*M,A=V*V,X=O*j-O*R-j*A,q=0;if(X<0){var tt=Math.sqrt(1-X/(O*j));S*=tt,C*=tt}else q=(P===x?-1:1)*Math.sqrt(X/(O*R+j*A));var Z=q*S*M/C,I=-q*C*V/S,$=k*Z-L*I+v*.5,et=L*Z+k*I+b*.5,it=r(1,0,(V-Z)/S,(M-I)/C),nt=r((V-Z)/S,(M-I)/C,(-V-Z)/S,(-M-I)/C);x===0&&nt>0?nt-=2*T:x===1&&nt<0&&(nt+=2*T);for(var rt=Math.ceil(Math.abs(nt/T*2)),ot=[],st=nt/rt,ct=8/3*Math.sin(st/4)*Math.sin(st/4)/Math.sin(st/2),dt=it+st,lt=0;lt<rt;lt++)ot[lt]=o(it,dt,k,L,S,C,$,et,ct,W,Y),W=ot[lt][5],Y=ot[lt][6],it=dt,dt+=st;return ot}function r(v,b,S,C){var P=Math.atan2(b,v),x=Math.atan2(C,S);return x>=P?x-P:2*Math.PI-(P-x)}function e(v,b,S,C,P,x,y,T){var E;if(u.cachesBoundsOfCurve&&(E=c.call(arguments),u.boundsOfCurveCache[E]))return u.boundsOfCurveCache[E];var L=Math.sqrt,k=Math.min,W=Math.max,Y=Math.abs,V=[],M=[[],[]],O,j,R,A,X,q,tt,Z;j=6*v-12*S+6*P,O=-3*v+9*S-9*P+3*y,R=3*S-3*v;for(var I=0;I<2;++I){if(I>0&&(j=6*b-12*C+6*x,O=-3*b+9*C-9*x+3*T,R=3*C-3*b),Y(O)<1e-12){if(Y(j)<1e-12)continue;A=-R/j,0<A&&A<1&&V.push(A);continue}tt=j*j-4*R*O,!(tt<0)&&(Z=L(tt),X=(-j+Z)/(2*O),0<X&&X<1&&V.push(X),q=(-j-Z)/(2*O),0<q&&q<1&&V.push(q))}for(var $,et,it=V.length,nt=it,rt;it--;)A=V[it],rt=1-A,$=rt*rt*rt*v+3*rt*rt*A*S+3*rt*A*A*P+A*A*A*y,M[0][it]=$,et=rt*rt*rt*b+3*rt*rt*A*C+3*rt*A*A*x+A*A*A*T,M[1][it]=et;M[0][nt]=v,M[1][nt]=b,M[0][nt+1]=y,M[1][nt+1]=T;var ot=[{x:k.apply(null,M[0]),y:k.apply(null,M[1])},{x:W.apply(null,M[0]),y:W.apply(null,M[1])}];return u.cachesBoundsOfCurve&&(u.boundsOfCurveCache[E]=ot),ot}function s(v,b,S){for(var C=S[1],P=S[2],x=S[3],y=S[4],T=S[5],E=S[6],L=S[7],k=t(E-v,L-b,C,P,y,T,x),W=0,Y=k.length;W<Y;W++)k[W][1]+=v,k[W][2]+=b,k[W][3]+=v,k[W][4]+=b,k[W][5]+=v,k[W][6]+=b;return k}function h(v){var b=0,S=0,C=v.length,P=0,x=0,y,T,E,L=[],k,W,Y;for(T=0;T<C;++T){switch(E=!1,y=v[T].slice(0),y[0]){case"l":y[0]="L",y[1]+=b,y[2]+=S;case"L":b=y[1],S=y[2];break;case"h":y[1]+=b;case"H":y[0]="L",y[2]=S,b=y[1];break;case"v":y[1]+=S;case"V":y[0]="L",S=y[1],y[1]=b,y[2]=S;break;case"m":y[0]="M",y[1]+=b,y[2]+=S;case"M":b=y[1],S=y[2],P=y[1],x=y[2];break;case"c":y[0]="C",y[1]+=b,y[2]+=S,y[3]+=b,y[4]+=S,y[5]+=b,y[6]+=S;case"C":W=y[3],Y=y[4],b=y[5],S=y[6];break;case"s":y[0]="S",y[1]+=b,y[2]+=S,y[3]+=b,y[4]+=S;case"S":k==="C"?(W=2*b-W,Y=2*S-Y):(W=b,Y=S),b=y[3],S=y[4],y[0]="C",y[5]=y[3],y[6]=y[4],y[3]=y[1],y[4]=y[2],y[1]=W,y[2]=Y,W=y[3],Y=y[4];break;case"q":y[0]="Q",y[1]+=b,y[2]+=S,y[3]+=b,y[4]+=S;case"Q":W=y[1],Y=y[2],b=y[3],S=y[4];break;case"t":y[0]="T",y[1]+=b,y[2]+=S;case"T":k==="Q"?(W=2*b-W,Y=2*S-Y):(W=b,Y=S),y[0]="Q",b=y[1],S=y[2],y[1]=W,y[2]=Y,y[3]=b,y[4]=S;break;case"a":y[0]="A",y[6]+=b,y[7]+=S;case"A":E=!0,L=L.concat(s(b,S,y)),b=y[6],S=y[7];break;case"z":case"Z":b=P,S=x;break;default:}E||L.push(y),k=y[0]}return L}function n(v,b,S,C){return Math.sqrt((S-v)*(S-v)+(C-b)*(C-b))}function l(v){return v*v*v}function f(v){return 3*v*v*(1-v)}function d(v){return 3*v*(1-v)*(1-v)}function g(v){return(1-v)*(1-v)*(1-v)}function m(v,b,S,C,P,x,y,T){return function(E){var L=l(E),k=f(E),W=d(E),Y=g(E);return{x:y*L+P*k+S*W+v*Y,y:T*L+x*k+C*W+b*Y}}}function p(v,b,S,C,P,x,y,T){return function(E){var L=1-E,k=3*L*L*(S-v)+6*L*E*(P-S)+3*E*E*(y-P),W=3*L*L*(C-b)+6*L*E*(x-C)+3*E*E*(T-x);return Math.atan2(W,k)}}function _(v){return v*v}function w(v){return 2*v*(1-v)}function D(v){return(1-v)*(1-v)}function B(v,b,S,C,P,x){return function(y){var T=_(y),E=w(y),L=D(y);return{x:P*T+S*E+v*L,y:x*T+C*E+b*L}}}function N(v,b,S,C,P,x){return function(y){var T=1-y,E=2*T*(S-v)+2*y*(P-S),L=2*T*(C-b)+2*y*(x-C);return Math.atan2(L,E)}}function G(v,b,S){var C={x:b,y:S},P,x=0,y;for(y=1;y<=100;y+=1)P=v(y/100),x+=n(C.x,C.y,P.x,P.y),C=P;return x}function z(v,b){for(var S=0,C=0,P=v.iterator,x={x:v.x,y:v.y},y,T,E=.01,L=v.angleFinder,k;C<b&&E>1e-4;)y=P(S),k=S,T=n(x.x,x.y,y.x,y.y),T+C>b?(S-=E,E/=2):(x=y,S+=E,C+=T);return y.angle=L(k),y}function H(v){for(var b=0,S=v.length,C,P=0,x=0,y=0,T=0,E=[],L,k,W,Y=0;Y<S;Y++){switch(C=v[Y],k={x:P,y:x,command:C[0]},C[0]){case"M":k.length=0,y=P=C[1],T=x=C[2];break;case"L":k.length=n(P,x,C[1],C[2]),P=C[1],x=C[2];break;case"C":L=m(P,x,C[1],C[2],C[3],C[4],C[5],C[6]),W=p(P,x,C[1],C[2],C[3],C[4],C[5],C[6]),k.iterator=L,k.angleFinder=W,k.length=G(L,P,x),P=C[5],x=C[6];break;case"Q":L=B(P,x,C[1],C[2],C[3],C[4]),W=N(P,x,C[1],C[2],C[3],C[4]),k.iterator=L,k.angleFinder=W,k.length=G(L,P,x),P=C[3],x=C[4];break;case"Z":case"z":k.destX=y,k.destY=T,k.length=n(P,x,y,T),P=y,x=T;break}b+=k.length,E.push(k)}return E.push({length:b,x:P,y:x}),E}function U(v,b,S){S||(S=H(v));for(var C=0;b-S[C].length>0&&C<S.length-2;)b-=S[C].length,C++;var P=S[C],x=b/P.length,y=P.command,T=v[C],E;switch(y){case"M":return{x:P.x,y:P.y,angle:0};case"Z":case"z":return E=new u.Point(P.x,P.y).lerp(new u.Point(P.destX,P.destY),x),E.angle=Math.atan2(P.destY-P.y,P.destX-P.x),E;case"L":return E=new u.Point(P.x,P.y).lerp(new u.Point(T[1],T[2]),x),E.angle=Math.atan2(T[2]-P.y,T[1]-P.x),E;case"C":return z(P,b);case"Q":return z(P,b)}}function K(v){var b=[],S=[],C,P,x=u.rePathCommand,y="[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*",T="("+y+")"+u.commaWsp,E="([01])"+u.commaWsp+"?",L=T+"?"+T+"?"+T+E+E+T+"?("+y+")",k=new RegExp(L,"g"),W,Y,V;if(!v||!v.match)return b;V=v.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);for(var M=0,O,j=V.length;M<j;M++){C=V[M],Y=C.slice(1).trim(),S.length=0;var R=C.charAt(0);if(O=[R],R.toLowerCase()==="a")for(var A;A=k.exec(Y);)for(var X=1;X<A.length;X++)S.push(A[X]);else for(;W=x.exec(Y);)S.push(W[0]);for(var X=0,q=S.length;X<q;X++)P=parseFloat(S[X]),isNaN(P)||O.push(P);var tt=i[R.toLowerCase()],Z=a[R]||R;if(O.length-1>tt)for(var I=1,$=O.length;I<$;I+=tt)b.push([R].concat(O.slice(I,I+tt))),R=Z;else b.push(O)}return b}function Q(v,b){var S=[],C,P=new u.Point(v[0].x,v[0].y),x=new u.Point(v[1].x,v[1].y),y=v.length,T=1,E=0,L=y>2;for(b=b||0,L&&(T=v[2].x<x.x?-1:v[2].x===x.x?0:1,E=v[2].y<x.y?-1:v[2].y===x.y?0:1),S.push(["M",P.x-T*b,P.y-E*b]),C=1;C<y;C++){if(!P.eq(x)){var k=P.midPointFrom(x);S.push(["Q",P.x,P.y,k.x,k.y])}P=v[C],C+1<v.length&&(x=v[C+1])}return L&&(T=P.x>v[C-2].x?1:P.x===v[C-2].x?0:-1,E=P.y>v[C-2].y?1:P.y===v[C-2].y?0:-1),S.push(["L",P.x+T*b,P.y+E*b]),S}function J(v,b,S){return S&&(b=u.util.multiplyTransformMatrices(b,[1,0,0,1,-S.x,-S.y])),v.map(function(C){for(var P=C.slice(0),x={},y=1;y<C.length-1;y+=2)x.x=C[y],x.y=C[y+1],x=u.util.transformPoint(x,b),P[y]=x.x,P[y+1]=x.y;return P})}u.util.joinPath=function(v){return v.map(function(b){return b.join(" ")}).join(" ")},u.util.parsePath=K,u.util.makePathSimpler=h,u.util.getSmoothPathFromPoints=Q,u.util.getPathSegmentsInfo=H,u.util.getBoundsOfCurve=e,u.util.getPointOnPath=U,u.util.transformPath=J})();(function(){var c=Array.prototype.slice;function i(e,s){for(var h=c.call(arguments,2),n=[],l=0,f=e.length;l<f;l++)n[l]=h.length?e[l][s].apply(e[l],h):e[l][s].call(e[l]);return n}function a(e,s){return r(e,s,function(h,n){return h>=n})}function o(e,s){return r(e,s,function(h,n){return h<n})}function t(e,s){for(var h=e.length;h--;)e[h]=s;return e}function r(e,s,h){if(!(!e||e.length===0)){var n=e.length-1,l=s?e[n][s]:e[n];if(s)for(;n--;)h(e[n][s],l)&&(l=e[n][s]);else for(;n--;)h(e[n],l)&&(l=e[n]);return l}}u.util.array={fill:t,invoke:i,min:o,max:a}})();(function(){function c(a,o,t){if(t)if(!u.isLikelyNode&&o instanceof Element)a=o;else if(o instanceof Array){a=[];for(var r=0,e=o.length;r<e;r++)a[r]=c({},o[r],t)}else if(o&&typeof o=="object")for(var s in o)s==="canvas"||s==="group"?a[s]=null:o.hasOwnProperty(s)&&(a[s]=c({},o[s],t));else a=o;else for(var s in o)a[s]=o[s];return a}function i(a,o){return c({},a,o)}u.util.object={extend:c,clone:i},u.util.object.extend(u.util,u.Observable)})();(function(){function c(r){return r.replace(/-+(.)?/g,function(e,s){return s?s.toUpperCase():""})}function i(r,e){return r.charAt(0).toUpperCase()+(e?r.slice(1):r.slice(1).toLowerCase())}function a(r){return r.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function o(r){var e=0,s,h=[];for(e=0,s;e<r.length;e++)(s=t(r,e))!==!1&&h.push(s);return h}function t(r,e){var s=r.charCodeAt(e);if(isNaN(s))return"";if(s<55296||s>57343)return r.charAt(e);if(55296<=s&&s<=56319){if(r.length<=e+1)throw"High surrogate without following low surrogate";var h=r.charCodeAt(e+1);if(56320>h||h>57343)throw"High surrogate without following low surrogate";return r.charAt(e)+r.charAt(e+1)}if(e===0)throw"Low surrogate without preceding high surrogate";var n=r.charCodeAt(e-1);if(55296>n||n>56319)throw"Low surrogate without preceding high surrogate";return!1}u.util.string={camelize:c,capitalize:i,escapeXml:a,graphemeSplit:o}})();(function(){var c=Array.prototype.slice,i=function(){},a=function(){for(var s in{toString:1})if(s==="toString")return!1;return!0}(),o=function(s,h,n){for(var l in h)l in s.prototype&&typeof s.prototype[l]=="function"&&(h[l]+"").indexOf("callSuper")>-1?s.prototype[l]=function(f){return function(){var d=this.constructor.superclass;this.constructor.superclass=n;var g=h[f].apply(this,arguments);if(this.constructor.superclass=d,f!=="initialize")return g}}(l):s.prototype[l]=h[l],a&&(h.toString!==Object.prototype.toString&&(s.prototype.toString=h.toString),h.valueOf!==Object.prototype.valueOf&&(s.prototype.valueOf=h.valueOf))};function t(){}function r(s){for(var h=null,n=this;n.constructor.superclass;){var l=n.constructor.superclass.prototype[s];if(n[s]!==l){h=l;break}n=n.constructor.superclass.prototype}return h?arguments.length>1?h.apply(this,c.call(arguments,1)):h.call(this):console.log("tried to callSuper "+s+", method not found in prototype chain",this)}function e(){var s=null,h=c.call(arguments,0);typeof h[0]=="function"&&(s=h.shift());function n(){this.initialize.apply(this,arguments)}n.superclass=s,n.subclasses=[],s&&(t.prototype=s.prototype,n.prototype=new t,s.subclasses.push(n));for(var l=0,f=h.length;l<f;l++)o(n,h[l],s);return n.prototype.initialize||(n.prototype.initialize=i),n.prototype.constructor=n,n.prototype.callSuper=r,n}u.util.createClass=e})();(function(){var c=!!u.document.createElement("div").attachEvent,i=["touchstart","touchmove","touchend"];u.util.addListener=function(o,t,r,e){o&&o.addEventListener(t,r,c?!1:e)},u.util.removeListener=function(o,t,r,e){o&&o.removeEventListener(t,r,c?!1:e)};function a(o){var t=o.changedTouches;return t&&t[0]?t[0]:o}u.util.getPointer=function(o){var t=o.target,r=u.util.getScrollLeftTop(t),e=a(o);return{x:e.clientX+r.left,y:e.clientY+r.top}},u.util.isTouchEvent=function(o){return i.indexOf(o.type)>-1||o.pointerType==="touch"}})();(function(){function c(e,s){var h=e.style;if(!h)return e;if(typeof s=="string")return e.style.cssText+=";"+s,s.indexOf("opacity")>-1?r(e,s.match(/opacity:\s*(\d?\.?\d*)/)[1]):e;for(var n in s)if(n==="opacity")r(e,s[n]);else{var l=n==="float"||n==="cssFloat"?typeof h.styleFloat=="undefined"?"cssFloat":"styleFloat":n;h[l]=s[n]}return e}var i=u.document.createElement("div"),a=typeof i.style.opacity=="string",o=typeof i.style.filter=="string",t=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,r=function(e){return e};a?r=function(e,s){return e.style.opacity=s,e}:o&&(r=function(e,s){var h=e.style;return e.currentStyle&&!e.currentStyle.hasLayout&&(h.zoom=1),t.test(h.filter)?(s=s>=.9999?"":"alpha(opacity="+s*100+")",h.filter=h.filter.replace(t,s)):h.filter+=" alpha(opacity="+s*100+")",e}),u.util.setStyle=c})();(function(){var c=Array.prototype.slice;function i(g){return typeof g=="string"?u.document.getElementById(g):g}var a,o=function(g){return c.call(g,0)};try{a=o(u.document.childNodes)instanceof Array}catch(g){}a||(o=function(g){for(var m=new Array(g.length),p=g.length;p--;)m[p]=g[p];return m});function t(g,m){var p=u.document.createElement(g);for(var _ in m)_==="class"?p.className=m[_]:_==="for"?p.htmlFor=m[_]:p.setAttribute(_,m[_]);return p}function r(g,m){g&&(" "+g.className+" ").indexOf(" "+m+" ")===-1&&(g.className+=(g.className?" ":"")+m)}function e(g,m,p){return typeof m=="string"&&(m=t(m,p)),g.parentNode&&g.parentNode.replaceChild(m,g),m.appendChild(g),m}function s(g){for(var m=0,p=0,_=u.document.documentElement,w=u.document.body||{scrollLeft:0,scrollTop:0};g&&(g.parentNode||g.host)&&(g=g.parentNode||g.host,g===u.document?(m=w.scrollLeft||_.scrollLeft||0,p=w.scrollTop||_.scrollTop||0):(m+=g.scrollLeft||0,p+=g.scrollTop||0),!(g.nodeType===1&&g.style.position==="fixed")););return{left:m,top:p}}function h(g){var m,p=g&&g.ownerDocument,_={left:0,top:0},w={left:0,top:0},D,B={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!p)return w;for(var N in B)w[B[N]]+=parseInt(n(g,N),10)||0;return m=p.documentElement,typeof g.getBoundingClientRect!="undefined"&&(_=g.getBoundingClientRect()),D=s(g),{left:_.left+D.left-(m.clientLeft||0)+w.left,top:_.top+D.top-(m.clientTop||0)+w.top}}var n;u.document.defaultView&&u.document.defaultView.getComputedStyle?n=function(g,m){var p=u.document.defaultView.getComputedStyle(g,null);return p?p[m]:void 0}:n=function(g,m){var p=g.style[m];return!p&&g.currentStyle&&(p=g.currentStyle[m]),p},function(){var g=u.document.documentElement.style,m="userSelect"in g?"userSelect":"MozUserSelect"in g?"MozUserSelect":"WebkitUserSelect"in g?"WebkitUserSelect":"KhtmlUserSelect"in g?"KhtmlUserSelect":"";function p(w){return typeof w.onselectstart!="undefined"&&(w.onselectstart=u.util.falseFunction),m?w.style[m]="none":typeof w.unselectable=="string"&&(w.unselectable="on"),w}function _(w){return typeof w.onselectstart!="undefined"&&(w.onselectstart=null),m?w.style[m]="":typeof w.unselectable=="string"&&(w.unselectable=""),w}u.util.makeElementUnselectable=p,u.util.makeElementSelectable=_}();function l(g){var m=u.jsdomImplForWrapper(g);return m._canvas||m._image}function f(g){if(u.isLikelyNode){var m=u.jsdomImplForWrapper(g);m&&(m._image=null,m._canvas=null,m._currentSrc=null,m._attributes=null,m._classList=null)}}function d(g,m){g.imageSmoothingEnabled=g.imageSmoothingEnabled||g.webkitImageSmoothingEnabled||g.mozImageSmoothingEnabled||g.msImageSmoothingEnabled||g.oImageSmoothingEnabled,g.imageSmoothingEnabled=m}u.util.setImageSmoothing=d,u.util.getById=i,u.util.toArray=o,u.util.addClass=r,u.util.makeElement=t,u.util.wrapElement=e,u.util.getScrollLeftTop=s,u.util.getElementOffset=h,u.util.getNodeCanvas=l,u.util.cleanUpJsdomNode=f})();(function(){function c(o,t){return o+(/\?/.test(o)?"&":"?")+t}function i(){}function a(o,t){t||(t={});var r=t.method?t.method.toUpperCase():"GET",e=t.onComplete||function(){},s=new u.window.XMLHttpRequest,h=t.body||t.parameters;return s.onreadystatechange=function(){s.readyState===4&&(e(s),s.onreadystatechange=i)},r==="GET"&&(h=null,typeof t.parameters=="string"&&(o=c(o,t.parameters))),s.open(r,o,!0),(r==="POST"||r==="PUT")&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.send(h),s}u.util.request=a})();u.log=console.log;u.warn=console.warn;(function(){var c=u.util.object.extend,i=u.util.object.clone,a=[];u.util.object.extend(a,{cancelAll:function(){var l=this.splice(0);return l.forEach(function(f){f.cancel()}),l},cancelByCanvas:function(l){if(!l)return[];var f=this.filter(function(d){return typeof d.target=="object"&&d.target.canvas===l});return f.forEach(function(d){d.cancel()}),f},cancelByTarget:function(l){var f=this.findAnimationsByTarget(l);return f.forEach(function(d){d.cancel()}),f},findAnimationIndex:function(l){return this.indexOf(this.findAnimation(l))},findAnimation:function(l){return this.find(function(f){return f.cancel===l})},findAnimationsByTarget:function(l){return l?this.filter(function(f){return f.target===l}):[]}});function o(){return!1}function t(l,f,d,g){return-d*Math.cos(l/g*(Math.PI/2))+d+f}function r(l){l||(l={});var f=!1,d,g=function(){var m=u.runningAnimations.indexOf(d);return m>-1&&u.runningAnimations.splice(m,1)[0]};return d=c(i(l),{cancel:function(){return f=!0,g()},currentValue:"startValue"in l?l.startValue:0,completionRate:0,durationRate:0}),u.runningAnimations.push(d),h(function(m){var p=m||+new Date,_=l.duration||500,w=p+_,D,B=l.onChange||o,N=l.abort||o,G=l.onComplete||o,z=l.easing||t,H="startValue"in l?l.startValue.length>0:!1,U="startValue"in l?l.startValue:0,K="endValue"in l?l.endValue:100,Q=l.byValue||(H?U.map(function(J,v){return K[v]-U[v]}):K-U);l.onStart&&l.onStart(),function J(v){D=v||+new Date;var b=D>w?_:D-p,S=b/_,C=H?U.map(function(x,y){return z(b,U[y],Q[y],_)}):z(b,U,Q,_),P=Math.abs(H?(C[0]-U[0])/Q[0]:(C-U)/Q);if(d.currentValue=H?C.slice():C,d.completionRate=P,d.durationRate=S,!f){if(N(C,P,S)){g();return}if(D>w){d.currentValue=H?K.slice():K,d.completionRate=1,d.durationRate=1,B(H?K.slice():K,1,1),G(K,1,1),g();return}else B(C,P,S),h(J)}}(p)}),d.cancel}var e=u.window.requestAnimationFrame||u.window.webkitRequestAnimationFrame||u.window.mozRequestAnimationFrame||u.window.oRequestAnimationFrame||u.window.msRequestAnimationFrame||function(l){return u.window.setTimeout(l,1e3/60)},s=u.window.cancelAnimationFrame||u.window.clearTimeout;function h(){return e.apply(u.window,arguments)}function n(){return s.apply(u.window,arguments)}u.util.animate=r,u.util.requestAnimFrame=h,u.util.cancelAnimFrame=n,u.runningAnimations=a})();(function(){function c(a,o,t){var r="rgba("+parseInt(a[0]+t*(o[0]-a[0]),10)+","+parseInt(a[1]+t*(o[1]-a[1]),10)+","+parseInt(a[2]+t*(o[2]-a[2]),10);return r+=","+(a&&o?parseFloat(a[3]+t*(o[3]-a[3])):1),r+=")",r}function i(a,o,t,r){var e=new u.Color(a).getSource(),s=new u.Color(o).getSource(),h=r.onComplete,n=r.onChange;return r=r||{},u.util.animate(u.util.object.extend(r,{duration:t||500,startValue:e,endValue:s,byValue:s,easing:function(l,f,d,g){var m=r.colorEasing?r.colorEasing(l,g):1-Math.cos(l/g*(Math.PI/2));return c(f,d,m)},onComplete:function(l,f,d){if(h)return h(c(s,s,0),f,d)},onChange:function(l,f,d){if(n){if(Array.isArray(l))return n(c(l,l,0),f,d);n(l,f,d)}}}))}u.util.animateColor=i})();(function(){function c(v,b,S,C){return v<Math.abs(b)?(v=b,C=S/4):b===0&&v===0?C=S/(2*Math.PI)*Math.asin(1):C=S/(2*Math.PI)*Math.asin(b/v),{a:v,c:b,p:S,s:C}}function i(v,b,S){return v.a*Math.pow(2,10*(b-=1))*Math.sin((b*S-v.s)*(2*Math.PI)/v.p)}function a(v,b,S,C){return S*((v=v/C-1)*v*v+1)+b}function o(v,b,S,C){return v/=C/2,v<1?S/2*v*v*v+b:S/2*((v-=2)*v*v+2)+b}function t(v,b,S,C){return S*(v/=C)*v*v*v+b}function r(v,b,S,C){return-S*((v=v/C-1)*v*v*v-1)+b}function e(v,b,S,C){return v/=C/2,v<1?S/2*v*v*v*v+b:-S/2*((v-=2)*v*v*v-2)+b}function s(v,b,S,C){return S*(v/=C)*v*v*v*v+b}function h(v,b,S,C){return S*((v=v/C-1)*v*v*v*v+1)+b}function n(v,b,S,C){return v/=C/2,v<1?S/2*v*v*v*v*v+b:S/2*((v-=2)*v*v*v*v+2)+b}function l(v,b,S,C){return-S*Math.cos(v/C*(Math.PI/2))+S+b}function f(v,b,S,C){return S*Math.sin(v/C*(Math.PI/2))+b}function d(v,b,S,C){return-S/2*(Math.cos(Math.PI*v/C)-1)+b}function g(v,b,S,C){return v===0?b:S*Math.pow(2,10*(v/C-1))+b}function m(v,b,S,C){return v===C?b+S:S*(-Math.pow(2,-10*v/C)+1)+b}function p(v,b,S,C){return v===0?b:v===C?b+S:(v/=C/2,v<1?S/2*Math.pow(2,10*(v-1))+b:S/2*(-Math.pow(2,-10*--v)+2)+b)}function _(v,b,S,C){return-S*(Math.sqrt(1-(v/=C)*v)-1)+b}function w(v,b,S,C){return S*Math.sqrt(1-(v=v/C-1)*v)+b}function D(v,b,S,C){return v/=C/2,v<1?-S/2*(Math.sqrt(1-v*v)-1)+b:S/2*(Math.sqrt(1-(v-=2)*v)+1)+b}function B(v,b,S,C){var P=1.70158,x=0,y=S;if(v===0)return b;if(v/=C,v===1)return b+S;x||(x=C*.3);var T=c(y,S,x,P);return-i(T,v,C)+b}function N(v,b,S,C){var P=1.70158,x=0,y=S;if(v===0)return b;if(v/=C,v===1)return b+S;x||(x=C*.3);var T=c(y,S,x,P);return T.a*Math.pow(2,-10*v)*Math.sin((v*C-T.s)*(2*Math.PI)/T.p)+T.c+b}function G(v,b,S,C){var P=1.70158,x=0,y=S;if(v===0)return b;if(v/=C/2,v===2)return b+S;x||(x=C*(.3*1.5));var T=c(y,S,x,P);return v<1?-.5*i(T,v,C)+b:T.a*Math.pow(2,-10*(v-=1))*Math.sin((v*C-T.s)*(2*Math.PI)/T.p)*.5+T.c+b}function z(v,b,S,C,P){return P===void 0&&(P=1.70158),S*(v/=C)*v*((P+1)*v-P)+b}function H(v,b,S,C,P){return P===void 0&&(P=1.70158),S*((v=v/C-1)*v*((P+1)*v+P)+1)+b}function U(v,b,S,C,P){return P===void 0&&(P=1.70158),v/=C/2,v<1?S/2*(v*v*(((P*=1.525)+1)*v-P))+b:S/2*((v-=2)*v*(((P*=1.525)+1)*v+P)+2)+b}function K(v,b,S,C){return S-Q(C-v,0,S,C)+b}function Q(v,b,S,C){return(v/=C)<1/2.75?S*(7.5625*v*v)+b:v<2/2.75?S*(7.5625*(v-=1.5/2.75)*v+.75)+b:v<2.5/2.75?S*(7.5625*(v-=2.25/2.75)*v+.9375)+b:S*(7.5625*(v-=2.625/2.75)*v+.984375)+b}function J(v,b,S,C){return v<C/2?K(v*2,0,S,C)*.5+b:Q(v*2-C,0,S,C)*.5+S*.5+b}u.util.ease={easeInQuad:function(v,b,S,C){return S*(v/=C)*v+b},easeOutQuad:function(v,b,S,C){return-S*(v/=C)*(v-2)+b},easeInOutQuad:function(v,b,S,C){return v/=C/2,v<1?S/2*v*v+b:-S/2*(--v*(v-2)-1)+b},easeInCubic:function(v,b,S,C){return S*(v/=C)*v*v+b},easeOutCubic:a,easeInOutCubic:o,easeInQuart:t,easeOutQuart:r,easeInOutQuart:e,easeInQuint:s,easeOutQuint:h,easeInOutQuint:n,easeInSine:l,easeOutSine:f,easeInOutSine:d,easeInExpo:g,easeOutExpo:m,easeInOutExpo:p,easeInCirc:_,easeOutCirc:w,easeInOutCirc:D,easeInElastic:B,easeOutElastic:N,easeInOutElastic:G,easeInBack:z,easeOutBack:H,easeInOutBack:U,easeInBounce:K,easeOutBounce:Q,easeInOutBounce:J}})();(function(c){"use strict";var i=c.fabric||(c.fabric={}),a=i.util.object.extend,o=i.util.object.clone,t=i.util.toFixed,r=i.util.parseUnit,e=i.util.multiplyTransformMatrices,s=["path","circle","polygon","polyline","ellipse","rect","line","image","text"],h=["symbol","image","marker","pattern","view","svg"],n=["pattern","defs","symbol","metadata","clipPath","mask","desc"],l=["symbol","g","a","svg","clipPath","defs"],f={cx:"left",x:"left",r:"radius",cy:"top",y:"top",display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","letter-spacing":"charSpacing","paint-order":"paintFirst","stroke-dasharray":"strokeDashArray","stroke-dashoffset":"strokeDashOffset","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"textAnchor",opacity:"opacity","clip-path":"clipPath","clip-rule":"clipRule","vector-effect":"strokeUniform","image-rendering":"imageSmoothing"},d={stroke:"strokeOpacity",fill:"fillOpacity"},g="font-size",m="clip-path";i.svgValidTagNamesRegEx=w(s),i.svgViewBoxElementsRegEx=w(h),i.svgInvalidAncestorsRegEx=w(n),i.svgValidParentsRegEx=w(l),i.cssRules={},i.gradientDefs={},i.clipPaths={};function p(x){return x in f?f[x]:x}function _(x,y,T,E){var L=Object.prototype.toString.call(y)==="[object Array]",k;if((x==="fill"||x==="stroke")&&y==="none")y="";else{if(x==="strokeUniform")return y==="non-scaling-stroke";if(x==="strokeDashArray")y==="none"?y=null:y=y.replace(/,/g," ").split(/\s+/).map(parseFloat);else if(x==="transformMatrix")T&&T.transformMatrix?y=e(T.transformMatrix,i.parseTransformAttribute(y)):y=i.parseTransformAttribute(y);else if(x==="visible")y=y!=="none"&&y!=="hidden",T&&T.visible===!1&&(y=!1);else if(x==="opacity")y=parseFloat(y),T&&typeof T.opacity!="undefined"&&(y*=T.opacity);else if(x==="textAnchor")y=y==="start"?"left":y==="end"?"right":"center";else if(x==="charSpacing")k=r(y,E)/E*1e3;else if(x==="paintFirst"){var W=y.indexOf("fill"),Y=y.indexOf("stroke"),y="fill";(W>-1&&Y>-1&&Y<W||W===-1&&Y>-1)&&(y="stroke")}else{if(x==="href"||x==="xlink:href"||x==="font")return y;if(x==="imageSmoothing")return y==="optimizeQuality";k=L?y.map(r):r(y,E)}}return!L&&isNaN(k)?y:k}function w(x){return new RegExp("^("+x.join("|")+")\\b","i")}function D(x){for(var y in d)if(!(typeof x[d[y]]=="undefined"||x[y]==="")){if(typeof x[y]=="undefined"){if(!i.Object.prototype[y])continue;x[y]=i.Object.prototype[y]}if(x[y].indexOf("url(")!==0){var T=new i.Color(x[y]);x[y]=T.setAlpha(t(T.getAlpha()*x[d[y]],2)).toRgba()}}return x}function B(x,y){var T,E=[],L,k,W;for(k=0,W=y.length;k<W;k++)T=y[k],L=x.getElementsByTagName(T),E=E.concat(Array.prototype.slice.call(L));return E}i.parseTransformAttribute=function(){function x(I,$){var et=i.util.cos($[0]),it=i.util.sin($[0]),nt=0,rt=0;$.length===3&&(nt=$[1],rt=$[2]),I[0]=et,I[1]=it,I[2]=-it,I[3]=et,I[4]=nt-(et*nt-it*rt),I[5]=rt-(it*nt+et*rt)}function y(I,$){var et=$[0],it=$.length===2?$[1]:$[0];I[0]=et,I[3]=it}function T(I,$,et){I[et]=Math.tan(i.util.degreesToRadians($[0]))}function E(I,$){I[4]=$[0],$.length===2&&(I[5]=$[1])}var L=i.iMatrix,k=i.reNum,W=i.commaWsp,Y="(?:(skewX)\\s*\\(\\s*("+k+")\\s*\\))",V="(?:(skewY)\\s*\\(\\s*("+k+")\\s*\\))",M="(?:(rotate)\\s*\\(\\s*("+k+")(?:"+W+"("+k+")"+W+"("+k+"))?\\s*\\))",O="(?:(scale)\\s*\\(\\s*("+k+")(?:"+W+"("+k+"))?\\s*\\))",j="(?:(translate)\\s*\\(\\s*("+k+")(?:"+W+"("+k+"))?\\s*\\))",R="(?:(matrix)\\s*\\(\\s*("+k+")"+W+"("+k+")"+W+"("+k+")"+W+"("+k+")"+W+"("+k+")"+W+"("+k+")\\s*\\))",A="(?:"+R+"|"+j+"|"+O+"|"+M+"|"+Y+"|"+V+")",X="(?:"+A+"(?:"+W+"*"+A+")*)",q="^\\s*(?:"+X+"?)\\s*$",tt=new RegExp(q),Z=new RegExp(A,"g");return function(I){var $=L.concat(),et=[];if(!I||I&&!tt.test(I))return $;I.replace(Z,function(nt){var rt=new RegExp(A).exec(nt).filter(function(ct){return!!ct}),ot=rt[1],st=rt.slice(2).map(parseFloat);switch(ot){case"translate":E($,st);break;case"rotate":st[0]=i.util.degreesToRadians(st[0]),x($,st);break;case"scale":y($,st);break;case"skewX":T($,st,2);break;case"skewY":T($,st,1);break;case"matrix":$=st;break}et.push($.concat()),$=L.concat()});for(var it=et[0];et.length>1;)et.shift(),it=i.util.multiplyTransformMatrices(it,et[0]);return it}}();function N(x,y){var T,E;x.replace(/;\s*$/,"").split(";").forEach(function(L){var k=L.split(":");T=k[0].trim().toLowerCase(),E=k[1].trim(),y[T]=E})}function G(x,y){var T,E;for(var L in x)typeof x[L]!="undefined"&&(T=L.toLowerCase(),E=x[L],y[T]=E)}function z(x,y){var T={};for(var E in i.cssRules[y])if(H(x,E.split(" ")))for(var L in i.cssRules[y][E])T[L]=i.cssRules[y][E][L];return T}function H(x,y){var T,E=!0;return T=K(x,y.pop()),T&&y.length&&(E=U(x,y)),T&&E&&y.length===0}function U(x,y){for(var T,E=!0;x.parentNode&&x.parentNode.nodeType===1&&y.length;)E&&(T=y.pop()),x=x.parentNode,E=K(x,T);return y.length===0}function K(x,y){var T=x.nodeName,E=x.getAttribute("class"),L=x.getAttribute("id"),k,W;if(k=new RegExp("^"+T,"i"),y=y.replace(k,""),L&&y.length&&(k=new RegExp("#"+L+"(?![a-zA-Z\\-]+)","i"),y=y.replace(k,"")),E&&y.length)for(E=E.split(" "),W=E.length;W--;)k=new RegExp("\\."+E[W]+"(?![a-zA-Z\\-]+)","i"),y=y.replace(k,"");return y.length===0}function Q(x,y){var T;if(x.getElementById&&(T=x.getElementById(y)),T)return T;var E,L,k,W=x.getElementsByTagName("*");for(L=0,k=W.length;L<k;L++)if(E=W[L],y===E.getAttribute("id"))return E}function J(x){for(var y=B(x,["use","svg:use"]),T=0;y.length&&T<y.length;){var E=y[T],L=E.getAttribute("xlink:href")||E.getAttribute("href");if(L===null)return;var k=L.substr(1),W=E.getAttribute("x")||0,Y=E.getAttribute("y")||0,V=Q(x,k).cloneNode(!0),M=(V.getAttribute("transform")||"")+" translate("+W+", "+Y+")",O,j=y.length,R,A,X,q,tt=i.svgNS;if(b(V),/^svg$/i.test(V.nodeName)){var Z=V.ownerDocument.createElementNS(tt,"g");for(A=0,X=V.attributes,q=X.length;A<q;A++)R=X.item(A),Z.setAttributeNS(tt,R.nodeName,R.nodeValue);for(;V.firstChild;)Z.appendChild(V.firstChild);V=Z}for(A=0,X=E.attributes,q=X.length;A<q;A++)R=X.item(A),!(R.nodeName==="x"||R.nodeName==="y"||R.nodeName==="xlink:href"||R.nodeName==="href")&&(R.nodeName==="transform"?M=R.nodeValue+" "+M:V.setAttribute(R.nodeName,R.nodeValue));V.setAttribute("transform",M),V.setAttribute("instantiated_by_use","1"),V.removeAttribute("id"),O=E.parentNode,O.replaceChild(V,E),y.length===j&&T++}}var v=new RegExp("^\\s*("+i.reNum+"+)\\s*,?\\s*("+i.reNum+"+)\\s*,?\\s*("+i.reNum+"+)\\s*,?\\s*("+i.reNum+"+)\\s*$");function b(x){if(!i.svgViewBoxElementsRegEx.test(x.nodeName))return{};var y=x.getAttribute("viewBox"),T=1,E=1,L=0,k=0,W,Y,V,M,O=x.getAttribute("width"),j=x.getAttribute("height"),R=x.getAttribute("x")||0,A=x.getAttribute("y")||0,X=x.getAttribute("preserveAspectRatio")||"",q=!y||!(y=y.match(v)),tt=!O||!j||O==="100%"||j==="100%",Z=q&&tt,I={},$="",et=0,it=0;if(I.width=0,I.height=0,I.toBeParsed=Z,q&&(R||A)&&x.parentNode&&x.parentNode.nodeName!=="#document"&&($=" translate("+r(R)+" "+r(A)+") ",V=(x.getAttribute("transform")||"")+$,x.setAttribute("transform",V),x.removeAttribute("x"),x.removeAttribute("y")),Z)return I;if(q)return I.width=r(O),I.height=r(j),I;if(L=-parseFloat(y[1]),k=-parseFloat(y[2]),W=parseFloat(y[3]),Y=parseFloat(y[4]),I.minX=L,I.minY=k,I.viewBoxWidth=W,I.viewBoxHeight=Y,tt?(I.width=W,I.height=Y):(I.width=r(O),I.height=r(j),T=I.width/W,E=I.height/Y),X=i.util.parsePreserveAspectRatioAttribute(X),X.alignX!=="none"&&(X.meetOrSlice==="meet"&&(E=T=T>E?E:T),X.meetOrSlice==="slice"&&(E=T=T>E?T:E),et=I.width-W*T,it=I.height-Y*T,X.alignX==="Mid"&&(et/=2),X.alignY==="Mid"&&(it/=2),X.alignX==="Min"&&(et=0),X.alignY==="Min"&&(it=0)),T===1&&E===1&&L===0&&k===0&&R===0&&A===0)return I;if((R||A)&&x.parentNode.nodeName!=="#document"&&($=" translate("+r(R)+" "+r(A)+") "),V=$+" matrix("+T+" 0 0 "+E+" "+(L*T+et)+" "+(k*E+it)+") ",x.nodeName==="svg"){for(M=x.ownerDocument.createElementNS(i.svgNS,"g");x.firstChild;)M.appendChild(x.firstChild);x.appendChild(M)}else M=x,M.removeAttribute("x"),M.removeAttribute("y"),V=M.getAttribute("transform")+V;return M.setAttribute("transform",V),I}function S(x,y){for(;x&&(x=x.parentNode);)if(x.nodeName&&y.test(x.nodeName.replace("svg:",""))&&!x.getAttribute("instantiated_by_use"))return!0;return!1}i.parseSVGDocument=function(x,y,T,E){if(x){J(x);var L=i.Object.__uid++,k,W,Y=b(x),V=i.util.toArray(x.getElementsByTagName("*"));if(Y.crossOrigin=E&&E.crossOrigin,Y.svgUid=L,V.length===0&&i.isLikelyNode){V=x.selectNodes('//*[name(.)!="svg"]');var M=[];for(k=0,W=V.length;k<W;k++)M[k]=V[k];V=M}var O=V.filter(function(R){return b(R),i.svgValidTagNamesRegEx.test(R.nodeName.replace("svg:",""))&&!S(R,i.svgInvalidAncestorsRegEx)});if(!O||O&&!O.length){y&&y([],{});return}var j={};V.filter(function(R){return R.nodeName.replace("svg:","")==="clipPath"}).forEach(function(R){var A=R.getAttribute("id");j[A]=i.util.toArray(R.getElementsByTagName("*")).filter(function(X){return i.svgValidTagNamesRegEx.test(X.nodeName.replace("svg:",""))})}),i.gradientDefs[L]=i.getGradientDefs(x),i.cssRules[L]=i.getCSSRules(x),i.clipPaths[L]=j,i.parseElements(O,function(R,A){y&&(y(R,Y,A,V),delete i.gradientDefs[L],delete i.cssRules[L],delete i.clipPaths[L])},o(Y),T,E)}};function C(x,y){var T=["gradientTransform","x1","x2","y1","y2","gradientUnits","cx","cy","r","fx","fy"],E="xlink:href",L=y.getAttribute(E).substr(1),k=Q(x,L);if(k&&k.getAttribute(E)&&C(x,k),T.forEach(function(Y){k&&!y.hasAttribute(Y)&&k.hasAttribute(Y)&&y.setAttribute(Y,k.getAttribute(Y))}),!y.children.length)for(var W=k.cloneNode(!0);W.firstChild;)y.appendChild(W.firstChild);y.removeAttribute(E)}var P=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+i.reNum+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+i.reNum+"))?\\s+(.*)");a(i,{parseFontDeclaration:function(x,y){var T=x.match(P);if(T){var E=T[1],L=T[3],k=T[4],W=T[5],Y=T[6];E&&(y.fontStyle=E),L&&(y.fontWeight=isNaN(parseFloat(L))?L:parseFloat(L)),k&&(y.fontSize=r(k)),Y&&(y.fontFamily=Y),W&&(y.lineHeight=W==="normal"?1:W)}},getGradientDefs:function(x){var y=["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"],T=B(x,y),E,L=0,k={};for(L=T.length;L--;)E=T[L],E.getAttribute("xlink:href")&&C(x,E),k[E.getAttribute("id")]=E;return k},parseAttributes:function(x,y,T){if(x){var E,L={},k,W;typeof T=="undefined"&&(T=x.getAttribute("svgUid")),x.parentNode&&i.svgValidParentsRegEx.test(x.parentNode.nodeName)&&(L=i.parseAttributes(x.parentNode,y,T));var Y=y.reduce(function(X,q){return E=x.getAttribute(q),E&&(X[q]=E),X},{}),V=a(z(x,T),i.parseStyleAttribute(x));Y=a(Y,V),V[m]&&x.setAttribute(m,V[m]),k=W=L.fontSize||i.Text.DEFAULT_SVG_FONT_SIZE,Y[g]&&(Y[g]=k=r(Y[g],W));var M,O,j={};for(var R in Y)M=p(R),O=_(M,Y[R],L,k),j[M]=O;j&&j.font&&i.parseFontDeclaration(j.font,j);var A=a(L,j);return i.svgValidParentsRegEx.test(x.nodeName)?A:D(A)}},parseElements:function(x,y,T,E,L){new i.ElementsParser(x,y,T,E,L).parse()},parseStyleAttribute:function(x){var y={},T=x.getAttribute("style");return T&&(typeof T=="string"?N(T,y):G(T,y)),y},parsePointsAttribute:function(x){if(!x)return null;x=x.replace(/,/g," ").trim(),x=x.split(/\s+/);var y=[],T,E;for(T=0,E=x.length;T<E;T+=2)y.push({x:parseFloat(x[T]),y:parseFloat(x[T+1])});return y},getCSSRules:function(x){var y=x.getElementsByTagName("style"),T,E,L={},k;for(T=0,E=y.length;T<E;T++){var W=y[T].textContent;W=W.replace(/\/\*[\s\S]*?\*\//g,""),W.trim()!==""&&(k=W.split("}"),k=k.filter(function(Y){return Y.trim()}),k.forEach(function(Y){var V=Y.split("{"),M={},O=V[1].trim(),j=O.split(";").filter(function(q){return q.trim()});for(T=0,E=j.length;T<E;T++){var R=j[T].split(":"),A=R[0].trim(),X=R[1].trim();M[A]=X}Y=V[0].trim(),Y.split(",").forEach(function(q){q=q.replace(/^svg/i,"").trim(),q!==""&&(L[q]?i.util.object.extend(L[q],M):L[q]=i.util.object.clone(M))})}))}return L},loadSVGFromURL:function(x,y,T,E){x=x.replace(/^\n\s*/,"").trim(),new i.util.request(x,{method:"get",onComplete:L});function L(k){var W=k.responseXML;if(!W||!W.documentElement)return y&&y(null),!1;i.parseSVGDocument(W.documentElement,function(Y,V,M,O){y&&y(Y,V,M,O)},T,E)}},loadSVGFromString:function(x,y,T,E){var L=new i.window.DOMParser,k=L.parseFromString(x.trim(),"text/xml");i.parseSVGDocument(k.documentElement,function(W,Y,V,M){y(W,Y,V,M)},T,E)}})})(F);u.ElementsParser=function(c,i,a,o,t,r){this.elements=c,this.callback=i,this.options=a,this.reviver=o,this.svgUid=a&&a.svgUid||0,this.parsingOptions=t,this.regexUrl=/^url\(['"]?#([^'"]+)['"]?