UNPKG

@devupx/vue-fabric-wrapper

Version:
3 lines 361 kB
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue")):"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue-fabric-wrapper"]=e(require("vue")):t["vue-fabric-wrapper"]=e(t["Vue"])})("undefined"!==typeof self?self:this,(function(t){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s="fb15")}({0:function(t,e){},"0366":function(t,e,i){var r=i("1c0b");t.exports=function(t,e,i){if(r(t),void 0===e)return t;switch(i){case 0:return function(){return t.call(e)};case 1:return function(i){return t.call(e,i)};case 2:return function(i,r){return t.call(e,i,r)};case 3:return function(i,r,n){return t.call(e,i,r,n)}}return function(){return t.apply(e,arguments)}}},"057f":function(t,e,i){var r=i("fc6a"),n=i("241c").f,o={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return n(t)}catch(e){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==o.call(t)?a(t):n(r(t))}},"06cf":function(t,e,i){var r=i("83ab"),n=i("d1e7"),o=i("5c6c"),s=i("fc6a"),a=i("c04e"),h=i("5135"),c=i("0cfb"),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=s(t),e=a(e,!0),c)try{return l(t,e)}catch(i){}if(h(t,e))return o(!n.f.call(t,e),t[e])}},"0cfb":function(t,e,i){var r=i("83ab"),n=i("d039"),o=i("cc12");t.exports=!r&&!n((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},1:function(t,e){},1276:function(t,e,i){"use strict";var r=i("d784"),n=i("44e7"),o=i("825a"),s=i("1d80"),a=i("4840"),h=i("8aa5"),c=i("50c4"),l=i("14c3"),u=i("9263"),f=i("d039"),d=[].push,g=Math.min,p=4294967295,v=!f((function(){return!RegExp(p,"y")}));r("split",2,(function(t,e,i){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,i){var r=String(s(this)),o=void 0===i?p:i>>>0;if(0===o)return[];if(void 0===t)return[r];if(!n(t))return e.call(r,t,o);var a,h,c,l=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),g=0,v=new RegExp(t.source,f+"g");while(a=u.call(v,r)){if(h=v.lastIndex,h>g&&(l.push(r.slice(g,a.index)),a.length>1&&a.index<r.length&&d.apply(l,a.slice(1)),c=a[0].length,g=h,l.length>=o))break;v.lastIndex===a.index&&v.lastIndex++}return g===r.length?!c&&v.test("")||l.push(""):l.push(r.slice(g)),l.length>o?l.slice(0,o):l}:"0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:e.call(this,t,i)}:e,[function(e,i){var n=s(this),o=void 0==e?void 0:e[t];return void 0!==o?o.call(e,n,i):r.call(String(n),e,i)},function(t,n){var s=i(r,t,this,n,r!==e);if(s.done)return s.value;var u=o(t),f=String(this),d=a(u,RegExp),m=u.unicode,y=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(v?"y":"g"),_=new d(v?u:"^(?:"+u.source+")",y),b=void 0===n?p:n>>>0;if(0===b)return[];if(0===f.length)return null===l(_,f)?[f]:[];var x=0,C=0,S=[];while(C<f.length){_.lastIndex=v?C:0;var w,T=l(_,v?f:f.slice(C));if(null===T||(w=g(c(_.lastIndex+(v?0:C)),f.length))===x)C=h(f,C,m);else{if(S.push(f.slice(x,C)),S.length===b)return S;for(var O=1;O<=T.length-1;O++)if(S.push(T[O]),S.length===b)return S;C=x=w}}return S.push(f.slice(x)),S}]}),!v)},"14c3":function(t,e,i){var r=i("c6b6"),n=i("9263");t.exports=function(t,e){var i=t.exec;if("function"===typeof i){var o=i.call(t,e);if("object"!==typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return n.call(t,e)}},"159b":function(t,e,i){var r=i("da84"),n=i("fdbc"),o=i("17c2"),s=i("9112");for(var a in n){var h=r[a],c=h&&h.prototype;if(c&&c.forEach!==o)try{s(c,"forEach",o)}catch(l){c.forEach=o}}},"17c2":function(t,e,i){"use strict";var r=i("b727").forEach,n=i("a640"),o=n("forEach");t.exports=o?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},"1be4":function(t,e,i){var r=i("d066");t.exports=r("document","documentElement")},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1dde":function(t,e,i){var r=i("d039"),n=i("b622"),o=i("2d00"),s=n("species");t.exports=function(t){return o>=51||!r((function(){var e=[],i=e.constructor={};return i[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},"1fb5":function(t,e,i){"use strict";e.byteLength=l,e.toByteArray=f,e.fromByteArray=p;for(var r=[],n=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,h=s.length;a<h;++a)r[a]=s[a],n[s.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var i=t.indexOf("=");-1===i&&(i=e);var r=i===e?0:4-i%4;return[i,r]}function l(t){var e=c(t),i=e[0],r=e[1];return 3*(i+r)/4-r}function u(t,e,i){return 3*(e+i)/4-i}function f(t){var e,i,r=c(t),s=r[0],a=r[1],h=new o(u(t,s,a)),l=0,f=a>0?s-4:s;for(i=0;i<f;i+=4)e=n[t.charCodeAt(i)]<<18|n[t.charCodeAt(i+1)]<<12|n[t.charCodeAt(i+2)]<<6|n[t.charCodeAt(i+3)],h[l++]=e>>16&255,h[l++]=e>>8&255,h[l++]=255&e;return 2===a&&(e=n[t.charCodeAt(i)]<<2|n[t.charCodeAt(i+1)]>>4,h[l++]=255&e),1===a&&(e=n[t.charCodeAt(i)]<<10|n[t.charCodeAt(i+1)]<<4|n[t.charCodeAt(i+2)]>>2,h[l++]=e>>8&255,h[l++]=255&e),h}function d(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function g(t,e,i){for(var r,n=[],o=e;o<i;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),n.push(d(r));return n.join("")}function p(t){for(var e,i=t.length,n=i%3,o=[],s=16383,a=0,h=i-n;a<h;a+=s)o.push(g(t,a,a+s>h?h:a+s));return 1===n?(e=t[i-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===n&&(e=(t[i-2]<<8)+t[i-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},2:function(t,e){},"23cb":function(t,e,i){var r=i("a691"),n=Math.max,o=Math.min;t.exports=function(t,e){var i=r(t);return i<0?n(i+e,0):o(i,e)}},"23e7":function(t,e,i){var r=i("da84"),n=i("06cf").f,o=i("9112"),s=i("6eeb"),a=i("ce4e"),h=i("e893"),c=i("94ca");t.exports=function(t,e){var i,l,u,f,d,g,p=t.target,v=t.global,m=t.stat;if(l=v?r:m?r[p]||a(p,{}):(r[p]||{}).prototype,l)for(u in e){if(d=e[u],t.noTargetGet?(g=n(l,u),f=g&&g.value):f=l[u],i=c(v?u:p+(m?".":"#")+u,t.forced),!i&&void 0!==f){if(typeof d===typeof f)continue;h(d,f)}(t.sham||f&&f.sham)&&o(d,"sham",!0),s(l,u,d,t)}}},"241c":function(t,e,i){var r=i("ca84"),n=i("7839"),o=n.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},"2d00":function(t,e,i){var r,n,o=i("da84"),s=i("342f"),a=o.process,h=a&&a.versions,c=h&&h.v8;c?(r=c.split("."),n=r[0]+r[1]):s&&(r=s.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/),r&&(n=r[1]))),t.exports=n&&+n},"342f":function(t,e,i){var r=i("d066");t.exports=r("navigator","userAgent")||""},"37e8":function(t,e,i){var r=i("83ab"),n=i("9bf2"),o=i("825a"),s=i("df75");t.exports=r?Object.defineProperties:function(t,e){o(t);var i,r=s(e),a=r.length,h=0;while(a>h)n.f(t,i=r[h++],e[i]);return t}},"3bbe":function(t,e,i){var r=i("861d");t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"428f":function(t,e,i){var r=i("da84");t.exports=r},"44ad":function(t,e,i){var r=i("d039"),n=i("c6b6"),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==n(t)?o.call(t,""):Object(t)}:Object},"44e7":function(t,e,i){var r=i("861d"),n=i("c6b6"),o=i("b622"),s=o("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[s])?!!e:"RegExp"==n(t))}},4840:function(t,e,i){var r=i("825a"),n=i("1c0b"),o=i("b622"),s=o("species");t.exports=function(t,e){var i,o=r(t).constructor;return void 0===o||void 0==(i=r(o)[s])?e:n(i)}},4930:function(t,e,i){var r=i("605d"),n=i("2d00"),o=i("d039");t.exports=!!Object.getOwnPropertySymbols&&!o((function(){return!Symbol.sham&&(r?38===n:n>37&&n<41)}))},"4d64":function(t,e,i){var r=i("fc6a"),n=i("50c4"),o=i("23cb"),s=function(t){return function(e,i,s){var a,h=r(e),c=n(h.length),l=o(s,c);if(t&&i!=i){while(c>l)if(a=h[l++],a!=a)return!0}else for(;c>l;l++)if((t||l in h)&&h[l]===i)return t||l||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},"4de4":function(t,e,i){"use strict";var r=i("23e7"),n=i("b727").filter,o=i("1dde"),s=o("filter");r({target:"Array",proto:!0,forced:!s},{filter:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}})},"50c4":function(t,e,i){var r=i("a691"),n=Math.min;t.exports=function(t){return t>0?n(r(t),9007199254740991):0}},5135:function(t,e){var i={}.hasOwnProperty;t.exports=function(t,e){return i.call(t,e)}},5692:function(t,e,i){var r=i("c430"),n=i("c6cd");(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.9.1",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,e,i){var r=i("d066"),n=i("241c"),o=i("7418"),s=i("825a");t.exports=r("Reflect","ownKeys")||function(t){var e=n.f(s(t)),i=o.f;return i?e.concat(i(t)):e}},5899:function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},"58a8":function(t,e,i){var r=i("1d80"),n=i("5899"),o="["+n+"]",s=RegExp("^"+o+o+"*"),a=RegExp(o+o+"*$"),h=function(t){return function(e){var i=String(r(e));return 1&t&&(i=i.replace(s,"")),2&t&&(i=i.replace(a,"")),i}};t.exports={start:h(1),end:h(2),trim:h(3)}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"605d":function(t,e,i){var r=i("c6b6"),n=i("da84");t.exports="process"==r(n.process)},6101:function(t,e,i){"use strict";i("c04a")},6547:function(t,e,i){var r=i("a691"),n=i("1d80"),o=function(t){return function(e,i){var o,s,a=String(n(e)),h=r(i),c=a.length;return h<0||h>=c?t?"":void 0:(o=a.charCodeAt(h),o<55296||o>56319||h+1===c||(s=a.charCodeAt(h+1))<56320||s>57343?t?a.charAt(h):o:t?a.slice(h,h+2):s-56320+(o-55296<<10)+65536)}};t.exports={codeAt:o(!1),charAt:o(!0)}},"65f0":function(t,e,i){var r=i("861d"),n=i("e8b5"),o=i("b622"),s=o("species");t.exports=function(t,e){var i;return n(t)&&(i=t.constructor,"function"!=typeof i||i!==Array&&!n(i.prototype)?r(i)&&(i=i[s],null===i&&(i=void 0)):i=void 0),new(void 0===i?Array:i)(0===e?0:e)}},"69f3":function(t,e,i){var r,n,o,s=i("7f9a"),a=i("da84"),h=i("861d"),c=i("9112"),l=i("5135"),u=i("c6cd"),f=i("f772"),d=i("d012"),g=a.WeakMap,p=function(t){return o(t)?n(t):r(t,{})},v=function(t){return function(e){var i;if(!h(e)||(i=n(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}};if(s){var m=u.state||(u.state=new g),y=m.get,_=m.has,b=m.set;r=function(t,e){return e.facade=t,b.call(m,t,e),e},n=function(t){return y.call(m,t)||{}},o=function(t){return _.call(m,t)}}else{var x=f("state");d[x]=!0,r=function(t,e){return e.facade=t,c(t,x,e),e},n=function(t){return l(t,x)?t[x]:{}},o=function(t){return l(t,x)}}t.exports={set:r,get:n,has:o,enforce:p,getterFor:v}},"6eeb":function(t,e,i){var r=i("da84"),n=i("9112"),o=i("5135"),s=i("ce4e"),a=i("8925"),h=i("69f3"),c=h.get,l=h.enforce,u=String(String).split("String");(t.exports=function(t,e,i,a){var h,c=!!a&&!!a.unsafe,f=!!a&&!!a.enumerable,d=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof e||o(i,"name")||n(i,"name",e),h=l(i),h.source||(h.source=u.join("string"==typeof e?e:""))),t!==r?(c?!d&&t[e]&&(f=!0):delete t[e],f?t[e]=i:n(t,e,i)):f?t[e]=i:s(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||a(this)}))},7156:function(t,e,i){var r=i("861d"),n=i("d2bb");t.exports=function(t,e,i){var o,s;return n&&"function"==typeof(o=e.constructor)&&o!==i&&r(s=o.prototype)&&s!==i.prototype&&n(t,s),t}},7418:function(t,e){e.f=Object.getOwnPropertySymbols},"746f":function(t,e,i){var r=i("428f"),n=i("5135"),o=i("e538"),s=i("9bf2").f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});n(e,t)||s(e,t,{value:o.f(t)})}},7839:function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7a94":function(t,e,i){(function(r){ /*! Fabric.js Copyright 2008-2015, Printio (Juriy Zaytsev, Maxim Chernyak) */ var n=n||{version:"4.3.1"};if(e.fabric=n,"undefined"!==typeof document&&"undefined"!==typeof window)document instanceof("undefined"!==typeof HTMLDocument?HTMLDocument:Document)?n.document=document:n.document=document.implementation.createHTMLDocument(""),n.window=window;else{var o=i(0),s=new o.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;n.document=s.document,n.jsdomImplForWrapper=i(1).implForWrapper,n.nodeCanvas=i(2).Canvas,n.window=s,DOMParser=n.window.DOMParser}function a(t){var e=t.targetCanvas,i=e.width,r=e.height,n=t.destinationWidth,o=t.destinationHeight;i===n&&r===o||(e.width=n,e.height=o)}function h(t,e){var i=t.canvas,r=e.targetCanvas,n=r.getContext("2d");n.translate(0,r.height),n.scale(1,-1);var o=i.height-r.height;n.drawImage(i,0,o,r.width,r.height,0,0,r.width,r.height)}function c(t,e){var i=e.targetCanvas,r=i.getContext("2d"),n=e.destinationWidth,o=e.destinationHeight,s=n*o*4,a=new Uint8Array(this.imageBuffer,0,s),h=new Uint8ClampedArray(this.imageBuffer,0,s);t.readPixels(0,0,n,o,t.RGBA,t.UNSIGNED_BYTE,a);var c=new ImageData(h,n,o);r.putImageData(c,0,0)}n.isTouchSupported="ontouchstart"in n.window||"ontouchstart"in n.document||n.window&&n.window.navigator&&n.window.navigator.maxTouchPoints>0,n.isLikelyNode="undefined"!==typeof r&&"undefined"===typeof window,n.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"],n.DPI=96,n.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",n.commaWsp="(?:\\s+,?\\s*|,\\s*)",n.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi,n.reNonWord=/[ \n\.,;!\?\-]/,n.fontPaths={},n.iMatrix=[1,0,0,1,0,0],n.svgNS="http://www.w3.org/2000/svg",n.perfLimitSizeTotal=2097152,n.maxCacheSideLimit=4096,n.minCacheSideLimit=256,n.charWidthsCache={},n.textureSize=2048,n.disableStyleCopyPaste=!1,n.enableGLFiltering=!0,n.devicePixelRatio=n.window.devicePixelRatio||n.window.webkitDevicePixelRatio||n.window.mozDevicePixelRatio||1,n.browserShadowBlurConstant=1,n.arcToSegmentsCache={},n.boundsOfCurveCache={},n.cachesBoundsOfCurve=!0,n.forceGLPutImageData=!1,n.initFilterBackend=function(){return n.enableGLFiltering&&n.isWebglSupported&&n.isWebglSupported(n.textureSize)?(console.log("max texture size: "+n.maxTextureSize),new n.WebglFilterBackend({tileSize:n.textureSize})):n.Canvas2dFilterBackend?new n.Canvas2dFilterBackend:void 0},"undefined"!==typeof document&&"undefined"!==typeof window&&(window.fabric=n),function(){function t(t,e){if(this.__eventListeners[t]){var i=this.__eventListeners[t];e?i[i.indexOf(e)]=!1:n.util.array.fill(i,!1)}}function e(t,e){if(this.__eventListeners||(this.__eventListeners={}),1===arguments.length)for(var i in t)this.on(i,t[i]);else this.__eventListeners[t]||(this.__eventListeners[t]=[]),this.__eventListeners[t].push(e);return this}function i(e,i){if(!this.__eventListeners)return this;if(0===arguments.length)for(e in this.__eventListeners)t.call(this,e);else if(1===arguments.length&&"object"===typeof arguments[0])for(var r in e)t.call(this,r,e[r]);else t.call(this,e,i);return this}function r(t,e){if(!this.__eventListeners)return this;var i=this.__eventListeners[t];if(!i)return this;for(var r=0,n=i.length;r<n;r++)i[r]&&i[r].call(this,e||{});return this.__eventListeners[t]=i.filter((function(t){return!1!==t})),this}n.Observable={fire:r,on:e,off:i}}(),n.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var t=0,e=arguments.length;t<e;t++)this._onObjectAdded(arguments[t]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(t,e,i){var r=this._objects;return i?r[e]=t:r.splice(e,0,t),this._onObjectAdded&&this._onObjectAdded(t),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var t,e=this._objects,i=!1,r=0,n=arguments.length;r<n;r++)t=e.indexOf(arguments[r]),-1!==t&&(i=!0,e.splice(t,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[r]));return this.renderOnAddRemove&&i&&this.requestRenderAll(),this},forEachObject:function(t,e){for(var i=this.getObjects(),r=0,n=i.length;r<n;r++)t.call(e,i[r],r,i);return this},getObjects:function(t){return"undefined"===typeof t?this._objects.concat():this._objects.filter((function(e){return e.type===t}))},item:function(t){return this._objects[t]},isEmpty:function(){return 0===this._objects.length},size:function(){return this._objects.length},contains:function(t){return this._objects.indexOf(t)>-1},complexity:function(){return this._objects.reduce((function(t,e){return t+=e.complexity?e.complexity():0,t}),0)}},n.CommonMethods={_setOptions:function(t){for(var e in t)this.set(e,t[e])},_initGradient:function(t,e){!t||!t.colorStops||t instanceof n.Gradient||this.set(e,new n.Gradient(t))},_initPattern:function(t,e,i){!t||!t.source||t instanceof n.Pattern?i&&i():this.set(e,new n.Pattern(t,i))},_setObject:function(t){for(var e in t)this._set(e,t[e])},set:function(t,e){return"object"===typeof t?this._setObject(t):this._set(t,e),this},_set:function(t,e){this[t]=e},toggle:function(t){var e=this.get(t);return"boolean"===typeof e&&this.set(t,!e),this},get:function(t){return this[t]}},function(t){var e=Math.sqrt,i=Math.atan2,r=Math.pow,o=Math.PI/180,s=Math.PI/2;n.util={cos:function(t){if(0===t)return 1;t<0&&(t=-t);var e=t/s;switch(e){case 1:case 3:return 0;case 2:return-1}return Math.cos(t)},sin:function(t){if(0===t)return 0;var e=t/s,i=1;switch(t<0&&(i=-1),e){case 1:return i;case 2:return 0;case 3:return-i}return Math.sin(t)},removeFromArray:function(t,e){var i=t.indexOf(e);return-1!==i&&t.splice(i,1),t},getRandomInt:function(t,e){return Math.floor(Math.random()*(e-t+1))+t},degreesToRadians:function(t){return t*o},radiansToDegrees:function(t){return t/o},rotatePoint:function(t,e,i){t.subtractEquals(e);var r=n.util.rotateVector(t,i);return new n.Point(r.x,r.y).addEquals(e)},rotateVector:function(t,e){var i=n.util.sin(e),r=n.util.cos(e),o=t.x*r-t.y*i,s=t.x*i+t.y*r;return{x:o,y:s}},transformPoint:function(t,e,i){return i?new n.Point(e[0]*t.x+e[2]*t.y,e[1]*t.x+e[3]*t.y):new n.Point(e[0]*t.x+e[2]*t.y+e[4],e[1]*t.x+e[3]*t.y+e[5])},makeBoundingBoxFromPoints:function(t,e){if(e)for(var i=0;i<t.length;i++)t[i]=n.util.transformPoint(t[i],e);var r=[t[0].x,t[1].x,t[2].x,t[3].x],o=n.util.array.min(r),s=n.util.array.max(r),a=s-o,h=[t[0].y,t[1].y,t[2].y,t[3].y],c=n.util.array.min(h),l=n.util.array.max(h),u=l-c;return{left:o,top:c,width:a,height:u}},invertTransform:function(t){var e=1/(t[0]*t[3]-t[1]*t[2]),i=[e*t[3],-e*t[1],-e*t[2],e*t[0]],r=n.util.transformPoint({x:t[4],y:t[5]},i,!0);return i[4]=-r.x,i[5]=-r.y,i},toFixed:function(t,e){return parseFloat(Number(t).toFixed(e))},parseUnit:function(t,e){var i=/\D{0,2}$/.exec(t),r=parseFloat(t);switch(e||(e=n.Text.DEFAULT_SVG_FONT_SIZE),i[0]){case"mm":return r*n.DPI/25.4;case"cm":return r*n.DPI/2.54;case"in":return r*n.DPI;case"pt":return r*n.DPI/72;case"pc":return r*n.DPI/72*12;case"em":return r*e;default:return r}},falseFunction:function(){return!1},getKlass:function(t,e){return t=n.util.string.camelize(t.charAt(0).toUpperCase()+t.slice(1)),n.util.resolveNamespace(e)[t]},getSvgAttributes:function(t){var e=["instantiated_by_use","style","id","class"];switch(t){case"linearGradient":e=e.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":e=e.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":e=e.concat(["offset","stop-color","stop-opacity"]);break}return e},resolveNamespace:function(e){if(!e)return n;var i,r=e.split("."),o=r.length,s=t||n.window;for(i=0;i<o;++i)s=s[r[i]];return s},loadImage:function(t,e,i,r){if(t){var o=n.util.createImage(),s=function(){e&&e.call(i,o,!1),o=o.onload=o.onerror=null};o.onload=s,o.onerror=function(){n.log("Error loading "+o.src),e&&e.call(i,null,!0),o=o.onload=o.onerror=null},0!==t.indexOf("data")&&void 0!==r&&null!==r&&(o.crossOrigin=r),"data:image/svg"===t.substring(0,14)&&(o.onload=null,n.util.loadImageInDom(o,s)),o.src=t}else e&&e.call(i,t)},loadImageInDom:function(t,e){var i=n.document.createElement("div");i.style.width=i.style.height="1px",i.style.left=i.style.top="-100%",i.style.position="absolute",i.appendChild(t),n.document.querySelector("body").appendChild(i),t.onload=function(){e(),i.parentNode.removeChild(i),i=null}},enlivenObjects:function(t,e,i,r){t=t||[];var o=[],s=0,a=t.length;function h(){++s===a&&e&&e(o.filter((function(t){return t})))}a?t.forEach((function(t,e){if(t&&t.type){var s=n.util.getKlass(t.type,i);s.fromObject(t,(function(i,n){n||(o[e]=i),r&&r(t,i,n),h()}))}else h()})):e&&e(o)},enlivenPatterns:function(t,e){function i(){++o===s&&e&&e(r)}t=t||[];var r=[],o=0,s=t.length;s?t.forEach((function(t,e){t&&t.source?new n.Pattern(t,(function(t){r[e]=t,i()})):(r[e]=t,i())})):e&&e(r)},groupSVGElements:function(t,e,i){var r;return t&&1===t.length?t[0]:(e&&(e.width&&e.height?e.centerPoint={x:e.width/2,y:e.height/2}:(delete e.width,delete e.height)),r=new n.Group(t,e),"undefined"!==typeof i&&(r.sourcePath=i),r)},populateWithProperties:function(t,e,i){if(i&&"[object Array]"===Object.prototype.toString.call(i))for(var r=0,n=i.length;r<n;r++)i[r]in t&&(e[i[r]]=t[i[r]])},drawDashedLine:function(t,r,n,o,s,a){var h=o-r,c=s-n,l=e(h*h+c*c),u=i(c,h),f=a.length,d=0,g=!0;t.save(),t.translate(r,n),t.moveTo(0,0),t.rotate(u),r=0;while(l>r)r+=a[d++%f],r>l&&(r=l),t[g?"lineTo":"moveTo"](r,0),g=!g;t.restore()},createCanvasElement:function(){return n.document.createElement("canvas")},copyCanvasElement:function(t){var e=n.util.createCanvasElement();return e.width=t.width,e.height=t.height,e.getContext("2d").drawImage(t,0,0),e},toDataURL:function(t,e,i){return t.toDataURL("image/"+e,i)},createImage:function(){return n.document.createElement("img")},multiplyTransformMatrices:function(t,e,i){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],i?0:t[0]*e[4]+t[2]*e[5]+t[4],i?0:t[1]*e[4]+t[3]*e[5]+t[5]]},qrDecompose:function(t){var n=i(t[1],t[0]),s=r(t[0],2)+r(t[1],2),a=e(s),h=(t[0]*t[3]-t[2]*t[1])/a,c=i(t[0]*t[2]+t[1]*t[3],s);return{angle:n/o,scaleX:a,scaleY:h,skewX:c/o,skewY:0,translateX:t[4],translateY:t[5]}},calcRotateMatrix:function(t){if(!t.angle)return n.iMatrix.concat();var e=n.util.degreesToRadians(t.angle),i=n.util.cos(e),r=n.util.sin(e);return[i,r,-r,i,0,0]},calcDimensionsMatrix:function(t){var e="undefined"===typeof t.scaleX?1:t.scaleX,i="undefined"===typeof t.scaleY?1:t.scaleY,r=[t.flipX?-e:e,0,0,t.flipY?-i:i,0,0],o=n.util.multiplyTransformMatrices,s=n.util.degreesToRadians;return t.skewX&&(r=o(r,[1,0,Math.tan(s(t.skewX)),1],!0)),t.skewY&&(r=o(r,[1,Math.tan(s(t.skewY)),0,1],!0)),r},composeMatrix:function(t){var e=[1,0,0,1,t.translateX||0,t.translateY||0],i=n.util.multiplyTransformMatrices;return t.angle&&(e=i(e,n.util.calcRotateMatrix(t))),(1!==t.scaleX||1!==t.scaleY||t.skewX||t.skewY||t.flipX||t.flipY)&&(e=i(e,n.util.calcDimensionsMatrix(t))),e},resetObjectTransform:function(t){t.scaleX=1,t.scaleY=1,t.skewX=0,t.skewY=0,t.flipX=!1,t.flipY=!1,t.rotate(0)},saveObjectTransform:function(t){return{scaleX:t.scaleX,scaleY:t.scaleY,skewX:t.skewX,skewY:t.skewY,angle:t.angle,left:t.left,flipX:t.flipX,flipY:t.flipY,top:t.top}},isTransparent:function(t,e,i,r){r>0&&(e>r?e-=r:e=0,i>r?i-=r:i=0);var n,o,s=!0,a=t.getImageData(e,i,2*r||1,2*r||1),h=a.data.length;for(n=3;n<h;n+=4)if(o=a.data[n],s=o<=0,!1===s)break;return a=null,s},parsePreserveAspectRatioAttribute:function(t){var e,i="meet",r="Mid",n="Mid",o=t.split(" ");return o&&o.length&&(i=o.pop(),"meet"!==i&&"slice"!==i?(e=i,i="meet"):o.length&&(e=o.pop())),r="none"!==e?e.slice(1,4):"none",n="none"!==e?e.slice(5,8):"none",{meetOrSlice:i,alignX:r,alignY:n}},clearFabricFontCache:function(t){t=(t||"").toLowerCase(),t?n.charWidthsCache[t]&&delete n.charWidthsCache[t]:n.charWidthsCache={}},limitDimsByArea:function(t,e){var i=Math.sqrt(e*t),r=Math.floor(e/i);return{x:Math.floor(i),y:r}},capValue:function(t,e,i){return Math.max(t,Math.min(e,i))},findScaleToFit:function(t,e){return Math.min(e.width/t.width,e.height/t.height)},findScaleToCover:function(t,e){return Math.max(e.width/t.width,e.height/t.height)},matrixToSVG:function(t){return"matrix("+t.map((function(t){return n.util.toFixed(t,n.Object.NUM_FRACTION_DIGITS)})).join(" ")+")"},sizeAfterTransform:function(t,e,i){var r=t/2,o=e/2,s=[{x:-r,y:-o},{x:r,y:-o},{x:-r,y:o},{x:r,y:o}],a=n.util.calcDimensionsMatrix(i),h=n.util.makeBoundingBoxFromPoints(s,a);return{x:h.width,y:h.height}}}}(e),function(){var t=Array.prototype.join,e={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},i={m:"l",M:"L"};function r(t,e,i,r,o,s,a,h,c,l,u){var f=n.util.cos(t),d=n.util.sin(t),g=n.util.cos(e),p=n.util.sin(e),v=i*o*g-r*s*p+a,m=r*o*g+i*s*p+h,y=l+c*(-i*o*d-r*s*f),_=u+c*(-r*o*d+i*s*f),b=v+c*(i*o*p+r*s*g),x=m+c*(r*o*p-i*s*g);return["C",y,_,b,x,v,m]}function o(t,e,i,o,a,h,c){var l=Math.PI,u=c*l/180,f=n.util.sin(u),d=n.util.cos(u),g=0,p=0;i=Math.abs(i),o=Math.abs(o);var v=-d*t*.5-f*e*.5,m=-d*e*.5+f*t*.5,y=i*i,_=o*o,b=m*m,x=v*v,C=y*_-y*b-_*x,S=0;if(C<0){var w=Math.sqrt(1-C/(y*_));i*=w,o*=w}else S=(a===h?-1:1)*Math.sqrt(C/(y*b+_*x));var T=S*i*m/o,O=-S*o*v/i,E=d*T-f*O+.5*t,k=f*T+d*O+.5*e,P=s(1,0,(v-T)/i,(m-O)/o),A=s((v-T)/i,(m-O)/o,(-v-T)/i,(-m-O)/o);0===h&&A>0?A-=2*l:1===h&&A<0&&(A+=2*l);for(var D=Math.ceil(Math.abs(A/l*2)),j=[],M=A/D,I=8/3*Math.sin(M/4)*Math.sin(M/4)/Math.sin(M/2),F=P+M,L=0;L<D;L++)j[L]=r(P,F,d,f,i,o,E,k,I,g,p),g=j[L][5],p=j[L][6],P=F,F+=M;return j}function s(t,e,i,r){var n=Math.atan2(e,t),o=Math.atan2(r,i);return o>=n?o-n:2*Math.PI-(n-o)}function a(e,i,r,o,s,a,h,c){var l;if(n.cachesBoundsOfCurve&&(l=t.call(arguments),n.boundsOfCurveCache[l]))return n.boundsOfCurveCache[l];var u,f,d,g,p,v,m,y,_=Math.sqrt,b=Math.min,x=Math.max,C=Math.abs,S=[],w=[[],[]];f=6*e-12*r+6*s,u=-3*e+9*r-9*s+3*h,d=3*r-3*e;for(var T=0;T<2;++T)if(T>0&&(f=6*i-12*o+6*a,u=-3*i+9*o-9*a+3*c,d=3*o-3*i),C(u)<1e-12){if(C(f)<1e-12)continue;g=-d/f,0<g&&g<1&&S.push(g)}else m=f*f-4*d*u,m<0||(y=_(m),p=(-f+y)/(2*u),0<p&&p<1&&S.push(p),v=(-f-y)/(2*u),0<v&&v<1&&S.push(v));var O,E,k,P=S.length,A=P;while(P--)g=S[P],k=1-g,O=k*k*k*e+3*k*k*g*r+3*k*g*g*s+g*g*g*h,w[0][P]=O,E=k*k*k*i+3*k*k*g*o+3*k*g*g*a+g*g*g*c,w[1][P]=E;w[0][A]=e,w[1][A]=i,w[0][A+1]=h,w[1][A+1]=c;var D=[{x:b.apply(null,w[0]),y:b.apply(null,w[1])},{x:x.apply(null,w[0]),y:x.apply(null,w[1])}];return n.cachesBoundsOfCurve&&(n.boundsOfCurveCache[l]=D),D}function h(t,e,i){for(var r=i[1],n=i[2],s=i[3],a=i[4],h=i[5],c=i[6],l=i[7],u=o(c-t,l-e,r,n,a,h,s),f=0,d=u.length;f<d;f++)u[f][1]+=t,u[f][2]+=e,u[f][3]+=t,u[f][4]+=e,u[f][5]+=t,u[f][6]+=e;return u}function c(t){var e,i,r,n,o,s,a=0,c=0,l=t.length,u=0,f=0,d=[];for(i=0;i<l;++i){switch(r=!1,e=t[i].slice(0),e[0]){case"l":e[0]="L",e[1]+=a,e[2]+=c;case"L":a=e[1],c=e[2];break;case"h":e[1]+=a;case"H":e[0]="L",e[2]=c,a=e[1];break;case"v":e[1]+=c;case"V":e[0]="L",c=e[1],e[1]=a,e[2]=c;break;case"m":e[0]="M",e[1]+=a,e[2]+=c;case"M":a=e[1],c=e[2],u=e[1],f=e[2];break;case"c":e[0]="C",e[1]+=a,e[2]+=c,e[3]+=a,e[4]+=c,e[5]+=a,e[6]+=c;case"C":o=e[3],s=e[4],a=e[5],c=e[6];break;case"s":e[0]="S",e[1]+=a,e[2]+=c,e[3]+=a,e[4]+=c;case"S":"C"===n?(o=2*a-o,s=2*c-s):(o=a,s=c),a=e[3],c=e[4],e[0]="C",e[5]=e[3],e[6]=e[4],e[3]=e[1],e[4]=e[2],e[1]=o,e[2]=s,o=e[3],s=e[4];break;case"q":e[0]="Q",e[1]+=a,e[2]+=c,e[3]+=a,e[4]+=c;case"Q":o=e[1],s=e[2],a=e[3],c=e[4];break;case"t":e[0]="T",e[1]+=a,e[2]+=c;case"T":"Q"===n?(o=2*a-o,s=2*c-s):(o=a,s=c),e[0]="Q",a=e[1],c=e[2],e[1]=o,e[2]=s,e[3]=a,e[4]=c;break;case"a":e[0]="A",e[6]+=a,e[7]+=c;case"A":r=!0,d=d.concat(h(a,c,e)),a=e[6],c=e[7];break;case"z":case"Z":a=u,c=f;break;default:}r||d.push(e),n=e[0]}return d}function l(t,e,i,r){return Math.sqrt((i-t)*(i-t)+(r-e)*(r-e))}function u(t){return t*t*t}function f(t){return 3*t*t*(1-t)}function d(t){return 3*t*(1-t)*(1-t)}function g(t){return(1-t)*(1-t)*(1-t)}function p(t,e,i,r,n,o,s,a){return function(h){var c=u(h),l=f(h),p=d(h),v=g(h);return{x:s*c+n*l+i*p+t*v,y:a*c+o*l+r*p+e*v}}}function v(t,e,i,r,n,o,s,a){return function(h){var c=1-h,l=3*c*c*(i-t)+6*c*h*(n-i)+3*h*h*(s-n),u=3*c*c*(r-e)+6*c*h*(o-r)+3*h*h*(a-o);return Math.atan2(u,l)}}function m(t){return t*t}function y(t){return 2*t*(1-t)}function _(t){return(1-t)*(1-t)}function b(t,e,i,r,n,o){return function(s){var a=m(s),h=y(s),c=_(s);return{x:n*a+i*h+t*c,y:o*a+r*h+e*c}}}function x(t,e,i,r,n,o){return function(s){var a=1-s,h=2*a*(i-t)+2*s*(n-i),c=2*a*(r-e)+2*s*(o-r);return Math.atan2(c,h)}}function C(t,e,i){var r,n,o={x:e,y:i},s=0;for(n=.01;n<=1;n+=.01)r=t(n),s+=l(o.x,o.y,r.x,r.y),o=r;return s}function S(t,e){var i,r,n,o=0,s=0,a=t.iterator,h={x:t.x,y:t.y},c=.01,u=t.angleFinder;while(s<e&&o<=1&&c>1e-4)i=a(o),n=o,r=l(h.x,h.y,i.x,i.y),r+s>e?(c/=2,o-=c):(h=i,o+=c,s+=r);return i.angle=u(n),i}function w(t){for(var e,i,r,n,o=0,s=t.length,a=0,h=0,c=0,u=0,f=[],d=0;d<s;d++){switch(e=t[d],r={x:a,y:h,command:e[0]},e[0]){case"M":r.length=0,c=a=e[1],u=h=e[2];break;case"L":r.length=l(a,h,e[1],e[2]),a=e[1],h=e[2];break;case"C":i=p(a,h,e[1],e[2],e[3],e[4],e[5],e[6]),n=v(a,h,e[1],e[2],e[3],e[4],e[5],e[6]),r.iterator=i,r.angleFinder=n,r.length=C(i,a,h),a=e[5],h=e[6];break;case"Q":i=b(a,h,e[1],e[2],e[3],e[4]),n=x(a,h,e[1],e[2],e[3],e[4]),r.iterator=i,r.angleFinder=n,r.length=C(i,a,h),a=e[3],h=e[4];break;case"Z":case"z":r.destX=c,r.destY=u,r.length=l(a,h,c,u),a=c,h=u;break}o+=r.length,f.push(r)}return f.push({length:o,x:a,y:h}),f}function T(t,e,i){i||(i=w(t));var r=0;while(e-i[r].length>0&&r<i.length-2)e-=i[r].length,r++;var o,s=i[r],a=e/s.length,h=s.command,c=t[r];switch(h){case"M":return{x:s.x,y:s.y,angle:0};case"Z":case"z":return o=new n.Point(s.x,s.y).lerp(new n.Point(s.destX,s.destY),a),o.angle=Math.atan2(s.destY-s.y,s.destX-s.x),o;case"L":return o=new n.Point(s.x,s.y).lerp(new n.Point(c[1],c[2]),a),o.angle=Math.atan2(c[2]-s.y,c[1]-s.x),o;case"C":return S(s,e);case"Q":return S(s,e)}}function O(t){var r,o,s,a,h,c=[],l=[],u=n.rePathCommand,f="[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*",d="("+f+")"+n.commaWsp,g="([01])"+n.commaWsp+"?",p=d+"?"+d+"?"+d+g+g+d+"?("+f+")",v=new RegExp(p,"g");if(!t||!t.match)return c;h=t.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);for(var m,y=0,_=h.length;y<_;y++){r=h[y],a=r.slice(1).trim(),l.length=0;var b=r.charAt(0);if(m=[b],"a"===b.toLowerCase())for(var x;x=v.exec(a);)for(var C=1;C<x.length;C++)l.push(x[C]);else while(s=u.exec(a))l.push(s[0]);C=0;for(var S=l.length;C<S;C++)o=parseFloat(l[C]),isNaN(o)||m.push(o);var w=e[b.toLowerCase()],T=i[b]||b;if(m.length-1>w)for(var O=1,E=m.length;O<E;O+=w)c.push([b].concat(m.slice(O,O+w))),b=T;else c.push(m)}return c}function E(t,e,i,r,n,s,h,c,l){for(var u,f=0,d=0,g=[],p=o(c-t,l-e,i,r,s,h,n),v=0,m=p.length;v<m;v++)u=a(f,d,p[v][1],p[v][2],p[v][3],p[v][4],p[v][5],p[v][6]),g.push({x:u[0].x+t,y:u[0].y+e}),g.push({x:u[1].x+t,y:u[1].y+e}),f=p[v][5],d=p[v][6];return g}function k(t,e,i,r){r=r.slice(0).unshift("X");var n=h(e,i,r);n.forEach((function(e){t.bezierCurveTo.apply(t,e.slice(1))}))}n.util.parsePath=O,n.util.makePathSimpler=c,n.util.getPathSegmentsInfo=w,n.util.fromArcToBeziers=h,n.util.fromArcToBeizers=h,n.util.getBoundsOfCurve=a,n.util.getPointOnPath=T,n.util.getBoundsOfArc=E,n.util.drawArc=k}(),function(){var t=Array.prototype.slice;function e(e,i){for(var r=t.call(arguments,2),n=[],o=0,s=e.length;o<s;o++)n[o]=r.length?e[o][i].apply(e[o],r):e[o][i].call(e[o]);return n}function i(t,e){return s(t,e,(function(t,e){return t>=e}))}function r(t,e){return s(t,e,(function(t,e){return t<e}))}function o(t,e){var i=t.length;while(i--)t[i]=e;return t}function s(t,e,i){if(t&&0!==t.length){var r=t.length-1,n=e?t[r][e]:t[r];if(e)while(r--)i(t[r][e],n)&&(n=t[r][e]);else while(r--)i(t[r],n)&&(n=t[r]);return n}}n.util.array={fill:o,invoke:e,min:r,max:i}}(),function(){function t(e,i,r){if(r)if(!n.isLikelyNode&&i instanceof Element)e=i;else if(i instanceof Array){e=[];for(var o=0,s=i.length;o<s;o++)e[o]=t({},i[o],r)}else if(i&&"object"===typeof i)for(var a in i)"canvas"===a||"group"===a?e[a]=null:i.hasOwnProperty(a)&&(e[a]=t({},i[a],r));else e=i;else for(var a in i)e[a]=i[a];return e}function e(e,i){return t({},e,i)}n.util.object={extend:t,clone:e},n.util.object.extend(n.util,n.Observable)}(),function(){function t(t){return t.replace(/-+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))}function e(t,e){return t.charAt(0).toUpperCase()+(e?t.slice(1):t.slice(1).toLowerCase())}function i(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r(t){var e,i=0,r=[];for(i=0,e;i<t.length;i++)!1!==(e=o(t,i))&&r.push(e);return r}function o(t,e){var i=t.charCodeAt(e);if(isNaN(i))return"";if(i<55296||i>57343)return t.charAt(e);if(55296<=i&&i<=56319){if(t.length<=e+1)throw"High surrogate without following low surrogate";var r=t.charCodeAt(e+1);if(56320>r||r>57343)throw"High surrogate without following low surrogate";return t.charAt(e)+t.charAt(e+1)}if(0===e)throw"Low surrogate without preceding high surrogate";var n=t.charCodeAt(e-1);if(55296>n||n>56319)throw"Low surrogate without preceding high surrogate";return!1}n.util.string={camelize:t,capitalize:e,escapeXml:i,graphemeSplit:r}}(),function(){var t=Array.prototype.slice,e=function(){},i=function(){for(var t in{toString:1})if("toString"===t)return!1;return!0}(),r=function(t,e,r){for(var n in e)n in t.prototype&&"function"===typeof t.prototype[n]&&(e[n]+"").indexOf("callSuper")>-1?t.prototype[n]=function(t){return function(){var i=this.constructor.superclass;this.constructor.superclass=r;var n=e[t].apply(this,arguments);if(this.constructor.superclass=i,"initialize"!==t)return n}}(n):t.prototype[n]=e[n],i&&(e.toString!==Object.prototype.toString&&(t.prototype.toString=e.toString),e.valueOf!==Object.prototype.valueOf&&(t.prototype.valueOf=e.valueOf))};function o(){}function s(e){var i=null,r=this;while(r.constructor.superclass){var n=r.constructor.superclass.prototype[e];if(r[e]!==n){i=n;break}r=r.constructor.superclass.prototype}return i?arguments.length>1?i.apply(this,t.call(arguments,1)):i.call(this):console.log("tried to callSuper "+e+", method not found in prototype chain",this)}function a(){var i=null,n=t.call(arguments,0);function a(){this.initialize.apply(this,arguments)}"function"===typeof n[0]&&(i=n.shift()),a.superclass=i,a.subclasses=[],i&&(o.prototype=i.prototype,a.prototype=new o,i.subclasses.push(a));for(var h=0,c=n.length;h<c;h++)r(a,n[h],i);return a.prototype.initialize||(a.prototype.initialize=e),a.prototype.constructor=a,a.prototype.callSuper=s,a}n.util.createClass=a}(),function(){var t=!!n.document.createElement("div").attachEvent,e=["touchstart","touchmove","touchend"];function i(t){var e=t.changedTouches;return e&&e[0]?e[0]:t}n.util.addListener=function(e,i,r,n){e&&e.addEventListener(i,r,!t&&n)},n.util.removeListener=function(e,i,r,n){e&&e.removeEventListener(i,r,!t&&n)},n.util.getPointer=function(t){var e=t.target,r=n.util.getScrollLeftTop(e),o=i(t);return{x:o.clientX+r.left,y:o.clientY+r.top}},n.util.isTouchEvent=function(t){return e.indexOf(t.type)>-1||"touch"===t.pointerType}}(),function(){function t(t,e){var i=t.style;if(!i)return t;if("string"===typeof e)return t.style.cssText+=";"+e,e.indexOf("opacity")>-1?s(t,e.match(/opacity:\s*(\d?\.?\d*)/)[1]):t;for(var r in e)if("opacity"===r)s(t,e[r]);else{var n="float"===r||"cssFloat"===r?"undefined"===typeof i.styleFloat?"cssFloat":"styleFloat":r;i[n]=e[r]}return t}var e=n.document.createElement("div"),i="string"===typeof e.style.opacity,r="string"===typeof e.style.filter,o=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,s=function(t){return t};i?s=function(t,e){return t.style.opacity=e,t}:r&&(s=function(t,e){var i=t.style;return t.currentStyle&&!t.currentStyle.hasLayout&&(i.zoom=1),o.test(i.filter)?(e=e>=.9999?"":"alpha(opacity="+100*e+")",i.filter=i.filter.replace(o,e)):i.filter+=" alpha(opacity="+100*e+")",t}),n.util.setStyle=t}(),function(){var t=Array.prototype.slice;function e(t){return"string"===typeof t?n.document.getElementById(t):t}var i,r,o=function(e){return t.call(e,0)};try{i=o(n.document.childNodes)instanceof Array}catch(g){}function s(t,e){var i=n.document.createElement(t);for(var r in e)"class"===r?i.className=e[r]:"for"===r?i.htmlFor=e[r]:i.setAttribute(r,e[r]);return i}function a(t,e){t&&-1===(" "+t.className+" ").indexOf(" "+e+" ")&&(t.className+=(t.className?" ":"")+e)}function h(t,e,i){return"string"===typeof e&&(e=s(e,i)),t.parentNode&&t.parentNode.replaceChild(e,t),e.appendChild(t),e}function c(t){var e=0,i=0,r=n.document.documentElement,o=n.document.body||{scrollLeft:0,scrollTop:0};while(t&&(t.parentNode||t.host))if(t=t.parentNode||t.host,t===n.document?(e=o.scrollLeft||r.scrollLeft||0,i=o.scrollTop||r.scrollTop||0):(e+=t.scrollLeft||0,i+=t.scrollTop||0),1===t.nodeType&&"fixed"===t.style.position)break;return{left:e,top:i}}function l(t){var e,i,n=t&&t.ownerDocument,o={left:0,top:0},s={left:0,top:0},a={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!n)return s;for(var h in a)s[a[h]]+=parseInt(r(t,h),10)||0;return e=n.documentElement,"undefined"!==typeof t.getBoundingClientRect&&(o=t.getBoundingClientRect()),i=c(t),{left:o.left+i.left-(e.clientLeft||0)+s.left,top:o.top+i.top-(e.clientTop||0)+s.top}}function u(t){var e=n.jsdomImplForWrapper(t);return e._canvas||e._image}function f(t){if(n.isLikelyNode){var e=n.jsdomImplForWrapper(t);e&&(e._image=null,e._canvas=null,e._currentSrc=null,e._attributes=null,e._classList=null)}}function d(t,e){t.imageSmoothingEnabled=t.imageSmoothingEnabled||t.webkitImageSmoothingEnabled||t.mozImageSmoothingEnabled||t.msImageSmoothingEnabled||t.oImageSmoothingEnabled,t.imageSmoothingEnabled=e}i||(o=function(t){var e=new Array(t.length),i=t.length;while(i--)e[i]=t[i];return e}),r=n.document.defaultView&&n.document.defaultView.getComputedStyle?function(t,e){var i=n.document.defaultView.getComputedStyle(t,null);return i?i[e]:void 0}:function(t,e){var i=t.style[e];return!i&&t.currentStyle&&(i=t.currentStyle[e]),i},function(){var t=n.document.documentElement.style,e="userSelect"in t?"userSelect":"MozUserSelect"in t?"MozUserSelect":"WebkitUserSelect"in t?"WebkitUserSelect":"KhtmlUserSelect"in t?"KhtmlUserSelect":"";function i(t){return"undefined"!==typeof t.onselectstart&&(t.onselectstart=n.util.falseFunction),e?t.style[e]="none":"string"===typeof t.unselectable&&(t.unselectable="on"),t}function r(t){return"undefined"!==typeof t.onselectstart&&(t.onselectstart=null),e?t.style[e]="":"string"===typeof t.unselectable&&(t.unselectable=""),t}n.util.makeElementUnselectable=i,n.util.makeElementSelectable=r}(),n.util.setImageSmoothing=d,n.util.getById=e,n.util.toArray=o,n.util.addClass=a,n.util.makeElement=s,n.util.wrapElement=h,n.util.getScrollLeftTop=c,n.util.getElementOffset=l,n.util.getNodeCanvas=u,n.util.cleanUpJsdomNode=f}(),function(){function t(t,e){return t+(/\?/.test(t)?"&":"?")+e}function e(){}function i(i,r){r||(r={});var o=r.method?r.method.toUpperCase():"GET",s=r.onComplete||function(){},a=new n.window.XMLHttpRequest,h=r.body||r.parameters;return a.onreadystatechange=function(){4===a.readyState&&(s(a),a.onreadystatechange=e)},"GET"===o&&(h=null,"string"===typeof r.parameters&&(i=t(i,r.parameters))),a.open(o,i,!0),"POST"!==o&&"PUT"!==o||a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.send(h),a}n.util.request=i}(),n.log=console.log,n.warn=console.warn,function(){function t(){return!1}function e(t,e,i,r){return-i*Math.cos(t/r*(Math.PI/2))+i+e}function i(i){s((function(r){i||(i={});var n,o=r||+new Date,a=i.duration||500,h=o+a,c=i.onChange||t,l=i.abort||t,u=i.onComplete||t,f=i.easing||e,d="startValue"in i?i.startValue:0,g="endValue"in i?i.endValue:100,p=i.byValue||g-d;i.onStart&&i.onStart(),function t(e){n=e||+new Date;var i=n>h?a:n-o,r=i/a,v=f(i,d,p,a),m=Math.abs((v-d)/p);if(!l())return n>h?(c(g,1,1),void u(g,1,1)):(c(v,m,r),void s(t));u(g,1,1)}(o)}))}var r=n.window.requestAnimationFrame||n.window.webkitRequestAnimationFrame||n.window.mozRequestAnimationFrame||n.window.oRequestAnimationFrame||n.window.msRequestAnimationFrame||function(t){return n.window.setTimeout(t,1e3/60)},o=n.window.cancelAnimationFrame||n.window.clearTimeout;function s(){return r.apply(n.window,arguments)}function a(){return o.apply(n.window,arguments)}n.util.animate=i,n.util.requestAnimFrame=s,n.util.cancelAnimFrame=a}(),function(){function t(t,e,i){var r="rgba("+parseInt(t[0]+i*(e[0]-t[0]),10)+","+parseInt(t[1]+i*(e[1]-t[1]),10)+","+parseInt(t[2]+i*(e[2]-t[2]),10);return r+=","+(t&&e?parseFloat(t[3]+i*(e[3]-t[3])):1),r+=")",r}function e(e,i,r,o){var s=new n.Color(e).getSource(),a=new n.Color(i).getSource(),h=o.onComplete,c=o.onChange;o=o||{},n.util.animate(n.util.object.extend(o,{duration:r||500,startValue:s,endValue:a,byValue:a,easing:function(e,i,r,n){var s=o.colorEasing?o.colorEasing(e,n):1-Math.cos(e/n*(Math.PI/2));return t(i,r,s)},onComplete:function(e,i,r){if(h)return h(t(a,a,0),i,r)},onChange:function(e,i,r){if(c){if(Array.isArray(e))return c(t(e,e,0),i,r);c(e,i,r)}}}))}n.util.animateColor=e}(),function(){function t(t,e,i,r){return t<Math.abs(e)?(t=e,r=i/4):r=0===e&&0===t?i/(2*Math.PI)*Math.asin(1):i/(2*Math.PI)*Math.asin(e/t),{a:t,c:e,p:i,s:r}}function e(t,e,i){return t.a*Math.pow(2,10*(e-=1))*Math.sin((e*i-t.s)*(2*Math.PI)/t.p)}function i(t,e,i,r){return i*((t=t/r-1)*t*t+1)+e}function r(t,e,i,r){return t/=r/2,t<1?i/2*t*t*t+e:i/2*((t-=2)*t*t+2)+e}function o(t,e,i,r){return i*(t/=r)*t*t*t+e}function s(t,e,i,r){return-i*((t=t/r-1)*t*t*t-1)+e}function a(t,e,i,r){return t/=r/2,t<1?i/2*t*t*t*t+e:-i/2*((t-=2)*t*t*t-2)+e}function h(t,e,i,r){return i*(t/=r)*t*t*t*t+e}function c(t,e,i,r){return i*((t=t/r-1)*t*t*t*t+1)+e}function l(t,e,i,r){return t/=r/2,t<1?i/2*t*t*t*t*t+e:i/2*((t-=2)*t*t*t*t+2)+e}function u(t,e,i,r){return-i*Math.cos(t/r*(Math.PI/2))+i+e}function f(t,e,i,r){return i*Math.sin(t/r*(Math.PI/2))+e}function d(t,e,i,r){return-i/2*(Math.cos(Math.PI*t/r)-1)+e}function g(t,e,i,r){return 0===t?e:i*Math.pow(2,10*(t/r-1))+e}function p(t,e,i,r){return t===r?e+i:i*(1-Math.pow(2,-10*t/r))+e}function v(t,e,i,r){return 0===t?e:t===r?e+i:(t/=r/2,t<1?i/2*Math.pow(2,10*(t-1))+e:i/2*(2-Math.pow(2,-10*--t))+e)}function m(t,e,i,r){return-i*(Math.sqrt(1-(t/=r)*t)-1)+e}function y(t,e,i,r){return i*Math.sqrt(1-(t=t/r-1)*t)+e}function _(t,e,i,r){return t/=r/2,t<1?-i/2*(Math.sqrt(1-t*t)-1)+e:i/2*(Math.sqrt(1-(t-=2)*t)+1)+e}function b(i,r,n,o){var s=1.70158,a=0,h=n;if(0===i)return r;if(i/=o,1===i)return r+n;a||(a=.3*o);var c=t(h,n,a,s);return-e(c,i,o)+r}function x(e,i,r,n){var o=1.70158,s=0,a=r;if(0===e)return i;if(e/=n,1===e)return i+r;s||(s=.3*n);var h=t(a,r,s,o);return h.a*Math.pow(2,-10*e)*Math.sin((e*n-h.s)*(2*Math.PI)/h.p)+h.c+i}function C(i,r,n,o){var s=1.70158,a=0,h=n;if(0===i)return r;if(i/=o/2,2===i)return r+n;a||(a=o*(.3*1.5));var c=t(h,n,a,s);return i<1?-.5*e(c,i,o)+r:c.a*Math.pow(2,-10*(i-=1))*Math.sin((i*o-c.s)*(2*Math.PI)/c.p)*.5+c.c+r}function S(t,e,i,r,n){return void 0===n&&(n=1.70158),i*(t/=r)*t*((n+1)*t-n)+e}function w(t,e,i,r,n){return void 0===n&&(n=1.70158),i*((t=t/r-1)*t*((n+1)*t+n)+1)+e}function T(t,e,i,r,n){return void 0===n&&(n=1.70158),t/=r/2,t<1?i/2*(t*t*((1+(n*=1.525))*t-n))+e:i/2*((t-=2)*t*((1+(n*=1.525))*t+n)+2)+e}function O(t,e,i,r){return i-E(r-t,0,i,r)+e}function E(t,e,i,r){return(t/=r)<1/2.75?i*(7.5625*t*t)+e:t<2/2.75?i*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?i*(7.5625*(t-=2.25/2.75)*t+.9375)+e:i*(7.5625*(t-=2.625/2.75)*t+.984375)+e}function k(t,e,i,r){return t<r/2?.5*O(2*t,0,i,r)+e:.5*E(2*t-r,0,i,r)+.5*i+e}n.util.ease={easeInQuad:function(t,e,i,r){return i*(t/=r)*t+e},easeOutQuad:function(t,e,i,r){return-i*(t/=r)*(t-2)+e},easeInOutQuad:function(t,e,i,r){return t/=r/2,t<1?i/2*t*t+e:-i/2*(--t*(t-2)-1)+e},easeInCubic:function(t,e,i,r){return i*(t/=r)*t*t+e},easeOutCubic:i,easeInOutCubic:r,easeInQuart:o,easeOutQuart:s,easeInOutQuart:a,easeInQuint:h,easeOutQuint:c,easeInOutQuint:l,easeInSine:u,easeOutSine:f,easeInOutSine:d,easeInExpo:g,easeOutExpo:p,easeInOutExpo:v,easeInCirc:m,easeOutCirc:y,easeInOutCirc:_,easeInElastic:b,easeOutElastic:x,easeInOutElastic:C,easeInBack:S,easeOutBack:w,easeInOutBack:T,easeInBounce:O,easeOutBounce:E,easeInOutBounce:k}}(),function(t){"use strict";var e=t.fabric||(t.fabric={}),i=e.util.object.extend,r=e.util.object.clone,n=e.util.toFixed,o=e.util.parseUnit,s=e.util.multiplyTransformMatrices,a=["path","circle","polygon","polyline","ellipse","rect","line","image","text"],h=["symbol","image","marker","pattern","view","svg"],c=["pattern","defs","symbol","metadata","clipPath","mask","desc"],l=["symbol","g","a","svg","clipPath","defs"],u={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"},f={stroke:"strokeOpacity",fill:"fillOpacity"},d="font-size",g="clip-path";function p(t){return t in u?u[t]:t}function v(t,i,r,n){var a,h="[object Array]"===Object.prototype.toString.call(i);if("fill"!==t&&"stroke"!==t||"none"!==i){if("strokeUniform"===t)return"non-scaling-stroke"===i;if("strokeDashArray"===t)i="none"===i?null:i.replace(/,/g," ").split(/\s+/).map(parseFloat);else if("transformMatrix"===t)i=r&&r.transformMatrix?s(r.transformMatrix,e.parseTransformAttribute(i)):e.parseTransformAttribute(i);else if("visible"===t)i="none"!==i&&"hidden"!==i,r&&!1===r.visible&&(i=!1);else if("opacity"===t)i=parseFloat(i),r&&"undefined"!==typeof r.opacity&&(i*=r.opacity);else if("textAnchor"===t)i="start"===i?"left":"end"===i?"right":"center";else if("charSpacing"===t)a=o(i,n)/n*1e3;else if("paintFirst"===t){var c=i.indexOf("fill"),l=i.indexOf("stroke");i="fill";(c>-1&&l>-1&&l<c||-1===c&&l>-1)&&(i="stroke")}else{if("href"===t||"xlink:href"===t||"font"===t)return i;if("imageSmoothing"===t)return"optimizeQuality"===i;a=h?i.map(o):o(i,n)}}else i="";return!h&&isNaN(a)?i:a}function m(t){return new RegExp("^("+t.join("|")+")\\b","i")}function y(t){for(var i in f)if("undefined"!==typeof t[f[i]]&&""!==t[i]){if("undefined"===typeof t[i]){if(!e.Object.prototype[i])continue;t[i]=e.Object.prototype[i]}if(0!==t[i].indexOf("url(")){var r=new e.Color(t[i]);t[i]=r.setAlpha(n(r.getAlpha()*t[f[i]],2)).toRgba()}}return t}function _(t,e){var i,r,n,o,s=[];for(n=0,o=e.length;n<o;n++)i=e[n],r=t.getElementsByTagName(i),s=s.concat(Array.prototype.slice.call(r));return s}function b(t,e){var i,r;t.replace(/;\s*$/,"").split(";").forEach((function(t){var n=t.split(":");i=n[0].trim().toLowerCase(),r=n[1].trim(),e[i]=r}))}function x(t,e){var i,r;for(var n in t)"undefined"!==typeof t[n]&&(i=n.toLowerCase(),r=t[n],e[i]=r)}function C(t,i){var r={};for(var n in e.cssRules[i])if(S(t,n.split(" ")))for(var o in e.cssRules[i][n])r[o]=e.cssRules[i][n][o];return r}function S(t,e){var i,r=!0;return i=T(t,e.pop()),i&&e.length&&(r=w(t,e)),i&&r&&0===e.length}function w(t,e){var i,r=!0;while(t.parentNode&&1===t.parentNode.nodeType&&e.length)r&&(i=e.pop()),t=t.parentNode,r=T(t,i);return 0===e.length}function T(t,e){var i,r,n=t.nodeName,o=t.getAttribute("class"),s=t.getAttribute("id");if(i=new RegExp("^"+n,"i"),e=e.replace(i,""),s&&e.length&&(i=new RegExp("#"+s+"(?![a-zA-Z\\-]+)","i"),e=e.replace(i,"")),o&&e.length)for(o=o.split(" "),r=o.length;r--;)i=new RegExp("\\."+o[r]+"(?![a-zA-Z\\-]+)","i"),e=e.replace(i,"");return 0===e.length}function O(t,e){var i;if(t.getElementById&&(i=t.getElementById(e)),i)return i;var r,n,o,s=t.getElementsByTagName("*");for(n=0,o=s.length;n<o;n++)if(r=s[n],e===r.getAttribute("id"))return r}function E(t){var i=_(t,["use","svg:use"]),r=0;while(i.length&&r<i.length){var n,o,s,a,h,c=i[r],l=(c.getAttribute("xlink:href")||c.getAttribute("href")).substr(1),u=c.getAttribute("x")||0,f=c.getAttribute("y")||0,d=O(t,l).cloneNode(!0),g=(d.getAttribute("transform")||"")+" translate("+u+", "+f+")",p=i.length,v=e.svgNS;if(P(d),/^svg$/i.test(d.nodeName)){var m=d.ownerDocument.createElementNS(v,"g");for(s=0,a=d.attributes,h=a.length;s<h;s++)o=a.item(s),m.setAttributeNS(v,o.nodeName,o.nodeValue);while(d.firstChild