vue-fabric-wrapper
Version:
vue wrapper for fabricjs
3 lines • 408 kB
JavaScript
(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){},"00ee":function(t,e,i){var r=i("b622"),n=r("toStringTag"),o={};o[n]="z",t.exports="[object z]"===String(o)},"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"),c=i("5135"),h=i("0cfb"),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=s(t),e=a(e,!0),h)try{return l(t,e)}catch(i){}if(c(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"),c=i("8aa5"),h=i("50c4"),l=i("14c3"),u=i("9263"),f=i("d039"),d=[].push,p=Math.min,g=4294967295,v=!f((function(){return!RegExp(g,"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?g:i>>>0;if(0===o)return[];if(void 0===t)return[r];if(!n(t))return e.call(r,t,o);var a,c,h,l=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),p=0,v=new RegExp(t.source,f+"g");while(a=u.call(v,r)){if(c=v.lastIndex,c>p&&(l.push(r.slice(p,a.index)),a.length>1&&a.index<r.length&&d.apply(l,a.slice(1)),h=a[0].length,p=c,l.length>=o))break;v.lastIndex===a.index&&v.lastIndex++}return p===r.length?!h&&v.test("")||l.push(""):l.push(r.slice(p)),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"),b=new d(v?u:"^(?:"+u.source+")",y),_=void 0===n?g:n>>>0;if(0===_)return[];if(0===f.length)return null===l(b,f)?[f]:[];var x=0,S=0,C=[];while(S<f.length){b.lastIndex=v?S:0;var w,T=l(b,v?f:f.slice(S));if(null===T||(w=p(h(b.lastIndex+(v?0:S)),f.length))===x)S=c(f,S,m);else{if(C.push(f.slice(x,S)),C.length===_)return C;for(var O=1;O<=T.length-1;O++)if(C.push(T[O]),C.length===_)return C;S=x=w}}return C.push(f.slice(x)),C}]}),!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 c=r[a],h=c&&c.prototype;if(h&&h.forEach!==o)try{s(h,"forEach",o)}catch(l){h.forEach=o}}},"17c2":function(t,e,i){"use strict";var r=i("b727").forEach,n=i("a640"),o=i("ae40"),s=n("forEach"),a=o("forEach");t.exports=s&&a?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},"19aa":function(t,e){t.exports=function(t,e,i){if(!(t instanceof e))throw TypeError("Incorrect "+(i?i+" ":"")+"invocation");return t}},"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}},"1c7e":function(t,e,i){var r=i("b622"),n=r("iterator"),o=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){o=!0}};a[n]=function(){return this},Array.from(a,(function(){throw 2}))}catch(c){}t.exports=function(t,e){if(!e&&!o)return!1;var i=!1;try{var r={};r[n]=function(){return{next:function(){return{done:i=!0}}}},t(r)}catch(c){}return i}},"1cdc":function(t,e,i){var r=i("342f");t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},"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=g;for(var r=[],n=[],o="undefined"!==typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,c=s.length;a<c;++a)r[a]=s[a],n[s.charCodeAt(a)]=a;function h(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=h(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=h(t),s=r[0],a=r[1],c=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)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===a&&(e=n[t.charCodeAt(i)]<<2|n[t.charCodeAt(i+1)]>>4,c[l++]=255&e),1===a&&(e=n[t.charCodeAt(i)]<<10|n[t.charCodeAt(i+1)]<<4|n[t.charCodeAt(i+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c}function d(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function p(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 g(t){for(var e,i=t.length,n=i%3,o=[],s=16383,a=0,c=i-n;a<c;a+=s)o.push(p(t,a,a+s>c?c: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){},2266:function(t,e,i){var r=i("825a"),n=i("e95a"),o=i("50c4"),s=i("0366"),a=i("35a1"),c=i("9bdd"),h=function(t,e){this.stopped=t,this.result=e},l=t.exports=function(t,e,i,l,u){var f,d,p,g,v,m,y,b=s(e,i,l?2:1);if(u)f=t;else{if(d=a(t),"function"!=typeof d)throw TypeError("Target is not iterable");if(n(d)){for(p=0,g=o(t.length);g>p;p++)if(v=l?b(r(y=t[p])[0],y[1]):b(t[p]),v&&v instanceof h)return v;return new h(!1)}f=d.call(t)}m=f.next;while(!(y=m.call(f)).done)if(v=c(f,b,y.value,l),"object"==typeof v&&v&&v instanceof h)return v;return new h(!1)};l.stop=function(t){return new h(!0,t)}},"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"),c=i("e893"),h=i("94ca");t.exports=function(t,e){var i,l,u,f,d,p,g=t.target,v=t.global,m=t.stat;if(l=v?r:m?r[g]||a(g,{}):(r[g]||{}).prototype,l)for(u in e){if(d=e[u],t.noTargetGet?(p=n(l,u),f=p&&p.value):f=l[u],i=h(v?u:g+(m?".":"#")+u,t.forced),!i&&void 0!==f){if(typeof d===typeof f)continue;c(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)}},2532:function(t,e,i){"use strict";var r=i("23e7"),n=i("5a34"),o=i("1d80"),s=i("ab13");r({target:"String",proto:!0,forced:!s("includes")},{includes:function(t){return!!~String(o(this)).indexOf(n(t),arguments.length>1?arguments[1]:void 0)}})},2626:function(t,e,i){"use strict";var r=i("d066"),n=i("9bf2"),o=i("b622"),s=i("83ab"),a=o("species");t.exports=function(t){var e=r(t),i=n.f;s&&e&&!e[a]&&i(e,a,{configurable:!0,get:function(){return this}})}},"2cf4":function(t,e,i){var r,n,o,s=i("da84"),a=i("d039"),c=i("c6b6"),h=i("0366"),l=i("1be4"),u=i("cc12"),f=i("1cdc"),d=s.location,p=s.setImmediate,g=s.clearImmediate,v=s.process,m=s.MessageChannel,y=s.Dispatch,b=0,_={},x="onreadystatechange",S=function(t){if(_.hasOwnProperty(t)){var e=_[t];delete _[t],e()}},C=function(t){return function(){S(t)}},w=function(t){S(t.data)},T=function(t){s.postMessage(t+"",d.protocol+"//"+d.host)};p&&g||(p=function(t){var e=[],i=1;while(arguments.length>i)e.push(arguments[i++]);return _[++b]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},r(b),b},g=function(t){delete _[t]},"process"==c(v)?r=function(t){v.nextTick(C(t))}:y&&y.now?r=function(t){y.now(C(t))}:m&&!f?(n=new m,o=n.port2,n.port1.onmessage=w,r=h(o.postMessage,o,1)):!s.addEventListener||"function"!=typeof postMessage||s.importScripts||a(T)?r=x in u("script")?function(t){l.appendChild(u("script"))[x]=function(){l.removeChild(this),S(t)}}:function(t){setTimeout(C(t),0)}:(r=T,s.addEventListener("message",w,!1))),t.exports={set:p,clear:g}},"2d00":function(t,e,i){var r,n,o=i("da84"),s=i("342f"),a=o.process,c=a&&a.versions,h=c&&c.v8;h?(r=h.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")||""},"35a1":function(t,e,i){var r=i("f5df"),n=i("3f8c"),o=i("b622"),s=o("iterator");t.exports=function(t){if(void 0!=t)return t[s]||t["@@iterator"]||n[r(t)]}},"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,c=0;while(a>c)n.f(t,i=r[c++],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}},"3ca3":function(t,e,i){"use strict";var r=i("6547").charAt,n=i("69f3"),o=i("7dd0"),s="String Iterator",a=n.set,c=n.getterFor(s);o(String,"String",(function(t){a(this,{type:s,string:String(t),index:0})}),(function(){var t,e=c(this),i=e.string,n=e.index;return n>=i.length?{value:void 0,done:!0}:(t=r(i,n),e.index+=t.length,{value:t,done:!1})}))},"3f8c":function(t,e){t.exports={}},4160:function(t,e,i){"use strict";var r=i("23e7"),n=i("17c2");r({target:"Array",proto:!0,forced:[].forEach!=n},{forEach:n})},"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},"44d2":function(t,e,i){var r=i("b622"),n=i("7c73"),o=i("9bf2"),s=r("unscopables"),a=Array.prototype;void 0==a[s]&&o.f(a,s,{configurable:!0,value:n(null)}),t.exports=function(t){a[s][t]=!0}},"44de":function(t,e,i){var r=i("da84");t.exports=function(t,e){var i=r.console;i&&i.error&&(1===arguments.length?i.error(t):i.error(t,e))}},"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("d039");t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},"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,c=r(e),h=n(c.length),l=o(s,h);if(t&&i!=i){while(h>l)if(a=c[l++],a!=a)return!0}else for(;h>l;l++)if((t||l in c)&&c[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=i("ae40"),a=o("filter"),c=s("filter");r({target:"Array",proto:!0,forced:!a||!c},{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.6.4",mode:r?"pure":"global",copyright:"© 2020 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+"*$"),c=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:c(1),end:c(2),trim:c(3)}},"5a34":function(t,e,i){var r=i("44e7");t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},6101:function(t,e,i){"use strict";var r=i("c04a"),n=i.n(r);n.a},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)),c=r(i),h=a.length;return c<0||c>=h?t?"":void 0:(o=a.charCodeAt(c),o<55296||o>56319||c+1===h||(s=a.charCodeAt(c+1))<56320||s>57343?t?a.charAt(c):o:t?a.slice(c,c+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"),c=i("861d"),h=i("9112"),l=i("5135"),u=i("f772"),f=i("d012"),d=a.WeakMap,p=function(t){return o(t)?n(t):r(t,{})},g=function(t){return function(e){var i;if(!c(e)||(i=n(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}};if(s){var v=new d,m=v.get,y=v.has,b=v.set;r=function(t,e){return b.call(v,t,e),e},n=function(t){return m.call(v,t)||{}},o=function(t){return y.call(v,t)}}else{var _=u("state");f[_]=!0,r=function(t,e){return h(t,_,e),e},n=function(t){return l(t,_)?t[_]:{}},o=function(t){return l(t,_)}}t.exports={set:r,get:n,has:o,enforce:p,getterFor:g}},"6eeb":function(t,e,i){var r=i("da84"),n=i("9112"),o=i("5135"),s=i("ce4e"),a=i("8925"),c=i("69f3"),h=c.get,l=c.enforce,u=String(String).split("String");(t.exports=function(t,e,i,a){var c=!!a&&!!a.unsafe,h=!!a&&!!a.enumerable,f=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof e||o(i,"name")||n(i,"name",e),l(i).source=u.join("string"==typeof e?e:"")),t!==r?(c?!f&&t[e]&&(h=!0):delete t[e],h?t[e]=i:n(t,e,i)):h?t[e]=i:s(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&h(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:"3.6.3"};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 c(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 h(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),c=new Uint8ClampedArray(this.imageBuffer,0,s);t.readPixels(0,0,n,o,t.RGBA,t.UNSIGNED_BYTE,a);var h=new ImageData(c,n,o);r.putImageData(h,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.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={observe:e,stopObserving:i,fire:r,on:e,off:i,trigger:r}}(),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))},_initClipping:function(t){if(t.clipTo&&"string"===typeof t.clipTo){var e=n.util.getFunctionBody(t.clipTo);"undefined"!==typeof e&&(this.clipTo=new Function("ctx",e))}},_setObject:function(t){for(var e in t)this._set(e,t[e])},set:function(t,e){return"object"===typeof t?this._setObject(t):"function"===typeof e&&"clipTo"!==t?this._set(t,e(this.get(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,c=[t[0].y,t[1].y,t[2].y,t[3].y],h=n.util.array.min(c),l=n.util.array.max(c),u=l-h;return{left:o,top:h,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),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")&&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 c(){++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),c()}))}else c()})):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 c=o-r,h=s-n,l=e(c*c+h*h),u=i(h,c),f=a.length,d=0,p=!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[p?"lineTo":"moveTo"](r,0),p=!p;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")},clipContext:function(t,e){e.save(),e.beginPath(),t.clipTo(e),e.clip()},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),c=(t[0]*t[3]-t[2]*t[1])/a,h=i(t[0]*t[2]+t[1]*t[3],s);return{angle:n/o,scaleX:a,scaleY:c,skewX:h/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))),(t.scaleX||t.scaleY||t.skewX||t.skewY||t.flipX||t.flipY)&&(e=i(e,n.util.calcDimensionsMatrix(t))),e},customTransformMatrix:function(t,e,i){return n.util.composeMatrix({scaleX:t,scaleY:e,skewX:i})},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}},getFunctionBody:function(t){return(String(t).match(/function[^{]*\{([\s\S]*)\}/)||{})[1]},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),c=a.data.length;for(n=3;n<c;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(" ")+")"}}}(e),function(){var t=Array.prototype.join;function e(e,o,s,a,c,h,l){var u=t.call(arguments);if(n.arcToSegmentsCache[u])return n.arcToSegmentsCache[u];var f=Math.PI,d=l*f/180,p=n.util.sin(d),g=n.util.cos(d),v=0,m=0;s=Math.abs(s),a=Math.abs(a);var y=-g*e*.5-p*o*.5,b=-g*o*.5+p*e*.5,_=s*s,x=a*a,S=b*b,C=y*y,w=_*x-_*S-x*C,T=0;if(w<0){var O=Math.sqrt(1-w/(_*x));s*=O,a*=O}else T=(c===h?-1:1)*Math.sqrt(w/(_*S+x*C));var E=T*s*b/a,k=-T*a*y/s,P=g*E-p*k+.5*e,j=p*E+g*k+.5*o,A=r(1,0,(y-E)/s,(b-k)/a),D=r((y-E)/s,(b-k)/a,(-y-E)/s,(-b-k)/a);0===h&&D>0?D-=2*f:1===h&&D<0&&(D+=2*f);for(var M=Math.ceil(Math.abs(D/f*2)),L=[],I=D/M,F=8/3*Math.sin(I/4)*Math.sin(I/4)/Math.sin(I/2),R=A+I,B=0;B<M;B++)L[B]=i(A,R,g,p,s,a,P,j,F,v,m),v=L[B][4],m=L[B][5],A=R,R+=I;return n.arcToSegmentsCache[u]=L,L}function i(t,e,i,r,o,s,a,c,h,l,u){var f=n.util.cos(t),d=n.util.sin(t),p=n.util.cos(e),g=n.util.sin(e),v=i*o*p-r*s*g+a,m=r*o*p+i*s*g+c,y=l+h*(-i*o*d-r*s*f),b=u+h*(-r*o*d+i*s*f),_=v+h*(i*o*g+r*s*p),x=m+h*(r*o*g-i*s*p);return[y,b,_,x,v,m]}function r(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 o(e,i,r,o,s,a,c,h){var l;if(n.cachesBoundsOfCurve&&(l=t.call(arguments),n.boundsOfCurveCache[l]))return n.boundsOfCurveCache[l];var u,f,d,p,g,v,m,y,b=Math.sqrt,_=Math.min,x=Math.max,S=Math.abs,C=[],w=[[],[]];f=6*e-12*r+6*s,u=-3*e+9*r-9*s+3*c,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*h,d=3*o-3*i),S(u)<1e-12){if(S(f)<1e-12)continue;p=-d/f,0<p&&p<1&&C.push(p)}else m=f*f-4*d*u,m<0||(y=b(m),g=(-f+y)/(2*u),0<g&&g<1&&C.push(g),v=(-f-y)/(2*u),0<v&&v<1&&C.push(v));var O,E,k,P=C.length,j=P;while(P--)p=C[P],k=1-p,O=k*k*k*e+3*k*k*p*r+3*k*p*p*s+p*p*p*c,w[0][P]=O,E=k*k*k*i+3*k*k*p*o+3*k*p*p*a+p*p*p*h,w[1][P]=E;w[0][j]=e,w[1][j]=i,w[0][j+1]=c,w[1][j+1]=h;var A=[{x:_.apply(null,w[0]),y:_.apply(null,w[1])},{x:x.apply(null,w[0]),y:x.apply(null,w[1])}];return n.cachesBoundsOfCurve&&(n.boundsOfCurveCache[l]=A),A}n.util.drawArc=function(t,i,r,n){for(var o=n[0],s=n[1],a=n[2],c=n[3],h=n[4],l=n[5],u=n[6],f=[[],[],[],[]],d=e(l-i,u-r,o,s,c,h,a),p=0,g=d.length;p<g;p++)f[p][0]=d[p][0]+i,f[p][1]=d[p][1]+r,f[p][2]=d[p][2]+i,f[p][3]=d[p][3]+r,f[p][4]=d[p][4]+i,f[p][5]=d[p][5]+r,t.bezierCurveTo.apply(t,f[p])},n.util.getBoundsOfArc=function(t,i,r,n,s,a,c,h,l){for(var u,f=0,d=0,p=[],g=e(h-t,l-i,r,n,a,c,s),v=0,m=g.length;v<m;v++)u=o(f,d,g[v][0],g[v][1],g[v][2],g[v][3],g[v][4],g[v][5]),p.push({x:u[0].x+t,y:u[0].y+i}),p.push({x:u[1].x+t,y:u[1].y+i}),f=g[v][4],d=g[v][5];return p},n.util.getBoundsOfCurve=o}(),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?e[a]=t({},i[a]):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,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}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 c=0,h=n.length;c<h;c++)r(a,n[c],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;function e(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 i=t.target,r=n.util.getScrollLeftTop(i),o=e(t);return{x:o.clientX+r.left,y:o.clientY+r.top}}}(),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(d){}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 c(t,e,i){return"string"===typeof e&&(e=s(e,i)),t.parentNode&&t.parentNode.replaceChild(e,t),e.appendChild(t),e}function h(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 c in a)s[a[c]]+=parseInt(r(t,c),10)||0;return e=n.documentElement,"undefined"!==typeof t.getBoundingClientRect&&(o=t.getBoundingClientRect()),i=h(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)}}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}(),function(){function t(t,e){var i=n.document.getElementsByTagName("head")[0],r=n.document.createElement("script"),o=!0;r.onload=r.onreadystatechange=function(t){if(o){if("string"===typeof this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)return;o=!1,e(t||n.window.event),r=r.onload=r.onreadystatechange=null}},r.src=t,i.appendChild(r)}n.util.getScript=t}(),n.util.getById=e,n.util.toArray=o,n.util.makeElement=s,n.util.addClass=a,n.util.wrapElement=c,n.util.getScrollLeftTop=h,n.util.getElementOffset=l,n.util.getElementStyle=r,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,c=r.body||r.parameters;return a.onreadystatechange=function(){4===a.readyState&&(s(a),a.onreadystatechange=e)},"GET"===o&&(c=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(c),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,c=o+a,h=i.onChange||t,l=i.abort||t,u=i.onComplete||t,f=i.easing||e,d="startValue"in i?i.startValue:0,p="endValue"in i?i.endValue:100,g=i.byValue||p-d;i.onStart&&i.onStart(),function t(e){n=e||+new Date;var i=n>c?a:n-o,r=i/a,v=f(i,d,g,a),m=Math.abs((v-d)/g);if(!l())return n>c?(h(p,1,1),void u(p,1,1)):(h(v,m,r),void s(t));u(p,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();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)}}))}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 c(t,e,i,r){return i*(t/=r)*t*t*t*t+e}function h(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 p(t,e,i,r){return 0===t?e:i*Math.pow(2,10*(t/r-1))+e}function g(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 b(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 _(i,r,n,o){var s=1.70158,a=0,c=n;if(0===i)return r;if(i/=o,1===i)return r+n;a||(a=.3*o);var h=t(c,n,a,s);return-e(h,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 c=t(a,r,s,o);return c.a*Math.pow(2,-10*e)*Math.sin((e*n-c.s)*(2*Math.PI)/c.p)+c.c+i}function S(i,r,n,o){var s=1.70158,a=0,c=n;if(0===i)return r;if(i/=o/2,2===i)return r+n;a||(a=o*(.3*1.5));var h=t(c,n,a,s);return i<1?-.5*e(h,i,o)+r:h.a*Math.pow(2,-10*(i-=1))*Math.sin((i*o-h.s)*(2*Math.PI)/h.p)*.5+h.c+r}function C(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:c,easeOutQuint:h,easeInOutQuint:l,easeInSine:u,easeOutSine:f,easeInOutSine:d,easeInExpo:p,easeOutExpo:g,easeInOutExpo:v,easeInCirc:m,easeOutCirc:y,easeInOutCirc:b,easeInElastic:_,easeOutElastic:x,easeInOutElastic:S,easeInBack:C,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"],c=["symbol","image","marker","pattern","view","svg"],h=["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"},f={stroke:"strokeOpacity",fill:"fillOpacity"},d="font-size",p="clip-path";function g(t){return t in u?u[t]:t}function v(t,i,r,n){var a,c="[object Array]"===Object.prototype.toString.call(i);if("fill"!==t&&"stroke"!==t||"none"!==i)if("vector-effect"===t)i="non-scaling-stroke"===i;else 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 h=i.indexOf("fill"),l=i.indexOf("stroke");i="fill";(h>-1&&l>-1&&l<h||-1===h&&l>-1)&&(i="stroke")}else{if("href"===t||"xlink:href"===t)return i;a=c?i.map(o):o(i,n)}else i="";return!c&&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 b(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 _(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 S(t,i){var r={};for(var n in e.cssRules[i])if(C(t,n.split(" ")))for(var o in e.cssRules[i][n])r[o]=e.cssRules[i][n][o];return r}function C(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=b(t,["use","svg:use"]),r=0;while(i.length&&r<i.length){var n,o,s,a,c,h=i[r],l=(h.getAttribute("xlink:href")||h.getAttribute("href")).substr(1),u=h.getAttribute("x")||0,f=h.getAttribute("y")||0,d=O(t,l).cloneNode(!0),p=(d.getAttribute("transform")||"")+" translate("+u+", "+f+")",g=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,c=a.length;s<c;s++)o=a.item(s),m.setAttributeNS(v,o.nodeName,o.nodeValue);while(d.firstChild)m.appendChild(d.firstChild);d=m}for(s=0,a=h.attributes,c=a.length;s<c;s++)o=a.item(s),"x"!==o.nodeName&&"y"!==o.nodeName&&"xlink:href"!==o.nodeName&&"href"!==o.nodeName&&("transform"===o.nodeName?p=o.nodeValue+" "+p:d.setAttribute(o.nodeName,o.nodeValue));d.setAtt