@hprint/core 0.0.2 → 0.0.4
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 +1 -1
- package/dist/index.mjs +1 -5
- package/package.json +2 -2
- package/src/ServersPlugin.ts +411 -411
- package/src/interface/Editor.ts +58 -58
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
`),y]);else{const C=[`[Vue warn]: ${f}`,...r];y.length&&C.push(`
|
|
3
3
|
`,...xs(y)),console.warn(...C)}oe(),ei=!1}function ws(){let f=Kt[Kt.length-1];if(!f)return[];const r=[];for(;f;){const g=r[0];g&&g.vnode===f?g.recurseCount++:r.push({vnode:f,recurseCount:0});const _=f.component&&f.component.parent;f=_&&_.vnode}return r}function xs(f){const r=[];return f.forEach((g,_)=>{r.push(..._===0?[]:[`
|
|
4
4
|
`],...Ts(g))}),r}function Ts({vnode:f,recurseCount:r}){const g=r>0?`... (${r} recursive calls)`:"",_=f.component?f.component.parent==null:!1,y=` at <${sr(f.component,f.type,_)}`,C=">"+g;return f.props?[y,...Os(f.props),C]:[y+C]}function Os(f){const r=[],g=Object.keys(f);return g.slice(0,3).forEach(_=>{r.push(...Vn(_,f[_]))}),g.length>3&&r.push(" ..."),r}function Vn(f,r,g){return jt(r)?(r=JSON.stringify(r),g?r:[`${f}=${r}`]):typeof r=="number"||typeof r=="boolean"||r==null?g?r:[`${f}=${r}`]:Ot(r)?(r=Vn(f,at(r.value),!0),g?r:[`${f}=Ref<`,r,">"]):Ct(r)?[`${f}=fn${r.name?`<${r.name}>`:""}`]:(r=at(r),g?r:[`${f}=`,r])}const Hi={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 Ue(f,r,g,_){try{return _?f(..._):f()}catch(y){Wi(y,r,g)}}function Ni(f,r,g,_){if(Ct(f)){const y=Ue(f,r,g,_);return y&&Wr(y)&&y.catch(C=>{Wi(C,r,g)}),y}if(gt(f)){const y=[];for(let C=0;C<f.length;C++)y.push(Ni(f[C],r,g,_));return y}else process.env.NODE_ENV!=="production"&&yt(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof f}`)}function Wi(f,r,g,_=!0){const y=r?r.vnode:null,{errorHandler:C,throwUnhandledErrorInProduction:T}=r&&r.appContext.config||me;if(r){let c=r.parent;const i=r.proxy,l=process.env.NODE_ENV!=="production"?Hi[g]:`https://vuejs.org/error-reference/#runtime-${g}`;for(;c;){const a=c.ec;if(a){for(let t=0;t<a.length;t++)if(a[t](f,i,l)===!1)return}c=c.parent}if(C){se(),Ue(C,null,10,[f,i,l]),oe();return}}Es(f,g,y,_,T)}function Es(f,r,g,_=!0,y=!1){if(process.env.NODE_ENV!=="production"){const C=Hi[r];if(g&&bs(g),yt(`Unhandled error${C?` during execution of ${C}`:""}`),g&&Ss(),_)throw f;console.error(f)}else{if(y)throw f;console.error(f)}}const Et=[];let Rt=-1;const re=[];let Nt=null,Qt=0;const Ps=Promise.resolve();let Ei=null;const ks=100;function As(f){let r=Rt+1,g=Et.length;for(;r<g;){const _=r+g>>>1,y=Et[_],C=be(y);C<f||C===f&&y.flags&2?r=_+1:g=_}return r}function Un(f){if(!(f.flags&1)){const r=be(f),g=Et[Et.length-1];!g||!(f.flags&2)&&r>=be(g)?Et.push(f):Et.splice(As(r),0,f),f.flags|=1,zn()}}function zn(){Ei||(Ei=Ps.then(qn))}function Gn(f){gt(f)?re.push(...f):Nt&&f.id===-1?Nt.splice(Qt+1,0,f):f.flags&1||(re.push(f),f.flags|=1),zn()}function Ds(f){if(re.length){const r=[...new Set(re)].sort((g,_)=>be(g)-be(_));if(re.length=0,Nt){Nt.push(...r);return}for(Nt=r,process.env.NODE_ENV!=="production"&&(f=f||new Map),Qt=0;Qt<Nt.length;Qt++){const g=Nt[Qt];process.env.NODE_ENV!=="production"&&Kn(f,g)||(g.flags&4&&(g.flags&=-2),g.flags&8||g(),g.flags&=-2)}Nt=null,Qt=0}}const be=f=>f.id==null?f.flags&2?-1:1/0:f.id;function qn(f){process.env.NODE_ENV!=="production"&&(f=f||new Map);const r=process.env.NODE_ENV!=="production"?g=>Kn(f,g):ee;try{for(Rt=0;Rt<Et.length;Rt++){const g=Et[Rt];if(g&&!(g.flags&8)){if(process.env.NODE_ENV!=="production"&&r(g))continue;g.flags&4&&(g.flags&=-2),Ue(g,g.i,g.i?15:14),g.flags&4||(g.flags&=-2)}}}finally{for(;Rt<Et.length;Rt++){const g=Et[Rt];g&&(g.flags&=-2)}Rt=-1,Et.length=0,Ds(f),Ei=null,(Et.length||re.length)&&qn(f)}}function Kn(f,r){const g=f.get(r)||0;if(g>ks){const _=r.i,y=_&&rr(_.type);return Wi(`Maximum recursive updates exceeded${y?` in component <${y}>`:""}. 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 f.set(r,g+1),!1}const ii=new Map;process.env.NODE_ENV!=="production"&&(Ve().__VUE_HMR_RUNTIME__={createRecord:ni(Ms),rerender:ni(Ls),reload:ni(Fs)});const He=new Map;function Ms(f,r){return He.has(f)?!1:(He.set(f,{initialDef:Ne(r),instances:new Set}),!0)}function Ne(f){return or(f)?f.__vccOpts:f}function Ls(f,r){const g=He.get(f);g&&(g.initialDef.render=r,[...g.instances].forEach(_=>{r&&(_.render=r,Ne(_.type).render=r),_.renderCache=[],_.job.flags&8||_.update()}))}function Fs(f,r){const g=He.get(f);if(!g)return;r=Ne(r),tn(g.initialDef,r);const _=[...g.instances];for(let y=0;y<_.length;y++){const C=_[y],T=Ne(C.type);let c=ii.get(T);c||(T!==g.initialDef&&tn(T,r),ii.set(T,c=new Set)),c.add(C),C.appContext.propsCache.delete(C.type),C.appContext.emitsCache.delete(C.type),C.appContext.optionsCache.delete(C.type),C.ceReload?(c.add(C),C.ceReload(r.styles),c.delete(C)):C.parent?Un(()=>{C.job.flags&8||(C.parent.update(),c.delete(C))}):C.appContext.reload?C.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),C.root.ce&&C!==C.root&&C.root.ce._removeChildStyle(T)}Gn(()=>{ii.clear()})}function tn(f,r){Vt(f,r);for(const g in f)g!=="__file"&&!(g in r)&&delete f[g]}function ni(f){return(r,g)=>{try{return f(r,g)}catch(_){console.error(_),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let Zt,Le=[];function $n(f,r){var g,_;Zt=f,Zt?(Zt.enabled=!0,Le.forEach(({event:y,args:C})=>Zt.emit(y,...C)),Le=[]):typeof window<"u"&&window.HTMLElement&&!((_=(g=window.navigator)==null?void 0:g.userAgent)!=null&&_.includes("jsdom"))?((r.__VUE_DEVTOOLS_HOOK_REPLAY__=r.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(C=>{$n(C,r)}),setTimeout(()=>{Zt||(r.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Le=[])},3e3)):Le=[]}let Se=null,Rs=null;const Is=f=>f.__isTeleport;function Jn(f,r){f.shapeFlag&6&&f.component?(f.transition=r,Jn(f.component.subTree,r)):f.shapeFlag&128?(f.ssContent.transition=r.clone(f.ssContent),f.ssFallback.transition=r.clone(f.ssFallback)):f.transition=r}Ve().requestIdleCallback;Ve().cancelIdleCallback;function js(f,r,g=ae,_=!1){if(g){const y=g[f]||(g[f]=[]),C=r.__weh||(r.__weh=(...T)=>{se();const c=oo(g),i=Ni(r,g,f,T);return c(),oe(),i});return _?y.unshift(C):y.push(C),C}else if(process.env.NODE_ENV!=="production"){const y=Vr(Hi[f].replace(/ hook$/,""));yt(`${y} 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 Bs=f=>(r,g=ae)=>{(!we||f==="sp")&&js(f,(..._)=>r(..._),g)},Hs=Bs("m"),Ns=Symbol.for("v-ndc"),Ws={};process.env.NODE_ENV!=="production"&&(Ws.ownKeys=f=>(yt("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(f)));let Xs=null;function Ys(f,r,g=!1){const _=Yi();if(_||Xs){let y=_?_.parent==null||_.ce?_.vnode.appContext&&_.vnode.appContext.provides:_.parent.provides:void 0;if(y&&f in y)return y[f];if(arguments.length>1)return g&&Ct(r)?r.call(_&&_.proxy):r;process.env.NODE_ENV!=="production"&&yt(`injection "${String(f)}" not found.`)}else process.env.NODE_ENV!=="production"&&yt("inject() can only be used inside setup() or functional components.")}const Vs=Symbol.for("v-scx"),Us=()=>{{const f=Ys(Vs);return f||process.env.NODE_ENV!=="production"&&yt("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),f}};function Qn(f,r,g){return process.env.NODE_ENV!=="production"&&!Ct(r)&&yt("`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."),zs(f,r,g)}function zs(f,r,g=me){const{immediate:_,deep:y,flush:C,once:T}=g;process.env.NODE_ENV!=="production"&&!r&&(_!==void 0&&yt('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),y!==void 0&&yt('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),T!==void 0&&yt('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const c=Vt({},g);process.env.NODE_ENV!=="production"&&(c.onWarn=yt);const i=r&&_||!r&&C!=="post";let l;if(we){if(C==="sync"){const e=Us();l=e.__watcherHandles||(e.__watcherHandles=[])}else if(!i){const e=()=>{};return e.stop=ee,e.resume=ee,e.pause=ee,e}}const a=ae;c.call=(e,o,h)=>Ni(e,a,o,h);let t=!1;C==="post"?c.scheduler=e=>{qs(e,a&&a.suspense)}:C!=="sync"&&(t=!0,c.scheduler=(e,o)=>{o?e():Un(e)}),c.augmentJob=e=>{r&&(e.flags|=4),t&&(e.flags|=2,a&&(e.id=a.uid,e.i=a))};const n=Cs(f,r,c);return we&&(l?l.push(n):i&&n()),n}const Gs={},Zn=f=>Object.getPrototypeOf(f)===Gs,qs=$s,Ks=f=>f.__isSuspense;function $s(f,r){r&&r.pendingBranch?gt(f)?r.effects.push(...f):r.effects.push(f):Gn(f)}const tr=Symbol.for("v-fgt"),Js=Symbol.for("v-txt"),Qs=Symbol.for("v-cmt");function Zs(f){return f?f.__v_isVNode===!0:!1}const to=(...f)=>ir(...f),er=({key:f})=>f??null,Fe=({ref:f,ref_key:r,ref_for:g})=>(typeof f=="number"&&(f=""+f),f!=null?jt(f)||Ot(f)||Ct(f)?{i:Se,r:f,k:r,f:!!g}:f:null);function eo(f,r=null,g=null,_=0,y=null,C=f===tr?0:1,T=!1,c=!1){const i={__v_isVNode:!0,__v_skip:!0,type:f,props:r,key:r&&er(r),ref:r&&Fe(r),scopeId:Rs,slotScopeIds:null,children:g,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:C,patchFlag:_,dynamicProps:y,dynamicChildren:null,appContext:null,ctx:Se};return c?(Xi(i,g),C&128&&f.normalize(i)):g&&(i.shapeFlag|=jt(g)?8:16),process.env.NODE_ENV!=="production"&&i.key!==i.key&&yt("VNode created with invalid key (NaN). VNode type:",i.type),i}const io=process.env.NODE_ENV!=="production"?to:ir;function ir(f,r=null,g=null,_=0,y=null,C=!1){if((!f||f===Ns)&&(process.env.NODE_ENV!=="production"&&!f&&yt(`Invalid vnode type when creating vnode: ${f}.`),f=Qs),Zs(f)){const c=We(f,r,!0);return g&&Xi(c,g),c.patchFlag=-2,c}if(or(f)&&(f=f.__vccOpts),r){r=no(r);let{class:c,style:i}=r;c&&!jt(c)&&(r.class=Li(c)),xt(i)&&(je(i)&&!gt(i)&&(i=Vt({},i)),r.style=Mi(i))}const T=jt(f)?1:Ks(f)?128:Is(f)?64:xt(f)?4:Ct(f)?2:0;return process.env.NODE_ENV!=="production"&&T&4&&je(f)&&(f=at(f),yt("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: `,f)),eo(f,r,g,_,y,T,C,!0)}function no(f){return f?je(f)||Zn(f)?Vt({},f):f:null}function We(f,r,g=!1,_=!1){const{props:y,ref:C,patchFlag:T,children:c,transition:i}=f,l=r?so(y||{},r):y,a={__v_isVNode:!0,__v_skip:!0,type:f.type,props:l,key:l&&er(l),ref:r&&r.ref?g&&C?gt(C)?C.concat(Fe(r)):[C,Fe(r)]:Fe(r):C,scopeId:f.scopeId,slotScopeIds:f.slotScopeIds,children:process.env.NODE_ENV!=="production"&&T===-1&>(c)?c.map(nr):c,target:f.target,targetStart:f.targetStart,targetAnchor:f.targetAnchor,staticCount:f.staticCount,shapeFlag:f.shapeFlag,patchFlag:r&&f.type!==tr?T===-1?16:T|16:T,dynamicProps:f.dynamicProps,dynamicChildren:f.dynamicChildren,appContext:f.appContext,dirs:f.dirs,transition:i,component:f.component,suspense:f.suspense,ssContent:f.ssContent&&We(f.ssContent),ssFallback:f.ssFallback&&We(f.ssFallback),placeholder:f.placeholder,el:f.el,anchor:f.anchor,ctx:f.ctx,ce:f.ce};return i&&_&&Jn(a,i.clone(a)),a}function nr(f){const r=We(f);return gt(f.children)&&(r.children=f.children.map(nr)),r}function ro(f=" ",r=0){return io(Js,null,f,r)}function Xi(f,r){let g=0;const{shapeFlag:_}=f;if(r==null)r=null;else if(gt(r))g=16;else if(typeof r=="object")if(_&65){const y=r.default;y&&(y._c&&(y._d=!1),Xi(f,y()),y._c&&(y._d=!0));return}else g=32,!r._&&!Zn(r)&&(r._ctx=Se);else Ct(r)?(r={default:r,_ctx:Se},g=32):(r=String(r),_&64?(g=16,r=[ro(r)]):g=8);f.children=r,f.shapeFlag|=g}function so(...f){const r={};for(let g=0;g<f.length;g++){const _=f[g];for(const y in _)if(y==="class")r.class!==_.class&&(r.class=Li([r.class,_.class]));else if(y==="style")r.style=Mi([r.style,_.style]);else if(Br(y)){const C=r[y],T=_[y];T&&C!==T&&!(gt(C)&&C.includes(T))&&(r[y]=C?[].concat(C,T):T)}else y!==""&&(r[y]=_[y])}return r}let ae=null;const Yi=()=>ae||Se;let Pi;{const f=Ve(),r=(g,_)=>{let y;return(y=f[g])||(y=f[g]=[]),y.push(_),C=>{y.length>1?y.forEach(T=>T(C)):y[0](C)}};Pi=r("__VUE_INSTANCE_SETTERS__",g=>ae=g),r("__VUE_SSR_SETTERS__",g=>we=g)}const oo=f=>{const r=ae;return Pi(f),f.scope.on(),()=>{f.scope.off(),Pi(r)}};let we=!1;process.env.NODE_ENV;const ao=/(?:^|[-_])\w/g,lo=f=>f.replace(ao,r=>r.toUpperCase()).replace(/[-_]/g,"");function rr(f,r=!0){return Ct(f)?f.displayName||f.name:f.name||r&&f.__name}function sr(f,r,g=!1){let _=rr(r);if(!_&&r.__file){const y=r.__file.match(/([^/\\]+)\.\w+$/);y&&(_=y[1])}if(!_&&f){const y=C=>{for(const T in C)if(C[T]===r)return T};_=y(f.components)||f.parent&&y(f.parent.type.components)||y(f.appContext.components)}return _?lo(_):g?"App":"Anonymous"}function or(f){return Ct(f)&&"__vccOpts"in f}const ar=(f,r)=>{const g=_s(f,r,we);if(process.env.NODE_ENV!=="production"){const _=Yi();_&&_.appContext.config.warnRecursiveComputed&&(g._warnRecursive=!0)}return g};function co(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const f={style:"color:#3ba776"},r={style:"color:#1677ff"},g={style:"color:#f5222d"},_={style:"color:#eb2f96"},y={__vue_custom_formatter:!0,header(t){if(!xt(t))return null;if(t.__isVue)return["div",f,"VueInstance"];if(Ot(t)){se();const n=t.value;return oe(),["div",{},["span",f,a(t)],"<",c(n),">"]}else{if(ne(t))return["div",{},["span",f,Tt(t)?"ShallowReactive":"Reactive"],"<",c(t),`>${Dt(t)?" (readonly)":""}`];if(Dt(t))return["div",{},["span",f,Tt(t)?"ShallowReadonly":"Readonly"],"<",c(t),">"]}return null},hasBody(t){return t&&t.__isVue},body(t){if(t&&t.__isVue)return["div",{},...C(t.$)]}};function C(t){const n=[];t.type.props&&t.props&&n.push(T("props",at(t.props))),t.setupState!==me&&n.push(T("setup",t.setupState)),t.data!==me&&n.push(T("data",at(t.data)));const e=i(t,"computed");e&&n.push(T("computed",e));const o=i(t,"inject");return o&&n.push(T("injected",o)),n.push(["div",{},["span",{style:_.style+";opacity:0.66"},"$ (internal): "],["object",{object:t}]]),n}function T(t,n){return n=Vt({},n),Object.keys(n).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},t],["div",{style:"padding-left:1.25em"},...Object.keys(n).map(e=>["div",{},["span",_,e+": "],c(n[e],!1)])]]:["span",{}]}function c(t,n=!0){return typeof t=="number"?["span",r,t]:typeof t=="string"?["span",g,JSON.stringify(t)]:typeof t=="boolean"?["span",_,t]:xt(t)?["object",{object:n?at(t):t}]:["span",g,String(t)]}function i(t,n){const e=t.type;if(Ct(e))return;const o={};for(const h in t.ctx)l(e,h,n)&&(o[h]=t.ctx[h]);return o}function l(t,n,e){const o=t[e];if(gt(o)&&o.includes(n)||xt(o)&&n in o||t.extends&&l(t.extends,n,e)||t.mixins&&t.mixins.some(h=>l(h,n,e)))return!0}function a(t){return Tt(t)?"ShallowRef":t.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(y):window.devtoolsFormatters=[y]}process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;function ho(){co()}process.env.NODE_ENV!=="production"&&ho();function uo(){const f=new Set,r=y=>{f.delete(y)};return{on:y=>(f.add(y),{off:()=>r(y)}),off:r,trigger:(...y)=>Promise.all(Array.from(f).map(C=>C(...y)))}}function Te(f){return typeof f=="function"?f():ms(f)}const Oe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fo=Object.prototype.toString,go=f=>fo.call(f)==="[object Object]",po=()=>{},mo=(f,r)=>Object.prototype.hasOwnProperty.call(f,r);function vo(f){let r;function g(){return r||(r=f()),r}return g.reset=async()=>{const _=r;r=void 0,_&&await _},g}function _o(f,r,g={}){const{immediate:_=!0}=g,y=Ut(!1);let C=null;function T(){C&&(clearTimeout(C),C=null)}function c(){y.value=!1,T()}function i(...l){T(),y.value=!0,C=setTimeout(()=>{y.value=!1,C=null,f(...l)},Te(r))}return _&&(y.value=!0,Oe&&i()),{isPending:ye(y),start:i,stop:c}}function yo(f){var r;const g=Te(f);return(r=g?.$el)!=null?r:g}const Co=Oe?window:void 0,bo=Oe?window.document:void 0,lr=Oe?window.navigator:void 0;function cr(...f){let r,g,_,y;if(typeof f[0]=="string"||Array.isArray(f[0])?([g,_,y]=f,r=Co):[r,g,_,y]=f,!r)return po;Array.isArray(g)||(g=[g]),Array.isArray(_)||(_=[_]);const C=[],T=()=>{C.forEach(a=>a()),C.length=0},c=(a,t,n,e)=>(a.addEventListener(t,n,e),()=>a.removeEventListener(t,n,e)),i=Qn(()=>[yo(r),Te(y)],([a,t])=>{if(T(),!a)return;const n=go(t)?{...t}:t;C.push(...g.flatMap(e=>_.map(o=>c(a,e,o,n))))},{immediate:!0,flush:"post"});return()=>{i(),T()}}function So(){const f=Ut(!1),r=Yi();return r&&Hs(()=>{f.value=!0},r),f}function hr(f){const r=So();return ar(()=>(r.value,!!f()))}const he={array:f=>JSON.stringify(f),object:f=>JSON.stringify(f),set:f=>JSON.stringify(Array.from(f)),map:f=>JSON.stringify(Object.fromEntries(f)),null:()=>""};function wo(f){return f?f instanceof Map?he.map:f instanceof Set?he.set:Array.isArray(f)?he.array:he.object:he.null}function xo(f,r){const g=Ut(""),_=Ut();function y(){if(Oe)return _.value=new Promise((C,T)=>{try{const c=Te(f);if(c==null)C("");else if(typeof c=="string")C(ri(new Blob([c],{type:"text/plain"})));else if(c instanceof Blob)C(ri(c));else if(c instanceof ArrayBuffer)C(window.btoa(String.fromCharCode(...new Uint8Array(c))));else if(c instanceof HTMLCanvasElement)C(c.toDataURL(r?.type,r?.quality));else if(c instanceof HTMLImageElement){const i=c.cloneNode(!1);i.crossOrigin="Anonymous",To(i).then(()=>{const l=document.createElement("canvas"),a=l.getContext("2d");l.width=i.width,l.height=i.height,a.drawImage(i,0,0,l.width,l.height),C(l.toDataURL(r?.type,r?.quality))}).catch(T)}else if(typeof c=="object"){const l=(r?.serializer||wo(c))(c);return C(ri(new Blob([l],{type:"application/json"})))}else T(new Error("target is unsupported types"))}catch(c){T(c)}}),_.value.then(C=>g.value=C),_.value}return Ot(f)||typeof f=="function"?Qn(f,y,{immediate:!0}):y(),{base64:g,promise:_,execute:y}}function To(f){return new Promise((r,g)=>{f.complete?r():(f.onload=()=>{r()},f.onerror=g)})}function ri(f){return new Promise((r,g)=>{const _=new FileReader;_.onload=y=>{r(y.target.result)},_.onerror=g,_.readAsDataURL(f)})}function en(f,r={}){const{controls:g=!1,navigator:_=lr}=r,y=hr(()=>_&&"permissions"in _);let C;const T=typeof f=="string"?{name:f}:f,c=Ut(),i=()=>{C&&(c.value=C.state)},l=vo(async()=>{if(y.value){if(!C)try{C=await _.permissions.query(T),cr(C,"change",i),i()}catch{c.value="prompt"}return C}});return l(),g?{state:c,isSupported:y,query:l}:c}function Oo(f={}){const{navigator:r=lr,read:g=!1,source:_,copiedDuring:y=1500,legacy:C=!1}=f,T=hr(()=>r&&"clipboard"in r),c=en("clipboard-read"),i=en("clipboard-write"),l=ar(()=>T.value||C),a=Ut(""),t=Ut(!1),n=_o(()=>t.value=!1,y);function e(){T.value&&u(c.value)?r.clipboard.readText().then(d=>{a.value=d}):a.value=s()}l.value&&g&&cr(["copy","cut"],e);async function o(d=Te(_)){l.value&&d!=null&&(T.value&&u(i.value)?await r.clipboard.writeText(d):h(d),a.value=d,t.value=!0,n.start())}function h(d){const m=document.createElement("textarea");m.value=d??"",m.style.position="absolute",m.style.opacity="0",document.body.appendChild(m),m.select(),document.execCommand("copy"),m.remove()}function s(){var d,m,p;return(p=(m=(d=document?.getSelection)==null?void 0:d.call(document))==null?void 0:m.toString())!=null?p:""}function u(d){return d==="granted"||d==="prompt"}return{isSupported:l,text:a,copied:t,copy:o}}const Eo={multiple:!0,accept:"*",reset:!1,directory:!1};function Po(f={}){const{document:r=bo}=f,g=Ut(null),{on:_,trigger:y}=uo();let C;r&&(C=r.createElement("input"),C.type="file",C.onchange=i=>{const l=i.target;g.value=l.files,y(g.value)});const T=()=>{g.value=null,C&&C.value&&(C.value="",y(null))},c=i=>{if(!C)return;const l={...Eo,...f,...i};C.multiple=l.multiple,C.accept=l.accept,C.webkitdirectory=l.directory,mo(l,"capture")&&(C.capture=l.capture),l.reset&&T(),C.click()};return{files:ye(g),open:c,reset:T,onChange:_}}function ko(f){return xo(f).promise.value}function ur(f){return new Promise(r=>{const{onChange:g,open:_}=Po(f);g(y=>{r(y)}),_()})}function Ao(f){return new Promise(r=>{const g=document.createElement("img");g.src=f,document.body.appendChild(g),g.onload=()=>{r(g)}})}const ki=(f,r)=>Oo({source:f,...r}).copy();function Re(f,r){const g=document.createElement("a");g.href=f,g.download=`${On()}.${r}`,document.body.appendChild(g),g.click(),g.remove()}function Do(f,r,g,_,y,C,T){T!==void 0&&(f.save(),f.translate(r,g),f.rotate(T),f.drawImage(_,-y/2,-C/2,y,C),f.restore())}const Mo=f=>f instanceof fabric.Image,Lo=f=>f instanceof fabric.Group,Fo=f=>f instanceof fabric.IText,Ro=f=>f instanceof fabric.ActiveSelection;function Io(f){return new Promise(r=>{const g=new FileReader;g.addEventListener("load",()=>{r(g.result)}),g.readAsDataURL(f)})}function jo(f){if(!f)return null;const r=f.split(","),g=r[0].match(/:(.*?);/)[1],_=window.atob(r[1]),y=new ArrayBuffer(_.length),C=new Uint8Array(y);for(let T=0;T<_.length;T++)C[T]=_.charCodeAt(T);return[new Blob([y],{type:g}),g.slice(6)]}const fr={getImgStr:ko,downFile:Re,selectFiles:ur,insertImgFile:Ao,clipboardText:ki,drawImg:Do,isImage:Mo,isGroup:Lo,isIText:Fo,isActiveSelection:Ro,blobToBase64:Io,base64ToBlob:jo};var si={};const Bo=new Proxy({},{get(f,r){throw new Error(`Module "" has been externalized for browser compatibility. Cannot access ".${r}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`)}}),Ho=Object.freeze(Object.defineProperty({__proto__:null,default:Bo},Symbol.toStringTag,{value:"Module"})),oi=yr(Ho);var nn;function No(){return nn||(nn=1,(function(f){var r=r||{version:"5.3.0"};if(f.fabric=r,typeof document<"u"&&typeof window<"u")document instanceof(typeof HTMLDocument<"u"?HTMLDocument:Document)?r.document=document:r.document=document.implementation.createHTMLDocument(""),r.window=window;else{var g=oi,_=new g.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;r.document=_.document,r.jsdomImplForWrapper=oi.implForWrapper,r.nodeCanvas=oi.Canvas,r.window=_,DOMParser=r.window.DOMParser}r.isTouchSupported="ontouchstart"in r.window||"ontouchstart"in r.document||r.window&&r.window.navigator&&r.window.navigator.maxTouchPoints>0,r.isLikelyNode=typeof Buffer<"u"&&typeof window>"u",r.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"],r.DPI=96,r.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",r.commaWsp="(?:\\s+,?\\s*|,\\s*)",r.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/ig,r.reNonWord=/[ \n\.,;!\?\-]/,r.fontPaths={},r.iMatrix=[1,0,0,1,0,0],r.svgNS="http://www.w3.org/2000/svg",r.perfLimitSizeTotal=2097152,r.maxCacheSideLimit=4096,r.minCacheSideLimit=256,r.charWidthsCache={},r.textureSize=2048,r.disableStyleCopyPaste=!1,r.enableGLFiltering=!0,r.devicePixelRatio=r.window.devicePixelRatio||r.window.webkitDevicePixelRatio||r.window.mozDevicePixelRatio||1,r.browserShadowBlurConstant=1,r.arcToSegmentsCache={},r.boundsOfCurveCache={},r.cachesBoundsOfCurve=!0,r.forceGLPutImageData=!1,r.initFilterBackend=function(){if(r.enableGLFiltering&&r.isWebglSupported&&r.isWebglSupported(r.textureSize))return console.log("max texture size: "+r.maxTextureSize),new r.WebglFilterBackend({tileSize:r.textureSize});if(r.Canvas2dFilterBackend)return new r.Canvas2dFilterBackend},typeof document<"u"&&typeof window<"u"&&(window.fabric=r),(function(){function c(e,o){if(this.__eventListeners[e]){var h=this.__eventListeners[e];o?h[h.indexOf(o)]=!1:r.util.array.fill(h,!1)}}function i(e,o){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(o);return this}function l(e,o){var h=(function(){o.apply(this,arguments),this.off(e,h)}).bind(this);this.on(e,h)}function a(e,o){if(arguments.length===1)for(var h in e)l.call(this,h,e[h]);else l.call(this,e,o);return this}function t(e,o){if(!this.__eventListeners)return this;if(arguments.length===0)for(e in this.__eventListeners)c.call(this,e);else if(arguments.length===1&&typeof arguments[0]=="object")for(var h in e)c.call(this,h,e[h]);else c.call(this,e,o);return this}function n(e,o){if(!this.__eventListeners)return this;var h=this.__eventListeners[e];if(!h)return this;for(var s=0,u=h.length;s<u;s++)h[s]&&h[s].call(this,o||{});return this.__eventListeners[e]=h.filter(function(d){return d!==!1}),this}r.Observable={fire:n,on:i,once:a,off:t}})(),r.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var c=0,i=arguments.length;c<i;c++)this._onObjectAdded(arguments[c]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(c,i,l){var a=this._objects;return l?a[i]=c:a.splice(i,0,c),this._onObjectAdded&&this._onObjectAdded(c),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var c=this._objects,i,l=!1,a=0,t=arguments.length;a<t;a++)i=c.indexOf(arguments[a]),i!==-1&&(l=!0,c.splice(i,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[a]));return this.renderOnAddRemove&&l&&this.requestRenderAll(),this},forEachObject:function(c,i){for(var l=this.getObjects(),a=0,t=l.length;a<t;a++)c.call(i,l[a],a,l);return this},getObjects:function(c){return typeof c>"u"?this._objects.concat():this._objects.filter(function(i){return i.type===c})},item:function(c){return this._objects[c]},isEmpty:function(){return this._objects.length===0},size:function(){return this._objects.length},contains:function(c,i){return this._objects.indexOf(c)>-1?!0:i?this._objects.some(function(l){return typeof l.contains=="function"&&l.contains(c,!0)}):!1},complexity:function(){return this._objects.reduce(function(c,i){return c+=i.complexity?i.complexity():0,c},0)}},r.CommonMethods={_setOptions:function(c){for(var i in c)this.set(i,c[i])},_initGradient:function(c,i){c&&c.colorStops&&!(c instanceof r.Gradient)&&this.set(i,new r.Gradient(c))},_initPattern:function(c,i,l){c&&c.source&&!(c instanceof r.Pattern)?this.set(i,new r.Pattern(c,l)):l&&l()},_setObject:function(c){for(var i in c)this._set(i,c[i])},set:function(c,i){return typeof c=="object"?this._setObject(c):this._set(c,i),this},_set:function(c,i){this[c]=i},toggle:function(c){var i=this.get(c);return typeof i=="boolean"&&this.set(c,!i),this},get:function(c){return this[c]}},(function(c){var i=Math.sqrt,l=Math.atan2,a=Math.pow,t=Math.PI/180,n=Math.PI/2;r.util={cos:function(e){if(e===0)return 1;e<0&&(e=-e);var o=e/n;switch(o){case 1:case 3:return 0;case 2:return-1}return Math.cos(e)},sin:function(e){if(e===0)return 0;var o=e/n,h=1;switch(e<0&&(h=-1),o){case 1:return h;case 2:return 0;case 3:return-h}return Math.sin(e)},removeFromArray:function(e,o){var h=e.indexOf(o);return h!==-1&&e.splice(h,1),e},getRandomInt:function(e,o){return Math.floor(Math.random()*(o-e+1))+e},degreesToRadians:function(e){return e*t},radiansToDegrees:function(e){return e/t},rotatePoint:function(e,o,h){var s=new r.Point(e.x-o.x,e.y-o.y),u=r.util.rotateVector(s,h);return new r.Point(u.x,u.y).addEquals(o)},rotateVector:function(e,o){var h=r.util.sin(o),s=r.util.cos(o),u=e.x*s-e.y*h,d=e.x*h+e.y*s;return{x:u,y:d}},createVector:function(e,o){return new r.Point(o.x-e.x,o.y-e.y)},calcAngleBetweenVectors:function(e,o){return Math.acos((e.x*o.x+e.y*o.y)/(Math.hypot(e.x,e.y)*Math.hypot(o.x,o.y)))},getHatVector:function(e){return new r.Point(e.x,e.y).multiply(1/Math.hypot(e.x,e.y))},getBisector:function(e,o,h){var s=r.util.createVector(e,o),u=r.util.createVector(e,h),d=r.util.calcAngleBetweenVectors(s,u),m=r.util.calcAngleBetweenVectors(r.util.rotateVector(s,d),u),p=d*(m===0?1:-1)/2;return{vector:r.util.getHatVector(r.util.rotateVector(s,p)),angle:d}},projectStrokeOnPoints:function(e,o,h){var s=[],u=o.strokeWidth/2,d=o.strokeUniform?new r.Point(1/o.scaleX,1/o.scaleY):new r.Point(1,1),m=function(p){var v=u/Math.hypot(p.x,p.y);return new r.Point(p.x*v*d.x,p.y*v*d.y)};return e.length<=1||e.forEach(function(p,v){var b=new r.Point(p.x,p.y),S,E;v===0?(E=e[v+1],S=h?m(r.util.createVector(E,b)).addEquals(b):e[e.length-1]):v===e.length-1?(S=e[v-1],E=h?m(r.util.createVector(S,b)).addEquals(b):e[0]):(S=e[v-1],E=e[v+1]);var F=r.util.getBisector(b,S,E),R=F.vector,z=F.angle,K,Z;if(o.strokeLineJoin==="miter"&&(K=-u/Math.sin(z/2),Z=new r.Point(R.x*K*d.x,R.y*K*d.y),Math.hypot(Z.x,Z.y)/u<=o.strokeMiterLimit)){s.push(b.add(Z)),s.push(b.subtract(Z));return}K=-u*Math.SQRT2,Z=new r.Point(R.x*K*d.x,R.y*K*d.y),s.push(b.add(Z)),s.push(b.subtract(Z))}),s},transformPoint:function(e,o,h){return h?new r.Point(o[0]*e.x+o[2]*e.y,o[1]*e.x+o[3]*e.y):new r.Point(o[0]*e.x+o[2]*e.y+o[4],o[1]*e.x+o[3]*e.y+o[5])},makeBoundingBoxFromPoints:function(e,o){if(o)for(var h=0;h<e.length;h++)e[h]=r.util.transformPoint(e[h],o);var s=[e[0].x,e[1].x,e[2].x,e[3].x],u=r.util.array.min(s),d=r.util.array.max(s),m=d-u,p=[e[0].y,e[1].y,e[2].y,e[3].y],v=r.util.array.min(p),b=r.util.array.max(p),S=b-v;return{left:u,top:v,width:m,height:S}},invertTransform:function(e){var o=1/(e[0]*e[3]-e[1]*e[2]),h=[o*e[3],-o*e[1],-o*e[2],o*e[0]],s=r.util.transformPoint({x:e[4],y:e[5]},h,!0);return h[4]=-s.x,h[5]=-s.y,h},toFixed:function(e,o){return parseFloat(Number(e).toFixed(o))},parseUnit:function(e,o){var h=/\D{0,2}$/.exec(e),s=parseFloat(e);switch(o||(o=r.Text.DEFAULT_SVG_FONT_SIZE),h[0]){case"mm":return s*r.DPI/25.4;case"cm":return s*r.DPI/2.54;case"in":return s*r.DPI;case"pt":return s*r.DPI/72;case"pc":return s*r.DPI/72*12;case"em":return s*o;default:return s}},falseFunction:function(){return!1},getKlass:function(e,o){return e=r.util.string.camelize(e.charAt(0).toUpperCase()+e.slice(1)),r.util.resolveNamespace(o)[e]},getSvgAttributes:function(e){var o=["instantiated_by_use","style","id","class"];switch(e){case"linearGradient":o=o.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":o=o.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":o=o.concat(["offset","stop-color","stop-opacity"]);break}return o},resolveNamespace:function(e){if(!e)return r;var o=e.split("."),h=o.length,s,u=c||r.window;for(s=0;s<h;++s)u=u[o[s]];return u},loadImage:function(e,o,h,s){if(!e){o&&o.call(h,e);return}var u=r.util.createImage(),d=function(){o&&o.call(h,u,!1),u=u.onload=u.onerror=null};u.onload=d,u.onerror=function(){r.log("Error loading "+u.src),o&&o.call(h,null,!0),u=u.onload=u.onerror=null},e.indexOf("data")!==0&&s!==void 0&&s!==null&&(u.crossOrigin=s),e.substring(0,14)==="data:image/svg"&&(u.onload=null,r.util.loadImageInDom(u,d)),u.src=e},loadImageInDom:function(e,o){var h=r.document.createElement("div");h.style.width=h.style.height="1px",h.style.left=h.style.top="-100%",h.style.position="absolute",h.appendChild(e),r.document.querySelector("body").appendChild(h),e.onload=function(){o(),h.parentNode.removeChild(h),h=null}},enlivenObjects:function(e,o,h,s){e=e||[];var u=[],d=0,m=e.length;function p(){++d===m&&o&&o(u.filter(function(v){return v}))}if(!m){o&&o(u);return}e.forEach(function(v,b){if(!v||!v.type){p();return}var S=r.util.getKlass(v.type,h);S.fromObject(v,function(E,F){F||(u[b]=E),s&&s(v,E,F),p()})})},enlivenObjectEnlivables:function(e,o,h){var s=r.Object.ENLIVEN_PROPS.filter(function(u){return!!e[u]});r.util.enlivenObjects(s.map(function(u){return e[u]}),function(u){var d={};s.forEach(function(m,p){d[m]=u[p],o&&(o[m]=u[p])}),h&&h(d)})},enlivenPatterns:function(e,o){e=e||[];function h(){++u===d&&o&&o(s)}var s=[],u=0,d=e.length;if(!d){o&&o(s);return}e.forEach(function(m,p){m&&m.source?new r.Pattern(m,function(v){s[p]=v,h()}):(s[p]=m,h())})},groupSVGElements:function(e,o,h){var s;return e&&e.length===1?(typeof h<"u"&&(e[0].sourcePath=h),e[0]):(o&&(o.width&&o.height?o.centerPoint={x:o.width/2,y:o.height/2}:(delete o.width,delete o.height)),s=new r.Group(e,o),typeof h<"u"&&(s.sourcePath=h),s)},populateWithProperties:function(e,o,h){if(h&&Array.isArray(h))for(var s=0,u=h.length;s<u;s++)h[s]in e&&(o[h[s]]=e[h[s]])},createCanvasElement:function(){return r.document.createElement("canvas")},copyCanvasElement:function(e){var o=r.util.createCanvasElement();return o.width=e.width,o.height=e.height,o.getContext("2d").drawImage(e,0,0),o},toDataURL:function(e,o,h){return e.toDataURL("image/"+o,h)},createImage:function(){return r.document.createElement("img")},multiplyTransformMatrices:function(e,o,h){return[e[0]*o[0]+e[2]*o[1],e[1]*o[0]+e[3]*o[1],e[0]*o[2]+e[2]*o[3],e[1]*o[2]+e[3]*o[3],h?0:e[0]*o[4]+e[2]*o[5]+e[4],h?0:e[1]*o[4]+e[3]*o[5]+e[5]]},qrDecompose:function(e){var o=l(e[1],e[0]),h=a(e[0],2)+a(e[1],2),s=i(h),u=(e[0]*e[3]-e[2]*e[1])/s,d=l(e[0]*e[2]+e[1]*e[3],h);return{angle:o/t,scaleX:s,scaleY:u,skewX:d/t,skewY:0,translateX:e[4],translateY:e[5]}},calcRotateMatrix:function(e){if(!e.angle)return r.iMatrix.concat();var o=r.util.degreesToRadians(e.angle),h=r.util.cos(o),s=r.util.sin(o);return[h,s,-s,h,0,0]},calcDimensionsMatrix:function(e){var o=typeof e.scaleX>"u"?1:e.scaleX,h=typeof e.scaleY>"u"?1:e.scaleY,s=[e.flipX?-o:o,0,0,e.flipY?-h:h,0,0],u=r.util.multiplyTransformMatrices,d=r.util.degreesToRadians;return e.skewX&&(s=u(s,[1,0,Math.tan(d(e.skewX)),1],!0)),e.skewY&&(s=u(s,[1,Math.tan(d(e.skewY)),0,1],!0)),s},composeMatrix:function(e){var o=[1,0,0,1,e.translateX||0,e.translateY||0],h=r.util.multiplyTransformMatrices;return e.angle&&(o=h(o,r.util.calcRotateMatrix(e))),(e.scaleX!==1||e.scaleY!==1||e.skewX||e.skewY||e.flipX||e.flipY)&&(o=h(o,r.util.calcDimensionsMatrix(e))),o},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,o,h,s){s>0&&(o>s?o-=s:o=0,h>s?h-=s:h=0);var u=!0,d,m,p=e.getImageData(o,h,s*2||1,s*2||1),v=p.data.length;for(d=3;d<v&&(m=p.data[d],u=m<=0,u!==!1);d+=4);return p=null,u},parsePreserveAspectRatioAttribute:function(e){var o="meet",h="Mid",s="Mid",u=e.split(" "),d;return u&&u.length&&(o=u.pop(),o!=="meet"&&o!=="slice"?(d=o,o="meet"):u.length&&(d=u.pop())),h=d!=="none"?d.slice(1,4):"none",s=d!=="none"?d.slice(5,8):"none",{meetOrSlice:o,alignX:h,alignY:s}},clearFabricFontCache:function(e){e=(e||"").toLowerCase(),e?r.charWidthsCache[e]&&delete r.charWidthsCache[e]:r.charWidthsCache={}},limitDimsByArea:function(e,o){var h=Math.sqrt(o*e),s=Math.floor(o/h);return{x:Math.floor(h),y:s}},capValue:function(e,o,h){return Math.max(e,Math.min(o,h))},findScaleToFit:function(e,o){return Math.min(o.width/e.width,o.height/e.height)},findScaleToCover:function(e,o){return Math.max(o.width/e.width,o.height/e.height)},matrixToSVG:function(e){return"matrix("+e.map(function(o){return r.util.toFixed(o,r.Object.NUM_FRACTION_DIGITS)}).join(" ")+")"},removeTransformFromObject:function(e,o){var h=r.util.invertTransform(o),s=r.util.multiplyTransformMatrices(h,e.calcOwnMatrix());r.util.applyTransformToObject(e,s)},addTransformToObject:function(e,o){r.util.applyTransformToObject(e,r.util.multiplyTransformMatrices(o,e.calcOwnMatrix()))},applyTransformToObject:function(e,o){var h=r.util.qrDecompose(o),s=new r.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(s,"center","center")},sizeAfterTransform:function(e,o,h){var s=e/2,u=o/2,d=[{x:-s,y:-u},{x:s,y:-u},{x:-s,y:u},{x:s,y:u}],m=r.util.calcDimensionsMatrix(h),p=r.util.makeBoundingBoxFromPoints(d,m);return{x:p.width,y:p.height}},mergeClipPaths:function(e,o){var h=e,s=o;h.inverted&&!s.inverted&&(h=o,s=e),r.util.applyTransformToObject(s,r.util.multiplyTransformMatrices(r.util.invertTransform(h.calcTransformMatrix()),s.calcTransformMatrix()));var u=h.inverted&&s.inverted;return u&&(h.inverted=s.inverted=!1),new r.Group([h],{clipPath:s,inverted:u})},hasStyleChanged:function(e,o,h){return h=h||!1,e.fill!==o.fill||e.stroke!==o.stroke||e.strokeWidth!==o.strokeWidth||e.fontSize!==o.fontSize||e.fontFamily!==o.fontFamily||e.fontWeight!==o.fontWeight||e.fontStyle!==o.fontStyle||e.textBackgroundColor!==o.textBackgroundColor||e.deltaY!==o.deltaY||h&&(e.overline!==o.overline||e.underline!==o.underline||e.linethrough!==o.linethrough)},stylesToArray:function(h,o){for(var h=r.util.object.clone(h,!0),s=o.split(`
|
|
5
|
+
Component that was made reactive: `,f)),eo(f,r,g,_,y,T,C,!0)}function no(f){return f?je(f)||Zn(f)?Vt({},f):f:null}function We(f,r,g=!1,_=!1){const{props:y,ref:C,patchFlag:T,children:c,transition:i}=f,l=r?so(y||{},r):y,a={__v_isVNode:!0,__v_skip:!0,type:f.type,props:l,key:l&&er(l),ref:r&&r.ref?g&&C?gt(C)?C.concat(Fe(r)):[C,Fe(r)]:Fe(r):C,scopeId:f.scopeId,slotScopeIds:f.slotScopeIds,children:process.env.NODE_ENV!=="production"&&T===-1&>(c)?c.map(nr):c,target:f.target,targetStart:f.targetStart,targetAnchor:f.targetAnchor,staticCount:f.staticCount,shapeFlag:f.shapeFlag,patchFlag:r&&f.type!==tr?T===-1?16:T|16:T,dynamicProps:f.dynamicProps,dynamicChildren:f.dynamicChildren,appContext:f.appContext,dirs:f.dirs,transition:i,component:f.component,suspense:f.suspense,ssContent:f.ssContent&&We(f.ssContent),ssFallback:f.ssFallback&&We(f.ssFallback),placeholder:f.placeholder,el:f.el,anchor:f.anchor,ctx:f.ctx,ce:f.ce};return i&&_&&Jn(a,i.clone(a)),a}function nr(f){const r=We(f);return gt(f.children)&&(r.children=f.children.map(nr)),r}function ro(f=" ",r=0){return io(Js,null,f,r)}function Xi(f,r){let g=0;const{shapeFlag:_}=f;if(r==null)r=null;else if(gt(r))g=16;else if(typeof r=="object")if(_&65){const y=r.default;y&&(y._c&&(y._d=!1),Xi(f,y()),y._c&&(y._d=!0));return}else g=32,!r._&&!Zn(r)&&(r._ctx=Se);else Ct(r)?(r={default:r,_ctx:Se},g=32):(r=String(r),_&64?(g=16,r=[ro(r)]):g=8);f.children=r,f.shapeFlag|=g}function so(...f){const r={};for(let g=0;g<f.length;g++){const _=f[g];for(const y in _)if(y==="class")r.class!==_.class&&(r.class=Li([r.class,_.class]));else if(y==="style")r.style=Mi([r.style,_.style]);else if(Br(y)){const C=r[y],T=_[y];T&&C!==T&&!(gt(C)&&C.includes(T))&&(r[y]=C?[].concat(C,T):T)}else y!==""&&(r[y]=_[y])}return r}let ae=null;const Yi=()=>ae||Se;let Pi;{const f=Ve(),r=(g,_)=>{let y;return(y=f[g])||(y=f[g]=[]),y.push(_),C=>{y.length>1?y.forEach(T=>T(C)):y[0](C)}};Pi=r("__VUE_INSTANCE_SETTERS__",g=>ae=g),r("__VUE_SSR_SETTERS__",g=>we=g)}const oo=f=>{const r=ae;return Pi(f),f.scope.on(),()=>{f.scope.off(),Pi(r)}};let we=!1;process.env.NODE_ENV;const ao=/(?:^|[-_])\w/g,lo=f=>f.replace(ao,r=>r.toUpperCase()).replace(/[-_]/g,"");function rr(f,r=!0){return Ct(f)?f.displayName||f.name:f.name||r&&f.__name}function sr(f,r,g=!1){let _=rr(r);if(!_&&r.__file){const y=r.__file.match(/([^/\\]+)\.\w+$/);y&&(_=y[1])}if(!_&&f){const y=C=>{for(const T in C)if(C[T]===r)return T};_=y(f.components)||f.parent&&y(f.parent.type.components)||y(f.appContext.components)}return _?lo(_):g?"App":"Anonymous"}function or(f){return Ct(f)&&"__vccOpts"in f}const ar=(f,r)=>{const g=_s(f,r,we);if(process.env.NODE_ENV!=="production"){const _=Yi();_&&_.appContext.config.warnRecursiveComputed&&(g._warnRecursive=!0)}return g};function co(){if(process.env.NODE_ENV==="production"||typeof window>"u")return;const f={style:"color:#3ba776"},r={style:"color:#1677ff"},g={style:"color:#f5222d"},_={style:"color:#eb2f96"},y={__vue_custom_formatter:!0,header(t){if(!xt(t))return null;if(t.__isVue)return["div",f,"VueInstance"];if(Ot(t)){se();const n=t.value;return oe(),["div",{},["span",f,a(t)],"<",c(n),">"]}else{if(ne(t))return["div",{},["span",f,Tt(t)?"ShallowReactive":"Reactive"],"<",c(t),`>${Dt(t)?" (readonly)":""}`];if(Dt(t))return["div",{},["span",f,Tt(t)?"ShallowReadonly":"Readonly"],"<",c(t),">"]}return null},hasBody(t){return t&&t.__isVue},body(t){if(t&&t.__isVue)return["div",{},...C(t.$)]}};function C(t){const n=[];t.type.props&&t.props&&n.push(T("props",at(t.props))),t.setupState!==me&&n.push(T("setup",t.setupState)),t.data!==me&&n.push(T("data",at(t.data)));const e=i(t,"computed");e&&n.push(T("computed",e));const o=i(t,"inject");return o&&n.push(T("injected",o)),n.push(["div",{},["span",{style:_.style+";opacity:0.66"},"$ (internal): "],["object",{object:t}]]),n}function T(t,n){return n=Vt({},n),Object.keys(n).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},t],["div",{style:"padding-left:1.25em"},...Object.keys(n).map(e=>["div",{},["span",_,e+": "],c(n[e],!1)])]]:["span",{}]}function c(t,n=!0){return typeof t=="number"?["span",r,t]:typeof t=="string"?["span",g,JSON.stringify(t)]:typeof t=="boolean"?["span",_,t]:xt(t)?["object",{object:n?at(t):t}]:["span",g,String(t)]}function i(t,n){const e=t.type;if(Ct(e))return;const o={};for(const h in t.ctx)l(e,h,n)&&(o[h]=t.ctx[h]);return o}function l(t,n,e){const o=t[e];if(gt(o)&&o.includes(n)||xt(o)&&n in o||t.extends&&l(t.extends,n,e)||t.mixins&&t.mixins.some(h=>l(h,n,e)))return!0}function a(t){return Tt(t)?"ShallowRef":t.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(y):window.devtoolsFormatters=[y]}process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;function ho(){co()}process.env.NODE_ENV!=="production"&&ho();function uo(){const f=new Set,r=y=>{f.delete(y)};return{on:y=>(f.add(y),{off:()=>r(y)}),off:r,trigger:(...y)=>Promise.all(Array.from(f).map(C=>C(...y)))}}function Te(f){return typeof f=="function"?f():ms(f)}const Oe=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fo=Object.prototype.toString,go=f=>fo.call(f)==="[object Object]",po=()=>{},mo=(f,r)=>Object.prototype.hasOwnProperty.call(f,r);function vo(f){let r;function g(){return r||(r=f()),r}return g.reset=async()=>{const _=r;r=void 0,_&&await _},g}function _o(f,r,g={}){const{immediate:_=!0}=g,y=Ut(!1);let C=null;function T(){C&&(clearTimeout(C),C=null)}function c(){y.value=!1,T()}function i(...l){T(),y.value=!0,C=setTimeout(()=>{y.value=!1,C=null,f(...l)},Te(r))}return _&&(y.value=!0,Oe&&i()),{isPending:ye(y),start:i,stop:c}}function yo(f){var r;const g=Te(f);return(r=g?.$el)!=null?r:g}const Co=Oe?window:void 0,bo=Oe?window.document:void 0,lr=Oe?window.navigator:void 0;function cr(...f){let r,g,_,y;if(typeof f[0]=="string"||Array.isArray(f[0])?([g,_,y]=f,r=Co):[r,g,_,y]=f,!r)return po;Array.isArray(g)||(g=[g]),Array.isArray(_)||(_=[_]);const C=[],T=()=>{C.forEach(a=>a()),C.length=0},c=(a,t,n,e)=>(a.addEventListener(t,n,e),()=>a.removeEventListener(t,n,e)),i=Qn(()=>[yo(r),Te(y)],([a,t])=>{if(T(),!a)return;const n=go(t)?{...t}:t;C.push(...g.flatMap(e=>_.map(o=>c(a,e,o,n))))},{immediate:!0,flush:"post"});return()=>{i(),T()}}function So(){const f=Ut(!1),r=Yi();return r&&Hs(()=>{f.value=!0},r),f}function hr(f){const r=So();return ar(()=>(r.value,!!f()))}const he={array:f=>JSON.stringify(f),object:f=>JSON.stringify(f),set:f=>JSON.stringify(Array.from(f)),map:f=>JSON.stringify(Object.fromEntries(f)),null:()=>""};function wo(f){return f?f instanceof Map?he.map:f instanceof Set?he.set:Array.isArray(f)?he.array:he.object:he.null}function xo(f,r){const g=Ut(""),_=Ut();function y(){if(Oe)return _.value=new Promise((C,T)=>{try{const c=Te(f);if(c==null)C("");else if(typeof c=="string")C(ri(new Blob([c],{type:"text/plain"})));else if(c instanceof Blob)C(ri(c));else if(c instanceof ArrayBuffer)C(window.btoa(String.fromCharCode(...new Uint8Array(c))));else if(c instanceof HTMLCanvasElement)C(c.toDataURL(r?.type,r?.quality));else if(c instanceof HTMLImageElement){const i=c.cloneNode(!1);i.crossOrigin="Anonymous",To(i).then(()=>{const l=document.createElement("canvas"),a=l.getContext("2d");l.width=i.width,l.height=i.height,a.drawImage(i,0,0,l.width,l.height),C(l.toDataURL(r?.type,r?.quality))}).catch(T)}else if(typeof c=="object"){const l=(r?.serializer||wo(c))(c);return C(ri(new Blob([l],{type:"application/json"})))}else T(new Error("target is unsupported types"))}catch(c){T(c)}}),_.value.then(C=>g.value=C),_.value}return Ot(f)||typeof f=="function"?Qn(f,y,{immediate:!0}):y(),{base64:g,promise:_,execute:y}}function To(f){return new Promise((r,g)=>{f.complete?r():(f.onload=()=>{r()},f.onerror=g)})}function ri(f){return new Promise((r,g)=>{const _=new FileReader;_.onload=y=>{r(y.target.result)},_.onerror=g,_.readAsDataURL(f)})}function en(f,r={}){const{controls:g=!1,navigator:_=lr}=r,y=hr(()=>_&&"permissions"in _);let C;const T=typeof f=="string"?{name:f}:f,c=Ut(),i=()=>{C&&(c.value=C.state)},l=vo(async()=>{if(y.value){if(!C)try{C=await _.permissions.query(T),cr(C,"change",i),i()}catch{c.value="prompt"}return C}});return l(),g?{state:c,isSupported:y,query:l}:c}function Oo(f={}){const{navigator:r=lr,read:g=!1,source:_,copiedDuring:y=1500,legacy:C=!1}=f,T=hr(()=>r&&"clipboard"in r),c=en("clipboard-read"),i=en("clipboard-write"),l=ar(()=>T.value||C),a=Ut(""),t=Ut(!1),n=_o(()=>t.value=!1,y);function e(){T.value&&u(c.value)?r.clipboard.readText().then(d=>{a.value=d}):a.value=s()}l.value&&g&&cr(["copy","cut"],e);async function o(d=Te(_)){l.value&&d!=null&&(T.value&&u(i.value)?await r.clipboard.writeText(d):h(d),a.value=d,t.value=!0,n.start())}function h(d){const m=document.createElement("textarea");m.value=d??"",m.style.position="absolute",m.style.opacity="0",document.body.appendChild(m),m.select(),document.execCommand("copy"),m.remove()}function s(){var d,m,p;return(p=(m=(d=document?.getSelection)==null?void 0:d.call(document))==null?void 0:m.toString())!=null?p:""}function u(d){return d==="granted"||d==="prompt"}return{isSupported:l,text:a,copied:t,copy:o}}const Eo={multiple:!0,accept:"*",reset:!1,directory:!1};function Po(f={}){const{document:r=bo}=f,g=Ut(null),{on:_,trigger:y}=uo();let C;r&&(C=r.createElement("input"),C.type="file",C.onchange=i=>{const l=i.target;g.value=l.files,y(g.value)});const T=()=>{g.value=null,C&&C.value&&(C.value="",y(null))},c=i=>{if(!C)return;const l={...Eo,...f,...i};C.multiple=l.multiple,C.accept=l.accept,C.webkitdirectory=l.directory,mo(l,"capture")&&(C.capture=l.capture),l.reset&&T(),C.click()};return{files:ye(g),open:c,reset:T,onChange:_}}function ko(f){return xo(f).promise.value}function ur(f){return new Promise(r=>{const{onChange:g,open:_}=Po(f);g(y=>{r(y)}),_()})}function Ao(f){return new Promise(r=>{const g=document.createElement("img");g.src=f,document.body.appendChild(g),g.onload=()=>{r(g)}})}const ki=(f,r)=>Oo({source:f,...r}).copy();function Re(f,r){const g=document.createElement("a");g.href=f,g.download=`${On()}.${r}`,document.body.appendChild(g),g.click(),g.remove()}function Do(f,r,g,_,y,C,T){T!==void 0&&(f.save(),f.translate(r,g),f.rotate(T),f.drawImage(_,-y/2,-C/2,y,C),f.restore())}const Mo=f=>f instanceof fabric.Image,Lo=f=>f instanceof fabric.Group,Fo=f=>f instanceof fabric.IText,Ro=f=>f instanceof fabric.ActiveSelection;function Io(f){return new Promise(r=>{const g=new FileReader;g.addEventListener("load",()=>{r(g.result)}),g.readAsDataURL(f)})}function jo(f){if(!f)return null;const r=f.split(","),g=r[0].match(/:(.*?);/)[1],_=window.atob(r[1]),y=new ArrayBuffer(_.length),C=new Uint8Array(y);for(let T=0;T<_.length;T++)C[T]=_.charCodeAt(T);return[new Blob([y],{type:g}),g.slice(6)]}const fr={getImgStr:ko,downFile:Re,selectFiles:ur,insertImgFile:Ao,clipboardText:ki,drawImg:Do,isImage:Mo,isGroup:Lo,isIText:Fo,isActiveSelection:Ro,blobToBase64:Io,base64ToBlob:jo};var si={};const Bo={},Ho=Object.freeze(Object.defineProperty({__proto__:null,default:Bo},Symbol.toStringTag,{value:"Module"})),oi=yr(Ho);var nn;function No(){return nn||(nn=1,(function(f){var r=r||{version:"5.3.0"};if(f.fabric=r,typeof document<"u"&&typeof window<"u")document instanceof(typeof HTMLDocument<"u"?HTMLDocument:Document)?r.document=document:r.document=document.implementation.createHTMLDocument(""),r.window=window;else{var g=oi,_=new g.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;r.document=_.document,r.jsdomImplForWrapper=oi.implForWrapper,r.nodeCanvas=oi.Canvas,r.window=_,DOMParser=r.window.DOMParser}r.isTouchSupported="ontouchstart"in r.window||"ontouchstart"in r.document||r.window&&r.window.navigator&&r.window.navigator.maxTouchPoints>0,r.isLikelyNode=typeof Buffer<"u"&&typeof window>"u",r.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"],r.DPI=96,r.reNum="(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)",r.commaWsp="(?:\\s+,?\\s*|,\\s*)",r.rePathCommand=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/ig,r.reNonWord=/[ \n\.,;!\?\-]/,r.fontPaths={},r.iMatrix=[1,0,0,1,0,0],r.svgNS="http://www.w3.org/2000/svg",r.perfLimitSizeTotal=2097152,r.maxCacheSideLimit=4096,r.minCacheSideLimit=256,r.charWidthsCache={},r.textureSize=2048,r.disableStyleCopyPaste=!1,r.enableGLFiltering=!0,r.devicePixelRatio=r.window.devicePixelRatio||r.window.webkitDevicePixelRatio||r.window.mozDevicePixelRatio||1,r.browserShadowBlurConstant=1,r.arcToSegmentsCache={},r.boundsOfCurveCache={},r.cachesBoundsOfCurve=!0,r.forceGLPutImageData=!1,r.initFilterBackend=function(){if(r.enableGLFiltering&&r.isWebglSupported&&r.isWebglSupported(r.textureSize))return console.log("max texture size: "+r.maxTextureSize),new r.WebglFilterBackend({tileSize:r.textureSize});if(r.Canvas2dFilterBackend)return new r.Canvas2dFilterBackend},typeof document<"u"&&typeof window<"u"&&(window.fabric=r),(function(){function c(e,o){if(this.__eventListeners[e]){var h=this.__eventListeners[e];o?h[h.indexOf(o)]=!1:r.util.array.fill(h,!1)}}function i(e,o){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(o);return this}function l(e,o){var h=(function(){o.apply(this,arguments),this.off(e,h)}).bind(this);this.on(e,h)}function a(e,o){if(arguments.length===1)for(var h in e)l.call(this,h,e[h]);else l.call(this,e,o);return this}function t(e,o){if(!this.__eventListeners)return this;if(arguments.length===0)for(e in this.__eventListeners)c.call(this,e);else if(arguments.length===1&&typeof arguments[0]=="object")for(var h in e)c.call(this,h,e[h]);else c.call(this,e,o);return this}function n(e,o){if(!this.__eventListeners)return this;var h=this.__eventListeners[e];if(!h)return this;for(var s=0,u=h.length;s<u;s++)h[s]&&h[s].call(this,o||{});return this.__eventListeners[e]=h.filter(function(d){return d!==!1}),this}r.Observable={fire:n,on:i,once:a,off:t}})(),r.Collection={_objects:[],add:function(){if(this._objects.push.apply(this._objects,arguments),this._onObjectAdded)for(var c=0,i=arguments.length;c<i;c++)this._onObjectAdded(arguments[c]);return this.renderOnAddRemove&&this.requestRenderAll(),this},insertAt:function(c,i,l){var a=this._objects;return l?a[i]=c:a.splice(i,0,c),this._onObjectAdded&&this._onObjectAdded(c),this.renderOnAddRemove&&this.requestRenderAll(),this},remove:function(){for(var c=this._objects,i,l=!1,a=0,t=arguments.length;a<t;a++)i=c.indexOf(arguments[a]),i!==-1&&(l=!0,c.splice(i,1),this._onObjectRemoved&&this._onObjectRemoved(arguments[a]));return this.renderOnAddRemove&&l&&this.requestRenderAll(),this},forEachObject:function(c,i){for(var l=this.getObjects(),a=0,t=l.length;a<t;a++)c.call(i,l[a],a,l);return this},getObjects:function(c){return typeof c>"u"?this._objects.concat():this._objects.filter(function(i){return i.type===c})},item:function(c){return this._objects[c]},isEmpty:function(){return this._objects.length===0},size:function(){return this._objects.length},contains:function(c,i){return this._objects.indexOf(c)>-1?!0:i?this._objects.some(function(l){return typeof l.contains=="function"&&l.contains(c,!0)}):!1},complexity:function(){return this._objects.reduce(function(c,i){return c+=i.complexity?i.complexity():0,c},0)}},r.CommonMethods={_setOptions:function(c){for(var i in c)this.set(i,c[i])},_initGradient:function(c,i){c&&c.colorStops&&!(c instanceof r.Gradient)&&this.set(i,new r.Gradient(c))},_initPattern:function(c,i,l){c&&c.source&&!(c instanceof r.Pattern)?this.set(i,new r.Pattern(c,l)):l&&l()},_setObject:function(c){for(var i in c)this._set(i,c[i])},set:function(c,i){return typeof c=="object"?this._setObject(c):this._set(c,i),this},_set:function(c,i){this[c]=i},toggle:function(c){var i=this.get(c);return typeof i=="boolean"&&this.set(c,!i),this},get:function(c){return this[c]}},(function(c){var i=Math.sqrt,l=Math.atan2,a=Math.pow,t=Math.PI/180,n=Math.PI/2;r.util={cos:function(e){if(e===0)return 1;e<0&&(e=-e);var o=e/n;switch(o){case 1:case 3:return 0;case 2:return-1}return Math.cos(e)},sin:function(e){if(e===0)return 0;var o=e/n,h=1;switch(e<0&&(h=-1),o){case 1:return h;case 2:return 0;case 3:return-h}return Math.sin(e)},removeFromArray:function(e,o){var h=e.indexOf(o);return h!==-1&&e.splice(h,1),e},getRandomInt:function(e,o){return Math.floor(Math.random()*(o-e+1))+e},degreesToRadians:function(e){return e*t},radiansToDegrees:function(e){return e/t},rotatePoint:function(e,o,h){var s=new r.Point(e.x-o.x,e.y-o.y),u=r.util.rotateVector(s,h);return new r.Point(u.x,u.y).addEquals(o)},rotateVector:function(e,o){var h=r.util.sin(o),s=r.util.cos(o),u=e.x*s-e.y*h,d=e.x*h+e.y*s;return{x:u,y:d}},createVector:function(e,o){return new r.Point(o.x-e.x,o.y-e.y)},calcAngleBetweenVectors:function(e,o){return Math.acos((e.x*o.x+e.y*o.y)/(Math.hypot(e.x,e.y)*Math.hypot(o.x,o.y)))},getHatVector:function(e){return new r.Point(e.x,e.y).multiply(1/Math.hypot(e.x,e.y))},getBisector:function(e,o,h){var s=r.util.createVector(e,o),u=r.util.createVector(e,h),d=r.util.calcAngleBetweenVectors(s,u),m=r.util.calcAngleBetweenVectors(r.util.rotateVector(s,d),u),p=d*(m===0?1:-1)/2;return{vector:r.util.getHatVector(r.util.rotateVector(s,p)),angle:d}},projectStrokeOnPoints:function(e,o,h){var s=[],u=o.strokeWidth/2,d=o.strokeUniform?new r.Point(1/o.scaleX,1/o.scaleY):new r.Point(1,1),m=function(p){var v=u/Math.hypot(p.x,p.y);return new r.Point(p.x*v*d.x,p.y*v*d.y)};return e.length<=1||e.forEach(function(p,v){var b=new r.Point(p.x,p.y),S,E;v===0?(E=e[v+1],S=h?m(r.util.createVector(E,b)).addEquals(b):e[e.length-1]):v===e.length-1?(S=e[v-1],E=h?m(r.util.createVector(S,b)).addEquals(b):e[0]):(S=e[v-1],E=e[v+1]);var F=r.util.getBisector(b,S,E),R=F.vector,z=F.angle,K,Z;if(o.strokeLineJoin==="miter"&&(K=-u/Math.sin(z/2),Z=new r.Point(R.x*K*d.x,R.y*K*d.y),Math.hypot(Z.x,Z.y)/u<=o.strokeMiterLimit)){s.push(b.add(Z)),s.push(b.subtract(Z));return}K=-u*Math.SQRT2,Z=new r.Point(R.x*K*d.x,R.y*K*d.y),s.push(b.add(Z)),s.push(b.subtract(Z))}),s},transformPoint:function(e,o,h){return h?new r.Point(o[0]*e.x+o[2]*e.y,o[1]*e.x+o[3]*e.y):new r.Point(o[0]*e.x+o[2]*e.y+o[4],o[1]*e.x+o[3]*e.y+o[5])},makeBoundingBoxFromPoints:function(e,o){if(o)for(var h=0;h<e.length;h++)e[h]=r.util.transformPoint(e[h],o);var s=[e[0].x,e[1].x,e[2].x,e[3].x],u=r.util.array.min(s),d=r.util.array.max(s),m=d-u,p=[e[0].y,e[1].y,e[2].y,e[3].y],v=r.util.array.min(p),b=r.util.array.max(p),S=b-v;return{left:u,top:v,width:m,height:S}},invertTransform:function(e){var o=1/(e[0]*e[3]-e[1]*e[2]),h=[o*e[3],-o*e[1],-o*e[2],o*e[0]],s=r.util.transformPoint({x:e[4],y:e[5]},h,!0);return h[4]=-s.x,h[5]=-s.y,h},toFixed:function(e,o){return parseFloat(Number(e).toFixed(o))},parseUnit:function(e,o){var h=/\D{0,2}$/.exec(e),s=parseFloat(e);switch(o||(o=r.Text.DEFAULT_SVG_FONT_SIZE),h[0]){case"mm":return s*r.DPI/25.4;case"cm":return s*r.DPI/2.54;case"in":return s*r.DPI;case"pt":return s*r.DPI/72;case"pc":return s*r.DPI/72*12;case"em":return s*o;default:return s}},falseFunction:function(){return!1},getKlass:function(e,o){return e=r.util.string.camelize(e.charAt(0).toUpperCase()+e.slice(1)),r.util.resolveNamespace(o)[e]},getSvgAttributes:function(e){var o=["instantiated_by_use","style","id","class"];switch(e){case"linearGradient":o=o.concat(["x1","y1","x2","y2","gradientUnits","gradientTransform"]);break;case"radialGradient":o=o.concat(["gradientUnits","gradientTransform","cx","cy","r","fx","fy","fr"]);break;case"stop":o=o.concat(["offset","stop-color","stop-opacity"]);break}return o},resolveNamespace:function(e){if(!e)return r;var o=e.split("."),h=o.length,s,u=c||r.window;for(s=0;s<h;++s)u=u[o[s]];return u},loadImage:function(e,o,h,s){if(!e){o&&o.call(h,e);return}var u=r.util.createImage(),d=function(){o&&o.call(h,u,!1),u=u.onload=u.onerror=null};u.onload=d,u.onerror=function(){r.log("Error loading "+u.src),o&&o.call(h,null,!0),u=u.onload=u.onerror=null},e.indexOf("data")!==0&&s!==void 0&&s!==null&&(u.crossOrigin=s),e.substring(0,14)==="data:image/svg"&&(u.onload=null,r.util.loadImageInDom(u,d)),u.src=e},loadImageInDom:function(e,o){var h=r.document.createElement("div");h.style.width=h.style.height="1px",h.style.left=h.style.top="-100%",h.style.position="absolute",h.appendChild(e),r.document.querySelector("body").appendChild(h),e.onload=function(){o(),h.parentNode.removeChild(h),h=null}},enlivenObjects:function(e,o,h,s){e=e||[];var u=[],d=0,m=e.length;function p(){++d===m&&o&&o(u.filter(function(v){return v}))}if(!m){o&&o(u);return}e.forEach(function(v,b){if(!v||!v.type){p();return}var S=r.util.getKlass(v.type,h);S.fromObject(v,function(E,F){F||(u[b]=E),s&&s(v,E,F),p()})})},enlivenObjectEnlivables:function(e,o,h){var s=r.Object.ENLIVEN_PROPS.filter(function(u){return!!e[u]});r.util.enlivenObjects(s.map(function(u){return e[u]}),function(u){var d={};s.forEach(function(m,p){d[m]=u[p],o&&(o[m]=u[p])}),h&&h(d)})},enlivenPatterns:function(e,o){e=e||[];function h(){++u===d&&o&&o(s)}var s=[],u=0,d=e.length;if(!d){o&&o(s);return}e.forEach(function(m,p){m&&m.source?new r.Pattern(m,function(v){s[p]=v,h()}):(s[p]=m,h())})},groupSVGElements:function(e,o,h){var s;return e&&e.length===1?(typeof h<"u"&&(e[0].sourcePath=h),e[0]):(o&&(o.width&&o.height?o.centerPoint={x:o.width/2,y:o.height/2}:(delete o.width,delete o.height)),s=new r.Group(e,o),typeof h<"u"&&(s.sourcePath=h),s)},populateWithProperties:function(e,o,h){if(h&&Array.isArray(h))for(var s=0,u=h.length;s<u;s++)h[s]in e&&(o[h[s]]=e[h[s]])},createCanvasElement:function(){return r.document.createElement("canvas")},copyCanvasElement:function(e){var o=r.util.createCanvasElement();return o.width=e.width,o.height=e.height,o.getContext("2d").drawImage(e,0,0),o},toDataURL:function(e,o,h){return e.toDataURL("image/"+o,h)},createImage:function(){return r.document.createElement("img")},multiplyTransformMatrices:function(e,o,h){return[e[0]*o[0]+e[2]*o[1],e[1]*o[0]+e[3]*o[1],e[0]*o[2]+e[2]*o[3],e[1]*o[2]+e[3]*o[3],h?0:e[0]*o[4]+e[2]*o[5]+e[4],h?0:e[1]*o[4]+e[3]*o[5]+e[5]]},qrDecompose:function(e){var o=l(e[1],e[0]),h=a(e[0],2)+a(e[1],2),s=i(h),u=(e[0]*e[3]-e[2]*e[1])/s,d=l(e[0]*e[2]+e[1]*e[3],h);return{angle:o/t,scaleX:s,scaleY:u,skewX:d/t,skewY:0,translateX:e[4],translateY:e[5]}},calcRotateMatrix:function(e){if(!e.angle)return r.iMatrix.concat();var o=r.util.degreesToRadians(e.angle),h=r.util.cos(o),s=r.util.sin(o);return[h,s,-s,h,0,0]},calcDimensionsMatrix:function(e){var o=typeof e.scaleX>"u"?1:e.scaleX,h=typeof e.scaleY>"u"?1:e.scaleY,s=[e.flipX?-o:o,0,0,e.flipY?-h:h,0,0],u=r.util.multiplyTransformMatrices,d=r.util.degreesToRadians;return e.skewX&&(s=u(s,[1,0,Math.tan(d(e.skewX)),1],!0)),e.skewY&&(s=u(s,[1,Math.tan(d(e.skewY)),0,1],!0)),s},composeMatrix:function(e){var o=[1,0,0,1,e.translateX||0,e.translateY||0],h=r.util.multiplyTransformMatrices;return e.angle&&(o=h(o,r.util.calcRotateMatrix(e))),(e.scaleX!==1||e.scaleY!==1||e.skewX||e.skewY||e.flipX||e.flipY)&&(o=h(o,r.util.calcDimensionsMatrix(e))),o},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,o,h,s){s>0&&(o>s?o-=s:o=0,h>s?h-=s:h=0);var u=!0,d,m,p=e.getImageData(o,h,s*2||1,s*2||1),v=p.data.length;for(d=3;d<v&&(m=p.data[d],u=m<=0,u!==!1);d+=4);return p=null,u},parsePreserveAspectRatioAttribute:function(e){var o="meet",h="Mid",s="Mid",u=e.split(" "),d;return u&&u.length&&(o=u.pop(),o!=="meet"&&o!=="slice"?(d=o,o="meet"):u.length&&(d=u.pop())),h=d!=="none"?d.slice(1,4):"none",s=d!=="none"?d.slice(5,8):"none",{meetOrSlice:o,alignX:h,alignY:s}},clearFabricFontCache:function(e){e=(e||"").toLowerCase(),e?r.charWidthsCache[e]&&delete r.charWidthsCache[e]:r.charWidthsCache={}},limitDimsByArea:function(e,o){var h=Math.sqrt(o*e),s=Math.floor(o/h);return{x:Math.floor(h),y:s}},capValue:function(e,o,h){return Math.max(e,Math.min(o,h))},findScaleToFit:function(e,o){return Math.min(o.width/e.width,o.height/e.height)},findScaleToCover:function(e,o){return Math.max(o.width/e.width,o.height/e.height)},matrixToSVG:function(e){return"matrix("+e.map(function(o){return r.util.toFixed(o,r.Object.NUM_FRACTION_DIGITS)}).join(" ")+")"},removeTransformFromObject:function(e,o){var h=r.util.invertTransform(o),s=r.util.multiplyTransformMatrices(h,e.calcOwnMatrix());r.util.applyTransformToObject(e,s)},addTransformToObject:function(e,o){r.util.applyTransformToObject(e,r.util.multiplyTransformMatrices(o,e.calcOwnMatrix()))},applyTransformToObject:function(e,o){var h=r.util.qrDecompose(o),s=new r.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(s,"center","center")},sizeAfterTransform:function(e,o,h){var s=e/2,u=o/2,d=[{x:-s,y:-u},{x:s,y:-u},{x:-s,y:u},{x:s,y:u}],m=r.util.calcDimensionsMatrix(h),p=r.util.makeBoundingBoxFromPoints(d,m);return{x:p.width,y:p.height}},mergeClipPaths:function(e,o){var h=e,s=o;h.inverted&&!s.inverted&&(h=o,s=e),r.util.applyTransformToObject(s,r.util.multiplyTransformMatrices(r.util.invertTransform(h.calcTransformMatrix()),s.calcTransformMatrix()));var u=h.inverted&&s.inverted;return u&&(h.inverted=s.inverted=!1),new r.Group([h],{clipPath:s,inverted:u})},hasStyleChanged:function(e,o,h){return h=h||!1,e.fill!==o.fill||e.stroke!==o.stroke||e.strokeWidth!==o.strokeWidth||e.fontSize!==o.fontSize||e.fontFamily!==o.fontFamily||e.fontWeight!==o.fontWeight||e.fontStyle!==o.fontStyle||e.textBackgroundColor!==o.textBackgroundColor||e.deltaY!==o.deltaY||h&&(e.overline!==o.overline||e.underline!==o.underline||e.linethrough!==o.linethrough)},stylesToArray:function(h,o){for(var h=r.util.object.clone(h,!0),s=o.split(`
|
|
6
6
|
`),u=-1,d={},m=[],p=0;p<s.length;p++){if(!h[p]){u+=s[p].length;continue}for(var v=0;v<s[p].length;v++){u++;var b=h[p][v];if(b&&Object.keys(b).length>0){var S=r.util.hasStyleChanged(d,b,!0);S?m.push({start:u,end:u+1,style:b}):m[m.length-1].end++}d=b||{}}}return m},stylesFromArray:function(e,o){if(!Array.isArray(e))return e;for(var h=o.split(`
|
|
7
7
|
`),s=-1,u=0,d={},m=0;m<h.length;m++)for(var p=0;p<h[m].length;p++)s++,e[u]&&e[u].start<=s&&s<e[u].end&&(d[m]=d[m]||{},d[m][p]=Object.assign({},e[u].style),s===e[u].end-1&&u++);return d}}})(f),(function(){var c=Array.prototype.join,i={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},l={m:"l",M:"L"};function a(w,k,A,P,I,O,x,D,L,N,j){var V=r.util.cos(w),G=r.util.sin(w),J=r.util.cos(k),B=r.util.sin(k),M=A*I*J-P*O*B+x,X=P*I*J+A*O*B+D,Y=N+L*(-A*I*G-P*O*V),H=j+L*(-P*I*G+A*O*V),U=M+L*(A*I*B+P*O*J),Q=X+L*(P*I*B-A*O*J);return["C",Y,H,U,Q,M,X]}function t(w,k,A,P,I,O,x){var D=Math.PI,L=x*D/180,N=r.util.sin(L),j=r.util.cos(L),V=0,G=0;A=Math.abs(A),P=Math.abs(P);var J=-j*w*.5-N*k*.5,B=-j*k*.5+N*w*.5,M=A*A,X=P*P,Y=B*B,H=J*J,U=M*X-M*Y-X*H,Q=0;if(U<0){var st=Math.sqrt(1-U/(M*X));A*=st,P*=st}else Q=(I===O?-1:1)*Math.sqrt(U/(M*Y+X*H));var nt=Q*A*B/P,W=-Q*P*J/A,rt=j*nt-N*W+w*.5,ot=N*nt+j*W+k*.5,lt=n(1,0,(J-nt)/A,(B-W)/P),ut=n((J-nt)/A,(B-W)/P,(-J-nt)/A,(-B-W)/P);O===0&&ut>0?ut-=2*D:O===1&&ut<0&&(ut+=2*D);for(var ht=Math.ceil(Math.abs(ut/D*2)),bt=[],dt=ut/ht,zt=8/3*Math.sin(dt/4)*Math.sin(dt/4)/Math.sin(dt/2),le=lt+dt,kt=0;kt<ht;kt++)bt[kt]=a(lt,le,j,N,A,P,rt,ot,zt,V,G),V=bt[kt][5],G=bt[kt][6],lt=le,le+=dt;return bt}function n(w,k,A,P){var I=Math.atan2(k,w),O=Math.atan2(P,A);return O>=I?O-I:2*Math.PI-(I-O)}function e(w,k,A,P,I,O,x,D){var L;if(r.cachesBoundsOfCurve&&(L=c.call(arguments),r.boundsOfCurveCache[L]))return r.boundsOfCurveCache[L];var N=Math.sqrt,j=Math.min,V=Math.max,G=Math.abs,J=[],B=[[],[]],M,X,Y,H,U,Q,st,nt;X=6*w-12*A+6*I,M=-3*w+9*A-9*I+3*x,Y=3*A-3*w;for(var W=0;W<2;++W){if(W>0&&(X=6*k-12*P+6*O,M=-3*k+9*P-9*O+3*D,Y=3*P-3*k),G(M)<1e-12){if(G(X)<1e-12)continue;H=-Y/X,0<H&&H<1&&J.push(H);continue}st=X*X-4*Y*M,!(st<0)&&(nt=N(st),U=(-X+nt)/(2*M),0<U&&U<1&&J.push(U),Q=(-X-nt)/(2*M),0<Q&&Q<1&&J.push(Q))}for(var rt,ot,lt=J.length,ut=lt,ht;lt--;)H=J[lt],ht=1-H,rt=ht*ht*ht*w+3*ht*ht*H*A+3*ht*H*H*I+H*H*H*x,B[0][lt]=rt,ot=ht*ht*ht*k+3*ht*ht*H*P+3*ht*H*H*O+H*H*H*D,B[1][lt]=ot;B[0][ut]=w,B[1][ut]=k,B[0][ut+1]=x,B[1][ut+1]=D;var bt=[{x:j.apply(null,B[0]),y:j.apply(null,B[1])},{x:V.apply(null,B[0]),y:V.apply(null,B[1])}];return r.cachesBoundsOfCurve&&(r.boundsOfCurveCache[L]=bt),bt}function o(w,k,A){for(var P=A[1],I=A[2],O=A[3],x=A[4],D=A[5],L=A[6],N=A[7],j=t(L-w,N-k,P,I,x,D,O),V=0,G=j.length;V<G;V++)j[V][1]+=w,j[V][2]+=k,j[V][3]+=w,j[V][4]+=k,j[V][5]+=w,j[V][6]+=k;return j}function h(w){var k=0,A=0,P=w.length,I=0,O=0,x,D,L,N=[],j,V,G;for(D=0;D<P;++D){switch(L=!1,x=w[D].slice(0),x[0]){case"l":x[0]="L",x[1]+=k,x[2]+=A;case"L":k=x[1],A=x[2];break;case"h":x[1]+=k;case"H":x[0]="L",x[2]=A,k=x[1];break;case"v":x[1]+=A;case"V":x[0]="L",A=x[1],x[1]=k,x[2]=A;break;case"m":x[0]="M",x[1]+=k,x[2]+=A;case"M":k=x[1],A=x[2],I=x[1],O=x[2];break;case"c":x[0]="C",x[1]+=k,x[2]+=A,x[3]+=k,x[4]+=A,x[5]+=k,x[6]+=A;case"C":V=x[3],G=x[4],k=x[5],A=x[6];break;case"s":x[0]="S",x[1]+=k,x[2]+=A,x[3]+=k,x[4]+=A;case"S":j==="C"?(V=2*k-V,G=2*A-G):(V=k,G=A),k=x[3],A=x[4],x[0]="C",x[5]=x[3],x[6]=x[4],x[3]=x[1],x[4]=x[2],x[1]=V,x[2]=G,V=x[3],G=x[4];break;case"q":x[0]="Q",x[1]+=k,x[2]+=A,x[3]+=k,x[4]+=A;case"Q":V=x[1],G=x[2],k=x[3],A=x[4];break;case"t":x[0]="T",x[1]+=k,x[2]+=A;case"T":j==="Q"?(V=2*k-V,G=2*A-G):(V=k,G=A),x[0]="Q",k=x[1],A=x[2],x[1]=V,x[2]=G,x[3]=k,x[4]=A;break;case"a":x[0]="A",x[6]+=k,x[7]+=A;case"A":L=!0,N=N.concat(o(k,A,x)),k=x[6],A=x[7];break;case"z":case"Z":k=I,A=O;break}L||N.push(x),j=x[0]}return N}function s(w,k,A,P){return Math.sqrt((A-w)*(A-w)+(P-k)*(P-k))}function u(w){return w*w*w}function d(w){return 3*w*w*(1-w)}function m(w){return 3*w*(1-w)*(1-w)}function p(w){return(1-w)*(1-w)*(1-w)}function v(w,k,A,P,I,O,x,D){return function(L){var N=u(L),j=d(L),V=m(L),G=p(L);return{x:x*N+I*j+A*V+w*G,y:D*N+O*j+P*V+k*G}}}function b(w,k,A,P,I,O,x,D){return function(L){var N=1-L,j=3*N*N*(A-w)+6*N*L*(I-A)+3*L*L*(x-I),V=3*N*N*(P-k)+6*N*L*(O-P)+3*L*L*(D-O);return Math.atan2(V,j)}}function S(w){return w*w}function E(w){return 2*w*(1-w)}function F(w){return(1-w)*(1-w)}function R(w,k,A,P,I,O){return function(x){var D=S(x),L=E(x),N=F(x);return{x:I*D+A*L+w*N,y:O*D+P*L+k*N}}}function z(w,k,A,P,I,O){return function(x){var D=1-x,L=2*D*(A-w)+2*x*(I-A),N=2*D*(P-k)+2*x*(O-P);return Math.atan2(N,L)}}function K(w,k,A){var P={x:k,y:A},I,O=0,x;for(x=1;x<=100;x+=1)I=w(x/100),O+=s(P.x,P.y,I.x,I.y),P=I;return O}function Z(w,k){for(var A=0,P=0,I=w.iterator,O={x:w.x,y:w.y},x,D,L=.01,N=w.angleFinder,j;P<k&&L>1e-4;)x=I(A),j=A,D=s(O.x,O.y,x.x,x.y),D+P>k?(A-=L,L/=2):(O=x,A+=L,P+=D);return x.angle=N(j),x}function q(w){for(var k=0,A=w.length,P,I=0,O=0,x=0,D=0,L=[],N,j,V,G=0;G<A;G++){switch(P=w[G],j={x:I,y:O,command:P[0]},P[0]){case"M":j.length=0,x=I=P[1],D=O=P[2];break;case"L":j.length=s(I,O,P[1],P[2]),I=P[1],O=P[2];break;case"C":N=v(I,O,P[1],P[2],P[3],P[4],P[5],P[6]),V=b(I,O,P[1],P[2],P[3],P[4],P[5],P[6]),j.iterator=N,j.angleFinder=V,j.length=K(N,I,O),I=P[5],O=P[6];break;case"Q":N=R(I,O,P[1],P[2],P[3],P[4]),V=z(I,O,P[1],P[2],P[3],P[4]),j.iterator=N,j.angleFinder=V,j.length=K(N,I,O),I=P[3],O=P[4];break;case"Z":case"z":j.destX=x,j.destY=D,j.length=s(I,O,x,D),I=x,O=D;break}k+=j.length,L.push(j)}return L.push({length:k,x:I,y:O}),L}function $(w,k,A){A||(A=q(w));for(var P=0;k-A[P].length>0&&P<A.length-2;)k-=A[P].length,P++;var I=A[P],O=k/I.length,x=I.command,D=w[P],L;switch(x){case"M":return{x:I.x,y:I.y,angle:0};case"Z":case"z":return L=new r.Point(I.x,I.y).lerp(new r.Point(I.destX,I.destY),O),L.angle=Math.atan2(I.destY-I.y,I.destX-I.x),L;case"L":return L=new r.Point(I.x,I.y).lerp(new r.Point(D[1],D[2]),O),L.angle=Math.atan2(D[2]-I.y,D[1]-I.x),L;case"C":return Z(I,k);case"Q":return Z(I,k)}}function tt(w){var k=[],A=[],P,I,O=r.rePathCommand,x="[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?\\s*",D="("+x+")"+r.commaWsp,L="([01])"+r.commaWsp+"?",N=D+"?"+D+"?"+D+L+L+D+"?("+x+")",j=new RegExp(N,"g"),V,G,J;if(!w||!w.match)return k;J=w.match(/[mzlhvcsqta][^mzlhvcsqta]*/gi);for(var B=0,M,X=J.length;B<X;B++){P=J[B],G=P.slice(1).trim(),A.length=0;var Y=P.charAt(0);if(M=[Y],Y.toLowerCase()==="a")for(var H;H=j.exec(G);)for(var U=1;U<H.length;U++)A.push(H[U]);else for(;V=O.exec(G);)A.push(V[0]);for(var U=0,Q=A.length;U<Q;U++)I=parseFloat(A[U]),isNaN(I)||M.push(I);var st=i[Y.toLowerCase()],nt=l[Y]||Y;if(M.length-1>st)for(var W=1,rt=M.length;W<rt;W+=st)k.push([Y].concat(M.slice(W,W+st))),Y=nt;else k.push(M)}return k}function it(w,k){var A=[],P,I=new r.Point(w[0].x,w[0].y),O=new r.Point(w[1].x,w[1].y),x=w.length,D=1,L=0,N=x>2;for(k=k||0,N&&(D=w[2].x<O.x?-1:w[2].x===O.x?0:1,L=w[2].y<O.y?-1:w[2].y===O.y?0:1),A.push(["M",I.x-D*k,I.y-L*k]),P=1;P<x;P++){if(!I.eq(O)){var j=I.midPointFrom(O);A.push(["Q",I.x,I.y,j.x,j.y])}I=w[P],P+1<w.length&&(O=w[P+1])}return N&&(D=I.x>w[P-2].x?1:I.x===w[P-2].x?0:-1,L=I.y>w[P-2].y?1:I.y===w[P-2].y?0:-1),A.push(["L",I.x+D*k,I.y+L*k]),A}function et(w,k,A){return A&&(k=r.util.multiplyTransformMatrices(k,[1,0,0,1,-A.x,-A.y])),w.map(function(P){for(var I=P.slice(0),O={},x=1;x<P.length-1;x+=2)O.x=P[x],O.y=P[x+1],O=r.util.transformPoint(O,k),I[x]=O.x,I[x+1]=O.y;return I})}r.util.joinPath=function(w){return w.map(function(k){return k.join(" ")}).join(" ")},r.util.parsePath=tt,r.util.makePathSimpler=h,r.util.getSmoothPathFromPoints=it,r.util.getPathSegmentsInfo=q,r.util.getBoundsOfCurve=e,r.util.getPointOnPath=$,r.util.transformPath=et})(),(function(){var c=Array.prototype.slice;function i(e,o){for(var h=c.call(arguments,2),s=[],u=0,d=e.length;u<d;u++)s[u]=h.length?e[u][o].apply(e[u],h):e[u][o].call(e[u]);return s}function l(e,o){return n(e,o,function(h,s){return h>=s})}function a(e,o){return n(e,o,function(h,s){return h<s})}function t(e,o){for(var h=e.length;h--;)e[h]=o;return e}function n(e,o,h){if(!(!e||e.length===0)){var s=e.length-1,u=o?e[s][o]:e[s];if(o)for(;s--;)h(e[s][o],u)&&(u=e[s][o]);else for(;s--;)h(e[s],u)&&(u=e[s]);return u}}r.util.array={fill:t,invoke:i,min:a,max:l}})(),(function(){function c(l,a,t){if(t)if(!r.isLikelyNode&&a instanceof Element)l=a;else if(a instanceof Array){l=[];for(var n=0,e=a.length;n<e;n++)l[n]=c({},a[n],t)}else if(a&&typeof a=="object")for(var o in a)o==="canvas"||o==="group"?l[o]=null:a.hasOwnProperty(o)&&(l[o]=c({},a[o],t));else l=a;else for(var o in a)l[o]=a[o];return l}function i(l,a){return c({},l,a)}r.util.object={extend:c,clone:i},r.util.object.extend(r.util,r.Observable)})(),(function(){function c(n){return n.replace(/-+(.)?/g,function(e,o){return o?o.toUpperCase():""})}function i(n,e){return n.charAt(0).toUpperCase()+(e?n.slice(1):n.slice(1).toLowerCase())}function l(n){return n.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function a(n){var e=0,o,h=[];for(e=0,o;e<n.length;e++)(o=t(n,e))!==!1&&h.push(o);return h}function t(n,e){var o=n.charCodeAt(e);if(isNaN(o))return"";if(o<55296||o>57343)return n.charAt(e);if(55296<=o&&o<=56319){if(n.length<=e+1)throw"High surrogate without following low surrogate";var h=n.charCodeAt(e+1);if(56320>h||h>57343)throw"High surrogate without following low surrogate";return n.charAt(e)+n.charAt(e+1)}if(e===0)throw"Low surrogate without preceding high surrogate";var s=n.charCodeAt(e-1);if(55296>s||s>56319)throw"Low surrogate without preceding high surrogate";return!1}r.util.string={camelize:c,capitalize:i,escapeXml:l,graphemeSplit:a}})(),(function(){var c=Array.prototype.slice,i=function(){},l=(function(){for(var o in{toString:1})if(o==="toString")return!1;return!0})(),a=function(o,h,s){for(var u in h)u in o.prototype&&typeof o.prototype[u]=="function"&&(h[u]+"").indexOf("callSuper")>-1?o.prototype[u]=(function(d){return function(){var m=this.constructor.superclass;this.constructor.superclass=s;var p=h[d].apply(this,arguments);if(this.constructor.superclass=m,d!=="initialize")return p}})(u):o.prototype[u]=h[u],l&&(h.toString!==Object.prototype.toString&&(o.prototype.toString=h.toString),h.valueOf!==Object.prototype.valueOf&&(o.prototype.valueOf=h.valueOf))};function t(){}function n(o){for(var h=null,s=this;s.constructor.superclass;){var u=s.constructor.superclass.prototype[o];if(s[o]!==u){h=u;break}s=s.constructor.superclass.prototype}return h?arguments.length>1?h.apply(this,c.call(arguments,1)):h.call(this):console.log("tried to callSuper "+o+", method not found in prototype chain",this)}function e(){var o=null,h=c.call(arguments,0);typeof h[0]=="function"&&(o=h.shift());function s(){this.initialize.apply(this,arguments)}s.superclass=o,s.subclasses=[],o&&(t.prototype=o.prototype,s.prototype=new t,o.subclasses.push(s));for(var u=0,d=h.length;u<d;u++)a(s,h[u],o);return s.prototype.initialize||(s.prototype.initialize=i),s.prototype.constructor=s,s.prototype.callSuper=n,s}r.util.createClass=e})(),(function(){var c=!!r.document.createElement("div").attachEvent,i=["touchstart","touchmove","touchend"];r.util.addListener=function(a,t,n,e){a&&a.addEventListener(t,n,c?!1:e)},r.util.removeListener=function(a,t,n,e){a&&a.removeEventListener(t,n,c?!1:e)};function l(a){var t=a.changedTouches;return t&&t[0]?t[0]:a}r.util.getPointer=function(a){var t=a.target,n=r.util.getScrollLeftTop(t),e=l(a);return{x:e.clientX+n.left,y:e.clientY+n.top}},r.util.isTouchEvent=function(a){return i.indexOf(a.type)>-1||a.pointerType==="touch"}})(),(function(){function c(e,o){var h=e.style;if(!h)return e;if(typeof o=="string")return e.style.cssText+=";"+o,o.indexOf("opacity")>-1?n(e,o.match(/opacity:\s*(\d?\.?\d*)/)[1]):e;for(var s in o)if(s==="opacity")n(e,o[s]);else{var u=s==="float"||s==="cssFloat"?typeof h.styleFloat>"u"?"cssFloat":"styleFloat":s;h.setProperty(u,o[s])}return e}var i=r.document.createElement("div"),l=typeof i.style.opacity=="string",a=typeof i.style.filter=="string",t=/alpha\s*\(\s*opacity\s*=\s*([^\)]+)\)/,n=function(e){return e};l?n=function(e,o){return e.style.opacity=o,e}:a&&(n=function(e,o){var h=e.style;return e.currentStyle&&!e.currentStyle.hasLayout&&(h.zoom=1),t.test(h.filter)?(o=o>=.9999?"":"alpha(opacity="+o*100+")",h.filter=h.filter.replace(t,o)):h.filter+=" alpha(opacity="+o*100+")",e}),r.util.setStyle=c})(),(function(){var c=Array.prototype.slice;function i(p){return typeof p=="string"?r.document.getElementById(p):p}var l,a=function(p){return c.call(p,0)};try{l=a(r.document.childNodes)instanceof Array}catch{}l||(a=function(p){for(var v=new Array(p.length),b=p.length;b--;)v[b]=p[b];return v});function t(p,v){var b=r.document.createElement(p);for(var S in v)S==="class"?b.className=v[S]:S==="for"?b.htmlFor=v[S]:b.setAttribute(S,v[S]);return b}function n(p,v){p&&(" "+p.className+" ").indexOf(" "+v+" ")===-1&&(p.className+=(p.className?" ":"")+v)}function e(p,v,b){return typeof v=="string"&&(v=t(v,b)),p.parentNode&&p.parentNode.replaceChild(v,p),v.appendChild(p),v}function o(p){for(var v=0,b=0,S=r.document.documentElement,E=r.document.body||{scrollLeft:0,scrollTop:0};p&&(p.parentNode||p.host)&&(p=p.parentNode||p.host,p===r.document?(v=E.scrollLeft||S.scrollLeft||0,b=E.scrollTop||S.scrollTop||0):(v+=p.scrollLeft||0,b+=p.scrollTop||0),!(p.nodeType===1&&p.style.position==="fixed")););return{left:v,top:b}}function h(p){var v,b=p&&p.ownerDocument,S={left:0,top:0},E={left:0,top:0},F,R={borderLeftWidth:"left",borderTopWidth:"top",paddingLeft:"left",paddingTop:"top"};if(!b)return E;for(var z in R)E[R[z]]+=parseInt(s(p,z),10)||0;return v=b.documentElement,typeof p.getBoundingClientRect<"u"&&(S=p.getBoundingClientRect()),F=o(p),{left:S.left+F.left-(v.clientLeft||0)+E.left,top:S.top+F.top-(v.clientTop||0)+E.top}}var s;r.document.defaultView&&r.document.defaultView.getComputedStyle?s=function(p,v){var b=r.document.defaultView.getComputedStyle(p,null);return b?b[v]:void 0}:s=function(p,v){var b=p.style[v];return!b&&p.currentStyle&&(b=p.currentStyle[v]),b},(function(){var p=r.document.documentElement.style,v="userSelect"in p?"userSelect":"MozUserSelect"in p?"MozUserSelect":"WebkitUserSelect"in p?"WebkitUserSelect":"KhtmlUserSelect"in p?"KhtmlUserSelect":"";function b(E){return typeof E.onselectstart<"u"&&(E.onselectstart=r.util.falseFunction),v?E.style[v]="none":typeof E.unselectable=="string"&&(E.unselectable="on"),E}function S(E){return typeof E.onselectstart<"u"&&(E.onselectstart=null),v?E.style[v]="":typeof E.unselectable=="string"&&(E.unselectable=""),E}r.util.makeElementUnselectable=b,r.util.makeElementSelectable=S})();function u(p){var v=r.jsdomImplForWrapper(p);return v._canvas||v._image}function d(p){if(r.isLikelyNode){var v=r.jsdomImplForWrapper(p);v&&(v._image=null,v._canvas=null,v._currentSrc=null,v._attributes=null,v._classList=null)}}function m(p,v){p.imageSmoothingEnabled=p.imageSmoothingEnabled||p.webkitImageSmoothingEnabled||p.mozImageSmoothingEnabled||p.msImageSmoothingEnabled||p.oImageSmoothingEnabled,p.imageSmoothingEnabled=v}r.util.setImageSmoothing=m,r.util.getById=i,r.util.toArray=a,r.util.addClass=n,r.util.makeElement=t,r.util.wrapElement=e,r.util.getScrollLeftTop=o,r.util.getElementOffset=h,r.util.getNodeCanvas=u,r.util.cleanUpJsdomNode=d})(),(function(){function c(a,t){return a+(/\?/.test(a)?"&":"?")+t}function i(){}function l(a,t){t||(t={});var n=t.method?t.method.toUpperCase():"GET",e=t.onComplete||function(){},o=new r.window.XMLHttpRequest,h=t.body||t.parameters;return o.onreadystatechange=function(){o.readyState===4&&(e(o),o.onreadystatechange=i)},n==="GET"&&(h=null,typeof t.parameters=="string"&&(a=c(a,t.parameters))),o.open(n,a,!0),(n==="POST"||n==="PUT")&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.send(h),o}r.util.request=l})(),r.log=console.log,r.warn=console.warn,(function(){var c=r.util.object.extend,i=r.util.object.clone,l=[];r.util.object.extend(l,{cancelAll:function(){var u=this.splice(0);return u.forEach(function(d){d.cancel()}),u},cancelByCanvas:function(u){if(!u)return[];var d=this.filter(function(m){return typeof m.target=="object"&&m.target.canvas===u});return d.forEach(function(m){m.cancel()}),d},cancelByTarget:function(u){var d=this.findAnimationsByTarget(u);return d.forEach(function(m){m.cancel()}),d},findAnimationIndex:function(u){return this.indexOf(this.findAnimation(u))},findAnimation:function(u){return this.find(function(d){return d.cancel===u})},findAnimationsByTarget:function(u){return u?this.filter(function(d){return d.target===u}):[]}});function a(){return!1}function t(u,d,m,p){return-m*Math.cos(u/p*(Math.PI/2))+m+d}function n(u){u||(u={});var d=!1,m,p=function(){var v=r.runningAnimations.indexOf(m);return v>-1&&r.runningAnimations.splice(v,1)[0]};return m=c(i(u),{cancel:function(){return d=!0,p()},currentValue:"startValue"in u?u.startValue:0,completionRate:0,durationRate:0}),r.runningAnimations.push(m),h(function(v){var b=v||+new Date,S=u.duration||500,E=b+S,F,R=u.onChange||a,z=u.abort||a,K=u.onComplete||a,Z=u.easing||t,q="startValue"in u?u.startValue.length>0:!1,$="startValue"in u?u.startValue:0,tt="endValue"in u?u.endValue:100,it=u.byValue||(q?$.map(function(et,w){return tt[w]-$[w]}):tt-$);u.onStart&&u.onStart(),(function et(w){F=w||+new Date;var k=F>E?S:F-b,A=k/S,P=q?$.map(function(O,x){return Z(k,$[x],it[x],S)}):Z(k,$,it,S),I=Math.abs(q?(P[0]-$[0])/it[0]:(P-$)/it);if(m.currentValue=q?P.slice():P,m.completionRate=I,m.durationRate=A,!d){if(z(P,I,A)){p();return}if(F>E){m.currentValue=q?tt.slice():tt,m.completionRate=1,m.durationRate=1,R(q?tt.slice():tt,1,1),K(tt,1,1),p();return}else R(P,I,A),h(et)}})(b)}),m.cancel}var e=r.window.requestAnimationFrame||r.window.webkitRequestAnimationFrame||r.window.mozRequestAnimationFrame||r.window.oRequestAnimationFrame||r.window.msRequestAnimationFrame||function(u){return r.window.setTimeout(u,1e3/60)},o=r.window.cancelAnimationFrame||r.window.clearTimeout;function h(){return e.apply(r.window,arguments)}function s(){return o.apply(r.window,arguments)}r.util.animate=n,r.util.requestAnimFrame=h,r.util.cancelAnimFrame=s,r.runningAnimations=l})(),(function(){function c(l,a,t){var n="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 n+=","+(l&&a?parseFloat(l[3]+t*(a[3]-l[3])):1),n+=")",n}function i(l,a,t,n){var e=new r.Color(l).getSource(),o=new r.Color(a).getSource(),h=n.onComplete,s=n.onChange;return n=n||{},r.util.animate(r.util.object.extend(n,{duration:t||500,startValue:e,endValue:o,byValue:o,easing:function(u,d,m,p){var v=n.colorEasing?n.colorEasing(u,p):1-Math.cos(u/p*(Math.PI/2));return c(d,m,v)},onComplete:function(u,d,m){if(h)return h(c(o,o,0),d,m)},onChange:function(u,d,m){if(s){if(Array.isArray(u))return s(c(u,u,0),d,m);s(u,d,m)}}}))}r.util.animateColor=i})(),(function(){function c(w,k,A,P){return w<Math.abs(k)?(w=k,P=A/4):k===0&&w===0?P=A/(2*Math.PI)*Math.asin(1):P=A/(2*Math.PI)*Math.asin(k/w),{a:w,c:k,p:A,s:P}}function i(w,k,A){return w.a*Math.pow(2,10*(k-=1))*Math.sin((k*A-w.s)*(2*Math.PI)/w.p)}function l(w,k,A,P){return A*((w=w/P-1)*w*w+1)+k}function a(w,k,A,P){return w/=P/2,w<1?A/2*w*w*w+k:A/2*((w-=2)*w*w+2)+k}function t(w,k,A,P){return A*(w/=P)*w*w*w+k}function n(w,k,A,P){return-A*((w=w/P-1)*w*w*w-1)+k}function e(w,k,A,P){return w/=P/2,w<1?A/2*w*w*w*w+k:-A/2*((w-=2)*w*w*w-2)+k}function o(w,k,A,P){return A*(w/=P)*w*w*w*w+k}function h(w,k,A,P){return A*((w=w/P-1)*w*w*w*w+1)+k}function s(w,k,A,P){return w/=P/2,w<1?A/2*w*w*w*w*w+k:A/2*((w-=2)*w*w*w*w+2)+k}function u(w,k,A,P){return-A*Math.cos(w/P*(Math.PI/2))+A+k}function d(w,k,A,P){return A*Math.sin(w/P*(Math.PI/2))+k}function m(w,k,A,P){return-A/2*(Math.cos(Math.PI*w/P)-1)+k}function p(w,k,A,P){return w===0?k:A*Math.pow(2,10*(w/P-1))+k}function v(w,k,A,P){return w===P?k+A:A*(-Math.pow(2,-10*w/P)+1)+k}function b(w,k,A,P){return w===0?k:w===P?k+A:(w/=P/2,w<1?A/2*Math.pow(2,10*(w-1))+k:A/2*(-Math.pow(2,-10*--w)+2)+k)}function S(w,k,A,P){return-A*(Math.sqrt(1-(w/=P)*w)-1)+k}function E(w,k,A,P){return A*Math.sqrt(1-(w=w/P-1)*w)+k}function F(w,k,A,P){return w/=P/2,w<1?-A/2*(Math.sqrt(1-w*w)-1)+k:A/2*(Math.sqrt(1-(w-=2)*w)+1)+k}function R(w,k,A,P){var I=1.70158,O=0,x=A;if(w===0)return k;if(w/=P,w===1)return k+A;O||(O=P*.3);var D=c(x,A,O,I);return-i(D,w,P)+k}function z(w,k,A,P){var I=1.70158,O=0,x=A;if(w===0)return k;if(w/=P,w===1)return k+A;O||(O=P*.3);var D=c(x,A,O,I);return D.a*Math.pow(2,-10*w)*Math.sin((w*P-D.s)*(2*Math.PI)/D.p)+D.c+k}function K(w,k,A,P){var I=1.70158,O=0,x=A;if(w===0)return k;if(w/=P/2,w===2)return k+A;O||(O=P*(.3*1.5));var D=c(x,A,O,I);return w<1?-.5*i(D,w,P)+k:D.a*Math.pow(2,-10*(w-=1))*Math.sin((w*P-D.s)*(2*Math.PI)/D.p)*.5+D.c+k}function Z(w,k,A,P,I){return I===void 0&&(I=1.70158),A*(w/=P)*w*((I+1)*w-I)+k}function q(w,k,A,P,I){return I===void 0&&(I=1.70158),A*((w=w/P-1)*w*((I+1)*w+I)+1)+k}function $(w,k,A,P,I){return I===void 0&&(I=1.70158),w/=P/2,w<1?A/2*(w*w*(((I*=1.525)+1)*w-I))+k:A/2*((w-=2)*w*(((I*=1.525)+1)*w+I)+2)+k}function tt(w,k,A,P){return A-it(P-w,0,A,P)+k}function it(w,k,A,P){return(w/=P)<1/2.75?A*(7.5625*w*w)+k:w<2/2.75?A*(7.5625*(w-=1.5/2.75)*w+.75)+k:w<2.5/2.75?A*(7.5625*(w-=2.25/2.75)*w+.9375)+k:A*(7.5625*(w-=2.625/2.75)*w+.984375)+k}function et(w,k,A,P){return w<P/2?tt(w*2,0,A,P)*.5+k:it(w*2-P,0,A,P)*.5+A*.5+k}r.util.ease={easeInQuad:function(w,k,A,P){return A*(w/=P)*w+k},easeOutQuad:function(w,k,A,P){return-A*(w/=P)*(w-2)+k},easeInOutQuad:function(w,k,A,P){return w/=P/2,w<1?A/2*w*w+k:-A/2*(--w*(w-2)-1)+k},easeInCubic:function(w,k,A,P){return A*(w/=P)*w*w+k},easeOutCubic:l,easeInOutCubic:a,easeInQuart:t,easeOutQuart:n,easeInOutQuart:e,easeInQuint:o,easeOutQuint:h,easeInOutQuint:s,easeInSine:u,easeOutSine:d,easeInOutSine:m,easeInExpo:p,easeOutExpo:v,easeInOutExpo:b,easeInCirc:S,easeOutCirc:E,easeInOutCirc:F,easeInElastic:R,easeOutElastic:z,easeInOutElastic:K,easeInBack:Z,easeOutBack:q,easeInOutBack:$,easeInBounce:tt,easeOutBounce:it,easeInOutBounce:et}})(),(function(c){var i=c.fabric||(c.fabric={}),l=i.util.object.extend,a=i.util.object.clone,t=i.util.toFixed,n=i.util.parseUnit,e=i.util.multiplyTransformMatrices,o=["path","circle","polygon","polyline","ellipse","rect","line","image","text"],h=["symbol","image","marker","pattern","view","svg"],s=["pattern","defs","symbol","metadata","clipPath","mask","desc"],u=["symbol","g","a","svg","clipPath","defs"],d={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"},m={stroke:"strokeOpacity",fill:"fillOpacity"},p="font-size",v="clip-path";i.svgValidTagNamesRegEx=E(o),i.svgViewBoxElementsRegEx=E(h),i.svgInvalidAncestorsRegEx=E(s),i.svgValidParentsRegEx=E(u),i.cssRules={},i.gradientDefs={},i.clipPaths={};function b(O){return O in d?d[O]:O}function S(O,x,D,L){var N=Array.isArray(x),j;if((O==="fill"||O==="stroke")&&x==="none")x="";else{if(O==="strokeUniform")return x==="non-scaling-stroke";if(O==="strokeDashArray")x==="none"?x=null:x=x.replace(/,/g," ").split(/\s+/).map(parseFloat);else if(O==="transformMatrix")D&&D.transformMatrix?x=e(D.transformMatrix,i.parseTransformAttribute(x)):x=i.parseTransformAttribute(x);else if(O==="visible")x=x!=="none"&&x!=="hidden",D&&D.visible===!1&&(x=!1);else if(O==="opacity")x=parseFloat(x),D&&typeof D.opacity<"u"&&(x*=D.opacity);else if(O==="textAnchor")x=x==="start"?"left":x==="end"?"right":"center";else if(O==="charSpacing")j=n(x,L)/L*1e3;else if(O==="paintFirst"){var V=x.indexOf("fill"),G=x.indexOf("stroke"),x="fill";(V>-1&&G>-1&&G<V||V===-1&&G>-1)&&(x="stroke")}else{if(O==="href"||O==="xlink:href"||O==="font")return x;if(O==="imageSmoothing")return x==="optimizeQuality";j=N?x.map(n):n(x,L)}}return!N&&isNaN(j)?x:j}function E(O){return new RegExp("^("+O.join("|")+")\\b","i")}function F(O){for(var x in m)if(!(typeof O[m[x]]>"u"||O[x]==="")){if(typeof O[x]>"u"){if(!i.Object.prototype[x])continue;O[x]=i.Object.prototype[x]}if(O[x].indexOf("url(")!==0){var D=new i.Color(O[x]);O[x]=D.setAlpha(t(D.getAlpha()*O[m[x]],2)).toRgba()}}return O}function R(O,x){var D,L=[],N,j,V;for(j=0,V=x.length;j<V;j++)D=x[j],N=O.getElementsByTagName(D),L=L.concat(Array.prototype.slice.call(N));return L}i.parseTransformAttribute=(function(){function O(W,rt){var ot=i.util.cos(rt[0]),lt=i.util.sin(rt[0]),ut=0,ht=0;rt.length===3&&(ut=rt[1],ht=rt[2]),W[0]=ot,W[1]=lt,W[2]=-lt,W[3]=ot,W[4]=ut-(ot*ut-lt*ht),W[5]=ht-(lt*ut+ot*ht)}function x(W,rt){var ot=rt[0],lt=rt.length===2?rt[1]:rt[0];W[0]=ot,W[3]=lt}function D(W,rt,ot){W[ot]=Math.tan(i.util.degreesToRadians(rt[0]))}function L(W,rt){W[4]=rt[0],rt.length===2&&(W[5]=rt[1])}var N=i.iMatrix,j=i.reNum,V=i.commaWsp,G="(?:(skewX)\\s*\\(\\s*("+j+")\\s*\\))",J="(?:(skewY)\\s*\\(\\s*("+j+")\\s*\\))",B="(?:(rotate)\\s*\\(\\s*("+j+")(?:"+V+"("+j+")"+V+"("+j+"))?\\s*\\))",M="(?:(scale)\\s*\\(\\s*("+j+")(?:"+V+"("+j+"))?\\s*\\))",X="(?:(translate)\\s*\\(\\s*("+j+")(?:"+V+"("+j+"))?\\s*\\))",Y="(?:(matrix)\\s*\\(\\s*("+j+")"+V+"("+j+")"+V+"("+j+")"+V+"("+j+")"+V+"("+j+")"+V+"("+j+")\\s*\\))",H="(?:"+Y+"|"+X+"|"+M+"|"+B+"|"+G+"|"+J+")",U="(?:"+H+"(?:"+V+"*"+H+")*)",Q="^\\s*(?:"+U+"?)\\s*$",st=new RegExp(Q),nt=new RegExp(H,"g");return function(W){var rt=N.concat(),ot=[];if(!W||W&&!st.test(W))return rt;W.replace(nt,function(ut){var ht=new RegExp(H).exec(ut).filter(function(zt){return!!zt}),bt=ht[1],dt=ht.slice(2).map(parseFloat);switch(bt){case"translate":L(rt,dt);break;case"rotate":dt[0]=i.util.degreesToRadians(dt[0]),O(rt,dt);break;case"scale":x(rt,dt);break;case"skewX":D(rt,dt,2);break;case"skewY":D(rt,dt,1);break;case"matrix":rt=dt;break}ot.push(rt.concat()),rt=N.concat()});for(var lt=ot[0];ot.length>1;)ot.shift(),lt=i.util.multiplyTransformMatrices(lt,ot[0]);return lt}})();function z(O,x){var D,L;O.replace(/;\s*$/,"").split(";").forEach(function(N){var j=N.split(":");D=j[0].trim().toLowerCase(),L=j[1].trim(),x[D]=L})}function K(O,x){var D,L;for(var N in O)typeof O[N]>"u"||(D=N.toLowerCase(),L=O[N],x[D]=L)}function Z(O,x){var D={};for(var L in i.cssRules[x])if(q(O,L.split(" ")))for(var N in i.cssRules[x][L])D[N]=i.cssRules[x][L][N];return D}function q(O,x){var D,L=!0;return D=tt(O,x.pop()),D&&x.length&&(L=$(O,x)),D&&L&&x.length===0}function $(O,x){for(var D,L=!0;O.parentNode&&O.parentNode.nodeType===1&&x.length;)L&&(D=x.pop()),O=O.parentNode,L=tt(O,D);return x.length===0}function tt(O,x){var D=O.nodeName,L=O.getAttribute("class"),N=O.getAttribute("id"),j,V;if(j=new RegExp("^"+D,"i"),x=x.replace(j,""),N&&x.length&&(j=new RegExp("#"+N+"(?![a-zA-Z\\-]+)","i"),x=x.replace(j,"")),L&&x.length)for(L=L.split(" "),V=L.length;V--;)j=new RegExp("\\."+L[V]+"(?![a-zA-Z\\-]+)","i"),x=x.replace(j,"");return x.length===0}function it(O,x){var D;if(O.getElementById&&(D=O.getElementById(x)),D)return D;var L,N,j,V=O.getElementsByTagName("*");for(N=0,j=V.length;N<j;N++)if(L=V[N],x===L.getAttribute("id"))return L}function et(O){for(var x=R(O,["use","svg:use"]),D=0;x.length&&D<x.length;){var L=x[D],N=L.getAttribute("xlink:href")||L.getAttribute("href");if(N===null)return;var j=N.slice(1),V=L.getAttribute("x")||0,G=L.getAttribute("y")||0,J=it(O,j).cloneNode(!0),B=(J.getAttribute("transform")||"")+" translate("+V+", "+G+")",M,X=x.length,Y,H,U,Q,st=i.svgNS;if(k(J),/^svg$/i.test(J.nodeName)){var nt=J.ownerDocument.createElementNS(st,"g");for(H=0,U=J.attributes,Q=U.length;H<Q;H++)Y=U.item(H),nt.setAttributeNS(st,Y.nodeName,Y.nodeValue);for(;J.firstChild;)nt.appendChild(J.firstChild);J=nt}for(H=0,U=L.attributes,Q=U.length;H<Q;H++)Y=U.item(H),!(Y.nodeName==="x"||Y.nodeName==="y"||Y.nodeName==="xlink:href"||Y.nodeName==="href")&&(Y.nodeName==="transform"?B=Y.nodeValue+" "+B:J.setAttribute(Y.nodeName,Y.nodeValue));J.setAttribute("transform",B),J.setAttribute("instantiated_by_use","1"),J.removeAttribute("id"),M=L.parentNode,M.replaceChild(J,L),x.length===X&&D++}}var w=new RegExp("^\\s*("+i.reNum+"+)\\s*,?\\s*("+i.reNum+"+)\\s*,?\\s*("+i.reNum+"+)\\s*,?\\s*("+i.reNum+"+)\\s*$");function k(O){if(!i.svgViewBoxElementsRegEx.test(O.nodeName))return{};var x=O.getAttribute("viewBox"),D=1,L=1,N=0,j=0,V,G,J,B,M=O.getAttribute("width"),X=O.getAttribute("height"),Y=O.getAttribute("x")||0,H=O.getAttribute("y")||0,U=O.getAttribute("preserveAspectRatio")||"",Q=!x||!(x=x.match(w)),st=!M||!X||M==="100%"||X==="100%",nt=Q&&st,W={},rt="",ot=0,lt=0;if(W.width=0,W.height=0,W.toBeParsed=nt,Q&&(Y||H)&&O.parentNode&&O.parentNode.nodeName!=="#document"&&(rt=" translate("+n(Y)+" "+n(H)+") ",J=(O.getAttribute("transform")||"")+rt,O.setAttribute("transform",J),O.removeAttribute("x"),O.removeAttribute("y")),nt)return W;if(Q)return W.width=n(M),W.height=n(X),W;if(N=-parseFloat(x[1]),j=-parseFloat(x[2]),V=parseFloat(x[3]),G=parseFloat(x[4]),W.minX=N,W.minY=j,W.viewBoxWidth=V,W.viewBoxHeight=G,st?(W.width=V,W.height=G):(W.width=n(M),W.height=n(X),D=W.width/V,L=W.height/G),U=i.util.parsePreserveAspectRatioAttribute(U),U.alignX!=="none"&&(U.meetOrSlice==="meet"&&(L=D=D>L?L:D),U.meetOrSlice==="slice"&&(L=D=D>L?D:L),ot=W.width-V*D,lt=W.height-G*D,U.alignX==="Mid"&&(ot/=2),U.alignY==="Mid"&&(lt/=2),U.alignX==="Min"&&(ot=0),U.alignY==="Min"&&(lt=0)),D===1&&L===1&&N===0&&j===0&&Y===0&&H===0)return W;if((Y||H)&&O.parentNode.nodeName!=="#document"&&(rt=" translate("+n(Y)+" "+n(H)+") "),J=rt+" matrix("+D+" 0 0 "+L+" "+(N*D+ot)+" "+(j*L+lt)+") ",O.nodeName==="svg"){for(B=O.ownerDocument.createElementNS(i.svgNS,"g");O.firstChild;)B.appendChild(O.firstChild);O.appendChild(B)}else B=O,B.removeAttribute("x"),B.removeAttribute("y"),J=B.getAttribute("transform")+J;return B.setAttribute("transform",J),W}function A(O,x){for(;O&&(O=O.parentNode);)if(O.nodeName&&x.test(O.nodeName.replace("svg:",""))&&!O.getAttribute("instantiated_by_use"))return!0;return!1}i.parseSVGDocument=function(O,x,D,L){if(O){et(O);var N=i.Object.__uid++,j,V,G=k(O),J=i.util.toArray(O.getElementsByTagName("*"));if(G.crossOrigin=L&&L.crossOrigin,G.svgUid=N,J.length===0&&i.isLikelyNode){J=O.selectNodes('//*[name(.)!="svg"]');var B=[];for(j=0,V=J.length;j<V;j++)B[j]=J[j];J=B}var M=J.filter(function(Y){return k(Y),i.svgValidTagNamesRegEx.test(Y.nodeName.replace("svg:",""))&&!A(Y,i.svgInvalidAncestorsRegEx)});if(!M||M&&!M.length){x&&x([],{});return}var X={};J.filter(function(Y){return Y.nodeName.replace("svg:","")==="clipPath"}).forEach(function(Y){var H=Y.getAttribute("id");X[H]=i.util.toArray(Y.getElementsByTagName("*")).filter(function(U){return i.svgValidTagNamesRegEx.test(U.nodeName.replace("svg:",""))})}),i.gradientDefs[N]=i.getGradientDefs(O),i.cssRules[N]=i.getCSSRules(O),i.clipPaths[N]=X,i.parseElements(M,function(Y,H){x&&(x(Y,G,H,J),delete i.gradientDefs[N],delete i.cssRules[N],delete i.clipPaths[N])},a(G),D,L)}};function P(O,x){var D=["gradientTransform","x1","x2","y1","y2","gradientUnits","cx","cy","r","fx","fy"],L="xlink:href",N=x.getAttribute(L).slice(1),j=it(O,N);if(j&&j.getAttribute(L)&&P(O,j),D.forEach(function(G){j&&!x.hasAttribute(G)&&j.hasAttribute(G)&&x.setAttribute(G,j.getAttribute(G))}),!x.children.length)for(var V=j.cloneNode(!0);V.firstChild;)x.appendChild(V.firstChild);x.removeAttribute(L)}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*("+i.reNum+"(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|"+i.reNum+"))?\\s+(.*)");l(i,{parseFontDeclaration:function(O,x){var D=O.match(I);if(D){var L=D[1],N=D[3],j=D[4],V=D[5],G=D[6];L&&(x.fontStyle=L),N&&(x.fontWeight=isNaN(parseFloat(N))?N:parseFloat(N)),j&&(x.fontSize=n(j)),G&&(x.fontFamily=G),V&&(x.lineHeight=V==="normal"?1:V)}},getGradientDefs:function(O){var x=["linearGradient","radialGradient","svg:linearGradient","svg:radialGradient"],D=R(O,x),L,N=0,j={};for(N=D.length;N--;)L=D[N],L.getAttribute("xlink:href")&&P(O,L),j[L.getAttribute("id")]=L;return j},parseAttributes:function(O,x,D){if(O){var L,N={},j,V;typeof D>"u"&&(D=O.getAttribute("svgUid")),O.parentNode&&i.svgValidParentsRegEx.test(O.parentNode.nodeName)&&(N=i.parseAttributes(O.parentNode,x,D));var G=x.reduce(function(U,Q){return L=O.getAttribute(Q),L&&(U[Q]=L),U},{}),J=l(Z(O,D),i.parseStyleAttribute(O));G=l(G,J),J[v]&&O.setAttribute(v,J[v]),j=V=N.fontSize||i.Text.DEFAULT_SVG_FONT_SIZE,G[p]&&(G[p]=j=n(G[p],V));var B,M,X={};for(var Y in G)B=b(Y),M=S(B,G[Y],N,j),X[B]=M;X&&X.font&&i.parseFontDeclaration(X.font,X);var H=l(N,X);return i.svgValidParentsRegEx.test(O.nodeName)?H:F(H)}},parseElements:function(O,x,D,L,N){new i.ElementsParser(O,x,D,L,N).parse()},parseStyleAttribute:function(O){var x={},D=O.getAttribute("style");return D&&(typeof D=="string"?z(D,x):K(D,x)),x},parsePointsAttribute:function(O){if(!O)return null;O=O.replace(/,/g," ").trim(),O=O.split(/\s+/);var x=[],D,L;for(D=0,L=O.length;D<L;D+=2)x.push({x:parseFloat(O[D]),y:parseFloat(O[D+1])});return x},getCSSRules:function(O){var x=O.getElementsByTagName("style"),D,L,N={},j;for(D=0,L=x.length;D<L;D++){var V=x[D].textContent;V=V.replace(/\/\*[\s\S]*?\*\//g,""),V.trim()!==""&&(j=V.split("}"),j=j.filter(function(G){return G.trim()}),j.forEach(function(G){var J=G.split("{"),B={},M=J[1].trim(),X=M.split(";").filter(function(Q){return Q.trim()});for(D=0,L=X.length;D<L;D++){var Y=X[D].split(":"),H=Y[0].trim(),U=Y[1].trim();B[H]=U}G=J[0].trim(),G.split(",").forEach(function(Q){Q=Q.replace(/^svg/i,"").trim(),Q!==""&&(N[Q]?i.util.object.extend(N[Q],B):N[Q]=i.util.object.clone(B))})}))}return N},loadSVGFromURL:function(O,x,D,L){O=O.replace(/^\n\s*/,"").trim(),new i.util.request(O,{method:"get",onComplete:N});function N(j){var V=j.responseXML;if(!V||!V.documentElement)return x&&x(null),!1;i.parseSVGDocument(V.documentElement,function(G,J,B,M){x&&x(G,J,B,M)},D,L)}},loadSVGFromString:function(O,x,D,L){var N=new i.window.DOMParser,j=N.parseFromString(O.trim(),"text/xml");i.parseSVGDocument(j.documentElement,function(V,G,J,B){x(V,G,J,B)},D,L)}})})(f),r.ElementsParser=function(c,i,l,a,t,n){this.elements=c,this.callback=i,this.options=l,this.reviver=a,this.svgUid=l&&l.svgUid||0,this.parsingOptions=t,this.regexUrl=/^url\(['"]?#([^'"]+)['"]?\)/g,this.doc=n},(function(c){c.parse=function(){this.instances=new Array(this.elements.length),this.numElements=this.elements.length,this.createObjects()},c.createObjects=function(){var i=this;this.elements.forEach(function(l,a){l.setAttribute("svgUid",i.svgUid),i.createObject(l,a)})},c.findTag=function(i){return r[r.util.string.capitalize(i.tagName.replace("svg:",""))]},c.createObject=function(i,l){var a=this.findTag(i);if(a&&a.fromElement)try{a.fromElement(i,this.createCallback(l,i),this.options)}catch(t){r.log(t)}else this.checkIfDone()},c.createCallback=function(i,l){var a=this;return function(t){var n;a.resolveGradient(t,l,"fill"),a.resolveGradient(t,l,"stroke"),t instanceof r.Image&&t._originalElement&&(n=t.parsePreserveAspectRatioAttribute(l)),t._removeTransformMatrix(n),a.resolveClipPath(t,l),a.reviver&&a.reviver(l,t),a.instances[i]=t,a.checkIfDone()}},c.extractPropertyDefinition=function(i,l,a){var t=i[l],n=this.regexUrl;if(n.test(t)){n.lastIndex=0;var e=n.exec(t)[1];return n.lastIndex=0,r[a][this.svgUid][e]}},c.resolveGradient=function(i,l,a){var t=this.extractPropertyDefinition(i,a,"gradientDefs");if(t){var n=l.getAttribute(a+"-opacity"),e=r.Gradient.fromElement(t,i,n,this.options);i.set(a,e)}},c.createClipPathCallback=function(i,l){return function(a){a._removeTransformMatrix(),a.fillRule=a.clipRule,l.push(a)}},c.resolveClipPath=function(i,l){var a=this.extractPropertyDefinition(i,"clipPath","clipPaths"),t,n,e,o,h,s;if(a){o=[],e=r.util.invertTransform(i.calcTransformMatrix());for(var u=a[0].parentNode,d=l;d.parentNode&&d.getAttribute("clip-path")!==i.clipPath;)d=d.parentNode;d.parentNode.appendChild(u);for(var m=0;m<a.length;m++)t=a[m],n=this.findTag(t),n.fromElement(t,this.createClipPathCallback(i,o),this.options);o.length===1?a=o[0]:a=new r.Group(o),h=r.util.multiplyTransformMatrices(e,a.calcTransformMatrix()),a.clipPath&&this.resolveClipPath(a,d);var s=r.util.qrDecompose(h);a.flipX=!1,a.flipY=!1,a.set("scaleX",s.scaleX),a.set("scaleY",s.scaleY),a.angle=s.angle,a.skewX=s.skewX,a.skewY=0,a.setPositionByOrigin({x:s.translateX,y:s.translateY},"center","center"),i.clipPath=a}else delete i.clipPath},c.checkIfDone=function(){--this.numElements===0&&(this.instances=this.instances.filter(function(i){return i!=null}),this.callback(this.instances,this.elements))}})(r.ElementsParser.prototype),(function(c){var i=c.fabric||(c.fabric={});if(i.Point){i.warn("fabric.Point is already defined");return}i.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,n=this.y-a.y;return Math.sqrt(t*t+n*n)},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,n=this.y;this.x=a.x,this.y=a.y,a.x=t,a.y=n},clone:function(){return new l(this.x,this.y)}}})(f),(function(c){var i=c.fabric||(c.fabric={});if(i.Intersection){i.warn("fabric.Intersection is already defined");return}function l(a){this.status=a,this.points=[]}i.Intersection=l,i.Intersection.prototype={constructor:l,appendPoint:function(a){return this.points.push(a),this},appendPoints:function(a){return this.points=this.points.concat(a),this}},i.Intersection.intersectLineLine=function(a,t,n,e){var o,h=(e.x-n.x)*(a.y-n.y)-(e.y-n.y)*(a.x-n.x),s=(t.x-a.x)*(a.y-n.y)-(t.y-a.y)*(a.x-n.x),u=(e.y-n.y)*(t.x-a.x)-(e.x-n.x)*(t.y-a.y);if(u!==0){var d=h/u,m=s/u;0<=d&&d<=1&&0<=m&&m<=1?(o=new l("Intersection"),o.appendPoint(new i.Point(a.x+d*(t.x-a.x),a.y+d*(t.y-a.y)))):o=new l}else h===0||s===0?o=new l("Coincident"):o=new l("Parallel");return o},i.Intersection.intersectLinePolygon=function(a,t,n){var e=new l,o=n.length,h,s,u,d;for(d=0;d<o;d++)h=n[d],s=n[(d+1)%o],u=l.intersectLineLine(a,t,h,s),e.appendPoints(u.points);return e.points.length>0&&(e.status="Intersection"),e},i.Intersection.intersectPolygonPolygon=function(a,t){var n=new l,e=a.length,o;for(o=0;o<e;o++){var h=a[o],s=a[(o+1)%e],u=l.intersectLinePolygon(h,s,t);n.appendPoints(u.points)}return n.points.length>0&&(n.status="Intersection"),n},i.Intersection.intersectPolygonRectangle=function(a,t,n){var e=t.min(n),o=t.max(n),h=new i.Point(o.x,e.y),s=new i.Point(e.x,o.y),u=l.intersectLinePolygon(e,h,a),d=l.intersectLinePolygon(h,o,a),m=l.intersectLinePolygon(o,s,a),p=l.intersectLinePolygon(s,e,a),v=new l;return v.appendPoints(u.points),v.appendPoints(d.points),v.appendPoints(m.points),v.appendPoints(p.points),v.points.length>0&&(v.status="Intersection"),v}})(f),(function(c){var i=c.fabric||(c.fabric={});if(i.Color){i.warn("fabric.Color is already defined.");return}function l(t){t?this._tryParsingColor(t):this.setSource([0,0,0,1])}i.Color=l,i.Color.prototype={_tryParsingColor:function(t){var n;t in l.colorNameMap&&(t=l.colorNameMap[t]),t==="transparent"&&(n=[255,255,255,0]),n||(n=l.sourceFromHex(t)),n||(n=l.sourceFromRgb(t)),n||(n=l.sourceFromHsl(t)),n||(n=[0,0,0,1]),n&&this.setSource(n)},_rgbToHsl:function(t,n,e){t/=255,n/=255,e/=255;var o,h,s,u=i.util.array.max([t,n,e]),d=i.util.array.min([t,n,e]);if(s=(u+d)/2,u===d)o=h=0;else{var m=u-d;switch(h=s>.5?m/(2-u-d):m/(u+d),u){case t:o=(n-e)/m+(n<e?6:0);break;case n:o=(e-t)/m+2;break;case e:o=(t-n)/m+4;break}o/=6}return[Math.round(o*360),Math.round(h*100),Math.round(s*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(),n=this._rgbToHsl(t[0],t[1],t[2]);return"hsl("+n[0]+","+n[1]+"%,"+n[2]+"%)"},toHsla:function(){var t=this.getSource(),n=this._rgbToHsl(t[0],t[1],t[2]);return"hsla("+n[0]+","+n[1]+"%,"+n[2]+"%,"+t[3]+")"},toHex:function(){var t=this.getSource(),n,e,o;return n=t[0].toString(16),n=n.length===1?"0"+n:n,e=t[1].toString(16),e=e.length===1?"0"+e:e,o=t[2].toString(16),o=o.length===1?"0"+o:o,n.toUpperCase()+e.toUpperCase()+o.toUpperCase()},toHexa:function(){var t=this.getSource(),n;return n=Math.round(t[3]*255),n=n.toString(16),n=n.length===1?"0"+n:n,this.toHex()+n.toUpperCase()},getAlpha:function(){return this.getSource()[3]},setAlpha:function(t){var n=this.getSource();return n[3]=t,this.setSource(n),this},toGrayscale:function(){var t=this.getSource(),n=parseInt((t[0]*.3+t[1]*.59+t[2]*.11).toFixed(0),10),e=t[3];return this.setSource([n,n,n,e]),this},toBlackWhite:function(t){var n=this.getSource(),e=(n[0]*.3+n[1]*.59+n[2]*.11).toFixed(0),o=n[3];return t=t||127,e=Number(e)<Number(t)?0:255,this.setSource([e,e,e,o]),this},overlayWith:function(t){t instanceof l||(t=new l(t));var n=[],e=this.getAlpha(),o=.5,h=this.getSource(),s=t.getSource(),u;for(u=0;u<3;u++)n.push(Math.round(h[u]*(1-o)+s[u]*o));return n[3]=e,this.setSource(n),this}},i.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,i.Color.reHSLa=/^hsla?\(\s*(\d{1,3})\s*,\s*(\d{1,3}\%)\s*,\s*(\d{1,3}\%)\s*(?:\s*,\s*(\d+(?:\.\d+)?)\s*)?\)$/i,i.Color.reHex=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,i.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,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+(n-t)*6*e:e<1/2?n:e<2/3?t+(n-t)*(2/3-e)*6:t}i.Color.fromRgb=function(t){return l.fromSource(l.sourceFromRgb(t))},i.Color.sourceFromRgb=function(t){var n=t.match(l.reRGBa);if(n){var e=parseInt(n[1],10)/(/%$/.test(n[1])?100:1)*(/%$/.test(n[1])?255:1),o=parseInt(n[2],10)/(/%$/.test(n[2])?100:1)*(/%$/.test(n[2])?255:1),h=parseInt(n[3],10)/(/%$/.test(n[3])?100:1)*(/%$/.test(n[3])?255:1);return[parseInt(e,10),parseInt(o,10),parseInt(h,10),n[4]?parseFloat(n[4]):1]}},i.Color.fromRgba=l.fromRgb,i.Color.fromHsl=function(t){return l.fromSource(l.sourceFromHsl(t))},i.Color.sourceFromHsl=function(t){var n=t.match(l.reHSLa);if(n){var e=(parseFloat(n[1])%360+360)%360/360,o=parseFloat(n[2])/(/%$/.test(n[2])?100:1),h=parseFloat(n[3])/(/%$/.test(n[3])?100:1),s,u,d;if(o===0)s=u=d=h;else{var m=h<=.5?h*(o+1):h+o-h*o,p=h*2-m;s=a(p,m,e+1/3),u=a(p,m,e),d=a(p,m,e-1/3)}return[Math.round(s*255),Math.round(u*255),Math.round(d*255),n[4]?parseFloat(n[4]):1]}},i.Color.fromHsla=l.fromHsl,i.Color.fromHex=function(t){return l.fromSource(l.sourceFromHex(t))},i.Color.sourceFromHex=function(t){if(t.match(l.reHex)){var n=t.slice(t.indexOf("#")+1),e=n.length===3||n.length===4,o=n.length===8||n.length===4,h=e?n.charAt(0)+n.charAt(0):n.substring(0,2),s=e?n.charAt(1)+n.charAt(1):n.substring(2,4),u=e?n.charAt(2)+n.charAt(2):n.substring(4,6),d=o?e?n.charAt(3)+n.charAt(3):n.substring(6,8):"FF";return[parseInt(h,16),parseInt(s,16),parseInt(u,16),parseFloat((parseInt(d,16)/255).toFixed(2))]}},i.Color.fromSource=function(t){var n=new l;return n.setSource(t),n}})(f),(function(c){var i=c.fabric||(c.fabric={}),l=["e","se","s","sw","w","nw","n","ne","e"],a=["ns","nesw","ew","nwse"],t={},n="left",e="top",o="right",h="bottom",s="center",u={top:h,bottom:e,left:o,right:n,center:s},d=i.util.radiansToDegrees,m=Math.sign||function(B){return(B>0)-(B<0)||+B};function p(B,M){var X=B.angle+d(Math.atan2(M.y,M.x))+360;return Math.round(X%360/45)}function v(B,M){var X=M.transform.target,Y=X.canvas,H=i.util.object.clone(M);H.target=X,Y&&Y.fire("object:"+B,H),X.fire(B,M)}function b(B,M){var X=M.canvas,Y=X.uniScaleKey,H=B[Y];return X.uniformScaling&&!H||!X.uniformScaling&&H}function S(B){return B.originX===s&&B.originY===s}function E(B,M,X){var Y=B.lockScalingX,H=B.lockScalingY;return!!(Y&&H||!M&&(Y||H)&&X||Y&&M==="x"||H&&M==="y")}function F(B,M,X){var Y="not-allowed",H=b(B,X),U="";if(M.x!==0&&M.y===0?U="x":M.x===0&&M.y!==0&&(U="y"),E(X,U,H))return Y;var Q=p(X,M);return l[Q]+"-resize"}function R(B,M,X){var Y="not-allowed";if(M.x!==0&&X.lockSkewingY||M.y!==0&&X.lockSkewingX)return Y;var H=p(X,M)%4;return a[H]+"-resize"}function z(B,M,X){return B[X.canvas.altActionKey]?t.skewCursorStyleHandler(B,M,X):t.scaleCursorStyleHandler(B,M,X)}function K(B,M,X){var Y=B[X.canvas.altActionKey];if(M.x===0)return Y?"skewX":"scaleY";if(M.y===0)return Y?"skewY":"scaleX"}function Z(B,M,X){return X.lockRotation?"not-allowed":M.cursorStyle}function q(B,M,X,Y){return{e:B,transform:M,pointer:{x:X,y:Y}}}function $(B){return function(M,X,Y,H){var U=X.target,Q=U.getCenterPoint(),st=U.translateToOriginPoint(Q,X.originX,X.originY),nt=B(M,X,Y,H);return U.setPositionByOrigin(st,X.originX,X.originY),nt}}function tt(B,M){return function(X,Y,H,U){var Q=M(X,Y,H,U);return Q&&v(B,q(X,Y,H,U)),Q}}function it(B,M,X,Y,H){var U=B.target,Q=U.controls[B.corner],st=U.canvas.getZoom(),nt=U.padding/st,W=U.toLocalPoint(new i.Point(Y,H),M,X);return W.x>=nt&&(W.x-=nt),W.x<=-nt&&(W.x+=nt),W.y>=nt&&(W.y-=nt),W.y<=nt&&(W.y+=nt),W.x-=Q.offsetX,W.y-=Q.offsetY,W}function et(B){return B.flipX!==B.flipY}function w(B,M,X,Y,H){if(B[M]!==0){var U=B._getTransformedDimensions()[Y],Q=H/U*B[X];B.set(X,Q)}}function k(B,M,X,Y){var H=M.target,U=H._getTransformedDimensions(0,H.skewY),Q=it(M,M.originX,M.originY,X,Y),st=Math.abs(Q.x*2)-U.x,nt=H.skewX,W;st<2?W=0:(W=d(Math.atan2(st/H.scaleX,U.y/H.scaleY)),M.originX===n&&M.originY===h&&(W=-W),M.originX===o&&M.originY===e&&(W=-W),et(H)&&(W=-W));var rt=nt!==W;if(rt){var ot=H._getTransformedDimensions().y;H.set("skewX",W),w(H,"skewY","scaleY","y",ot)}return rt}function A(B,M,X,Y){var H=M.target,U=H._getTransformedDimensions(H.skewX,0),Q=it(M,M.originX,M.originY,X,Y),st=Math.abs(Q.y*2)-U.y,nt=H.skewY,W;st<2?W=0:(W=d(Math.atan2(st/H.scaleY,U.x/H.scaleX)),M.originX===n&&M.originY===h&&(W=-W),M.originX===o&&M.originY===e&&(W=-W),et(H)&&(W=-W));var rt=nt!==W;if(rt){var ot=H._getTransformedDimensions().x;H.set("skewY",W),w(H,"skewX","scaleX","x",ot)}return rt}function P(B,M,X,Y){var H=M.target,U=H.skewX,Q,st=M.originY;if(H.lockSkewingX)return!1;if(U===0){var nt=it(M,s,s,X,Y);nt.x>0?Q=n:Q=o}else U>0&&(Q=st===e?n:o),U<0&&(Q=st===e?o:n),et(H)&&(Q=Q===n?o:n);M.originX=Q;var W=tt("skewing",$(k));return W(B,M,X,Y)}function I(B,M,X,Y){var H=M.target,U=H.skewY,Q,st=M.originX;if(H.lockSkewingY)return!1;if(U===0){var nt=it(M,s,s,X,Y);nt.y>0?Q=e:Q=h}else U>0&&(Q=st===n?e:h),U<0&&(Q=st===n?h:e),et(H)&&(Q=Q===e?h:e);M.originY=Q;var W=tt("skewing",$(A));return W(B,M,X,Y)}function O(B,M,X,Y){var H=M,U=H.target,Q=U.translateToOriginPoint(U.getCenterPoint(),H.originX,H.originY);if(U.lockRotation)return!1;var st=Math.atan2(H.ey-Q.y,H.ex-Q.x),nt=Math.atan2(Y-Q.y,X-Q.x),W=d(nt-st+H.theta),rt=!0;if(U.snapAngle>0){var ot=U.snapAngle,lt=U.snapThreshold||ot,ut=Math.ceil(W/ot)*ot,ht=Math.floor(W/ot)*ot;Math.abs(W-ht)<lt?W=ht:Math.abs(W-ut)<lt&&(W=ut)}return W<0&&(W=360+W),W%=360,rt=U.angle!==W,U.angle=W,rt}function x(B,M,X,Y,H){H=H||{};var U=M.target,Q=U.lockScalingX,st=U.lockScalingY,nt=H.by,W,rt,ot,lt,ut=b(B,U),ht=E(U,nt,ut),bt,dt,zt=M.gestureScale;if(ht)return!1;if(zt)rt=M.scaleX*zt,ot=M.scaleY*zt;else{if(W=it(M,M.originX,M.originY,X,Y),bt=nt!=="y"?m(W.x):1,dt=nt!=="x"?m(W.y):1,M.signX||(M.signX=bt),M.signY||(M.signY=dt),U.lockScalingFlip&&(M.signX!==bt||M.signY!==dt))return!1;if(lt=U._getTransformedDimensions(),ut&&!nt){var le=Math.abs(W.x)+Math.abs(W.y),kt=M.original,pr=Math.abs(lt.x*kt.scaleX/U.scaleX)+Math.abs(lt.y*kt.scaleY/U.scaleY),Vi=le/pr;rt=kt.scaleX*Vi,ot=kt.scaleY*Vi}else rt=Math.abs(W.x*U.scaleX/lt.x),ot=Math.abs(W.y*U.scaleY/lt.y);S(M)&&(rt*=2,ot*=2),M.signX!==bt&&nt!=="y"&&(M.originX=u[M.originX],rt*=-1,M.signX=bt),M.signY!==dt&&nt!=="x"&&(M.originY=u[M.originY],ot*=-1,M.signY=dt)}var mr=U.scaleX,vr=U.scaleY;return nt?(nt==="x"&&U.set("scaleX",rt),nt==="y"&&U.set("scaleY",ot)):(!Q&&U.set("scaleX",rt),!st&&U.set("scaleY",ot)),mr!==U.scaleX||vr!==U.scaleY}function D(B,M,X,Y){return x(B,M,X,Y)}function L(B,M,X,Y){return x(B,M,X,Y,{by:"x"})}function N(B,M,X,Y){return x(B,M,X,Y,{by:"y"})}function j(B,M,X,Y){return B[M.target.canvas.altActionKey]?t.skewHandlerX(B,M,X,Y):t.scalingY(B,M,X,Y)}function V(B,M,X,Y){return B[M.target.canvas.altActionKey]?t.skewHandlerY(B,M,X,Y):t.scalingX(B,M,X,Y)}function G(B,M,X,Y){var H=M.target,U=it(M,M.originX,M.originY,X,Y),Q=H.strokeWidth/(H.strokeUniform?H.scaleX:1),st=S(M)?2:1,nt=H.width,W=Math.abs(U.x*st/H.scaleX)-Q;return H.set("width",Math.max(W,0)),nt!==W}function J(B,M,X,Y){var H=M.target,U=X-M.offsetX,Q=Y-M.offsetY,st=!H.get("lockMovementX")&&H.left!==U,nt=!H.get("lockMovementY")&&H.top!==Q;return st&&H.set("left",U),nt&&H.set("top",Q),(st||nt)&&v("moving",q(B,M,X,Y)),st||nt}t.scaleCursorStyleHandler=F,t.skewCursorStyleHandler=R,t.scaleSkewCursorStyleHandler=z,t.rotationWithSnapping=tt("rotating",$(O)),t.scalingEqually=tt("scaling",$(D)),t.scalingX=tt("scaling",$(L)),t.scalingY=tt("scaling",$(N)),t.scalingYOrSkewingX=j,t.scalingXOrSkewingY=V,t.changeWidth=tt("resizing",$(G)),t.skewHandlerX=P,t.skewHandlerY=I,t.dragHandler=J,t.scaleOrSkewActionName=K,t.rotationStyleHandler=Z,t.fireEvent=v,t.wrapWithFixedAnchor=$,t.wrapWithFireEvent=tt,t.getLocalPoint=it,i.controlsUtils=t})(f),(function(c){var i=c.fabric||(c.fabric={}),l=i.util.degreesToRadians,a=i.controlsUtils;function t(e,o,h,s,u){s=s||{};var d=this.sizeX||s.cornerSize||u.cornerSize,m=this.sizeY||s.cornerSize||u.cornerSize,p=typeof s.transparentCorners<"u"?s.transparentCorners:u.transparentCorners,v=p?"stroke":"fill",b=!p&&(s.cornerStrokeColor||u.cornerStrokeColor),S=o,E=h,F;e.save(),e.fillStyle=s.cornerColor||u.cornerColor,e.strokeStyle=s.cornerStrokeColor||u.cornerStrokeColor,d>m?(F=d,e.scale(1,m/d),E=h*d/m):m>d?(F=m,e.scale(d/m,1),S=o*m/d):F=d,e.lineWidth=1,e.beginPath(),e.arc(S,E,F/2,0,2*Math.PI,!1),e[v](),b&&e.stroke(),e.restore()}function n(e,o,h,s,u){s=s||{};var d=this.sizeX||s.cornerSize||u.cornerSize,m=this.sizeY||s.cornerSize||u.cornerSize,p=typeof s.transparentCorners<"u"?s.transparentCorners:u.transparentCorners,v=p?"stroke":"fill",b=!p&&(s.cornerStrokeColor||u.cornerStrokeColor),S=d/2,E=m/2;e.save(),e.fillStyle=s.cornerColor||u.cornerColor,e.strokeStyle=s.cornerStrokeColor||u.cornerStrokeColor,e.lineWidth=1,e.translate(o,h),e.rotate(l(u.angle)),e[v+"Rect"](-S,-E,d,m),b&&e.strokeRect(-S,-E,d,m),e.restore()}a.renderCircleControl=t,a.renderSquareControl=n})(f),(function(c){var i=c.fabric||(c.fabric={});function l(a){for(var t in a)this[t]=a[t]}i.Control=l,i.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 n=a._controlsVisibility;return n&&typeof n[t]<"u"?n[t]:this.visible},setVisibility:function(a){this.visible=a},positionHandler:function(a,t){var n=i.util.transformPoint({x:this.x*a.x+this.offsetX,y:this.y*a.y+this.offsetY},t);return n},calcCornerCoords:function(a,t,n,e,o){var h,s,u,d,m=o?this.touchSizeX:this.sizeX,p=o?this.touchSizeY:this.sizeY;if(m&&p&&m!==p){var v=Math.atan2(p,m),b=Math.sqrt(m*m+p*p)/2,S=v-i.util.degreesToRadians(a),E=Math.PI/2-v-i.util.degreesToRadians(a);h=b*i.util.cos(S),s=b*i.util.sin(S),u=b*i.util.cos(E),d=b*i.util.sin(E)}else{var F=m&&p?m:t;b=F*.7071067812;var S=i.util.degreesToRadians(45-a);h=u=b*i.util.cos(S),s=d=b*i.util.sin(S)}return{tl:{x:n-d,y:e-u},tr:{x:n+h,y:e-s},bl:{x:n-h,y:e+s},br:{x:n+d,y:e+u}}},render:function(a,t,n,e,o){switch(e=e||{},e.cornerStyle||o.cornerStyle){case"circle":i.controlsUtils.renderCircleControl.call(this,a,t,n,e,o);break;default:i.controlsUtils.renderSquareControl.call(this,a,t,n,e,o)}}}})(f),(function(){function c(n,e){var o=n.getAttribute("style"),h=n.getAttribute("offset")||0,s,u,d,m;if(h=parseFloat(h)/(/%$/.test(h)?100:1),h=h<0?0:h>1?1:h,o){var p=o.split(/\s*;\s*/);for(p[p.length-1]===""&&p.pop(),m=p.length;m--;){var v=p[m].split(/\s*:\s*/),b=v[0].trim(),S=v[1].trim();b==="stop-color"?s=S:b==="stop-opacity"&&(d=S)}}return s||(s=n.getAttribute("stop-color")||"rgb(0,0,0)"),d||(d=n.getAttribute("stop-opacity")),s=new r.Color(s),u=s.getAlpha(),d=isNaN(parseFloat(d))?1:parseFloat(d),d*=u*e,{offset:h,color:s.toRgb(),opacity:d}}function i(n){return{x1:n.getAttribute("x1")||0,y1:n.getAttribute("y1")||0,x2:n.getAttribute("x2")||"100%",y2:n.getAttribute("y2")||0}}function l(n){return{x1:n.getAttribute("fx")||n.getAttribute("cx")||"50%",y1:n.getAttribute("fy")||n.getAttribute("cy")||"50%",r1:0,x2:n.getAttribute("cx")||"50%",y2:n.getAttribute("cy")||"50%",r2:n.getAttribute("r")||"50%"}}var a=r.util.object.clone;r.Gradient=r.util.createClass({offsetX:0,offsetY:0,gradientTransform:null,gradientUnits:"pixels",type:"linear",initialize:function(n){n||(n={}),n.coords||(n.coords={});var e,o=this;Object.keys(n).forEach(function(h){o[h]=n[h]}),this.id?this.id+="_"+r.Object.__uid++:this.id=r.Object.__uid++,e={x1:n.coords.x1||0,y1:n.coords.y1||0,x2:n.coords.x2||0,y2:n.coords.y2||0},this.type==="radial"&&(e.r1=n.coords.r1||0,e.r2=n.coords.r2||0),this.coords=e,this.colorStops=n.colorStops.slice()},addColorStop:function(n){for(var e in n){var o=new r.Color(n[e]);this.colorStops.push({offset:parseFloat(e),color:o.toRgb(),opacity:o.getAlpha()})}return this},toObject:function(n){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 r.util.populateWithProperties(this,e,n),e},toSVG:function(n,u){var o=a(this.coords,!0),h,s,u=u||{},d,m,p=a(this.colorStops,!0),v=o.r1>o.r2,b=this.gradientTransform?this.gradientTransform.concat():r.iMatrix.concat(),S=-this.offsetX,E=-this.offsetY,F=!!u.additionalTransform,R=this.gradientUnits==="pixels"?"userSpaceOnUse":"objectBoundingBox";if(p.sort(function($,tt){return $.offset-tt.offset}),R==="objectBoundingBox"?(S/=n.width,E/=n.height):(S+=n.width/2,E+=n.height/2),n.type==="path"&&this.gradientUnits!=="percentage"&&(S-=n.pathOffset.x,E-=n.pathOffset.y),b[4]-=S,b[5]-=E,m='id="SVGID_'+this.id+'" gradientUnits="'+R+'"',m+=' gradientTransform="'+(F?u.additionalTransform+" ":"")+r.util.matrixToSVG(b)+'" ',this.type==="linear"?d=["<linearGradient ",m,' x1="',o.x1,'" y1="',o.y1,'" x2="',o.x2,'" y2="',o.y2,`">
|
|
8
8
|
`]:this.type==="radial"&&(d=["<radialGradient ",m,' cx="',v?o.x1:o.x2,'" cy="',v?o.y1:o.y2,'" r="',v?o.r1:o.r2,'" fx="',v?o.x2:o.x1,'" fy="',v?o.y2:o.y1,`">
|
package/dist/index.mjs
CHANGED
|
@@ -2693,11 +2693,7 @@ const jo = {
|
|
|
2693
2693
|
base64ToBlob: Io
|
|
2694
2694
|
};
|
|
2695
2695
|
var si = {};
|
|
2696
|
-
const Bo =
|
|
2697
|
-
get(f, r) {
|
|
2698
|
-
throw new Error(`Module "" has been externalized for browser compatibility. Cannot access ".${r}" in client code. See https://vite.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`);
|
|
2699
|
-
}
|
|
2700
|
-
}), Ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2696
|
+
const Bo = {}, Ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2701
2697
|
__proto__: null,
|
|
2702
2698
|
default: Bo
|
|
2703
2699
|
}, Symbol.toStringTag, { value: "Module" })), oi = /* @__PURE__ */ _r(Ho);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hprint/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"hotkeys-js": "~3.8.9",
|
|
34
34
|
"tapable": "~2.3.0",
|
|
35
35
|
"uuid": "~8.3.2",
|
|
36
|
-
"@hprint/shared": "0.0.
|
|
36
|
+
"@hprint/shared": "0.0.4"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "vite build",
|