@hprint/shared 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Oe=class Oe{static getDeviceDPI(){if(!this._deviceDPI)try{const o=document.createElement("div");o.style.width="1in",o.style.height="0",o.style.position="absolute",o.style.visibility="hidden",document.body.appendChild(o);const m=o.offsetWidth;document.body.removeChild(o),this._deviceDPI=m*window.devicePixelRatio||this.CONSTANTS.DEFAULT_DPI}catch{console.warn("无法获取设备DPI,使用默认值:",this.CONSTANTS.DEFAULT_DPI),this._deviceDPI=this.CONSTANTS.DEFAULT_DPI}return this._deviceDPI}static mmToPx(o,m,S){const b=this.normalizeNumber(o,"毫米值"),T=this.getValidDpi(m),F=b*T/this.CONSTANTS.INCH_TO_MM;return S?.direct?F:Math.ceil(F)}static pxToMm(o,m,S){const b=this.normalizeNumber(o,"像素值"),T=this.getValidDpi(m);return b*this.CONSTANTS.INCH_TO_MM/T}static mmToPxBatch(o,m){return o.map(S=>this.mmToPx(S,m,void 0))}static pxToMmBatch(o,m){return o.map(S=>this.pxToMm(S,m,void 0))}static getValidDpi(o){if(o!=null){const S=this.normalizeNumber(o,"DPI值");if(S<=0)throw new Error("DPI值必须大于0");return S}const m=this.getDeviceDPI();if(m<=0)throw new Error("DPI值必须大于0");return m}static normalizeNumber(o,m){if(typeof o=="string"){const S=o.trim();if(S==="")throw new Error(`${m}不能为空字符串`);const b=Number(S);if(isNaN(b))throw new Error(`${m}必须是有效数字,无法转换: "${o}"`);return b}if(typeof o!="number"||isNaN(o))throw new Error(`${m}必须是有效数字`);return o}static validateNumber(o,m){this.normalizeNumber(o,m)}static resetCache(){this._deviceDPI=null}static ptToPx(o,m){const S=this.normalizeNumber(o,"磅值"),b=this.getValidDpi(void 0),T=S*b/72;return m?.direct?T:Math.ceil(T)}static pxToPt(o){const m=this.normalizeNumber(o,"像素值"),S=this.getValidDpi(void 0);return m*72/S}static ptToPxBatch(o,m){return o.map(S=>this.ptToPx(S,m))}static pxToPtBatch(o){return o.map(m=>this.pxToPt(m))}static mmToPt(o){return this.normalizeNumber(o,"毫米值")*72/25.4}};Oe.devicePixelRatio=window.devicePixelRatio,Oe.CONSTANTS={INCH_TO_MM:25.4,DEFAULT_DPI:96,STANDARD_DPI:{SCREEN:96,PRINT:300,HIGH_RES:600}};let Xe=Oe;const ir=(d,o)=>{const m=[],S=Math.PI*2/d;let b=-Math.PI/2;d%2===0&&(b+=S/2);for(let T=0;T<d;T++){const F=T*S+b;m.push({x:Math.cos(F)*o,y:Math.sin(F)*o})}return m},rr={getPolygonVertices:ir};var pe,nr=new Uint8Array(16);function sr(){if(!pe&&(pe=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!pe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pe(nr)}const or=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function ar(d){return typeof d=="string"&&or.test(d)}var gt=[];for(var Ae=0;Ae<256;++Ae)gt.push((Ae+256).toString(16).substr(1));function lr(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,m=(gt[d[o+0]]+gt[d[o+1]]+gt[d[o+2]]+gt[d[o+3]]+"-"+gt[d[o+4]]+gt[d[o+5]]+"-"+gt[d[o+6]]+gt[d[o+7]]+"-"+gt[d[o+8]]+gt[d[o+9]]+"-"+gt[d[o+10]]+gt[d[o+11]]+gt[d[o+12]]+gt[d[o+13]]+gt[d[o+14]]+gt[d[o+15]]).toLowerCase();if(!ar(m))throw TypeError("Stringified UUID is invalid");return m}function hr(d,o,m){d=d||{};var S=d.random||(d.rng||sr)();return S[6]=S[6]&15|64,S[8]=S[8]&63|128,lr(S)}function cr(d){const o=Object.create(null);for(const m of d.split(","))o[m]=1;return m=>m in o}const re=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const zt=()=>{},ur=d=>d.charCodeAt(0)===111&&d.charCodeAt(1)===110&&(d.charCodeAt(2)>122||d.charCodeAt(2)<97),Rt=Object.assign,fr=Object.prototype.hasOwnProperty,We=(d,o)=>fr.call(d,o),dt=Array.isArray,Ut=d=>Ee(d)==="[object Map]",dr=d=>Ee(d)==="[object Set]",mt=d=>typeof d=="function",Dt=d=>typeof d=="string",ue=d=>typeof d=="symbol",yt=d=>d!==null&&typeof d=="object",gr=d=>(yt(d)||mt(d))&&mt(d.then)&&mt(d.catch),pr=Object.prototype.toString,Ee=d=>pr.call(d),pi=d=>Ee(d).slice(8,-1),mr=d=>Ee(d)==="[object Object]",qe=d=>Dt(d)&&d!=="NaN"&&d[0]!=="-"&&""+parseInt(d,10)===d,mi=d=>{const o=Object.create(null);return(m=>o[m]||(o[m]=d(m)))},vi=mi(d=>d.charAt(0).toUpperCase()+d.slice(1)),vr=mi(d=>d?`on${vi(d)}`:""),Lt=(d,o)=>!Object.is(d,o);let li;const Pe=()=>li||(li=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ke(d){if(dt(d)){const o={};for(let m=0;m<d.length;m++){const S=d[m],b=Dt(S)?Sr(S):Ke(S);if(b)for(const T in b)o[T]=b[T]}return o}else if(Dt(d)||yt(d))return d}const _r=/;(?![^(]*\))/g,yr=/:([^]+)/,Cr=/\/\*[^]*?\*\//g;function Sr(d){const o={};return d.replace(Cr,"").split(_r).forEach(m=>{if(m){const S=m.split(yr);S.length>1&&(o[S[0].trim()]=S[1].trim())}}),o}function Je(d){let o="";if(Dt(d))o=d;else if(dt(d))for(let m=0;m<d.length;m++){const S=Je(d[m]);S&&(o+=S+" ")}else if(yt(d))for(const m in d)d[m]&&(o+=m+" ");return o.trim()}function Tt(d,...o){console.warn(`[Vue warn] ${d}`,...o)}let ht;const ke=new WeakSet;class br{constructor(o){this.fn=o,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ke.has(this)&&(ke.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||yi(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,hi(this),Ci(this);const o=ht,m=xt;ht=this,xt=!0;try{return this.fn()}finally{process.env.NODE_ENV!=="production"&&ht!==this&&Tt("Active effect was not restored correctly - this is likely a Vue internal bug."),Si(this),ht=o,xt=m,this.flags&=-3}}stop(){if(this.flags&1){for(let o=this.deps;o;o=o.nextDep)Ze(o);this.deps=this.depsTail=void 0,hi(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ke.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ve(this)&&this.run()}get dirty(){return Ve(this)}}let _i=0,ee,ie;function yi(d,o=!1){if(d.flags|=8,o){d.next=ie,ie=d;return}d.next=ee,ee=d}function $e(){_i++}function Qe(){if(--_i>0)return;if(ie){let o=ie;for(ie=void 0;o;){const m=o.next;o.next=void 0,o.flags&=-9,o=m}}let d;for(;ee;){let o=ee;for(ee=void 0;o;){const m=o.next;if(o.next=void 0,o.flags&=-9,o.flags&1)try{o.trigger()}catch(S){d||(d=S)}o=m}}if(d)throw d}function Ci(d){for(let o=d.deps;o;o=o.nextDep)o.version=-1,o.prevActiveLink=o.dep.activeLink,o.dep.activeLink=o}function Si(d){let o,m=d.depsTail,S=m;for(;S;){const b=S.prevDep;S.version===-1?(S===m&&(m=b),Ze(S),xr(S)):o=S,S.dep.activeLink=S.prevActiveLink,S.prevActiveLink=void 0,S=b}d.deps=o,d.depsTail=m}function Ve(d){for(let o=d.deps;o;o=o.nextDep)if(o.dep.version!==o.version||o.dep.computed&&(bi(o.dep.computed)||o.dep.version!==o.version))return!0;return!!d._dirty}function bi(d){if(d.flags&4&&!(d.flags&16)||(d.flags&=-17,d.globalVersion===ne)||(d.globalVersion=ne,!d.isSSR&&d.flags&128&&(!d.deps&&!d._dirty||!Ve(d))))return;d.flags|=2;const o=d.dep,m=ht,S=xt;ht=d,xt=!0;try{Ci(d);const b=d.fn(d._value);(o.version===0||Lt(b,d._value))&&(d.flags|=128,d._value=b,o.version++)}catch(b){throw o.version++,b}finally{ht=m,xt=S,Si(d),d.flags&=-3}}function Ze(d,o=!1){const{dep:m,prevSub:S,nextSub:b}=d;if(S&&(S.nextSub=b,d.prevSub=void 0),b&&(b.prevSub=S,d.nextSub=void 0),process.env.NODE_ENV!=="production"&&m.subsHead===d&&(m.subsHead=b),m.subs===d&&(m.subs=S,!S&&m.computed)){m.computed.flags&=-5;for(let T=m.computed.deps;T;T=T.nextDep)Ze(T,!0)}!o&&!--m.sc&&m.map&&m.map.delete(m.key)}function xr(d){const{prevDep:o,nextDep:m}=d;o&&(o.nextDep=m,d.prevDep=void 0),m&&(m.prevDep=o,d.nextDep=void 0)}let xt=!0;const xi=[];function Kt(){xi.push(xt),xt=!1}function Jt(){const d=xi.pop();xt=d===void 0?!0:d}function hi(d){const{cleanup:o}=d;if(d.cleanup=void 0,o){const m=ht;ht=void 0;try{o()}finally{ht=m}}}let ne=0;class wr{constructor(o,m){this.sub=o,this.dep=m,this.version=m.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ti{constructor(o){this.computed=o,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(o){if(!ht||!xt||ht===this.computed)return;let m=this.activeLink;if(m===void 0||m.sub!==ht)m=this.activeLink=new wr(ht,this),ht.deps?(m.prevDep=ht.depsTail,ht.depsTail.nextDep=m,ht.depsTail=m):ht.deps=ht.depsTail=m,wi(m);else if(m.version===-1&&(m.version=this.version,m.nextDep)){const S=m.nextDep;S.prevDep=m.prevDep,m.prevDep&&(m.prevDep.nextDep=S),m.prevDep=ht.depsTail,m.nextDep=void 0,ht.depsTail.nextDep=m,ht.depsTail=m,ht.deps===m&&(ht.deps=S)}return process.env.NODE_ENV!=="production"&&ht.onTrack&&ht.onTrack(Rt({effect:ht},o)),m}trigger(o){this.version++,ne++,this.notify(o)}notify(o){$e();try{if(process.env.NODE_ENV!=="production")for(let m=this.subsHead;m;m=m.nextSub)m.sub.onTrigger&&!(m.sub.flags&8)&&m.sub.onTrigger(Rt({effect:m.sub},o));for(let m=this.subs;m;m=m.prevSub)m.sub.notify()&&m.sub.dep.notify()}finally{Qe()}}}function wi(d){if(d.dep.sc++,d.sub.flags&4){const o=d.dep.computed;if(o&&!d.dep.subs){o.flags|=20;for(let S=o.deps;S;S=S.nextDep)wi(S)}const m=d.dep.subs;m!==d&&(d.prevSub=m,m&&(m.nextSub=d)),process.env.NODE_ENV!=="production"&&d.dep.subsHead===void 0&&(d.dep.subsHead=d),d.dep.subs=d}}const Ye=new WeakMap,Xt=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),He=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),se=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function _t(d,o,m){if(xt&&ht){let S=Ye.get(d);S||Ye.set(d,S=new Map);let b=S.get(m);b||(S.set(m,b=new ti),b.map=S,b.key=m),process.env.NODE_ENV!=="production"?b.track({target:d,type:o,key:m}):b.track()}}function Ft(d,o,m,S,b,T){const F=Ye.get(d);if(!F){ne++;return}const u=n=>{n&&(process.env.NODE_ENV!=="production"?n.trigger({target:d,type:o,key:m,newValue:S,oldValue:b,oldTarget:T}):n.trigger())};if($e(),o==="clear")F.forEach(u);else{const n=dt(d),l=n&&qe(m);if(n&&m==="length"){const a=Number(S);F.forEach((t,i)=>{(i==="length"||i===se||!ue(i)&&i>=a)&&u(t)})}else switch((m!==void 0||F.has(void 0))&&u(F.get(m)),l&&u(F.get(se)),o){case"add":n?l&&u(F.get("length")):(u(F.get(Xt)),Ut(d)&&u(F.get(He)));break;case"delete":n||(u(F.get(Xt)),Ut(d)&&u(F.get(He)));break;case"set":Ut(d)&&u(F.get(Xt));break}}Qe()}function Vt(d){const o=at(d);return o===d?o:(_t(o,"iterate",se),Ct(d)?o:o.map(At))}function ei(d){return _t(d=at(d),"iterate",se),d}function kt(d,o){return Ot(d)?Gt(d)?ae(At(o)):ae(o):At(o)}const Tr={__proto__:null,[Symbol.iterator](){return Me(this,Symbol.iterator,d=>kt(this,d))},concat(...d){return Vt(this).concat(...d.map(o=>dt(o)?Vt(o):o))},entries(){return Me(this,"entries",d=>(d[1]=kt(this,d[1]),d))},every(d,o){return Et(this,"every",d,o,void 0,arguments)},filter(d,o){return Et(this,"filter",d,o,m=>m.map(S=>kt(this,S)),arguments)},find(d,o){return Et(this,"find",d,o,m=>kt(this,m),arguments)},findIndex(d,o){return Et(this,"findIndex",d,o,void 0,arguments)},findLast(d,o){return Et(this,"findLast",d,o,m=>kt(this,m),arguments)},findLastIndex(d,o){return Et(this,"findLastIndex",d,o,void 0,arguments)},forEach(d,o){return Et(this,"forEach",d,o,void 0,arguments)},includes(...d){return Fe(this,"includes",d)},indexOf(...d){return Fe(this,"indexOf",d)},join(d){return Vt(this).join(d)},lastIndexOf(...d){return Fe(this,"lastIndexOf",d)},map(d,o){return Et(this,"map",d,o,void 0,arguments)},pop(){return Zt(this,"pop")},push(...d){return Zt(this,"push",d)},reduce(d,...o){return ci(this,"reduce",d,o)},reduceRight(d,...o){return ci(this,"reduceRight",d,o)},shift(){return Zt(this,"shift")},some(d,o){return Et(this,"some",d,o,void 0,arguments)},splice(...d){return Zt(this,"splice",d)},toReversed(){return Vt(this).toReversed()},toSorted(d){return Vt(this).toSorted(d)},toSpliced(...d){return Vt(this).toSpliced(...d)},unshift(...d){return Zt(this,"unshift",d)},values(){return Me(this,"values",d=>kt(this,d))}};function Me(d,o,m){const S=ei(d),b=S[o]();return S!==d&&!Ct(d)&&(b._next=b.next,b.next=()=>{const T=b._next();return T.done||(T.value=m(T.value)),T}),b}const Or=Array.prototype;function Et(d,o,m,S,b,T){const F=ei(d),u=F!==d&&!Ct(d),n=F[o];if(n!==Or[o]){const t=n.apply(d,T);return u?At(t):t}let l=m;F!==d&&(u?l=function(t,i){return m.call(this,kt(d,t),i,d)}:m.length>2&&(l=function(t,i){return m.call(this,t,i,d)}));const a=n.call(F,l,S);return u&&b?b(a):a}function ci(d,o,m,S){const b=ei(d);let T=m;return b!==d&&(Ct(d)?m.length>3&&(T=function(F,u,n){return m.call(this,F,u,n,d)}):T=function(F,u,n){return m.call(this,F,kt(d,u),n,d)}),b[o](T,...S)}function Fe(d,o,m){const S=at(d);_t(S,"iterate",se);const b=S[o](...m);return(b===-1||b===!1)&&Se(m[0])?(m[0]=at(m[0]),S[o](...m)):b}function Zt(d,o,m=[]){Kt(),$e();const S=at(d)[o].apply(d,m);return Qe(),Jt(),S}const Er=cr("__proto__,__v_isRef,__isVue"),Ti=new Set(Object.getOwnPropertyNames(Symbol).filter(d=>d!=="arguments"&&d!=="caller").map(d=>Symbol[d]).filter(ue));function Pr(d){ue(d)||(d=String(d));const o=at(this);return _t(o,"has",d),o.hasOwnProperty(d)}class Oi{constructor(o=!1,m=!1){this._isReadonly=o,this._isShallow=m}get(o,m,S){if(m==="__v_skip")return o.__v_skip;const b=this._isReadonly,T=this._isShallow;if(m==="__v_isReactive")return!b;if(m==="__v_isReadonly")return b;if(m==="__v_isShallow")return T;if(m==="__v_raw")return S===(b?T?Br:Di:T?jr:Pi).get(o)||Object.getPrototypeOf(o)===Object.getPrototypeOf(S)?o:void 0;const F=dt(o);if(!b){let n;if(F&&(n=Tr[m]))return n;if(m==="hasOwnProperty")return Pr}const u=Reflect.get(o,m,St(o)?o:S);if((ue(m)?Ti.has(m):Er(m))||(b||_t(o,"get",m),T))return u;if(St(u)){const n=F&&qe(m)?u:u.value;return b&&yt(n)?oe(n):n}return yt(u)?b?oe(u):Ai(u):u}}class Dr extends Oi{constructor(o=!1){super(!1,o)}set(o,m,S,b){let T=o[m];const F=dt(o)&&qe(m);if(!this._isShallow){const l=Ot(T);if(!Ct(S)&&!Ot(S)&&(T=at(T),S=at(S)),!F&&St(T)&&!St(S))return l?(process.env.NODE_ENV!=="production"&&Tt(`Set operation on key "${String(m)}" failed: target is readonly.`,o[m]),!0):(T.value=S,!0)}const u=F?Number(m)<o.length:We(o,m),n=Reflect.set(o,m,S,St(o)?o:b);return o===at(b)&&(u?Lt(S,T)&&Ft(o,"set",m,S,T):Ft(o,"add",m,S)),n}deleteProperty(o,m){const S=We(o,m),b=o[m],T=Reflect.deleteProperty(o,m);return T&&S&&Ft(o,"delete",m,void 0,b),T}has(o,m){const S=Reflect.has(o,m);return(!ue(m)||!Ti.has(m))&&_t(o,"has",m),S}ownKeys(o){return _t(o,"iterate",dt(o)?"length":Xt),Reflect.ownKeys(o)}}class Ar extends Oi{constructor(o=!1){super(!0,o)}set(o,m){return process.env.NODE_ENV!=="production"&&Tt(`Set operation on key "${String(m)}" failed: target is readonly.`,o),!0}deleteProperty(o,m){return process.env.NODE_ENV!=="production"&&Tt(`Delete operation on key "${String(m)}" failed: target is readonly.`,o),!0}}const kr=new Dr,Mr=new Ar,ze=d=>d,me=d=>Reflect.getPrototypeOf(d);function Fr(d,o,m){return function(...S){const b=this.__v_raw,T=at(b),F=Ut(T),u=d==="entries"||d===Symbol.iterator&&F,n=d==="keys"&&F,l=b[d](...S),a=m?ze:o?ae:At;return!o&&_t(T,"iterate",n?He:Xt),{next(){const{value:t,done:i}=l.next();return i?{value:t,done:i}:{value:u?[a(t[0]),a(t[1])]:a(t),done:i}},[Symbol.iterator](){return this}}}}function ve(d){return function(...o){if(process.env.NODE_ENV!=="production"){const m=o[0]?`on key "${o[0]}" `:"";Tt(`${vi(d)} operation ${m}failed: target is readonly.`,at(this))}return d==="delete"?!1:d==="clear"?void 0:this}}function Ir(d,o){const m={get(b){const T=this.__v_raw,F=at(T),u=at(b);d||(Lt(b,u)&&_t(F,"get",b),_t(F,"get",u));const{has:n}=me(F),l=o?ze:d?ae:At;if(n.call(F,b))return l(T.get(b));if(n.call(F,u))return l(T.get(u));T!==F&&T.get(b)},get size(){const b=this.__v_raw;return!d&&_t(at(b),"iterate",Xt),b.size},has(b){const T=this.__v_raw,F=at(T),u=at(b);return d||(Lt(b,u)&&_t(F,"has",b),_t(F,"has",u)),b===u?T.has(b):T.has(b)||T.has(u)},forEach(b,T){const F=this,u=F.__v_raw,n=at(u),l=o?ze:d?ae:At;return!d&&_t(n,"iterate",Xt),u.forEach((a,t)=>b.call(T,l(a),l(t),F))}};return Rt(m,d?{add:ve("add"),set:ve("set"),delete:ve("delete"),clear:ve("clear")}:{add(b){!o&&!Ct(b)&&!Ot(b)&&(b=at(b));const T=at(this);return me(T).has.call(T,b)||(T.add(b),Ft(T,"add",b,b)),this},set(b,T){!o&&!Ct(T)&&!Ot(T)&&(T=at(T));const F=at(this),{has:u,get:n}=me(F);let l=u.call(F,b);l?process.env.NODE_ENV!=="production"&&ui(F,u,b):(b=at(b),l=u.call(F,b));const a=n.call(F,b);return F.set(b,T),l?Lt(T,a)&&Ft(F,"set",b,T,a):Ft(F,"add",b,T),this},delete(b){const T=at(this),{has:F,get:u}=me(T);let n=F.call(T,b);n?process.env.NODE_ENV!=="production"&&ui(T,F,b):(b=at(b),n=F.call(T,b));const l=u?u.call(T,b):void 0,a=T.delete(b);return n&&Ft(T,"delete",b,void 0,l),a},clear(){const b=at(this),T=b.size!==0,F=process.env.NODE_ENV!=="production"?Ut(b)?new Map(b):new Set(b):void 0,u=b.clear();return T&&Ft(b,"clear",void 0,void 0,F),u}}),["keys","values","entries",Symbol.iterator].forEach(b=>{m[b]=Fr(b,d,o)}),m}function Ei(d,o){const m=Ir(d,o);return(S,b,T)=>b==="__v_isReactive"?!d:b==="__v_isReadonly"?d:b==="__v_raw"?S:Reflect.get(We(m,b)&&b in S?m:S,b,T)}const Lr={get:Ei(!1,!1)},Rr={get:Ei(!0,!1)};function ui(d,o,m){const S=at(m);if(S!==m&&o.call(d,S)){const b=pi(d);Tt(`Reactive ${b} contains both the raw and reactive versions of the same object${b==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Pi=new WeakMap,jr=new WeakMap,Di=new WeakMap,Br=new WeakMap;function Nr(d){switch(d){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Xr(d){return d.__v_skip||!Object.isExtensible(d)?0:Nr(pi(d))}function Ai(d){return Ot(d)?d:ki(d,!1,kr,Lr,Pi)}function oe(d){return ki(d,!0,Mr,Rr,Di)}function ki(d,o,m,S,b){if(!yt(d))return process.env.NODE_ENV!=="production"&&Tt(`value cannot be made ${o?"readonly":"reactive"}: ${String(d)}`),d;if(d.__v_raw&&!(o&&d.__v_isReactive))return d;const T=Xr(d);if(T===0)return d;const F=b.get(d);if(F)return F;const u=new Proxy(d,T===2?S:m);return b.set(d,u),u}function Gt(d){return Ot(d)?Gt(d.__v_raw):!!(d&&d.__v_isReactive)}function Ot(d){return!!(d&&d.__v_isReadonly)}function Ct(d){return!!(d&&d.__v_isShallow)}function Se(d){return d?!!d.__v_raw:!1}function at(d){const o=d&&d.__v_raw;return o?at(o):d}const At=d=>yt(d)?Ai(d):d,ae=d=>yt(d)?oe(d):d;function St(d){return d?d.__v_isRef===!0:!1}function jt(d){return Wr(d,!1)}function Wr(d,o){return St(d)?d:new Vr(d,o)}class Vr{constructor(o,m){this.dep=new ti,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=m?o:at(o),this._value=m?o:At(o),this.__v_isShallow=m}get value(){return process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(o){const m=this._rawValue,S=this.__v_isShallow||Ct(o)||Ot(o);o=S?o:at(o),Lt(o,m)&&(this._rawValue=o,this._value=S?o:At(o),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:o,oldValue:m}):this.dep.trigger())}}function Yr(d){return St(d)?d.value:d}class Hr{constructor(o,m,S){this.fn=o,this.setter=m,this._value=void 0,this.dep=new ti(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ne-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!m,this.isSSR=S}notify(){if(this.flags|=16,!(this.flags&8)&&ht!==this)return yi(this,!0),!0;process.env.NODE_ENV}get value(){const o=process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return bi(this),o&&(o.version=this.dep.version),this._value}set value(o){this.setter?this.setter(o):process.env.NODE_ENV!=="production"&&Tt("Write operation failed: computed value is readonly")}}function zr(d,o,m=!1){let S,b;mt(d)?S=d:(S=d.get,b=d.set);const T=new Hr(S,b,m);return process.env.NODE_ENV,T}const _e={},be=new WeakMap;let Nt;function Ur(d,o=!1,m=Nt){if(m){let S=be.get(m);S||be.set(m,S=[]),S.push(d)}else process.env.NODE_ENV!=="production"&&!o&&Tt("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Gr(d,o,m=re){const{immediate:S,deep:b,once:T,scheduler:F,augmentJob:u,call:n}=m,l=p=>{(m.onWarn||Tt)("Invalid watch source: ",p,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},a=p=>b?p:Ct(p)||b===!1||b===0?It(p,1):It(p);let t,i,e,s,h=!1,r=!1;if(St(d)?(i=()=>d.value,h=Ct(d)):Gt(d)?(i=()=>a(d),h=!0):dt(d)?(r=!0,h=d.some(p=>Gt(p)||Ct(p)),i=()=>d.map(p=>{if(St(p))return p.value;if(Gt(p))return a(p);if(mt(p))return n?n(p,2):p();process.env.NODE_ENV!=="production"&&l(p)})):mt(d)?o?i=n?()=>n(d,2):d:i=()=>{if(e){Kt();try{e()}finally{Jt()}}const p=Nt;Nt=t;try{return n?n(d,3,[s]):d(s)}finally{Nt=p}}:(i=zt,process.env.NODE_ENV!=="production"&&l(d)),o&&b){const p=i,v=b===!0?1/0:b;i=()=>It(p(),v)}const c=()=>{t.stop()};if(T&&o){const p=o;o=(...v)=>{p(...v),c()}}let f=r?new Array(d.length).fill(_e):_e;const g=p=>{if(!(!(t.flags&1)||!t.dirty&&!p))if(o){const v=t.run();if(b||h||(r?v.some((_,x)=>Lt(_,f[x])):Lt(v,f))){e&&e();const _=Nt;Nt=t;try{const x=[v,f===_e?void 0:r&&f[0]===_e?[]:f,s];f=v,n?n(o,3,x):o(...x)}finally{Nt=_}}}else t.run()};return u&&u(g),t=new br(i),t.scheduler=F?()=>F(g,!1):g,s=p=>Ur(p,!1,t),e=t.onStop=()=>{const p=be.get(t);if(p){if(n)n(p,4);else for(const v of p)v();be.delete(t)}},process.env.NODE_ENV!=="production"&&(t.onTrack=m.onTrack,t.onTrigger=m.onTrigger),o?S?g(!0):f=t.run():F?F(g.bind(null,!0),!0):t.run(),c.pause=t.pause.bind(t),c.resume=t.resume.bind(t),c.stop=c,c}function It(d,o=1/0,m){if(o<=0||!yt(d)||d.__v_skip||(m=m||new Map,(m.get(d)||0)>=o))return d;if(m.set(d,o),o--,St(d))It(d.value,o,m);else if(dt(d))for(let S=0;S<d.length;S++)It(d[S],o,m);else if(dr(d)||Ut(d))d.forEach(S=>{It(S,o,m)});else if(mr(d)){for(const S in d)It(d[S],o,m);for(const S of Object.getOwnPropertySymbols(d))Object.prototype.propertyIsEnumerable.call(d,S)&&It(d[S],o,m)}return d}const Wt=[];function qr(d){Wt.push(d)}function Kr(){Wt.pop()}let Ie=!1;function pt(d,...o){if(Ie)return;Ie=!0,Kt();const m=Wt.length?Wt[Wt.length-1].component:null,S=m&&m.appContext.config.warnHandler,b=Jr();if(S)De(S,m,11,[d+o.map(T=>{var F,u;return(u=(F=T.toString)==null?void 0:F.call(T))!=null?u:JSON.stringify(T)}).join(""),m&&m.proxy,b.map(({vnode:T})=>`at <${Gi(m,T.type)}>`).join(`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Oe=class Oe{static getDeviceDPI(){return this.CONSTANTS.DEFAULT_DPI}static mmToPx(o,m,S){const b=this.normalizeNumber(o,"毫米值"),T=this.getValidDpi(m),F=b*T/this.CONSTANTS.INCH_TO_MM;return S?.direct?F:Math.ceil(F)}static pxToMm(o,m,S){const b=this.normalizeNumber(o,"像素值"),T=this.getValidDpi(m);return b*this.CONSTANTS.INCH_TO_MM/T}static mmToPxBatch(o,m){return o.map(S=>this.mmToPx(S,m,void 0))}static pxToMmBatch(o,m){return o.map(S=>this.pxToMm(S,m,void 0))}static getValidDpi(o){if(o!=null){const S=this.normalizeNumber(o,"DPI值");if(S<=0)throw new Error("DPI值必须大于0");return S}const m=this.getDeviceDPI();if(m<=0)throw new Error("DPI值必须大于0");return m}static normalizeNumber(o,m){if(typeof o=="string"){const S=o.trim();if(S==="")throw new Error(`${m}不能为空字符串`);const b=Number(S);if(isNaN(b))throw new Error(`${m}必须是有效数字,无法转换: "${o}"`);return b}if(typeof o!="number"||isNaN(o))throw new Error(`${m}必须是有效数字`);return o}static validateNumber(o,m){this.normalizeNumber(o,m)}static resetCache(){this._deviceDPI=null}static ptToPx(o,m){const S=this.normalizeNumber(o,"磅值"),b=this.getValidDpi(void 0),T=S*b/72;return m?.direct?T:Math.ceil(T)}static pxToPt(o){const m=this.normalizeNumber(o,"像素值"),S=this.getValidDpi(void 0);return m*72/S}static ptToPxBatch(o,m){return o.map(S=>this.ptToPx(S,m))}static pxToPtBatch(o){return o.map(m=>this.pxToPt(m))}static mmToPt(o){return this.normalizeNumber(o,"毫米值")*72/25.4}};Oe.devicePixelRatio=window.devicePixelRatio,Oe.CONSTANTS={INCH_TO_MM:25.4,DEFAULT_DPI:96,STANDARD_DPI:{SCREEN:96,PRINT:300,HIGH_RES:600}};let Xe=Oe;const ir=(d,o)=>{const m=[],S=Math.PI*2/d;let b=-Math.PI/2;d%2===0&&(b+=S/2);for(let T=0;T<d;T++){const F=T*S+b;m.push({x:Math.cos(F)*o,y:Math.sin(F)*o})}return m},rr={getPolygonVertices:ir};var pe,nr=new Uint8Array(16);function sr(){if(!pe&&(pe=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!pe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return pe(nr)}const or=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function ar(d){return typeof d=="string"&&or.test(d)}var gt=[];for(var Ae=0;Ae<256;++Ae)gt.push((Ae+256).toString(16).substr(1));function lr(d){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,m=(gt[d[o+0]]+gt[d[o+1]]+gt[d[o+2]]+gt[d[o+3]]+"-"+gt[d[o+4]]+gt[d[o+5]]+"-"+gt[d[o+6]]+gt[d[o+7]]+"-"+gt[d[o+8]]+gt[d[o+9]]+"-"+gt[d[o+10]]+gt[d[o+11]]+gt[d[o+12]]+gt[d[o+13]]+gt[d[o+14]]+gt[d[o+15]]).toLowerCase();if(!ar(m))throw TypeError("Stringified UUID is invalid");return m}function hr(d,o,m){d=d||{};var S=d.random||(d.rng||sr)();return S[6]=S[6]&15|64,S[8]=S[8]&63|128,lr(S)}function cr(d){const o=Object.create(null);for(const m of d.split(","))o[m]=1;return m=>m in o}const re=process.env.NODE_ENV!=="production"?Object.freeze({}):{};process.env.NODE_ENV!=="production"&&Object.freeze([]);const zt=()=>{},ur=d=>d.charCodeAt(0)===111&&d.charCodeAt(1)===110&&(d.charCodeAt(2)>122||d.charCodeAt(2)<97),Rt=Object.assign,fr=Object.prototype.hasOwnProperty,We=(d,o)=>fr.call(d,o),dt=Array.isArray,Ut=d=>Ee(d)==="[object Map]",dr=d=>Ee(d)==="[object Set]",mt=d=>typeof d=="function",Dt=d=>typeof d=="string",ue=d=>typeof d=="symbol",yt=d=>d!==null&&typeof d=="object",gr=d=>(yt(d)||mt(d))&&mt(d.then)&&mt(d.catch),pr=Object.prototype.toString,Ee=d=>pr.call(d),pi=d=>Ee(d).slice(8,-1),mr=d=>Ee(d)==="[object Object]",qe=d=>Dt(d)&&d!=="NaN"&&d[0]!=="-"&&""+parseInt(d,10)===d,mi=d=>{const o=Object.create(null);return(m=>o[m]||(o[m]=d(m)))},vi=mi(d=>d.charAt(0).toUpperCase()+d.slice(1)),vr=mi(d=>d?`on${vi(d)}`:""),It=(d,o)=>!Object.is(d,o);let li;const Pe=()=>li||(li=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ke(d){if(dt(d)){const o={};for(let m=0;m<d.length;m++){const S=d[m],b=Dt(S)?Sr(S):Ke(S);if(b)for(const T in b)o[T]=b[T]}return o}else if(Dt(d)||yt(d))return d}const _r=/;(?![^(]*\))/g,yr=/:([^]+)/,Cr=/\/\*[^]*?\*\//g;function Sr(d){const o={};return d.replace(Cr,"").split(_r).forEach(m=>{if(m){const S=m.split(yr);S.length>1&&(o[S[0].trim()]=S[1].trim())}}),o}function Je(d){let o="";if(Dt(d))o=d;else if(dt(d))for(let m=0;m<d.length;m++){const S=Je(d[m]);S&&(o+=S+" ")}else if(yt(d))for(const m in d)d[m]&&(o+=m+" ");return o.trim()}function Tt(d,...o){console.warn(`[Vue warn] ${d}`,...o)}let ht;const ke=new WeakSet;class br{constructor(o){this.fn=o,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ke.has(this)&&(ke.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||yi(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,hi(this),Ci(this);const o=ht,m=xt;ht=this,xt=!0;try{return this.fn()}finally{process.env.NODE_ENV!=="production"&&ht!==this&&Tt("Active effect was not restored correctly - this is likely a Vue internal bug."),Si(this),ht=o,xt=m,this.flags&=-3}}stop(){if(this.flags&1){for(let o=this.deps;o;o=o.nextDep)Ze(o);this.deps=this.depsTail=void 0,hi(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ke.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){Ve(this)&&this.run()}get dirty(){return Ve(this)}}let _i=0,ee,ie;function yi(d,o=!1){if(d.flags|=8,o){d.next=ie,ie=d;return}d.next=ee,ee=d}function $e(){_i++}function Qe(){if(--_i>0)return;if(ie){let o=ie;for(ie=void 0;o;){const m=o.next;o.next=void 0,o.flags&=-9,o=m}}let d;for(;ee;){let o=ee;for(ee=void 0;o;){const m=o.next;if(o.next=void 0,o.flags&=-9,o.flags&1)try{o.trigger()}catch(S){d||(d=S)}o=m}}if(d)throw d}function Ci(d){for(let o=d.deps;o;o=o.nextDep)o.version=-1,o.prevActiveLink=o.dep.activeLink,o.dep.activeLink=o}function Si(d){let o,m=d.depsTail,S=m;for(;S;){const b=S.prevDep;S.version===-1?(S===m&&(m=b),Ze(S),xr(S)):o=S,S.dep.activeLink=S.prevActiveLink,S.prevActiveLink=void 0,S=b}d.deps=o,d.depsTail=m}function Ve(d){for(let o=d.deps;o;o=o.nextDep)if(o.dep.version!==o.version||o.dep.computed&&(bi(o.dep.computed)||o.dep.version!==o.version))return!0;return!!d._dirty}function bi(d){if(d.flags&4&&!(d.flags&16)||(d.flags&=-17,d.globalVersion===ne)||(d.globalVersion=ne,!d.isSSR&&d.flags&128&&(!d.deps&&!d._dirty||!Ve(d))))return;d.flags|=2;const o=d.dep,m=ht,S=xt;ht=d,xt=!0;try{Ci(d);const b=d.fn(d._value);(o.version===0||It(b,d._value))&&(d.flags|=128,d._value=b,o.version++)}catch(b){throw o.version++,b}finally{ht=m,xt=S,Si(d),d.flags&=-3}}function Ze(d,o=!1){const{dep:m,prevSub:S,nextSub:b}=d;if(S&&(S.nextSub=b,d.prevSub=void 0),b&&(b.prevSub=S,d.nextSub=void 0),process.env.NODE_ENV!=="production"&&m.subsHead===d&&(m.subsHead=b),m.subs===d&&(m.subs=S,!S&&m.computed)){m.computed.flags&=-5;for(let T=m.computed.deps;T;T=T.nextDep)Ze(T,!0)}!o&&!--m.sc&&m.map&&m.map.delete(m.key)}function xr(d){const{prevDep:o,nextDep:m}=d;o&&(o.nextDep=m,d.prevDep=void 0),m&&(m.prevDep=o,d.nextDep=void 0)}let xt=!0;const xi=[];function Kt(){xi.push(xt),xt=!1}function Jt(){const d=xi.pop();xt=d===void 0?!0:d}function hi(d){const{cleanup:o}=d;if(d.cleanup=void 0,o){const m=ht;ht=void 0;try{o()}finally{ht=m}}}let ne=0;class wr{constructor(o,m){this.sub=o,this.dep=m,this.version=m.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ti{constructor(o){this.computed=o,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,process.env.NODE_ENV!=="production"&&(this.subsHead=void 0)}track(o){if(!ht||!xt||ht===this.computed)return;let m=this.activeLink;if(m===void 0||m.sub!==ht)m=this.activeLink=new wr(ht,this),ht.deps?(m.prevDep=ht.depsTail,ht.depsTail.nextDep=m,ht.depsTail=m):ht.deps=ht.depsTail=m,wi(m);else if(m.version===-1&&(m.version=this.version,m.nextDep)){const S=m.nextDep;S.prevDep=m.prevDep,m.prevDep&&(m.prevDep.nextDep=S),m.prevDep=ht.depsTail,m.nextDep=void 0,ht.depsTail.nextDep=m,ht.depsTail=m,ht.deps===m&&(ht.deps=S)}return process.env.NODE_ENV!=="production"&&ht.onTrack&&ht.onTrack(Rt({effect:ht},o)),m}trigger(o){this.version++,ne++,this.notify(o)}notify(o){$e();try{if(process.env.NODE_ENV!=="production")for(let m=this.subsHead;m;m=m.nextSub)m.sub.onTrigger&&!(m.sub.flags&8)&&m.sub.onTrigger(Rt({effect:m.sub},o));for(let m=this.subs;m;m=m.prevSub)m.sub.notify()&&m.sub.dep.notify()}finally{Qe()}}}function wi(d){if(d.dep.sc++,d.sub.flags&4){const o=d.dep.computed;if(o&&!d.dep.subs){o.flags|=20;for(let S=o.deps;S;S=S.nextDep)wi(S)}const m=d.dep.subs;m!==d&&(d.prevSub=m,m&&(m.nextSub=d)),process.env.NODE_ENV!=="production"&&d.dep.subsHead===void 0&&(d.dep.subsHead=d),d.dep.subs=d}}const Ye=new WeakMap,Xt=Symbol(process.env.NODE_ENV!=="production"?"Object iterate":""),He=Symbol(process.env.NODE_ENV!=="production"?"Map keys iterate":""),se=Symbol(process.env.NODE_ENV!=="production"?"Array iterate":"");function _t(d,o,m){if(xt&&ht){let S=Ye.get(d);S||Ye.set(d,S=new Map);let b=S.get(m);b||(S.set(m,b=new ti),b.map=S,b.key=m),process.env.NODE_ENV!=="production"?b.track({target:d,type:o,key:m}):b.track()}}function Ft(d,o,m,S,b,T){const F=Ye.get(d);if(!F){ne++;return}const u=n=>{n&&(process.env.NODE_ENV!=="production"?n.trigger({target:d,type:o,key:m,newValue:S,oldValue:b,oldTarget:T}):n.trigger())};if($e(),o==="clear")F.forEach(u);else{const n=dt(d),l=n&&qe(m);if(n&&m==="length"){const a=Number(S);F.forEach((t,i)=>{(i==="length"||i===se||!ue(i)&&i>=a)&&u(t)})}else switch((m!==void 0||F.has(void 0))&&u(F.get(m)),l&&u(F.get(se)),o){case"add":n?l&&u(F.get("length")):(u(F.get(Xt)),Ut(d)&&u(F.get(He)));break;case"delete":n||(u(F.get(Xt)),Ut(d)&&u(F.get(He)));break;case"set":Ut(d)&&u(F.get(Xt));break}}Qe()}function Vt(d){const o=at(d);return o===d?o:(_t(o,"iterate",se),Ct(d)?o:o.map(At))}function ei(d){return _t(d=at(d),"iterate",se),d}function kt(d,o){return Ot(d)?Gt(d)?ae(At(o)):ae(o):At(o)}const Tr={__proto__:null,[Symbol.iterator](){return Me(this,Symbol.iterator,d=>kt(this,d))},concat(...d){return Vt(this).concat(...d.map(o=>dt(o)?Vt(o):o))},entries(){return Me(this,"entries",d=>(d[1]=kt(this,d[1]),d))},every(d,o){return Et(this,"every",d,o,void 0,arguments)},filter(d,o){return Et(this,"filter",d,o,m=>m.map(S=>kt(this,S)),arguments)},find(d,o){return Et(this,"find",d,o,m=>kt(this,m),arguments)},findIndex(d,o){return Et(this,"findIndex",d,o,void 0,arguments)},findLast(d,o){return Et(this,"findLast",d,o,m=>kt(this,m),arguments)},findLastIndex(d,o){return Et(this,"findLastIndex",d,o,void 0,arguments)},forEach(d,o){return Et(this,"forEach",d,o,void 0,arguments)},includes(...d){return Fe(this,"includes",d)},indexOf(...d){return Fe(this,"indexOf",d)},join(d){return Vt(this).join(d)},lastIndexOf(...d){return Fe(this,"lastIndexOf",d)},map(d,o){return Et(this,"map",d,o,void 0,arguments)},pop(){return Zt(this,"pop")},push(...d){return Zt(this,"push",d)},reduce(d,...o){return ci(this,"reduce",d,o)},reduceRight(d,...o){return ci(this,"reduceRight",d,o)},shift(){return Zt(this,"shift")},some(d,o){return Et(this,"some",d,o,void 0,arguments)},splice(...d){return Zt(this,"splice",d)},toReversed(){return Vt(this).toReversed()},toSorted(d){return Vt(this).toSorted(d)},toSpliced(...d){return Vt(this).toSpliced(...d)},unshift(...d){return Zt(this,"unshift",d)},values(){return Me(this,"values",d=>kt(this,d))}};function Me(d,o,m){const S=ei(d),b=S[o]();return S!==d&&!Ct(d)&&(b._next=b.next,b.next=()=>{const T=b._next();return T.done||(T.value=m(T.value)),T}),b}const Or=Array.prototype;function Et(d,o,m,S,b,T){const F=ei(d),u=F!==d&&!Ct(d),n=F[o];if(n!==Or[o]){const t=n.apply(d,T);return u?At(t):t}let l=m;F!==d&&(u?l=function(t,i){return m.call(this,kt(d,t),i,d)}:m.length>2&&(l=function(t,i){return m.call(this,t,i,d)}));const a=n.call(F,l,S);return u&&b?b(a):a}function ci(d,o,m,S){const b=ei(d);let T=m;return b!==d&&(Ct(d)?m.length>3&&(T=function(F,u,n){return m.call(this,F,u,n,d)}):T=function(F,u,n){return m.call(this,F,kt(d,u),n,d)}),b[o](T,...S)}function Fe(d,o,m){const S=at(d);_t(S,"iterate",se);const b=S[o](...m);return(b===-1||b===!1)&&Se(m[0])?(m[0]=at(m[0]),S[o](...m)):b}function Zt(d,o,m=[]){Kt(),$e();const S=at(d)[o].apply(d,m);return Qe(),Jt(),S}const Er=cr("__proto__,__v_isRef,__isVue"),Ti=new Set(Object.getOwnPropertyNames(Symbol).filter(d=>d!=="arguments"&&d!=="caller").map(d=>Symbol[d]).filter(ue));function Pr(d){ue(d)||(d=String(d));const o=at(this);return _t(o,"has",d),o.hasOwnProperty(d)}class Oi{constructor(o=!1,m=!1){this._isReadonly=o,this._isShallow=m}get(o,m,S){if(m==="__v_skip")return o.__v_skip;const b=this._isReadonly,T=this._isShallow;if(m==="__v_isReactive")return!b;if(m==="__v_isReadonly")return b;if(m==="__v_isShallow")return T;if(m==="__v_raw")return S===(b?T?Br:Di:T?jr:Pi).get(o)||Object.getPrototypeOf(o)===Object.getPrototypeOf(S)?o:void 0;const F=dt(o);if(!b){let n;if(F&&(n=Tr[m]))return n;if(m==="hasOwnProperty")return Pr}const u=Reflect.get(o,m,St(o)?o:S);if((ue(m)?Ti.has(m):Er(m))||(b||_t(o,"get",m),T))return u;if(St(u)){const n=F&&qe(m)?u:u.value;return b&&yt(n)?oe(n):n}return yt(u)?b?oe(u):Ai(u):u}}class Dr extends Oi{constructor(o=!1){super(!1,o)}set(o,m,S,b){let T=o[m];const F=dt(o)&&qe(m);if(!this._isShallow){const l=Ot(T);if(!Ct(S)&&!Ot(S)&&(T=at(T),S=at(S)),!F&&St(T)&&!St(S))return l?(process.env.NODE_ENV!=="production"&&Tt(`Set operation on key "${String(m)}" failed: target is readonly.`,o[m]),!0):(T.value=S,!0)}const u=F?Number(m)<o.length:We(o,m),n=Reflect.set(o,m,S,St(o)?o:b);return o===at(b)&&(u?It(S,T)&&Ft(o,"set",m,S,T):Ft(o,"add",m,S)),n}deleteProperty(o,m){const S=We(o,m),b=o[m],T=Reflect.deleteProperty(o,m);return T&&S&&Ft(o,"delete",m,void 0,b),T}has(o,m){const S=Reflect.has(o,m);return(!ue(m)||!Ti.has(m))&&_t(o,"has",m),S}ownKeys(o){return _t(o,"iterate",dt(o)?"length":Xt),Reflect.ownKeys(o)}}class Ar extends Oi{constructor(o=!1){super(!0,o)}set(o,m){return process.env.NODE_ENV!=="production"&&Tt(`Set operation on key "${String(m)}" failed: target is readonly.`,o),!0}deleteProperty(o,m){return process.env.NODE_ENV!=="production"&&Tt(`Delete operation on key "${String(m)}" failed: target is readonly.`,o),!0}}const kr=new Dr,Mr=new Ar,ze=d=>d,me=d=>Reflect.getPrototypeOf(d);function Fr(d,o,m){return function(...S){const b=this.__v_raw,T=at(b),F=Ut(T),u=d==="entries"||d===Symbol.iterator&&F,n=d==="keys"&&F,l=b[d](...S),a=m?ze:o?ae:At;return!o&&_t(T,"iterate",n?He:Xt),{next(){const{value:t,done:i}=l.next();return i?{value:t,done:i}:{value:u?[a(t[0]),a(t[1])]:a(t),done:i}},[Symbol.iterator](){return this}}}}function ve(d){return function(...o){if(process.env.NODE_ENV!=="production"){const m=o[0]?`on key "${o[0]}" `:"";Tt(`${vi(d)} operation ${m}failed: target is readonly.`,at(this))}return d==="delete"?!1:d==="clear"?void 0:this}}function Lr(d,o){const m={get(b){const T=this.__v_raw,F=at(T),u=at(b);d||(It(b,u)&&_t(F,"get",b),_t(F,"get",u));const{has:n}=me(F),l=o?ze:d?ae:At;if(n.call(F,b))return l(T.get(b));if(n.call(F,u))return l(T.get(u));T!==F&&T.get(b)},get size(){const b=this.__v_raw;return!d&&_t(at(b),"iterate",Xt),b.size},has(b){const T=this.__v_raw,F=at(T),u=at(b);return d||(It(b,u)&&_t(F,"has",b),_t(F,"has",u)),b===u?T.has(b):T.has(b)||T.has(u)},forEach(b,T){const F=this,u=F.__v_raw,n=at(u),l=o?ze:d?ae:At;return!d&&_t(n,"iterate",Xt),u.forEach((a,t)=>b.call(T,l(a),l(t),F))}};return Rt(m,d?{add:ve("add"),set:ve("set"),delete:ve("delete"),clear:ve("clear")}:{add(b){!o&&!Ct(b)&&!Ot(b)&&(b=at(b));const T=at(this);return me(T).has.call(T,b)||(T.add(b),Ft(T,"add",b,b)),this},set(b,T){!o&&!Ct(T)&&!Ot(T)&&(T=at(T));const F=at(this),{has:u,get:n}=me(F);let l=u.call(F,b);l?process.env.NODE_ENV!=="production"&&ui(F,u,b):(b=at(b),l=u.call(F,b));const a=n.call(F,b);return F.set(b,T),l?It(T,a)&&Ft(F,"set",b,T,a):Ft(F,"add",b,T),this},delete(b){const T=at(this),{has:F,get:u}=me(T);let n=F.call(T,b);n?process.env.NODE_ENV!=="production"&&ui(T,F,b):(b=at(b),n=F.call(T,b));const l=u?u.call(T,b):void 0,a=T.delete(b);return n&&Ft(T,"delete",b,void 0,l),a},clear(){const b=at(this),T=b.size!==0,F=process.env.NODE_ENV!=="production"?Ut(b)?new Map(b):new Set(b):void 0,u=b.clear();return T&&Ft(b,"clear",void 0,void 0,F),u}}),["keys","values","entries",Symbol.iterator].forEach(b=>{m[b]=Fr(b,d,o)}),m}function Ei(d,o){const m=Lr(d,o);return(S,b,T)=>b==="__v_isReactive"?!d:b==="__v_isReadonly"?d:b==="__v_raw"?S:Reflect.get(We(m,b)&&b in S?m:S,b,T)}const Ir={get:Ei(!1,!1)},Rr={get:Ei(!0,!1)};function ui(d,o,m){const S=at(m);if(S!==m&&o.call(d,S)){const b=pi(d);Tt(`Reactive ${b} contains both the raw and reactive versions of the same object${b==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const Pi=new WeakMap,jr=new WeakMap,Di=new WeakMap,Br=new WeakMap;function Nr(d){switch(d){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Xr(d){return d.__v_skip||!Object.isExtensible(d)?0:Nr(pi(d))}function Ai(d){return Ot(d)?d:ki(d,!1,kr,Ir,Pi)}function oe(d){return ki(d,!0,Mr,Rr,Di)}function ki(d,o,m,S,b){if(!yt(d))return process.env.NODE_ENV!=="production"&&Tt(`value cannot be made ${o?"readonly":"reactive"}: ${String(d)}`),d;if(d.__v_raw&&!(o&&d.__v_isReactive))return d;const T=Xr(d);if(T===0)return d;const F=b.get(d);if(F)return F;const u=new Proxy(d,T===2?S:m);return b.set(d,u),u}function Gt(d){return Ot(d)?Gt(d.__v_raw):!!(d&&d.__v_isReactive)}function Ot(d){return!!(d&&d.__v_isReadonly)}function Ct(d){return!!(d&&d.__v_isShallow)}function Se(d){return d?!!d.__v_raw:!1}function at(d){const o=d&&d.__v_raw;return o?at(o):d}const At=d=>yt(d)?Ai(d):d,ae=d=>yt(d)?oe(d):d;function St(d){return d?d.__v_isRef===!0:!1}function jt(d){return Wr(d,!1)}function Wr(d,o){return St(d)?d:new Vr(d,o)}class Vr{constructor(o,m){this.dep=new ti,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=m?o:at(o),this._value=m?o:At(o),this.__v_isShallow=m}get value(){return process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track(),this._value}set value(o){const m=this._rawValue,S=this.__v_isShallow||Ct(o)||Ot(o);o=S?o:at(o),It(o,m)&&(this._rawValue=o,this._value=S?o:At(o),process.env.NODE_ENV!=="production"?this.dep.trigger({target:this,type:"set",key:"value",newValue:o,oldValue:m}):this.dep.trigger())}}function Yr(d){return St(d)?d.value:d}class Hr{constructor(o,m,S){this.fn=o,this.setter=m,this._value=void 0,this.dep=new ti(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ne-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!m,this.isSSR=S}notify(){if(this.flags|=16,!(this.flags&8)&&ht!==this)return yi(this,!0),!0;process.env.NODE_ENV}get value(){const o=process.env.NODE_ENV!=="production"?this.dep.track({target:this,type:"get",key:"value"}):this.dep.track();return bi(this),o&&(o.version=this.dep.version),this._value}set value(o){this.setter?this.setter(o):process.env.NODE_ENV!=="production"&&Tt("Write operation failed: computed value is readonly")}}function zr(d,o,m=!1){let S,b;mt(d)?S=d:(S=d.get,b=d.set);const T=new Hr(S,b,m);return process.env.NODE_ENV,T}const _e={},be=new WeakMap;let Nt;function Ur(d,o=!1,m=Nt){if(m){let S=be.get(m);S||be.set(m,S=[]),S.push(d)}else process.env.NODE_ENV!=="production"&&!o&&Tt("onWatcherCleanup() was called when there was no active watcher to associate with.")}function Gr(d,o,m=re){const{immediate:S,deep:b,once:T,scheduler:F,augmentJob:u,call:n}=m,l=p=>{(m.onWarn||Tt)("Invalid watch source: ",p,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},a=p=>b?p:Ct(p)||b===!1||b===0?Lt(p,1):Lt(p);let t,i,e,s,h=!1,r=!1;if(St(d)?(i=()=>d.value,h=Ct(d)):Gt(d)?(i=()=>a(d),h=!0):dt(d)?(r=!0,h=d.some(p=>Gt(p)||Ct(p)),i=()=>d.map(p=>{if(St(p))return p.value;if(Gt(p))return a(p);if(mt(p))return n?n(p,2):p();process.env.NODE_ENV!=="production"&&l(p)})):mt(d)?o?i=n?()=>n(d,2):d:i=()=>{if(e){Kt();try{e()}finally{Jt()}}const p=Nt;Nt=t;try{return n?n(d,3,[s]):d(s)}finally{Nt=p}}:(i=zt,process.env.NODE_ENV!=="production"&&l(d)),o&&b){const p=i,v=b===!0?1/0:b;i=()=>Lt(p(),v)}const c=()=>{t.stop()};if(T&&o){const p=o;o=(...v)=>{p(...v),c()}}let f=r?new Array(d.length).fill(_e):_e;const g=p=>{if(!(!(t.flags&1)||!t.dirty&&!p))if(o){const v=t.run();if(b||h||(r?v.some((_,x)=>It(_,f[x])):It(v,f))){e&&e();const _=Nt;Nt=t;try{const x=[v,f===_e?void 0:r&&f[0]===_e?[]:f,s];f=v,n?n(o,3,x):o(...x)}finally{Nt=_}}}else t.run()};return u&&u(g),t=new br(i),t.scheduler=F?()=>F(g,!1):g,s=p=>Ur(p,!1,t),e=t.onStop=()=>{const p=be.get(t);if(p){if(n)n(p,4);else for(const v of p)v();be.delete(t)}},process.env.NODE_ENV!=="production"&&(t.onTrack=m.onTrack,t.onTrigger=m.onTrigger),o?S?g(!0):f=t.run():F?F(g.bind(null,!0),!0):t.run(),c.pause=t.pause.bind(t),c.resume=t.resume.bind(t),c.stop=c,c}function Lt(d,o=1/0,m){if(o<=0||!yt(d)||d.__v_skip||(m=m||new Map,(m.get(d)||0)>=o))return d;if(m.set(d,o),o--,St(d))Lt(d.value,o,m);else if(dt(d))for(let S=0;S<d.length;S++)Lt(d[S],o,m);else if(dr(d)||Ut(d))d.forEach(S=>{Lt(S,o,m)});else if(mr(d)){for(const S in d)Lt(d[S],o,m);for(const S of Object.getOwnPropertySymbols(d))Object.prototype.propertyIsEnumerable.call(d,S)&&Lt(d[S],o,m)}return d}const Wt=[];function qr(d){Wt.push(d)}function Kr(){Wt.pop()}let Le=!1;function pt(d,...o){if(Le)return;Le=!0,Kt();const m=Wt.length?Wt[Wt.length-1].component:null,S=m&&m.appContext.config.warnHandler,b=Jr();if(S)De(S,m,11,[d+o.map(T=>{var F,u;return(u=(F=T.toString)==null?void 0:F.call(T))!=null?u:JSON.stringify(T)}).join(""),m&&m.proxy,b.map(({vnode:T})=>`at <${Gi(m,T.type)}>`).join(`
2
2
  `),b]);else{const T=[`[Vue warn]: ${d}`,...o];b.length&&T.push(`
3
- `,...$r(b)),console.warn(...T)}Jt(),Ie=!1}function Jr(){let d=Wt[Wt.length-1];if(!d)return[];const o=[];for(;d;){const m=o[0];m&&m.vnode===d?m.recurseCount++:o.push({vnode:d,recurseCount:0});const S=d.component&&d.component.parent;d=S&&S.vnode}return o}function $r(d){const o=[];return d.forEach((m,S)=>{o.push(...S===0?[]:[`
4
- `],...Qr(m))}),o}function Qr({vnode:d,recurseCount:o}){const m=o>0?`... (${o} recursive calls)`:"",S=d.component?d.component.parent==null:!1,b=` at <${Gi(d.component,d.type,S)}`,T=">"+m;return d.props?[b,...Zr(d.props),T]:[b+T]}function Zr(d){const o=[],m=Object.keys(d);return m.slice(0,3).forEach(S=>{o.push(...Mi(S,d[S]))}),m.length>3&&o.push(" ..."),o}function Mi(d,o,m){return Dt(o)?(o=JSON.stringify(o),m?o:[`${d}=${o}`]):typeof o=="number"||typeof o=="boolean"||o==null?m?o:[`${d}=${o}`]:St(o)?(o=Mi(d,at(o.value),!0),m?o:[`${d}=Ref<`,o,">"]):mt(o)?[`${d}=fn${o.name?`<${o.name}>`:""}`]:(o=at(o),m?o:[`${d}=`,o])}const ii={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function De(d,o,m,S){try{return S?d(...S):d()}catch(b){ni(b,o,m)}}function ri(d,o,m,S){if(mt(d)){const b=De(d,o,m,S);return b&&gr(b)&&b.catch(T=>{ni(T,o,m)}),b}if(dt(d)){const b=[];for(let T=0;T<d.length;T++)b.push(ri(d[T],o,m,S));return b}else process.env.NODE_ENV!=="production"&&pt(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof d}`)}function ni(d,o,m,S=!0){const b=o?o.vnode:null,{errorHandler:T,throwUnhandledErrorInProduction:F}=o&&o.appContext.config||re;if(o){let u=o.parent;const n=o.proxy,l=process.env.NODE_ENV!=="production"?ii[m]:`https://vuejs.org/error-reference/#runtime-${m}`;for(;u;){const a=u.ec;if(a){for(let t=0;t<a.length;t++)if(a[t](d,n,l)===!1)return}u=u.parent}if(T){Kt(),De(T,null,10,[d,n,l]),Jt();return}}tn(d,m,b,S,F)}function tn(d,o,m,S=!0,b=!1){if(process.env.NODE_ENV!=="production"){const T=ii[o];if(m&&qr(m),pt(`Unhandled error${T?` during execution of ${T}`:""}`),m&&Kr(),S)throw d;console.error(d)}else{if(b)throw d;console.error(d)}}const bt=[];let Pt=-1;const qt=[];let Mt=null,Yt=0;const en=Promise.resolve();let Ue=null;const rn=100;function nn(d){let o=Pt+1,m=bt.length;for(;o<m;){const S=o+m>>>1,b=bt[S],T=le(b);T<d||T===d&&b.flags&2?o=S+1:m=S}return o}function Fi(d){if(!(d.flags&1)){const o=le(d),m=bt[bt.length-1];!m||!(d.flags&2)&&o>=le(m)?bt.push(d):bt.splice(nn(o),0,d),d.flags|=1,Ii()}}function Ii(){Ue||(Ue=en.then(Ri))}function Li(d){dt(d)?qt.push(...d):Mt&&d.id===-1?Mt.splice(Yt+1,0,d):d.flags&1||(qt.push(d),d.flags|=1),Ii()}function sn(d){if(qt.length){const o=[...new Set(qt)].sort((m,S)=>le(m)-le(S));if(qt.length=0,Mt){Mt.push(...o);return}for(Mt=o,process.env.NODE_ENV!=="production"&&(d=d||new Map),Yt=0;Yt<Mt.length;Yt++){const m=Mt[Yt];process.env.NODE_ENV!=="production"&&ji(d,m)||(m.flags&4&&(m.flags&=-2),m.flags&8||m(),m.flags&=-2)}Mt=null,Yt=0}}const le=d=>d.id==null?d.flags&2?-1:1/0:d.id;function Ri(d){process.env.NODE_ENV!=="production"&&(d=d||new Map);const o=process.env.NODE_ENV!=="production"?m=>ji(d,m):zt;try{for(Pt=0;Pt<bt.length;Pt++){const m=bt[Pt];if(m&&!(m.flags&8)){if(process.env.NODE_ENV!=="production"&&o(m))continue;m.flags&4&&(m.flags&=-2),De(m,m.i,m.i?15:14),m.flags&4||(m.flags&=-2)}}}finally{for(;Pt<bt.length;Pt++){const m=bt[Pt];m&&(m.flags&=-2)}Pt=-1,bt.length=0,sn(d),Ue=null,(bt.length||qt.length)&&Ri(d)}}function ji(d,o){const m=d.get(o)||0;if(m>rn){const S=o.i,b=S&&Ui(S.type);return ni(`Maximum recursive updates exceeded${b?` in component <${b}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return d.set(o,m+1),!1}const Le=new Map;process.env.NODE_ENV!=="production"&&(Pe().__VUE_HMR_RUNTIME__={createRecord:Re(on),rerender:Re(an),reload:Re(ln)});const xe=new Map;function on(d,o){return xe.has(d)?!1:(xe.set(d,{initialDef:we(o),instances:new Set}),!0)}function we(d){return qi(d)?d.__vccOpts:d}function an(d,o){const m=xe.get(d);m&&(m.initialDef.render=o,[...m.instances].forEach(S=>{o&&(S.render=o,we(S.type).render=o),S.renderCache=[],S.job.flags&8||S.update()}))}function ln(d,o){const m=xe.get(d);if(!m)return;o=we(o),fi(m.initialDef,o);const S=[...m.instances];for(let b=0;b<S.length;b++){const T=S[b],F=we(T.type);let u=Le.get(F);u||(F!==m.initialDef&&fi(F,o),Le.set(F,u=new Set)),u.add(T),T.appContext.propsCache.delete(T.type),T.appContext.emitsCache.delete(T.type),T.appContext.optionsCache.delete(T.type),T.ceReload?(u.add(T),T.ceReload(o.styles),u.delete(T)):T.parent?Fi(()=>{T.job.flags&8||(T.parent.update(),u.delete(T))}):T.appContext.reload?T.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),T.root.ce&&T!==T.root&&T.root.ce._removeChildStyle(F)}Li(()=>{Le.clear()})}function fi(d,o){Rt(d,o);for(const m in d)m!=="__file"&&!(m in o)&&delete d[m]}function Re(d){return(o,m)=>{try{return d(o,m)}catch(S){console.error(S),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let Ht,ye=[];function Bi(d,o){var m,S;Ht=d,Ht?(Ht.enabled=!0,ye.forEach(({event:b,args:T})=>Ht.emit(b,...T)),ye=[]):typeof window<"u"&&window.HTMLElement&&!((S=(m=window.navigator)==null?void 0:m.userAgent)!=null&&S.includes("jsdom"))?((o.__VUE_DEVTOOLS_HOOK_REPLAY__=o.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(T=>{Bi(T,o)}),setTimeout(()=>{Ht||(o.__VUE_DEVTOOLS_HOOK_REPLAY__=null,ye=[])},3e3)):ye=[]}let he=null,hn=null;const cn=d=>d.__isTeleport;function Ni(d,o){d.shapeFlag&6&&d.component?(d.transition=o,Ni(d.component.subTree,o)):d.shapeFlag&128?(d.ssContent.transition=o.clone(d.ssContent),d.ssFallback.transition=o.clone(d.ssFallback)):d.transition=o}Pe().requestIdleCallback;Pe().cancelIdleCallback;function un(d,o,m=$t,S=!1){if(m){const b=m[d]||(m[d]=[]),T=o.__weh||(o.__weh=(...F)=>{Kt();const u=In(m),n=ri(o,m,d,F);return u(),Jt(),n});return S?b.unshift(T):b.push(T),T}else if(process.env.NODE_ENV!=="production"){const b=vr(ii[d].replace(/ hook$/,""));pt(`${b} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const fn=d=>(o,m=$t)=>{(!ce||d==="sp")&&un(d,(...S)=>o(...S),m)},dn=fn("m"),gn=Symbol.for("v-ndc"),pn={};process.env.NODE_ENV!=="production"&&(pn.ownKeys=d=>(pt("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(d)));let mn=null;function vn(d,o,m=!1){const S=oi();if(S||mn){let b=S?S.parent==null||S.ce?S.vnode.appContext&&S.vnode.appContext.provides:S.parent.provides:void 0;if(b&&d in b)return b[d];if(arguments.length>1)return m&&mt(o)?o.call(S&&S.proxy):o;process.env.NODE_ENV!=="production"&&pt(`injection "${String(d)}" not found.`)}else process.env.NODE_ENV!=="production"&&pt("inject() can only be used inside setup() or functional components.")}const _n=Symbol.for("v-scx"),yn=()=>{{const d=vn(_n);return d||process.env.NODE_ENV!=="production"&&pt("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),d}};function Xi(d,o,m){return process.env.NODE_ENV!=="production"&&!mt(o)&&pt("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Cn(d,o,m)}function Cn(d,o,m=re){const{immediate:S,deep:b,flush:T,once:F}=m;process.env.NODE_ENV!=="production"&&!o&&(S!==void 0&&pt('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),b!==void 0&&pt('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),F!==void 0&&pt('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const u=Rt({},m);process.env.NODE_ENV!=="production"&&(u.onWarn=pt);const n=o&&S||!o&&T!=="post";let l;if(ce){if(T==="sync"){const e=yn();l=e.__watcherHandles||(e.__watcherHandles=[])}else if(!n){const e=()=>{};return e.stop=zt,e.resume=zt,e.pause=zt,e}}const a=$t;u.call=(e,s,h)=>ri(e,a,s,h);let t=!1;T==="post"?u.scheduler=e=>{bn(e,a&&a.suspense)}:T!=="sync"&&(t=!0,u.scheduler=(e,s)=>{s?e():Fi(e)}),u.augmentJob=e=>{o&&(e.flags|=4),t&&(e.flags|=2,a&&(e.id=a.uid,e.i=a))};const i=Gr(d,o,u);return ce&&(l?l.push(i):n&&i()),i}const Sn={},Wi=d=>Object.getPrototypeOf(d)===Sn,bn=wn,xn=d=>d.__isSuspense;function wn(d,o){o&&o.pendingBranch?dt(d)?o.effects.push(...d):o.effects.push(d):Li(d)}const Vi=Symbol.for("v-fgt"),Tn=Symbol.for("v-txt"),On=Symbol.for("v-cmt");function En(d){return d?d.__v_isVNode===!0:!1}const Pn=(...d)=>Hi(...d),Yi=({key:d})=>d??null,Ce=({ref:d,ref_key:o,ref_for:m})=>(typeof d=="number"&&(d=""+d),d!=null?Dt(d)||St(d)||mt(d)?{i:he,r:d,k:o,f:!!m}:d:null);function Dn(d,o=null,m=null,S=0,b=null,T=d===Vi?0:1,F=!1,u=!1){const n={__v_isVNode:!0,__v_skip:!0,type:d,props:o,key:o&&Yi(o),ref:o&&Ce(o),scopeId:hn,slotScopeIds:null,children:m,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:T,patchFlag:S,dynamicProps:b,dynamicChildren:null,appContext:null,ctx:he};return u?(si(n,m),T&128&&d.normalize(n)):m&&(n.shapeFlag|=Dt(m)?8:16),process.env.NODE_ENV!=="production"&&n.key!==n.key&&pt("VNode created with invalid key (NaN). VNode type:",n.type),n}const An=process.env.NODE_ENV!=="production"?Pn:Hi;function Hi(d,o=null,m=null,S=0,b=null,T=!1){if((!d||d===gn)&&(process.env.NODE_ENV!=="production"&&!d&&pt(`Invalid vnode type when creating vnode: ${d}.`),d=On),En(d)){const u=Te(d,o,!0);return m&&si(u,m),u.patchFlag=-2,u}if(qi(d)&&(d=d.__vccOpts),o){o=kn(o);let{class:u,style:n}=o;u&&!Dt(u)&&(o.class=Je(u)),yt(n)&&(Se(n)&&!dt(n)&&(n=Rt({},n)),o.style=Ke(n))}const F=Dt(d)?1:xn(d)?128:cn(d)?64:yt(d)?4:mt(d)?2:0;return process.env.NODE_ENV!=="production"&&F&4&&Se(d)&&(d=at(d),pt("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
5
- Component that was made reactive: `,d)),Dn(d,o,m,S,b,F,T,!0)}function kn(d){return d?Se(d)||Wi(d)?Rt({},d):d:null}function Te(d,o,m=!1,S=!1){const{props:b,ref:T,patchFlag:F,children:u,transition:n}=d,l=o?Fn(b||{},o):b,a={__v_isVNode:!0,__v_skip:!0,type:d.type,props:l,key:l&&Yi(l),ref:o&&o.ref?m&&T?dt(T)?T.concat(Ce(o)):[T,Ce(o)]:Ce(o):T,scopeId:d.scopeId,slotScopeIds:d.slotScopeIds,children:process.env.NODE_ENV!=="production"&&F===-1&&dt(u)?u.map(zi):u,target:d.target,targetStart:d.targetStart,targetAnchor:d.targetAnchor,staticCount:d.staticCount,shapeFlag:d.shapeFlag,patchFlag:o&&d.type!==Vi?F===-1?16:F|16:F,dynamicProps:d.dynamicProps,dynamicChildren:d.dynamicChildren,appContext:d.appContext,dirs:d.dirs,transition:n,component:d.component,suspense:d.suspense,ssContent:d.ssContent&&Te(d.ssContent),ssFallback:d.ssFallback&&Te(d.ssFallback),placeholder:d.placeholder,el:d.el,anchor:d.anchor,ctx:d.ctx,ce:d.ce};return n&&S&&Ni(a,n.clone(a)),a}function zi(d){const o=Te(d);return dt(d.children)&&(o.children=d.children.map(zi)),o}function Mn(d=" ",o=0){return An(Tn,null,d,o)}function si(d,o){let m=0;const{shapeFlag:S}=d;if(o==null)o=null;else if(dt(o))m=16;else if(typeof o=="object")if(S&65){const b=o.default;b&&(b._c&&(b._d=!1),si(d,b()),b._c&&(b._d=!0));return}else m=32,!o._&&!Wi(o)&&(o._ctx=he);else mt(o)?(o={default:o,_ctx:he},m=32):(o=String(o),S&64?(m=16,o=[Mn(o)]):m=8);d.children=o,d.shapeFlag|=m}function Fn(...d){const o={};for(let m=0;m<d.length;m++){const S=d[m];for(const b in S)if(b==="class")o.class!==S.class&&(o.class=Je([o.class,S.class]));else if(b==="style")o.style=Ke([o.style,S.style]);else if(ur(b)){const T=o[b],F=S[b];F&&T!==F&&!(dt(T)&&T.includes(F))&&(o[b]=T?[].concat(T,F):F)}else b!==""&&(o[b]=S[b])}return o}let $t=null;const oi=()=>$t||he;let Ge;{const d=Pe(),o=(m,S)=>{let b;return(b=d[m])||(b=d[m]=[]),b.push(S),T=>{b.length>1?b.forEach(F=>F(T)):b[0](T)}};Ge=o("__VUE_INSTANCE_SETTERS__",m=>$t=m),o("__VUE_SSR_SETTERS__",m=>ce=m)}const In=d=>{const o=$t;return Ge(d),d.scope.on(),()=>{d.scope.off(),Ge(o)}};let ce=!1;process.env.NODE_ENV;const Ln=/(?:^|[-_])\w/g,Rn=d=>d.replace(Ln,o=>o.toUpperCase()).replace(/[-_]/g,"");function Ui(d,o=!0){return mt(d)?d.displayName||d.name:d.name||o&&d.__name}function Gi(d,o,m=!1){let S=Ui(o);if(!S&&o.__file){const b=o.__file.match(/([^/\\]+)\.\w+$/);b&&(S=b[1])}if(!S&&d){const b=T=>{for(const F in T)if(T[F]===o)return F};S=b(d.components)||d.parent&&b(d.parent.type.components)||b(d.appContext.components)}return S?Rn(S):m?"App":"Anonymous"}function qi(d){return mt(d)&&"__vccOpts"in d}const Ki=(d,o)=>{const m=zr(d,o,ce);if(process.env.NODE_ENV!=="production"){const S=oi();S&&S.appContext.config.warnRecursiveComputed&&(m._warnRecursive=!0)}return m};function jn(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const d={style:"color:#3ba776"},o={style:"color:#1677ff"},m={style:"color:#f5222d"},S={style:"color:#eb2f96"},b={__vue_custom_formatter:!0,header(t){if(!yt(t))return null;if(t.__isVue)return["div",d,"VueInstance"];if(St(t)){Kt();const i=t.value;return Jt(),["div",{},["span",d,a(t)],"<",u(i),">"]}else{if(Gt(t))return["div",{},["span",d,Ct(t)?"ShallowReactive":"Reactive"],"<",u(t),`>${Ot(t)?" (readonly)":""}`];if(Ot(t))return["div",{},["span",d,Ct(t)?"ShallowReadonly":"Readonly"],"<",u(t),">"]}return null},hasBody(t){return t&&t.__isVue},body(t){if(t&&t.__isVue)return["div",{},...T(t.$)]}};function T(t){const i=[];t.type.props&&t.props&&i.push(F("props",at(t.props))),t.setupState!==re&&i.push(F("setup",t.setupState)),t.data!==re&&i.push(F("data",at(t.data)));const e=n(t,"computed");e&&i.push(F("computed",e));const s=n(t,"inject");return s&&i.push(F("injected",s)),i.push(["div",{},["span",{style:S.style+";opacity:0.66"},"$ (internal): "],["object",{object:t}]]),i}function F(t,i){return i=Rt({},i),Object.keys(i).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},t],["div",{style:"padding-left:1.25em"},...Object.keys(i).map(e=>["div",{},["span",S,e+": "],u(i[e],!1)])]]:["span",{}]}function u(t,i=!0){return typeof t=="number"?["span",o,t]:typeof t=="string"?["span",m,JSON.stringify(t)]:typeof t=="boolean"?["span",S,t]:yt(t)?["object",{object:i?at(t):t}]:["span",m,String(t)]}function n(t,i){const e=t.type;if(mt(e))return;const s={};for(const h in t.ctx)l(e,h,i)&&(s[h]=t.ctx[h]);return s}function l(t,i,e){const s=t[e];if(dt(s)&&s.includes(i)||yt(s)&&i in s||t.extends&&l(t.extends,i,e)||t.mixins&&t.mixins.some(h=>l(h,i,e)))return!0}function a(t){return Ct(t)?"ShallowRef":t.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(b):window.devtoolsFormatters=[b]}process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;function Bn(){jn()}process.env.NODE_ENV!=="production"&&Bn();function Nn(){const d=new Set,o=b=>{d.delete(b)};return{on:b=>(d.add(b),{off:()=>o(b)}),off:o,trigger:(...b)=>Promise.all(Array.from(d).map(T=>T(...b)))}}function fe(d){return typeof d=="function"?d():Yr(d)}const de=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Xn=Object.prototype.toString,Wn=d=>Xn.call(d)==="[object Object]",Vn=()=>{},Yn=(d,o)=>Object.prototype.hasOwnProperty.call(d,o);function Hn(d){let o;function m(){return o||(o=d()),o}return m.reset=async()=>{const S=o;o=void 0,S&&await S},m}function zn(d,o,m={}){const{immediate:S=!0}=m,b=jt(!1);let T=null;function F(){T&&(clearTimeout(T),T=null)}function u(){b.value=!1,F()}function n(...l){F(),b.value=!0,T=setTimeout(()=>{b.value=!1,T=null,d(...l)},fe(o))}return S&&(b.value=!0,de&&n()),{isPending:oe(b),start:n,stop:u}}function Un(d){var o;const m=fe(d);return(o=m?.$el)!=null?o:m}const Gn=de?window:void 0,qn=de?window.document:void 0,Ji=de?window.navigator:void 0;function $i(...d){let o,m,S,b;if(typeof d[0]=="string"||Array.isArray(d[0])?([m,S,b]=d,o=Gn):[o,m,S,b]=d,!o)return Vn;Array.isArray(m)||(m=[m]),Array.isArray(S)||(S=[S]);const T=[],F=()=>{T.forEach(a=>a()),T.length=0},u=(a,t,i,e)=>(a.addEventListener(t,i,e),()=>a.removeEventListener(t,i,e)),n=Xi(()=>[Un(o),fe(b)],([a,t])=>{if(F(),!a)return;const i=Wn(t)?{...t}:t;T.push(...m.flatMap(e=>S.map(s=>u(a,e,s,i))))},{immediate:!0,flush:"post"});return()=>{n(),F()}}function Kn(){const d=jt(!1),o=oi();return o&&dn(()=>{d.value=!0},o),d}function Qi(d){const o=Kn();return Ki(()=>(o.value,!!d()))}const te={array:d=>JSON.stringify(d),object:d=>JSON.stringify(d),set:d=>JSON.stringify(Array.from(d)),map:d=>JSON.stringify(Object.fromEntries(d)),null:()=>""};function Jn(d){return d?d instanceof Map?te.map:d instanceof Set?te.set:Array.isArray(d)?te.array:te.object:te.null}function $n(d,o){const m=jt(""),S=jt();function b(){if(de)return S.value=new Promise((T,F)=>{try{const u=fe(d);if(u==null)T("");else if(typeof u=="string")T(je(new Blob([u],{type:"text/plain"})));else if(u instanceof Blob)T(je(u));else if(u instanceof ArrayBuffer)T(window.btoa(String.fromCharCode(...new Uint8Array(u))));else if(u instanceof HTMLCanvasElement)T(u.toDataURL(o?.type,o?.quality));else if(u instanceof HTMLImageElement){const n=u.cloneNode(!1);n.crossOrigin="Anonymous",Qn(n).then(()=>{const l=document.createElement("canvas"),a=l.getContext("2d");l.width=n.width,l.height=n.height,a.drawImage(n,0,0,l.width,l.height),T(l.toDataURL(o?.type,o?.quality))}).catch(F)}else if(typeof u=="object"){const l=(o?.serializer||Jn(u))(u);return T(je(new Blob([l],{type:"application/json"})))}else F(new Error("target is unsupported types"))}catch(u){F(u)}}),S.value.then(T=>m.value=T),S.value}return St(d)||typeof d=="function"?Xi(d,b,{immediate:!0}):b(),{base64:m,promise:S,execute:b}}function Qn(d){return new Promise((o,m)=>{d.complete?o():(d.onload=()=>{o()},d.onerror=m)})}function je(d){return new Promise((o,m)=>{const S=new FileReader;S.onload=b=>{o(b.target.result)},S.onerror=m,S.readAsDataURL(d)})}function di(d,o={}){const{controls:m=!1,navigator:S=Ji}=o,b=Qi(()=>S&&"permissions"in S);let T;const F=typeof d=="string"?{name:d}:d,u=jt(),n=()=>{T&&(u.value=T.state)},l=Hn(async()=>{if(b.value){if(!T)try{T=await S.permissions.query(F),$i(T,"change",n),n()}catch{u.value="prompt"}return T}});return l(),m?{state:u,isSupported:b,query:l}:u}function Zn(d={}){const{navigator:o=Ji,read:m=!1,source:S,copiedDuring:b=1500,legacy:T=!1}=d,F=Qi(()=>o&&"clipboard"in o),u=di("clipboard-read"),n=di("clipboard-write"),l=Ki(()=>F.value||T),a=jt(""),t=jt(!1),i=zn(()=>t.value=!1,b);function e(){F.value&&c(u.value)?o.clipboard.readText().then(f=>{a.value=f}):a.value=r()}l.value&&m&&$i(["copy","cut"],e);async function s(f=fe(S)){l.value&&f!=null&&(F.value&&c(n.value)?await o.clipboard.writeText(f):h(f),a.value=f,t.value=!0,i.start())}function h(f){const g=document.createElement("textarea");g.value=f??"",g.style.position="absolute",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),g.remove()}function r(){var f,g,p;return(p=(g=(f=document?.getSelection)==null?void 0:f.call(document))==null?void 0:g.toString())!=null?p:""}function c(f){return f==="granted"||f==="prompt"}return{isSupported:l,text:a,copied:t,copy:s}}const ts={multiple:!0,accept:"*",reset:!1,directory:!1};function es(d={}){const{document:o=qn}=d,m=jt(null),{on:S,trigger:b}=Nn();let T;o&&(T=o.createElement("input"),T.type="file",T.onchange=n=>{const l=n.target;m.value=l.files,b(m.value)});const F=()=>{m.value=null,T&&T.value&&(T.value="",b(null))},u=n=>{if(!T)return;const l={...ts,...d,...n};T.multiple=l.multiple,T.accept=l.accept,T.webkitdirectory=l.directory,Yn(l,"capture")&&(T.capture=l.capture),l.reset&&F(),T.click()};return{files:oe(m),open:u,reset:F,onChange:S}}function is(d){if(Object.prototype.hasOwnProperty.call(d,"__esModule"))return d;var o=d.default;if(typeof o=="function"){var m=function S(){var b=!1;try{b=this instanceof S}catch{}return b?Reflect.construct(o,arguments,this.constructor):o.apply(this,arguments)};m.prototype=o.prototype}else m={};return Object.defineProperty(m,"__esModule",{value:!0}),Object.keys(d).forEach(function(S){var b=Object.getOwnPropertyDescriptor(d,S);Object.defineProperty(m,S,b.get?b:{enumerable:!0,get:function(){return d[S]}})}),m}var Be={};const rs={},ns=Object.freeze(Object.defineProperty({__proto__:null,default:rs},Symbol.toStringTag,{value:"Module"})),Ne=is(ns);var gi;function ss(){return gi||(gi=1,(function(d){var o=o||{version:"5.3.0"};if(d.fabric=o,typeof document<"u"&&typeof window<"u")document instanceof(typeof HTMLDocument<"u"?HTMLDocument:Document)?o.document=document:o.document=document.implementation.createHTMLDocument(""),o.window=window;else{var m=Ne,S=new m.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;o.document=S.document,o.jsdomImplForWrapper=Ne.implForWrapper,o.nodeCanvas=Ne.Canvas,o.window=S,DOMParser=o.window.DOMParser}o.isTouchSupported="ontouchstart"in o.window||"ontouchstart"in o.document||o.window&&o.window.navigator&&o.window.navigator.maxTouchPoints>0,o.isLikelyNode=typeof Buffer<"u"&&typeof window>"u",o.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"],o.DPI=96,o.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",o.commaWsp="(?:\\s+,?\\s*|,\\s*)",o.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/ig,o.reNonWord=/[ \n\.,;!\?\-]/,o.fontPaths={},o.iMatrix=[1,0,0,1,0,0],o.svgNS="http://www.w3.org/2000/svg",o.perfLimitSizeTotal=2097152,o.maxCacheSideLimit=4096,o.minCacheSideLimit=256,o.charWidthsCache={},o.textureSize=2048,o.disableStyleCopyPaste=!1,o.enableGLFiltering=!0,o.devicePixelRatio=o.window.devicePixelRatio||o.window.webkitDevicePixelRatio||o.window.mozDevicePixelRatio||1,o.browserShadowBlurConstant=1,o.arcToSegmentsCache={},o.boundsOfCurveCache={},o.cachesBoundsOfCurve=!0,o.forceGLPutImageData=!1,o.initFilterBackend=function(){if(o.enableGLFiltering&&o.isWebglSupported&&o.isWebglSupported(o.textureSize))return console.log("max texture size: "+o.maxTextureSize),new o.WebglFilterBackend({tileSize:o.textureSize});if(o.Canvas2dFilterBackend)return new o.Canvas2dFilterBackend},typeof document<"u"&&typeof window<"u"&&(window.fabric=o),(function(){function u(e,s){if(this.__eventListeners[e]){var h=this.__eventListeners[e];s?h[h.indexOf(s)]=!1:o.util.array.fill(h,!1)}}function n(e,s){if(this.__eventListeners||(this.__eventListeners={}),arguments.length===1)for(var h in e)this.on(h,e[h]);else this.__eventListeners[e]||(this.__eventListeners[e]=[]),this.__eventListeners[e].push(s);return this}function l(e,s){var h=(function(){s.apply(this,arguments),this.off(e,h)}).bind(this);this.on(e,h)}function a(e,s){if(arguments.length===1)for(var h in e)l.call(this,h,e[h]);else l.call(this,e,s);return this}function t(e,s){if(!this.__eventListeners)return this;if(arguments.length===0)for(e in this.__eventListeners)u.call(this,e);else if(arguments.length===1&&typeof arguments[0]=="object")for(var h in e)u.call(this,h,e[h]);else u.call(this,e,s);return this}function i(e,s){if(!this.__eventListeners)return this;var h=this.__eventListeners[e];if(!h)return this;for(var r=0,c=h.length;r<c;r++)h[r]&&h[r].call(this,s||{});return this.__eventListeners[e]=h.filter(function(f){return f!==!1}),this}o.Observable={fire:i,on:n,once:a,off:t}})(),o.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var u=0,n=arguments.length;u<n;u++)this._onObjectAdded(arguments[u]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(u,n,l){var a=this._objects;return l?a[n]=u:a.splice(n,0,u),this._onObjectAdded&&this._onObjectAdded(u),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var u=this._objects,n,l=!1,a=0,t=arguments.length;a<t;a++)n=u.indexOf(arguments[a]),n!==-1&&(l=!0,u.splice(n,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[a]));return this.renderOnAddRemove&&l&&this.requestRenderAll(),this},forEachObject:function(u,n){for(var l=this.getObjects(),a=0,t=l.length;a<t;a++)u.call(n,l[a],a,l);return this},getObjects:function(u){return typeof u>"u"?this._objects.concat():this._objects.filter(function(n){return n.type===u})},item:function(u){return this._objects[u]},isEmpty:function(){return this._objects.length===0},size:function(){return this._objects.length},contains:function(u,n){return this._objects.indexOf(u)>-1?!0:n?this._objects.some(function(l){return typeof l.contains=="function"&&l.contains(u,!0)}):!1},complexity:function(){return this._objects.reduce(function(u,n){return u+=n.complexity?n.complexity():0,u},0)}},o.CommonMethods={_setOptions:function(u){for(var n in u)this.set(n,u[n])},_initGradient:function(u,n){u&&u.colorStops&&!(u instanceof o.Gradient)&&this.set(n,new o.Gradient(u))},_initPattern:function(u,n,l){u&&u.source&&!(u instanceof o.Pattern)?this.set(n,new o.Pattern(u,l)):l&&l()},_setObject:function(u){for(var n in u)this._set(n,u[n])},set:function(u,n){return typeof u=="object"?this._setObject(u):this._set(u,n),this},_set:function(u,n){this[u]=n},toggle:function(u){var n=this.get(u);return typeof n=="boolean"&&this.set(u,!n),this},get:function(u){return this[u]}},(function(u){var n=Math.sqrt,l=Math.atan2,a=Math.pow,t=Math.PI/180,i=Math.PI/2;o.util={cos:function(e){if(e===0)return 1;e<0&&(e=-e);var s=e/i;switch(s){case 1:case 3:return 0;case 2:return-1}return Math.cos(e)},sin:function(e){if(e===0)return 0;var s=e/i,h=1;switch(e<0&&(h=-1),s){case 1:return h;case 2:return 0;case 3:return-h}return Math.sin(e)},removeFromArray:function(e,s){var h=e.indexOf(s);return h!==-1&&e.splice(h,1),e},getRandomInt:function(e,s){return Math.floor(Math.random()*(s-e+1))+e},degreesToRadians:function(e){return e*t},radiansToDegrees:function(e){return e/t},rotatePoint:function(e,s,h){var r=new o.Point(e.x-s.x,e.y-s.y),c=o.util.rotateVector(r,h);return new o.Point(c.x,c.y).addEquals(s)},rotateVector:function(e,s){var h=o.util.sin(s),r=o.util.cos(s),c=e.x*r-e.y*h,f=e.x*h+e.y*r;return{x:c,y:f}},createVector:function(e,s){return new o.Point(s.x-e.x,s.y-e.y)},calcAngleBetweenVectors:function(e,s){return Math.acos((e.x*s.x+e.y*s.y)/(Math.hypot(e.x,e.y)*Math.hypot(s.x,s.y)))},getHatVector:function(e){return new o.Point(e.x,e.y).multiply(1/Math.hypot(e.x,e.y))},getBisector:function(e,s,h){var r=o.util.createVector(e,s),c=o.util.createVector(e,h),f=o.util.calcAngleBetweenVectors(r,c),g=o.util.calcAngleBetweenVectors(o.util.rotateVector(r,f),c),p=f*(g===0?1:-1)/2;return{vector:o.util.getHatVector(o.util.rotateVector(r,p)),angle:f}},projectStrokeOnPoints:function(e,s,h){var r=[],c=s.strokeWidth/2,f=s.strokeUniform?new o.Point(1/s.scaleX,1/s.scaleY):new o.Point(1,1),g=function(p){var v=c/Math.hypot(p.x,p.y);return new o.Point(p.x*v*f.x,p.y*v*f.y)};return e.length<=1||e.forEach(function(p,v){var _=new o.Point(p.x,p.y),x,D;v===0?(D=e[v+1],x=h?g(o.util.createVector(D,_)).addEquals(_):e[e.length-1]):v===e.length-1?(x=e[v-1],D=h?g(o.util.createVector(x,_)).addEquals(_):e[0]):(x=e[v-1],D=e[v+1]);var B=o.util.getBisector(_,x,D),z=B.vector,G=B.angle,Q,Z;if(s.strokeLineJoin==="miter"&&(Q=-c/Math.sin(G/2),Z=new o.Point(z.x*Q*f.x,z.y*Q*f.y),Math.hypot(Z.x,Z.y)/c<=s.strokeMiterLimit)){r.push(_.add(Z)),r.push(_.subtract(Z));return}Q=-c*Math.SQRT2,Z=new o.Point(z.x*Q*f.x,z.y*Q*f.y),r.push(_.add(Z)),r.push(_.subtract(Z))}),r},transformPoint:function(e,s,h){return h?new o.Point(s[0]*e.x+s[2]*e.y,s[1]*e.x+s[3]*e.y):new o.Point(s[0]*e.x+s[2]*e.y+s[4],s[1]*e.x+s[3]*e.y+s[5])},makeBoundingBoxFromPoints:function(e,s){if(s)for(var h=0;h<e.length;h++)e[h]=o.util.transformPoint(e[h],s);var r=[e[0].x,e[1].x,e[2].x,e[3].x],c=o.util.array.min(r),f=o.util.array.max(r),g=f-c,p=[e[0].y,e[1].y,e[2].y,e[3].y],v=o.util.array.min(p),_=o.util.array.max(p),x=_-v;return{left:c,top:v,width:g,height:x}},invertTransform:function(e){var s=1/(e[0]*e[3]-e[1]*e[2]),h=[s*e[3],-s*e[1],-s*e[2],s*e[0]],r=o.util.transformPoint({x:e[4],y:e[5]},h,!0);return h[4]=-r.x,h[5]=-r.y,h},toFixed:function(e,s){return parseFloat(Number(e).toFixed(s))},parseUnit:function(e,s){var h=/\D{0,2}$/.exec(e),r=parseFloat(e);switch(s||(s=o.Text.DEFAULT_SVG_FONT_SIZE),h[0]){case"mm":return r*o.DPI/25.4;case"cm":return r*o.DPI/2.54;case"in":return r*o.DPI;case"pt":return r*o.DPI/72;case"pc":return r*o.DPI/72*12;case"em":return r*s;default:return r}},falseFunction:function(){return!1},getKlass:function(e,s){return e=o.util.string.camelize(e.charAt(0).toUpperCase()+e.slice(1)),o.util.resolveNamespace(s)[e]},getSvgAttributes:function(e){var s=["instantiated_by_use","style","id","class"];switch(e){case"linearGradient":s=s.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":s=s.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":s=s.concat(["offset","stop-color","stop-opacity"]);break}return s},resolveNamespace:function(e){if(!e)return o;var s=e.split("."),h=s.length,r,c=u||o.window;for(r=0;r<h;++r)c=c[s[r]];return c},loadImage:function(e,s,h,r){if(!e){s&&s.call(h,e);return}var c=o.util.createImage(),f=function(){s&&s.call(h,c,!1),c=c.onload=c.onerror=null};c.onload=f,c.onerror=function(){o.log("Error loading "+c.src),s&&s.call(h,null,!0),c=c.onload=c.onerror=null},e.indexOf("data")!==0&&r!==void 0&&r!==null&&(c.crossOrigin=r),e.substring(0,14)==="data:image/svg"&&(c.onload=null,o.util.loadImageInDom(c,f)),c.src=e},loadImageInDom:function(e,s){var h=o.document.createElement("div");h.style.width=h.style.height="1px",h.style.left=h.style.top="-100%",h.style.position="absolute",h.appendChild(e),o.document.querySelector("body").appendChild(h),e.onload=function(){s(),h.parentNode.removeChild(h),h=null}},enlivenObjects:function(e,s,h,r){e=e||[];var c=[],f=0,g=e.length;function p(){++f===g&&s&&s(c.filter(function(v){return v}))}if(!g){s&&s(c);return}e.forEach(function(v,_){if(!v||!v.type){p();return}var x=o.util.getKlass(v.type,h);x.fromObject(v,function(D,B){B||(c[_]=D),r&&r(v,D,B),p()})})},enlivenObjectEnlivables:function(e,s,h){var r=o.Object.ENLIVEN_PROPS.filter(function(c){return!!e[c]});o.util.enlivenObjects(r.map(function(c){return e[c]}),function(c){var f={};r.forEach(function(g,p){f[g]=c[p],s&&(s[g]=c[p])}),h&&h(f)})},enlivenPatterns:function(e,s){e=e||[];function h(){++c===f&&s&&s(r)}var r=[],c=0,f=e.length;if(!f){s&&s(r);return}e.forEach(function(g,p){g&&g.source?new o.Pattern(g,function(v){r[p]=v,h()}):(r[p]=g,h())})},groupSVGElements:function(e,s,h){var r;return e&&e.length===1?(typeof h<"u"&&(e[0].sourcePath=h),e[0]):(s&&(s.width&&s.height?s.centerPoint={x:s.width/2,y:s.height/2}:(delete s.width,delete s.height)),r=new o.Group(e,s),typeof h<"u"&&(r.sourcePath=h),r)},populateWithProperties:function(e,s,h){if(h&&Array.isArray(h))for(var r=0,c=h.length;r<c;r++)h[r]in e&&(s[h[r]]=e[h[r]])},createCanvasElement:function(){return o.document.createElement("canvas")},copyCanvasElement:function(e){var s=o.util.createCanvasElement();return s.width=e.width,s.height=e.height,s.getContext("2d").drawImage(e,0,0),s},toDataURL:function(e,s,h){return e.toDataURL("image/"+s,h)},createImage:function(){return o.document.createElement("img")},multiplyTransformMatrices:function(e,s,h){return[e[0]*s[0]+e[2]*s[1],e[1]*s[0]+e[3]*s[1],e[0]*s[2]+e[2]*s[3],e[1]*s[2]+e[3]*s[3],h?0:e[0]*s[4]+e[2]*s[5]+e[4],h?0:e[1]*s[4]+e[3]*s[5]+e[5]]},qrDecompose:function(e){var s=l(e[1],e[0]),h=a(e[0],2)+a(e[1],2),r=n(h),c=(e[0]*e[3]-e[2]*e[1])/r,f=l(e[0]*e[2]+e[1]*e[3],h);return{angle:s/t,scaleX:r,scaleY:c,skewX:f/t,skewY:0,translateX:e[4],translateY:e[5]}},calcRotateMatrix:function(e){if(!e.angle)return o.iMatrix.concat();var s=o.util.degreesToRadians(e.angle),h=o.util.cos(s),r=o.util.sin(s);return[h,r,-r,h,0,0]},calcDimensionsMatrix:function(e){var s=typeof e.scaleX>"u"?1:e.scaleX,h=typeof e.scaleY>"u"?1:e.scaleY,r=[e.flipX?-s:s,0,0,e.flipY?-h:h,0,0],c=o.util.multiplyTransformMatrices,f=o.util.degreesToRadians;return e.skewX&&(r=c(r,[1,0,Math.tan(f(e.skewX)),1],!0)),e.skewY&&(r=c(r,[1,Math.tan(f(e.skewY)),0,1],!0)),r},composeMatrix:function(e){var s=[1,0,0,1,e.translateX||0,e.translateY||0],h=o.util.multiplyTransformMatrices;return e.angle&&(s=h(s,o.util.calcRotateMatrix(e))),(e.scaleX!==1||e.scaleY!==1||e.skewX||e.skewY||e.flipX||e.flipY)&&(s=h(s,o.util.calcDimensionsMatrix(e))),s},resetObjectTransform:function(e){e.scaleX=1,e.scaleY=1,e.skewX=0,e.skewY=0,e.flipX=!1,e.flipY=!1,e.rotate(0)},saveObjectTransform:function(e){return{scaleX:e.scaleX,scaleY:e.scaleY,skewX:e.skewX,skewY:e.skewY,angle:e.angle,left:e.left,flipX:e.flipX,flipY:e.flipY,top:e.top}},isTransparent:function(e,s,h,r){r>0&&(s>r?s-=r:s=0,h>r?h-=r:h=0);var c=!0,f,g,p=e.getImageData(s,h,r*2||1,r*2||1),v=p.data.length;for(f=3;f<v&&(g=p.data[f],c=g<=0,c!==!1);f+=4);return p=null,c},parsePreserveAspectRatioAttribute:function(e){var s="meet",h="Mid",r="Mid",c=e.split(" "),f;return c&&c.length&&(s=c.pop(),s!=="meet"&&s!=="slice"?(f=s,s="meet"):c.length&&(f=c.pop())),h=f!=="none"?f.slice(1,4):"none",r=f!=="none"?f.slice(5,8):"none",{meetOrSlice:s,alignX:h,alignY:r}},clearFabricFontCache:function(e){e=(e||"").toLowerCase(),e?o.charWidthsCache[e]&&delete o.charWidthsCache[e]:o.charWidthsCache={}},limitDimsByArea:function(e,s){var h=Math.sqrt(s*e),r=Math.floor(s/h);return{x:Math.floor(h),y:r}},capValue:function(e,s,h){return Math.max(e,Math.min(s,h))},findScaleToFit:function(e,s){return Math.min(s.width/e.width,s.height/e.height)},findScaleToCover:function(e,s){return Math.max(s.width/e.width,s.height/e.height)},matrixToSVG:function(e){return"matrix("+e.map(function(s){return o.util.toFixed(s,o.Object.NUM_FRACTION_DIGITS)}).join(" ")+")"},removeTransformFromObject:function(e,s){var h=o.util.invertTransform(s),r=o.util.multiplyTransformMatrices(h,e.calcOwnMatrix());o.util.applyTransformToObject(e,r)},addTransformToObject:function(e,s){o.util.applyTransformToObject(e,o.util.multiplyTransformMatrices(s,e.calcOwnMatrix()))},applyTransformToObject:function(e,s){var h=o.util.qrDecompose(s),r=new o.Point(h.translateX,h.translateY);e.flipX=!1,e.flipY=!1,e.set("scaleX",h.scaleX),e.set("scaleY",h.scaleY),e.skewX=h.skewX,e.skewY=h.skewY,e.angle=h.angle,e.setPositionByOrigin(r,"center","center")},sizeAfterTransform:function(e,s,h){var r=e/2,c=s/2,f=[{x:-r,y:-c},{x:r,y:-c},{x:-r,y:c},{x:r,y:c}],g=o.util.calcDimensionsMatrix(h),p=o.util.makeBoundingBoxFromPoints(f,g);return{x:p.width,y:p.height}},mergeClipPaths:function(e,s){var h=e,r=s;h.inverted&&!r.inverted&&(h=s,r=e),o.util.applyTransformToObject(r,o.util.multiplyTransformMatrices(o.util.invertTransform(h.calcTransformMatrix()),r.calcTransformMatrix()));var c=h.inverted&&r.inverted;return c&&(h.inverted=r.inverted=!1),new o.Group([h],{clipPath:r,inverted:c})},hasStyleChanged:function(e,s,h){return h=h||!1,e.fill!==s.fill||e.stroke!==s.stroke||e.strokeWidth!==s.strokeWidth||e.fontSize!==s.fontSize||e.fontFamily!==s.fontFamily||e.fontWeight!==s.fontWeight||e.fontStyle!==s.fontStyle||e.textBackgroundColor!==s.textBackgroundColor||e.deltaY!==s.deltaY||h&&(e.overline!==s.overline||e.underline!==s.underline||e.linethrough!==s.linethrough)},stylesToArray:function(h,s){for(var h=o.util.object.clone(h,!0),r=s.split(`
3
+ `,...$r(b)),console.warn(...T)}Jt(),Le=!1}function Jr(){let d=Wt[Wt.length-1];if(!d)return[];const o=[];for(;d;){const m=o[0];m&&m.vnode===d?m.recurseCount++:o.push({vnode:d,recurseCount:0});const S=d.component&&d.component.parent;d=S&&S.vnode}return o}function $r(d){const o=[];return d.forEach((m,S)=>{o.push(...S===0?[]:[`
4
+ `],...Qr(m))}),o}function Qr({vnode:d,recurseCount:o}){const m=o>0?`... (${o} recursive calls)`:"",S=d.component?d.component.parent==null:!1,b=` at <${Gi(d.component,d.type,S)}`,T=">"+m;return d.props?[b,...Zr(d.props),T]:[b+T]}function Zr(d){const o=[],m=Object.keys(d);return m.slice(0,3).forEach(S=>{o.push(...Mi(S,d[S]))}),m.length>3&&o.push(" ..."),o}function Mi(d,o,m){return Dt(o)?(o=JSON.stringify(o),m?o:[`${d}=${o}`]):typeof o=="number"||typeof o=="boolean"||o==null?m?o:[`${d}=${o}`]:St(o)?(o=Mi(d,at(o.value),!0),m?o:[`${d}=Ref<`,o,">"]):mt(o)?[`${d}=fn${o.name?`<${o.name}>`:""}`]:(o=at(o),m?o:[`${d}=`,o])}const ii={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function De(d,o,m,S){try{return S?d(...S):d()}catch(b){ni(b,o,m)}}function ri(d,o,m,S){if(mt(d)){const b=De(d,o,m,S);return b&&gr(b)&&b.catch(T=>{ni(T,o,m)}),b}if(dt(d)){const b=[];for(let T=0;T<d.length;T++)b.push(ri(d[T],o,m,S));return b}else process.env.NODE_ENV!=="production"&&pt(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof d}`)}function ni(d,o,m,S=!0){const b=o?o.vnode:null,{errorHandler:T,throwUnhandledErrorInProduction:F}=o&&o.appContext.config||re;if(o){let u=o.parent;const n=o.proxy,l=process.env.NODE_ENV!=="production"?ii[m]:`https://vuejs.org/error-reference/#runtime-${m}`;for(;u;){const a=u.ec;if(a){for(let t=0;t<a.length;t++)if(a[t](d,n,l)===!1)return}u=u.parent}if(T){Kt(),De(T,null,10,[d,n,l]),Jt();return}}tn(d,m,b,S,F)}function tn(d,o,m,S=!0,b=!1){if(process.env.NODE_ENV!=="production"){const T=ii[o];if(m&&qr(m),pt(`Unhandled error${T?` during execution of ${T}`:""}`),m&&Kr(),S)throw d;console.error(d)}else{if(b)throw d;console.error(d)}}const bt=[];let Pt=-1;const qt=[];let Mt=null,Yt=0;const en=Promise.resolve();let Ue=null;const rn=100;function nn(d){let o=Pt+1,m=bt.length;for(;o<m;){const S=o+m>>>1,b=bt[S],T=le(b);T<d||T===d&&b.flags&2?o=S+1:m=S}return o}function Fi(d){if(!(d.flags&1)){const o=le(d),m=bt[bt.length-1];!m||!(d.flags&2)&&o>=le(m)?bt.push(d):bt.splice(nn(o),0,d),d.flags|=1,Li()}}function Li(){Ue||(Ue=en.then(Ri))}function Ii(d){dt(d)?qt.push(...d):Mt&&d.id===-1?Mt.splice(Yt+1,0,d):d.flags&1||(qt.push(d),d.flags|=1),Li()}function sn(d){if(qt.length){const o=[...new Set(qt)].sort((m,S)=>le(m)-le(S));if(qt.length=0,Mt){Mt.push(...o);return}for(Mt=o,process.env.NODE_ENV!=="production"&&(d=d||new Map),Yt=0;Yt<Mt.length;Yt++){const m=Mt[Yt];process.env.NODE_ENV!=="production"&&ji(d,m)||(m.flags&4&&(m.flags&=-2),m.flags&8||m(),m.flags&=-2)}Mt=null,Yt=0}}const le=d=>d.id==null?d.flags&2?-1:1/0:d.id;function Ri(d){process.env.NODE_ENV!=="production"&&(d=d||new Map);const o=process.env.NODE_ENV!=="production"?m=>ji(d,m):zt;try{for(Pt=0;Pt<bt.length;Pt++){const m=bt[Pt];if(m&&!(m.flags&8)){if(process.env.NODE_ENV!=="production"&&o(m))continue;m.flags&4&&(m.flags&=-2),De(m,m.i,m.i?15:14),m.flags&4||(m.flags&=-2)}}}finally{for(;Pt<bt.length;Pt++){const m=bt[Pt];m&&(m.flags&=-2)}Pt=-1,bt.length=0,sn(d),Ue=null,(bt.length||qt.length)&&Ri(d)}}function ji(d,o){const m=d.get(o)||0;if(m>rn){const S=o.i,b=S&&Ui(S.type);return ni(`Maximum recursive updates exceeded${b?` in component <${b}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return d.set(o,m+1),!1}const Ie=new Map;process.env.NODE_ENV!=="production"&&(Pe().__VUE_HMR_RUNTIME__={createRecord:Re(on),rerender:Re(an),reload:Re(ln)});const xe=new Map;function on(d,o){return xe.has(d)?!1:(xe.set(d,{initialDef:we(o),instances:new Set}),!0)}function we(d){return qi(d)?d.__vccOpts:d}function an(d,o){const m=xe.get(d);m&&(m.initialDef.render=o,[...m.instances].forEach(S=>{o&&(S.render=o,we(S.type).render=o),S.renderCache=[],S.job.flags&8||S.update()}))}function ln(d,o){const m=xe.get(d);if(!m)return;o=we(o),fi(m.initialDef,o);const S=[...m.instances];for(let b=0;b<S.length;b++){const T=S[b],F=we(T.type);let u=Ie.get(F);u||(F!==m.initialDef&&fi(F,o),Ie.set(F,u=new Set)),u.add(T),T.appContext.propsCache.delete(T.type),T.appContext.emitsCache.delete(T.type),T.appContext.optionsCache.delete(T.type),T.ceReload?(u.add(T),T.ceReload(o.styles),u.delete(T)):T.parent?Fi(()=>{T.job.flags&8||(T.parent.update(),u.delete(T))}):T.appContext.reload?T.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),T.root.ce&&T!==T.root&&T.root.ce._removeChildStyle(F)}Ii(()=>{Ie.clear()})}function fi(d,o){Rt(d,o);for(const m in d)m!=="__file"&&!(m in o)&&delete d[m]}function Re(d){return(o,m)=>{try{return d(o,m)}catch(S){console.error(S),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let Ht,ye=[];function Bi(d,o){var m,S;Ht=d,Ht?(Ht.enabled=!0,ye.forEach(({event:b,args:T})=>Ht.emit(b,...T)),ye=[]):typeof window<"u"&&window.HTMLElement&&!((S=(m=window.navigator)==null?void 0:m.userAgent)!=null&&S.includes("jsdom"))?((o.__VUE_DEVTOOLS_HOOK_REPLAY__=o.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(T=>{Bi(T,o)}),setTimeout(()=>{Ht||(o.__VUE_DEVTOOLS_HOOK_REPLAY__=null,ye=[])},3e3)):ye=[]}let he=null,hn=null;const cn=d=>d.__isTeleport;function Ni(d,o){d.shapeFlag&6&&d.component?(d.transition=o,Ni(d.component.subTree,o)):d.shapeFlag&128?(d.ssContent.transition=o.clone(d.ssContent),d.ssFallback.transition=o.clone(d.ssFallback)):d.transition=o}Pe().requestIdleCallback;Pe().cancelIdleCallback;function un(d,o,m=$t,S=!1){if(m){const b=m[d]||(m[d]=[]),T=o.__weh||(o.__weh=(...F)=>{Kt();const u=Ln(m),n=ri(o,m,d,F);return u(),Jt(),n});return S?b.unshift(T):b.push(T),T}else if(process.env.NODE_ENV!=="production"){const b=vr(ii[d].replace(/ hook$/,""));pt(`${b} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const fn=d=>(o,m=$t)=>{(!ce||d==="sp")&&un(d,(...S)=>o(...S),m)},dn=fn("m"),gn=Symbol.for("v-ndc"),pn={};process.env.NODE_ENV!=="production"&&(pn.ownKeys=d=>(pt("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(d)));let mn=null;function vn(d,o,m=!1){const S=oi();if(S||mn){let b=S?S.parent==null||S.ce?S.vnode.appContext&&S.vnode.appContext.provides:S.parent.provides:void 0;if(b&&d in b)return b[d];if(arguments.length>1)return m&&mt(o)?o.call(S&&S.proxy):o;process.env.NODE_ENV!=="production"&&pt(`injection "${String(d)}" not found.`)}else process.env.NODE_ENV!=="production"&&pt("inject() can only be used inside setup() or functional components.")}const _n=Symbol.for("v-scx"),yn=()=>{{const d=vn(_n);return d||process.env.NODE_ENV!=="production"&&pt("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),d}};function Xi(d,o,m){return process.env.NODE_ENV!=="production"&&!mt(o)&&pt("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Cn(d,o,m)}function Cn(d,o,m=re){const{immediate:S,deep:b,flush:T,once:F}=m;process.env.NODE_ENV!=="production"&&!o&&(S!==void 0&&pt('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),b!==void 0&&pt('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),F!==void 0&&pt('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const u=Rt({},m);process.env.NODE_ENV!=="production"&&(u.onWarn=pt);const n=o&&S||!o&&T!=="post";let l;if(ce){if(T==="sync"){const e=yn();l=e.__watcherHandles||(e.__watcherHandles=[])}else if(!n){const e=()=>{};return e.stop=zt,e.resume=zt,e.pause=zt,e}}const a=$t;u.call=(e,s,h)=>ri(e,a,s,h);let t=!1;T==="post"?u.scheduler=e=>{bn(e,a&&a.suspense)}:T!=="sync"&&(t=!0,u.scheduler=(e,s)=>{s?e():Fi(e)}),u.augmentJob=e=>{o&&(e.flags|=4),t&&(e.flags|=2,a&&(e.id=a.uid,e.i=a))};const i=Gr(d,o,u);return ce&&(l?l.push(i):n&&i()),i}const Sn={},Wi=d=>Object.getPrototypeOf(d)===Sn,bn=wn,xn=d=>d.__isSuspense;function wn(d,o){o&&o.pendingBranch?dt(d)?o.effects.push(...d):o.effects.push(d):Ii(d)}const Vi=Symbol.for("v-fgt"),Tn=Symbol.for("v-txt"),On=Symbol.for("v-cmt");function En(d){return d?d.__v_isVNode===!0:!1}const Pn=(...d)=>Hi(...d),Yi=({key:d})=>d??null,Ce=({ref:d,ref_key:o,ref_for:m})=>(typeof d=="number"&&(d=""+d),d!=null?Dt(d)||St(d)||mt(d)?{i:he,r:d,k:o,f:!!m}:d:null);function Dn(d,o=null,m=null,S=0,b=null,T=d===Vi?0:1,F=!1,u=!1){const n={__v_isVNode:!0,__v_skip:!0,type:d,props:o,key:o&&Yi(o),ref:o&&Ce(o),scopeId:hn,slotScopeIds:null,children:m,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:T,patchFlag:S,dynamicProps:b,dynamicChildren:null,appContext:null,ctx:he};return u?(si(n,m),T&128&&d.normalize(n)):m&&(n.shapeFlag|=Dt(m)?8:16),process.env.NODE_ENV!=="production"&&n.key!==n.key&&pt("VNode created with invalid key (NaN). VNode type:",n.type),n}const An=process.env.NODE_ENV!=="production"?Pn:Hi;function Hi(d,o=null,m=null,S=0,b=null,T=!1){if((!d||d===gn)&&(process.env.NODE_ENV!=="production"&&!d&&pt(`Invalid vnode type when creating vnode: ${d}.`),d=On),En(d)){const u=Te(d,o,!0);return m&&si(u,m),u.patchFlag=-2,u}if(qi(d)&&(d=d.__vccOpts),o){o=kn(o);let{class:u,style:n}=o;u&&!Dt(u)&&(o.class=Je(u)),yt(n)&&(Se(n)&&!dt(n)&&(n=Rt({},n)),o.style=Ke(n))}const F=Dt(d)?1:xn(d)?128:cn(d)?64:yt(d)?4:mt(d)?2:0;return process.env.NODE_ENV!=="production"&&F&4&&Se(d)&&(d=at(d),pt("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
5
+ Component that was made reactive: `,d)),Dn(d,o,m,S,b,F,T,!0)}function kn(d){return d?Se(d)||Wi(d)?Rt({},d):d:null}function Te(d,o,m=!1,S=!1){const{props:b,ref:T,patchFlag:F,children:u,transition:n}=d,l=o?Fn(b||{},o):b,a={__v_isVNode:!0,__v_skip:!0,type:d.type,props:l,key:l&&Yi(l),ref:o&&o.ref?m&&T?dt(T)?T.concat(Ce(o)):[T,Ce(o)]:Ce(o):T,scopeId:d.scopeId,slotScopeIds:d.slotScopeIds,children:process.env.NODE_ENV!=="production"&&F===-1&&dt(u)?u.map(zi):u,target:d.target,targetStart:d.targetStart,targetAnchor:d.targetAnchor,staticCount:d.staticCount,shapeFlag:d.shapeFlag,patchFlag:o&&d.type!==Vi?F===-1?16:F|16:F,dynamicProps:d.dynamicProps,dynamicChildren:d.dynamicChildren,appContext:d.appContext,dirs:d.dirs,transition:n,component:d.component,suspense:d.suspense,ssContent:d.ssContent&&Te(d.ssContent),ssFallback:d.ssFallback&&Te(d.ssFallback),placeholder:d.placeholder,el:d.el,anchor:d.anchor,ctx:d.ctx,ce:d.ce};return n&&S&&Ni(a,n.clone(a)),a}function zi(d){const o=Te(d);return dt(d.children)&&(o.children=d.children.map(zi)),o}function Mn(d=" ",o=0){return An(Tn,null,d,o)}function si(d,o){let m=0;const{shapeFlag:S}=d;if(o==null)o=null;else if(dt(o))m=16;else if(typeof o=="object")if(S&65){const b=o.default;b&&(b._c&&(b._d=!1),si(d,b()),b._c&&(b._d=!0));return}else m=32,!o._&&!Wi(o)&&(o._ctx=he);else mt(o)?(o={default:o,_ctx:he},m=32):(o=String(o),S&64?(m=16,o=[Mn(o)]):m=8);d.children=o,d.shapeFlag|=m}function Fn(...d){const o={};for(let m=0;m<d.length;m++){const S=d[m];for(const b in S)if(b==="class")o.class!==S.class&&(o.class=Je([o.class,S.class]));else if(b==="style")o.style=Ke([o.style,S.style]);else if(ur(b)){const T=o[b],F=S[b];F&&T!==F&&!(dt(T)&&T.includes(F))&&(o[b]=T?[].concat(T,F):F)}else b!==""&&(o[b]=S[b])}return o}let $t=null;const oi=()=>$t||he;let Ge;{const d=Pe(),o=(m,S)=>{let b;return(b=d[m])||(b=d[m]=[]),b.push(S),T=>{b.length>1?b.forEach(F=>F(T)):b[0](T)}};Ge=o("__VUE_INSTANCE_SETTERS__",m=>$t=m),o("__VUE_SSR_SETTERS__",m=>ce=m)}const Ln=d=>{const o=$t;return Ge(d),d.scope.on(),()=>{d.scope.off(),Ge(o)}};let ce=!1;process.env.NODE_ENV;const In=/(?:^|[-_])\w/g,Rn=d=>d.replace(In,o=>o.toUpperCase()).replace(/[-_]/g,"");function Ui(d,o=!0){return mt(d)?d.displayName||d.name:d.name||o&&d.__name}function Gi(d,o,m=!1){let S=Ui(o);if(!S&&o.__file){const b=o.__file.match(/([^/\\]+)\.\w+$/);b&&(S=b[1])}if(!S&&d){const b=T=>{for(const F in T)if(T[F]===o)return F};S=b(d.components)||d.parent&&b(d.parent.type.components)||b(d.appContext.components)}return S?Rn(S):m?"App":"Anonymous"}function qi(d){return mt(d)&&"__vccOpts"in d}const Ki=(d,o)=>{const m=zr(d,o,ce);if(process.env.NODE_ENV!=="production"){const S=oi();S&&S.appContext.config.warnRecursiveComputed&&(m._warnRecursive=!0)}return m};function jn(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const d={style:"color:#3ba776"},o={style:"color:#1677ff"},m={style:"color:#f5222d"},S={style:"color:#eb2f96"},b={__vue_custom_formatter:!0,header(t){if(!yt(t))return null;if(t.__isVue)return["div",d,"VueInstance"];if(St(t)){Kt();const i=t.value;return Jt(),["div",{},["span",d,a(t)],"<",u(i),">"]}else{if(Gt(t))return["div",{},["span",d,Ct(t)?"ShallowReactive":"Reactive"],"<",u(t),`>${Ot(t)?" (readonly)":""}`];if(Ot(t))return["div",{},["span",d,Ct(t)?"ShallowReadonly":"Readonly"],"<",u(t),">"]}return null},hasBody(t){return t&&t.__isVue},body(t){if(t&&t.__isVue)return["div",{},...T(t.$)]}};function T(t){const i=[];t.type.props&&t.props&&i.push(F("props",at(t.props))),t.setupState!==re&&i.push(F("setup",t.setupState)),t.data!==re&&i.push(F("data",at(t.data)));const e=n(t,"computed");e&&i.push(F("computed",e));const s=n(t,"inject");return s&&i.push(F("injected",s)),i.push(["div",{},["span",{style:S.style+";opacity:0.66"},"$ (internal): "],["object",{object:t}]]),i}function F(t,i){return i=Rt({},i),Object.keys(i).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},t],["div",{style:"padding-left:1.25em"},...Object.keys(i).map(e=>["div",{},["span",S,e+": "],u(i[e],!1)])]]:["span",{}]}function u(t,i=!0){return typeof t=="number"?["span",o,t]:typeof t=="string"?["span",m,JSON.stringify(t)]:typeof t=="boolean"?["span",S,t]:yt(t)?["object",{object:i?at(t):t}]:["span",m,String(t)]}function n(t,i){const e=t.type;if(mt(e))return;const s={};for(const h in t.ctx)l(e,h,i)&&(s[h]=t.ctx[h]);return s}function l(t,i,e){const s=t[e];if(dt(s)&&s.includes(i)||yt(s)&&i in s||t.extends&&l(t.extends,i,e)||t.mixins&&t.mixins.some(h=>l(h,i,e)))return!0}function a(t){return Ct(t)?"ShallowRef":t.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(b):window.devtoolsFormatters=[b]}process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;function Bn(){jn()}process.env.NODE_ENV!=="production"&&Bn();function Nn(){const d=new Set,o=b=>{d.delete(b)};return{on:b=>(d.add(b),{off:()=>o(b)}),off:o,trigger:(...b)=>Promise.all(Array.from(d).map(T=>T(...b)))}}function fe(d){return typeof d=="function"?d():Yr(d)}const de=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Xn=Object.prototype.toString,Wn=d=>Xn.call(d)==="[object Object]",Vn=()=>{},Yn=(d,o)=>Object.prototype.hasOwnProperty.call(d,o);function Hn(d){let o;function m(){return o||(o=d()),o}return m.reset=async()=>{const S=o;o=void 0,S&&await S},m}function zn(d,o,m={}){const{immediate:S=!0}=m,b=jt(!1);let T=null;function F(){T&&(clearTimeout(T),T=null)}function u(){b.value=!1,F()}function n(...l){F(),b.value=!0,T=setTimeout(()=>{b.value=!1,T=null,d(...l)},fe(o))}return S&&(b.value=!0,de&&n()),{isPending:oe(b),start:n,stop:u}}function Un(d){var o;const m=fe(d);return(o=m?.$el)!=null?o:m}const Gn=de?window:void 0,qn=de?window.document:void 0,Ji=de?window.navigator:void 0;function $i(...d){let o,m,S,b;if(typeof d[0]=="string"||Array.isArray(d[0])?([m,S,b]=d,o=Gn):[o,m,S,b]=d,!o)return Vn;Array.isArray(m)||(m=[m]),Array.isArray(S)||(S=[S]);const T=[],F=()=>{T.forEach(a=>a()),T.length=0},u=(a,t,i,e)=>(a.addEventListener(t,i,e),()=>a.removeEventListener(t,i,e)),n=Xi(()=>[Un(o),fe(b)],([a,t])=>{if(F(),!a)return;const i=Wn(t)?{...t}:t;T.push(...m.flatMap(e=>S.map(s=>u(a,e,s,i))))},{immediate:!0,flush:"post"});return()=>{n(),F()}}function Kn(){const d=jt(!1),o=oi();return o&&dn(()=>{d.value=!0},o),d}function Qi(d){const o=Kn();return Ki(()=>(o.value,!!d()))}const te={array:d=>JSON.stringify(d),object:d=>JSON.stringify(d),set:d=>JSON.stringify(Array.from(d)),map:d=>JSON.stringify(Object.fromEntries(d)),null:()=>""};function Jn(d){return d?d instanceof Map?te.map:d instanceof Set?te.set:Array.isArray(d)?te.array:te.object:te.null}function $n(d,o){const m=jt(""),S=jt();function b(){if(de)return S.value=new Promise((T,F)=>{try{const u=fe(d);if(u==null)T("");else if(typeof u=="string")T(je(new Blob([u],{type:"text/plain"})));else if(u instanceof Blob)T(je(u));else if(u instanceof ArrayBuffer)T(window.btoa(String.fromCharCode(...new Uint8Array(u))));else if(u instanceof HTMLCanvasElement)T(u.toDataURL(o?.type,o?.quality));else if(u instanceof HTMLImageElement){const n=u.cloneNode(!1);n.crossOrigin="Anonymous",Qn(n).then(()=>{const l=document.createElement("canvas"),a=l.getContext("2d");l.width=n.width,l.height=n.height,a.drawImage(n,0,0,l.width,l.height),T(l.toDataURL(o?.type,o?.quality))}).catch(F)}else if(typeof u=="object"){const l=(o?.serializer||Jn(u))(u);return T(je(new Blob([l],{type:"application/json"})))}else F(new Error("target is unsupported types"))}catch(u){F(u)}}),S.value.then(T=>m.value=T),S.value}return St(d)||typeof d=="function"?Xi(d,b,{immediate:!0}):b(),{base64:m,promise:S,execute:b}}function Qn(d){return new Promise((o,m)=>{d.complete?o():(d.onload=()=>{o()},d.onerror=m)})}function je(d){return new Promise((o,m)=>{const S=new FileReader;S.onload=b=>{o(b.target.result)},S.onerror=m,S.readAsDataURL(d)})}function di(d,o={}){const{controls:m=!1,navigator:S=Ji}=o,b=Qi(()=>S&&"permissions"in S);let T;const F=typeof d=="string"?{name:d}:d,u=jt(),n=()=>{T&&(u.value=T.state)},l=Hn(async()=>{if(b.value){if(!T)try{T=await S.permissions.query(F),$i(T,"change",n),n()}catch{u.value="prompt"}return T}});return l(),m?{state:u,isSupported:b,query:l}:u}function Zn(d={}){const{navigator:o=Ji,read:m=!1,source:S,copiedDuring:b=1500,legacy:T=!1}=d,F=Qi(()=>o&&"clipboard"in o),u=di("clipboard-read"),n=di("clipboard-write"),l=Ki(()=>F.value||T),a=jt(""),t=jt(!1),i=zn(()=>t.value=!1,b);function e(){F.value&&c(u.value)?o.clipboard.readText().then(f=>{a.value=f}):a.value=r()}l.value&&m&&$i(["copy","cut"],e);async function s(f=fe(S)){l.value&&f!=null&&(F.value&&c(n.value)?await o.clipboard.writeText(f):h(f),a.value=f,t.value=!0,i.start())}function h(f){const g=document.createElement("textarea");g.value=f??"",g.style.position="absolute",g.style.opacity="0",document.body.appendChild(g),g.select(),document.execCommand("copy"),g.remove()}function r(){var f,g,p;return(p=(g=(f=document?.getSelection)==null?void 0:f.call(document))==null?void 0:g.toString())!=null?p:""}function c(f){return f==="granted"||f==="prompt"}return{isSupported:l,text:a,copied:t,copy:s}}const ts={multiple:!0,accept:"*",reset:!1,directory:!1};function es(d={}){const{document:o=qn}=d,m=jt(null),{on:S,trigger:b}=Nn();let T;o&&(T=o.createElement("input"),T.type="file",T.onchange=n=>{const l=n.target;m.value=l.files,b(m.value)});const F=()=>{m.value=null,T&&T.value&&(T.value="",b(null))},u=n=>{if(!T)return;const l={...ts,...d,...n};T.multiple=l.multiple,T.accept=l.accept,T.webkitdirectory=l.directory,Yn(l,"capture")&&(T.capture=l.capture),l.reset&&F(),T.click()};return{files:oe(m),open:u,reset:F,onChange:S}}function is(d){if(Object.prototype.hasOwnProperty.call(d,"__esModule"))return d;var o=d.default;if(typeof o=="function"){var m=function S(){var b=!1;try{b=this instanceof S}catch{}return b?Reflect.construct(o,arguments,this.constructor):o.apply(this,arguments)};m.prototype=o.prototype}else m={};return Object.defineProperty(m,"__esModule",{value:!0}),Object.keys(d).forEach(function(S){var b=Object.getOwnPropertyDescriptor(d,S);Object.defineProperty(m,S,b.get?b:{enumerable:!0,get:function(){return d[S]}})}),m}var Be={};const rs={},ns=Object.freeze(Object.defineProperty({__proto__:null,default:rs},Symbol.toStringTag,{value:"Module"})),Ne=is(ns);var gi;function ss(){return gi||(gi=1,(function(d){var o=o||{version:"5.3.0"};if(d.fabric=o,typeof document<"u"&&typeof window<"u")document instanceof(typeof HTMLDocument<"u"?HTMLDocument:Document)?o.document=document:o.document=document.implementation.createHTMLDocument(""),o.window=window;else{var m=Ne,S=new m.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;o.document=S.document,o.jsdomImplForWrapper=Ne.implForWrapper,o.nodeCanvas=Ne.Canvas,o.window=S,DOMParser=o.window.DOMParser}o.isTouchSupported="ontouchstart"in o.window||"ontouchstart"in o.document||o.window&&o.window.navigator&&o.window.navigator.maxTouchPoints>0,o.isLikelyNode=typeof Buffer<"u"&&typeof window>"u",o.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"],o.DPI=96,o.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",o.commaWsp="(?:\\s+,?\\s*|,\\s*)",o.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/ig,o.reNonWord=/[ \n\.,;!\?\-]/,o.fontPaths={},o.iMatrix=[1,0,0,1,0,0],o.svgNS="http://www.w3.org/2000/svg",o.perfLimitSizeTotal=2097152,o.maxCacheSideLimit=4096,o.minCacheSideLimit=256,o.charWidthsCache={},o.textureSize=2048,o.disableStyleCopyPaste=!1,o.enableGLFiltering=!0,o.devicePixelRatio=o.window.devicePixelRatio||o.window.webkitDevicePixelRatio||o.window.mozDevicePixelRatio||1,o.browserShadowBlurConstant=1,o.arcToSegmentsCache={},o.boundsOfCurveCache={},o.cachesBoundsOfCurve=!0,o.forceGLPutImageData=!1,o.initFilterBackend=function(){if(o.enableGLFiltering&&o.isWebglSupported&&o.isWebglSupported(o.textureSize))return console.log("max texture size: "+o.maxTextureSize),new o.WebglFilterBackend({tileSize:o.textureSize});if(o.Canvas2dFilterBackend)return new o.Canvas2dFilterBackend},typeof document<"u"&&typeof window<"u"&&(window.fabric=o),(function(){function u(e,s){if(this.__eventListeners[e]){var h=this.__eventListeners[e];s?h[h.indexOf(s)]=!1:o.util.array.fill(h,!1)}}function n(e,s){if(this.__eventListeners||(this.__eventListeners={}),arguments.length===1)for(var h in e)this.on(h,e[h]);else this.__eventListeners[e]||(this.__eventListeners[e]=[]),this.__eventListeners[e].push(s);return this}function l(e,s){var h=(function(){s.apply(this,arguments),this.off(e,h)}).bind(this);this.on(e,h)}function a(e,s){if(arguments.length===1)for(var h in e)l.call(this,h,e[h]);else l.call(this,e,s);return this}function t(e,s){if(!this.__eventListeners)return this;if(arguments.length===0)for(e in this.__eventListeners)u.call(this,e);else if(arguments.length===1&&typeof arguments[0]=="object")for(var h in e)u.call(this,h,e[h]);else u.call(this,e,s);return this}function i(e,s){if(!this.__eventListeners)return this;var h=this.__eventListeners[e];if(!h)return this;for(var r=0,c=h.length;r<c;r++)h[r]&&h[r].call(this,s||{});return this.__eventListeners[e]=h.filter(function(f){return f!==!1}),this}o.Observable={fire:i,on:n,once:a,off:t}})(),o.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var u=0,n=arguments.length;u<n;u++)this._onObjectAdded(arguments[u]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(u,n,l){var a=this._objects;return l?a[n]=u:a.splice(n,0,u),this._onObjectAdded&&this._onObjectAdded(u),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var u=this._objects,n,l=!1,a=0,t=arguments.length;a<t;a++)n=u.indexOf(arguments[a]),n!==-1&&(l=!0,u.splice(n,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[a]));return this.renderOnAddRemove&&l&&this.requestRenderAll(),this},forEachObject:function(u,n){for(var l=this.getObjects(),a=0,t=l.length;a<t;a++)u.call(n,l[a],a,l);return this},getObjects:function(u){return typeof u>"u"?this._objects.concat():this._objects.filter(function(n){return n.type===u})},item:function(u){return this._objects[u]},isEmpty:function(){return this._objects.length===0},size:function(){return this._objects.length},contains:function(u,n){return this._objects.indexOf(u)>-1?!0:n?this._objects.some(function(l){return typeof l.contains=="function"&&l.contains(u,!0)}):!1},complexity:function(){return this._objects.reduce(function(u,n){return u+=n.complexity?n.complexity():0,u},0)}},o.CommonMethods={_setOptions:function(u){for(var n in u)this.set(n,u[n])},_initGradient:function(u,n){u&&u.colorStops&&!(u instanceof o.Gradient)&&this.set(n,new o.Gradient(u))},_initPattern:function(u,n,l){u&&u.source&&!(u instanceof o.Pattern)?this.set(n,new o.Pattern(u,l)):l&&l()},_setObject:function(u){for(var n in u)this._set(n,u[n])},set:function(u,n){return typeof u=="object"?this._setObject(u):this._set(u,n),this},_set:function(u,n){this[u]=n},toggle:function(u){var n=this.get(u);return typeof n=="boolean"&&this.set(u,!n),this},get:function(u){return this[u]}},(function(u){var n=Math.sqrt,l=Math.atan2,a=Math.pow,t=Math.PI/180,i=Math.PI/2;o.util={cos:function(e){if(e===0)return 1;e<0&&(e=-e);var s=e/i;switch(s){case 1:case 3:return 0;case 2:return-1}return Math.cos(e)},sin:function(e){if(e===0)return 0;var s=e/i,h=1;switch(e<0&&(h=-1),s){case 1:return h;case 2:return 0;case 3:return-h}return Math.sin(e)},removeFromArray:function(e,s){var h=e.indexOf(s);return h!==-1&&e.splice(h,1),e},getRandomInt:function(e,s){return Math.floor(Math.random()*(s-e+1))+e},degreesToRadians:function(e){return e*t},radiansToDegrees:function(e){return e/t},rotatePoint:function(e,s,h){var r=new o.Point(e.x-s.x,e.y-s.y),c=o.util.rotateVector(r,h);return new o.Point(c.x,c.y).addEquals(s)},rotateVector:function(e,s){var h=o.util.sin(s),r=o.util.cos(s),c=e.x*r-e.y*h,f=e.x*h+e.y*r;return{x:c,y:f}},createVector:function(e,s){return new o.Point(s.x-e.x,s.y-e.y)},calcAngleBetweenVectors:function(e,s){return Math.acos((e.x*s.x+e.y*s.y)/(Math.hypot(e.x,e.y)*Math.hypot(s.x,s.y)))},getHatVector:function(e){return new o.Point(e.x,e.y).multiply(1/Math.hypot(e.x,e.y))},getBisector:function(e,s,h){var r=o.util.createVector(e,s),c=o.util.createVector(e,h),f=o.util.calcAngleBetweenVectors(r,c),g=o.util.calcAngleBetweenVectors(o.util.rotateVector(r,f),c),p=f*(g===0?1:-1)/2;return{vector:o.util.getHatVector(o.util.rotateVector(r,p)),angle:f}},projectStrokeOnPoints:function(e,s,h){var r=[],c=s.strokeWidth/2,f=s.strokeUniform?new o.Point(1/s.scaleX,1/s.scaleY):new o.Point(1,1),g=function(p){var v=c/Math.hypot(p.x,p.y);return new o.Point(p.x*v*f.x,p.y*v*f.y)};return e.length<=1||e.forEach(function(p,v){var _=new o.Point(p.x,p.y),x,D;v===0?(D=e[v+1],x=h?g(o.util.createVector(D,_)).addEquals(_):e[e.length-1]):v===e.length-1?(x=e[v-1],D=h?g(o.util.createVector(x,_)).addEquals(_):e[0]):(x=e[v-1],D=e[v+1]);var B=o.util.getBisector(_,x,D),z=B.vector,G=B.angle,Q,Z;if(s.strokeLineJoin==="miter"&&(Q=-c/Math.sin(G/2),Z=new o.Point(z.x*Q*f.x,z.y*Q*f.y),Math.hypot(Z.x,Z.y)/c<=s.strokeMiterLimit)){r.push(_.add(Z)),r.push(_.subtract(Z));return}Q=-c*Math.SQRT2,Z=new o.Point(z.x*Q*f.x,z.y*Q*f.y),r.push(_.add(Z)),r.push(_.subtract(Z))}),r},transformPoint:function(e,s,h){return h?new o.Point(s[0]*e.x+s[2]*e.y,s[1]*e.x+s[3]*e.y):new o.Point(s[0]*e.x+s[2]*e.y+s[4],s[1]*e.x+s[3]*e.y+s[5])},makeBoundingBoxFromPoints:function(e,s){if(s)for(var h=0;h<e.length;h++)e[h]=o.util.transformPoint(e[h],s);var r=[e[0].x,e[1].x,e[2].x,e[3].x],c=o.util.array.min(r),f=o.util.array.max(r),g=f-c,p=[e[0].y,e[1].y,e[2].y,e[3].y],v=o.util.array.min(p),_=o.util.array.max(p),x=_-v;return{left:c,top:v,width:g,height:x}},invertTransform:function(e){var s=1/(e[0]*e[3]-e[1]*e[2]),h=[s*e[3],-s*e[1],-s*e[2],s*e[0]],r=o.util.transformPoint({x:e[4],y:e[5]},h,!0);return h[4]=-r.x,h[5]=-r.y,h},toFixed:function(e,s){return parseFloat(Number(e).toFixed(s))},parseUnit:function(e,s){var h=/\D{0,2}$/.exec(e),r=parseFloat(e);switch(s||(s=o.Text.DEFAULT_SVG_FONT_SIZE),h[0]){case"mm":return r*o.DPI/25.4;case"cm":return r*o.DPI/2.54;case"in":return r*o.DPI;case"pt":return r*o.DPI/72;case"pc":return r*o.DPI/72*12;case"em":return r*s;default:return r}},falseFunction:function(){return!1},getKlass:function(e,s){return e=o.util.string.camelize(e.charAt(0).toUpperCase()+e.slice(1)),o.util.resolveNamespace(s)[e]},getSvgAttributes:function(e){var s=["instantiated_by_use","style","id","class"];switch(e){case"linearGradient":s=s.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":s=s.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":s=s.concat(["offset","stop-color","stop-opacity"]);break}return s},resolveNamespace:function(e){if(!e)return o;var s=e.split("."),h=s.length,r,c=u||o.window;for(r=0;r<h;++r)c=c[s[r]];return c},loadImage:function(e,s,h,r){if(!e){s&&s.call(h,e);return}var c=o.util.createImage(),f=function(){s&&s.call(h,c,!1),c=c.onload=c.onerror=null};c.onload=f,c.onerror=function(){o.log("Error loading "+c.src),s&&s.call(h,null,!0),c=c.onload=c.onerror=null},e.indexOf("data")!==0&&r!==void 0&&r!==null&&(c.crossOrigin=r),e.substring(0,14)==="data:image/svg"&&(c.onload=null,o.util.loadImageInDom(c,f)),c.src=e},loadImageInDom:function(e,s){var h=o.document.createElement("div");h.style.width=h.style.height="1px",h.style.left=h.style.top="-100%",h.style.position="absolute",h.appendChild(e),o.document.querySelector("body").appendChild(h),e.onload=function(){s(),h.parentNode.removeChild(h),h=null}},enlivenObjects:function(e,s,h,r){e=e||[];var c=[],f=0,g=e.length;function p(){++f===g&&s&&s(c.filter(function(v){return v}))}if(!g){s&&s(c);return}e.forEach(function(v,_){if(!v||!v.type){p();return}var x=o.util.getKlass(v.type,h);x.fromObject(v,function(D,B){B||(c[_]=D),r&&r(v,D,B),p()})})},enlivenObjectEnlivables:function(e,s,h){var r=o.Object.ENLIVEN_PROPS.filter(function(c){return!!e[c]});o.util.enlivenObjects(r.map(function(c){return e[c]}),function(c){var f={};r.forEach(function(g,p){f[g]=c[p],s&&(s[g]=c[p])}),h&&h(f)})},enlivenPatterns:function(e,s){e=e||[];function h(){++c===f&&s&&s(r)}var r=[],c=0,f=e.length;if(!f){s&&s(r);return}e.forEach(function(g,p){g&&g.source?new o.Pattern(g,function(v){r[p]=v,h()}):(r[p]=g,h())})},groupSVGElements:function(e,s,h){var r;return e&&e.length===1?(typeof h<"u"&&(e[0].sourcePath=h),e[0]):(s&&(s.width&&s.height?s.centerPoint={x:s.width/2,y:s.height/2}:(delete s.width,delete s.height)),r=new o.Group(e,s),typeof h<"u"&&(r.sourcePath=h),r)},populateWithProperties:function(e,s,h){if(h&&Array.isArray(h))for(var r=0,c=h.length;r<c;r++)h[r]in e&&(s[h[r]]=e[h[r]])},createCanvasElement:function(){return o.document.createElement("canvas")},copyCanvasElement:function(e){var s=o.util.createCanvasElement();return s.width=e.width,s.height=e.height,s.getContext("2d").drawImage(e,0,0),s},toDataURL:function(e,s,h){return e.toDataURL("image/"+s,h)},createImage:function(){return o.document.createElement("img")},multiplyTransformMatrices:function(e,s,h){return[e[0]*s[0]+e[2]*s[1],e[1]*s[0]+e[3]*s[1],e[0]*s[2]+e[2]*s[3],e[1]*s[2]+e[3]*s[3],h?0:e[0]*s[4]+e[2]*s[5]+e[4],h?0:e[1]*s[4]+e[3]*s[5]+e[5]]},qrDecompose:function(e){var s=l(e[1],e[0]),h=a(e[0],2)+a(e[1],2),r=n(h),c=(e[0]*e[3]-e[2]*e[1])/r,f=l(e[0]*e[2]+e[1]*e[3],h);return{angle:s/t,scaleX:r,scaleY:c,skewX:f/t,skewY:0,translateX:e[4],translateY:e[5]}},calcRotateMatrix:function(e){if(!e.angle)return o.iMatrix.concat();var s=o.util.degreesToRadians(e.angle),h=o.util.cos(s),r=o.util.sin(s);return[h,r,-r,h,0,0]},calcDimensionsMatrix:function(e){var s=typeof e.scaleX>"u"?1:e.scaleX,h=typeof e.scaleY>"u"?1:e.scaleY,r=[e.flipX?-s:s,0,0,e.flipY?-h:h,0,0],c=o.util.multiplyTransformMatrices,f=o.util.degreesToRadians;return e.skewX&&(r=c(r,[1,0,Math.tan(f(e.skewX)),1],!0)),e.skewY&&(r=c(r,[1,Math.tan(f(e.skewY)),0,1],!0)),r},composeMatrix:function(e){var s=[1,0,0,1,e.translateX||0,e.translateY||0],h=o.util.multiplyTransformMatrices;return e.angle&&(s=h(s,o.util.calcRotateMatrix(e))),(e.scaleX!==1||e.scaleY!==1||e.skewX||e.skewY||e.flipX||e.flipY)&&(s=h(s,o.util.calcDimensionsMatrix(e))),s},resetObjectTransform:function(e){e.scaleX=1,e.scaleY=1,e.skewX=0,e.skewY=0,e.flipX=!1,e.flipY=!1,e.rotate(0)},saveObjectTransform:function(e){return{scaleX:e.scaleX,scaleY:e.scaleY,skewX:e.skewX,skewY:e.skewY,angle:e.angle,left:e.left,flipX:e.flipX,flipY:e.flipY,top:e.top}},isTransparent:function(e,s,h,r){r>0&&(s>r?s-=r:s=0,h>r?h-=r:h=0);var c=!0,f,g,p=e.getImageData(s,h,r*2||1,r*2||1),v=p.data.length;for(f=3;f<v&&(g=p.data[f],c=g<=0,c!==!1);f+=4);return p=null,c},parsePreserveAspectRatioAttribute:function(e){var s="meet",h="Mid",r="Mid",c=e.split(" "),f;return c&&c.length&&(s=c.pop(),s!=="meet"&&s!=="slice"?(f=s,s="meet"):c.length&&(f=c.pop())),h=f!=="none"?f.slice(1,4):"none",r=f!=="none"?f.slice(5,8):"none",{meetOrSlice:s,alignX:h,alignY:r}},clearFabricFontCache:function(e){e=(e||"").toLowerCase(),e?o.charWidthsCache[e]&&delete o.charWidthsCache[e]:o.charWidthsCache={}},limitDimsByArea:function(e,s){var h=Math.sqrt(s*e),r=Math.floor(s/h);return{x:Math.floor(h),y:r}},capValue:function(e,s,h){return Math.max(e,Math.min(s,h))},findScaleToFit:function(e,s){return Math.min(s.width/e.width,s.height/e.height)},findScaleToCover:function(e,s){return Math.max(s.width/e.width,s.height/e.height)},matrixToSVG:function(e){return"matrix("+e.map(function(s){return o.util.toFixed(s,o.Object.NUM_FRACTION_DIGITS)}).join(" ")+")"},removeTransformFromObject:function(e,s){var h=o.util.invertTransform(s),r=o.util.multiplyTransformMatrices(h,e.calcOwnMatrix());o.util.applyTransformToObject(e,r)},addTransformToObject:function(e,s){o.util.applyTransformToObject(e,o.util.multiplyTransformMatrices(s,e.calcOwnMatrix()))},applyTransformToObject:function(e,s){var h=o.util.qrDecompose(s),r=new o.Point(h.translateX,h.translateY);e.flipX=!1,e.flipY=!1,e.set("scaleX",h.scaleX),e.set("scaleY",h.scaleY),e.skewX=h.skewX,e.skewY=h.skewY,e.angle=h.angle,e.setPositionByOrigin(r,"center","center")},sizeAfterTransform:function(e,s,h){var r=e/2,c=s/2,f=[{x:-r,y:-c},{x:r,y:-c},{x:-r,y:c},{x:r,y:c}],g=o.util.calcDimensionsMatrix(h),p=o.util.makeBoundingBoxFromPoints(f,g);return{x:p.width,y:p.height}},mergeClipPaths:function(e,s){var h=e,r=s;h.inverted&&!r.inverted&&(h=s,r=e),o.util.applyTransformToObject(r,o.util.multiplyTransformMatrices(o.util.invertTransform(h.calcTransformMatrix()),r.calcTransformMatrix()));var c=h.inverted&&r.inverted;return c&&(h.inverted=r.inverted=!1),new o.Group([h],{clipPath:r,inverted:c})},hasStyleChanged:function(e,s,h){return h=h||!1,e.fill!==s.fill||e.stroke!==s.stroke||e.strokeWidth!==s.strokeWidth||e.fontSize!==s.fontSize||e.fontFamily!==s.fontFamily||e.fontWeight!==s.fontWeight||e.fontStyle!==s.fontStyle||e.textBackgroundColor!==s.textBackgroundColor||e.deltaY!==s.deltaY||h&&(e.overline!==s.overline||e.underline!==s.underline||e.linethrough!==s.linethrough)},stylesToArray:function(h,s){for(var h=o.util.object.clone(h,!0),r=s.split(`
6
6
  `),c=-1,f={},g=[],p=0;p<r.length;p++){if(!h[p]){c+=r[p].length;continue}for(var v=0;v<r[p].length;v++){c++;var _=h[p][v];if(_&&Object.keys(_).length>0){var x=o.util.hasStyleChanged(f,_,!0);x?g.push({start:c,end:c+1,style:_}):g[g.length-1].end++}f=_||{}}}return g},stylesFromArray:function(e,s){if(!Array.isArray(e))return e;for(var h=s.split(`
7
- `),r=-1,c=0,f={},g=0;g<h.length;g++)for(var p=0;p<h[g].length;p++)r++,e[c]&&e[c].start<=r&&r<e[c].end&&(f[g]=f[g]||{},f[g][p]=Object.assign({},e[c].style),r===e[c].end-1&&c++);return f}}})(d),(function(){var u=Array.prototype.join,n={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},l={m:"l",M:"L"};function a(y,E,P,O,I,w,C,A,M,N,L){var Y=o.util.cos(y),U=o.util.sin(y),J=o.util.cos(E),R=o.util.sin(E),k=P*I*J-O*w*R+C,W=O*I*J+P*w*R+A,V=N+M*(-P*I*U-O*w*Y),j=L+M*(-O*I*U+P*w*Y),H=k+M*(P*I*R+O*w*J),$=W+M*(O*I*R-P*w*J);return["C",V,j,H,$,k,W]}function t(y,E,P,O,I,w,C){var A=Math.PI,M=C*A/180,N=o.util.sin(M),L=o.util.cos(M),Y=0,U=0;P=Math.abs(P),O=Math.abs(O);var J=-L*y*.5-N*E*.5,R=-L*E*.5+N*y*.5,k=P*P,W=O*O,V=R*R,j=J*J,H=k*W-k*V-W*j,$=0;if(H<0){var st=Math.sqrt(1-H/(k*W));P*=st,O*=st}else $=(I===w?-1:1)*Math.sqrt(H/(k*V+W*j));var rt=$*P*R/O,X=-$*O*J/P,nt=L*rt-N*X+y*.5,ot=N*rt+L*X+E*.5,lt=i(1,0,(J-rt)/P,(R-X)/O),ut=i((J-rt)/P,(R-X)/O,(-J-rt)/P,(-R-X)/O);w===0&&ut>0?ut-=2*A:w===1&&ut<0&&(ut+=2*A);for(var ct=Math.ceil(Math.abs(ut/A*2)),vt=[],ft=ut/ct,Bt=8/3*Math.sin(ft/4)*Math.sin(ft/4)/Math.sin(ft/2),Qt=lt+ft,wt=0;wt<ct;wt++)vt[wt]=a(lt,Qt,L,N,P,O,nt,ot,Bt,Y,U),Y=vt[wt][5],U=vt[wt][6],lt=Qt,Qt+=ft;return vt}function i(y,E,P,O){var I=Math.atan2(E,y),w=Math.atan2(O,P);return w>=I?w-I:2*Math.PI-(I-w)}function e(y,E,P,O,I,w,C,A){var M;if(o.cachesBoundsOfCurve&&(M=u.call(arguments),o.boundsOfCurveCache[M]))return o.boundsOfCurveCache[M];var N=Math.sqrt,L=Math.min,Y=Math.max,U=Math.abs,J=[],R=[[],[]],k,W,V,j,H,$,st,rt;W=6*y-12*P+6*I,k=-3*y+9*P-9*I+3*C,V=3*P-3*y;for(var X=0;X<2;++X){if(X>0&&(W=6*E-12*O+6*w,k=-3*E+9*O-9*w+3*A,V=3*O-3*E),U(k)<1e-12){if(U(W)<1e-12)continue;j=-V/W,0<j&&j<1&&J.push(j);continue}st=W*W-4*V*k,!(st<0)&&(rt=N(st),H=(-W+rt)/(2*k),0<H&&H<1&&J.push(H),$=(-W-rt)/(2*k),0<$&&$<1&&J.push($))}for(var nt,ot,lt=J.length,ut=lt,ct;lt--;)j=J[lt],ct=1-j,nt=ct*ct*ct*y+3*ct*ct*j*P+3*ct*j*j*I+j*j*j*C,R[0][lt]=nt,ot=ct*ct*ct*E+3*ct*ct*j*O+3*ct*j*j*w+j*j*j*A,R[1][lt]=ot;R[0][ut]=y,R[1][ut]=E,R[0][ut+1]=C,R[1][ut+1]=A;var vt=[{x:L.apply(null,R[0]),y:L.apply(null,R[1])},{x:Y.apply(null,R[0]),y:Y.apply(null,R[1])}];return o.cachesBoundsOfCurve&&(o.boundsOfCurveCache[M]=vt),vt}function s(y,E,P){for(var O=P[1],I=P[2],w=P[3],C=P[4],A=P[5],M=P[6],N=P[7],L=t(M-y,N-E,O,I,C,A,w),Y=0,U=L.length;Y<U;Y++)L[Y][1]+=y,L[Y][2]+=E,L[Y][3]+=y,L[Y][4]+=E,L[Y][5]+=y,L[Y][6]+=E;return L}function h(y){var E=0,P=0,O=y.length,I=0,w=0,C,A,M,N=[],L,Y,U;for(A=0;A<O;++A){switch(M=!1,C=y[A].slice(0),C[0]){case"l":C[0]="L",C[1]+=E,C[2]+=P;case"L":E=C[1],P=C[2];break;case"h":C[1]+=E;case"H":C[0]="L",C[2]=P,E=C[1];break;case"v":C[1]+=P;case"V":C[0]="L",P=C[1],C[1]=E,C[2]=P;break;case"m":C[0]="M",C[1]+=E,C[2]+=P;case"M":E=C[1],P=C[2],I=C[1],w=C[2];break;case"c":C[0]="C",C[1]+=E,C[2]+=P,C[3]+=E,C[4]+=P,C[5]+=E,C[6]+=P;case"C":Y=C[3],U=C[4],E=C[5],P=C[6];break;case"s":C[0]="S",C[1]+=E,C[2]+=P,C[3]+=E,C[4]+=P;case"S":L==="C"?(Y=2*E-Y,U=2*P-U):(Y=E,U=P),E=C[3],P=C[4],C[0]="C",C[5]=C[3],C[6]=C[4],C[3]=C[1],C[4]=C[2],C[1]=Y,C[2]=U,Y=C[3],U=C[4];break;case"q":C[0]="Q",C[1]+=E,C[2]+=P,C[3]+=E,C[4]+=P;case"Q":Y=C[1],U=C[2],E=C[3],P=C[4];break;case"t":C[0]="T",C[1]+=E,C[2]+=P;case"T":L==="Q"?(Y=2*E-Y,U=2*P-U):(Y=E,U=P),C[0]="Q",E=C[1],P=C[2],C[1]=Y,C[2]=U,C[3]=E,C[4]=P;break;case"a":C[0]="A",C[6]+=E,C[7]+=P;case"A":M=!0,N=N.concat(s(E,P,C)),E=C[6],P=C[7];break;case"z":case"Z":E=I,P=w;break}M||N.push(C),L=C[0]}return N}function r(y,E,P,O){return Math.sqrt((P-y)*(P-y)+(O-E)*(O-E))}function c(y){return y*y*y}function f(y){return 3*y*y*(1-y)}function g(y){return 3*y*(1-y)*(1-y)}function p(y){return(1-y)*(1-y)*(1-y)}function v(y,E,P,O,I,w,C,A){return function(M){var N=c(M),L=f(M),Y=g(M),U=p(M);return{x:C*N+I*L+P*Y+y*U,y:A*N+w*L+O*Y+E*U}}}function _(y,E,P,O,I,w,C,A){return function(M){var N=1-M,L=3*N*N*(P-y)+6*N*M*(I-P)+3*M*M*(C-I),Y=3*N*N*(O-E)+6*N*M*(w-O)+3*M*M*(A-w);return Math.atan2(Y,L)}}function x(y){return y*y}function D(y){return 2*y*(1-y)}function B(y){return(1-y)*(1-y)}function z(y,E,P,O,I,w){return function(C){var A=x(C),M=D(C),N=B(C);return{x:I*A+P*M+y*N,y:w*A+O*M+E*N}}}function G(y,E,P,O,I,w){return function(C){var A=1-C,M=2*A*(P-y)+2*C*(I-P),N=2*A*(O-E)+2*C*(w-O);return Math.atan2(N,M)}}function Q(y,E,P){var O={x:E,y:P},I,w=0,C;for(C=1;C<=100;C+=1)I=y(C/100),w+=r(O.x,O.y,I.x,I.y),O=I;return w}function Z(y,E){for(var P=0,O=0,I=y.iterator,w={x:y.x,y:y.y},C,A,M=.01,N=y.angleFinder,L;O<E&&M>1e-4;)C=I(P),L=P,A=r(w.x,w.y,C.x,C.y),A+O>E?(P-=M,M/=2):(w=C,P+=M,O+=A);return C.angle=N(L),C}function q(y){for(var E=0,P=y.length,O,I=0,w=0,C=0,A=0,M=[],N,L,Y,U=0;U<P;U++){switch(O=y[U],L={x:I,y:w,command:O[0]},O[0]){case"M":L.length=0,C=I=O[1],A=w=O[2];break;case"L":L.length=r(I,w,O[1],O[2]),I=O[1],w=O[2];break;case"C":N=v(I,w,O[1],O[2],O[3],O[4],O[5],O[6]),Y=_(I,w,O[1],O[2],O[3],O[4],O[5],O[6]),L.iterator=N,L.angleFinder=Y,L.length=Q(N,I,w),I=O[5],w=O[6];break;case"Q":N=z(I,w,O[1],O[2],O[3],O[4]),Y=G(I,w,O[1],O[2],O[3],O[4]),L.iterator=N,L.angleFinder=Y,L.length=Q(N,I,w),I=O[3],w=O[4];break;case"Z":case"z":L.destX=C,L.destY=A,L.length=r(I,w,C,A),I=C,w=A;break}E+=L.length,M.push(L)}return M.push({length:E,x:I,y:w}),M}function K(y,E,P){P||(P=q(y));for(var O=0;E-P[O].length>0&&O<P.length-2;)E-=P[O].length,O++;var I=P[O],w=E/I.length,C=I.command,A=y[O],M;switch(C){case"M":return{x:I.x,y:I.y,angle:0};case"Z":case"z":return M=new o.Point(I.x,I.y).lerp(new o.Point(I.destX,I.destY),w),M.angle=Math.atan2(I.destY-I.y,I.destX-I.x),M;case"L":return M=new o.Point(I.x,I.y).lerp(new o.Point(A[1],A[2]),w),M.angle=Math.atan2(A[2]-I.y,A[1]-I.x),M;case"C":return Z(I,E);case"Q":return Z(I,E)}}function tt(y){var E=[],P=[],O,I,w=o.rePathCommand,C="[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*",A="("+C+")"+o.commaWsp,M="([01])"+o.commaWsp+"?",N=A+"?"+A+"?"+A+M+M+A+"?("+C+")",L=new RegExp(N,"g"),Y,U,J;if(!y||!y.match)return E;J=y.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);for(var R=0,k,W=J.length;R<W;R++){O=J[R],U=O.slice(1).trim(),P.length=0;var V=O.charAt(0);if(k=[V],V.toLowerCase()==="a")for(var j;j=L.exec(U);)for(var H=1;H<j.length;H++)P.push(j[H]);else for(;Y=w.exec(U);)P.push(Y[0]);for(var H=0,$=P.length;H<$;H++)I=parseFloat(P[H]),isNaN(I)||k.push(I);var st=n[V.toLowerCase()],rt=l[V]||V;if(k.length-1>st)for(var X=1,nt=k.length;X<nt;X+=st)E.push([V].concat(k.slice(X,X+st))),V=rt;else E.push(k)}return E}function it(y,E){var P=[],O,I=new o.Point(y[0].x,y[0].y),w=new o.Point(y[1].x,y[1].y),C=y.length,A=1,M=0,N=C>2;for(E=E||0,N&&(A=y[2].x<w.x?-1:y[2].x===w.x?0:1,M=y[2].y<w.y?-1:y[2].y===w.y?0:1),P.push(["M",I.x-A*E,I.y-M*E]),O=1;O<C;O++){if(!I.eq(w)){var L=I.midPointFrom(w);P.push(["Q",I.x,I.y,L.x,L.y])}I=y[O],O+1<y.length&&(w=y[O+1])}return N&&(A=I.x>y[O-2].x?1:I.x===y[O-2].x?0:-1,M=I.y>y[O-2].y?1:I.y===y[O-2].y?0:-1),P.push(["L",I.x+A*E,I.y+M*E]),P}function et(y,E,P){return P&&(E=o.util.multiplyTransformMatrices(E,[1,0,0,1,-P.x,-P.y])),y.map(function(O){for(var I=O.slice(0),w={},C=1;C<O.length-1;C+=2)w.x=O[C],w.y=O[C+1],w=o.util.transformPoint(w,E),I[C]=w.x,I[C+1]=w.y;return I})}o.util.joinPath=function(y){return y.map(function(E){return E.join(" ")}).join(" ")},o.util.parsePath=tt,o.util.makePathSimpler=h,o.util.getSmoothPathFromPoints=it,o.util.getPathSegmentsInfo=q,o.util.getBoundsOfCurve=e,o.util.getPointOnPath=K,o.util.transformPath=et})(),(function(){var u=Array.prototype.slice;function n(e,s){for(var h=u.call(arguments,2),r=[],c=0,f=e.length;c<f;c++)r[c]=h.length?e[c][s].apply(e[c],h):e[c][s].call(e[c]);return r}function l(e,s){return i(e,s,function(h,r){return h>=r})}function a(e,s){return i(e,s,function(h,r){return h<r})}function t(e,s){for(var h=e.length;h--;)e[h]=s;return e}function i(e,s,h){if(!(!e||e.length===0)){var r=e.length-1,c=s?e[r][s]:e[r];if(s)for(;r--;)h(e[r][s],c)&&(c=e[r][s]);else for(;r--;)h(e[r],c)&&(c=e[r]);return c}}o.util.array={fill:t,invoke:n,min:a,max:l}})(),(function(){function u(l,a,t){if(t)if(!o.isLikelyNode&&a instanceof Element)l=a;else if(a instanceof Array){l=[];for(var i=0,e=a.length;i<e;i++)l[i]=u({},a[i],t)}else if(a&&typeof a=="object")for(var s in a)s==="canvas"||s==="group"?l[s]=null:a.hasOwnProperty(s)&&(l[s]=u({},a[s],t));else l=a;else for(var s in a)l[s]=a[s];return l}function n(l,a){return u({},l,a)}o.util.object={extend:u,clone:n},o.util.object.extend(o.util,o.Observable)})(),(function(){function u(i){return i.replace(/-+(.)?/g,function(e,s){return s?s.toUpperCase():""})}function n(i,e){return i.charAt(0).toUpperCase()+(e?i.slice(1):i.slice(1).toLowerCase())}function l(i){return i.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function a(i){var e=0,s,h=[];for(e=0,s;e<i.length;e++)(s=t(i,e))!==!1&&h.push(s);return h}function t(i,e){var s=i.charCodeAt(e);if(isNaN(s))return"";if(s<55296||s>57343)return i.charAt(e);if(55296<=s&&s<=56319){if(i.length<=e+1)throw"High surrogate without following low surrogate";var h=i.charCodeAt(e+1);if(56320>h||h>57343)throw"High surrogate without following low surrogate";return i.charAt(e)+i.charAt(e+1)}if(e===0)throw"Low surrogate without preceding high surrogate";var r=i.charCodeAt(e-1);if(55296>r||r>56319)throw"Low surrogate without preceding high surrogate";return!1}o.util.string={camelize:u,capitalize:n,escapeXml:l,graphemeSplit:a}})(),(function(){var u=Array.prototype.slice,n=function(){},l=(function(){for(var s in{toString:1})if(s==="toString")return!1;return!0})(),a=function(s,h,r){for(var c in h)c in s.prototype&&typeof s.prototype[c]=="function"&&(h[c]+"").indexOf("callSuper")>-1?s.prototype[c]=(function(f){return function(){var g=this.constructor.superclass;this.constructor.superclass=r;var p=h[f].apply(this,arguments);if(this.constructor.superclass=g,f!=="initialize")return p}})(c):s.prototype[c]=h[c],l&&(h.toString!==Object.prototype.toString&&(s.prototype.toString=h.toString),h.valueOf!==Object.prototype.valueOf&&(s.prototype.valueOf=h.valueOf))};function t(){}function i(s){for(var h=null,r=this;r.constructor.superclass;){var c=r.constructor.superclass.prototype[s];if(r[s]!==c){h=c;break}r=r.constructor.superclass.prototype}return h?arguments.length>1?h.apply(this,u.call(arguments,1)):h.call(this):console.log("tried to callSuper "+s+", method not found in prototype chain",this)}function e(){var s=null,h=u.call(arguments,0);typeof h[0]=="function"&&(s=h.shift());function r(){this.initialize.apply(this,arguments)}r.superclass=s,r.subclasses=[],s&&(t.prototype=s.prototype,r.prototype=new t,s.subclasses.push(r));for(var c=0,f=h.length;c<f;c++)a(r,h[c],s);return r.prototype.initialize||(r.prototype.initialize=n),r.prototype.constructor=r,r.prototype.callSuper=i,r}o.util.createClass=e})(),(function(){var u=!!o.document.createElement("div").attachEvent,n=["touchstart","touchmove","touchend"];o.util.addListener=function(a,t,i,e){a&&a.addEventListener(t,i,u?!1:e)},o.util.removeListener=function(a,t,i,e){a&&a.removeEventListener(t,i,u?!1:e)};function l(a){var t=a.changedTouches;return t&&t[0]?t[0]:a}o.util.getPointer=function(a){var t=a.target,i=o.util.getScrollLeftTop(t),e=l(a);return{x:e.clientX+i.left,y:e.clientY+i.top}},o.util.isTouchEvent=function(a){return n.indexOf(a.type)>-1||a.pointerType==="touch"}})(),(function(){function u(e,s){var h=e.style;if(!h)return e;if(typeof s=="string")return e.style.cssText+=";"+s,s.indexOf("opacity")>-1?i(e,s.match(/opacity:\s*(\d?\.?\d*)/)[1]):e;for(var r in s)if(r==="opacity")i(e,s[r]);else{var c=r==="float"||r==="cssFloat"?typeof h.styleFloat>"u"?"cssFloat":"styleFloat":r;h.setProperty(c,s[r])}return e}var n=o.document.createElement("div"),l=typeof n.style.opacity=="string",a=typeof n.style.filter=="string",t=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,i=function(e){return e};l?i=function(e,s){return e.style.opacity=s,e}:a&&(i=function(e,s){var h=e.style;return e.currentStyle&&!e.currentStyle.hasLayout&&(h.zoom=1),t.test(h.filter)?(s=s>=.9999?"":"alpha(opacity="+s*100+")",h.filter=h.filter.replace(t,s)):h.filter+=" alpha(opacity="+s*100+")",e}),o.util.setStyle=u})(),(function(){var u=Array.prototype.slice;function n(p){return typeof p=="string"?o.document.getElementById(p):p}var l,a=function(p){return u.call(p,0)};try{l=a(o.document.childNodes)instanceof Array}catch{}l||(a=function(p){for(var v=new Array(p.length),_=p.length;_--;)v[_]=p[_];return v});function t(p,v){var _=o.document.createElement(p);for(var x in v)x==="class"?_.className=v[x]:x==="for"?_.htmlFor=v[x]:_.setAttribute(x,v[x]);return _}function i(p,v){p&&(" "+p.className+" ").indexOf(" "+v+" ")===-1&&(p.className+=(p.className?" ":"")+v)}function e(p,v,_){return typeof v=="string"&&(v=t(v,_)),p.parentNode&&p.parentNode.replaceChild(v,p),v.appendChild(p),v}function s(p){for(var v=0,_=0,x=o.document.documentElement,D=o.document.body||{scrollLeft:0,scrollTop:0};p&&(p.parentNode||p.host)&&(p=p.parentNode||p.host,p===o.document?(v=D.scrollLeft||x.scrollLeft||0,_=D.scrollTop||x.scrollTop||0):(v+=p.scrollLeft||0,_+=p.scrollTop||0),!(p.nodeType===1&&p.style.position==="fixed")););return{left:v,top:_}}function h(p){var v,_=p&&p.ownerDocument,x={left:0,top:0},D={left:0,top:0},B,z={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!_)return D;for(var G in z)D[z[G]]+=parseInt(r(p,G),10)||0;return v=_.documentElement,typeof p.getBoundingClientRect<"u"&&(x=p.getBoundingClientRect()),B=s(p),{left:x.left+B.left-(v.clientLeft||0)+D.left,top:x.top+B.top-(v.clientTop||0)+D.top}}var r;o.document.defaultView&&o.document.defaultView.getComputedStyle?r=function(p,v){var _=o.document.defaultView.getComputedStyle(p,null);return _?_[v]:void 0}:r=function(p,v){var _=p.style[v];return!_&&p.currentStyle&&(_=p.currentStyle[v]),_},(function(){var p=o.document.documentElement.style,v="userSelect"in p?"userSelect":"MozUserSelect"in p?"MozUserSelect":"WebkitUserSelect"in p?"WebkitUserSelect":"KhtmlUserSelect"in p?"KhtmlUserSelect":"";function _(D){return typeof D.onselectstart<"u"&&(D.onselectstart=o.util.falseFunction),v?D.style[v]="none":typeof D.unselectable=="string"&&(D.unselectable="on"),D}function x(D){return typeof D.onselectstart<"u"&&(D.onselectstart=null),v?D.style[v]="":typeof D.unselectable=="string"&&(D.unselectable=""),D}o.util.makeElementUnselectable=_,o.util.makeElementSelectable=x})();function c(p){var v=o.jsdomImplForWrapper(p);return v._canvas||v._image}function f(p){if(o.isLikelyNode){var v=o.jsdomImplForWrapper(p);v&&(v._image=null,v._canvas=null,v._currentSrc=null,v._attributes=null,v._classList=null)}}function g(p,v){p.imageSmoothingEnabled=p.imageSmoothingEnabled||p.webkitImageSmoothingEnabled||p.mozImageSmoothingEnabled||p.msImageSmoothingEnabled||p.oImageSmoothingEnabled,p.imageSmoothingEnabled=v}o.util.setImageSmoothing=g,o.util.getById=n,o.util.toArray=a,o.util.addClass=i,o.util.makeElement=t,o.util.wrapElement=e,o.util.getScrollLeftTop=s,o.util.getElementOffset=h,o.util.getNodeCanvas=c,o.util.cleanUpJsdomNode=f})(),(function(){function u(a,t){return a+(/\?/.test(a)?"&":"?")+t}function n(){}function l(a,t){t||(t={});var i=t.method?t.method.toUpperCase():"GET",e=t.onComplete||function(){},s=new o.window.XMLHttpRequest,h=t.body||t.parameters;return s.onreadystatechange=function(){s.readyState===4&&(e(s),s.onreadystatechange=n)},i==="GET"&&(h=null,typeof t.parameters=="string"&&(a=u(a,t.parameters))),s.open(i,a,!0),(i==="POST"||i==="PUT")&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.send(h),s}o.util.request=l})(),o.log=console.log,o.warn=console.warn,(function(){var u=o.util.object.extend,n=o.util.object.clone,l=[];o.util.object.extend(l,{cancelAll:function(){var c=this.splice(0);return c.forEach(function(f){f.cancel()}),c},cancelByCanvas:function(c){if(!c)return[];var f=this.filter(function(g){return typeof g.target=="object"&&g.target.canvas===c});return f.forEach(function(g){g.cancel()}),f},cancelByTarget:function(c){var f=this.findAnimationsByTarget(c);return f.forEach(function(g){g.cancel()}),f},findAnimationIndex:function(c){return this.indexOf(this.findAnimation(c))},findAnimation:function(c){return this.find(function(f){return f.cancel===c})},findAnimationsByTarget:function(c){return c?this.filter(function(f){return f.target===c}):[]}});function a(){return!1}function t(c,f,g,p){return-g*Math.cos(c/p*(Math.PI/2))+g+f}function i(c){c||(c={});var f=!1,g,p=function(){var v=o.runningAnimations.indexOf(g);return v>-1&&o.runningAnimations.splice(v,1)[0]};return g=u(n(c),{cancel:function(){return f=!0,p()},currentValue:"startValue"in c?c.startValue:0,completionRate:0,durationRate:0}),o.runningAnimations.push(g),h(function(v){var _=v||+new Date,x=c.duration||500,D=_+x,B,z=c.onChange||a,G=c.abort||a,Q=c.onComplete||a,Z=c.easing||t,q="startValue"in c?c.startValue.length>0:!1,K="startValue"in c?c.startValue:0,tt="endValue"in c?c.endValue:100,it=c.byValue||(q?K.map(function(et,y){return tt[y]-K[y]}):tt-K);c.onStart&&c.onStart(),(function et(y){B=y||+new Date;var E=B>D?x:B-_,P=E/x,O=q?K.map(function(w,C){return Z(E,K[C],it[C],x)}):Z(E,K,it,x),I=Math.abs(q?(O[0]-K[0])/it[0]:(O-K)/it);if(g.currentValue=q?O.slice():O,g.completionRate=I,g.durationRate=P,!f){if(G(O,I,P)){p();return}if(B>D){g.currentValue=q?tt.slice():tt,g.completionRate=1,g.durationRate=1,z(q?tt.slice():tt,1,1),Q(tt,1,1),p();return}else z(O,I,P),h(et)}})(_)}),g.cancel}var e=o.window.requestAnimationFrame||o.window.webkitRequestAnimationFrame||o.window.mozRequestAnimationFrame||o.window.oRequestAnimationFrame||o.window.msRequestAnimationFrame||function(c){return o.window.setTimeout(c,1e3/60)},s=o.window.cancelAnimationFrame||o.window.clearTimeout;function h(){return e.apply(o.window,arguments)}function r(){return s.apply(o.window,arguments)}o.util.animate=i,o.util.requestAnimFrame=h,o.util.cancelAnimFrame=r,o.runningAnimations=l})(),(function(){function u(l,a,t){var i="rgba("+parseInt(l[0]+t*(a[0]-l[0]),10)+","+parseInt(l[1]+t*(a[1]-l[1]),10)+","+parseInt(l[2]+t*(a[2]-l[2]),10);return i+=","+(l&&a?parseFloat(l[3]+t*(a[3]-l[3])):1),i+=")",i}function n(l,a,t,i){var e=new o.Color(l).getSource(),s=new o.Color(a).getSource(),h=i.onComplete,r=i.onChange;return i=i||{},o.util.animate(o.util.object.extend(i,{duration:t||500,startValue:e,endValue:s,byValue:s,easing:function(c,f,g,p){var v=i.colorEasing?i.colorEasing(c,p):1-Math.cos(c/p*(Math.PI/2));return u(f,g,v)},onComplete:function(c,f,g){if(h)return h(u(s,s,0),f,g)},onChange:function(c,f,g){if(r){if(Array.isArray(c))return r(u(c,c,0),f,g);r(c,f,g)}}}))}o.util.animateColor=n})(),(function(){function u(y,E,P,O){return y<Math.abs(E)?(y=E,O=P/4):E===0&&y===0?O=P/(2*Math.PI)*Math.asin(1):O=P/(2*Math.PI)*Math.asin(E/y),{a:y,c:E,p:P,s:O}}function n(y,E,P){return y.a*Math.pow(2,10*(E-=1))*Math.sin((E*P-y.s)*(2*Math.PI)/y.p)}function l(y,E,P,O){return P*((y=y/O-1)*y*y+1)+E}function a(y,E,P,O){return y/=O/2,y<1?P/2*y*y*y+E:P/2*((y-=2)*y*y+2)+E}function t(y,E,P,O){return P*(y/=O)*y*y*y+E}function i(y,E,P,O){return-P*((y=y/O-1)*y*y*y-1)+E}function e(y,E,P,O){return y/=O/2,y<1?P/2*y*y*y*y+E:-P/2*((y-=2)*y*y*y-2)+E}function s(y,E,P,O){return P*(y/=O)*y*y*y*y+E}function h(y,E,P,O){return P*((y=y/O-1)*y*y*y*y+1)+E}function r(y,E,P,O){return y/=O/2,y<1?P/2*y*y*y*y*y+E:P/2*((y-=2)*y*y*y*y+2)+E}function c(y,E,P,O){return-P*Math.cos(y/O*(Math.PI/2))+P+E}function f(y,E,P,O){return P*Math.sin(y/O*(Math.PI/2))+E}function g(y,E,P,O){return-P/2*(Math.cos(Math.PI*y/O)-1)+E}function p(y,E,P,O){return y===0?E:P*Math.pow(2,10*(y/O-1))+E}function v(y,E,P,O){return y===O?E+P:P*(-Math.pow(2,-10*y/O)+1)+E}function _(y,E,P,O){return y===0?E:y===O?E+P:(y/=O/2,y<1?P/2*Math.pow(2,10*(y-1))+E:P/2*(-Math.pow(2,-10*--y)+2)+E)}function x(y,E,P,O){return-P*(Math.sqrt(1-(y/=O)*y)-1)+E}function D(y,E,P,O){return P*Math.sqrt(1-(y=y/O-1)*y)+E}function B(y,E,P,O){return y/=O/2,y<1?-P/2*(Math.sqrt(1-y*y)-1)+E:P/2*(Math.sqrt(1-(y-=2)*y)+1)+E}function z(y,E,P,O){var I=1.70158,w=0,C=P;if(y===0)return E;if(y/=O,y===1)return E+P;w||(w=O*.3);var A=u(C,P,w,I);return-n(A,y,O)+E}function G(y,E,P,O){var I=1.70158,w=0,C=P;if(y===0)return E;if(y/=O,y===1)return E+P;w||(w=O*.3);var A=u(C,P,w,I);return A.a*Math.pow(2,-10*y)*Math.sin((y*O-A.s)*(2*Math.PI)/A.p)+A.c+E}function Q(y,E,P,O){var I=1.70158,w=0,C=P;if(y===0)return E;if(y/=O/2,y===2)return E+P;w||(w=O*(.3*1.5));var A=u(C,P,w,I);return y<1?-.5*n(A,y,O)+E:A.a*Math.pow(2,-10*(y-=1))*Math.sin((y*O-A.s)*(2*Math.PI)/A.p)*.5+A.c+E}function Z(y,E,P,O,I){return I===void 0&&(I=1.70158),P*(y/=O)*y*((I+1)*y-I)+E}function q(y,E,P,O,I){return I===void 0&&(I=1.70158),P*((y=y/O-1)*y*((I+1)*y+I)+1)+E}function K(y,E,P,O,I){return I===void 0&&(I=1.70158),y/=O/2,y<1?P/2*(y*y*(((I*=1.525)+1)*y-I))+E:P/2*((y-=2)*y*(((I*=1.525)+1)*y+I)+2)+E}function tt(y,E,P,O){return P-it(O-y,0,P,O)+E}function it(y,E,P,O){return(y/=O)<1/2.75?P*(7.5625*y*y)+E:y<2/2.75?P*(7.5625*(y-=1.5/2.75)*y+.75)+E:y<2.5/2.75?P*(7.5625*(y-=2.25/2.75)*y+.9375)+E:P*(7.5625*(y-=2.625/2.75)*y+.984375)+E}function et(y,E,P,O){return y<O/2?tt(y*2,0,P,O)*.5+E:it(y*2-O,0,P,O)*.5+P*.5+E}o.util.ease={easeInQuad:function(y,E,P,O){return P*(y/=O)*y+E},easeOutQuad:function(y,E,P,O){return-P*(y/=O)*(y-2)+E},easeInOutQuad:function(y,E,P,O){return y/=O/2,y<1?P/2*y*y+E:-P/2*(--y*(y-2)-1)+E},easeInCubic:function(y,E,P,O){return P*(y/=O)*y*y+E},easeOutCubic:l,easeInOutCubic:a,easeInQuart:t,easeOutQuart:i,easeInOutQuart:e,easeInQuint:s,easeOutQuint:h,easeInOutQuint:r,easeInSine:c,easeOutSine:f,easeInOutSine:g,easeInExpo:p,easeOutExpo:v,easeInOutExpo:_,easeInCirc:x,easeOutCirc:D,easeInOutCirc:B,easeInElastic:z,easeOutElastic:G,easeInOutElastic:Q,easeInBack:Z,easeOutBack:q,easeInOutBack:K,easeInBounce:tt,easeOutBounce:it,easeInOutBounce:et}})(),(function(u){var n=u.fabric||(u.fabric={}),l=n.util.object.extend,a=n.util.object.clone,t=n.util.toFixed,i=n.util.parseUnit,e=n.util.multiplyTransformMatrices,s=["path","circle","polygon","polyline","ellipse","rect","line","image","text"],h=["symbol","image","marker","pattern","view","svg"],r=["pattern","defs","symbol","metadata","clipPath","mask","desc"],c=["symbol","g","a","svg","clipPath","defs"],f={cx:"left",x:"left",r:"radius",cy:"top",y:"top",display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","letter-spacing":"charSpacing","paint-order":"paintFirst","stroke-dasharray":"strokeDashArray","stroke-dashoffset":"strokeDashOffset","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"textAnchor",opacity:"opacity","clip-path":"clipPath","clip-rule":"clipRule","vector-effect":"strokeUniform","image-rendering":"imageSmoothing"},g={stroke:"strokeOpacity",fill:"fillOpacity"},p="font-size",v="clip-path";n.svgValidTagNamesRegEx=D(s),n.svgViewBoxElementsRegEx=D(h),n.svgInvalidAncestorsRegEx=D(r),n.svgValidParentsRegEx=D(c),n.cssRules={},n.gradientDefs={},n.clipPaths={};function _(w){return w in f?f[w]:w}function x(w,C,A,M){var N=Array.isArray(C),L;if((w==="fill"||w==="stroke")&&C==="none")C="";else{if(w==="strokeUniform")return C==="non-scaling-stroke";if(w==="strokeDashArray")C==="none"?C=null:C=C.replace(/,/g," ").split(/\s+/).map(parseFloat);else if(w==="transformMatrix")A&&A.transformMatrix?C=e(A.transformMatrix,n.parseTransformAttribute(C)):C=n.parseTransformAttribute(C);else if(w==="visible")C=C!=="none"&&C!=="hidden",A&&A.visible===!1&&(C=!1);else if(w==="opacity")C=parseFloat(C),A&&typeof A.opacity<"u"&&(C*=A.opacity);else if(w==="textAnchor")C=C==="start"?"left":C==="end"?"right":"center";else if(w==="charSpacing")L=i(C,M)/M*1e3;else if(w==="paintFirst"){var Y=C.indexOf("fill"),U=C.indexOf("stroke"),C="fill";(Y>-1&&U>-1&&U<Y||Y===-1&&U>-1)&&(C="stroke")}else{if(w==="href"||w==="xlink:href"||w==="font")return C;if(w==="imageSmoothing")return C==="optimizeQuality";L=N?C.map(i):i(C,M)}}return!N&&isNaN(L)?C:L}function D(w){return new RegExp("^("+w.join("|")+")\\b","i")}function B(w){for(var C in g)if(!(typeof w[g[C]]>"u"||w[C]==="")){if(typeof w[C]>"u"){if(!n.Object.prototype[C])continue;w[C]=n.Object.prototype[C]}if(w[C].indexOf("url(")!==0){var A=new n.Color(w[C]);w[C]=A.setAlpha(t(A.getAlpha()*w[g[C]],2)).toRgba()}}return w}function z(w,C){var A,M=[],N,L,Y;for(L=0,Y=C.length;L<Y;L++)A=C[L],N=w.getElementsByTagName(A),M=M.concat(Array.prototype.slice.call(N));return M}n.parseTransformAttribute=(function(){function w(X,nt){var ot=n.util.cos(nt[0]),lt=n.util.sin(nt[0]),ut=0,ct=0;nt.length===3&&(ut=nt[1],ct=nt[2]),X[0]=ot,X[1]=lt,X[2]=-lt,X[3]=ot,X[4]=ut-(ot*ut-lt*ct),X[5]=ct-(lt*ut+ot*ct)}function C(X,nt){var ot=nt[0],lt=nt.length===2?nt[1]:nt[0];X[0]=ot,X[3]=lt}function A(X,nt,ot){X[ot]=Math.tan(n.util.degreesToRadians(nt[0]))}function M(X,nt){X[4]=nt[0],nt.length===2&&(X[5]=nt[1])}var N=n.iMatrix,L=n.reNum,Y=n.commaWsp,U="(?:(skewX)\\s*\\(\\s*("+L+")\\s*\\))",J="(?:(skewY)\\s*\\(\\s*("+L+")\\s*\\))",R="(?:(rotate)\\s*\\(\\s*("+L+")(?:"+Y+"("+L+")"+Y+"("+L+"))?\\s*\\))",k="(?:(scale)\\s*\\(\\s*("+L+")(?:"+Y+"("+L+"))?\\s*\\))",W="(?:(translate)\\s*\\(\\s*("+L+")(?:"+Y+"("+L+"))?\\s*\\))",V="(?:(matrix)\\s*\\(\\s*("+L+")"+Y+"("+L+")"+Y+"("+L+")"+Y+"("+L+")"+Y+"("+L+")"+Y+"("+L+")\\s*\\))",j="(?:"+V+"|"+W+"|"+k+"|"+R+"|"+U+"|"+J+")",H="(?:"+j+"(?:"+Y+"*"+j+")*)",$="^\\s*(?:"+H+"?)\\s*$",st=new RegExp($),rt=new RegExp(j,"g");return function(X){var nt=N.concat(),ot=[];if(!X||X&&!st.test(X))return nt;X.replace(rt,function(ut){var ct=new RegExp(j).exec(ut).filter(function(Bt){return!!Bt}),vt=ct[1],ft=ct.slice(2).map(parseFloat);switch(vt){case"translate":M(nt,ft);break;case"rotate":ft[0]=n.util.degreesToRadians(ft[0]),w(nt,ft);break;case"scale":C(nt,ft);break;case"skewX":A(nt,ft,2);break;case"skewY":A(nt,ft,1);break;case"matrix":nt=ft;break}ot.push(nt.concat()),nt=N.concat()});for(var lt=ot[0];ot.length>1;)ot.shift(),lt=n.util.multiplyTransformMatrices(lt,ot[0]);return lt}})();function G(w,C){var A,M;w.replace(/;\s*$/,"").split(";").forEach(function(N){var L=N.split(":");A=L[0].trim().toLowerCase(),M=L[1].trim(),C[A]=M})}function Q(w,C){var A,M;for(var N in w)typeof w[N]>"u"||(A=N.toLowerCase(),M=w[N],C[A]=M)}function Z(w,C){var A={};for(var M in n.cssRules[C])if(q(w,M.split(" ")))for(var N in n.cssRules[C][M])A[N]=n.cssRules[C][M][N];return A}function q(w,C){var A,M=!0;return A=tt(w,C.pop()),A&&C.length&&(M=K(w,C)),A&&M&&C.length===0}function K(w,C){for(var A,M=!0;w.parentNode&&w.parentNode.nodeType===1&&C.length;)M&&(A=C.pop()),w=w.parentNode,M=tt(w,A);return C.length===0}function tt(w,C){var A=w.nodeName,M=w.getAttribute("class"),N=w.getAttribute("id"),L,Y;if(L=new RegExp("^"+A,"i"),C=C.replace(L,""),N&&C.length&&(L=new RegExp("#"+N+"(?![a-zA-Z\\-]+)","i"),C=C.replace(L,"")),M&&C.length)for(M=M.split(" "),Y=M.length;Y--;)L=new RegExp("\\."+M[Y]+"(?![a-zA-Z\\-]+)","i"),C=C.replace(L,"");return C.length===0}function it(w,C){var A;if(w.getElementById&&(A=w.getElementById(C)),A)return A;var M,N,L,Y=w.getElementsByTagName("*");for(N=0,L=Y.length;N<L;N++)if(M=Y[N],C===M.getAttribute("id"))return M}function et(w){for(var C=z(w,["use","svg:use"]),A=0;C.length&&A<C.length;){var M=C[A],N=M.getAttribute("xlink:href")||M.getAttribute("href");if(N===null)return;var L=N.slice(1),Y=M.getAttribute("x")||0,U=M.getAttribute("y")||0,J=it(w,L).cloneNode(!0),R=(J.getAttribute("transform")||"")+" translate("+Y+", "+U+")",k,W=C.length,V,j,H,$,st=n.svgNS;if(E(J),/^svg$/i.test(J.nodeName)){var rt=J.ownerDocument.createElementNS(st,"g");for(j=0,H=J.attributes,$=H.length;j<$;j++)V=H.item(j),rt.setAttributeNS(st,V.nodeName,V.nodeValue);for(;J.firstChild;)rt.appendChild(J.firstChild);J=rt}for(j=0,H=M.attributes,$=H.length;j<$;j++)V=H.item(j),!(V.nodeName==="x"||V.nodeName==="y"||V.nodeName==="xlink:href"||V.nodeName==="href")&&(V.nodeName==="transform"?R=V.nodeValue+" "+R:J.setAttribute(V.nodeName,V.nodeValue));J.setAttribute("transform",R),J.setAttribute("instantiated_by_use","1"),J.removeAttribute("id"),k=M.parentNode,k.replaceChild(J,M),C.length===W&&A++}}var y=new RegExp("^\\s*("+n.reNum+"+)\\s*,?\\s*("+n.reNum+"+)\\s*,?\\s*("+n.reNum+"+)\\s*,?\\s*("+n.reNum+"+)\\s*$");function E(w){if(!n.svgViewBoxElementsRegEx.test(w.nodeName))return{};var C=w.getAttribute("viewBox"),A=1,M=1,N=0,L=0,Y,U,J,R,k=w.getAttribute("width"),W=w.getAttribute("height"),V=w.getAttribute("x")||0,j=w.getAttribute("y")||0,H=w.getAttribute("preserveAspectRatio")||"",$=!C||!(C=C.match(y)),st=!k||!W||k==="100%"||W==="100%",rt=$&&st,X={},nt="",ot=0,lt=0;if(X.width=0,X.height=0,X.toBeParsed=rt,$&&(V||j)&&w.parentNode&&w.parentNode.nodeName!=="#document"&&(nt=" translate("+i(V)+" "+i(j)+") ",J=(w.getAttribute("transform")||"")+nt,w.setAttribute("transform",J),w.removeAttribute("x"),w.removeAttribute("y")),rt)return X;if($)return X.width=i(k),X.height=i(W),X;if(N=-parseFloat(C[1]),L=-parseFloat(C[2]),Y=parseFloat(C[3]),U=parseFloat(C[4]),X.minX=N,X.minY=L,X.viewBoxWidth=Y,X.viewBoxHeight=U,st?(X.width=Y,X.height=U):(X.width=i(k),X.height=i(W),A=X.width/Y,M=X.height/U),H=n.util.parsePreserveAspectRatioAttribute(H),H.alignX!=="none"&&(H.meetOrSlice==="meet"&&(M=A=A>M?M:A),H.meetOrSlice==="slice"&&(M=A=A>M?A:M),ot=X.width-Y*A,lt=X.height-U*A,H.alignX==="Mid"&&(ot/=2),H.alignY==="Mid"&&(lt/=2),H.alignX==="Min"&&(ot=0),H.alignY==="Min"&&(lt=0)),A===1&&M===1&&N===0&&L===0&&V===0&&j===0)return X;if((V||j)&&w.parentNode.nodeName!=="#document"&&(nt=" translate("+i(V)+" "+i(j)+") "),J=nt+" matrix("+A+" 0 0 "+M+" "+(N*A+ot)+" "+(L*M+lt)+") ",w.nodeName==="svg"){for(R=w.ownerDocument.createElementNS(n.svgNS,"g");w.firstChild;)R.appendChild(w.firstChild);w.appendChild(R)}else R=w,R.removeAttribute("x"),R.removeAttribute("y"),J=R.getAttribute("transform")+J;return R.setAttribute("transform",J),X}function P(w,C){for(;w&&(w=w.parentNode);)if(w.nodeName&&C.test(w.nodeName.replace("svg:",""))&&!w.getAttribute("instantiated_by_use"))return!0;return!1}n.parseSVGDocument=function(w,C,A,M){if(w){et(w);var N=n.Object.__uid++,L,Y,U=E(w),J=n.util.toArray(w.getElementsByTagName("*"));if(U.crossOrigin=M&&M.crossOrigin,U.svgUid=N,J.length===0&&n.isLikelyNode){J=w.selectNodes('//*[name(.)!="svg"]');var R=[];for(L=0,Y=J.length;L<Y;L++)R[L]=J[L];J=R}var k=J.filter(function(V){return E(V),n.svgValidTagNamesRegEx.test(V.nodeName.replace("svg:",""))&&!P(V,n.svgInvalidAncestorsRegEx)});if(!k||k&&!k.length){C&&C([],{});return}var W={};J.filter(function(V){return V.nodeName.replace("svg:","")==="clipPath"}).forEach(function(V){var j=V.getAttribute("id");W[j]=n.util.toArray(V.getElementsByTagName("*")).filter(function(H){return n.svgValidTagNamesRegEx.test(H.nodeName.replace("svg:",""))})}),n.gradientDefs[N]=n.getGradientDefs(w),n.cssRules[N]=n.getCSSRules(w),n.clipPaths[N]=W,n.parseElements(k,function(V,j){C&&(C(V,U,j,J),delete n.gradientDefs[N],delete n.cssRules[N],delete n.clipPaths[N])},a(U),A,M)}};function O(w,C){var A=["gradientTransform","x1","x2","y1","y2","gradientUnits","cx","cy","r","fx","fy"],M="xlink:href",N=C.getAttribute(M).slice(1),L=it(w,N);if(L&&L.getAttribute(M)&&O(w,L),A.forEach(function(U){L&&!C.hasAttribute(U)&&L.hasAttribute(U)&&C.setAttribute(U,L.getAttribute(U))}),!C.children.length)for(var Y=L.cloneNode(!0);Y.firstChild;)C.appendChild(Y.firstChild);C.removeAttribute(M)}var I=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+n.reNum+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+n.reNum+"))?\\s+(.*)");l(n,{parseFontDeclaration:function(w,C){var A=w.match(I);if(A){var M=A[1],N=A[3],L=A[4],Y=A[5],U=A[6];M&&(C.fontStyle=M),N&&(C.fontWeight=isNaN(parseFloat(N))?N:parseFloat(N)),L&&(C.fontSize=i(L)),U&&(C.fontFamily=U),Y&&(C.lineHeight=Y==="normal"?1:Y)}},getGradientDefs:function(w){var C=["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"],A=z(w,C),M,N=0,L={};for(N=A.length;N--;)M=A[N],M.getAttribute("xlink:href")&&O(w,M),L[M.getAttribute("id")]=M;return L},parseAttributes:function(w,C,A){if(w){var M,N={},L,Y;typeof A>"u"&&(A=w.getAttribute("svgUid")),w.parentNode&&n.svgValidParentsRegEx.test(w.parentNode.nodeName)&&(N=n.parseAttributes(w.parentNode,C,A));var U=C.reduce(function(H,$){return M=w.getAttribute($),M&&(H[$]=M),H},{}),J=l(Z(w,A),n.parseStyleAttribute(w));U=l(U,J),J[v]&&w.setAttribute(v,J[v]),L=Y=N.fontSize||n.Text.DEFAULT_SVG_FONT_SIZE,U[p]&&(U[p]=L=i(U[p],Y));var R,k,W={};for(var V in U)R=_(V),k=x(R,U[V],N,L),W[R]=k;W&&W.font&&n.parseFontDeclaration(W.font,W);var j=l(N,W);return n.svgValidParentsRegEx.test(w.nodeName)?j:B(j)}},parseElements:function(w,C,A,M,N){new n.ElementsParser(w,C,A,M,N).parse()},parseStyleAttribute:function(w){var C={},A=w.getAttribute("style");return A&&(typeof A=="string"?G(A,C):Q(A,C)),C},parsePointsAttribute:function(w){if(!w)return null;w=w.replace(/,/g," ").trim(),w=w.split(/\s+/);var C=[],A,M;for(A=0,M=w.length;A<M;A+=2)C.push({x:parseFloat(w[A]),y:parseFloat(w[A+1])});return C},getCSSRules:function(w){var C=w.getElementsByTagName("style"),A,M,N={},L;for(A=0,M=C.length;A<M;A++){var Y=C[A].textContent;Y=Y.replace(/\/\*[\s\S]*?\*\//g,""),Y.trim()!==""&&(L=Y.split("}"),L=L.filter(function(U){return U.trim()}),L.forEach(function(U){var J=U.split("{"),R={},k=J[1].trim(),W=k.split(";").filter(function($){return $.trim()});for(A=0,M=W.length;A<M;A++){var V=W[A].split(":"),j=V[0].trim(),H=V[1].trim();R[j]=H}U=J[0].trim(),U.split(",").forEach(function($){$=$.replace(/^svg/i,"").trim(),$!==""&&(N[$]?n.util.object.extend(N[$],R):N[$]=n.util.object.clone(R))})}))}return N},loadSVGFromURL:function(w,C,A,M){w=w.replace(/^\n\s*/,"").trim(),new n.util.request(w,{method:"get",onComplete:N});function N(L){var Y=L.responseXML;if(!Y||!Y.documentElement)return C&&C(null),!1;n.parseSVGDocument(Y.documentElement,function(U,J,R,k){C&&C(U,J,R,k)},A,M)}},loadSVGFromString:function(w,C,A,M){var N=new n.window.DOMParser,L=N.parseFromString(w.trim(),"text/xml");n.parseSVGDocument(L.documentElement,function(Y,U,J,R){C(Y,U,J,R)},A,M)}})})(d),o.ElementsParser=function(u,n,l,a,t,i){this.elements=u,this.callback=n,this.options=l,this.reviver=a,this.svgUid=l&&l.svgUid||0,this.parsingOptions=t,this.regexUrl=/^url\(['"]?#([^'"]+)['"]?\)/g,this.doc=i},(function(u){u.parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},u.createObjects=function(){var n=this;this.elements.forEach(function(l,a){l.setAttribute("svgUid",n.svgUid),n.createObject(l,a)})},u.findTag=function(n){return o[o.util.string.capitalize(n.tagName.replace("svg:",""))]},u.createObject=function(n,l){var a=this.findTag(n);if(a&&a.fromElement)try{a.fromElement(n,this.createCallback(l,n),this.options)}catch(t){o.log(t)}else this.checkIfDone()},u.createCallback=function(n,l){var a=this;return function(t){var i;a.resolveGradient(t,l,"fill"),a.resolveGradient(t,l,"stroke"),t instanceof o.Image&&t._originalElement&&(i=t.parsePreserveAspectRatioAttribute(l)),t._removeTransformMatrix(i),a.resolveClipPath(t,l),a.reviver&&a.reviver(l,t),a.instances[n]=t,a.checkIfDone()}},u.extractPropertyDefinition=function(n,l,a){var t=n[l],i=this.regexUrl;if(i.test(t)){i.lastIndex=0;var e=i.exec(t)[1];return i.lastIndex=0,o[a][this.svgUid][e]}},u.resolveGradient=function(n,l,a){var t=this.extractPropertyDefinition(n,a,"gradientDefs");if(t){var i=l.getAttribute(a+"-opacity"),e=o.Gradient.fromElement(t,n,i,this.options);n.set(a,e)}},u.createClipPathCallback=function(n,l){return function(a){a._removeTransformMatrix(),a.fillRule=a.clipRule,l.push(a)}},u.resolveClipPath=function(n,l){var a=this.extractPropertyDefinition(n,"clipPath","clipPaths"),t,i,e,s,h,r;if(a){s=[],e=o.util.invertTransform(n.calcTransformMatrix());for(var c=a[0].parentNode,f=l;f.parentNode&&f.getAttribute("clip-path")!==n.clipPath;)f=f.parentNode;f.parentNode.appendChild(c);for(var g=0;g<a.length;g++)t=a[g],i=this.findTag(t),i.fromElement(t,this.createClipPathCallback(n,s),this.options);s.length===1?a=s[0]:a=new o.Group(s),h=o.util.multiplyTransformMatrices(e,a.calcTransformMatrix()),a.clipPath&&this.resolveClipPath(a,f);var r=o.util.qrDecompose(h);a.flipX=!1,a.flipY=!1,a.set("scaleX",r.scaleX),a.set("scaleY",r.scaleY),a.angle=r.angle,a.skewX=r.skewX,a.skewY=0,a.setPositionByOrigin({x:r.translateX,y:r.translateY},"center","center"),n.clipPath=a}else delete n.clipPath},u.checkIfDone=function(){--this.numElements===0&&(this.instances=this.instances.filter(function(n){return n!=null}),this.callback(this.instances,this.elements))}})(o.ElementsParser.prototype),(function(u){var n=u.fabric||(u.fabric={});if(n.Point){n.warn("fabric.Point is already defined");return}n.Point=l;function l(a,t){this.x=a,this.y=t}l.prototype={type:"point",constructor:l,add:function(a){return new l(this.x+a.x,this.y+a.y)},addEquals:function(a){return this.x+=a.x,this.y+=a.y,this},scalarAdd:function(a){return new l(this.x+a,this.y+a)},scalarAddEquals:function(a){return this.x+=a,this.y+=a,this},subtract:function(a){return new l(this.x-a.x,this.y-a.y)},subtractEquals:function(a){return this.x-=a.x,this.y-=a.y,this},scalarSubtract:function(a){return new l(this.x-a,this.y-a)},scalarSubtractEquals:function(a){return this.x-=a,this.y-=a,this},multiply:function(a){return new l(this.x*a,this.y*a)},multiplyEquals:function(a){return this.x*=a,this.y*=a,this},divide:function(a){return new l(this.x/a,this.y/a)},divideEquals:function(a){return this.x/=a,this.y/=a,this},eq:function(a){return this.x===a.x&&this.y===a.y},lt:function(a){return this.x<a.x&&this.y<a.y},lte:function(a){return this.x<=a.x&&this.y<=a.y},gt:function(a){return this.x>a.x&&this.y>a.y},gte:function(a){return this.x>=a.x&&this.y>=a.y},lerp:function(a,t){return typeof t>"u"&&(t=.5),t=Math.max(Math.min(1,t),0),new l(this.x+(a.x-this.x)*t,this.y+(a.y-this.y)*t)},distanceFrom:function(a){var t=this.x-a.x,i=this.y-a.y;return Math.sqrt(t*t+i*i)},midPointFrom:function(a){return this.lerp(a)},min:function(a){return new l(Math.min(this.x,a.x),Math.min(this.y,a.y))},max:function(a){return new l(Math.max(this.x,a.x),Math.max(this.y,a.y))},toString:function(){return this.x+","+this.y},setXY:function(a,t){return this.x=a,this.y=t,this},setX:function(a){return this.x=a,this},setY:function(a){return this.y=a,this},setFromPoint:function(a){return this.x=a.x,this.y=a.y,this},swap:function(a){var t=this.x,i=this.y;this.x=a.x,this.y=a.y,a.x=t,a.y=i},clone:function(){return new l(this.x,this.y)}}})(d),(function(u){var n=u.fabric||(u.fabric={});if(n.Intersection){n.warn("fabric.Intersection is already defined");return}function l(a){this.status=a,this.points=[]}n.Intersection=l,n.Intersection.prototype={constructor:l,appendPoint:function(a){return this.points.push(a),this},appendPoints:function(a){return this.points=this.points.concat(a),this}},n.Intersection.intersectLineLine=function(a,t,i,e){var s,h=(e.x-i.x)*(a.y-i.y)-(e.y-i.y)*(a.x-i.x),r=(t.x-a.x)*(a.y-i.y)-(t.y-a.y)*(a.x-i.x),c=(e.y-i.y)*(t.x-a.x)-(e.x-i.x)*(t.y-a.y);if(c!==0){var f=h/c,g=r/c;0<=f&&f<=1&&0<=g&&g<=1?(s=new l("Intersection"),s.appendPoint(new n.Point(a.x+f*(t.x-a.x),a.y+f*(t.y-a.y)))):s=new l}else h===0||r===0?s=new l("Coincident"):s=new l("Parallel");return s},n.Intersection.intersectLinePolygon=function(a,t,i){var e=new l,s=i.length,h,r,c,f;for(f=0;f<s;f++)h=i[f],r=i[(f+1)%s],c=l.intersectLineLine(a,t,h,r),e.appendPoints(c.points);return e.points.length>0&&(e.status="Intersection"),e},n.Intersection.intersectPolygonPolygon=function(a,t){var i=new l,e=a.length,s;for(s=0;s<e;s++){var h=a[s],r=a[(s+1)%e],c=l.intersectLinePolygon(h,r,t);i.appendPoints(c.points)}return i.points.length>0&&(i.status="Intersection"),i},n.Intersection.intersectPolygonRectangle=function(a,t,i){var e=t.min(i),s=t.max(i),h=new n.Point(s.x,e.y),r=new n.Point(e.x,s.y),c=l.intersectLinePolygon(e,h,a),f=l.intersectLinePolygon(h,s,a),g=l.intersectLinePolygon(s,r,a),p=l.intersectLinePolygon(r,e,a),v=new l;return v.appendPoints(c.points),v.appendPoints(f.points),v.appendPoints(g.points),v.appendPoints(p.points),v.points.length>0&&(v.status="Intersection"),v}})(d),(function(u){var n=u.fabric||(u.fabric={});if(n.Color){n.warn("fabric.Color is already defined.");return}function l(t){t?this._tryParsingColor(t):this.setSource([0,0,0,1])}n.Color=l,n.Color.prototype={_tryParsingColor:function(t){var i;t in l.colorNameMap&&(t=l.colorNameMap[t]),t==="transparent"&&(i=[255,255,255,0]),i||(i=l.sourceFromHex(t)),i||(i=l.sourceFromRgb(t)),i||(i=l.sourceFromHsl(t)),i||(i=[0,0,0,1]),i&&this.setSource(i)},_rgbToHsl:function(t,i,e){t/=255,i/=255,e/=255;var s,h,r,c=n.util.array.max([t,i,e]),f=n.util.array.min([t,i,e]);if(r=(c+f)/2,c===f)s=h=0;else{var g=c-f;switch(h=r>.5?g/(2-c-f):g/(c+f),c){case t:s=(i-e)/g+(i<e?6:0);break;case i:s=(e-t)/g+2;break;case e:s=(t-i)/g+4;break}s/=6}return[Math.round(s*360),Math.round(h*100),Math.round(r*100)]},getSource:function(){return this._source},setSource:function(t){this._source=t},toRgb:function(){var t=this.getSource();return"rgb("+t[0]+","+t[1]+","+t[2]+")"},toRgba:function(){var t=this.getSource();return"rgba("+t[0]+","+t[1]+","+t[2]+","+t[3]+")"},toHsl:function(){var t=this.getSource(),i=this._rgbToHsl(t[0],t[1],t[2]);return"hsl("+i[0]+","+i[1]+"%,"+i[2]+"%)"},toHsla:function(){var t=this.getSource(),i=this._rgbToHsl(t[0],t[1],t[2]);return"hsla("+i[0]+","+i[1]+"%,"+i[2]+"%,"+t[3]+")"},toHex:function(){var t=this.getSource(),i,e,s;return i=t[0].toString(16),i=i.length===1?"0"+i:i,e=t[1].toString(16),e=e.length===1?"0"+e:e,s=t[2].toString(16),s=s.length===1?"0"+s:s,i.toUpperCase()+e.toUpperCase()+s.toUpperCase()},toHexa:function(){var t=this.getSource(),i;return i=Math.round(t[3]*255),i=i.toString(16),i=i.length===1?"0"+i:i,this.toHex()+i.toUpperCase()},getAlpha:function(){return this.getSource()[3]},setAlpha:function(t){var i=this.getSource();return i[3]=t,this.setSource(i),this},toGrayscale:function(){var t=this.getSource(),i=parseInt((t[0]*.3+t[1]*.59+t[2]*.11).toFixed(0),10),e=t[3];return this.setSource([i,i,i,e]),this},toBlackWhite:function(t){var i=this.getSource(),e=(i[0]*.3+i[1]*.59+i[2]*.11).toFixed(0),s=i[3];return t=t||127,e=Number(e)<Number(t)?0:255,this.setSource([e,e,e,s]),this},overlayWith:function(t){t instanceof l||(t=new l(t));var i=[],e=this.getAlpha(),s=.5,h=this.getSource(),r=t.getSource(),c;for(c=0;c<3;c++)i.push(Math.round(h[c]*(1-s)+r[c]*s));return i[3]=e,this.setSource(i),this}},n.Color.reRGBa=/^rgba?\(\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*(?:\s*,\s*((?:\d*\.?\d+)?)\s*)?\)$/i,n.Color.reHSLa=/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i,n.Color.reHex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,n.Color.colorNameMap={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};function a(t,i,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+(i-t)*6*e:e<1/2?i:e<2/3?t+(i-t)*(2/3-e)*6:t}n.Color.fromRgb=function(t){return l.fromSource(l.sourceFromRgb(t))},n.Color.sourceFromRgb=function(t){var i=t.match(l.reRGBa);if(i){var e=parseInt(i[1],10)/(/%$/.test(i[1])?100:1)*(/%$/.test(i[1])?255:1),s=parseInt(i[2],10)/(/%$/.test(i[2])?100:1)*(/%$/.test(i[2])?255:1),h=parseInt(i[3],10)/(/%$/.test(i[3])?100:1)*(/%$/.test(i[3])?255:1);return[parseInt(e,10),parseInt(s,10),parseInt(h,10),i[4]?parseFloat(i[4]):1]}},n.Color.fromRgba=l.fromRgb,n.Color.fromHsl=function(t){return l.fromSource(l.sourceFromHsl(t))},n.Color.sourceFromHsl=function(t){var i=t.match(l.reHSLa);if(i){var e=(parseFloat(i[1])%360+360)%360/360,s=parseFloat(i[2])/(/%$/.test(i[2])?100:1),h=parseFloat(i[3])/(/%$/.test(i[3])?100:1),r,c,f;if(s===0)r=c=f=h;else{var g=h<=.5?h*(s+1):h+s-h*s,p=h*2-g;r=a(p,g,e+1/3),c=a(p,g,e),f=a(p,g,e-1/3)}return[Math.round(r*255),Math.round(c*255),Math.round(f*255),i[4]?parseFloat(i[4]):1]}},n.Color.fromHsla=l.fromHsl,n.Color.fromHex=function(t){return l.fromSource(l.sourceFromHex(t))},n.Color.sourceFromHex=function(t){if(t.match(l.reHex)){var i=t.slice(t.indexOf("#")+1),e=i.length===3||i.length===4,s=i.length===8||i.length===4,h=e?i.charAt(0)+i.charAt(0):i.substring(0,2),r=e?i.charAt(1)+i.charAt(1):i.substring(2,4),c=e?i.charAt(2)+i.charAt(2):i.substring(4,6),f=s?e?i.charAt(3)+i.charAt(3):i.substring(6,8):"FF";return[parseInt(h,16),parseInt(r,16),parseInt(c,16),parseFloat((parseInt(f,16)/255).toFixed(2))]}},n.Color.fromSource=function(t){var i=new l;return i.setSource(t),i}})(d),(function(u){var n=u.fabric||(u.fabric={}),l=["e","se","s","sw","w","nw","n","ne","e"],a=["ns","nesw","ew","nwse"],t={},i="left",e="top",s="right",h="bottom",r="center",c={top:h,bottom:e,left:s,right:i,center:r},f=n.util.radiansToDegrees,g=Math.sign||function(R){return(R>0)-(R<0)||+R};function p(R,k){var W=R.angle+f(Math.atan2(k.y,k.x))+360;return Math.round(W%360/45)}function v(R,k){var W=k.transform.target,V=W.canvas,j=n.util.object.clone(k);j.target=W,V&&V.fire("object:"+R,j),W.fire(R,k)}function _(R,k){var W=k.canvas,V=W.uniScaleKey,j=R[V];return W.uniformScaling&&!j||!W.uniformScaling&&j}function x(R){return R.originX===r&&R.originY===r}function D(R,k,W){var V=R.lockScalingX,j=R.lockScalingY;return!!(V&&j||!k&&(V||j)&&W||V&&k==="x"||j&&k==="y")}function B(R,k,W){var V="not-allowed",j=_(R,W),H="";if(k.x!==0&&k.y===0?H="x":k.x===0&&k.y!==0&&(H="y"),D(W,H,j))return V;var $=p(W,k);return l[$]+"-resize"}function z(R,k,W){var V="not-allowed";if(k.x!==0&&W.lockSkewingY||k.y!==0&&W.lockSkewingX)return V;var j=p(W,k)%4;return a[j]+"-resize"}function G(R,k,W){return R[W.canvas.altActionKey]?t.skewCursorStyleHandler(R,k,W):t.scaleCursorStyleHandler(R,k,W)}function Q(R,k,W){var V=R[W.canvas.altActionKey];if(k.x===0)return V?"skewX":"scaleY";if(k.y===0)return V?"skewY":"scaleX"}function Z(R,k,W){return W.lockRotation?"not-allowed":k.cursorStyle}function q(R,k,W,V){return{e:R,transform:k,pointer:{x:W,y:V}}}function K(R){return function(k,W,V,j){var H=W.target,$=H.getCenterPoint(),st=H.translateToOriginPoint($,W.originX,W.originY),rt=R(k,W,V,j);return H.setPositionByOrigin(st,W.originX,W.originY),rt}}function tt(R,k){return function(W,V,j,H){var $=k(W,V,j,H);return $&&v(R,q(W,V,j,H)),$}}function it(R,k,W,V,j){var H=R.target,$=H.controls[R.corner],st=H.canvas.getZoom(),rt=H.padding/st,X=H.toLocalPoint(new n.Point(V,j),k,W);return X.x>=rt&&(X.x-=rt),X.x<=-rt&&(X.x+=rt),X.y>=rt&&(X.y-=rt),X.y<=rt&&(X.y+=rt),X.x-=$.offsetX,X.y-=$.offsetY,X}function et(R){return R.flipX!==R.flipY}function y(R,k,W,V,j){if(R[k]!==0){var H=R._getTransformedDimensions()[V],$=j/H*R[W];R.set(W,$)}}function E(R,k,W,V){var j=k.target,H=j._getTransformedDimensions(0,j.skewY),$=it(k,k.originX,k.originY,W,V),st=Math.abs($.x*2)-H.x,rt=j.skewX,X;st<2?X=0:(X=f(Math.atan2(st/j.scaleX,H.y/j.scaleY)),k.originX===i&&k.originY===h&&(X=-X),k.originX===s&&k.originY===e&&(X=-X),et(j)&&(X=-X));var nt=rt!==X;if(nt){var ot=j._getTransformedDimensions().y;j.set("skewX",X),y(j,"skewY","scaleY","y",ot)}return nt}function P(R,k,W,V){var j=k.target,H=j._getTransformedDimensions(j.skewX,0),$=it(k,k.originX,k.originY,W,V),st=Math.abs($.y*2)-H.y,rt=j.skewY,X;st<2?X=0:(X=f(Math.atan2(st/j.scaleY,H.x/j.scaleX)),k.originX===i&&k.originY===h&&(X=-X),k.originX===s&&k.originY===e&&(X=-X),et(j)&&(X=-X));var nt=rt!==X;if(nt){var ot=j._getTransformedDimensions().x;j.set("skewY",X),y(j,"skewX","scaleX","x",ot)}return nt}function O(R,k,W,V){var j=k.target,H=j.skewX,$,st=k.originY;if(j.lockSkewingX)return!1;if(H===0){var rt=it(k,r,r,W,V);rt.x>0?$=i:$=s}else H>0&&($=st===e?i:s),H<0&&($=st===e?s:i),et(j)&&($=$===i?s:i);k.originX=$;var X=tt("skewing",K(E));return X(R,k,W,V)}function I(R,k,W,V){var j=k.target,H=j.skewY,$,st=k.originX;if(j.lockSkewingY)return!1;if(H===0){var rt=it(k,r,r,W,V);rt.y>0?$=e:$=h}else H>0&&($=st===i?e:h),H<0&&($=st===i?h:e),et(j)&&($=$===e?h:e);k.originY=$;var X=tt("skewing",K(P));return X(R,k,W,V)}function w(R,k,W,V){var j=k,H=j.target,$=H.translateToOriginPoint(H.getCenterPoint(),j.originX,j.originY);if(H.lockRotation)return!1;var st=Math.atan2(j.ey-$.y,j.ex-$.x),rt=Math.atan2(V-$.y,W-$.x),X=f(rt-st+j.theta),nt=!0;if(H.snapAngle>0){var ot=H.snapAngle,lt=H.snapThreshold||ot,ut=Math.ceil(X/ot)*ot,ct=Math.floor(X/ot)*ot;Math.abs(X-ct)<lt?X=ct:Math.abs(X-ut)<lt&&(X=ut)}return X<0&&(X=360+X),X%=360,nt=H.angle!==X,H.angle=X,nt}function C(R,k,W,V,j){j=j||{};var H=k.target,$=H.lockScalingX,st=H.lockScalingY,rt=j.by,X,nt,ot,lt,ut=_(R,H),ct=D(H,rt,ut),vt,ft,Bt=k.gestureScale;if(ct)return!1;if(Bt)nt=k.scaleX*Bt,ot=k.scaleY*Bt;else{if(X=it(k,k.originX,k.originY,W,V),vt=rt!=="y"?g(X.x):1,ft=rt!=="x"?g(X.y):1,k.signX||(k.signX=vt),k.signY||(k.signY=ft),H.lockScalingFlip&&(k.signX!==vt||k.signY!==ft))return!1;if(lt=H._getTransformedDimensions(),ut&&!rt){var Qt=Math.abs(X.x)+Math.abs(X.y),wt=k.original,Zi=Math.abs(lt.x*wt.scaleX/H.scaleX)+Math.abs(lt.y*wt.scaleY/H.scaleY),ai=Qt/Zi;nt=wt.scaleX*ai,ot=wt.scaleY*ai}else nt=Math.abs(X.x*H.scaleX/lt.x),ot=Math.abs(X.y*H.scaleY/lt.y);x(k)&&(nt*=2,ot*=2),k.signX!==vt&&rt!=="y"&&(k.originX=c[k.originX],nt*=-1,k.signX=vt),k.signY!==ft&&rt!=="x"&&(k.originY=c[k.originY],ot*=-1,k.signY=ft)}var tr=H.scaleX,er=H.scaleY;return rt?(rt==="x"&&H.set("scaleX",nt),rt==="y"&&H.set("scaleY",ot)):(!$&&H.set("scaleX",nt),!st&&H.set("scaleY",ot)),tr!==H.scaleX||er!==H.scaleY}function A(R,k,W,V){return C(R,k,W,V)}function M(R,k,W,V){return C(R,k,W,V,{by:"x"})}function N(R,k,W,V){return C(R,k,W,V,{by:"y"})}function L(R,k,W,V){return R[k.target.canvas.altActionKey]?t.skewHandlerX(R,k,W,V):t.scalingY(R,k,W,V)}function Y(R,k,W,V){return R[k.target.canvas.altActionKey]?t.skewHandlerY(R,k,W,V):t.scalingX(R,k,W,V)}function U(R,k,W,V){var j=k.target,H=it(k,k.originX,k.originY,W,V),$=j.strokeWidth/(j.strokeUniform?j.scaleX:1),st=x(k)?2:1,rt=j.width,X=Math.abs(H.x*st/j.scaleX)-$;return j.set("width",Math.max(X,0)),rt!==X}function J(R,k,W,V){var j=k.target,H=W-k.offsetX,$=V-k.offsetY,st=!j.get("lockMovementX")&&j.left!==H,rt=!j.get("lockMovementY")&&j.top!==$;return st&&j.set("left",H),rt&&j.set("top",$),(st||rt)&&v("moving",q(R,k,W,V)),st||rt}t.scaleCursorStyleHandler=B,t.skewCursorStyleHandler=z,t.scaleSkewCursorStyleHandler=G,t.rotationWithSnapping=tt("rotating",K(w)),t.scalingEqually=tt("scaling",K(A)),t.scalingX=tt("scaling",K(M)),t.scalingY=tt("scaling",K(N)),t.scalingYOrSkewingX=L,t.scalingXOrSkewingY=Y,t.changeWidth=tt("resizing",K(U)),t.skewHandlerX=O,t.skewHandlerY=I,t.dragHandler=J,t.scaleOrSkewActionName=Q,t.rotationStyleHandler=Z,t.fireEvent=v,t.wrapWithFixedAnchor=K,t.wrapWithFireEvent=tt,t.getLocalPoint=it,n.controlsUtils=t})(d),(function(u){var n=u.fabric||(u.fabric={}),l=n.util.degreesToRadians,a=n.controlsUtils;function t(e,s,h,r,c){r=r||{};var f=this.sizeX||r.cornerSize||c.cornerSize,g=this.sizeY||r.cornerSize||c.cornerSize,p=typeof r.transparentCorners<"u"?r.transparentCorners:c.transparentCorners,v=p?"stroke":"fill",_=!p&&(r.cornerStrokeColor||c.cornerStrokeColor),x=s,D=h,B;e.save(),e.fillStyle=r.cornerColor||c.cornerColor,e.strokeStyle=r.cornerStrokeColor||c.cornerStrokeColor,f>g?(B=f,e.scale(1,g/f),D=h*f/g):g>f?(B=g,e.scale(f/g,1),x=s*g/f):B=f,e.lineWidth=1,e.beginPath(),e.arc(x,D,B/2,0,2*Math.PI,!1),e[v](),_&&e.stroke(),e.restore()}function i(e,s,h,r,c){r=r||{};var f=this.sizeX||r.cornerSize||c.cornerSize,g=this.sizeY||r.cornerSize||c.cornerSize,p=typeof r.transparentCorners<"u"?r.transparentCorners:c.transparentCorners,v=p?"stroke":"fill",_=!p&&(r.cornerStrokeColor||c.cornerStrokeColor),x=f/2,D=g/2;e.save(),e.fillStyle=r.cornerColor||c.cornerColor,e.strokeStyle=r.cornerStrokeColor||c.cornerStrokeColor,e.lineWidth=1,e.translate(s,h),e.rotate(l(c.angle)),e[v+"Rect"](-x,-D,f,g),_&&e.strokeRect(-x,-D,f,g),e.restore()}a.renderCircleControl=t,a.renderSquareControl=i})(d),(function(u){var n=u.fabric||(u.fabric={});function l(a){for(var t in a)this[t]=a[t]}n.Control=l,n.Control.prototype={visible:!0,actionName:"scale",angle:0,x:0,y:0,offsetX:0,offsetY:0,sizeX:null,sizeY:null,touchSizeX:null,touchSizeY:null,cursorStyle:"crosshair",withConnection:!1,actionHandler:function(){},mouseDownHandler:function(){},mouseUpHandler:function(){},getActionHandler:function(){return this.actionHandler},getMouseDownHandler:function(){return this.mouseDownHandler},getMouseUpHandler:function(){return this.mouseUpHandler},cursorStyleHandler:function(a,t){return t.cursorStyle},getActionName:function(a,t){return t.actionName},getVisibility:function(a,t){var i=a._controlsVisibility;return i&&typeof i[t]<"u"?i[t]:this.visible},setVisibility:function(a){this.visible=a},positionHandler:function(a,t){var i=n.util.transformPoint({x:this.x*a.x+this.offsetX,y:this.y*a.y+this.offsetY},t);return i},calcCornerCoords:function(a,t,i,e,s){var h,r,c,f,g=s?this.touchSizeX:this.sizeX,p=s?this.touchSizeY:this.sizeY;if(g&&p&&g!==p){var v=Math.atan2(p,g),_=Math.sqrt(g*g+p*p)/2,x=v-n.util.degreesToRadians(a),D=Math.PI/2-v-n.util.degreesToRadians(a);h=_*n.util.cos(x),r=_*n.util.sin(x),c=_*n.util.cos(D),f=_*n.util.sin(D)}else{var B=g&&p?g:t;_=B*.7071067812;var x=n.util.degreesToRadians(45-a);h=c=_*n.util.cos(x),r=f=_*n.util.sin(x)}return{tl:{x:i-f,y:e-c},tr:{x:i+h,y:e-r},bl:{x:i-h,y:e+r},br:{x:i+f,y:e+c}}},render:function(a,t,i,e,s){switch(e=e||{},e.cornerStyle||s.cornerStyle){case"circle":n.controlsUtils.renderCircleControl.call(this,a,t,i,e,s);break;default:n.controlsUtils.renderSquareControl.call(this,a,t,i,e,s)}}}})(d),(function(){function u(i,e){var s=i.getAttribute("style"),h=i.getAttribute("offset")||0,r,c,f,g;if(h=parseFloat(h)/(/%$/.test(h)?100:1),h=h<0?0:h>1?1:h,s){var p=s.split(/\s*;\s*/);for(p[p.length-1]===""&&p.pop(),g=p.length;g--;){var v=p[g].split(/\s*:\s*/),_=v[0].trim(),x=v[1].trim();_==="stop-color"?r=x:_==="stop-opacity"&&(f=x)}}return r||(r=i.getAttribute("stop-color")||"rgb(0,0,0)"),f||(f=i.getAttribute("stop-opacity")),r=new o.Color(r),c=r.getAlpha(),f=isNaN(parseFloat(f))?1:parseFloat(f),f*=c*e,{offset:h,color:r.toRgb(),opacity:f}}function n(i){return{x1:i.getAttribute("x1")||0,y1:i.getAttribute("y1")||0,x2:i.getAttribute("x2")||"100%",y2:i.getAttribute("y2")||0}}function l(i){return{x1:i.getAttribute("fx")||i.getAttribute("cx")||"50%",y1:i.getAttribute("fy")||i.getAttribute("cy")||"50%",r1:0,x2:i.getAttribute("cx")||"50%",y2:i.getAttribute("cy")||"50%",r2:i.getAttribute("r")||"50%"}}var a=o.util.object.clone;o.Gradient=o.util.createClass({offsetX:0,offsetY:0,gradientTransform:null,gradientUnits:"pixels",type:"linear",initialize:function(i){i||(i={}),i.coords||(i.coords={});var e,s=this;Object.keys(i).forEach(function(h){s[h]=i[h]}),this.id?this.id+="_"+o.Object.__uid++:this.id=o.Object.__uid++,e={x1:i.coords.x1||0,y1:i.coords.y1||0,x2:i.coords.x2||0,y2:i.coords.y2||0},this.type==="radial"&&(e.r1=i.coords.r1||0,e.r2=i.coords.r2||0),this.coords=e,this.colorStops=i.colorStops.slice()},addColorStop:function(i){for(var e in i){var s=new o.Color(i[e]);this.colorStops.push({offset:parseFloat(e),color:s.toRgb(),opacity:s.getAlpha()})}return this},toObject:function(i){var e={type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientUnits:this.gradientUnits,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform};return o.util.populateWithProperties(this,e,i),e},toSVG:function(i,c){var s=a(this.coords,!0),h,r,c=c||{},f,g,p=a(this.colorStops,!0),v=s.r1>s.r2,_=this.gradientTransform?this.gradientTransform.concat():o.iMatrix.concat(),x=-this.offsetX,D=-this.offsetY,B=!!c.additionalTransform,z=this.gradientUnits==="pixels"?"userSpaceOnUse":"objectBoundingBox";if(p.sort(function(K,tt){return K.offset-tt.offset}),z==="objectBoundingBox"?(x/=i.width,D/=i.height):(x+=i.width/2,D+=i.height/2),i.type==="path"&&this.gradientUnits!=="percentage"&&(x-=i.pathOffset.x,D-=i.pathOffset.y),_[4]-=x,_[5]-=D,g='id="SVGID_'+this.id+'" gradientUnits="'+z+'"',g+=' gradientTransform="'+(B?c.additionalTransform+" ":"")+o.util.matrixToSVG(_)+'" ',this.type==="linear"?f=["<linearGradient ",g,' x1="',s.x1,'" y1="',s.y1,'" x2="',s.x2,'" y2="',s.y2,`">
7
+ `),r=-1,c=0,f={},g=0;g<h.length;g++)for(var p=0;p<h[g].length;p++)r++,e[c]&&e[c].start<=r&&r<e[c].end&&(f[g]=f[g]||{},f[g][p]=Object.assign({},e[c].style),r===e[c].end-1&&c++);return f}}})(d),(function(){var u=Array.prototype.join,n={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},l={m:"l",M:"L"};function a(y,E,P,O,L,w,C,A,M,N,I){var Y=o.util.cos(y),U=o.util.sin(y),J=o.util.cos(E),R=o.util.sin(E),k=P*L*J-O*w*R+C,W=O*L*J+P*w*R+A,V=N+M*(-P*L*U-O*w*Y),j=I+M*(-O*L*U+P*w*Y),H=k+M*(P*L*R+O*w*J),$=W+M*(O*L*R-P*w*J);return["C",V,j,H,$,k,W]}function t(y,E,P,O,L,w,C){var A=Math.PI,M=C*A/180,N=o.util.sin(M),I=o.util.cos(M),Y=0,U=0;P=Math.abs(P),O=Math.abs(O);var J=-I*y*.5-N*E*.5,R=-I*E*.5+N*y*.5,k=P*P,W=O*O,V=R*R,j=J*J,H=k*W-k*V-W*j,$=0;if(H<0){var st=Math.sqrt(1-H/(k*W));P*=st,O*=st}else $=(L===w?-1:1)*Math.sqrt(H/(k*V+W*j));var rt=$*P*R/O,X=-$*O*J/P,nt=I*rt-N*X+y*.5,ot=N*rt+I*X+E*.5,lt=i(1,0,(J-rt)/P,(R-X)/O),ut=i((J-rt)/P,(R-X)/O,(-J-rt)/P,(-R-X)/O);w===0&&ut>0?ut-=2*A:w===1&&ut<0&&(ut+=2*A);for(var ct=Math.ceil(Math.abs(ut/A*2)),vt=[],ft=ut/ct,Bt=8/3*Math.sin(ft/4)*Math.sin(ft/4)/Math.sin(ft/2),Qt=lt+ft,wt=0;wt<ct;wt++)vt[wt]=a(lt,Qt,I,N,P,O,nt,ot,Bt,Y,U),Y=vt[wt][5],U=vt[wt][6],lt=Qt,Qt+=ft;return vt}function i(y,E,P,O){var L=Math.atan2(E,y),w=Math.atan2(O,P);return w>=L?w-L:2*Math.PI-(L-w)}function e(y,E,P,O,L,w,C,A){var M;if(o.cachesBoundsOfCurve&&(M=u.call(arguments),o.boundsOfCurveCache[M]))return o.boundsOfCurveCache[M];var N=Math.sqrt,I=Math.min,Y=Math.max,U=Math.abs,J=[],R=[[],[]],k,W,V,j,H,$,st,rt;W=6*y-12*P+6*L,k=-3*y+9*P-9*L+3*C,V=3*P-3*y;for(var X=0;X<2;++X){if(X>0&&(W=6*E-12*O+6*w,k=-3*E+9*O-9*w+3*A,V=3*O-3*E),U(k)<1e-12){if(U(W)<1e-12)continue;j=-V/W,0<j&&j<1&&J.push(j);continue}st=W*W-4*V*k,!(st<0)&&(rt=N(st),H=(-W+rt)/(2*k),0<H&&H<1&&J.push(H),$=(-W-rt)/(2*k),0<$&&$<1&&J.push($))}for(var nt,ot,lt=J.length,ut=lt,ct;lt--;)j=J[lt],ct=1-j,nt=ct*ct*ct*y+3*ct*ct*j*P+3*ct*j*j*L+j*j*j*C,R[0][lt]=nt,ot=ct*ct*ct*E+3*ct*ct*j*O+3*ct*j*j*w+j*j*j*A,R[1][lt]=ot;R[0][ut]=y,R[1][ut]=E,R[0][ut+1]=C,R[1][ut+1]=A;var vt=[{x:I.apply(null,R[0]),y:I.apply(null,R[1])},{x:Y.apply(null,R[0]),y:Y.apply(null,R[1])}];return o.cachesBoundsOfCurve&&(o.boundsOfCurveCache[M]=vt),vt}function s(y,E,P){for(var O=P[1],L=P[2],w=P[3],C=P[4],A=P[5],M=P[6],N=P[7],I=t(M-y,N-E,O,L,C,A,w),Y=0,U=I.length;Y<U;Y++)I[Y][1]+=y,I[Y][2]+=E,I[Y][3]+=y,I[Y][4]+=E,I[Y][5]+=y,I[Y][6]+=E;return I}function h(y){var E=0,P=0,O=y.length,L=0,w=0,C,A,M,N=[],I,Y,U;for(A=0;A<O;++A){switch(M=!1,C=y[A].slice(0),C[0]){case"l":C[0]="L",C[1]+=E,C[2]+=P;case"L":E=C[1],P=C[2];break;case"h":C[1]+=E;case"H":C[0]="L",C[2]=P,E=C[1];break;case"v":C[1]+=P;case"V":C[0]="L",P=C[1],C[1]=E,C[2]=P;break;case"m":C[0]="M",C[1]+=E,C[2]+=P;case"M":E=C[1],P=C[2],L=C[1],w=C[2];break;case"c":C[0]="C",C[1]+=E,C[2]+=P,C[3]+=E,C[4]+=P,C[5]+=E,C[6]+=P;case"C":Y=C[3],U=C[4],E=C[5],P=C[6];break;case"s":C[0]="S",C[1]+=E,C[2]+=P,C[3]+=E,C[4]+=P;case"S":I==="C"?(Y=2*E-Y,U=2*P-U):(Y=E,U=P),E=C[3],P=C[4],C[0]="C",C[5]=C[3],C[6]=C[4],C[3]=C[1],C[4]=C[2],C[1]=Y,C[2]=U,Y=C[3],U=C[4];break;case"q":C[0]="Q",C[1]+=E,C[2]+=P,C[3]+=E,C[4]+=P;case"Q":Y=C[1],U=C[2],E=C[3],P=C[4];break;case"t":C[0]="T",C[1]+=E,C[2]+=P;case"T":I==="Q"?(Y=2*E-Y,U=2*P-U):(Y=E,U=P),C[0]="Q",E=C[1],P=C[2],C[1]=Y,C[2]=U,C[3]=E,C[4]=P;break;case"a":C[0]="A",C[6]+=E,C[7]+=P;case"A":M=!0,N=N.concat(s(E,P,C)),E=C[6],P=C[7];break;case"z":case"Z":E=L,P=w;break}M||N.push(C),I=C[0]}return N}function r(y,E,P,O){return Math.sqrt((P-y)*(P-y)+(O-E)*(O-E))}function c(y){return y*y*y}function f(y){return 3*y*y*(1-y)}function g(y){return 3*y*(1-y)*(1-y)}function p(y){return(1-y)*(1-y)*(1-y)}function v(y,E,P,O,L,w,C,A){return function(M){var N=c(M),I=f(M),Y=g(M),U=p(M);return{x:C*N+L*I+P*Y+y*U,y:A*N+w*I+O*Y+E*U}}}function _(y,E,P,O,L,w,C,A){return function(M){var N=1-M,I=3*N*N*(P-y)+6*N*M*(L-P)+3*M*M*(C-L),Y=3*N*N*(O-E)+6*N*M*(w-O)+3*M*M*(A-w);return Math.atan2(Y,I)}}function x(y){return y*y}function D(y){return 2*y*(1-y)}function B(y){return(1-y)*(1-y)}function z(y,E,P,O,L,w){return function(C){var A=x(C),M=D(C),N=B(C);return{x:L*A+P*M+y*N,y:w*A+O*M+E*N}}}function G(y,E,P,O,L,w){return function(C){var A=1-C,M=2*A*(P-y)+2*C*(L-P),N=2*A*(O-E)+2*C*(w-O);return Math.atan2(N,M)}}function Q(y,E,P){var O={x:E,y:P},L,w=0,C;for(C=1;C<=100;C+=1)L=y(C/100),w+=r(O.x,O.y,L.x,L.y),O=L;return w}function Z(y,E){for(var P=0,O=0,L=y.iterator,w={x:y.x,y:y.y},C,A,M=.01,N=y.angleFinder,I;O<E&&M>1e-4;)C=L(P),I=P,A=r(w.x,w.y,C.x,C.y),A+O>E?(P-=M,M/=2):(w=C,P+=M,O+=A);return C.angle=N(I),C}function q(y){for(var E=0,P=y.length,O,L=0,w=0,C=0,A=0,M=[],N,I,Y,U=0;U<P;U++){switch(O=y[U],I={x:L,y:w,command:O[0]},O[0]){case"M":I.length=0,C=L=O[1],A=w=O[2];break;case"L":I.length=r(L,w,O[1],O[2]),L=O[1],w=O[2];break;case"C":N=v(L,w,O[1],O[2],O[3],O[4],O[5],O[6]),Y=_(L,w,O[1],O[2],O[3],O[4],O[5],O[6]),I.iterator=N,I.angleFinder=Y,I.length=Q(N,L,w),L=O[5],w=O[6];break;case"Q":N=z(L,w,O[1],O[2],O[3],O[4]),Y=G(L,w,O[1],O[2],O[3],O[4]),I.iterator=N,I.angleFinder=Y,I.length=Q(N,L,w),L=O[3],w=O[4];break;case"Z":case"z":I.destX=C,I.destY=A,I.length=r(L,w,C,A),L=C,w=A;break}E+=I.length,M.push(I)}return M.push({length:E,x:L,y:w}),M}function K(y,E,P){P||(P=q(y));for(var O=0;E-P[O].length>0&&O<P.length-2;)E-=P[O].length,O++;var L=P[O],w=E/L.length,C=L.command,A=y[O],M;switch(C){case"M":return{x:L.x,y:L.y,angle:0};case"Z":case"z":return M=new o.Point(L.x,L.y).lerp(new o.Point(L.destX,L.destY),w),M.angle=Math.atan2(L.destY-L.y,L.destX-L.x),M;case"L":return M=new o.Point(L.x,L.y).lerp(new o.Point(A[1],A[2]),w),M.angle=Math.atan2(A[2]-L.y,A[1]-L.x),M;case"C":return Z(L,E);case"Q":return Z(L,E)}}function tt(y){var E=[],P=[],O,L,w=o.rePathCommand,C="[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*",A="("+C+")"+o.commaWsp,M="([01])"+o.commaWsp+"?",N=A+"?"+A+"?"+A+M+M+A+"?("+C+")",I=new RegExp(N,"g"),Y,U,J;if(!y||!y.match)return E;J=y.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);for(var R=0,k,W=J.length;R<W;R++){O=J[R],U=O.slice(1).trim(),P.length=0;var V=O.charAt(0);if(k=[V],V.toLowerCase()==="a")for(var j;j=I.exec(U);)for(var H=1;H<j.length;H++)P.push(j[H]);else for(;Y=w.exec(U);)P.push(Y[0]);for(var H=0,$=P.length;H<$;H++)L=parseFloat(P[H]),isNaN(L)||k.push(L);var st=n[V.toLowerCase()],rt=l[V]||V;if(k.length-1>st)for(var X=1,nt=k.length;X<nt;X+=st)E.push([V].concat(k.slice(X,X+st))),V=rt;else E.push(k)}return E}function it(y,E){var P=[],O,L=new o.Point(y[0].x,y[0].y),w=new o.Point(y[1].x,y[1].y),C=y.length,A=1,M=0,N=C>2;for(E=E||0,N&&(A=y[2].x<w.x?-1:y[2].x===w.x?0:1,M=y[2].y<w.y?-1:y[2].y===w.y?0:1),P.push(["M",L.x-A*E,L.y-M*E]),O=1;O<C;O++){if(!L.eq(w)){var I=L.midPointFrom(w);P.push(["Q",L.x,L.y,I.x,I.y])}L=y[O],O+1<y.length&&(w=y[O+1])}return N&&(A=L.x>y[O-2].x?1:L.x===y[O-2].x?0:-1,M=L.y>y[O-2].y?1:L.y===y[O-2].y?0:-1),P.push(["L",L.x+A*E,L.y+M*E]),P}function et(y,E,P){return P&&(E=o.util.multiplyTransformMatrices(E,[1,0,0,1,-P.x,-P.y])),y.map(function(O){for(var L=O.slice(0),w={},C=1;C<O.length-1;C+=2)w.x=O[C],w.y=O[C+1],w=o.util.transformPoint(w,E),L[C]=w.x,L[C+1]=w.y;return L})}o.util.joinPath=function(y){return y.map(function(E){return E.join(" ")}).join(" ")},o.util.parsePath=tt,o.util.makePathSimpler=h,o.util.getSmoothPathFromPoints=it,o.util.getPathSegmentsInfo=q,o.util.getBoundsOfCurve=e,o.util.getPointOnPath=K,o.util.transformPath=et})(),(function(){var u=Array.prototype.slice;function n(e,s){for(var h=u.call(arguments,2),r=[],c=0,f=e.length;c<f;c++)r[c]=h.length?e[c][s].apply(e[c],h):e[c][s].call(e[c]);return r}function l(e,s){return i(e,s,function(h,r){return h>=r})}function a(e,s){return i(e,s,function(h,r){return h<r})}function t(e,s){for(var h=e.length;h--;)e[h]=s;return e}function i(e,s,h){if(!(!e||e.length===0)){var r=e.length-1,c=s?e[r][s]:e[r];if(s)for(;r--;)h(e[r][s],c)&&(c=e[r][s]);else for(;r--;)h(e[r],c)&&(c=e[r]);return c}}o.util.array={fill:t,invoke:n,min:a,max:l}})(),(function(){function u(l,a,t){if(t)if(!o.isLikelyNode&&a instanceof Element)l=a;else if(a instanceof Array){l=[];for(var i=0,e=a.length;i<e;i++)l[i]=u({},a[i],t)}else if(a&&typeof a=="object")for(var s in a)s==="canvas"||s==="group"?l[s]=null:a.hasOwnProperty(s)&&(l[s]=u({},a[s],t));else l=a;else for(var s in a)l[s]=a[s];return l}function n(l,a){return u({},l,a)}o.util.object={extend:u,clone:n},o.util.object.extend(o.util,o.Observable)})(),(function(){function u(i){return i.replace(/-+(.)?/g,function(e,s){return s?s.toUpperCase():""})}function n(i,e){return i.charAt(0).toUpperCase()+(e?i.slice(1):i.slice(1).toLowerCase())}function l(i){return i.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function a(i){var e=0,s,h=[];for(e=0,s;e<i.length;e++)(s=t(i,e))!==!1&&h.push(s);return h}function t(i,e){var s=i.charCodeAt(e);if(isNaN(s))return"";if(s<55296||s>57343)return i.charAt(e);if(55296<=s&&s<=56319){if(i.length<=e+1)throw"High surrogate without following low surrogate";var h=i.charCodeAt(e+1);if(56320>h||h>57343)throw"High surrogate without following low surrogate";return i.charAt(e)+i.charAt(e+1)}if(e===0)throw"Low surrogate without preceding high surrogate";var r=i.charCodeAt(e-1);if(55296>r||r>56319)throw"Low surrogate without preceding high surrogate";return!1}o.util.string={camelize:u,capitalize:n,escapeXml:l,graphemeSplit:a}})(),(function(){var u=Array.prototype.slice,n=function(){},l=(function(){for(var s in{toString:1})if(s==="toString")return!1;return!0})(),a=function(s,h,r){for(var c in h)c in s.prototype&&typeof s.prototype[c]=="function"&&(h[c]+"").indexOf("callSuper")>-1?s.prototype[c]=(function(f){return function(){var g=this.constructor.superclass;this.constructor.superclass=r;var p=h[f].apply(this,arguments);if(this.constructor.superclass=g,f!=="initialize")return p}})(c):s.prototype[c]=h[c],l&&(h.toString!==Object.prototype.toString&&(s.prototype.toString=h.toString),h.valueOf!==Object.prototype.valueOf&&(s.prototype.valueOf=h.valueOf))};function t(){}function i(s){for(var h=null,r=this;r.constructor.superclass;){var c=r.constructor.superclass.prototype[s];if(r[s]!==c){h=c;break}r=r.constructor.superclass.prototype}return h?arguments.length>1?h.apply(this,u.call(arguments,1)):h.call(this):console.log("tried to callSuper "+s+", method not found in prototype chain",this)}function e(){var s=null,h=u.call(arguments,0);typeof h[0]=="function"&&(s=h.shift());function r(){this.initialize.apply(this,arguments)}r.superclass=s,r.subclasses=[],s&&(t.prototype=s.prototype,r.prototype=new t,s.subclasses.push(r));for(var c=0,f=h.length;c<f;c++)a(r,h[c],s);return r.prototype.initialize||(r.prototype.initialize=n),r.prototype.constructor=r,r.prototype.callSuper=i,r}o.util.createClass=e})(),(function(){var u=!!o.document.createElement("div").attachEvent,n=["touchstart","touchmove","touchend"];o.util.addListener=function(a,t,i,e){a&&a.addEventListener(t,i,u?!1:e)},o.util.removeListener=function(a,t,i,e){a&&a.removeEventListener(t,i,u?!1:e)};function l(a){var t=a.changedTouches;return t&&t[0]?t[0]:a}o.util.getPointer=function(a){var t=a.target,i=o.util.getScrollLeftTop(t),e=l(a);return{x:e.clientX+i.left,y:e.clientY+i.top}},o.util.isTouchEvent=function(a){return n.indexOf(a.type)>-1||a.pointerType==="touch"}})(),(function(){function u(e,s){var h=e.style;if(!h)return e;if(typeof s=="string")return e.style.cssText+=";"+s,s.indexOf("opacity")>-1?i(e,s.match(/opacity:\s*(\d?\.?\d*)/)[1]):e;for(var r in s)if(r==="opacity")i(e,s[r]);else{var c=r==="float"||r==="cssFloat"?typeof h.styleFloat>"u"?"cssFloat":"styleFloat":r;h.setProperty(c,s[r])}return e}var n=o.document.createElement("div"),l=typeof n.style.opacity=="string",a=typeof n.style.filter=="string",t=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,i=function(e){return e};l?i=function(e,s){return e.style.opacity=s,e}:a&&(i=function(e,s){var h=e.style;return e.currentStyle&&!e.currentStyle.hasLayout&&(h.zoom=1),t.test(h.filter)?(s=s>=.9999?"":"alpha(opacity="+s*100+")",h.filter=h.filter.replace(t,s)):h.filter+=" alpha(opacity="+s*100+")",e}),o.util.setStyle=u})(),(function(){var u=Array.prototype.slice;function n(p){return typeof p=="string"?o.document.getElementById(p):p}var l,a=function(p){return u.call(p,0)};try{l=a(o.document.childNodes)instanceof Array}catch{}l||(a=function(p){for(var v=new Array(p.length),_=p.length;_--;)v[_]=p[_];return v});function t(p,v){var _=o.document.createElement(p);for(var x in v)x==="class"?_.className=v[x]:x==="for"?_.htmlFor=v[x]:_.setAttribute(x,v[x]);return _}function i(p,v){p&&(" "+p.className+" ").indexOf(" "+v+" ")===-1&&(p.className+=(p.className?" ":"")+v)}function e(p,v,_){return typeof v=="string"&&(v=t(v,_)),p.parentNode&&p.parentNode.replaceChild(v,p),v.appendChild(p),v}function s(p){for(var v=0,_=0,x=o.document.documentElement,D=o.document.body||{scrollLeft:0,scrollTop:0};p&&(p.parentNode||p.host)&&(p=p.parentNode||p.host,p===o.document?(v=D.scrollLeft||x.scrollLeft||0,_=D.scrollTop||x.scrollTop||0):(v+=p.scrollLeft||0,_+=p.scrollTop||0),!(p.nodeType===1&&p.style.position==="fixed")););return{left:v,top:_}}function h(p){var v,_=p&&p.ownerDocument,x={left:0,top:0},D={left:0,top:0},B,z={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!_)return D;for(var G in z)D[z[G]]+=parseInt(r(p,G),10)||0;return v=_.documentElement,typeof p.getBoundingClientRect<"u"&&(x=p.getBoundingClientRect()),B=s(p),{left:x.left+B.left-(v.clientLeft||0)+D.left,top:x.top+B.top-(v.clientTop||0)+D.top}}var r;o.document.defaultView&&o.document.defaultView.getComputedStyle?r=function(p,v){var _=o.document.defaultView.getComputedStyle(p,null);return _?_[v]:void 0}:r=function(p,v){var _=p.style[v];return!_&&p.currentStyle&&(_=p.currentStyle[v]),_},(function(){var p=o.document.documentElement.style,v="userSelect"in p?"userSelect":"MozUserSelect"in p?"MozUserSelect":"WebkitUserSelect"in p?"WebkitUserSelect":"KhtmlUserSelect"in p?"KhtmlUserSelect":"";function _(D){return typeof D.onselectstart<"u"&&(D.onselectstart=o.util.falseFunction),v?D.style[v]="none":typeof D.unselectable=="string"&&(D.unselectable="on"),D}function x(D){return typeof D.onselectstart<"u"&&(D.onselectstart=null),v?D.style[v]="":typeof D.unselectable=="string"&&(D.unselectable=""),D}o.util.makeElementUnselectable=_,o.util.makeElementSelectable=x})();function c(p){var v=o.jsdomImplForWrapper(p);return v._canvas||v._image}function f(p){if(o.isLikelyNode){var v=o.jsdomImplForWrapper(p);v&&(v._image=null,v._canvas=null,v._currentSrc=null,v._attributes=null,v._classList=null)}}function g(p,v){p.imageSmoothingEnabled=p.imageSmoothingEnabled||p.webkitImageSmoothingEnabled||p.mozImageSmoothingEnabled||p.msImageSmoothingEnabled||p.oImageSmoothingEnabled,p.imageSmoothingEnabled=v}o.util.setImageSmoothing=g,o.util.getById=n,o.util.toArray=a,o.util.addClass=i,o.util.makeElement=t,o.util.wrapElement=e,o.util.getScrollLeftTop=s,o.util.getElementOffset=h,o.util.getNodeCanvas=c,o.util.cleanUpJsdomNode=f})(),(function(){function u(a,t){return a+(/\?/.test(a)?"&":"?")+t}function n(){}function l(a,t){t||(t={});var i=t.method?t.method.toUpperCase():"GET",e=t.onComplete||function(){},s=new o.window.XMLHttpRequest,h=t.body||t.parameters;return s.onreadystatechange=function(){s.readyState===4&&(e(s),s.onreadystatechange=n)},i==="GET"&&(h=null,typeof t.parameters=="string"&&(a=u(a,t.parameters))),s.open(i,a,!0),(i==="POST"||i==="PUT")&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.send(h),s}o.util.request=l})(),o.log=console.log,o.warn=console.warn,(function(){var u=o.util.object.extend,n=o.util.object.clone,l=[];o.util.object.extend(l,{cancelAll:function(){var c=this.splice(0);return c.forEach(function(f){f.cancel()}),c},cancelByCanvas:function(c){if(!c)return[];var f=this.filter(function(g){return typeof g.target=="object"&&g.target.canvas===c});return f.forEach(function(g){g.cancel()}),f},cancelByTarget:function(c){var f=this.findAnimationsByTarget(c);return f.forEach(function(g){g.cancel()}),f},findAnimationIndex:function(c){return this.indexOf(this.findAnimation(c))},findAnimation:function(c){return this.find(function(f){return f.cancel===c})},findAnimationsByTarget:function(c){return c?this.filter(function(f){return f.target===c}):[]}});function a(){return!1}function t(c,f,g,p){return-g*Math.cos(c/p*(Math.PI/2))+g+f}function i(c){c||(c={});var f=!1,g,p=function(){var v=o.runningAnimations.indexOf(g);return v>-1&&o.runningAnimations.splice(v,1)[0]};return g=u(n(c),{cancel:function(){return f=!0,p()},currentValue:"startValue"in c?c.startValue:0,completionRate:0,durationRate:0}),o.runningAnimations.push(g),h(function(v){var _=v||+new Date,x=c.duration||500,D=_+x,B,z=c.onChange||a,G=c.abort||a,Q=c.onComplete||a,Z=c.easing||t,q="startValue"in c?c.startValue.length>0:!1,K="startValue"in c?c.startValue:0,tt="endValue"in c?c.endValue:100,it=c.byValue||(q?K.map(function(et,y){return tt[y]-K[y]}):tt-K);c.onStart&&c.onStart(),(function et(y){B=y||+new Date;var E=B>D?x:B-_,P=E/x,O=q?K.map(function(w,C){return Z(E,K[C],it[C],x)}):Z(E,K,it,x),L=Math.abs(q?(O[0]-K[0])/it[0]:(O-K)/it);if(g.currentValue=q?O.slice():O,g.completionRate=L,g.durationRate=P,!f){if(G(O,L,P)){p();return}if(B>D){g.currentValue=q?tt.slice():tt,g.completionRate=1,g.durationRate=1,z(q?tt.slice():tt,1,1),Q(tt,1,1),p();return}else z(O,L,P),h(et)}})(_)}),g.cancel}var e=o.window.requestAnimationFrame||o.window.webkitRequestAnimationFrame||o.window.mozRequestAnimationFrame||o.window.oRequestAnimationFrame||o.window.msRequestAnimationFrame||function(c){return o.window.setTimeout(c,1e3/60)},s=o.window.cancelAnimationFrame||o.window.clearTimeout;function h(){return e.apply(o.window,arguments)}function r(){return s.apply(o.window,arguments)}o.util.animate=i,o.util.requestAnimFrame=h,o.util.cancelAnimFrame=r,o.runningAnimations=l})(),(function(){function u(l,a,t){var i="rgba("+parseInt(l[0]+t*(a[0]-l[0]),10)+","+parseInt(l[1]+t*(a[1]-l[1]),10)+","+parseInt(l[2]+t*(a[2]-l[2]),10);return i+=","+(l&&a?parseFloat(l[3]+t*(a[3]-l[3])):1),i+=")",i}function n(l,a,t,i){var e=new o.Color(l).getSource(),s=new o.Color(a).getSource(),h=i.onComplete,r=i.onChange;return i=i||{},o.util.animate(o.util.object.extend(i,{duration:t||500,startValue:e,endValue:s,byValue:s,easing:function(c,f,g,p){var v=i.colorEasing?i.colorEasing(c,p):1-Math.cos(c/p*(Math.PI/2));return u(f,g,v)},onComplete:function(c,f,g){if(h)return h(u(s,s,0),f,g)},onChange:function(c,f,g){if(r){if(Array.isArray(c))return r(u(c,c,0),f,g);r(c,f,g)}}}))}o.util.animateColor=n})(),(function(){function u(y,E,P,O){return y<Math.abs(E)?(y=E,O=P/4):E===0&&y===0?O=P/(2*Math.PI)*Math.asin(1):O=P/(2*Math.PI)*Math.asin(E/y),{a:y,c:E,p:P,s:O}}function n(y,E,P){return y.a*Math.pow(2,10*(E-=1))*Math.sin((E*P-y.s)*(2*Math.PI)/y.p)}function l(y,E,P,O){return P*((y=y/O-1)*y*y+1)+E}function a(y,E,P,O){return y/=O/2,y<1?P/2*y*y*y+E:P/2*((y-=2)*y*y+2)+E}function t(y,E,P,O){return P*(y/=O)*y*y*y+E}function i(y,E,P,O){return-P*((y=y/O-1)*y*y*y-1)+E}function e(y,E,P,O){return y/=O/2,y<1?P/2*y*y*y*y+E:-P/2*((y-=2)*y*y*y-2)+E}function s(y,E,P,O){return P*(y/=O)*y*y*y*y+E}function h(y,E,P,O){return P*((y=y/O-1)*y*y*y*y+1)+E}function r(y,E,P,O){return y/=O/2,y<1?P/2*y*y*y*y*y+E:P/2*((y-=2)*y*y*y*y+2)+E}function c(y,E,P,O){return-P*Math.cos(y/O*(Math.PI/2))+P+E}function f(y,E,P,O){return P*Math.sin(y/O*(Math.PI/2))+E}function g(y,E,P,O){return-P/2*(Math.cos(Math.PI*y/O)-1)+E}function p(y,E,P,O){return y===0?E:P*Math.pow(2,10*(y/O-1))+E}function v(y,E,P,O){return y===O?E+P:P*(-Math.pow(2,-10*y/O)+1)+E}function _(y,E,P,O){return y===0?E:y===O?E+P:(y/=O/2,y<1?P/2*Math.pow(2,10*(y-1))+E:P/2*(-Math.pow(2,-10*--y)+2)+E)}function x(y,E,P,O){return-P*(Math.sqrt(1-(y/=O)*y)-1)+E}function D(y,E,P,O){return P*Math.sqrt(1-(y=y/O-1)*y)+E}function B(y,E,P,O){return y/=O/2,y<1?-P/2*(Math.sqrt(1-y*y)-1)+E:P/2*(Math.sqrt(1-(y-=2)*y)+1)+E}function z(y,E,P,O){var L=1.70158,w=0,C=P;if(y===0)return E;if(y/=O,y===1)return E+P;w||(w=O*.3);var A=u(C,P,w,L);return-n(A,y,O)+E}function G(y,E,P,O){var L=1.70158,w=0,C=P;if(y===0)return E;if(y/=O,y===1)return E+P;w||(w=O*.3);var A=u(C,P,w,L);return A.a*Math.pow(2,-10*y)*Math.sin((y*O-A.s)*(2*Math.PI)/A.p)+A.c+E}function Q(y,E,P,O){var L=1.70158,w=0,C=P;if(y===0)return E;if(y/=O/2,y===2)return E+P;w||(w=O*(.3*1.5));var A=u(C,P,w,L);return y<1?-.5*n(A,y,O)+E:A.a*Math.pow(2,-10*(y-=1))*Math.sin((y*O-A.s)*(2*Math.PI)/A.p)*.5+A.c+E}function Z(y,E,P,O,L){return L===void 0&&(L=1.70158),P*(y/=O)*y*((L+1)*y-L)+E}function q(y,E,P,O,L){return L===void 0&&(L=1.70158),P*((y=y/O-1)*y*((L+1)*y+L)+1)+E}function K(y,E,P,O,L){return L===void 0&&(L=1.70158),y/=O/2,y<1?P/2*(y*y*(((L*=1.525)+1)*y-L))+E:P/2*((y-=2)*y*(((L*=1.525)+1)*y+L)+2)+E}function tt(y,E,P,O){return P-it(O-y,0,P,O)+E}function it(y,E,P,O){return(y/=O)<1/2.75?P*(7.5625*y*y)+E:y<2/2.75?P*(7.5625*(y-=1.5/2.75)*y+.75)+E:y<2.5/2.75?P*(7.5625*(y-=2.25/2.75)*y+.9375)+E:P*(7.5625*(y-=2.625/2.75)*y+.984375)+E}function et(y,E,P,O){return y<O/2?tt(y*2,0,P,O)*.5+E:it(y*2-O,0,P,O)*.5+P*.5+E}o.util.ease={easeInQuad:function(y,E,P,O){return P*(y/=O)*y+E},easeOutQuad:function(y,E,P,O){return-P*(y/=O)*(y-2)+E},easeInOutQuad:function(y,E,P,O){return y/=O/2,y<1?P/2*y*y+E:-P/2*(--y*(y-2)-1)+E},easeInCubic:function(y,E,P,O){return P*(y/=O)*y*y+E},easeOutCubic:l,easeInOutCubic:a,easeInQuart:t,easeOutQuart:i,easeInOutQuart:e,easeInQuint:s,easeOutQuint:h,easeInOutQuint:r,easeInSine:c,easeOutSine:f,easeInOutSine:g,easeInExpo:p,easeOutExpo:v,easeInOutExpo:_,easeInCirc:x,easeOutCirc:D,easeInOutCirc:B,easeInElastic:z,easeOutElastic:G,easeInOutElastic:Q,easeInBack:Z,easeOutBack:q,easeInOutBack:K,easeInBounce:tt,easeOutBounce:it,easeInOutBounce:et}})(),(function(u){var n=u.fabric||(u.fabric={}),l=n.util.object.extend,a=n.util.object.clone,t=n.util.toFixed,i=n.util.parseUnit,e=n.util.multiplyTransformMatrices,s=["path","circle","polygon","polyline","ellipse","rect","line","image","text"],h=["symbol","image","marker","pattern","view","svg"],r=["pattern","defs","symbol","metadata","clipPath","mask","desc"],c=["symbol","g","a","svg","clipPath","defs"],f={cx:"left",x:"left",r:"radius",cy:"top",y:"top",display:"visible",visibility:"visible",transform:"transformMatrix","fill-opacity":"fillOpacity","fill-rule":"fillRule","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","letter-spacing":"charSpacing","paint-order":"paintFirst","stroke-dasharray":"strokeDashArray","stroke-dashoffset":"strokeDashOffset","stroke-linecap":"strokeLineCap","stroke-linejoin":"strokeLineJoin","stroke-miterlimit":"strokeMiterLimit","stroke-opacity":"strokeOpacity","stroke-width":"strokeWidth","text-decoration":"textDecoration","text-anchor":"textAnchor",opacity:"opacity","clip-path":"clipPath","clip-rule":"clipRule","vector-effect":"strokeUniform","image-rendering":"imageSmoothing"},g={stroke:"strokeOpacity",fill:"fillOpacity"},p="font-size",v="clip-path";n.svgValidTagNamesRegEx=D(s),n.svgViewBoxElementsRegEx=D(h),n.svgInvalidAncestorsRegEx=D(r),n.svgValidParentsRegEx=D(c),n.cssRules={},n.gradientDefs={},n.clipPaths={};function _(w){return w in f?f[w]:w}function x(w,C,A,M){var N=Array.isArray(C),I;if((w==="fill"||w==="stroke")&&C==="none")C="";else{if(w==="strokeUniform")return C==="non-scaling-stroke";if(w==="strokeDashArray")C==="none"?C=null:C=C.replace(/,/g," ").split(/\s+/).map(parseFloat);else if(w==="transformMatrix")A&&A.transformMatrix?C=e(A.transformMatrix,n.parseTransformAttribute(C)):C=n.parseTransformAttribute(C);else if(w==="visible")C=C!=="none"&&C!=="hidden",A&&A.visible===!1&&(C=!1);else if(w==="opacity")C=parseFloat(C),A&&typeof A.opacity<"u"&&(C*=A.opacity);else if(w==="textAnchor")C=C==="start"?"left":C==="end"?"right":"center";else if(w==="charSpacing")I=i(C,M)/M*1e3;else if(w==="paintFirst"){var Y=C.indexOf("fill"),U=C.indexOf("stroke"),C="fill";(Y>-1&&U>-1&&U<Y||Y===-1&&U>-1)&&(C="stroke")}else{if(w==="href"||w==="xlink:href"||w==="font")return C;if(w==="imageSmoothing")return C==="optimizeQuality";I=N?C.map(i):i(C,M)}}return!N&&isNaN(I)?C:I}function D(w){return new RegExp("^("+w.join("|")+")\\b","i")}function B(w){for(var C in g)if(!(typeof w[g[C]]>"u"||w[C]==="")){if(typeof w[C]>"u"){if(!n.Object.prototype[C])continue;w[C]=n.Object.prototype[C]}if(w[C].indexOf("url(")!==0){var A=new n.Color(w[C]);w[C]=A.setAlpha(t(A.getAlpha()*w[g[C]],2)).toRgba()}}return w}function z(w,C){var A,M=[],N,I,Y;for(I=0,Y=C.length;I<Y;I++)A=C[I],N=w.getElementsByTagName(A),M=M.concat(Array.prototype.slice.call(N));return M}n.parseTransformAttribute=(function(){function w(X,nt){var ot=n.util.cos(nt[0]),lt=n.util.sin(nt[0]),ut=0,ct=0;nt.length===3&&(ut=nt[1],ct=nt[2]),X[0]=ot,X[1]=lt,X[2]=-lt,X[3]=ot,X[4]=ut-(ot*ut-lt*ct),X[5]=ct-(lt*ut+ot*ct)}function C(X,nt){var ot=nt[0],lt=nt.length===2?nt[1]:nt[0];X[0]=ot,X[3]=lt}function A(X,nt,ot){X[ot]=Math.tan(n.util.degreesToRadians(nt[0]))}function M(X,nt){X[4]=nt[0],nt.length===2&&(X[5]=nt[1])}var N=n.iMatrix,I=n.reNum,Y=n.commaWsp,U="(?:(skewX)\\s*\\(\\s*("+I+")\\s*\\))",J="(?:(skewY)\\s*\\(\\s*("+I+")\\s*\\))",R="(?:(rotate)\\s*\\(\\s*("+I+")(?:"+Y+"("+I+")"+Y+"("+I+"))?\\s*\\))",k="(?:(scale)\\s*\\(\\s*("+I+")(?:"+Y+"("+I+"))?\\s*\\))",W="(?:(translate)\\s*\\(\\s*("+I+")(?:"+Y+"("+I+"))?\\s*\\))",V="(?:(matrix)\\s*\\(\\s*("+I+")"+Y+"("+I+")"+Y+"("+I+")"+Y+"("+I+")"+Y+"("+I+")"+Y+"("+I+")\\s*\\))",j="(?:"+V+"|"+W+"|"+k+"|"+R+"|"+U+"|"+J+")",H="(?:"+j+"(?:"+Y+"*"+j+")*)",$="^\\s*(?:"+H+"?)\\s*$",st=new RegExp($),rt=new RegExp(j,"g");return function(X){var nt=N.concat(),ot=[];if(!X||X&&!st.test(X))return nt;X.replace(rt,function(ut){var ct=new RegExp(j).exec(ut).filter(function(Bt){return!!Bt}),vt=ct[1],ft=ct.slice(2).map(parseFloat);switch(vt){case"translate":M(nt,ft);break;case"rotate":ft[0]=n.util.degreesToRadians(ft[0]),w(nt,ft);break;case"scale":C(nt,ft);break;case"skewX":A(nt,ft,2);break;case"skewY":A(nt,ft,1);break;case"matrix":nt=ft;break}ot.push(nt.concat()),nt=N.concat()});for(var lt=ot[0];ot.length>1;)ot.shift(),lt=n.util.multiplyTransformMatrices(lt,ot[0]);return lt}})();function G(w,C){var A,M;w.replace(/;\s*$/,"").split(";").forEach(function(N){var I=N.split(":");A=I[0].trim().toLowerCase(),M=I[1].trim(),C[A]=M})}function Q(w,C){var A,M;for(var N in w)typeof w[N]>"u"||(A=N.toLowerCase(),M=w[N],C[A]=M)}function Z(w,C){var A={};for(var M in n.cssRules[C])if(q(w,M.split(" ")))for(var N in n.cssRules[C][M])A[N]=n.cssRules[C][M][N];return A}function q(w,C){var A,M=!0;return A=tt(w,C.pop()),A&&C.length&&(M=K(w,C)),A&&M&&C.length===0}function K(w,C){for(var A,M=!0;w.parentNode&&w.parentNode.nodeType===1&&C.length;)M&&(A=C.pop()),w=w.parentNode,M=tt(w,A);return C.length===0}function tt(w,C){var A=w.nodeName,M=w.getAttribute("class"),N=w.getAttribute("id"),I,Y;if(I=new RegExp("^"+A,"i"),C=C.replace(I,""),N&&C.length&&(I=new RegExp("#"+N+"(?![a-zA-Z\\-]+)","i"),C=C.replace(I,"")),M&&C.length)for(M=M.split(" "),Y=M.length;Y--;)I=new RegExp("\\."+M[Y]+"(?![a-zA-Z\\-]+)","i"),C=C.replace(I,"");return C.length===0}function it(w,C){var A;if(w.getElementById&&(A=w.getElementById(C)),A)return A;var M,N,I,Y=w.getElementsByTagName("*");for(N=0,I=Y.length;N<I;N++)if(M=Y[N],C===M.getAttribute("id"))return M}function et(w){for(var C=z(w,["use","svg:use"]),A=0;C.length&&A<C.length;){var M=C[A],N=M.getAttribute("xlink:href")||M.getAttribute("href");if(N===null)return;var I=N.slice(1),Y=M.getAttribute("x")||0,U=M.getAttribute("y")||0,J=it(w,I).cloneNode(!0),R=(J.getAttribute("transform")||"")+" translate("+Y+", "+U+")",k,W=C.length,V,j,H,$,st=n.svgNS;if(E(J),/^svg$/i.test(J.nodeName)){var rt=J.ownerDocument.createElementNS(st,"g");for(j=0,H=J.attributes,$=H.length;j<$;j++)V=H.item(j),rt.setAttributeNS(st,V.nodeName,V.nodeValue);for(;J.firstChild;)rt.appendChild(J.firstChild);J=rt}for(j=0,H=M.attributes,$=H.length;j<$;j++)V=H.item(j),!(V.nodeName==="x"||V.nodeName==="y"||V.nodeName==="xlink:href"||V.nodeName==="href")&&(V.nodeName==="transform"?R=V.nodeValue+" "+R:J.setAttribute(V.nodeName,V.nodeValue));J.setAttribute("transform",R),J.setAttribute("instantiated_by_use","1"),J.removeAttribute("id"),k=M.parentNode,k.replaceChild(J,M),C.length===W&&A++}}var y=new RegExp("^\\s*("+n.reNum+"+)\\s*,?\\s*("+n.reNum+"+)\\s*,?\\s*("+n.reNum+"+)\\s*,?\\s*("+n.reNum+"+)\\s*$");function E(w){if(!n.svgViewBoxElementsRegEx.test(w.nodeName))return{};var C=w.getAttribute("viewBox"),A=1,M=1,N=0,I=0,Y,U,J,R,k=w.getAttribute("width"),W=w.getAttribute("height"),V=w.getAttribute("x")||0,j=w.getAttribute("y")||0,H=w.getAttribute("preserveAspectRatio")||"",$=!C||!(C=C.match(y)),st=!k||!W||k==="100%"||W==="100%",rt=$&&st,X={},nt="",ot=0,lt=0;if(X.width=0,X.height=0,X.toBeParsed=rt,$&&(V||j)&&w.parentNode&&w.parentNode.nodeName!=="#document"&&(nt=" translate("+i(V)+" "+i(j)+") ",J=(w.getAttribute("transform")||"")+nt,w.setAttribute("transform",J),w.removeAttribute("x"),w.removeAttribute("y")),rt)return X;if($)return X.width=i(k),X.height=i(W),X;if(N=-parseFloat(C[1]),I=-parseFloat(C[2]),Y=parseFloat(C[3]),U=parseFloat(C[4]),X.minX=N,X.minY=I,X.viewBoxWidth=Y,X.viewBoxHeight=U,st?(X.width=Y,X.height=U):(X.width=i(k),X.height=i(W),A=X.width/Y,M=X.height/U),H=n.util.parsePreserveAspectRatioAttribute(H),H.alignX!=="none"&&(H.meetOrSlice==="meet"&&(M=A=A>M?M:A),H.meetOrSlice==="slice"&&(M=A=A>M?A:M),ot=X.width-Y*A,lt=X.height-U*A,H.alignX==="Mid"&&(ot/=2),H.alignY==="Mid"&&(lt/=2),H.alignX==="Min"&&(ot=0),H.alignY==="Min"&&(lt=0)),A===1&&M===1&&N===0&&I===0&&V===0&&j===0)return X;if((V||j)&&w.parentNode.nodeName!=="#document"&&(nt=" translate("+i(V)+" "+i(j)+") "),J=nt+" matrix("+A+" 0 0 "+M+" "+(N*A+ot)+" "+(I*M+lt)+") ",w.nodeName==="svg"){for(R=w.ownerDocument.createElementNS(n.svgNS,"g");w.firstChild;)R.appendChild(w.firstChild);w.appendChild(R)}else R=w,R.removeAttribute("x"),R.removeAttribute("y"),J=R.getAttribute("transform")+J;return R.setAttribute("transform",J),X}function P(w,C){for(;w&&(w=w.parentNode);)if(w.nodeName&&C.test(w.nodeName.replace("svg:",""))&&!w.getAttribute("instantiated_by_use"))return!0;return!1}n.parseSVGDocument=function(w,C,A,M){if(w){et(w);var N=n.Object.__uid++,I,Y,U=E(w),J=n.util.toArray(w.getElementsByTagName("*"));if(U.crossOrigin=M&&M.crossOrigin,U.svgUid=N,J.length===0&&n.isLikelyNode){J=w.selectNodes('//*[name(.)!="svg"]');var R=[];for(I=0,Y=J.length;I<Y;I++)R[I]=J[I];J=R}var k=J.filter(function(V){return E(V),n.svgValidTagNamesRegEx.test(V.nodeName.replace("svg:",""))&&!P(V,n.svgInvalidAncestorsRegEx)});if(!k||k&&!k.length){C&&C([],{});return}var W={};J.filter(function(V){return V.nodeName.replace("svg:","")==="clipPath"}).forEach(function(V){var j=V.getAttribute("id");W[j]=n.util.toArray(V.getElementsByTagName("*")).filter(function(H){return n.svgValidTagNamesRegEx.test(H.nodeName.replace("svg:",""))})}),n.gradientDefs[N]=n.getGradientDefs(w),n.cssRules[N]=n.getCSSRules(w),n.clipPaths[N]=W,n.parseElements(k,function(V,j){C&&(C(V,U,j,J),delete n.gradientDefs[N],delete n.cssRules[N],delete n.clipPaths[N])},a(U),A,M)}};function O(w,C){var A=["gradientTransform","x1","x2","y1","y2","gradientUnits","cx","cy","r","fx","fy"],M="xlink:href",N=C.getAttribute(M).slice(1),I=it(w,N);if(I&&I.getAttribute(M)&&O(w,I),A.forEach(function(U){I&&!C.hasAttribute(U)&&I.hasAttribute(U)&&C.setAttribute(U,I.getAttribute(U))}),!C.children.length)for(var Y=I.cloneNode(!0);Y.firstChild;)C.appendChild(Y.firstChild);C.removeAttribute(M)}var L=new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*("+n.reNum+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+n.reNum+"))?\\s+(.*)");l(n,{parseFontDeclaration:function(w,C){var A=w.match(L);if(A){var M=A[1],N=A[3],I=A[4],Y=A[5],U=A[6];M&&(C.fontStyle=M),N&&(C.fontWeight=isNaN(parseFloat(N))?N:parseFloat(N)),I&&(C.fontSize=i(I)),U&&(C.fontFamily=U),Y&&(C.lineHeight=Y==="normal"?1:Y)}},getGradientDefs:function(w){var C=["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"],A=z(w,C),M,N=0,I={};for(N=A.length;N--;)M=A[N],M.getAttribute("xlink:href")&&O(w,M),I[M.getAttribute("id")]=M;return I},parseAttributes:function(w,C,A){if(w){var M,N={},I,Y;typeof A>"u"&&(A=w.getAttribute("svgUid")),w.parentNode&&n.svgValidParentsRegEx.test(w.parentNode.nodeName)&&(N=n.parseAttributes(w.parentNode,C,A));var U=C.reduce(function(H,$){return M=w.getAttribute($),M&&(H[$]=M),H},{}),J=l(Z(w,A),n.parseStyleAttribute(w));U=l(U,J),J[v]&&w.setAttribute(v,J[v]),I=Y=N.fontSize||n.Text.DEFAULT_SVG_FONT_SIZE,U[p]&&(U[p]=I=i(U[p],Y));var R,k,W={};for(var V in U)R=_(V),k=x(R,U[V],N,I),W[R]=k;W&&W.font&&n.parseFontDeclaration(W.font,W);var j=l(N,W);return n.svgValidParentsRegEx.test(w.nodeName)?j:B(j)}},parseElements:function(w,C,A,M,N){new n.ElementsParser(w,C,A,M,N).parse()},parseStyleAttribute:function(w){var C={},A=w.getAttribute("style");return A&&(typeof A=="string"?G(A,C):Q(A,C)),C},parsePointsAttribute:function(w){if(!w)return null;w=w.replace(/,/g," ").trim(),w=w.split(/\s+/);var C=[],A,M;for(A=0,M=w.length;A<M;A+=2)C.push({x:parseFloat(w[A]),y:parseFloat(w[A+1])});return C},getCSSRules:function(w){var C=w.getElementsByTagName("style"),A,M,N={},I;for(A=0,M=C.length;A<M;A++){var Y=C[A].textContent;Y=Y.replace(/\/\*[\s\S]*?\*\//g,""),Y.trim()!==""&&(I=Y.split("}"),I=I.filter(function(U){return U.trim()}),I.forEach(function(U){var J=U.split("{"),R={},k=J[1].trim(),W=k.split(";").filter(function($){return $.trim()});for(A=0,M=W.length;A<M;A++){var V=W[A].split(":"),j=V[0].trim(),H=V[1].trim();R[j]=H}U=J[0].trim(),U.split(",").forEach(function($){$=$.replace(/^svg/i,"").trim(),$!==""&&(N[$]?n.util.object.extend(N[$],R):N[$]=n.util.object.clone(R))})}))}return N},loadSVGFromURL:function(w,C,A,M){w=w.replace(/^\n\s*/,"").trim(),new n.util.request(w,{method:"get",onComplete:N});function N(I){var Y=I.responseXML;if(!Y||!Y.documentElement)return C&&C(null),!1;n.parseSVGDocument(Y.documentElement,function(U,J,R,k){C&&C(U,J,R,k)},A,M)}},loadSVGFromString:function(w,C,A,M){var N=new n.window.DOMParser,I=N.parseFromString(w.trim(),"text/xml");n.parseSVGDocument(I.documentElement,function(Y,U,J,R){C(Y,U,J,R)},A,M)}})})(d),o.ElementsParser=function(u,n,l,a,t,i){this.elements=u,this.callback=n,this.options=l,this.reviver=a,this.svgUid=l&&l.svgUid||0,this.parsingOptions=t,this.regexUrl=/^url\(['"]?#([^'"]+)['"]?\)/g,this.doc=i},(function(u){u.parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},u.createObjects=function(){var n=this;this.elements.forEach(function(l,a){l.setAttribute("svgUid",n.svgUid),n.createObject(l,a)})},u.findTag=function(n){return o[o.util.string.capitalize(n.tagName.replace("svg:",""))]},u.createObject=function(n,l){var a=this.findTag(n);if(a&&a.fromElement)try{a.fromElement(n,this.createCallback(l,n),this.options)}catch(t){o.log(t)}else this.checkIfDone()},u.createCallback=function(n,l){var a=this;return function(t){var i;a.resolveGradient(t,l,"fill"),a.resolveGradient(t,l,"stroke"),t instanceof o.Image&&t._originalElement&&(i=t.parsePreserveAspectRatioAttribute(l)),t._removeTransformMatrix(i),a.resolveClipPath(t,l),a.reviver&&a.reviver(l,t),a.instances[n]=t,a.checkIfDone()}},u.extractPropertyDefinition=function(n,l,a){var t=n[l],i=this.regexUrl;if(i.test(t)){i.lastIndex=0;var e=i.exec(t)[1];return i.lastIndex=0,o[a][this.svgUid][e]}},u.resolveGradient=function(n,l,a){var t=this.extractPropertyDefinition(n,a,"gradientDefs");if(t){var i=l.getAttribute(a+"-opacity"),e=o.Gradient.fromElement(t,n,i,this.options);n.set(a,e)}},u.createClipPathCallback=function(n,l){return function(a){a._removeTransformMatrix(),a.fillRule=a.clipRule,l.push(a)}},u.resolveClipPath=function(n,l){var a=this.extractPropertyDefinition(n,"clipPath","clipPaths"),t,i,e,s,h,r;if(a){s=[],e=o.util.invertTransform(n.calcTransformMatrix());for(var c=a[0].parentNode,f=l;f.parentNode&&f.getAttribute("clip-path")!==n.clipPath;)f=f.parentNode;f.parentNode.appendChild(c);for(var g=0;g<a.length;g++)t=a[g],i=this.findTag(t),i.fromElement(t,this.createClipPathCallback(n,s),this.options);s.length===1?a=s[0]:a=new o.Group(s),h=o.util.multiplyTransformMatrices(e,a.calcTransformMatrix()),a.clipPath&&this.resolveClipPath(a,f);var r=o.util.qrDecompose(h);a.flipX=!1,a.flipY=!1,a.set("scaleX",r.scaleX),a.set("scaleY",r.scaleY),a.angle=r.angle,a.skewX=r.skewX,a.skewY=0,a.setPositionByOrigin({x:r.translateX,y:r.translateY},"center","center"),n.clipPath=a}else delete n.clipPath},u.checkIfDone=function(){--this.numElements===0&&(this.instances=this.instances.filter(function(n){return n!=null}),this.callback(this.instances,this.elements))}})(o.ElementsParser.prototype),(function(u){var n=u.fabric||(u.fabric={});if(n.Point){n.warn("fabric.Point is already defined");return}n.Point=l;function l(a,t){this.x=a,this.y=t}l.prototype={type:"point",constructor:l,add:function(a){return new l(this.x+a.x,this.y+a.y)},addEquals:function(a){return this.x+=a.x,this.y+=a.y,this},scalarAdd:function(a){return new l(this.x+a,this.y+a)},scalarAddEquals:function(a){return this.x+=a,this.y+=a,this},subtract:function(a){return new l(this.x-a.x,this.y-a.y)},subtractEquals:function(a){return this.x-=a.x,this.y-=a.y,this},scalarSubtract:function(a){return new l(this.x-a,this.y-a)},scalarSubtractEquals:function(a){return this.x-=a,this.y-=a,this},multiply:function(a){return new l(this.x*a,this.y*a)},multiplyEquals:function(a){return this.x*=a,this.y*=a,this},divide:function(a){return new l(this.x/a,this.y/a)},divideEquals:function(a){return this.x/=a,this.y/=a,this},eq:function(a){return this.x===a.x&&this.y===a.y},lt:function(a){return this.x<a.x&&this.y<a.y},lte:function(a){return this.x<=a.x&&this.y<=a.y},gt:function(a){return this.x>a.x&&this.y>a.y},gte:function(a){return this.x>=a.x&&this.y>=a.y},lerp:function(a,t){return typeof t>"u"&&(t=.5),t=Math.max(Math.min(1,t),0),new l(this.x+(a.x-this.x)*t,this.y+(a.y-this.y)*t)},distanceFrom:function(a){var t=this.x-a.x,i=this.y-a.y;return Math.sqrt(t*t+i*i)},midPointFrom:function(a){return this.lerp(a)},min:function(a){return new l(Math.min(this.x,a.x),Math.min(this.y,a.y))},max:function(a){return new l(Math.max(this.x,a.x),Math.max(this.y,a.y))},toString:function(){return this.x+","+this.y},setXY:function(a,t){return this.x=a,this.y=t,this},setX:function(a){return this.x=a,this},setY:function(a){return this.y=a,this},setFromPoint:function(a){return this.x=a.x,this.y=a.y,this},swap:function(a){var t=this.x,i=this.y;this.x=a.x,this.y=a.y,a.x=t,a.y=i},clone:function(){return new l(this.x,this.y)}}})(d),(function(u){var n=u.fabric||(u.fabric={});if(n.Intersection){n.warn("fabric.Intersection is already defined");return}function l(a){this.status=a,this.points=[]}n.Intersection=l,n.Intersection.prototype={constructor:l,appendPoint:function(a){return this.points.push(a),this},appendPoints:function(a){return this.points=this.points.concat(a),this}},n.Intersection.intersectLineLine=function(a,t,i,e){var s,h=(e.x-i.x)*(a.y-i.y)-(e.y-i.y)*(a.x-i.x),r=(t.x-a.x)*(a.y-i.y)-(t.y-a.y)*(a.x-i.x),c=(e.y-i.y)*(t.x-a.x)-(e.x-i.x)*(t.y-a.y);if(c!==0){var f=h/c,g=r/c;0<=f&&f<=1&&0<=g&&g<=1?(s=new l("Intersection"),s.appendPoint(new n.Point(a.x+f*(t.x-a.x),a.y+f*(t.y-a.y)))):s=new l}else h===0||r===0?s=new l("Coincident"):s=new l("Parallel");return s},n.Intersection.intersectLinePolygon=function(a,t,i){var e=new l,s=i.length,h,r,c,f;for(f=0;f<s;f++)h=i[f],r=i[(f+1)%s],c=l.intersectLineLine(a,t,h,r),e.appendPoints(c.points);return e.points.length>0&&(e.status="Intersection"),e},n.Intersection.intersectPolygonPolygon=function(a,t){var i=new l,e=a.length,s;for(s=0;s<e;s++){var h=a[s],r=a[(s+1)%e],c=l.intersectLinePolygon(h,r,t);i.appendPoints(c.points)}return i.points.length>0&&(i.status="Intersection"),i},n.Intersection.intersectPolygonRectangle=function(a,t,i){var e=t.min(i),s=t.max(i),h=new n.Point(s.x,e.y),r=new n.Point(e.x,s.y),c=l.intersectLinePolygon(e,h,a),f=l.intersectLinePolygon(h,s,a),g=l.intersectLinePolygon(s,r,a),p=l.intersectLinePolygon(r,e,a),v=new l;return v.appendPoints(c.points),v.appendPoints(f.points),v.appendPoints(g.points),v.appendPoints(p.points),v.points.length>0&&(v.status="Intersection"),v}})(d),(function(u){var n=u.fabric||(u.fabric={});if(n.Color){n.warn("fabric.Color is already defined.");return}function l(t){t?this._tryParsingColor(t):this.setSource([0,0,0,1])}n.Color=l,n.Color.prototype={_tryParsingColor:function(t){var i;t in l.colorNameMap&&(t=l.colorNameMap[t]),t==="transparent"&&(i=[255,255,255,0]),i||(i=l.sourceFromHex(t)),i||(i=l.sourceFromRgb(t)),i||(i=l.sourceFromHsl(t)),i||(i=[0,0,0,1]),i&&this.setSource(i)},_rgbToHsl:function(t,i,e){t/=255,i/=255,e/=255;var s,h,r,c=n.util.array.max([t,i,e]),f=n.util.array.min([t,i,e]);if(r=(c+f)/2,c===f)s=h=0;else{var g=c-f;switch(h=r>.5?g/(2-c-f):g/(c+f),c){case t:s=(i-e)/g+(i<e?6:0);break;case i:s=(e-t)/g+2;break;case e:s=(t-i)/g+4;break}s/=6}return[Math.round(s*360),Math.round(h*100),Math.round(r*100)]},getSource:function(){return this._source},setSource:function(t){this._source=t},toRgb:function(){var t=this.getSource();return"rgb("+t[0]+","+t[1]+","+t[2]+")"},toRgba:function(){var t=this.getSource();return"rgba("+t[0]+","+t[1]+","+t[2]+","+t[3]+")"},toHsl:function(){var t=this.getSource(),i=this._rgbToHsl(t[0],t[1],t[2]);return"hsl("+i[0]+","+i[1]+"%,"+i[2]+"%)"},toHsla:function(){var t=this.getSource(),i=this._rgbToHsl(t[0],t[1],t[2]);return"hsla("+i[0]+","+i[1]+"%,"+i[2]+"%,"+t[3]+")"},toHex:function(){var t=this.getSource(),i,e,s;return i=t[0].toString(16),i=i.length===1?"0"+i:i,e=t[1].toString(16),e=e.length===1?"0"+e:e,s=t[2].toString(16),s=s.length===1?"0"+s:s,i.toUpperCase()+e.toUpperCase()+s.toUpperCase()},toHexa:function(){var t=this.getSource(),i;return i=Math.round(t[3]*255),i=i.toString(16),i=i.length===1?"0"+i:i,this.toHex()+i.toUpperCase()},getAlpha:function(){return this.getSource()[3]},setAlpha:function(t){var i=this.getSource();return i[3]=t,this.setSource(i),this},toGrayscale:function(){var t=this.getSource(),i=parseInt((t[0]*.3+t[1]*.59+t[2]*.11).toFixed(0),10),e=t[3];return this.setSource([i,i,i,e]),this},toBlackWhite:function(t){var i=this.getSource(),e=(i[0]*.3+i[1]*.59+i[2]*.11).toFixed(0),s=i[3];return t=t||127,e=Number(e)<Number(t)?0:255,this.setSource([e,e,e,s]),this},overlayWith:function(t){t instanceof l||(t=new l(t));var i=[],e=this.getAlpha(),s=.5,h=this.getSource(),r=t.getSource(),c;for(c=0;c<3;c++)i.push(Math.round(h[c]*(1-s)+r[c]*s));return i[3]=e,this.setSource(i),this}},n.Color.reRGBa=/^rgba?\(\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*,\s*(\d{1,3}(?:\.\d+)?\%?)\s*(?:\s*,\s*((?:\d*\.?\d+)?)\s*)?\)$/i,n.Color.reHSLa=/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i,n.Color.reHex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,n.Color.colorNameMap={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};function a(t,i,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+(i-t)*6*e:e<1/2?i:e<2/3?t+(i-t)*(2/3-e)*6:t}n.Color.fromRgb=function(t){return l.fromSource(l.sourceFromRgb(t))},n.Color.sourceFromRgb=function(t){var i=t.match(l.reRGBa);if(i){var e=parseInt(i[1],10)/(/%$/.test(i[1])?100:1)*(/%$/.test(i[1])?255:1),s=parseInt(i[2],10)/(/%$/.test(i[2])?100:1)*(/%$/.test(i[2])?255:1),h=parseInt(i[3],10)/(/%$/.test(i[3])?100:1)*(/%$/.test(i[3])?255:1);return[parseInt(e,10),parseInt(s,10),parseInt(h,10),i[4]?parseFloat(i[4]):1]}},n.Color.fromRgba=l.fromRgb,n.Color.fromHsl=function(t){return l.fromSource(l.sourceFromHsl(t))},n.Color.sourceFromHsl=function(t){var i=t.match(l.reHSLa);if(i){var e=(parseFloat(i[1])%360+360)%360/360,s=parseFloat(i[2])/(/%$/.test(i[2])?100:1),h=parseFloat(i[3])/(/%$/.test(i[3])?100:1),r,c,f;if(s===0)r=c=f=h;else{var g=h<=.5?h*(s+1):h+s-h*s,p=h*2-g;r=a(p,g,e+1/3),c=a(p,g,e),f=a(p,g,e-1/3)}return[Math.round(r*255),Math.round(c*255),Math.round(f*255),i[4]?parseFloat(i[4]):1]}},n.Color.fromHsla=l.fromHsl,n.Color.fromHex=function(t){return l.fromSource(l.sourceFromHex(t))},n.Color.sourceFromHex=function(t){if(t.match(l.reHex)){var i=t.slice(t.indexOf("#")+1),e=i.length===3||i.length===4,s=i.length===8||i.length===4,h=e?i.charAt(0)+i.charAt(0):i.substring(0,2),r=e?i.charAt(1)+i.charAt(1):i.substring(2,4),c=e?i.charAt(2)+i.charAt(2):i.substring(4,6),f=s?e?i.charAt(3)+i.charAt(3):i.substring(6,8):"FF";return[parseInt(h,16),parseInt(r,16),parseInt(c,16),parseFloat((parseInt(f,16)/255).toFixed(2))]}},n.Color.fromSource=function(t){var i=new l;return i.setSource(t),i}})(d),(function(u){var n=u.fabric||(u.fabric={}),l=["e","se","s","sw","w","nw","n","ne","e"],a=["ns","nesw","ew","nwse"],t={},i="left",e="top",s="right",h="bottom",r="center",c={top:h,bottom:e,left:s,right:i,center:r},f=n.util.radiansToDegrees,g=Math.sign||function(R){return(R>0)-(R<0)||+R};function p(R,k){var W=R.angle+f(Math.atan2(k.y,k.x))+360;return Math.round(W%360/45)}function v(R,k){var W=k.transform.target,V=W.canvas,j=n.util.object.clone(k);j.target=W,V&&V.fire("object:"+R,j),W.fire(R,k)}function _(R,k){var W=k.canvas,V=W.uniScaleKey,j=R[V];return W.uniformScaling&&!j||!W.uniformScaling&&j}function x(R){return R.originX===r&&R.originY===r}function D(R,k,W){var V=R.lockScalingX,j=R.lockScalingY;return!!(V&&j||!k&&(V||j)&&W||V&&k==="x"||j&&k==="y")}function B(R,k,W){var V="not-allowed",j=_(R,W),H="";if(k.x!==0&&k.y===0?H="x":k.x===0&&k.y!==0&&(H="y"),D(W,H,j))return V;var $=p(W,k);return l[$]+"-resize"}function z(R,k,W){var V="not-allowed";if(k.x!==0&&W.lockSkewingY||k.y!==0&&W.lockSkewingX)return V;var j=p(W,k)%4;return a[j]+"-resize"}function G(R,k,W){return R[W.canvas.altActionKey]?t.skewCursorStyleHandler(R,k,W):t.scaleCursorStyleHandler(R,k,W)}function Q(R,k,W){var V=R[W.canvas.altActionKey];if(k.x===0)return V?"skewX":"scaleY";if(k.y===0)return V?"skewY":"scaleX"}function Z(R,k,W){return W.lockRotation?"not-allowed":k.cursorStyle}function q(R,k,W,V){return{e:R,transform:k,pointer:{x:W,y:V}}}function K(R){return function(k,W,V,j){var H=W.target,$=H.getCenterPoint(),st=H.translateToOriginPoint($,W.originX,W.originY),rt=R(k,W,V,j);return H.setPositionByOrigin(st,W.originX,W.originY),rt}}function tt(R,k){return function(W,V,j,H){var $=k(W,V,j,H);return $&&v(R,q(W,V,j,H)),$}}function it(R,k,W,V,j){var H=R.target,$=H.controls[R.corner],st=H.canvas.getZoom(),rt=H.padding/st,X=H.toLocalPoint(new n.Point(V,j),k,W);return X.x>=rt&&(X.x-=rt),X.x<=-rt&&(X.x+=rt),X.y>=rt&&(X.y-=rt),X.y<=rt&&(X.y+=rt),X.x-=$.offsetX,X.y-=$.offsetY,X}function et(R){return R.flipX!==R.flipY}function y(R,k,W,V,j){if(R[k]!==0){var H=R._getTransformedDimensions()[V],$=j/H*R[W];R.set(W,$)}}function E(R,k,W,V){var j=k.target,H=j._getTransformedDimensions(0,j.skewY),$=it(k,k.originX,k.originY,W,V),st=Math.abs($.x*2)-H.x,rt=j.skewX,X;st<2?X=0:(X=f(Math.atan2(st/j.scaleX,H.y/j.scaleY)),k.originX===i&&k.originY===h&&(X=-X),k.originX===s&&k.originY===e&&(X=-X),et(j)&&(X=-X));var nt=rt!==X;if(nt){var ot=j._getTransformedDimensions().y;j.set("skewX",X),y(j,"skewY","scaleY","y",ot)}return nt}function P(R,k,W,V){var j=k.target,H=j._getTransformedDimensions(j.skewX,0),$=it(k,k.originX,k.originY,W,V),st=Math.abs($.y*2)-H.y,rt=j.skewY,X;st<2?X=0:(X=f(Math.atan2(st/j.scaleY,H.x/j.scaleX)),k.originX===i&&k.originY===h&&(X=-X),k.originX===s&&k.originY===e&&(X=-X),et(j)&&(X=-X));var nt=rt!==X;if(nt){var ot=j._getTransformedDimensions().x;j.set("skewY",X),y(j,"skewX","scaleX","x",ot)}return nt}function O(R,k,W,V){var j=k.target,H=j.skewX,$,st=k.originY;if(j.lockSkewingX)return!1;if(H===0){var rt=it(k,r,r,W,V);rt.x>0?$=i:$=s}else H>0&&($=st===e?i:s),H<0&&($=st===e?s:i),et(j)&&($=$===i?s:i);k.originX=$;var X=tt("skewing",K(E));return X(R,k,W,V)}function L(R,k,W,V){var j=k.target,H=j.skewY,$,st=k.originX;if(j.lockSkewingY)return!1;if(H===0){var rt=it(k,r,r,W,V);rt.y>0?$=e:$=h}else H>0&&($=st===i?e:h),H<0&&($=st===i?h:e),et(j)&&($=$===e?h:e);k.originY=$;var X=tt("skewing",K(P));return X(R,k,W,V)}function w(R,k,W,V){var j=k,H=j.target,$=H.translateToOriginPoint(H.getCenterPoint(),j.originX,j.originY);if(H.lockRotation)return!1;var st=Math.atan2(j.ey-$.y,j.ex-$.x),rt=Math.atan2(V-$.y,W-$.x),X=f(rt-st+j.theta),nt=!0;if(H.snapAngle>0){var ot=H.snapAngle,lt=H.snapThreshold||ot,ut=Math.ceil(X/ot)*ot,ct=Math.floor(X/ot)*ot;Math.abs(X-ct)<lt?X=ct:Math.abs(X-ut)<lt&&(X=ut)}return X<0&&(X=360+X),X%=360,nt=H.angle!==X,H.angle=X,nt}function C(R,k,W,V,j){j=j||{};var H=k.target,$=H.lockScalingX,st=H.lockScalingY,rt=j.by,X,nt,ot,lt,ut=_(R,H),ct=D(H,rt,ut),vt,ft,Bt=k.gestureScale;if(ct)return!1;if(Bt)nt=k.scaleX*Bt,ot=k.scaleY*Bt;else{if(X=it(k,k.originX,k.originY,W,V),vt=rt!=="y"?g(X.x):1,ft=rt!=="x"?g(X.y):1,k.signX||(k.signX=vt),k.signY||(k.signY=ft),H.lockScalingFlip&&(k.signX!==vt||k.signY!==ft))return!1;if(lt=H._getTransformedDimensions(),ut&&!rt){var Qt=Math.abs(X.x)+Math.abs(X.y),wt=k.original,Zi=Math.abs(lt.x*wt.scaleX/H.scaleX)+Math.abs(lt.y*wt.scaleY/H.scaleY),ai=Qt/Zi;nt=wt.scaleX*ai,ot=wt.scaleY*ai}else nt=Math.abs(X.x*H.scaleX/lt.x),ot=Math.abs(X.y*H.scaleY/lt.y);x(k)&&(nt*=2,ot*=2),k.signX!==vt&&rt!=="y"&&(k.originX=c[k.originX],nt*=-1,k.signX=vt),k.signY!==ft&&rt!=="x"&&(k.originY=c[k.originY],ot*=-1,k.signY=ft)}var tr=H.scaleX,er=H.scaleY;return rt?(rt==="x"&&H.set("scaleX",nt),rt==="y"&&H.set("scaleY",ot)):(!$&&H.set("scaleX",nt),!st&&H.set("scaleY",ot)),tr!==H.scaleX||er!==H.scaleY}function A(R,k,W,V){return C(R,k,W,V)}function M(R,k,W,V){return C(R,k,W,V,{by:"x"})}function N(R,k,W,V){return C(R,k,W,V,{by:"y"})}function I(R,k,W,V){return R[k.target.canvas.altActionKey]?t.skewHandlerX(R,k,W,V):t.scalingY(R,k,W,V)}function Y(R,k,W,V){return R[k.target.canvas.altActionKey]?t.skewHandlerY(R,k,W,V):t.scalingX(R,k,W,V)}function U(R,k,W,V){var j=k.target,H=it(k,k.originX,k.originY,W,V),$=j.strokeWidth/(j.strokeUniform?j.scaleX:1),st=x(k)?2:1,rt=j.width,X=Math.abs(H.x*st/j.scaleX)-$;return j.set("width",Math.max(X,0)),rt!==X}function J(R,k,W,V){var j=k.target,H=W-k.offsetX,$=V-k.offsetY,st=!j.get("lockMovementX")&&j.left!==H,rt=!j.get("lockMovementY")&&j.top!==$;return st&&j.set("left",H),rt&&j.set("top",$),(st||rt)&&v("moving",q(R,k,W,V)),st||rt}t.scaleCursorStyleHandler=B,t.skewCursorStyleHandler=z,t.scaleSkewCursorStyleHandler=G,t.rotationWithSnapping=tt("rotating",K(w)),t.scalingEqually=tt("scaling",K(A)),t.scalingX=tt("scaling",K(M)),t.scalingY=tt("scaling",K(N)),t.scalingYOrSkewingX=I,t.scalingXOrSkewingY=Y,t.changeWidth=tt("resizing",K(U)),t.skewHandlerX=O,t.skewHandlerY=L,t.dragHandler=J,t.scaleOrSkewActionName=Q,t.rotationStyleHandler=Z,t.fireEvent=v,t.wrapWithFixedAnchor=K,t.wrapWithFireEvent=tt,t.getLocalPoint=it,n.controlsUtils=t})(d),(function(u){var n=u.fabric||(u.fabric={}),l=n.util.degreesToRadians,a=n.controlsUtils;function t(e,s,h,r,c){r=r||{};var f=this.sizeX||r.cornerSize||c.cornerSize,g=this.sizeY||r.cornerSize||c.cornerSize,p=typeof r.transparentCorners<"u"?r.transparentCorners:c.transparentCorners,v=p?"stroke":"fill",_=!p&&(r.cornerStrokeColor||c.cornerStrokeColor),x=s,D=h,B;e.save(),e.fillStyle=r.cornerColor||c.cornerColor,e.strokeStyle=r.cornerStrokeColor||c.cornerStrokeColor,f>g?(B=f,e.scale(1,g/f),D=h*f/g):g>f?(B=g,e.scale(f/g,1),x=s*g/f):B=f,e.lineWidth=1,e.beginPath(),e.arc(x,D,B/2,0,2*Math.PI,!1),e[v](),_&&e.stroke(),e.restore()}function i(e,s,h,r,c){r=r||{};var f=this.sizeX||r.cornerSize||c.cornerSize,g=this.sizeY||r.cornerSize||c.cornerSize,p=typeof r.transparentCorners<"u"?r.transparentCorners:c.transparentCorners,v=p?"stroke":"fill",_=!p&&(r.cornerStrokeColor||c.cornerStrokeColor),x=f/2,D=g/2;e.save(),e.fillStyle=r.cornerColor||c.cornerColor,e.strokeStyle=r.cornerStrokeColor||c.cornerStrokeColor,e.lineWidth=1,e.translate(s,h),e.rotate(l(c.angle)),e[v+"Rect"](-x,-D,f,g),_&&e.strokeRect(-x,-D,f,g),e.restore()}a.renderCircleControl=t,a.renderSquareControl=i})(d),(function(u){var n=u.fabric||(u.fabric={});function l(a){for(var t in a)this[t]=a[t]}n.Control=l,n.Control.prototype={visible:!0,actionName:"scale",angle:0,x:0,y:0,offsetX:0,offsetY:0,sizeX:null,sizeY:null,touchSizeX:null,touchSizeY:null,cursorStyle:"crosshair",withConnection:!1,actionHandler:function(){},mouseDownHandler:function(){},mouseUpHandler:function(){},getActionHandler:function(){return this.actionHandler},getMouseDownHandler:function(){return this.mouseDownHandler},getMouseUpHandler:function(){return this.mouseUpHandler},cursorStyleHandler:function(a,t){return t.cursorStyle},getActionName:function(a,t){return t.actionName},getVisibility:function(a,t){var i=a._controlsVisibility;return i&&typeof i[t]<"u"?i[t]:this.visible},setVisibility:function(a){this.visible=a},positionHandler:function(a,t){var i=n.util.transformPoint({x:this.x*a.x+this.offsetX,y:this.y*a.y+this.offsetY},t);return i},calcCornerCoords:function(a,t,i,e,s){var h,r,c,f,g=s?this.touchSizeX:this.sizeX,p=s?this.touchSizeY:this.sizeY;if(g&&p&&g!==p){var v=Math.atan2(p,g),_=Math.sqrt(g*g+p*p)/2,x=v-n.util.degreesToRadians(a),D=Math.PI/2-v-n.util.degreesToRadians(a);h=_*n.util.cos(x),r=_*n.util.sin(x),c=_*n.util.cos(D),f=_*n.util.sin(D)}else{var B=g&&p?g:t;_=B*.7071067812;var x=n.util.degreesToRadians(45-a);h=c=_*n.util.cos(x),r=f=_*n.util.sin(x)}return{tl:{x:i-f,y:e-c},tr:{x:i+h,y:e-r},bl:{x:i-h,y:e+r},br:{x:i+f,y:e+c}}},render:function(a,t,i,e,s){switch(e=e||{},e.cornerStyle||s.cornerStyle){case"circle":n.controlsUtils.renderCircleControl.call(this,a,t,i,e,s);break;default:n.controlsUtils.renderSquareControl.call(this,a,t,i,e,s)}}}})(d),(function(){function u(i,e){var s=i.getAttribute("style"),h=i.getAttribute("offset")||0,r,c,f,g;if(h=parseFloat(h)/(/%$/.test(h)?100:1),h=h<0?0:h>1?1:h,s){var p=s.split(/\s*;\s*/);for(p[p.length-1]===""&&p.pop(),g=p.length;g--;){var v=p[g].split(/\s*:\s*/),_=v[0].trim(),x=v[1].trim();_==="stop-color"?r=x:_==="stop-opacity"&&(f=x)}}return r||(r=i.getAttribute("stop-color")||"rgb(0,0,0)"),f||(f=i.getAttribute("stop-opacity")),r=new o.Color(r),c=r.getAlpha(),f=isNaN(parseFloat(f))?1:parseFloat(f),f*=c*e,{offset:h,color:r.toRgb(),opacity:f}}function n(i){return{x1:i.getAttribute("x1")||0,y1:i.getAttribute("y1")||0,x2:i.getAttribute("x2")||"100%",y2:i.getAttribute("y2")||0}}function l(i){return{x1:i.getAttribute("fx")||i.getAttribute("cx")||"50%",y1:i.getAttribute("fy")||i.getAttribute("cy")||"50%",r1:0,x2:i.getAttribute("cx")||"50%",y2:i.getAttribute("cy")||"50%",r2:i.getAttribute("r")||"50%"}}var a=o.util.object.clone;o.Gradient=o.util.createClass({offsetX:0,offsetY:0,gradientTransform:null,gradientUnits:"pixels",type:"linear",initialize:function(i){i||(i={}),i.coords||(i.coords={});var e,s=this;Object.keys(i).forEach(function(h){s[h]=i[h]}),this.id?this.id+="_"+o.Object.__uid++:this.id=o.Object.__uid++,e={x1:i.coords.x1||0,y1:i.coords.y1||0,x2:i.coords.x2||0,y2:i.coords.y2||0},this.type==="radial"&&(e.r1=i.coords.r1||0,e.r2=i.coords.r2||0),this.coords=e,this.colorStops=i.colorStops.slice()},addColorStop:function(i){for(var e in i){var s=new o.Color(i[e]);this.colorStops.push({offset:parseFloat(e),color:s.toRgb(),opacity:s.getAlpha()})}return this},toObject:function(i){var e={type:this.type,coords:this.coords,colorStops:this.colorStops,offsetX:this.offsetX,offsetY:this.offsetY,gradientUnits:this.gradientUnits,gradientTransform:this.gradientTransform?this.gradientTransform.concat():this.gradientTransform};return o.util.populateWithProperties(this,e,i),e},toSVG:function(i,c){var s=a(this.coords,!0),h,r,c=c||{},f,g,p=a(this.colorStops,!0),v=s.r1>s.r2,_=this.gradientTransform?this.gradientTransform.concat():o.iMatrix.concat(),x=-this.offsetX,D=-this.offsetY,B=!!c.additionalTransform,z=this.gradientUnits==="pixels"?"userSpaceOnUse":"objectBoundingBox";if(p.sort(function(K,tt){return K.offset-tt.offset}),z==="objectBoundingBox"?(x/=i.width,D/=i.height):(x+=i.width/2,D+=i.height/2),i.type==="path"&&this.gradientUnits!=="percentage"&&(x-=i.pathOffset.x,D-=i.pathOffset.y),_[4]-=x,_[5]-=D,g='id="SVGID_'+this.id+'" gradientUnits="'+z+'"',g+=' gradientTransform="'+(B?c.additionalTransform+" ":"")+o.util.matrixToSVG(_)+'" ',this.type==="linear"?f=["<linearGradient ",g,' x1="',s.x1,'" y1="',s.y1,'" x2="',s.x2,'" y2="',s.y2,`">
8
8
  `]:this.type==="radial"&&(f=["<radialGradient ",g,' cx="',v?s.x1:s.x2,'" cy="',v?s.y1:s.y2,'" r="',v?s.r1:s.r2,'" fx="',v?s.x2:s.x1,'" fy="',v?s.y2:s.y1,`">
9
9
  `]),this.type==="radial"){if(v)for(p=p.concat(),p.reverse(),h=0,r=p.length;h<r;h++)p[h].offset=1-p[h].offset;var G=Math.min(s.r1,s.r2);if(G>0){var Q=Math.max(s.r1,s.r2),Z=G/Q;for(h=0,r=p.length;h<r;h++)p[h].offset+=Z*(1-p[h].offset)}}for(h=0,r=p.length;h<r;h++){var q=p[h];f.push("<stop ",'offset="',q.offset*100+"%",'" style="stop-color:',q.color,typeof q.opacity<"u"?";stop-opacity: "+q.opacity:";",`"/>
10
10
  `)}return f.push(this.type==="linear"?`</linearGradient>
@@ -367,7 +367,7 @@ gl_FragColor = color;
367
367
  uniform sampler2D uTexture;
368
368
  uniform vec2 uDelta;
369
369
  varying vec2 vTexCoord;
370
- `,applyTo:function(f){f.webgl?(f.passes++,this.width=f.sourceWidth,this.horizontal=!0,this.dW=Math.round(this.width*this.scaleX),this.dH=f.sourceHeight,this.tempScale=this.dW/this.width,this.taps=this.getTaps(),f.destinationWidth=this.dW,this._setupFrameBuffer(f),this.applyToWebGL(f),this._swapTextures(f),f.sourceWidth=f.destinationWidth,this.height=f.sourceHeight,this.horizontal=!1,this.dH=Math.round(this.height*this.scaleY),this.tempScale=this.dH/this.height,this.taps=this.getTaps(),f.destinationHeight=this.dH,this._setupFrameBuffer(f),this.applyToWebGL(f),this._swapTextures(f),f.sourceHeight=f.destinationHeight):this.applyTo2d(f)},isNeutralState:function(){return this.scaleX===1&&this.scaleY===1},lanczosCreate:function(f){return function(g){if(g>=f||g<=-f)return 0;if(g<11920929e-14&&g>-11920929e-14)return 1;g*=Math.PI;var p=g/f;return s(g)/g*s(p)/p}},applyTo2d:function(f){var g=f.imageData,p=this.scaleX,v=this.scaleY;this.rcpScaleX=1/p,this.rcpScaleY=1/v;var _=g.width,x=g.height,D=e(_*p),B=e(x*v),z;this.resizeType==="sliceHack"?z=this.sliceByTwo(f,_,x,D,B):this.resizeType==="hermite"?z=this.hermiteFastResize(f,_,x,D,B):this.resizeType==="bilinear"?z=this.bilinearFiltering(f,_,x,D,B):this.resizeType==="lanczos"&&(z=this.lanczosResize(f,_,x,D,B)),f.imageData=z},sliceByTwo:function(f,g,p,v,_){var x=f.imageData,D=.5,B=!1,z=!1,G=g*D,Q=p*D,Z=n.filterBackend.resources,q,K,tt=0,it=0,et=g,y=0;for(Z.sliceByTwo||(Z.sliceByTwo=document.createElement("canvas")),q=Z.sliceByTwo,(q.width<g*1.5||q.height<p)&&(q.width=g*1.5,q.height=p),K=q.getContext("2d"),K.clearRect(0,0,g*1.5,p),K.putImageData(x,0,0),v=a(v),_=a(_);!B||!z;)g=G,p=Q,v<a(G*D)?G=a(G*D):(G=v,B=!0),_<a(Q*D)?Q=a(Q*D):(Q=_,z=!0),K.drawImage(q,tt,it,g,p,et,y,G,Q),tt=et,it=y,y+=Q;return K.getImageData(tt,it,v,_)},lanczosResize:function(f,g,p,v,_){function x(P){var O,I,w,C,A,M,N,L,Y,U,J;for(y.x=(P+.5)*Q,E.x=a(y.x),O=0;O<_;O++){for(y.y=(O+.5)*Z,E.y=a(y.y),A=0,M=0,N=0,L=0,Y=0,I=E.x-tt;I<=E.x+tt;I++)if(!(I<0||I>=g)){U=a(1e3*i(I-y.x)),et[U]||(et[U]={});for(var R=E.y-it;R<=E.y+it;R++)R<0||R>=p||(J=a(1e3*i(R-y.y)),et[U][J]||(et[U][J]=G(t(l(U*q,2)+l(J*K,2))/1e3)),w=et[U][J],w>0&&(C=(R*g+I)*4,A+=w,M+=w*D[C],N+=w*D[C+1],L+=w*D[C+2],Y+=w*D[C+3]))}C=(O*v+P)*4,z[C]=M/A,z[C+1]=N/A,z[C+2]=L/A,z[C+3]=Y/A}return++P<v?x(P):B}var D=f.imageData.data,B=f.ctx.createImageData(v,_),z=B.data,G=this.lanczosCreate(this.lanczosLobes),Q=this.rcpScaleX,Z=this.rcpScaleY,q=2/this.rcpScaleX,K=2/this.rcpScaleY,tt=h(Q*this.lanczosLobes/2),it=h(Z*this.lanczosLobes/2),et={},y={},E={};return x(0)},bilinearFiltering:function(f,g,p,v,_){var x,D,B,z,G,Q,Z,q,K,tt,it,et,y=0,E,P=this.rcpScaleX,O=this.rcpScaleY,I=4*(g-1),w=f.imageData,C=w.data,A=f.ctx.createImageData(v,_),M=A.data;for(Z=0;Z<_;Z++)for(q=0;q<v;q++)for(G=a(P*q),Q=a(O*Z),K=P*q-G,tt=O*Z-Q,E=4*(Q*g+G),it=0;it<4;it++)x=C[E+it],D=C[E+4+it],B=C[E+I+it],z=C[E+I+4+it],et=x*(1-K)*(1-tt)+D*K*(1-tt)+B*tt*(1-K)+z*K*tt,M[y++]=et;return A},hermiteFastResize:function(f,g,p,v,_){for(var x=this.rcpScaleX,D=this.rcpScaleY,B=h(x/2),z=h(D/2),G=f.imageData,Q=G.data,Z=f.ctx.createImageData(v,_),q=Z.data,K=0;K<_;K++)for(var tt=0;tt<v;tt++){for(var it=(tt+K*v)*4,et=0,y=0,E=0,P=0,O=0,I=0,w=0,C=(K+.5)*D,A=a(K*D);A<(K+1)*D;A++)for(var M=i(C-(A+.5))/z,N=(tt+.5)*x,L=M*M,Y=a(tt*x);Y<(tt+1)*x;Y++){var U=i(N-(Y+.5))/B,J=t(L+U*U);J>1&&J<-1||(et=2*J*J*J-3*J*J+1,et>0&&(U=4*(Y+A*g),w+=et*Q[U+3],E+=et,Q[U+3]<255&&(et=et*Q[U+3]/250),P+=et*Q[U],O+=et*Q[U+1],I+=et*Q[U+2],y+=et))}q[it]=P/y,q[it+1]=O/y,q[it+2]=I/y,q[it+3]=w/E}return Z},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),n.Image.filters.Resize.fromObject=n.Image.filters.BaseFilter.fromObject})(d),(function(u){var n=u.fabric||(u.fabric={}),l=n.Image.filters,a=n.util.createClass;l.Contrast=a(l.BaseFilter,{type:"Contrast",fragmentSource:`precision highp float;
370
+ `,applyTo:function(f){f.webgl?(f.passes++,this.width=f.sourceWidth,this.horizontal=!0,this.dW=Math.round(this.width*this.scaleX),this.dH=f.sourceHeight,this.tempScale=this.dW/this.width,this.taps=this.getTaps(),f.destinationWidth=this.dW,this._setupFrameBuffer(f),this.applyToWebGL(f),this._swapTextures(f),f.sourceWidth=f.destinationWidth,this.height=f.sourceHeight,this.horizontal=!1,this.dH=Math.round(this.height*this.scaleY),this.tempScale=this.dH/this.height,this.taps=this.getTaps(),f.destinationHeight=this.dH,this._setupFrameBuffer(f),this.applyToWebGL(f),this._swapTextures(f),f.sourceHeight=f.destinationHeight):this.applyTo2d(f)},isNeutralState:function(){return this.scaleX===1&&this.scaleY===1},lanczosCreate:function(f){return function(g){if(g>=f||g<=-f)return 0;if(g<11920929e-14&&g>-11920929e-14)return 1;g*=Math.PI;var p=g/f;return s(g)/g*s(p)/p}},applyTo2d:function(f){var g=f.imageData,p=this.scaleX,v=this.scaleY;this.rcpScaleX=1/p,this.rcpScaleY=1/v;var _=g.width,x=g.height,D=e(_*p),B=e(x*v),z;this.resizeType==="sliceHack"?z=this.sliceByTwo(f,_,x,D,B):this.resizeType==="hermite"?z=this.hermiteFastResize(f,_,x,D,B):this.resizeType==="bilinear"?z=this.bilinearFiltering(f,_,x,D,B):this.resizeType==="lanczos"&&(z=this.lanczosResize(f,_,x,D,B)),f.imageData=z},sliceByTwo:function(f,g,p,v,_){var x=f.imageData,D=.5,B=!1,z=!1,G=g*D,Q=p*D,Z=n.filterBackend.resources,q,K,tt=0,it=0,et=g,y=0;for(Z.sliceByTwo||(Z.sliceByTwo=document.createElement("canvas")),q=Z.sliceByTwo,(q.width<g*1.5||q.height<p)&&(q.width=g*1.5,q.height=p),K=q.getContext("2d"),K.clearRect(0,0,g*1.5,p),K.putImageData(x,0,0),v=a(v),_=a(_);!B||!z;)g=G,p=Q,v<a(G*D)?G=a(G*D):(G=v,B=!0),_<a(Q*D)?Q=a(Q*D):(Q=_,z=!0),K.drawImage(q,tt,it,g,p,et,y,G,Q),tt=et,it=y,y+=Q;return K.getImageData(tt,it,v,_)},lanczosResize:function(f,g,p,v,_){function x(P){var O,L,w,C,A,M,N,I,Y,U,J;for(y.x=(P+.5)*Q,E.x=a(y.x),O=0;O<_;O++){for(y.y=(O+.5)*Z,E.y=a(y.y),A=0,M=0,N=0,I=0,Y=0,L=E.x-tt;L<=E.x+tt;L++)if(!(L<0||L>=g)){U=a(1e3*i(L-y.x)),et[U]||(et[U]={});for(var R=E.y-it;R<=E.y+it;R++)R<0||R>=p||(J=a(1e3*i(R-y.y)),et[U][J]||(et[U][J]=G(t(l(U*q,2)+l(J*K,2))/1e3)),w=et[U][J],w>0&&(C=(R*g+L)*4,A+=w,M+=w*D[C],N+=w*D[C+1],I+=w*D[C+2],Y+=w*D[C+3]))}C=(O*v+P)*4,z[C]=M/A,z[C+1]=N/A,z[C+2]=I/A,z[C+3]=Y/A}return++P<v?x(P):B}var D=f.imageData.data,B=f.ctx.createImageData(v,_),z=B.data,G=this.lanczosCreate(this.lanczosLobes),Q=this.rcpScaleX,Z=this.rcpScaleY,q=2/this.rcpScaleX,K=2/this.rcpScaleY,tt=h(Q*this.lanczosLobes/2),it=h(Z*this.lanczosLobes/2),et={},y={},E={};return x(0)},bilinearFiltering:function(f,g,p,v,_){var x,D,B,z,G,Q,Z,q,K,tt,it,et,y=0,E,P=this.rcpScaleX,O=this.rcpScaleY,L=4*(g-1),w=f.imageData,C=w.data,A=f.ctx.createImageData(v,_),M=A.data;for(Z=0;Z<_;Z++)for(q=0;q<v;q++)for(G=a(P*q),Q=a(O*Z),K=P*q-G,tt=O*Z-Q,E=4*(Q*g+G),it=0;it<4;it++)x=C[E+it],D=C[E+4+it],B=C[E+L+it],z=C[E+L+4+it],et=x*(1-K)*(1-tt)+D*K*(1-tt)+B*tt*(1-K)+z*K*tt,M[y++]=et;return A},hermiteFastResize:function(f,g,p,v,_){for(var x=this.rcpScaleX,D=this.rcpScaleY,B=h(x/2),z=h(D/2),G=f.imageData,Q=G.data,Z=f.ctx.createImageData(v,_),q=Z.data,K=0;K<_;K++)for(var tt=0;tt<v;tt++){for(var it=(tt+K*v)*4,et=0,y=0,E=0,P=0,O=0,L=0,w=0,C=(K+.5)*D,A=a(K*D);A<(K+1)*D;A++)for(var M=i(C-(A+.5))/z,N=(tt+.5)*x,I=M*M,Y=a(tt*x);Y<(tt+1)*x;Y++){var U=i(N-(Y+.5))/B,J=t(I+U*U);J>1&&J<-1||(et=2*J*J*J-3*J*J+1,et>0&&(U=4*(Y+A*g),w+=et*Q[U+3],E+=et,Q[U+3]<255&&(et=et*Q[U+3]/250),P+=et*Q[U],O+=et*Q[U+1],L+=et*Q[U+2],y+=et))}q[it]=P/y,q[it+1]=O/y,q[it+2]=L/y,q[it+3]=w/E}return Z},toObject:function(){return{type:this.type,scaleX:this.scaleX,scaleY:this.scaleY,resizeType:this.resizeType,lanczosLobes:this.lanczosLobes}}}),n.Image.filters.Resize.fromObject=n.Image.filters.BaseFilter.fromObject})(d),(function(u){var n=u.fabric||(u.fabric={}),l=n.Image.filters,a=n.util.createClass;l.Contrast=a(l.BaseFilter,{type:"Contrast",fragmentSource:`precision highp float;
371
371
  uniform sampler2D uTexture;
372
372
  uniform float uContrast;
373
373
  varying vec2 vTexCoord;
@@ -438,4 +438,4 @@ gl_FragColor.rgb *= color.a;
438
438
  `?(e++,i[e]=0):i[e]++;i[0]>0&&(this.insertCharStyleObject(t.lineIndex,t.charIndex,i[0],a),a=a&&a.slice(i[0]+1)),e&&this.insertNewlineStyleObject(t.lineIndex,t.charIndex+i[0],e);for(var s=1;s<e;s++)i[s]>0?this.insertCharStyleObject(t.lineIndex+s,0,i[s],a):a&&this.styles[t.lineIndex+s]&&a[0]&&(this.styles[t.lineIndex+s][0]=a[0]),a=a&&a.slice(i[s]+1);i[s]>0&&this.insertCharStyleObject(t.lineIndex+s,0,i[s],a)},setSelectionStartEndWithShift:function(n,l,a){a<=n?(l===n?this._selectionDirection="left":this._selectionDirection==="right"&&(this._selectionDirection="left",this.selectionEnd=n),this.selectionStart=a):a>n&&a<l?this._selectionDirection==="right"?this.selectionEnd=a:this.selectionStart=a:(l===n?this._selectionDirection="right":this._selectionDirection==="left"&&(this._selectionDirection="right",this.selectionStart=l),this.selectionEnd=a)},setSelectionInBoundaries:function(){var n=this.text.length;this.selectionStart>n?this.selectionStart=n:this.selectionStart<0&&(this.selectionStart=0),this.selectionEnd>n?this.selectionEnd=n:this.selectionEnd<0&&(this.selectionEnd=0)}})})(),o.util.object.extend(o.IText.prototype,{initDoubleClickSimulation:function(){this.__lastClickTime=+new Date,this.__lastLastClickTime=+new Date,this.__lastPointer={},this.on("mousedown",this.onMouseDown)},onMouseDown:function(u){if(this.canvas){this.__newClickTime=+new Date;var n=u.pointer;this.isTripleClick(n)&&(this.fire("tripleclick",u),this._stopEvent(u.e)),this.__lastLastClickTime=this.__lastClickTime,this.__lastClickTime=this.__newClickTime,this.__lastPointer=n,this.__lastIsEditing=this.isEditing,this.__lastSelected=this.selected}},isTripleClick:function(u){return this.__newClickTime-this.__lastClickTime<500&&this.__lastClickTime-this.__lastLastClickTime<500&&this.__lastPointer.x===u.x&&this.__lastPointer.y===u.y},_stopEvent:function(u){u.preventDefault&&u.preventDefault(),u.stopPropagation&&u.stopPropagation()},initCursorSelectionHandlers:function(){this.initMousedownHandler(),this.initMouseupHandler(),this.initClicks()},doubleClickHandler:function(u){this.isEditing&&this.selectWord(this.getSelectionStartFromPointer(u.e))},tripleClickHandler:function(u){this.isEditing&&this.selectLine(this.getSelectionStartFromPointer(u.e))},initClicks:function(){this.on("mousedblclick",this.doubleClickHandler),this.on("tripleclick",this.tripleClickHandler)},_mouseDownHandler:function(u){!this.canvas||!this.editable||u.e.button&&u.e.button!==1||(this.__isMousedown=!0,this.selected&&(this.inCompositionMode=!1,this.setCursorByClick(u.e)),this.isEditing&&(this.__selectionStartOnMouseDown=this.selectionStart,this.selectionStart===this.selectionEnd&&this.abortCursorAnimation(),this.renderCursorOrSelection()))},_mouseDownHandlerBefore:function(u){!this.canvas||!this.editable||u.e.button&&u.e.button!==1||(this.selected=this===this.canvas._activeObject)},initMousedownHandler:function(){this.on("mousedown",this._mouseDownHandler),this.on("mousedown:before",this._mouseDownHandlerBefore)},initMouseupHandler:function(){this.on("mouseup",this.mouseUpHandler)},mouseUpHandler:function(u){if(this.__isMousedown=!1,!(!this.editable||this.group||u.transform&&u.transform.actionPerformed||u.e.button&&u.e.button!==1)){if(this.canvas){var n=this.canvas._activeObject;if(n&&n!==this)return}this.__lastSelected&&!this.__corner?(this.selected=!1,this.__lastSelected=!1,this.enterEditing(u.e),this.selectionStart===this.selectionEnd?this.initDelayedCursor(!0):this.renderCursorOrSelection()):this.selected=!0}},setCursorByClick:function(u){var n=this.getSelectionStartFromPointer(u),l=this.selectionStart,a=this.selectionEnd;u.shiftKey?this.setSelectionStartEndWithShift(l,a,n):(this.selectionStart=n,this.selectionEnd=n),this.isEditing&&(this._fireSelectionChanged(),this._updateTextarea())},getSelectionStartFromPointer:function(u){for(var n=this.getLocalPointer(u),l=0,a=0,t=0,i=0,e=0,s,h,r=0,c=this._textLines.length;r<c&&t<=n.y;r++)t+=this.getHeightOfLine(r)*this.scaleY,e=r,r>0&&(i+=this._textLines[r-1].length+this.missingNewlineOffset(r-1));s=this._getLineLeftOffset(e),a=s*this.scaleX,h=this._textLines[e],this.direction==="rtl"&&(n.x=this.width*this.scaleX-n.x+a);for(var f=0,g=h.length;f<g&&(l=a,a+=this.__charBounds[e][f].kernedWidth*this.scaleX,a<=n.x);f++)i++;return this._getNewSelectionStartFromOffset(n,l,a,i,g)},_getNewSelectionStartFromOffset:function(u,n,l,a,t){var i=u.x-n,e=l-u.x,s=e>i||e<0?0:1,h=a+s;return this.flipX&&(h=t-h),h>this._text.length&&(h=this._text.length),h}}),o.util.object.extend(o.IText.prototype,{initHiddenTextarea:function(){this.hiddenTextarea=o.document.createElement("textarea"),this.hiddenTextarea.setAttribute("autocapitalize","off"),this.hiddenTextarea.setAttribute("autocorrect","off"),this.hiddenTextarea.setAttribute("autocomplete","off"),this.hiddenTextarea.setAttribute("spellcheck","false"),this.hiddenTextarea.setAttribute("data-fabric-hiddentextarea",""),this.hiddenTextarea.setAttribute("wrap","off");var u=this._calcTextareaPosition();this.hiddenTextarea.style.cssText="position: absolute; top: "+u.top+"; left: "+u.left+"; z-index: -999; opacity: 0; width: 1px; height: 1px; font-size: 1px; padding-top: "+u.fontSize+";",this.hiddenTextareaContainer?this.hiddenTextareaContainer.appendChild(this.hiddenTextarea):o.document.body.appendChild(this.hiddenTextarea),o.util.addListener(this.hiddenTextarea,"keydown",this.onKeyDown.bind(this)),o.util.addListener(this.hiddenTextarea,"keyup",this.onKeyUp.bind(this)),o.util.addListener(this.hiddenTextarea,"input",this.onInput.bind(this)),o.util.addListener(this.hiddenTextarea,"copy",this.copy.bind(this)),o.util.addListener(this.hiddenTextarea,"cut",this.copy.bind(this)),o.util.addListener(this.hiddenTextarea,"paste",this.paste.bind(this)),o.util.addListener(this.hiddenTextarea,"compositionstart",this.onCompositionStart.bind(this)),o.util.addListener(this.hiddenTextarea,"compositionupdate",this.onCompositionUpdate.bind(this)),o.util.addListener(this.hiddenTextarea,"compositionend",this.onCompositionEnd.bind(this)),!this._clickHandlerInitialized&&this.canvas&&(o.util.addListener(this.canvas.upperCanvasEl,"click",this.onClick.bind(this)),this._clickHandlerInitialized=!0)},keysMap:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorRight",36:"moveCursorLeft",37:"moveCursorLeft",38:"moveCursorUp",39:"moveCursorRight",40:"moveCursorDown"},keysMapRtl:{9:"exitEditing",27:"exitEditing",33:"moveCursorUp",34:"moveCursorDown",35:"moveCursorLeft",36:"moveCursorRight",37:"moveCursorRight",38:"moveCursorUp",39:"moveCursorLeft",40:"moveCursorDown"},ctrlKeysMapUp:{67:"copy",88:"cut"},ctrlKeysMapDown:{65:"selectAll"},onClick:function(){this.hiddenTextarea&&this.hiddenTextarea.focus()},onKeyDown:function(u){if(this.isEditing){var n=this.direction==="rtl"?this.keysMapRtl:this.keysMap;if(u.keyCode in n)this[n[u.keyCode]](u);else if(u.keyCode in this.ctrlKeysMapDown&&(u.ctrlKey||u.metaKey))this[this.ctrlKeysMapDown[u.keyCode]](u);else return;u.stopImmediatePropagation(),u.preventDefault(),u.keyCode>=33&&u.keyCode<=40?(this.inCompositionMode=!1,this.clearContextTop(),this.renderCursorOrSelection()):this.canvas&&this.canvas.requestRenderAll()}},onKeyUp:function(u){if(!this.isEditing||this._copyDone||this.inCompositionMode){this._copyDone=!1;return}if(u.keyCode in this.ctrlKeysMapUp&&(u.ctrlKey||u.metaKey))this[this.ctrlKeysMapUp[u.keyCode]](u);else return;u.stopImmediatePropagation(),u.preventDefault(),this.canvas&&this.canvas.requestRenderAll()},onInput:function(u){var n=this.fromPaste;if(this.fromPaste=!1,u&&u.stopPropagation(),!!this.isEditing){var l=this._splitTextIntoLines(this.hiddenTextarea.value).graphemeText,a=this._text.length,t=l.length,i,e,s=t-a,h=this.selectionStart,r=this.selectionEnd,c=h!==r,f,g,p;if(this.hiddenTextarea.value===""){this.styles={},this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll());return}var v=this.fromStringToGraphemeSelection(this.hiddenTextarea.selectionStart,this.hiddenTextarea.selectionEnd,this.hiddenTextarea.value),_=h>v.selectionStart;c?(i=this._text.slice(h,r),s+=r-h):t<a&&(_?i=this._text.slice(r+s,r):i=this._text.slice(h,h-s)),e=l.slice(v.selectionEnd-s,v.selectionEnd),i&&i.length&&(e.length&&(f=this.getSelectionStyles(h,h+1,!1),f=e.map(function(){return f[0]})),c?(g=h,p=r):_?(g=r-i.length,p=r):(g=r,p=r+i.length),this.removeStyleFromTo(g,p)),e.length&&(n&&e.join("")===o.copiedText&&!o.disableStyleCopyPaste&&(f=o.copiedTextStyle),this.insertNewStyleBlock(e,h,f)),this.updateFromTextArea(),this.fire("changed"),this.canvas&&(this.canvas.fire("text:changed",{target:this}),this.canvas.requestRenderAll())}},onCompositionStart:function(){this.inCompositionMode=!0},onCompositionEnd:function(){this.inCompositionMode=!1},onCompositionUpdate:function(u){this.compositionStart=u.target.selectionStart,this.compositionEnd=u.target.selectionEnd,this.updateTextareaPosition()},copy:function(){this.selectionStart!==this.selectionEnd&&(o.copiedText=this.getSelectedText(),o.disableStyleCopyPaste?o.copiedTextStyle=null:o.copiedTextStyle=this.getSelectionStyles(this.selectionStart,this.selectionEnd,!0),this._copyDone=!0)},paste:function(){this.fromPaste=!0},_getClipboardData:function(u){return u&&u.clipboardData||o.window.clipboardData},_getWidthBeforeCursor:function(u,n){var l=this._getLineLeftOffset(u),a;return n>0&&(a=this.__charBounds[u][n-1],l+=a.left+a.width),l},getDownCursorOffset:function(u,n){var l=this._getSelectionForOffset(u,n),a=this.get2DCursorLocation(l),t=a.lineIndex;if(t===this._textLines.length-1||u.metaKey||u.keyCode===34)return this._text.length-l;var i=a.charIndex,e=this._getWidthBeforeCursor(t,i),s=this._getIndexOnLine(t+1,e),h=this._textLines[t].slice(i);return h.length+s+1+this.missingNewlineOffset(t)},_getSelectionForOffset:function(u,n){return u.shiftKey&&this.selectionStart!==this.selectionEnd&&n?this.selectionEnd:this.selectionStart},getUpCursorOffset:function(u,n){var l=this._getSelectionForOffset(u,n),a=this.get2DCursorLocation(l),t=a.lineIndex;if(t===0||u.metaKey||u.keyCode===33)return-l;var i=a.charIndex,e=this._getWidthBeforeCursor(t,i),s=this._getIndexOnLine(t-1,e),h=this._textLines[t].slice(0,i),r=this.missingNewlineOffset(t-1);return-this._textLines[t-1].length+s-h.length+(1-r)},_getIndexOnLine:function(u,n){for(var l=this._textLines[u],a=this._getLineLeftOffset(u),t=a,i=0,e,s,h=0,r=l.length;h<r;h++)if(e=this.__charBounds[u][h].width,t+=e,t>n){s=!0;var c=t-e,f=t,g=Math.abs(c-n),p=Math.abs(f-n);i=p<g?h:h-1;break}return s||(i=l.length-1),i},moveCursorDown:function(u){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorUpOrDown("Down",u)},moveCursorUp:function(u){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorUpOrDown("Up",u)},_moveCursorUpOrDown:function(u,n){var l="get"+u+"CursorOffset",a=this[l](n,this._selectionDirection==="right");n.shiftKey?this.moveCursorWithShift(a):this.moveCursorWithoutShift(a),a!==0&&(this.setSelectionInBoundaries(),this.abortCursorAnimation(),this._currentCursorOpacity=1,this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorWithShift:function(u){var n=this._selectionDirection==="left"?this.selectionStart+u:this.selectionEnd+u;return this.setSelectionStartEndWithShift(this.selectionStart,this.selectionEnd,n),u!==0},moveCursorWithoutShift:function(u){return u<0?(this.selectionStart+=u,this.selectionEnd=this.selectionStart):(this.selectionEnd+=u,this.selectionStart=this.selectionEnd),u!==0},moveCursorLeft:function(u){this.selectionStart===0&&this.selectionEnd===0||this._moveCursorLeftOrRight("Left",u)},_move:function(u,n,l){var a;if(u.altKey)a=this["findWordBoundary"+l](this[n]);else if(u.metaKey||u.keyCode===35||u.keyCode===36)a=this["findLineBoundary"+l](this[n]);else return this[n]+=l==="Left"?-1:1,!0;if(typeof a<"u"&&this[n]!==a)return this[n]=a,!0},_moveLeft:function(u,n){return this._move(u,n,"Left")},_moveRight:function(u,n){return this._move(u,n,"Right")},moveCursorLeftWithoutShift:function(u){var n=!0;return this._selectionDirection="left",this.selectionEnd===this.selectionStart&&this.selectionStart!==0&&(n=this._moveLeft(u,"selectionStart")),this.selectionEnd=this.selectionStart,n},moveCursorLeftWithShift:function(u){if(this._selectionDirection==="right"&&this.selectionStart!==this.selectionEnd)return this._moveLeft(u,"selectionEnd");if(this.selectionStart!==0)return this._selectionDirection="left",this._moveLeft(u,"selectionStart")},moveCursorRight:function(u){this.selectionStart>=this._text.length&&this.selectionEnd>=this._text.length||this._moveCursorLeftOrRight("Right",u)},_moveCursorLeftOrRight:function(u,n){var l="moveCursor"+u+"With";this._currentCursorOpacity=1,n.shiftKey?l+="Shift":l+="outShift",this[l](n)&&(this.abortCursorAnimation(),this.initDelayedCursor(),this._fireSelectionChanged(),this._updateTextarea())},moveCursorRightWithShift:function(u){if(this._selectionDirection==="left"&&this.selectionStart!==this.selectionEnd)return this._moveRight(u,"selectionStart");if(this.selectionEnd!==this._text.length)return this._selectionDirection="right",this._moveRight(u,"selectionEnd")},moveCursorRightWithoutShift:function(u){var n=!0;return this._selectionDirection="right",this.selectionStart===this.selectionEnd?(n=this._moveRight(u,"selectionStart"),this.selectionEnd=this.selectionStart):this.selectionStart=this.selectionEnd,n},removeChars:function(u,n){typeof n>"u"&&(n=u+1),this.removeStyleFromTo(u,n),this._text.splice(u,n-u),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()},insertChars:function(u,n,l,a){typeof a>"u"&&(a=l),a>l&&this.removeStyleFromTo(l,a);var t=o.util.string.graphemeSplit(u);this.insertNewStyleBlock(t,l,n),this._text=[].concat(this._text.slice(0,l),t,this._text.slice(a)),this.text=this._text.join(""),this.set("dirty",!0),this._shouldClearDimensionCache()&&(this.initDimensions(),this.setCoords()),this._removeExtraneousStyles()}}),(function(){var u=o.util.toFixed,n=/ +/g;o.util.object.extend(o.Text.prototype,{_toSVG:function(){var l=this._getSVGLeftTopOffsets(),a=this._getSVGTextAndBg(l.textTop,l.textLeft);return this._wrapSVGTextAndBg(a)},toSVG:function(l){return this._createBaseSVGMarkup(this._toSVG(),{reviver:l,noStyle:!0,withShadow:!0})},_getSVGLeftTopOffsets:function(){return{textLeft:-this.width/2,textTop:-this.height/2,lineTop:this.getHeightOfLine(0)}},_wrapSVGTextAndBg:function(l){var a=!0,t=this.getSvgTextDecoration(this);return[l.textBgRects.join(""),' <text xml:space="preserve" ',this.fontFamily?'font-family="'+this.fontFamily.replace(/"/g,"'")+'" ':"",this.fontSize?'font-size="'+this.fontSize+'" ':"",this.fontStyle?'font-style="'+this.fontStyle+'" ':"",this.fontWeight?'font-weight="'+this.fontWeight+'" ':"",t?'text-decoration="'+t+'" ':"",'style="',this.getSvgStyles(a),'"',this.addPaintOrder()," >",l.textSpans.join(""),`</text>
439
439
  `]},_getSVGTextAndBg:function(l,a){var t=[],i=[],e=l,s;this._setSVGBg(i);for(var h=0,r=this._textLines.length;h<r;h++)s=this._getLineLeftOffset(h),(this.textBackgroundColor||this.styleHas("textBackgroundColor",h))&&this._setSVGTextLineBg(i,h,a+s,e),this._setSVGTextLineText(t,h,a+s,e),e+=this.getHeightOfLine(h);return{textSpans:t,textBgRects:i}},_createTextCharSpan:function(l,a,t,i){var e=l!==l.trim()||l.match(n),s=this.getSvgSpanStyles(a,e),h=s?'style="'+s+'"':"",r=a.deltaY,c="",f=o.Object.NUM_FRACTION_DIGITS;return r&&(c=' dy="'+u(r,f)+'" '),['<tspan x="',u(t,f),'" y="',u(i,f),'" ',c,h,">",o.util.string.escapeXml(l),"</tspan>"].join("")},_setSVGTextLineText:function(l,a,t,i){var e=this.getHeightOfLine(a),s=this.textAlign.indexOf("justify")!==-1,h,r,c="",f,g,p=0,v=this._textLines[a],_;i+=e*(1-this._fontSizeFraction)/this.lineHeight;for(var x=0,D=v.length-1;x<=D;x++)_=x===D||this.charSpacing,c+=v[x],f=this.__charBounds[a][x],p===0?(t+=f.kernedWidth-f.width,p+=f.width):p+=f.kernedWidth,s&&!_&&this._reSpaceAndTab.test(v[x])&&(_=!0),_||(h=h||this.getCompleteStyleDeclaration(a,x),r=this.getCompleteStyleDeclaration(a,x+1),_=o.util.hasStyleChanged(h,r,!0)),_&&(g=this._getStyleDeclaration(a,x)||{},l.push(this._createTextCharSpan(c,g,t,i)),c="",h=r,t+=p,p=0)},_pushTextBgRect:function(l,a,t,i,e,s){var h=o.Object.NUM_FRACTION_DIGITS;l.push(" <rect ",this._getFillAttributes(a),' x="',u(t,h),'" y="',u(i,h),'" width="',u(e,h),'" height="',u(s,h),`"></rect>
440
440
  `)},_setSVGTextLineBg:function(l,a,t,i){for(var e=this._textLines[a],s=this.getHeightOfLine(a)/this.lineHeight,h=0,r=0,c,f,g=this.getValueOfPropertyAt(a,0,"textBackgroundColor"),p=0,v=e.length;p<v;p++)c=this.__charBounds[a][p],f=this.getValueOfPropertyAt(a,p,"textBackgroundColor"),f!==g?(g&&this._pushTextBgRect(l,g,t+r,i,h,s),r=c.left,h=c.width,g=f):h+=c.kernedWidth;f&&this._pushTextBgRect(l,f,t+r,i,h,s)},_getFillAttributes:function(l){var a=l&&typeof l=="string"?new o.Color(l):"";return!a||!a.getSource()||a.getAlpha()===1?'fill="'+l+'"':'opacity="'+a.getAlpha()+'" fill="'+a.setAlpha(1).toRgb()+'"'},_getSVGLineTopOffset:function(l){for(var a=0,t=0,i=0;i<l;i++)a+=this.getHeightOfLine(i);return t=this.getHeightOfLine(i),{lineTop:a,offset:(this._fontSizeMult-this._fontSizeFraction)*t/(this.lineHeight*this._fontSizeMult)}},getSvgStyles:function(l){var a=o.Object.prototype.getSvgStyles.call(this,l);return a+" white-space: pre;"}})})(),(function(u){var n=u.fabric||(u.fabric={});n.Textbox=n.util.createClass(n.IText,n.Observable,{type:"textbox",minWidth:20,dynamicMinWidth:2,__cachedLines:null,lockScalingFlip:!0,noScaleCache:!1,_dimensionAffectingProps:n.Text.prototype._dimensionAffectingProps.concat("width"),_wordJoiners:/[ \t\r]/,splitByGrapheme:!1,initDimensions:function(){this.__skipDimension||(this.isEditing&&this.initDelayedCursor(),this.clearContextTop(),this._clearCache(),this.dynamicMinWidth=0,this._styleMap=this._generateStyleMap(this._splitText()),this.dynamicMinWidth>this.width&&this._set("width",this.dynamicMinWidth),this.textAlign.indexOf("justify")!==-1&&this.enlargeSpaces(),this.height=this.calcTextHeight(),this.saveState({propertySet:"_dimensionAffectingProps"}))},_generateStyleMap:function(l){for(var a=0,t=0,i=0,e={},s=0;s<l.graphemeLines.length;s++)l.graphemeText[i]===`
441
- `&&s>0?(t=0,i++,a++):!this.splitByGrapheme&&this._reSpaceAndTab.test(l.graphemeText[i])&&s>0&&(t++,i++),e[s]={line:a,offset:t},i+=l.graphemeLines[s].length,t+=l.graphemeLines[s].length;return e},styleHas:function(l,a){if(this._styleMap&&!this.isWrapping){var t=this._styleMap[a];t&&(a=t.line)}return n.Text.prototype.styleHas.call(this,l,a)},isEmptyStyles:function(l){if(!this.styles)return!0;var a=0,t=l+1,i,e,s=!1,h=this._styleMap[l],r=this._styleMap[l+1];h&&(l=h.line,a=h.offset),r&&(t=r.line,s=t===l,i=r.offset),e=typeof l>"u"?this.styles:{line:this.styles[l]};for(var c in e)for(var f in e[c])if(f>=a&&(!s||f<i))for(var g in e[c][f])return!1;return!0},_getStyleDeclaration:function(l,a){if(this._styleMap&&!this.isWrapping){var t=this._styleMap[l];if(!t)return null;l=t.line,a=t.offset+a}return this.callSuper("_getStyleDeclaration",l,a)},_setStyleDeclaration:function(l,a,t){var i=this._styleMap[l];l=i.line,a=i.offset+a,this.styles[l][a]=t},_deleteStyleDeclaration:function(l,a){var t=this._styleMap[l];l=t.line,a=t.offset+a,delete this.styles[l][a]},_getLineStyle:function(l){var a=this._styleMap[l];return!!this.styles[a.line]},_setLineStyle:function(l){var a=this._styleMap[l];this.styles[a.line]={}},_wrapText:function(l,a){var t=[],i;for(this.isWrapping=!0,i=0;i<l.length;i++)t=t.concat(this._wrapLine(l[i],i,a));return this.isWrapping=!1,t},_measureWord:function(l,a,t){var i=0,e,s=!0;t=t||0;for(var h=0,r=l.length;h<r;h++){var c=this._getGraphemeBox(l[h],a,h+t,e,s);i+=c.kernedWidth,e=l[h]}return i},_wrapLine:function(l,a,t,z){var e=0,s=this.splitByGrapheme,h=[],r=[],c=s?n.util.string.graphemeSplit(l):l.split(this._wordJoiners),f="",g=0,p=s?"":" ",v=0,_=0,x=0,D=!0,B=this._getWidthOfCharSpacing(),z=z||0;c.length===0&&c.push([]),t-=z;for(var G=0;G<c.length;G++)f=s?c[G]:n.util.string.graphemeSplit(c[G]),v=this._measureWord(f,a,g),g+=f.length,e+=_+v-B,e>t&&!D?(h.push(r),r=[],e=v,D=!0):e+=B,!D&&!s&&r.push(p),r=r.concat(f),_=s?0:this._measureWord([p],a,g),g++,D=!1,v>x&&(x=v);return G&&h.push(r),x+z>this.dynamicMinWidth&&(this.dynamicMinWidth=x-B+z),h},isEndOfWrapping:function(l){return!this._styleMap[l+1]||this._styleMap[l+1].line!==this._styleMap[l].line},missingNewlineOffset:function(l){return this.splitByGrapheme?this.isEndOfWrapping(l)?1:0:1},_splitTextIntoLines:function(l){for(var a=n.Text.prototype._splitTextIntoLines.call(this,l),t=this._wrapText(a.lines,this.width),i=new Array(t.length),e=0;e<t.length;e++)i[e]=t[e].join("");return a.lines=i,a.graphemeLines=t,a},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},_removeExtraneousStyles:function(){var l={};for(var a in this._styleMap)this._textLines[a]&&(l[this._styleMap[a].line]=1);for(var a in this.styles)l[a]||delete this.styles[a]},toObject:function(l){return this.callSuper("toObject",["minWidth","splitByGrapheme"].concat(l))}}),n.Textbox.fromObject=function(l,a){var t=n.util.stylesFromArray(l.styles,l.text),i=Object.assign({},l,{styles:t});return n.Object._fromObject("Textbox",i,a,"text")}})(d),(function(){var u=o.controlsUtils,n=u.scaleSkewCursorStyleHandler,l=u.scaleCursorStyleHandler,a=u.scalingEqually,t=u.scalingYOrSkewingX,i=u.scalingXOrSkewingY,e=u.scaleOrSkewActionName,s=o.Object.prototype.controls;if(s.ml=new o.Control({x:-.5,y:0,cursorStyleHandler:n,actionHandler:i,getActionName:e}),s.mr=new o.Control({x:.5,y:0,cursorStyleHandler:n,actionHandler:i,getActionName:e}),s.mb=new o.Control({x:0,y:.5,cursorStyleHandler:n,actionHandler:t,getActionName:e}),s.mt=new o.Control({x:0,y:-.5,cursorStyleHandler:n,actionHandler:t,getActionName:e}),s.tl=new o.Control({x:-.5,y:-.5,cursorStyleHandler:l,actionHandler:a}),s.tr=new o.Control({x:.5,y:-.5,cursorStyleHandler:l,actionHandler:a}),s.bl=new o.Control({x:-.5,y:.5,cursorStyleHandler:l,actionHandler:a}),s.br=new o.Control({x:.5,y:.5,cursorStyleHandler:l,actionHandler:a}),s.mtr=new o.Control({x:0,y:-.5,actionHandler:u.rotationWithSnapping,cursorStyleHandler:u.rotationStyleHandler,offsetY:-40,withConnection:!0,actionName:"rotate"}),o.Textbox){var h=o.Textbox.prototype.controls={};h.mtr=s.mtr,h.tr=s.tr,h.br=s.br,h.tl=s.tl,h.bl=s.bl,h.mt=s.mt,h.mb=s.mb,h.mr=new o.Control({x:.5,y:0,actionHandler:u.changeWidth,cursorStyleHandler:n,actionName:"resizing"}),h.ml=new o.Control({x:-.5,y:0,actionHandler:u.changeWidth,cursorStyleHandler:n,actionName:"resizing"})}})()})(Be)),Be}var ge=ss();function os(d){return $n(d).promise.value}function as(d){return new Promise(o=>{const{onChange:m,open:S}=es(d);m(b=>{o(b)}),S()})}function ls(d){return new Promise(o=>{const m=document.createElement("img");m.src=d,document.body.appendChild(m),m.onload=()=>{o(m)}})}const hs=(d,o)=>Zn({source:d,...o}).copy();function cs(d,o){const m=document.createElement("a");m.href=d,m.download=`${hr()}.${o}`,document.body.appendChild(m),m.click(),m.remove()}function us(d,o,m,S,b,T,F){F!==void 0&&(d.save(),d.translate(o,m),d.rotate(F),d.drawImage(S,-b/2,-T/2,b,T),d.restore())}const fs=d=>d instanceof ge.fabric.Image,ds=d=>d instanceof ge.fabric.Group,gs=d=>d instanceof ge.fabric.IText,ps=d=>d instanceof ge.fabric.ActiveSelection;function ms(d){return new Promise(o=>{const m=new FileReader;m.addEventListener("load",()=>{o(m.result)}),m.readAsDataURL(d)})}function vs(d){if(!d)return null;const o=d.split(","),m=o[0].match(/:(.*?);/)[1],S=window.atob(o[1]),b=new ArrayBuffer(S.length),T=new Uint8Array(b);for(let F=0;F<S.length;F++)T[F]=S.charCodeAt(F);return[new Blob([b],{type:m}),m.slice(6)]}const _s={getImgStr:os,downFile:cs,selectFiles:as,insertImgFile:ls,clipboardText:hs,drawImg:us,isImage:fs,isGroup:ds,isIText:gs,isActiveSelection:ps,blobToBase64:ms,base64ToBlob:vs};exports.LengthConvert=Xe;exports.fabric=ge.fabric;exports.mathHelper=rr;exports.utils=_s;
441
+ `&&s>0?(t=0,i++,a++):!this.splitByGrapheme&&this._reSpaceAndTab.test(l.graphemeText[i])&&s>0&&(t++,i++),e[s]={line:a,offset:t},i+=l.graphemeLines[s].length,t+=l.graphemeLines[s].length;return e},styleHas:function(l,a){if(this._styleMap&&!this.isWrapping){var t=this._styleMap[a];t&&(a=t.line)}return n.Text.prototype.styleHas.call(this,l,a)},isEmptyStyles:function(l){if(!this.styles)return!0;var a=0,t=l+1,i,e,s=!1,h=this._styleMap[l],r=this._styleMap[l+1];h&&(l=h.line,a=h.offset),r&&(t=r.line,s=t===l,i=r.offset),e=typeof l>"u"?this.styles:{line:this.styles[l]};for(var c in e)for(var f in e[c])if(f>=a&&(!s||f<i))for(var g in e[c][f])return!1;return!0},_getStyleDeclaration:function(l,a){if(this._styleMap&&!this.isWrapping){var t=this._styleMap[l];if(!t)return null;l=t.line,a=t.offset+a}return this.callSuper("_getStyleDeclaration",l,a)},_setStyleDeclaration:function(l,a,t){var i=this._styleMap[l];l=i.line,a=i.offset+a,this.styles[l][a]=t},_deleteStyleDeclaration:function(l,a){var t=this._styleMap[l];l=t.line,a=t.offset+a,delete this.styles[l][a]},_getLineStyle:function(l){var a=this._styleMap[l];return!!this.styles[a.line]},_setLineStyle:function(l){var a=this._styleMap[l];this.styles[a.line]={}},_wrapText:function(l,a){var t=[],i;for(this.isWrapping=!0,i=0;i<l.length;i++)t=t.concat(this._wrapLine(l[i],i,a));return this.isWrapping=!1,t},_measureWord:function(l,a,t){var i=0,e,s=!0;t=t||0;for(var h=0,r=l.length;h<r;h++){var c=this._getGraphemeBox(l[h],a,h+t,e,s);i+=c.kernedWidth,e=l[h]}return i},_wrapLine:function(l,a,t,z){var e=0,s=this.splitByGrapheme,h=[],r=[],c=s?n.util.string.graphemeSplit(l):l.split(this._wordJoiners),f="",g=0,p=s?"":" ",v=0,_=0,x=0,D=!0,B=this._getWidthOfCharSpacing(),z=z||0;c.length===0&&c.push([]),t-=z;for(var G=0;G<c.length;G++)f=s?c[G]:n.util.string.graphemeSplit(c[G]),v=this._measureWord(f,a,g),g+=f.length,e+=_+v-B,e>t&&!D?(h.push(r),r=[],e=v,D=!0):e+=B,!D&&!s&&r.push(p),r=r.concat(f),_=s?0:this._measureWord([p],a,g),g++,D=!1,v>x&&(x=v);return G&&h.push(r),x+z>this.dynamicMinWidth&&(this.dynamicMinWidth=x-B+z),h},isEndOfWrapping:function(l){return!this._styleMap[l+1]||this._styleMap[l+1].line!==this._styleMap[l].line},missingNewlineOffset:function(l){return this.splitByGrapheme?this.isEndOfWrapping(l)?1:0:1},_splitTextIntoLines:function(l){for(var a=n.Text.prototype._splitTextIntoLines.call(this,l),t=this._wrapText(a.lines,this.width),i=new Array(t.length),e=0;e<t.length;e++)i[e]=t[e].join("");return a.lines=i,a.graphemeLines=t,a},getMinWidth:function(){return Math.max(this.minWidth,this.dynamicMinWidth)},_removeExtraneousStyles:function(){var l={};for(var a in this._styleMap)this._textLines[a]&&(l[this._styleMap[a].line]=1);for(var a in this.styles)l[a]||delete this.styles[a]},toObject:function(l){return this.callSuper("toObject",["minWidth","splitByGrapheme"].concat(l))}}),n.Textbox.fromObject=function(l,a){var t=n.util.stylesFromArray(l.styles,l.text),i=Object.assign({},l,{styles:t});return n.Object._fromObject("Textbox",i,a,"text")}})(d),(function(){var u=o.controlsUtils,n=u.scaleSkewCursorStyleHandler,l=u.scaleCursorStyleHandler,a=u.scalingEqually,t=u.scalingYOrSkewingX,i=u.scalingXOrSkewingY,e=u.scaleOrSkewActionName,s=o.Object.prototype.controls;if(s.ml=new o.Control({x:-.5,y:0,cursorStyleHandler:n,actionHandler:i,getActionName:e}),s.mr=new o.Control({x:.5,y:0,cursorStyleHandler:n,actionHandler:i,getActionName:e}),s.mb=new o.Control({x:0,y:.5,cursorStyleHandler:n,actionHandler:t,getActionName:e}),s.mt=new o.Control({x:0,y:-.5,cursorStyleHandler:n,actionHandler:t,getActionName:e}),s.tl=new o.Control({x:-.5,y:-.5,cursorStyleHandler:l,actionHandler:a}),s.tr=new o.Control({x:.5,y:-.5,cursorStyleHandler:l,actionHandler:a}),s.bl=new o.Control({x:-.5,y:.5,cursorStyleHandler:l,actionHandler:a}),s.br=new o.Control({x:.5,y:.5,cursorStyleHandler:l,actionHandler:a}),s.mtr=new o.Control({x:0,y:-.5,actionHandler:u.rotationWithSnapping,cursorStyleHandler:u.rotationStyleHandler,offsetY:-40,withConnection:!0,actionName:"rotate"}),o.Textbox){var h=o.Textbox.prototype.controls={};h.mtr=s.mtr,h.tr=s.tr,h.br=s.br,h.tl=s.tl,h.bl=s.bl,h.mt=s.mt,h.mb=s.mb,h.mr=new o.Control({x:.5,y:0,actionHandler:u.changeWidth,cursorStyleHandler:n,actionName:"resizing"}),h.ml=new o.Control({x:-.5,y:0,actionHandler:u.changeWidth,cursorStyleHandler:n,actionName:"resizing"})}})()})(Be)),Be}var ge=ss();function os(d){return $n(d).promise.value}function as(d){return new Promise(o=>{const{onChange:m,open:S}=es(d);m(b=>{o(b)}),S()})}function ls(d){return new Promise(o=>{const m=document.createElement("img");m.src=d,document.body.appendChild(m),m.onload=()=>{o(m)}})}const hs=(d,o)=>Zn({source:d,...o}).copy();function cs(d,o){const m=document.createElement("a");m.href=d,m.download=`${hr()}.${o}`,document.body.appendChild(m),m.click(),m.remove()}function us(d,o,m,S,b,T,F){F!==void 0&&(d.save(),d.translate(o,m),d.rotate(F),d.drawImage(S,-b/2,-T/2,b,T),d.restore())}const fs=d=>d instanceof ge.fabric.Image,ds=d=>d instanceof ge.fabric.Group,gs=d=>d instanceof ge.fabric.IText,ps=d=>d instanceof ge.fabric.ActiveSelection;function ms(d){return new Promise(o=>{const m=new FileReader;m.addEventListener("load",()=>{o(m.result)}),m.readAsDataURL(d)})}function vs(d){if(!d)return null;const o=d.split(","),m=o[0].match(/:(.*?);/)[1],S=window.atob(o[1]),b=new ArrayBuffer(S.length),T=new Uint8Array(b);for(let F=0;F<S.length;F++)T[F]=S.charCodeAt(F);return[new Blob([b],{type:m}),m.slice(6)]}const _s={getImgStr:os,downFile:cs,selectFiles:as,insertImgFile:ls,clipboardText:hs,drawImg:us,isImage:fs,isGroup:ds,isIText:gs,isActiveSelection:ps,blobToBase64:ms,base64ToBlob:vs},ys="0.0.7";window&&(window._hprintPrintVersion=ys);exports.LengthConvert=Xe;exports.fabric=ge.fabric;exports.mathHelper=rr;exports.utils=_s;