@hprint/shared 0.0.1 → 0.0.3

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
@@ -2,7 +2,7 @@
2
2
  `),b]);else{const T=[`[Vue warn]: ${d}`,...o];b.length&&T.push(`
3
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
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(`
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=new Proxy({},{get(d,o){throw new Error(`Module "" has been externalized for browser compatibility. Cannot access ".${o}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`)}}),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
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,`">
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,`">
package/dist/index.mjs CHANGED
@@ -2217,7 +2217,11 @@ function es(d) {
2217
2217
  }), m;
2218
2218
  }
2219
2219
  var Be = {};
2220
- const is = {}, rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2220
+ const is = new Proxy({}, {
2221
+ get(d, o) {
2222
+ throw new Error(`Module "" has been externalized for browser compatibility. Cannot access ".${o}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`);
2223
+ }
2224
+ }), rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2221
2225
  __proto__: null,
2222
2226
  default: is
2223
2227
  }, Symbol.toStringTag, { value: "Module" })), Ne = /* @__PURE__ */ es(rs);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hprint/shared",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",